Commit Graph

7110 Commits

Author SHA1 Message Date
Ramzi Maalej
cc1fe6eebf fix resources management (#2229)
* fix resources management

* remove obselete if statement

* throw exception when body is null

* prevent potentional nullpointerexception

* use valueOf instead of constructor

* remove duplicated code

* avoid unclosed resources

* remove redundant key

* fix broken tests

* fix sonar issues

* fix tests

* add Veamly as a company using openAPI generator

* revert back if statement to explicitly express the intention behind it
2019-03-04 22:27:54 +08:00
kemokemo
0c54286909 Apply GIN_MODE=release for the Dockerfile of go-gin-server (#2283)
* chore: apply release mode for the Dockerfile

* docs: update by `./bin/go-gin-petstore-server.sh`

* docs: update by `./bin/openapi3/go-gin-petstore-server.sh`
2019-03-04 22:24:12 +08:00
Akira Tanimura
1d02f0374b [Ruby] Escape string interpolation notation of Ruby (#2261) (#2287)
* escape string interpolation notation of Ruby (#2261)

* update samples (#2261)
2019-03-04 22:22:45 +08:00
ota42y
88abea1755 update ZenTest (#2289)
* update ZenTest

ZenTest 4.11.1 requires rubygems 2.x.

But Ruby 2.6.0 include rubygems 3.x.
So we can't use ruby client in Ruby 2.6.0.
https://www.ruby-lang.org/en/news/2018/12/25/ruby-2-6-0-released/

ZenTest 4.11.2 removed rubygems dependency so we should update.
1883b210aa

* update ruby client sample
2019-03-04 22:18:15 +08:00
William Cheng
8843df65a4
[aspnetcore] - make more configurable and generate abstract class library #2181 (#2282)
* Add ability control out put generation and support to generate a library

* Roll back pom version - it seems to break the CI/CD checks

* Roll back pom version - it seems to break the CI/CD checks

* Match with genrators - no changes from new code

* Fix inadvertent changes

* No idea why the names of params have changed pet to body for instance

* Match generated document

* Clarify logic as per PR review

* Remove the generatewwwroot option and use the buildtarget option

* Remove ar artifactVerson (not used), update docs and TODO notes

* Add ability control out put generation and support to generate a library

* Roll back pom version - it seems to break the CI/CD checks

* Roll back pom version - it seems to break the CI/CD checks

* Fix inadvertent changes

* Match generated document

* Add ability control out put generation and support to generate a library

* Roll back pom version - it seems to break the CI/CD checks

* Roll back pom version - it seems to break the CI/CD checks

* Fix inadvertent changes

* Match generated document

* Clarify logic as per PR review

* Remove the generatewwwroot option and use the buildtarget option

* Remove ar artifactVerson (not used), update docs and TODO notes
2019-03-03 23:23:17 +08:00
kemokemo
8c88f46fba Fix 2278: migrate the docker image for the aspnetcore generator (#2281)
* fix: migrate the docker image.

* doc: fix the inner port of the docker image

* docs: update samples by `./bin/aspnetcore-petstore-server.sh`
2019-03-02 19:04:03 -05:00
William Cheng
24f20941e5
fix npe when array item missing (#2247) 2019-03-02 21:48:00 +08:00
Bernd
052879d6cb [typescript-rxjs] fix enums (#2242)
* fix issue with duplicate enum exports

* regenerate typescript-rxjs samples
2019-03-01 19:09:06 +08:00
Jon Schoning
c30a21ac3c
[haskell-http-client] Allow logger selection via cabal flags. Emit Consumes */* for requestBody when not specified
[haskell-http-client] Allow logger selection via cabal flags. Emit Consumes */* for requestBody when not specified
2019-02-28 13:04:50 -06:00
William Cheng
54d9c19c77
Use https URL to download dependencies (#2248)
* fix groovy default value, use https to download dep

* update groovy build gradle file
2019-02-27 23:26:53 +08:00
William Cheng
92757581d6
better info message about using generateAliasAsModel (#2246) 2019-02-27 17:31:07 +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
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
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
Kevin Howell
329843bc92 Gradle - make GenerateTask properties optional (#2185)
This allows easier creation of custom `GenerateTask`. Specifically, this makes:

 - generateModelTests
 - generateModelDocumentation
 - generateApiTests
 - generateApiDocumentation
 - withXml

optional, following the same pattern as other properties in GenerateTask.

Without this change, we get `java.lang.IllegalStateException: No value
has been specified for this provider.` until these properties are
specified for the task, when attempting to define a custom generate task
(such as one to generate API docs).
2019-02-21 18:18:47 -05:00
Stefan Dresselhaus
ae376c151b Something in the dependencies changed. This switch is no longer needed. (#1850) 2019-02-20 15:25:11 +08:00
boxdot
bc6c94d412 Use oauth token for basic bearer auth in Rust. (#2161)
* Use oauth token for basic bearer auth in Rust.

* Add bearer_access_token instead of reusing oauth_access_token
2019-02-20 10:17:22 +08:00
Akihito Nakano
1d08296f96 Fix missing nullable (#2189)
* Add test case which reproduces the issue

* Fix missing `nullable`

* Tweak property name

* Add test case which covers `Paths`

* Add test case for CodegenProperty.isNullable

* Fix missing CodegenProperty.isNullable

* Rename r -> referencedSchema
2019-02-19 23:57:24 +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
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
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
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
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
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