474 Commits

Author SHA1 Message Date
Javier Velilla
c0c2f2b804
[Eiffel] various enhancements (#8076)
* Updated Eiffel code generator.
	Added missing language reserved words.

Updated mustache templates to use the latest Eiffel rules to avoid obsolte
feature calls and Cat-Calls.
Updated Eiffel configuration files (ecf's)
Updated comments styles.
Updated Travis CI file to use the latest Eiffel compiler.
Updated EIffel sample to use https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/3_0/petstore.yaml

* Added missing mapping decimal to REAL_64
Added Eiffel Kernel classes to importMapping to avoid generate models for
them.
Fixed issue with Eiffel feature name generation, updated toOperationId(String) method.
Simplified toInstantiationType method implementaetion.
Improved model.mustache to generate Eiffel models.

* Updated Eiffel sample.

* Removed unneeded tabs.

* Added AnyType mapping to ANY
Removed unneeded tab
Updated model name, remane models that starts with _.

* update doc

Co-authored-by: William Cheng <wing328hk@gmail.com>
2020-12-07 10:07:03 +08:00
Peter Leibiger
033d985cf7
[Dart-dio] Add basic integration testing and fix compile errors (#8025)
* [dart-dio] Add basic integration test POM

This basically just fetches dependencies, runs the built_value generator and empty test cases. Even running empty test cases is more than is currently possible and at least finds compile errors.

There are compile errors atm which need to be fixed.

* [dart-dio] Fix missing BuiltSet import in models that use enums

* [dart-dio] Fix compile error when the return type is a Map

* the compile error was `serializerForType(Map<String, int>)` in `StoreApi` which needs to be  `serializerForType(Map)`
* use final instead of var in response handling

* [dart-dio] Generate docs after changes

* [dart-dio] Add integration test to CI execution list
2020-12-02 21:35:07 +08:00
Ghufran Zahidi
64ade2ce8f
[powershell] Implemented the psdata property for module manifest file (#8048)
* Implemented the psdata property for module manifest file (Tags, LicenseUri, ProjectUri, IconUri, ReleaseNotes)

* fix string.format

* update doc

Co-authored-by: William Cheng <wing328hk@gmail.com>
2020-12-01 16:52:12 +08:00
William Cheng
2801c0cb88
[Java][Play] Fix compilation issues when using the supportAsync option (#7864)
* fix async in java play generator

* add async operation option

* Remove the return null and replace with a return at the right place.

Co-authored-by: Jean-François Côté <jcote@stingray.com>
2020-11-27 23:30:46 +08:00
William Cheng
3bf8ca7484
[python] Renames python generators (#7965)
* python->python-legacy, python-experimental->python

* test with openjdk8

* test with openjdk11

* comment out rm

* move kotlin tests to circleci

* move kotlin tests

* move tests to circleci

* fix circleci

* rearrange test

* move tests

* use wrapper

Co-authored-by: Justin Black <justin.a.black@gmail.com>
2020-11-18 14:34:00 +08:00
Alexis Cote
36aba267a0
[typescript-fetch] Allow to generate client without runtime checks (#7894)
* Add CLI options to remove runtime checks (serialization/deserialization).

* Update templates to support the new parameter

- Generates all the models in a same file to avoid import complexity
- Extract interfaces creator templates to reuse them

* Fix formatting and generate client examples

* Add documentation
2020-11-16 14:17:29 +01:00
patst
023e6dd9ed
typescript-angular: Angular 11 support (#7937)
* #7935 typescript-angular: support angular 11

* regenerate angular 11 sample project

* Update ngVersion to 11.0.0 in typescript-angular.md
2020-11-14 08:23:13 +01:00
William Cheng
eab26d493b
Better decimal support in Scala generators (#7876)
* fix decimal mapping in scala generators

* add mapping for decimal, number in scala generators

* update doc

* use scala.math.BigDecimal
2020-11-10 11:29:50 +08:00
Justin Black
08fb59009a
Removes secondaryParam and hasMore (#7882)
* Removes secondaryParam and hasMore

* Fixes tests

* Only uses bodyParam in groovy template
2020-11-07 11:04:12 +08:00
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
ee3dd70636
chagne codegen type to schema (#7775) 2020-10-21 18:56:56 +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
Justin Black
3d337db207
Unifies naming for isArray in Schema class properties (#7691)
* Updates key java files

* Adds all lingering isArray fixes

* Adds two files

* Reverts two cs files

* Fixes lingering isListContainer + isArrayModel references

* Some ensure up to date updates
2020-10-18 21:58:59 -07: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
b888423fd8
Use 3.0 spec in documentations, update docs (#7710)
* update npm set version, use 3_0 spec

* use 3_0 spec in website
2020-10-14 10:13:17 +08:00
Justin Black
0cfe02348b
Unifies naming for isMap in Schema class properties (#7640)
* Updates isMapModel + isMapContainer -> isMap

* Removes git conflict characters
2020-10-12 09:12:37 -07:00
William Cheng
b0fa00b860
Fix typos in templating.md (#7646) 2020-10-11 11:12:35 +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
dtiller
6909c888d2
[cli] Batch: support multiple/nested !include directive (#7354)
Co-authored-by: Jim Schubert <james.schubert@gmail.com>
2020-09-16 22:45:26 -04:00
Jim Schubert
bf0bd29ef1
[core][feature] User custom added templates (#7366) 2020-09-12 18:09:59 -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
Jim Schubert
684b77166b
[docs] Add notes on Windows classpath modification (#7404) 2020-09-11 21:42:18 -04: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
William Cheng
1f50207bda
[doc] Update new-generator steps (new.sh) (#7336)
* [doc] Update new-generator steps (new.sh) (#7334)

* remove CommonMarkDocumentationCodegen

Co-authored-by: Jim Schubert <james.schubert@gmail.com>
2020-09-03 22:04:43 +08:00
William Cheng
e0ec332e38
Revert "[doc] Update new-generator steps (new.sh) (#7334)" (#7335)
This reverts commit 151752aa9d6be346e8750fe14ade592ab3178826.
2020-09-03 14:21:26 +08:00
Jim Schubert
151752aa9d
[doc] Update new-generator steps (new.sh) (#7334) 2020-09-02 22:14:52 -04: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
Jim Schubert
8eea149e14
[doc] Document usage of post-process file feature (#7315) 2020-08-31 13:44:44 +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