Commit Graph

12045 Commits

Author SHA1 Message Date
Jérémie Bresson
fda867ebfe [core] fix referenced enum case (#2175) 2019-02-19 22:42:32 +08:00
victor-xplore
1dadd45ffe rest-template: allow array parameters in path using collectionFormat (#2177)
* 2125: java-resttemplate: Support collection formats in pathParams

* run ./bin/java-petstore-resttemplate.sh
run ./bin/java-petstore-resttemplate-withxml.sh
2019-02-19 22:00:27 +08:00
William Cheng
61b6f19d74 update go petstore samples 2019-02-18 23:28:35 +08:00
rhard
70180e074c Fix string types for cpprestsdk client generator (#1676)
* Fix string types for cpprestsdk client generator

* Regenerate the samples for restsdk-client
2019-02-18 22:34:51 +08:00
William Cheng
a3566cd34f Merge branch 'master' of https://github.com/OpenAPITools/openapi-generator 2019-02-18 22:28:08 +08:00
William Cheng
a440396485 update kotline samples 2019-02-18 22:27:04 +08:00
Diego Mascialino
cd1885d29e Remove API Key Authentication code for go when cookie is used. (#1601) 2019-02-18 21:51:31 +08:00
MBcom
b4c36425c2 changed the package install instructions to install the .tgz package … (#1989)
* changed the package install instructions to install the .tgz package instead of symlinking the package - otherwise you'll get trouble with links on windows

* samples added

* added samples
2019-02-18 21:32:30 +08:00
Jacob Weber
534ff3607f okhttp-gson: allow array parameters in path using collectionFormat (#2137)
* okhttp-gson: allow array parameters in path using collectionFormat

* run bin/java-petstore-okhttp-gson-parcelable.sh
2019-02-18 21:30:56 +08:00
Akira Tanimura
8d6278bd4c [Ruby] Fix regualr expression in error message (#2069) (#2139)
* Fix usage of regular expression literals in Ruby client (#2069)

* update samples of Ruby client (#2069)
2019-02-18 21:18:55 +08:00
Alexander Navratil
aace459217 [kotlin][client] bytearray conversion (#2166)
* use kotlin.String for ByteArray fields (type: string, format: byte)

* revert "use kotlin.String for ByteArray fields (type: string, format: byte)"

* add ByteArrayAdapter for string <-> ByteArray conversion with moshi
2019-02-18 18:46:44 +08:00
Luis Alejandro Herrera León
b4b8c28b2a [rust-server] Added client documentation to rust-server (#2159)
* Added client documentation to rust-server

* Removed comments

* Removed go auth example
2019-02-18 18:02:40 +08:00
Vincent Devos
594af33fb8 [Java] Getter/Setter naming convention not followed in generated models (#2095)
fix the getter/setter when the second letter of the field name is already uppercase (following the JavaBeans API specification)
2019-02-18 18:00:35 +08:00
Pablo Lázaro
ad8aa7dc0e [Java] adds snapshotVersion CLI option and uses API version as artifactVersion by default (#2033)
* [Java]: adds snapshotVersion CLI option and uses API version as artifactVersion by default

* fix some typos

* fix naming diff between branches

* ensure-up-to-date

* update samples
2019-02-18 17:54:27 +08:00
Vincent Devos
8d5b600277 [typescript-angular] Update default Angular version from 4.3 to 7.0 (#2117)
* [typescript-angular] Update default Angular version from 4.3 to 6.0 (NPM Client)

* [typescript-angular] Update default Angular version from 4.3 to 7.0 (NPM Client)
2019-02-18 17:49:42 +08:00
William Cheng
33e50e6d46 update ruby petstore samples 2019-02-18 01:21:04 +08:00
sunn
851d11cf72 Fix failing build due to deprecation of initialCaps (#2168)
Include functional for failing build in debian
2019-02-18 00:46:20 +08:00
Vincent Devos
027e6c4a5c [plugin][maven] add missing General Configuration parameters in README (#2156) 2019-02-16 22:12:19 -05:00
Luis Alejandro Herrera León
cefd29b6ff [rust-server] Changed query parameters to be url encoded (#2136)
Based on this [issue](https://github.com/servo/rust-url/issues/416) the `utf8_percent_encode` doesn't percent encode `+` instead treats it as a space which is may cause a problem if the query parameters contain one. For example if we wanted to use a DateTime range in query parameters:

`{base_path}{path}?start=2019-02-12T00:00:00+00:00&end=2019-02-13T15:00:00+00:00`

These parameters may be decoded as:

```
start = 2019-02-12T00:00:00 00:00
end = 2019-02-13T15:00:00 00:00
```

To solve this I changed query parameters to be form-urlencoded using `url::form_urlencoded` based on what's done in [`rust` client generator](ea08106c80/modules/openapi-generator/src/main/resources/rust/request.rs (L106)).
2019-02-15 13:18:08 +00:00
geropl
7cb6a38150 openapi-generator-cli.sh: Fix missing single quote (#2160) 2019-02-15 11:20:38 +09:00
alex-korobko
42544b8234 Issue 1766 Modified mustache files for Go to support nullable in the … (#1869)
* Issue 1766 Modified mustache files for Go to support nullable in the spec v3.0+; Updated model files running .sh scripts for Go.

* Add "nullable" to fake yaml

* Add sample script for OAS3

* Fix output folder (openapi3)

* Run bin/openapi3/go-petstore.sh

* Update samples

* Update jaxrs-jersey

* Update python and php samples

* Add bin/openapi3/go-gin-petstore-server.sh

* Run bin/openapi3/go-gin-petstore-server.sh

* Update bin/openapi3/go-petstore-server.sh to generate "nullable" samples

* Run bin/openapi3/go-petstore-server.sh

* Fix duplicated `import`
2019-02-15 11:08:52 +09:00
Gocha Ossinkine
161cb88e88 Don't try to detect response format if method return nothing (#2073) 2019-02-14 19:55:40 +09:00
Gocha Ossinkine
2593d78ce6 Use Symfony Validator service (#2143) 2019-02-14 19:34:20 +09:00
Gocha Ossinkine
d87a3b90da Validate input objects (#2144) 2019-02-14 19:32:21 +09:00
Esteban Marin
e01a786bc9 #2147: fix compiler error in angular typescript codegen (#2149)
* #2147: fix compiler error in angular typescript codegen

* #2147: generate samples
2019-02-14 16:39:08 +08:00
Esteban Marin
804b589f5f Revert "Don't escape [ and ] in query param keys (#2107)" (#2128)
This reverts commit ba9c12f2e0.
2019-02-13 18:17:42 +08:00
Michael van Niekerk
550774a6e2 Typescript+Axios: multipart/form-data correctly handled (#2002)
* Typescript 3.2

* Typescript spread operator

* Add vendor extension to the operation

* Remove url.URLSearchParams

* Generate form data in API

* Make axios scripts executable

* Reran generator

* Generate sample code

* Revert to 2.4 Typescript

* COLLECTION_FORMAT.{{collectionFormat}} everywhere for consistency

* Consistency on the CollectionFormats, comment on the vendor extension

* fix compilation error
2019-02-13 16:29:46 +08:00
Jérémie Bresson
598bf0cd09 [core] consider schema in headers when computing unused schemas (#2138) 2019-02-13 16:19:05 +08:00
Benoît Courtine
b6c2266a14 [Rust][Client] Code format (#2042)
Rust clients code format cleanup (with some breaking changes for model structures):

* Application of Rust style in client files (4 spaces padding). Remove useless blank lines.
* Replace getters/setters in models by public fields.
* Add a trailing comma in struct fields.
* Sample Rust clients regeneration.
2019-02-13 00:51:16 +00:00
Jérémie Bresson
ea08106c80 [core] Fix NullPointer when schema is not set in header (#2133) 2019-02-13 02:27:20 +08:00
karismann
de33360883 [typescript-angular] Incorrect OperationId Generated (starting with number) (#2130)
append _ at the beginning, as reserved keyword
2019-02-13 02:26:45 +08:00
Julian
add63cb981 [PHP] Replace File.seperator with slashes in PHP projects #2004 (#2007)
* [FIX] Replace File.seperator with slashes in PHP projects.

* Replaced 'File.separator' with slashes in AbstractPhpCodegen.
2019-02-13 02:26:15 +08:00
Jérémie Bresson
f1fa0a80ad
[clean-up] Centralize Swagger-Parser calls in the unit tests (#2110) 2019-02-12 06:09:21 +01:00
Sven Panne
fd0847864a Fixed handling of dotted module names in python generator. (#2016)
Previously, if you used a packageName of the form "foo.bar.baz", half of the
generated files of the python generator went into a subdirectory
"foo/bar/baz" (correct), the other half went into a subdirectory
"foo.bar.baz" (incorrect).
2019-02-12 12:20:34 +08:00
William Cheng
4e85993490 Merge branch 'master' of https://github.com/OpenAPITools/openapi-generator 2019-02-12 02:39:39 +08:00
William Cheng
8707f943c0 update ts angular 2 samples 2019-02-12 01:34:15 +08:00
Akira Tanimura
33a8939bd5 [Ruby] Fix enum expansion in Ruby client (#2081) (#2104)
* use double-quote string for enum value (#2081)

* use enumVars in templates for Ruby client (#2081)

* delete unnecessary line in enum model of Ruby client (#2081)

* update samples of Ruby client (#2081)
2019-02-12 00:32:36 +08:00
Gocha Ossinkine
5c64b58bae Fix JMSSerializerBundle version (#2057) 2019-02-12 00:17:43 +08:00
BastiOfBerlin
ba9c12f2e0 Don't escape [ and ] in query param keys (#2107)
rails' default naming for arrays is name[]=...&name[]=...
It doesn't recognize the escaped forms %5B + %5D but fails silently
2019-02-12 00:17:04 +08:00
Gocha Ossinkine
73d309b9ba Catch serializer exception (#2074) 2019-02-10 15:41:09 +08:00
john lilley
f76dca84f5 Fix Bug 1433 decimal literal in C# maybe other languages (#1436)
* Trivial change to kick PR again

* Fix issue 1433 (default decimal literal broken for C#)

* Replace tab with space

* update samples
2019-02-10 15:28:40 +08:00
William Cheng
302922b8a4 update php oas3 samples 2019-02-10 12:41:38 +08:00
Akihito Nakano
773aa269ae Add @autopp to Ruby technical committee (#2103) 2019-02-10 11:34:46 +08:00
Akira Tanimura
7dcffff20b [Ruby] Fix Ruby client to prevent Rubocop's rule violations (#2100) (#2102)
* [Ruby] Delete empty lines and trailing newline in template to prevent Rubocop's rule violation (#2100)

* [Ruby] update samples of Ruby client (#2100)
2019-02-10 09:29:34 +09:00
William Cheng
20d5adcdd5 [PHP] remove deprecated options (#2083)
* php remove deprecated options

* update php doc

* clean up composerVendorName in code, templates

* update samples
2019-02-10 09:25:20 +09:00
William Cheng
e0ed6719a0 Add "servers" support to the operation, path in PHP API client (#2072)
* add servers support to path, operation in php client

* remove servers from spec

* update based on feedback
2019-02-10 08:27:41 +09:00
davidwcarlson
ef7b28de00 fix 457 Support for Bearer Auth (#1930)
* fix #457 by introducing an HttpBearerAuth object

See https://github.com/OpenAPITools/openapi-generator/issues/457
Also https://github.com/OpenAPITools/openapi-generator/issues/1446 for typescript, https://github.com/OpenAPITools/openapi-generator/issues/1577 for python

Specs defined as follows currently generate BasicAuth and send an "Authorization: Basic [base64Encode(username + ":" + password)]" header
    components:
      securitySchemes:
        bearer:
          type: http
          scheme: bearer

This change will generate code which uses a new HttpBearerAuth class, which will send a "Authorization: [scheme] [accessToken]" header.
This change is slightly larger and more impactful than simply using OAuth for bearerBearer, but it allows for scheme values other than bearer.

This fix was enabled by the recent commit of 80ca67cfda

This PR is an alternative to https://github.com/OpenAPITools/openapi-generator/pull/1972

* update petstore samples

* Update HttpBearerAuth mustache templates and samples

* correct the expected number of generated java client files

* update the retrofit2 HttpBearerAuth template and samples

* Add resttemplate-specific HttpBearerAuth mustache and samples

* add vertx-specific HttpBearerAuth template and samples

* add java webclient-specific HttpBearerAuth template and samples
2019-02-09 22:51:44 +08:00
William Cheng
348c22c883
Add "servers" support to operation, path in the JS client (#2060)
* add operation, path servers to js es6 client

* add servers support to operation, path in js es5

* fix null check
2019-02-09 22:25:01 +08:00
Gocha Ossinkine
8f5fa4df83 Add controller.service_arguments tag to controllers to make them public (#2059) 2019-02-09 22:19:42 +08:00
Matthieu Berthomé
cf6f10252d [Python] handle nullable parameters with None added to allowed_values (#2034)
* handle nullable parameters with None added to allowed_values

* update samples

* spec for testing enum with null/nullable
2019-02-09 22:08:47 +08:00