337 Commits

Author SHA1 Message Date
William Cheng
9377dbca56
Add "decimal" support (#7808)
* rename BigDecimal to decimal

* add isDecimal

* fix tests

* minor fixes

* fix mapping, update doc

* update test spec

* update c# samples
2020-11-02 21:31:32 +08:00
Christophe Bornet
ca3fcd882e
[Kotlin] Fix Spring Kotlin generation of array/map models (#7829)
* Fix Spring Kotlin generation of array/map models

* update doc

Co-authored-by: William Cheng <wing328hk@gmail.com>
2020-10-31 17:38:37 +08:00
William Cheng
70323adf9f
[C#] support .NET framework 4.7 (#7833)
* add net47 support to the csharp generator

* update doc, fix appveyor
2020-10-29 22:41:08 +08:00
timo-a
d90fd10a75
Update CONTRIBUTING.md with typo corrections - no semantic changes (#7811)
* Update CONTRIBUTING.md

typos

* update doc

Co-authored-by: William Cheng <wing328hk@gmail.com>
2020-10-27 22:14:08 +08:00
Maksym Melnychok
b70edd7f1b
[python] Add option to return None instead of raising exception when accessing unset attribute (#7784)
* add option to return None instead of raising exception when accessing unset attribute

* update python samples

* reimplement getattr using getitem or get depending on attrNoneIfUnset

* move getattr and setattr to respective templates

* update docstrings, def get/setattr methods to have docstrings in them, use __dict__ to avoid recursion issues

* revert required_properties change

* add manual tests for .get method
2020-10-25 09:13:22 -07:00
Jim Schubert
a5aeb5fdec
[core] Remove java specific imports from DefaultCodegen (#7763) 2020-10-22 17:43:17 +08:00
William Cheng
ec74b06d2c
[Ruby] Replace DateTime with Time (#7656)
* replace DateTime with Time

* add require time

* update doc
2020-10-21 14:13:59 +08:00
agilob
7318ff72d7
[Java][JVM] Move java specific import mappers to JVM specific code gen (#7569)
* Move java specific import mappers to java specific code gen

* Use JVM specific import mappers in kotlin, scala, groovy

* Update generators docs

* Add autogenerated files
2020-10-19 22:15:44 -04:00
Ben Sorohan
cc5e0fee2d
[FEAT][TYPESCRIPT-ANGULAR] Add configurationPrefix option to allow generating unique configuration token (#7731)
Closes #4101
2020-10-16 15:02:44 +02:00
William Cheng
f76d72edf1
[BUG][Ada] Incorrect client Ada code generated (#7719)
* Fix #7594: [BUG][Ada] Incorrect client Ada code generated

- Fix the identification of path parameters
- Fix the model and client to support FreeFormObject

* update doc

* fix errors, update samples

Co-authored-by: Stephane Carrez <Stephane.Carrez@gmail.com>
2020-10-15 17:26:07 +08:00
William Cheng
4acc8eab45
[C#][netcore] Add discriminator support to oneOf lookup (#7626)
* add discriminator support to oneOf lookup

* fix type check, removed unused code

* fix type check

* add options

* setLegacyDiscriminatorBehavior

* fix typo

* replace break with return

* use packageName
2020-10-10 18:20:30 +08:00
Noor Dawod
2984497731
Upgrade Dart2 template to advertised best-practices, plenty of additions too. (#7585)
* Updated Dart2 template.

* Generated Petstore client code for Dart2.

* Use double-quotes instead of single-quotes, to be consistent with output of Dart generator.

* Updated Petstore samples.

* Wrap few more places with triple curly parentheses.

* Generated Petstore files.

* Revert to using single quotes, fix Java generator too.

* Generated Petstore files.

* Lower case the content type value.

* Only lower-case content type when checking its value.

* Generated files from running "./bin/utils/ensure-up-to-date".

* Remove outdated comments for Dart1.

* Regenerate Petstore samples for Dart.

* Added a new option "pubLibrary".

* Added support for (de)serializing a DateTime into an epoch value.

* Make client variable a getter/setter, adjust docs.

* Fixed a small error in class template.

* Fix Dart documentation in API classes.

* Simplify test in HTTP Basic auth, remove unused lint rule.
2020-10-10 11:08:58 +08:00
henryh-force
e9c6d65f2d
Updated keywords to be aligned with website https://developer.salesfo… (#7522)
* Updated keywords to be aligned with website https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_reserved_words.htm

* [samples] Regenerate

Co-authored-by: Jim Schubert <james.schubert@gmail.com>
2020-10-05 21:00:23 +08:00
agilob
61b543f03d
[Dart] Removal of deprecated Dart generators and generated code (#7568)
* Remove old dart generated code

* Remove uses of SUPPORT_DART2

* Remove dart1 only flag BROWSER_CLIENT

* Remove supportDart2 and browserClient from docs

* Revert removal of credits of dart(1)

* Update getHelp in dartcodegen
2020-10-04 16:21:08 +08:00
Jim Schubert
d854c89272
[docs] Add clarity around configuration options (#7547) 2020-09-30 20:56:28 -04:00
Hippolyte HENRY
7b1563326a
[ruby] Fix generation when generateAliasAsModel is enabled (#7419) 2020-09-24 22:08:57 -04:00
William Cheng
596bbb9c58
Add option to set recursion limit (#7491)
* add option to set recursion limit

* fix test failure

* update doc

* add tests

* add missing import

* rename option to recursionLimit
2020-09-24 11:47:22 -07:00
Philipp Paris
c7d5275b62
[java] jaxrs (all) add usetags option (#6130)
* Adds "useTags" option to all jaxrs code generators (AbstractJAXRSServerCodegen):
  - jaxrs-jersey
  - jaxrs-spec
  - jaxrs-cxf-cdi
  - jaxrs-resteasy
  - jaxrs-cxf
  - jaxrs-cxf-extended
  - java-msf4j
  - jaxrs-resteasy-eap
* jaxrs-spec
  - Changed handling of root paths: e.g "/:", "/{id}:" to simplify code and create a more consistent behaviour
    -- old: use tag for classname
    -- new: use tag only if useTags is enabled, use "DefaultApi" if not
* @path class level annotation
  - for all generators above and the microprofile generator (uses same jaxrs postprocessing)
  - extended the "commonPath" to contain more than only the root path if possible
  - e.g. "/group1/subgroup1/op1" -> "/group1/subgroup1" is moved to class level annotation
2020-09-20 21:18:07 -04:00
Jason Lee
1a709a731b
[Java] add cli option to ignore anyOf in enum (#4498)
Co-authored-by: Jim Schubert <james.schubert@gmail.com>
2020-09-12 18:09:39 -04:00
William Cheng
8fad36c898
[Go] minor format change, deprecate "withGoCodegenComment" option (#7375)
* use tab in comment, remove withGoCodegenComment

* deprecated option
2020-09-12 22:05:10 +08:00
Gichan Im
f9514705a1
[json][codegen] Add option: outputFileName (#7348) 2020-09-07 15:29:47 +08:00
William Cheng
14d41310b9
[Go] replace go generator with go-experimental generator (#7337)
* replace go with go-experimental

* update samples

* extends with abstract go class

* rearrange

* remove deprecated

* minor fix

* remove go deprecated samples

* update pom, clean up samples

* mark generator as deprecated
2020-09-04 09:56:42 +08:00
Arvind Thirunarayanan
ab5b0fa8d4
[Go]: Interface definitions for api functions (#5914)
Introduces a new "generateInterfaces" option, allowing for better testability of generated clients
2020-08-31 21:43:40 -04:00
Patouche
b9662dc25d
[java] Intro openApiNullable property to enable/disable OpenAPI Jackson Nullable library (#6154)
* Add option to prevent usage of jackson-nullable (#2901)

Add a option for all java client and server to prevent
usage of third party library (jackson-databind-nullable)
which may be forbidden in some company

Add samples for Vertx, Spring MVC, Spring Cloud, Feign and Play

Upgrade dependencies for org.openapitools:jackson-databind-nullable

* Samples - Remove dependency org.openapitools:jackson-databind-nullable (#2901)

* Fix generation of gradle file for vertx (#2901)

* Regenerate samples (#2901)

* Fix documentation and up to date (#2901)

* Fix forgotten regeneration of vertx after dependency integration (#2901)

* Regenerate template after rebase (#2901)

* Use yaml config files introduce in #6509 to manage samples (#2901)

* Regenerate template using the config (#2901)

* Fix bad version during testing generated samples (#2901)

* Regenerate template after fix bad version (#2901)

* Fix merge, allow for set importing on codegen model

Co-authored-by: Jim Schubert <james.schubert@gmail.com>
2020-08-31 21:25:18 +08:00
William Cheng
7032c401ea
[Spring Boot] update dependencies, mark java8 option as deprecated (#7306)
* update springboot dependencies

* update doc

* update samples
2020-08-31 13:53:50 +08:00
taqm
3e734a0b54
[docs] Fix go-gin-server additional property docs. (#7188)
* [docs] Fix go-gin-server additional property docs.

* add cli option for serverPort, apiPath

Co-authored-by: William Cheng <wing328hk@gmail.com>
2020-08-24 14:19:23 +08:00
Aljaž Pavišič
c19350b179
Support for KumuluzEE microprofile runtime (#5944)
* Added library and edited generator to support server stub generation with Kumuluzee framework.

* Trimmed and tweaked pom.xml template and removed unnecessary template files from generator and library.

* minor edits

* Added new library to Java client codegen (microprofile-kumuluzee). A
functional KumuluzEE REST client can now be generated.

* Edited README for microprofile-kumuluzee

* Edited docs to include new KumuluzEE library options.

* Updated kee-rest-client client POM dependency version to latest

* fixed pom, edited REAMDE

* Trimmed redundant dependencies from KEE client pom

* Removed unnecessary DefaultGenerator edit, modified config template accordingly.

* Made mp framework an additional property for microprofile instead of being another library option, removed now redundant library files.

* Updated documentation with microprofile framework

* Fixed errors caused by removed functions and variables

* update doc

Co-authored-by: Chuckledog <aljaz.pavsic@gmail.com>
Co-authored-by: Jan Meznaric <jmezna@gmail.com>
Co-authored-by: William Cheng <wing328hk@gmail.com>
2020-08-20 10:25:05 +08:00
William Cheng
cf0385676b
Deprecate Flash (ActionScript) client generator (#7231)
* deprecate flash client generator

* update doc

* add doc

* remove left-over doc

* add back flash-deprecated.md

* remove flash.md
2020-08-19 13:53:00 +03:00
William Cheng
86240f476b
better wordings for CLASS_MODIFIER (#7233) 2020-08-18 12:52:25 +08:00
William Cheng
201ac77d0c
[Go] minor improvements (#7134)
* fix boolean option, add eum prefix option

* update code format

* optimize code
2020-08-06 15:11:20 +08:00
William Cheng
f5775f483a update doc 2020-08-05 16:43:11 +08:00
Mike Raineri
51c45eb28b
[REQ] Added enumClassPrefix option to Go server generation (#7008)
* Added enumClassPrefix option to Go server generation

* Using literal 'true' instead of string
2020-08-05 16:33:58 +08:00
tgerth
66cd0f6511
[Kotlin] Rxjava3 support (#6998)
* added rx3 support

* fix rx3 support

* generated samples

* updated samples

* update samples

* changed rxjava3 adapter to the one from squareup

* changed dependency of RxJava3CallAdapterFactory

Co-authored-by: William Cheng <wing328hk@gmail.com>
2020-08-04 16:58:27 +08:00
Sshnyari
1ffe2a780a
[aspnetcore] Typo issues in docs and generated code (#7094)
* fixed a typo issue in aspnetcore generator #4829

* solved an issue with integration tests using WebApplicationFactory

* updated aspnetcore samples impacted by the change
2020-08-03 21:26:40 +08:00
William Cheng
8a3994e000 update doc 2020-07-29 16:56:08 +08:00
Marcus Berndt
0c173fb519
typescript-axios: add Set as language primitive (#6931)
* fix(typescript-axios): add Set as language primitive

* fix(typemapping): added lowercased set as primitive type

* fix(samples): regenerated ts samples and added Set as language primitive to ts docs
2020-07-29 15:35:30 +08:00
patst
468d80be4b
typescript-angular: Angular 10 support (#7037)
* 7036- angular 10 support

* update example files

* fix jersey exmaple file bc of circle ci fail

* add ./ to FILES manually to pass tests
2020-07-24 14:30:58 +02:00
William Cheng
e9c231b50a
rollback feign version to 10.11 (#7012) 2020-07-22 21:21:11 +08:00
Moshe Elisha
0a394bc883
[Java][RestTemplate] Use abstraction for files (#6912)
* Fix dir path in PR request template

* Add "useAbstractionForFiles" config option for Java/RestTemplate to allow flexible options in generated client when a file is needed (#6715)

* Add "useAbstractionForFiles" config option for Java/RestTemplate to allow flexible options in generated client when a file is needed (#6715)

* Add "useAbstractionForFiles" config option for Java/RestTemplate to allow flexible options in generated client when a file is needed (#6715)

* #6715 - Add "useAbstractionForFiles" config option for Java/RestTemplate to allow flexible options in generated client when a file is needed.
2020-07-20 22:54:14 +08:00
William Cheng
6a49c4ec02
add option disallowAdditionalPropertiesIfNotPresent to ps generator (#6909) 2020-07-11 22:41:24 +08:00
William Cheng
57bf9e85a1
[Go][Experimental] Add the option disallowAdditionalPropertiesIfNotPresent (#6908)
* add disallowAdditionalPropertiesIfNotPresent to go exp generator

* update cache key

* fix spring.xml with 5.0.0-SNAPSHOT
2020-07-11 16:53:28 +08:00
Yuriy Belenko
f11b0f886e
Add Mock Server client modification feature (#6747) 2020-07-05 16:58:43 -04:00
William Cheng
c6cb7ebe2a
mark python2 support in flask as deprecated (#6653) 2020-07-02 15:16:53 +08:00
William Cheng
fa97333a5c
[Java] Deprecate feignVersion option (#6824)
* deprecate feign option

* update doc

* udpate samples
2020-07-02 00:12:32 +08:00
Kasper Kondzielski
323cd38b5c
Improve sttpOpenApiClient generator (#6684)
Co-authored-by: eugeniyk <keatrance@gmail.com>
2020-06-30 21:14:34 -04:00
Bernd Hacker
156c4bfb70
[typescript-rxjs] add support for raw response and progressSubscriber (#5465)
* feat(typescript-rxjs): add support for returning statusCode and progressSubscriber via function overloading

* feat(typescript-rxjs): use ?? instead of || to support relative basePath of "", upgrade to typescript 3.7

* feat(typescript-rxjs): regenerate samples

* refactor(typescript-rxjs): change explicit undefined checks to shorthand return

* feat(typescript-rxjs): add missing progressSubscriber key when building RequestArgs

* feat(typescript-rxjs): regenerate samples

* style(typescript-rxjs): remove whitespace, add colons

* feat(typescript-rxjs): regenerate samples

* refactor(typescript-rxjs): destructure configuration in BaseApi

* fix(typescript-rxjs): returning empty string for apiKey and accessToken

* feat(typescript-rxjs): replace withStatusCode option with response = raw option, reuse rxjs AjaxRequest and AjaxResponse types

* feat(typescript-rxjs): regenerate samples

* Prints out the parameter name in throwIfNullOrUndefined

* Fixed misspelling

* feat(typescript-rxjs): add withProgressSubscriber additional-properties flag to cli, remove unused withInterfaces flag

* refactor(typescript-rxjs): use backticks instead of String constructor in encodeURI

* feat(typescript-rxjs): replace Object.keys() with Object.entries() in queryString helper

* style(typescript-rxjs): improve indentation of new withProgressSubscriber checks within templates

* feat(typescript-rxjs): use entire es2017 lib in tsconfig.json for building with target es6

* feat(typescript-rxjs): regenerate samples

* feat(typescript-rxjs): adjust sample generation, regenerate samples

* docs(typescript-rxjs): regenerate docs

Co-authored-by: Justin Van Dort <justinvandort@gmail.com>
2020-06-29 16:01:15 +02:00
Tomofumi Chiba
1f277002a1
Add Deno support to typescript(experimental) generator (#6732)
* add 'deno' to typescript platforms

* add Deno support to typescript generator

* add Deno support to typescript generator

* add Deno support to typescript generator

* add Deno support to typescript generator

* add Deno support to typescript generator

* add extensionForDeno property for typescript generator

* add URLParse Deno wrapper for typescript generator

* update deno version in .travis.yml
2020-06-27 08:32:43 +02:00
Jiri Kuncar
8b9c070e5d
[Python] Support for per-operation servers (#6557)
* Dynamic server support

* regenerated

* Apply suggestions from code review

Co-authored-by: Thomas Hervé <thomas.herve@datadoghq.com>

* regenerated

* Add ParameterizedServer feature to Python experimental

* Fix lookup of server variables

* Add tests and change default value for servers

* Fix server variables

* Return base path when index is None

* Use HOST

* Apply suggestions from code review

* Apply suggestions from code review

* regenerated

* Add specific tests for dynamic servers

* regenerated

* add docstring

* regenerated

* Fix wrong merge resolution

Co-authored-by: Thomas Hervé <thomas.herve@datadoghq.com>
2020-06-25 21:28:54 -07:00
Ghufz
13fe079901
[PowerShell] discard readonly properties in Initialize cmdlets (#6754)
* ValidatePattern having double quote(") throws exception on running Build.ps1

* fix tab with space

* [powershell-experimental] : http signature auth

* fix the tab issue

* merge cnflict fix for powershell experimental

* Htpp signing : added support for ecdsa

* Update modules/openapi-generator/src/main/resources/powershell/configuration.mustache

Co-authored-by: Sebastien Rosset <serosset@cisco.com>

* Update modules/openapi-generator/src/main/resources/powershell/configuration.mustache

Co-authored-by: Sebastien Rosset <serosset@cisco.com>

* Update modules/openapi-generator/src/main/resources/powershell/configuration.mustache

Co-authored-by: Sebastien Rosset <serosset@cisco.com>

* Update modules/openapi-generator/src/main/resources/powershell/configuration.mustache

Co-authored-by: Sebastien Rosset <serosset@cisco.com>

* Update modules/openapi-generator/src/main/resources/powershell/configuration.mustache

Co-authored-by: Sebastien Rosset <serosset@cisco.com>

* HttpSigningHeader accepts any header available in request to calculate the signature.

* Update modules/openapi-generator/src/main/resources/powershell/http_signature_auth.mustache

Co-authored-by: Sebastien Rosset <serosset@cisco.com>

* Incorporated the review comments

* addressed the merge conflict

* discard readonly property in initialize cmdlets

* update doc

* update powershell sample

Co-authored-by: Ghufran Zahidi <gzahidi@cisco.com>
Co-authored-by: Sebastien Rosset <serosset@cisco.com>
Co-authored-by: William Cheng <wing328hk@gmail.com>
2020-06-25 16:34:38 +08:00
William Cheng
979dfd131a
Mark typescript-angularjs as deprecated (#6723)
* mark angularjs as deprecated

* add new files
2020-06-21 14:35:12 +08:00