Commit Graph

5399 Commits

Author SHA1 Message Date
William Cheng
7235e6d962 update petstore samples 2019-02-27 13:07:42 +08:00
Dec12 | Fujigon
5fe0c94135 [Java][JaxRs] bean validation annotation (e.g. NotNull) is applied to body param of api interface (#2239)
* fix template so that bean validation annotation (incl. NotNull) is applied to api interface.

* regenerate samples
2019-02-27 11:38:57 +08:00
William Cheng
b5ce0bddee
[JavaScript] Add petstore integration test to JS ES6 client (OAS3) (#2245)
* add test for js es6 oas3 client

* fix test with proper done

* add test, fix servers index check
2019-02-27 11:14:51 +08:00
Dec12 | Fujigon
aa339d6046 [core] add test cases for referenced enum case (#2237)
* add test case

* regenerate samples
2019-02-27 11:14:21 +08:00
William Cheng
9e2a9e1515
[Ruby] various improvements (#2226)
* add to_s in api error class

* rename variable to align with code sample

* fix initalize, better validation

* update petstore samples

* add code sample for model

* add auto-generated travis file

* improve error message

* add travis file

* uncomment to_s
2019-02-27 03:38:20 +08:00
William Cheng
9695090d9b
[R] Fix NPE issue due to default value using example value (#2231)
* fix NPE issue due to default value using example value

* update r petstore sample
2019-02-25 19:09:26 +08:00
William Cheng
8e7ad9c9b6
Removal of number being default to example in python client (#2228)
* remove number default to example in python client

* update python samples
2019-02-25 16:44:38 +08:00
Vincent Devos
63eb9298cf fix python asyncio/tornado samples outdated (#2224) 2019-02-24 11:50:59 +08:00
William Cheng
a36319185b
Add Haskell Servant build to Travis CI (#2196)
Add Haskell Servant build to Shippable CI
2019-02-24 11:19:09 +08:00
William Cheng
e6658278ad
R client refactoring (#2215)
* [R] fix namespace, use 2-space indentation (#2105)

* fix namespace, indentation

* use 2-space indentation in model files

* update gitignore

* use PascalCase for function naming (#2106)

* [R] improve .travis.yml, .Rbuildignore (#2109)

* update travis

* enhance travis.yml

* update travis, .Rbuildignore

* [R] Add auto-generated documentations, change parameter naming (#2114)

* add auto-generated doc for r client

* remove module name

* replace nil with void

* [R] fix object serialization to JSON (#2129)

* fix object serialization

* fix array property seriziation

* fix deserializing array of string

* fix array of object deserialization

* [R] Fix return type (#2140)

* fix return type

* update r petstore sample

* add auto-generated tests (#2141)

* rename file to conform to style guide (#2142)

* add authenticaiton support to R (#2153)

[R] Add authentication support, minor ApiClient refactor

* rename test files

* [R] various improvements and bug fixes (#2162)

* fix api keys in headers

* use optional parameter in function signature

* fix property naming

* fix doc assignment operator

* [R] fix base64 encode (#2171)

* fix base64 encode

* fix basic http auth

* fix typo, update instruction (#2203)

* rename test files to conform to style guide (#2206)

* [R] improve class constructor (#2208)

* update constructor with optional parameter, default value

* update r petstore sample

* clean up files

* regenerate files

* Revert "rename test files to conform to style guide (#2206)"

This reverts commit 90a6302a6565d208a6ab298fda41a47836a63d9c.

* fix query parameter in api client (#2214)
2019-02-23 23:51:11 +08:00
Vincent Devos
7486438491 pyhton sample cleanup models unused (#2219)
* pyhton sample cleanup models unused

* pyhton sample cleanup models unused tests
2019-02-23 23:40:06 +08:00
William Cheng
f2002b25da
[Python] remove default value from being fallback to example (#2213)
* remove example fallback

* reset test case
2019-02-22 20:44:27 +08:00
William Cheng
163b00459f
Add petstore integration tests to Ruby OAS3 client (#2211)
* skip bats installation

* add petstore tests to ruby oas3 client
2019-02-22 17:18:55 +08:00
Stefan Dresselhaus
ae376c151b Something in the dependencies changed. This switch is no longer needed. (#1850) 2019-02-20 15:25:11 +08:00
Lukas Steinbrecher
c79d27708f Enable error handling in Java WebClient library, fixes #1243 (#1244)
* enable error handling in Java WebClient library, fixes #1243

* remove custom error handling logic in Java WebClient library, fixes #1243
2019-02-19 22:47:22 +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
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
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
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
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
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
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
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