609 Commits

Author SHA1 Message Date
William Cheng
4d75a29991
fix typo in useOneOfDiscriminatorLookup (#8480) 2021-01-20 18:51:56 +08:00
William Cheng
62eecabfa5
[csharp-netcore] add .Net 5.0 support (#8467)
* add net5.0 support to csharp-netcore client gen

* update doc

* update samples
2021-01-19 22:38:34 +08:00
Wesley A
f5b2bb5057
Implement optional powershell verb parsing (#8252)
* Implement optional powershell verb parsing #8233

* update doc

Co-authored-by: William Cheng <wing328hk@gmail.com>
2021-01-07 17:41:43 +08:00
William Cheng
1df719801e
Add a new crystal client generator (beta) (#8304)
* add crytsal client generator

* update samples

* update doc

* regenerate spec

* regenerate spec

* various fixes

* test crystal in circleci

* test crystal client in drone ci

* Revert "test crystal client in drone ci"

This reverts commit 317f2cf2a09f902c08ced214e8e5802fa79c3de8.

* fix install

* fix installation

* test crystal in travis

* cache image

* add --cache-from

* update doc

* run petstore with mvn

* install crystal

* fix install crystal

* sudo mvn

* run server

* using mvnw

* fix form or body parameter

* remove crystal from circleci

* fix test

* remove cache-from

* update doc
2021-01-07 17:10:22 +08:00
Guillaume TOURBIER
9bd2a45e72
typescript-angular: add providedIn for Angular 9+ (#8324)
* feat: add providedIn for Angular 9+

Adding new option, providedIn, for generator typescript-angular
Keep providedInRoot for backward compatibility but mark as deprecated
for Angular 9+

fix: #6432

* doc: providedIn

infos about providedIn
Mark providedInRoot as deprecated

* doc: run generate-samples for typescript

using typescript-angular-v9-provided-in-any.yaml

* refactor: runned ensure-up-to-date locally

* refactor: api.module.mustache rely on providedIn too

* doc: re-generate samples
2021-01-06 15:31:41 +01:00
Luiz Felipe Stangarlin
319bd7eaa8
Add Ktorm schema generator (#7759)
* [ktorm] added support for ktorm

* [ktorm] fixed type mapping

* [ktorm] fixed foreign key

* [ktorm] added variable for the missing package import

* [ktorm] added correct templates

* [ktorm] added relationship metadata

* [ktorm] also support relationships 1:m

* [ktorm] relation to primitive naming fix

* [ktorm] updated mustache templates

* [ktorm] small fixes on templates, assigmentbuilder, docs, sql script syntax.

* fix issue, rename to ktorm-schema

* replace tabs with 4 spaces

* [ktorm] added primarykey automatic generation

* [ktorm] added tests

* [ktorm] added gradle to samples

* [ktorm] fix datatime type

* [ktorm] template fixes array and primarykey

* [ktorm][sample] regenerate

* [ktorm][sample] added manually files from kotlin-client

We inherit from baseTable, so we need those for now

* [ktorm] fix: relation column types hardcoded

* update samples

* update doc

Co-authored-by: William Cheng <wing328hk@gmail.com>
2021-01-06 17:04:49 +08:00
NickPak
72869d53a3
[C][Client] Add C++ reserved keywords to C-libcurl client generator, then the C client can be compiled by C++ compiler (#8205)
* [C][Client] Add cpp reserved keywords to C-libcurl client generator

* update doc

Co-authored-by: William Cheng <wing328hk@gmail.com>
2021-01-05 14:39:56 +08:00
Arthur Mogliev
206f698a98
[php-ze-ph][php-mezzio-ph] Migration from Zend to Laminas and corresponding generator rename (#8145)
* Migration from php-ze-ph to php-mezzio-ph

* Sample regen after rebase

* update samples

Co-authored-by: William Cheng <wing328hk@gmail.com>
2020-12-20 21:48:37 +08:00
William Cheng
bde631c07f
[aspnetcore] Set default version to 3.1 (#8240)
* set default version to 3.1

* rename config

* update doc
2020-12-20 11:00:39 +08:00
basyskom-dege
febd65d3b8
Qt5 parameterized server (#8183)
* first Commit parameterzied Server support

* fixed serverconfig classes

* Defautl constructor f. Config, fixed regex replace

* Polosihed Templates, Added MultiServer support

* Update Readme. Fixed MultiServer. Fixed def. Value

* Passing global Server to mustache. Small fixes

* Updated  samples, fixed mustache for multi server

* added prefixes, removed unused imports

* added newly generated samples

* missing vendorExtension in mustache. Update smaple

* update doc

Co-authored-by: William Cheng <wing328hk@gmail.com>
2020-12-19 11:34:12 +08:00
Peter Leibiger
e1c43f1356
[dart][dart-dio] Prevent name clashes with existing dart types (#8198)
* [dart][dart-dio] Prevent name clashes with existing dart types

Can not use dart import aliases for now as this is not supported by built_value. This means we need to add potentially clashing names/classes to an `additionalReservedWords` exclusion list. Starting with a basic list of some http/io classes.

Correctly use `importMapping` and `defaultIncludes` this time around. Improve reserved word checking.

This now successfully generates `ModelList`, `ModelFile` and `ModelClient` models which previously were not generated at all or were wrong types.

* Address review comment

* Update generator docs
2020-12-16 17:25:20 +08:00
Christophe Bornet
f2d8e3a25b
[Java/okhttp] Add dynamic operations option (#7916)
* Add dynamicOperations option to okhttp gen

* Add tests

* Add apiclient tests

* Fix apiclient template

* Add dependencies in gradle and sbt
2020-12-10 18:22:39 +08:00
William Cheng
61777b4a7c
Revise wordings for options (#8127)
* revise wordings for options

* update
2020-12-09 10:42:54 +08:00
Peter Leibiger
7fae4ab411
[dart] type improvements (#8111)
* [dart] Configure and use import mapping

This prevents models from being generated which would clash with exisiting dart types, e.g. List.

* [dart] Fix decimal format not supported

* [dart-dio] Remove redundant modelToIgnore & ignore dart:core import

* modelToIgnore is now handled via importMappings the same way other generators do this
* choose not to import dart:core as this is available by default

* [dart-dio] EnumClass is a reserved word in built_value

* Review changes

* Fix regenerate docs
2020-12-08 12:00:12 +08:00
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
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