27 Commits

Author SHA1 Message Date
Tiffany Marrel
42f72192ca
add security feature AWSV4Signature to documentation (#15603) 2023-12-13 15:07:18 +08:00
Tiffany Marrel
00676870a3
add HTTP signature to SecurityFeature (#15542) 2023-05-17 00:48:58 +08:00
William Cheng
88da3649b2
[csharp-netcore] Add option skip generating getter for sub-schemas (#15007)
* add option skip generating getter for sub-schemas

* fix openapi-yaml

* update samples

* update samples
2023-03-21 22:41:29 +08:00
Justin Black
e2e7609bac
Adds not to CodegenComposedSchemas and uses it in python-exp (#12146)
Updates docs
2022-04-17 09:36:09 -07:00
Justin Black
eef7cddd6f
Adds UUID to python-experimental (#12153)
* Adds UUID to python-exp, allows uuid models to be generated

* Adds test_UUIDString uuid model test

* Fixes uuid properties in python-exp, changes maps to object data type, adds uuid data type

* Adds maps data type back in

* Adds missing Null and AnyType definitions and adds them to python-experimental

* Generator docs updated, added missing uuid, null, anytype, and object

* Adds uuid support description

* Docs updated
2022-04-16 14:55:49 -07:00
Justin Black
78f4748c06
Adds generator default template engine (#11366)
* Revert "Revert "Has generators set default template engine (#11245)" (#11316)"

This reverts commit 57987424a4eaa22d73337388489cd86d7f42a023.

* Only loads in the default template engine if the config file contains the generatorName

* Only sets templatingEngineName using condif default in one place

* Adds config files that lack generatorName

* Revert "Adds config files that lack generatorName"

This reverts commit 7dafc93c0f02c037d9be5d2c0a3ee7377c8b479d.

* Adds generator default templating engine to the generator metadata
2022-01-23 14:16:46 -08:00
Justin Black
de036e211e
Improves generator docs: stability + language version added (#11270)
* Adds generatorLanguageVersion and uses it in python generators

* Regenerates docs

* Adds stability to generator docs

* Triple braces generatorLanguageVersion

* Regenerates samples

* Fixes the python-experimental setup.py file so it works with generatorLanguageVersion

* Updates generators readme
2022-01-10 18:16:53 -08:00
Justin Black
0eca629127
Adds generatorLanguage to all generators (#11268)
* Adds generatorLanguage to all generators

* Adds all generator languages and info to docs

* Docs updated
2022-01-10 12:13:35 -08:00
Justin Black
d813d04f46
Improves generator docs, adds metadata section (#11262)
* Refactors generator md creation, adds generateMdMetadata

* Removes extra space

* Adds docs updates

* Fixes table definition for metadata

* Docs update

* Docs update

* Updates title, removes sidebar_label because it was not doing anything on pages like https://openapi-generator.tech/docs/generators/android

* Docs updated
2022-01-09 14:10:47 -08:00
Bruno Coelho
c305c71715
[DefaultCodegen] generate unknown default case (#11078)
* [DefaultCodegen] generate unknown default case

* [DefaultCodegen] replace Swift custom implementation with the DefaultCodegen implementation

* [DefaultCodegen] generate unknown default case

* [DefaultCodegen] generate unknown default case

* [DefaultCodegen] generate unknown default case

* [DefaultCodegen] generate unknown default case

* [DefaultCodegen] generate unknown default case

* [DefaultCodegen] generate unknown default case

* [DefaultCodegen] generate unknown default case

* [DefaultCodegen] generate unknown default case

* [DefaultCodegen] update docs

* [DefaultCodegen] fix Swift enum case name

* [DefaultCodegen] generate unknown default case

* [DefaultCodegen] generate unknown default case
2021-12-21 15:40:13 +08:00
Justin Black
8226269101
Fixes legacyDiscriminatorBehavior description (#8931)
* Fixes description

* Samples and docs updated
2021-03-08 13:39:12 -08:00
William Cheng
61777b4a7c
Revise wordings for options (#8127)
* revise wordings for options

* update
2020-12-09 10:42:54 +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
Jim Schubert
d854c89272
[docs] Add clarity around configuration options (#7547) 2020-09-30 20:56:28 -04:00
Yuriy Belenko
f11b0f886e
Add Mock Server client modification feature (#6747) 2020-07-05 16:58:43 -04:00
James Gilliland
6f5ec7deef
Fix table layout for additionalProperties property (#6563) 2020-06-15 09:24:35 +08:00
Sebastien Rosset
f7f41410e7
[codegen][python-experimental] Composed schema with additionalProperties (#6290)
* Mustache template should use invokerPackage tag to generate import

* Add a unit test for allOf and additionalProperties

* Fix getAdditionalProperties

* Add code comments

* Add code comments

* set nullable for additionalproperties

* add variants of additionalProperties

* Add more unit tests

* Handle additionalProperties for composed schemas

* improve code comments

* Add code comments

* Add code comments

* Add code comments

* Add code comments

* Add code comments

* Add assertions in unit tests

* Add new property to support the 'additionalProperties' keyword with composed schemas

* run sample scripts

* fix unit tests to handle additionalProperties

* Handle additional properties and composed schema

* Handle additional properties and composed schema

* Add support for additionalProperties and composed schema

* Format java code

* Add more unit tests for Python

* Handle reference in additionalProperty keyword

* Handle reference in additionalProperty keyword

* Add use case for additionalProperties and reference

* run sample scripts

* resolve schema reference

* Add OpenAPI argument

* Add OpenAPI argument

* Add OpenAPI argument

* Add OpenAPI argument

* Add OpenAPI argument

* Handle additional property keyword with reference

* Handle additional property keyword with reference

* Handle additional property keyword with reference

* Handle additional property keyword with reference

* add additionalproperties attribute with boolean values

* Run sample scripts

* handle additional properties

* Handle additionalProperties boolean values

* Run sample scripts

* fix javadoc issues

* fix javadoc issues

* Add Locale to String.toLowerCase

* execute sample scripts

* handle additional properties

* Add code comments

* Handle imports of referenced models in additional properties

* Handle isNullable class

* handle nullable type

* improve documentation, run sample scripts

* improve documentation, run sample scripts

* execute sample scripts

* execute sample scripts

* Execute sample scripts

* Run samples scripts

* set legacyAdditionalPropertiesBehavior to true by default, except python

* create separate yaml file to avoid having lots of changes in the pr

* create separate yaml file to avoid having lots of changes in the pr

* create separate yaml file to avoid having lots of changes in the pr

* create separate yaml file to avoid having lots of changes in the pr

* create separate yaml file to avoid having lots of changes in the pr

* create separate yaml file to avoid having lots of changes in the pr

* Change name of CLI option

* Generate doc

* Add TODO statement

* add code comments

* run samples scripts

* run sample scripts

* run sample scripts

* run sample scripts

* run sample scripts

* run sample scripts

* run sample scripts

* run sample scripts

* run sample scripts

* run sample scripts

* run sample scripts

* run sample scripts

* refactor cli option for additional properties

* refactor cli option for additional properties

* run samples scripts

* run sample scripts

* run sample scripts

* run sample scripts

* run sample scripts

* Add yaml comments

* small refactor

* small refactor

* run sample scripts

* run sample scripts

* fix unit tests

* Set disallowAdditionalPropertiesIfNotPresent flag

* reduced size of test yaml file

* simplify code and add imports directly

* rename some of the properties used in tests

* Handle more scenarios for nullable types

* add code comments

* Adds *args input to __init__ method to fix test testFruitNullValue

* Resolve merge issues

* run samples scripts

* run doc generator

* fix merge conflicts

Co-authored-by: Justin Black <justin.a.black@gmail.com>
2020-05-29 00:40:48 +08:00
Januson
c49d8fda8e
[M][REQ][JAVA]: Add option to generate arrays with "uniqueItems" true as Sets rather than Lists (#5466)
* [REQ][JAVA]: Add option to generate arrays with "uniqueItems" true as Sets rather than Lists
 - Update Java code generation to use sets instead of lists when uniqueItems is set to true
 - Add import resolution for sets
 - Add tests and fix broke tests

resolve #5254

* Update Javascript, Perl, Python and Ruby to preserve current functionality.

* Switch set implementation to LinkedHashSet

* Fix missing import for uniqueItems used on param.

* Fix missing import and return type for responses with uniqueItems

* Fix default values for array of enum

* Update generated samples

* fix merge issue

* Update generated samples

Co-authored-by: William Cheng <wing328hk@gmail.com>
2020-05-21 13:27:57 +08:00
Justin Black
a2b613c1b3
Fixes md docs (#6079)
* Fixes md docs

* Separates out boolean enum options into legacyDiscriminatorBehaviorOpts

* Updates docs, adds true and false descriptions
2020-04-28 22:30:56 +08:00
Justin Black
8e8471c1fd
[CORE] Fixes composed schema discriminator map (#4906)
* Adds addComposedMappedModels and testComposedSchemaOneOfDiscriminatorMap

* Requires that discriminators be required properties

* Strengthens discriminaotr validation, adds better error messages, adds schema oneof samples

* Adds oneOf and anyOf invalidDiscriminator tests

* Updates incorrect addOneOfInterfaceModel invocation

* Runs ensure-up-to-date

* Adds updates from Sebastien Rosset

* Removes newlines

* Uses df.isString

* Fixes tests be correctly setting df.isString

* Updates discriminatorExplicitMappingVerbose description per PR feedback

* Adds description of how mappedModels is populated

* Adds the suggestion exception raising when a MappedModel mappingName is null

* Actually resolves merge conflicts

* Switches two methods to package private because they are needed for testing

* Allow nulls in MappedModel.getMappingName

* Updates CLI flag name to legacyDiscriminatorBehavior, default=true

Co-authored-by: William Cheng <wing328hk@gmail.com>
2020-04-25 00:01:02 +08:00
Jim Schubert
aa7cd4f5af
[docs] Upgrade to Docusaurus 2 (#5271)
* [docs] Upgrade to Docusaurus 2

Due to formatting issues with Docusaurus 1 and code blocks, and upcoming
4.3 and 5.0 releases, this is an upgrade to have more control over
formatting and other functionality.

This adds behavior to have light/dark themes.

As a consequence of upgrading, columnar format on ul element in
generated generator docs had to be moved to css. This will not impact
users viewing the markdown on GitHub because it didn't display the
column format.

This upgrade should improve syntax highlighting and performance.

* Fix user page layout, choose theme with clear diff colors
2020-02-11 21:22:58 +08:00
Jim Schubert
a496c2011f
[docs] Initial FeatureSet generator documentation (#5188)
* Flatten feature sets for display

* [cli] Add feature set output to config-help

This includes markdown and plain text outputs for config-help.

* [docs] FeatureSet on generator docs
2020-02-01 20:51:55 -05:00
Jim Schubert
644f720db8
[docs] Sorted doc outputs and clean up duplicated CliOptions (#5046)
* [config-help] Sort all outputs

* Remove old/stale generator docs (these have been renamed previously)

* Sort config doc outputs, making it easier to find relevant info

* Fixes cliOptions duplicates

Erlang client/proper improperly set the version option as packageName
(causing duplicate for packageName).

The java and swift option removals are because the options are added in
parent classes, resulting in duplication of the options.

* Add --github-nested-index for generating docs/generators/README.md

* 📝 Regenerate generator docs
2020-01-19 20:19:11 -05:00
Jim Schubert
a2532cc3c5
[doc] full generator details (#4941) 2020-01-08 21:54:05 -05: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
Jim Schubert
0e1ce6bb63
[docs] Custom template clarifications and other minor enhancements (#4167)
* [docs] Updating docsite outputs to be browsable on Github as well

* Fix links to other files
   Suffix `.md` was needed to make links works

* [docs] Add clarification to differences between customization and templating docs

* [docs] Collapsible side bar, scroll to top, minor enhancements
2019-10-16 18:04:44 -04:00
Hideki Okamoto
f15f814d9b Add Nim client code generator (#3879)
* First version of Nim Client

* Add some codes

* Add some codes

* Add some codes

* Add some codes

* Add some codes

* First version of Nim Client

* Add some codes

* Add some codes

* [Dart] Fix README template and update testing doco (#3809)

* [Dart] Fix README template and update testing doco

- deleted redundant shell script
- fixed and updated README template
- updated test package and moved to a dev_dependency
- removed old unused dev_dependency packages
- updated testing documentation in petstore sample

* Remove references to dart-flutter-petstore.sh

* Fix typos

* Fix typo

* Support custom git repository (#3757)

* add gitHost param to GeneratorSettings and related

* parameterize gitHost in READMEs

* parameterize gitHost in go.mod

* parameterize gitHost in git_push

* update petstore samples

* run ./bin/utils/export_docs_generators.sh

* run meta-codehen.sh

* Revert "run meta-codehen.sh"

This reverts commit d6d579f6159186531257cdfdd73b9caf9e9ffeba.

* Revert "run ./bin/utils/export_docs_generators.sh"

This reverts commit 1b81538198d4319fd1b4e97447303e3cc0e8dc99.

* Revert "update petstore samples"

This reverts commit f513add88396707f6991ae2e4920359583ec88f1.

* run ensure-up-to-date

* Add links to article and video (#3820)

* Better Go code format (#3819)

* better varible naming

* better comments

* better code format for go experimental client

* better comment, update samples

* Add some codes

* Add some codes

* Add some codes

* Add gRPC Protobuf schema generator (#3818)

* add grpc protobuf generator

* update doc

* add new doc

* add windows batch, comment out root proto

* 1792 fix remote spec handling and hash calculation (#3440)

* fixed bug where nullApi.java would be generated.  Instead, generated DefaultApi.java to match the default path /{pathParam} (#3821)

* Revert "1792 fix remote spec handling and hash calculation (#3440)"

This reverts commit 2a2eefe93d81b8d253745b8adb002ab2cb9eee04.

* Add  nickmeinhold to Dart technical committee (#3830)

* Bug #2845 typescript angular inheritance (#3812)

* issue #2845: enable 'supportsMultipleInheritance' on typescript angular client codegen

- note I reran ./bin/openapi3/typescript-angular-petstore-all.sh and no changes occurred.
  this suggests to me that the petstore.yaml sample should be improved to make use of the
  anyOf / allOf / oneOf keywords, in order to better show the effects of changes on generated code.

* issue #2845: run ./bin/openapi3/typescript-angular-petstore-all.sh

* run `mvn clean package && ./bin/typescript-angular-petstore-all.sh`

* revert extranous files

* fix warnings in csharp-netcore client (#3831)

* Add missing files to the form request (#3834)

* [client][go] avoid duplicated reflect imports (#3847)

* Following up for #3440 (1792 fix remote spec handling and hash calculation) (#3826)

* This patch fixes the bug that we cannot access to remote files when checking file updates.
Following up #3440, supporting auth.

* 1792 fix remote spec handling and hash calculation (#3440)

(cherry picked from commit 2a2eefe93d81b8d253745b8adb002ab2cb9eee04)

* fix detecting remote file / local file logic while finding the hash file, taking care of IllegalArgumentException for local files.

* add testcase

* Add a link (#3850)

* Add Element AI to the list (#3856)

* maven-plugin-plugin 3.6.0 (#3854)

*  [Java][okhttp-gson] fix failure to deserialize floats (#3846)

* fixed bug where nullApi.java would be generated.  Instead, generated DefaultApi.java to match the default path /{pathParam}

* fix to bug #3157

* update samples

* Adds Http Info To Dart Api (#3851)

* [C++][Pistache] Add missing setter for arrays (#3837)

* [C++][Pistache] Add missing setter for arrays

Fixes #3769

* [C++][Pistache] Update Petstore sample

* typescript-inversify: improve check for required parameters, support multiple media types (#3849)

* [typescript-inversify] Allow falsy parameters

A required parameter to an api method must not be `null` or `undefined`.
It can be any other falsy value, e.g. `""`, `0` or `false` though. This
change makes sure an error is only thrown in the former case and not in
the latter.

* [typescript-inversify] Handle multiple media types

The Accept and Content-Type HTTP headers can contain a list of media
types. Previously all but the first media type in the api definition
were ignored. Now the headers are properly generated.

* [typescript-inversify] Fix http client interface

The api service methods allow the `body` parameter to be optional. The
parameter is then passed to an `IHttpClient`. So it needs to be optional
there as well.
Also fixed the sample implementation `HttpClient`.

Fixes #3618.

* [typescript-inversify] Regenerate Petstore sample

* [typescript-inversify] Use more explicit null check

This does not change the semantic of the generated code, but makes it more explicit.

Co-Authored-By: Esteban Gehring <esteban.gehring@gmail.com>

* [typescript-angular] allow empty string basePath (#3489)

* [typescript-angular] Fixing #2731 - empty string basePath

* typescript-angular: refactor base path configuration

* typescript-angular: refactor base path configuration

* Fix/r/serialization fix and minor 3xx resp fix (#3817)

* fix(qlik): fix for minor serialization bug

* fix(r): add petsore generated classes

* fix(r): indendation fixes

* typescript-axios: Fix baseoptions (#3866)

* Fixed missing baseOptions of typescript-axios.

The typescript-axios template was missing the baseOptions setting when building an API Configuration. Set it.

* update sample.

* re-generate typescript axios samples

* Rename gRPC generator to "protobuf-schema" (#3864)

* rename grpc generator to protobuf-schema

* update doc

* Prepare v4.1.2 release (#3873)

* update samples

* update date

* fix version in readme

* BugFix #2053 Spring Boot fails to parse LocalDate query parameter (#3860)

Adds the format annotation so that Spring is able to serialize OpenApi date/date-time format into LocalDate/OffsetDateTime.

* update doc, samples (#3875)

* update stable release

* Update the batch for Windows

* Add a test snippet

* Update ensure-up-to-date

* Add Nim to README.md

* Ran ensure-up-to-date to pass CircleCI tests
2019-09-13 15:56:54 +08:00