8767 Commits

Author SHA1 Message Date
Lukáš Vasek
f37d26cc73 [JAVA][SPRING][2195] added missing getter for enum value (#2346)
* [2195] added missing getter for enum value

* updated samples

* re-generate spring samples

* Removed @JsonValue from toString and regenerated samples

* re-generate spring samples

Co-authored-by: Esteban Gehring <esteban.gehring@gmail.com>
2019-12-29 16:21:32 +08:00
William Cheng
43a5411436 Merge branch 'master' of https://github.com/openapitools/openapi-generator 2019-12-29 16:19:13 +08:00
William Cheng
85f43a3000
fix java feign parameter request name (#4883) 2019-12-29 14:55:08 +08:00
William Cheng
da8500db95 Merge branch 'patch-1' of https://github.com/filipepinheiro/openapi-generator into filipepinheiro-patch-1 2019-12-29 14:22:54 +08:00
William Cheng
b450ce8a5a Merge remote-tracking branch 'origin/4.3.x' into 5.0.x 2019-12-28 12:34:30 +08:00
William Cheng
81e15ed0bf Merge remote-tracking branch 'origin/master' into 4.3.x 2019-12-28 12:00:09 +08:00
Richard Whitehouse
57d248dd3d
[Rust Server] Rust 1.39 compatibility (#4864)
- Fix warnings present in Rust 1.39 resolving missing dyn markers
- Upgrade to lazy_static - fixes #4271
- Update samples
2019-12-27 23:32:21 +00:00
William Cheng
adf9c12f73
[Dart] fix option tests (#4874)
* fix dart dio option tests

* minor format change

* fix dart option provider

* minor change to tests

* rearrange test order

* update test value

* comment out set author test

* commet out tests
2019-12-27 22:57:35 +08:00
benjaminSchilling33
24155b31e9 Added Dart config parameters to fulfill pubspec requirements for publishing to pub (#3911)
* Added three configuration values for Dart 2 to be able to publish the generated code to pub without changes:

pubAuthor - contains the name of the author
pubAuthorEmail - contains the email address of the author
pubHomepage - contain the homepage of the project

Changed the name of the output directory from docs to doc as this is the path required by pub

* Added three configuration values for Dart 2 to be able to publish the generated code to pub without changes:

pubAuthor - contains the name of the author
pubAuthorEmail - contains the email address of the author
pubHomepage - contain the homepage of the project

Changed the name of the output directory from docs to doc as this is the path required by pub
2019-12-27 16:45:07 +08:00
Mathieu Lemoine
69b8831cbe [Kotlin] enumPropertyNaming UPPERCASE should separate words with _ (#4062)
* [Kotlin] enumPropertyNaming UPPERCASE should separate words with _

* Add unit cases for issue 4062

Co-authored-by: William Cheng <wing328hk@gmail.com>
2019-12-27 16:37:29 +08:00
Jim Schubert
376e419d0b Support models with multi-level hierarchy (via roxspring) (#4503)
* Example of broken multi-level hierarchy

* Support for multiple levels of hierarchy in model objects

* Support for multiple levels of hierarchy in generators

* Regenerated samples

* Temporarily skip scalaz sample verification, which is having issue with Java version in CI container

* Re-enable scalaz in verify samples

Co-authored-by: Rob Oxspring <roxspring@imapmail.org>
2019-12-27 15:42:32 +08:00
Hui Yu
daec02b8c5 [C-libcurl] Fix build error when the request operation has more than 1 parameter. (#4870) 2019-12-27 14:42:05 +08:00
Sebastien Rosset
9cab534034 [Java] Fix serialized name of discriminator in JSON.mustache (#4672)
* Use propertyBaseName instead of propertyName for discriminator

* Revert "Use propertyBaseName instead of propertyName for discriminator"

This reverts commit 389c5471ba0a71a8ba558c2859e64f08a5186f00.

* Use propertyBaseName instead of propertyName for discriminator
2019-12-26 16:12:58 +08:00
Javier Luque Sanabria
d9c3af54e6 [Kotlin][Client] Update Reserved Keywords (#4793)
* Update reservedWords from here: https://github.com/JetBrains/kotlin/blob/master/core/descriptors/src/org/jetbrains/kotlin/renderer/KeywordStringsGenerated.java

* Order keywords.
2019-12-26 16:07:42 +08:00
Yuriy Belenko
ad4b9c711b [MySQL] snake_case table and column names (#4860)
* [MySQL] Add identifierNamingConvention option

Possible values are "original" to not transform original names and
"snake_case".

* [MySQL] Add option tests

* [MySQL] Update doc

* [MySQL] Add original name to comment
2019-12-26 15:05:36 +08:00
Stephane Carrez
a8bc3360fd Fix 3522: [BUG][Ada] Wrong style for generated Ada model types and missing security scopes (#4863)
* [Ada] Operation security scopes are ignored when generating the server (#1043)
- Update fromOperation() to keep the operation required scopes for each auth
  method and store that information in the x-scopes vendor extensions attribute
- Update postProcessOperationsWithModels() to process the operation required
  scopes and build a list of authMethods which only contain the required scopes
  for the operation and store these authMethods in the x-auth-scopes attribute.
- Update postProcessAuthMethod() to handle the logic of filtering and building
  the operation authMethod (new instances are created because we must not
  modify the global authMethod definitions)
- Update the Ada server templates to use the x-auth-scopes instead of authMethods
  Add a URL prefix parameter for the Ada server instantiation

* Fix Ada code generator
- update to generate Ada style type names (broken by the use of Camelize)
- update the templates for Ada Util and Swagger libraries

* Update generated GNAT project to add the 'utilada_xml' dependency

* Update the Ada samples

* Fix compilation of the petstore Ada sample
2019-12-26 14:50:35 +08:00
Hui Yu
4b01943b06 [C-libcurl] Assign the data type to the function parameter when it is "Free Form Object" in OpenAPI description(swagger.json) (#4861) 2019-12-26 14:49:28 +08:00
Richard Whitehouse
0c92b0c4a4
[Rust Server] Handle multiple response type (#4441)
- Ensure response IDs are unique, even if the first sentence is identical
- Handle responses where different responses produce a different type of data
- Use the correct mime type for plain text and byte streams
- Tidy up whitespace in client-mod.mustache
- Specify locale for String.format
- Add test for multiple response types
- Update samples
2019-12-24 15:09:22 +00:00
Yuriy Belenko
2949b53820 [Slim4] Add integration tests (#4858)
* [Slim4] Add integration tests

* [Slim4] Remove unnecessary syntax check script

Composer package called "phplint" processes the same syntax check and
even faster. It can use cache when files hasn't been changed.

* [Slim4] Exclude composer.lock from codebase

Travis CI fails, it cannot install dependencies from lock file under
different PHP(7.1.33) version.
2019-12-23 11:39:49 +08:00
William Cheng
a95e3e3684
Fix boolean option in asciidoc generator (#4856)
* fix boolean option in asciidoc generator

* minor code format chagne
2019-12-22 18:18:16 +08:00
Josh Burton
e90fa5c4df Fixes issue where only some instances of List or Map were replaced with Built equivalents (#4645)
If there was a type that had a nested type of List or Map, e.g. `Map<String, List<String>>` only the outer types would be replaced with the Built variants, causing issues when running the builder.
2019-12-22 16:05:32 +08:00
Man
c0994c479d #4848 [asciidoc] add option to not generate metadata (#4852)
* #4848 [asciidoc] add option to not generate metadata (asciidoc attributes)

cli / additionalParameters: generateHeaders=true|false

* #4848 [asciidoc] new options ascidoc generator

* #4848 [asciidoc] add option to not generate metadata (asciidoc attributes)

cli / additionalParameters: generateHeaders=true|false
2019-12-22 15:34:29 +08:00
Yuriy Belenko
ca4f718748 [Slim4] Add ModelUtils and StringUtils (#4855)
* [Slim4] Add StringUtils and ModelUtils classes

* [Slim4] Refresh samples
2019-12-22 15:04:30 +08:00
Yuriy Belenko
04ac754d3e [Slim4] Add object support to Data Mocker (#4853)
* [Slim4] Add new method to Mocker interface

* [Slim4] Add tests and implement mockObject method

* [Slim4] Accept items as object in mockArray method

* [Slim4] Add test for array of objects

* [Slim4] Refresh samples

* [Slim4] Remove abandoned debug comment

* [Slim4] Improve tests code coverage
2019-12-22 15:03:22 +08:00
Justin Black
3959530465 [Python] Updates python test framework to pytest (#4765)
* Switches python generators to use pytest, useNose CLI option added if to allow nose to be used instead

* Adds ensure-up-to-date changes

* Adds setup.cfg to python clients so we can configure nose when useNose=true

* Adds fix for python-aiohttp testing, adds files missing from ensure-up-to-date
2019-12-22 14:14:04 +08:00
Jérôme
af783a8c54 [REQ][GO] add awsv4 signature support (#4784)
* [REQ][GO] add awsv4 signature support for client

OpenAPI format does not support AWS Signature method.
This commit add support for AWSv4 signature in GO client generation by adding "withAWSV4Signature" option.
"withAWSV4Signature" option is false by default.

Signed-off-by: Jérome Jutteau <jerome.jutteau@outscale.com>

* [REQ][GO] update samples for awsv4 signature support

Signed-off-by: Jérome Jutteau <jerome.jutteau@outscale.com>
2019-12-22 13:09:10 +08:00
Hui Yu
27bf120d87 [C-libcurl] Fix build error when a struct includes a pointer pointing to itself (#4846) 2019-12-21 18:37:03 +08:00
Ties de Kock
5740348902 [java] Jersey2 and resttemplate do not correctly send defaultCookies (#4821)
* Java/Jersey2 sends defaultCookies

* Send cookie value instead of [value] (resttemplate)

* Improve the javadoc string
2019-12-21 10:15:29 +08:00
William Cheng
bad78a30c8 Merge remote-tracking branch 'origin/4.3.x' into 5.0.x 2019-12-20 23:26:19 +08:00
William Cheng
4fb503bcac Merge remote-tracking branch 'origin/master' into 4.3.x 2019-12-20 23:21:21 +08:00
Bruno Coelho
3eaafce569 [kotlin][client] Use OffsetDateTime to represente date-time received by the server (#4835)
* [kotlin] add OffsetDateTime support

* [kotlin] serializer add missing import

* [kotlin] update pet projects and fix tests

* [kotlin] update docs

* [kotlin] update pet projects

* [kotlin] update date-time

* [kotlin] update pet project

* [kotlin] update windows script
2019-12-20 23:20:02 +08:00
Jérémie Bresson
ad6c832162 [java] Update jackson_databind_nullable_version to 0.2.1 (#4839)
* [java] Update jackson_databind_nullable_version to 0.2.1

* Update samples

* FIx typo
2019-12-20 23:18:47 +08:00
William Cheng
165a9e0508 Merge remote-tracking branch 'origin/4.3.x' into 5.0.x 2019-12-20 20:52:27 +08:00
William Cheng
531dc30917 Merge remote-tracking branch 'origin/master' into 4.3.x 2019-12-20 20:38:49 +08:00
Bruno Coelho
56f298a0b4 [kotlin][client] unify jvm libraries (#4827)
* [kotlin] unify jvm envirement

* [kotlin] rename retrofit2 to jvm-retrofit2

* [kotlin] update retrofit2 bat script

* [kotlin] update docs

* [kotlin] update docs

* [kotlin] update pet projects
2019-12-20 18:25:07 +08:00
Bruno Coelho
9feaae8572 [kotlin][client] make serializer configurable (#4740)
* [kotlin][client] make serializer configurable

* [kotlin] update pet projects
2019-12-20 18:08:16 +08:00
Bruno Coelho
b6fd1b0ade [kotlin][client] expose http status code on errors (#4742)
* [kotlin][client] expose http status code on errors

* [kotlin] update pet projects

* [kotlin] update pet projects
2019-12-20 18:06:35 +08:00
Bruno Coelho
dc91112031 [swift4] add option to sortParamsByRequiredFlag (#4706)
* [swift4] add option to sortParamsByRequiredFlag

* [swift4] add option to sortParamsByRequiredFlag

* [swift] update docs

* [swift4] add option sortParamsByRequiredFlag to sample
2019-12-20 17:43:56 +08:00
Bruno Coelho
265ad2297b [kotlin] add options sortParamsByRequiredFlag and sortModelPropertiesByRequiredFlag (#4707)
* [kotlin] add option to sortParamsByRequiredFlag

* [kotlin] add option to sortParamsByRequiredFlag

* [kotlin][client] sort parameters in the models

* [kotlin] update docs

* [kotlin][client] simplify sortParamsByRequiredFlag implementation

* [kotlin] experiment with sortnmodel properties by name

* [kotlin] introduce sortModelPropertiesByRequiredFlag

* [kotlin] update docs

* [kotlin] update kotlin

* [kotlin] fix tests

* [kotlin] update docs

* Revert "[kotlin] update docs"

This reverts commit 88ad825de5b4c090fe04398bdfde2e9d3252742f.

* [kotlin] update docs and petstores

* [kotlin] update docs

* [kotlin] update pet projects
2019-12-20 17:42:48 +08:00
Hui Yu
5ba67c8c95 [C-libcurl] Escape parameter name of function when it is the C keyword. (#4838) 2019-12-19 16:29:56 +08:00
Sascha Groß
366bfd2a67 Fix #4786 Bean Validation for type:string, format: email will work for the SpringCodegen (#4788) 2019-12-19 11:30:39 +08:00
Jim Schubert
10b60e27b1 [dart] Allow derived generators to call DefaultCodegen#processOpts (#4812)
DefaultCodegen#procesOpts sets up quite a bit which may be expected by
users (template directory overrides, git user/repo, etc). The way the
dart-dio and dart-jaguar processOpts methods were written, these things
did not work. This makes it work.
2019-12-19 11:29:13 +08:00
William Cheng
a18494bd8e
Test kotlin-json-request-date in CI (#4824)
* test kotlin-json-request-date in ci

* minor code formatting

* add pom.xml for testing

* fix permission
2019-12-19 11:17:47 +08:00
Jim Schubert
b62d68ac5a [markdown] New Markdown Generator (#4811)
* [markdown] New Generator

* [docs] Update to avoid conflict with new markdown generator
2019-12-19 11:16:20 +08:00
Sai Giridhar P
e6e919fe98 [r] Fixing the CRAN submission issues (#4828)
* fix(r): CRAN submission issues

* fix(r): CRAN submission issues
2019-12-19 11:08:03 +08:00
Jiri Kuncar
fb0479a213 Include vendor extensions from security scheme (#4830) 2019-12-19 00:28:38 +08:00
tanmen
375f24f605 fix unused import in allOf (#4805)
nested model
2019-12-18 17:16:34 +01:00
Xambey
52d3844ff4 fix(typescript-angular): Fix date-timing-parsing is truncating the time (#4623 #4763) (#4792)
* fix(typescript-angular): Fix date-timing-parsing is truncating the time

* fix(typescript-angular): Fix date-timing-parsing is truncating the time (#4330)

* fix(typescript-angular): Fix date-timing-parsing is truncating the time (#4623)
2019-12-18 08:28:48 +01:00
zbarbuto
b73dbee8d1 Disable providers array when for providedInRoot in Angular (#4798) 2019-12-18 07:58:36 +01:00
Alexander Eggers
bb93a3b1e2 [Kotlin][Client] Request date converter (#4750)
* Added new cli option to define the request date converter

* Fixed a few build errors

* Update api.mustache

* Fixed api mustache

* Removed unused import

* Fixing mustache templates

* Tweaking mustache templates

* Added sample and new bat file

TODO create new openapi 2.0 source file to simulate the datestring via schema.

* Tweaking mustache templates

* Updated templates and samples

* Fixed build error

* Updated samples

* Fixed path
2019-12-18 10:22:29 +08:00