diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 0000000000..26b750dff4 --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1,30 @@ +## Core team +modules/openapi-generator/src/main/java/org/openapitools/codegen/*.java @OpenAPITools/generator-core-team +modules/openapi-generator/src/main/java/org/openapitools/codegen/auth/*.java @OpenAPITools/generator-core-team +modules/openapi-generator/src/main/java/org/openapitools/codegen/config/*.java @OpenAPITools/generator-core-team +modules/openapi-generator/src/main/java/org/openapitools/codegen/examples/*.java @OpenAPITools/generator-core-team +modules/openapi-generator/src/main/java/org/openapitools/codegen/ignore/**/*.java @OpenAPITools/generator-core-team +modules/openapi-generator/src/main/java/org/openapitools/codegen/serializer/*.java @OpenAPITools/generator-core-team +modules/openapi-generator/src/main/java/org/openapitools/codegen/templating/**/*.java @OpenAPITools/generator-core-team +modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/**/*.java @OpenAPITools/generator-core-team +modules/openapi-generator-core/**/* @OpenAPITools/generator-core-team + +# No need for auto-generated subdirectories (reduces noise) +docs/ @OpenAPITools/generator-core-team + +## Individual interests +.github/**/* @jimschubert +scripts/**/* @jimschubert +website/**/* @jimschubert +bin/ci/**/* @jimschubert + +## Bulid related +CI/**/* @OpenAPITools/build +.mvn/**/* @OpenAPITools/build +bin/utils/**/* @OpenAPITools/build + +## Module-specific +modules/openapi-generator-cli/**/* @jimschubert +modules/openapi-generator-gradle-plugin/**/* @jimschubert +modules/openapi-generator-maven-plugin/**/* @jimschubert + diff --git a/.github/auto-labeler.yml b/.github/auto-labeler.yml index f623319907..5bff51d5ce 100644 --- a/.github/auto-labeler.yml +++ b/.github/auto-labeler.yml @@ -247,7 +247,7 @@ labels: 'Server: Java': - '\s*?\[java-.*?\]\s*?' - '\s*?-[gl] java-.*?\s*?' - - '\s*?-[gl] jaxrx-.*?\s*?' + - '\s*?-[gl] jaxrs-.*?\s*?' 'Server: Kotlin': - '\s*?\[ktor]\s*?' - '\s*?\[kotlin-spring]\s*?' diff --git a/CI/bitrise.yml b/CI/bitrise.yml index 8a572ab864..cfdb8601ec 100644 --- a/CI/bitrise.yml +++ b/CI/bitrise.yml @@ -49,6 +49,25 @@ workflows: ./samples/client/petstore/swift4/swift4_test_all.sh ./samples/client/test/swift4/swift4_test_all.sh + - script@1.1.5: + title: Update Swift5 samples + inputs: + - content: | + #!/usr/bin/env bash + + set -e + + sh bin/swift5-all.sh + - script@1.1.5: + title: Run Swift5 tests + inputs: + - content: | + #!/usr/bin/env bash + + set -e + + ./samples/client/petstore/swift5/swift5_test_all.sh + ./samples/client/test/swift5/swift5_test_all.sh - script@1.1.5: title: Run all bin scripts inputs: diff --git a/CI/samples.ci/client/petstore/java/jersey2-java6/build.gradle b/CI/samples.ci/client/petstore/java/jersey2-java6/build.gradle index 37f1ab526d..d540a137bd 100644 --- a/CI/samples.ci/client/petstore/java/jersey2-java6/build.gradle +++ b/CI/samples.ci/client/petstore/java/jersey2-java6/build.gradle @@ -102,7 +102,7 @@ ext { jersey_version = "2.6" commons_io_version=2.5 commons_lang3_version=3.6 - junit_version = "4.12" + junit_version = "4.13" threetenbp_version = "2.6.4" } diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 3566369348..8c4bd40f4f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -101,5 +101,5 @@ To start the CI tests, you can run `mvn verify -Psamples` (assuming you've all t - Make sure test cases passed after the change (one way is to leverage https://travis-ci.org/ to run the CI tests) - File a PR with meaningful title, description and commit messages. - Recommended git settings - - `git config --global core.autocrlf input` to tell Git convert CRLF to LF on commit but not the other way around + - `git config core.autocrlf input` to tell Git convert CRLF to LF on commit but not the other way around - To close an issue (e.g. issue 1542) automatically after a PR is merged, use keywords "fix", "close", "resolve" in the PR description, e.g. `fix #1542`. (Ref: [closing issues using keywords](https://help.github.com/articles/closing-issues-using-keywords/)) diff --git a/LICENSE b/LICENSE index c806b7a847..310853b896 100644 --- a/LICENSE +++ b/LICENSE @@ -193,7 +193,7 @@ you may not use this file except in compliance with the License. You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + https://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, diff --git a/README.md b/README.md index 228b189e01..2804326fba 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,7 @@
[![Jion the Slack chat room](https://img.shields.io/badge/Slack-Join%20the%20chat%20room-orange)](https://join.slack.com/t/openapi-generator/shared_invite/enQtNzAyNDMyOTU0OTE1LTY5ZDBiNDI5NzI5ZjQ1Y2E5OWVjMjZkYzY1ZGM2MWQ4YWFjMzcyNDY5MGI4NjQxNDBiMTlmZTc5NjY2ZTQ5MGM) -[![Stable releaases in the Maven store](https://img.shields.io/maven-metadata/v/http/central.maven.org/maven2/org/openapitools/openapi-generator/maven-metadata.xml.svg)](http://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22org.openapitools%22%20AND%20a%3A%22openapi-generator%22) +[![Stable releaases in the Maven store](https://img.shields.io/maven-metadata/v/https/repo1.maven.org/maven2/org/openapitools/openapi-generator/maven-metadata.xml.svg)](http://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22org.openapitools%22%20AND%20a%3A%22openapi-generator%22) [![Follow OpenAPI Generator Twitter account to get the latest update](https://img.shields.io/twitter/follow/oas_generator.svg?style=social&label=Follow)](https://twitter.com/oas_generator)
@@ -70,7 +70,7 @@ OpenAPI Generator allows generation of API client libraries (SDK generation), se | | Languages/Frameworks | |-|-| -**API clients** | **ActionScript**, **Ada**, **Apex**, **Bash**, **C**, **C#** (.net 2.0, 3.5 or later, .NET Standard 1.3 - 2.0, .NET Core 2.0), **C++** (cpp-restsdk, Qt5, Tizen), **Clojure**, **Dart (1.x, 2.x)**, **Elixir**, **Elm**, **Eiffel**, **Erlang**, **Go**, **Groovy**, **Haskell** (http-client, Servant), **Java** (Jersey1.x, Jersey2.x, OkHttp, Retrofit1.x, Retrofit2.x, Feign, RestTemplate, RESTEasy, Vertx, Google API Client Library for Java, Rest-assured, Spring 5 Web Client, MicroProfile Rest Client), **Kotlin**, **Lua**, **Nim**, **Node.js/JavaScript** (ES5, ES6, AngularJS with Google Closure Compiler annotations, Flow types), **Objective-C**, **OCaml**, **Perl**, **PHP**, **PowerShell**, **Python**, **R**, **Ruby**, **Rust** (rust, rust-server), **Scala** (akka, http4s, scalaz, swagger-async-httpclient), **Swift** (2.x, 3.x, 4.x), **Typescript** (AngularJS, Angular (2.x - 8.x), Aurelia, Axios, Fetch, Inversify, jQuery, Node, Rxjs) +**API clients** | **ActionScript**, **Ada**, **Apex**, **Bash**, **C**, **C#** (.net 2.0, 3.5 or later, .NET Standard 1.3 - 2.0, .NET Core 2.0), **C++** (cpp-restsdk, Qt5, Tizen), **Clojure**, **Dart (1.x, 2.x)**, **Elixir**, **Elm**, **Eiffel**, **Erlang**, **Go**, **Groovy**, **Haskell** (http-client, Servant), **Java** (Jersey1.x, Jersey2.x, OkHttp, Retrofit1.x, Retrofit2.x, Feign, RestTemplate, RESTEasy, Vertx, Google API Client Library for Java, Rest-assured, Spring 5 Web Client, MicroProfile Rest Client), **Kotlin**, **Lua**, **Nim**, **Node.js/JavaScript** (ES5, ES6, AngularJS with Google Closure Compiler annotations, Flow types), **Objective-C**, **OCaml**, **Perl**, **PHP**, **PowerShell**, **Python**, **R**, **Ruby**, **Rust** (rust, rust-server), **Scala** (akka, http4s, scalaz, swagger-async-httpclient), **Swift** (2.x, 3.x, 4.x, 5.x), **Typescript** (AngularJS, Angular (2.x - 8.x), Aurelia, Axios, Fetch, Inversify, jQuery, Node, Rxjs) **Server stubs** | **Ada**, **C#** (ASP.NET Core, NancyFx), **C++** (Pistache, Restbed, Qt5 QHTTPEngine), **Erlang**, **F#** (Giraffe), **Go** (net/http, Gin), **Haskell** (Servant), **Java** (MSF4J, Spring, Undertow, JAX-RS: CDI, CXF, Inflector, Jersey, RestEasy, Play Framework, [PKMST](https://github.com/ProKarma-Inc/pkmst-getting-started-examples), [Vert.x](https://vertx.io/)), **Kotlin** (Spring Boot, Ktor, Vertx), **PHP** (Laravel, Lumen, Slim, Silex, [Symfony](https://symfony.com/), [Zend Expressive](https://github.com/zendframework/zend-expressive)), **Python** (Flask), **NodeJS**, **Ruby** (Sinatra, Rails5), **Rust** (rust-server), **Scala** ([Finch](https://github.com/finagle/finch), [Lagom](https://github.com/lagom/lagom), [Play](https://www.playframework.com/), Scalatra) **API documentation generators** | **HTML**, **Confluence Wiki**, **Asciidoc** **Configuration files** | [**Apache2**](https://httpd.apache.org/) @@ -171,16 +171,16 @@ See the different versions of the [openapi-generator-cli](https://mvnrepository. If you're looking for the latest stable version, you can grab it directly from Maven.org (Java 8 runtime at a minimum): -JAR location: `http://central.maven.org/maven2/org/openapitools/openapi-generator-cli/4.2.2/openapi-generator-cli-4.2.2.jar` +JAR location: `https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/4.2.2/openapi-generator-cli-4.2.2.jar` For **Mac/Linux** users: ```sh -wget http://central.maven.org/maven2/org/openapitools/openapi-generator-cli/4.2.2/openapi-generator-cli-4.2.2.jar -O openapi-generator-cli.jar +wget https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/4.2.2/openapi-generator-cli-4.2.2.jar -O openapi-generator-cli.jar ``` For **Windows** users, you will need to install [wget](http://gnuwin32.sourceforge.net/packages/wget.htm) or you can use Invoke-WebRequest in PowerShell (3.0+), e.g. ``` -Invoke-WebRequest -OutFile openapi-generator-cli.jar http://central.maven.org/maven2/org/openapitools/openapi-generator-cli/4.2.2/openapi-generator-cli-4.2.2.jar +Invoke-WebRequest -OutFile openapi-generator-cli.jar https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/4.2.2/openapi-generator-cli-4.2.2.jar ``` After downloading the JAR, run `java -jar openapi-generator-cli.jar help` to show the usage. @@ -395,10 +395,10 @@ openapi-generator version ``` -Or install a particular OpenAPI Generator version (e.g. v4.1.2): +Or install a particular OpenAPI Generator version (e.g. v4.2.2): ```sh -npm install @openapitools/openapi-generator-cli@cli-4.1.2 -g +npm install @openapitools/openapi-generator-cli@cli-4.2.2 -g ``` Or install it as dev-dependency: @@ -422,7 +422,7 @@ java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar generat (if you're on Windows, replace the last command with `java -jar modules\openapi-generator-cli\target\openapi-generator-cli.jar generate -i https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g php -o c:\temp\php_api_client`) -You can also download the JAR (latest release) directly from [maven.org](http://central.maven.org/maven2/org/openapitools/openapi-generator-cli/4.2.2/openapi-generator-cli-4.2.2.jar) +You can also download the JAR (latest release) directly from [maven.org](https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/4.2.2/openapi-generator-cli-4.2.2.jar) To get a list of **general** options available, please run `java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar help generate` @@ -580,6 +580,7 @@ Here are some companies/projects (alphabetical order) using OpenAPI Generator in - [California State University, Northridge](https://www.csun.edu) - [CAM](https://www.cam-inc.co.jp/) - [Camptocamp](https://www.camptocamp.com/en) +- [Cisco](https://www.cisco.com/) - [codecentric AG](https://www.codecentric.de/) - [Commencis](https://www.commencis.com/) - [Crossover Health](https://crossoverhealth.com/) @@ -603,6 +604,7 @@ Here are some companies/projects (alphabetical order) using OpenAPI Generator in - [JustStar](https://www.juststarinfo.com) - [Klarna](https://www.klarna.com/) - [Kronsoft Development](https://www.kronsoft.ro/home/) +- [Kubernetes](https://kubernetes.io) - [Linode](https://www.linode.com/) - [Médiavision](https://www.mediavision.fr/) - [Metaswitch](https://www.metaswitch.com/) @@ -643,6 +645,7 @@ Here are some companies/projects (alphabetical order) using OpenAPI Generator in - 2018/05/15 - [REST API仕様からAPIクライアントやスタブサーバを自動生成する「OpenAPI Generator」オープンソースで公開。Swagger Codegenからのフォーク](https://www.publickey1.jp/blog/18/rest_apiapiopenapi_generatorswagger_generator.html) by [Publickey](https://www.publickey1.jp) - 2018/06/08 - [Swagger Codegen is now OpenAPI Generator](https://angular.schule/blog/2018-06-swagger-codegen-is-now-openapi-generator) by [JohannesHoppe](https://github.com/JohannesHoppe) - 2018/06/21 - [Connect your JHipster apps to the world of APIs with OpenAPI and gRPC](https://fr.slideshare.net/chbornet/jhipster-conf-2018-connect-your-jhipster-apps-to-the-world-of-apis-with-openapi-and-grpc) by [Christophe Bornet](https://github.com/cbornet) at [JHipster Conf 2018](https://jhipster-conf.github.io/) +- 2018/06/22 - [OpenAPI Generator で Gatling Client を生成してみた](https://rohki.hatenablog.com/entry/2018/06/22/073000) at [ソモサン](https://rohki.hatenablog.com/) - 2018/06/27 - [Lessons Learned from Leading an Open-Source Project Supporting 30+ Programming Languages](https://speakerdeck.com/wing328/lessons-learned-from-leading-an-open-source-project-supporting-30-plus-programming-languages) - [William Cheng](https://github.com/wing328) at [LinuxCon + ContainerCon + CloudOpen China 2018](http://bit.ly/2waDKKX) - 2018/07/19 - [OpenAPI Generator Contribution Quickstart - RingCentral Go SDK](https://medium.com/ringcentral-developers/openapi-generator-for-go-contribution-quickstart-8cc72bf37b53) by [John Wang](https://github.com/grokify) - 2018/08/22 - [OpenAPI Generatorのプロジェクト構成などのメモ](https://yinm.info/20180822/) by [Yusuke Iinuma](https://github.com/yinm) @@ -714,7 +717,10 @@ Here are some companies/projects (alphabetical order) using OpenAPI Generator in - 2019-11-24 - [Accelerate Flutter development with OpenAPI and Dart code generation](https://medium.com/@irinasouthwell_220/accelerate-flutter-development-with-openapi-and-dart-code-generation-1f16f8329a6a) by [Irina Southwell](https://medium.com/@irinasouthwell_220) - 2019-11-25 - [openapi-generatorで手軽にスタブサーバとクライアントの生成](https://qiita.com/pochopocho13/items/8db662e1934fb2b408b8) by [@pochopocho13](https://twitter.com/pochopocho13) - 2019-11-26 - [CordaCon 2019 Highlights: Braid Server and OpenAPI Generator for Corda Client API’s](https://blog.b9lab.com/cordacon-2019-highlights-braid-server-and-openapi-generator-for-corda-flows-api-s-d24179ccb27c) by [Adel Rustum](https://blog.b9lab.com/@adelrestom) at [B9lab](https://blog.b9lab.com/) -- 2020-12-04 - [Angular+NestJS+OpenAPI(Swagger)でマイクロサービスを視野に入れた環境を考える](https://qiita.com/teracy55/items/0327c7a170ec772970c6) by [てらしー](https://twitter.com/teracy55) +- 2019-12-04 - [Angular+NestJS+OpenAPI(Swagger)でマイクロサービスを視野に入れた環境を考える](https://qiita.com/teracy55/items/0327c7a170ec772970c6) by [てらしー](https://twitter.com/teracy55) +- 2019-12-17 - [OpenAPI Generator で OAuth2 アクセストークン発行のコードまで生成してみる](https://www.techscore.com/blog/2019/12/17/openapi-generator-oauth2-accesstoken/) by [TECHSCORE](https://www.techscore.com/blog/) +- 2019-12-23 - [Use Ada for Your Web Development](https://www.electronicdesign.com/technologies/embedded-revolution/article/21119177/use-ada-for-your-web-development) by [Stephane Carrez](https://github.com/stcarrez) +- 2019-01-17 - [OpenAPI demo for Pulp 3.0 GA](https://www.youtube.com/watch?v=mFBP-M0ZPfw&t=178s) by [Pulp](https://www.youtube.com/channel/UCI43Ffs4VPDv7awXvvBJfRQ) at [Youtube](https://www.youtube.com/) ## [6 - About Us](#table-of-contents) @@ -795,6 +801,7 @@ Here is a list of template creators: * Swift: @tkqubo * Swift 3: @hexelon * Swift 4: @ehyche + * Swift 5: @4brunu * TypeScript (Angular1): @mhardorf * TypeScript (Angular2): @roni-frantchi * TypeScript (Angular6): @akehir diff --git a/appveyor.yml b/appveyor.yml index afafbd2e70..b029aa6944 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,5 +1,5 @@ # for CI with appveyor.yml -# Ref: http://www.yegor256.com/2015/01/10/windows-appveyor-maven.html +# Ref: https://www.yegor256.com/2015/01/10/windows-appveyor-maven.html version: '{branch}-{build}' image: Visual Studio 2017 hosts: diff --git a/bin/ci/kotlin-client-string.json b/bin/ci/kotlin-client-string.json index 52f68e53b4..cceb366c2c 100644 --- a/bin/ci/kotlin-client-string.json +++ b/bin/ci/kotlin-client-string.json @@ -6,6 +6,8 @@ "templateDir": "modules/openapi-generator/src/main/resources/kotlin-client", "additionalProperties": { "dateLibrary": "string", - "serializableModel": "true" + "serializableModel": "true", + "sortParamsByRequiredFlag": "false", + "sortModelPropertiesByRequiredFlag": "false" } } \ No newline at end of file diff --git a/bin/kotlin-client-all.sh b/bin/kotlin-client-all.sh index 9fa9ee7de0..8663752ab5 100755 --- a/bin/kotlin-client-all.sh +++ b/bin/kotlin-client-all.sh @@ -10,4 +10,4 @@ ./bin/kotlin-client-threetenbp.sh ./bin/kotlin-client-nullable.sh ./bin/kotlin-client-retrofit2.sh -./bin/kotlin-client-json-request-date.sh +./bin/kotlin-client-json-request-string.sh diff --git a/bin/kotlin-client-json-request-date.sh b/bin/kotlin-client-json-request-string.sh similarity index 86% rename from bin/kotlin-client-json-request-date.sh rename to bin/kotlin-client-json-request-string.sh index 84ee2b7485..2e32eed675 100755 --- a/bin/kotlin-client-json-request-date.sh +++ b/bin/kotlin-client-json-request-string.sh @@ -27,6 +27,6 @@ fi # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/kotlin-client -i modules/openapi-generator/src/test/resources/2_0/petstore-with-date-field.yaml -g kotlin --artifact-id kotlin-petstore-json-request-date --additional-properties requestDateConverter=toJson -o samples/client/petstore/kotlin-json-request-date $@" +ags="generate -t modules/openapi-generator/src/main/resources/kotlin-client -i modules/openapi-generator/src/test/resources/2_0/petstore-with-date-field.yaml -g kotlin --artifact-id kotlin-petstore-json-request-string --additional-properties requestDateConverter=toString -o samples/client/petstore/kotlin-json-request-string $@" java ${JAVA_OPTS} -jar ${executable} ${ags} diff --git a/bin/swift5-all.sh b/bin/swift5-all.sh new file mode 100755 index 0000000000..0fabcabab4 --- /dev/null +++ b/bin/swift5-all.sh @@ -0,0 +1,4 @@ +#!/bin/sh + +./bin/swift5-petstore-all.sh +./bin/swift5-test.sh diff --git a/bin/swift5-petstore-alamofire.json b/bin/swift5-petstore-alamofire.json new file mode 100644 index 0000000000..f6cc7270be --- /dev/null +++ b/bin/swift5-petstore-alamofire.json @@ -0,0 +1,7 @@ +{ + "podSummary": "PetstoreClient", + "podHomepage": "https://github.com/openapitools/openapi-generator", + "podAuthors": "", + "projectName": "PetstoreClient", + "library": "alamofire" +} diff --git a/bin/swift5-petstore-alamofire.sh b/bin/swift5-petstore-alamofire.sh new file mode 100755 index 0000000000..6c8ef2c5f8 --- /dev/null +++ b/bin/swift5-petstore-alamofire.sh @@ -0,0 +1,42 @@ +#!/bin/sh + +SCRIPT="$0" +echo "# START SCRIPT: $SCRIPT" + +while [ -h "$SCRIPT" ] ; do + ls=`ls -ld "$SCRIPT"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + SCRIPT="$link" + else + SCRIPT=`dirname "$SCRIPT"`/"$link" + fi +done + +if [ ! -d "${APP_DIR}" ]; then + APP_DIR=`dirname "$SCRIPT"`/.. + APP_DIR=`cd "${APP_DIR}"; pwd` +fi + +executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" + +if [ ! -f "$executable" ] +then + mvn -B clean package +fi + +# if you've executed sbt assembly previously it will use that instead. +export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" +ags="generate -t modules/openapi-generator/src/main/resources/swift5 -i modules/openapi-generator/src/test/resources/2_0/swift/petstore-with-fake-endpoints-models-for-testing.yaml -g swift5 -c ./bin/swift5-petstore-alamofire.json -o samples/client/petstore/swift5/alamofireLibrary --generate-alias-as-model $@" + +java $JAVA_OPTS -jar $executable $ags + +if type "xcodegen" > /dev/null 2>&1; then + cd samples/client/petstore/swift5/alamofireLibrary + xcodegen generate +fi + +if type "swiftlint" > /dev/null 2>&1; then + cd samples/client/petstore/swift5/alamofireLibrary + swiftlint autocorrect +fi \ No newline at end of file diff --git a/bin/swift5-petstore-all.sh b/bin/swift5-petstore-all.sh new file mode 100755 index 0000000000..bce216fcb4 --- /dev/null +++ b/bin/swift5-petstore-all.sh @@ -0,0 +1,12 @@ +#!/bin/sh + +./bin/swift5-petstore.sh +./bin/swift5-petstore-promisekit.sh +./bin/swift5-petstore-result.sh +./bin/swift5-petstore-rxswift.sh +./bin/swift5-petstore-objcCompatible.sh +./bin/swift5-petstore-nonPublicApi.sh +./bin/swift5-petstore-urlsession.sh +./bin/swift5-petstore-alamofire.sh +./bin/swift5-petstore-combine.sh + \ No newline at end of file diff --git a/bin/swift5-petstore-combine.json b/bin/swift5-petstore-combine.json new file mode 100644 index 0000000000..ef420f56e2 --- /dev/null +++ b/bin/swift5-petstore-combine.json @@ -0,0 +1,7 @@ +{ + "podSummary": "PetstoreClient", + "podHomepage": "https://github.com/openapitools/openapi-generator", + "podAuthors": "", + "projectName": "PetstoreClient", + "responseAs": "Combine" +} diff --git a/bin/swift5-petstore-combine.sh b/bin/swift5-petstore-combine.sh new file mode 100755 index 0000000000..71ca667a9a --- /dev/null +++ b/bin/swift5-petstore-combine.sh @@ -0,0 +1,42 @@ +#!/bin/sh + +SCRIPT="$0" +echo "# START SCRIPT: $SCRIPT" + +while [ -h "$SCRIPT" ] ; do + ls=`ls -ld "$SCRIPT"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + SCRIPT="$link" + else + SCRIPT=`dirname "$SCRIPT"`/"$link" + fi +done + +if [ ! -d "${APP_DIR}" ]; then + APP_DIR=`dirname "$SCRIPT"`/.. + APP_DIR=`cd "${APP_DIR}"; pwd` +fi + +executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" + +if [ ! -f "$executable" ] +then + mvn -B clean package +fi + +# if you've executed sbt assembly previously it will use that instead. +export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" +ags="generate -t modules/openapi-generator/src/main/resources/swift5 -i modules/openapi-generator/src/test/resources/2_0/swift/petstore-with-fake-endpoints-models-for-testing.yaml -g swift5 -c ./bin/swift5-petstore-combine.json -o samples/client/petstore/swift5/combineLibrary --generate-alias-as-model $@" + +java $JAVA_OPTS -jar $executable $ags + +if type "xcodegen" > /dev/null 2>&1; then + cd samples/client/petstore/swift5/combineLibrary + xcodegen generate +fi + +if type "swiftlint" > /dev/null 2>&1; then + cd samples/client/petstore/swift5/combineLibrary + swiftlint autocorrect +fi \ No newline at end of file diff --git a/bin/swift5-petstore-nonPublicApi.json b/bin/swift5-petstore-nonPublicApi.json new file mode 100644 index 0000000000..f20305dec0 --- /dev/null +++ b/bin/swift5-petstore-nonPublicApi.json @@ -0,0 +1,8 @@ +{ + "podSummary": "PetstoreClient", + "podHomepage": "https://github.com/openapitools/openapi-generator", + "podAuthors": "", + "projectName": "PetstoreClient", + "nonPublicApi": true, + "sortParamsByRequiredFlag": false +} diff --git a/bin/openapi3/nodejs-petstore-google-cloud-functions.sh b/bin/swift5-petstore-nonPublicApi.sh similarity index 54% rename from bin/openapi3/nodejs-petstore-google-cloud-functions.sh rename to bin/swift5-petstore-nonPublicApi.sh index 00ab32fb9a..fc4035bfca 100755 --- a/bin/openapi3/nodejs-petstore-google-cloud-functions.sh +++ b/bin/swift5-petstore-nonPublicApi.sh @@ -22,11 +22,21 @@ executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" if [ ! -f "$executable" ] then - mvn clean package + mvn -B clean package fi # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g nodejs-server-deprecated --additional-properties=googleCloudFunctions=true -o samples/server/petstore/nodejs-google-cloud-functions -Dservice $@" +ags="generate -t modules/openapi-generator/src/main/resources/swift5 -i modules/openapi-generator/src/test/resources/2_0/swift/petstore-with-fake-endpoints-models-for-testing.yaml -g swift5 -c ./bin/swift5-petstore-nonPublicApi.json -o samples/client/petstore/swift5/nonPublicApi --generate-alias-as-model $@" java $JAVA_OPTS -jar $executable $ags + +if type "xcodegen" > /dev/null 2>&1; then + cd samples/client/petstore/swift5/nonPublicApi + xcodegen generate +fi + +if type "swiftlint" > /dev/null 2>&1; then + cd samples/client/petstore/swift5/nonPublicApi + swiftlint autocorrect +fi \ No newline at end of file diff --git a/bin/swift5-petstore-objcCompatible.json b/bin/swift5-petstore-objcCompatible.json new file mode 100644 index 0000000000..c24c7abf69 --- /dev/null +++ b/bin/swift5-petstore-objcCompatible.json @@ -0,0 +1,7 @@ +{ + "podSummary": "PetstoreClient", + "podHomepage": "https://github.com/openapitools/openapi-generator", + "podAuthors": "", + "projectName": "PetstoreClient", + "objcCompatible": true +} diff --git a/bin/swift5-petstore-objcCompatible.sh b/bin/swift5-petstore-objcCompatible.sh new file mode 100755 index 0000000000..39d53ff8e6 --- /dev/null +++ b/bin/swift5-petstore-objcCompatible.sh @@ -0,0 +1,42 @@ +#!/bin/sh + +SCRIPT="$0" +echo "# START SCRIPT: $SCRIPT" + +while [ -h "$SCRIPT" ] ; do + ls=`ls -ld "$SCRIPT"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + SCRIPT="$link" + else + SCRIPT=`dirname "$SCRIPT"`/"$link" + fi +done + +if [ ! -d "${APP_DIR}" ]; then + APP_DIR=`dirname "$SCRIPT"`/.. + APP_DIR=`cd "${APP_DIR}"; pwd` +fi + +executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" + +if [ ! -f "$executable" ] +then + mvn -B clean package +fi + +# if you've executed sbt assembly previously it will use that instead. +export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" +ags="generate -t modules/openapi-generator/src/main/resources/swift5 -i modules/openapi-generator/src/test/resources/2_0/swift/petstore-with-fake-endpoints-models-for-testing.yaml -g swift5 -c ./bin/swift5-petstore-objcCompatible.json -o samples/client/petstore/swift5/objcCompatible --generate-alias-as-model $@" + +java $JAVA_OPTS -jar $executable $ags + +if type "xcodegen" > /dev/null 2>&1; then + cd samples/client/petstore/swift5/objcCompatible + xcodegen generate +fi + +if type "swiftlint" > /dev/null 2>&1; then + cd samples/client/petstore/swift5/objcCompatible + swiftlint autocorrect +fi \ No newline at end of file diff --git a/bin/swift5-petstore-promisekit.json b/bin/swift5-petstore-promisekit.json new file mode 100644 index 0000000000..48137f1f28 --- /dev/null +++ b/bin/swift5-petstore-promisekit.json @@ -0,0 +1,7 @@ +{ + "podSummary": "PetstoreClient", + "podHomepage": "https://github.com/openapitools/openapi-generator", + "podAuthors": "", + "projectName": "PetstoreClient", + "responseAs": "PromiseKit" +} diff --git a/bin/swift5-petstore-promisekit.sh b/bin/swift5-petstore-promisekit.sh new file mode 100755 index 0000000000..f864088e9b --- /dev/null +++ b/bin/swift5-petstore-promisekit.sh @@ -0,0 +1,42 @@ +#!/bin/sh + +SCRIPT="$0" +echo "# START SCRIPT: $SCRIPT" + +while [ -h "$SCRIPT" ] ; do + ls=`ls -ld "$SCRIPT"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + SCRIPT="$link" + else + SCRIPT=`dirname "$SCRIPT"`/"$link" + fi +done + +if [ ! -d "${APP_DIR}" ]; then + APP_DIR=`dirname "$SCRIPT"`/.. + APP_DIR=`cd "${APP_DIR}"; pwd` +fi + +executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" + +if [ ! -f "$executable" ] +then + mvn -B clean package +fi + +# if you've executed sbt assembly previously it will use that instead. +export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" +ags="generate -t modules/openapi-generator/src/main/resources/swift5 -i modules/openapi-generator/src/test/resources/2_0/swift/petstore-with-fake-endpoints-models-for-testing.yaml -g swift5 -c ./bin/swift5-petstore-promisekit.json -o samples/client/petstore/swift5/promisekitLibrary --generate-alias-as-model $@" + +java $JAVA_OPTS -jar $executable $ags + +if type "xcodegen" > /dev/null 2>&1; then + cd samples/client/petstore/swift5/promisekitLibrary + xcodegen generate +fi + +if type "swiftlint" > /dev/null 2>&1; then + cd samples/client/petstore/swift5/promisekitLibrary + swiftlint autocorrect +fi \ No newline at end of file diff --git a/bin/swift5-petstore-result.json b/bin/swift5-petstore-result.json new file mode 100644 index 0000000000..3154338678 --- /dev/null +++ b/bin/swift5-petstore-result.json @@ -0,0 +1,7 @@ +{ + "podSummary": "PetstoreClient", + "podHomepage": "https://github.com/openapitools/openapi-generator", + "podAuthors": "", + "projectName": "PetstoreClient", + "responseAs": "Result" +} diff --git a/bin/openapi3/nodejs-petstore-server.sh b/bin/swift5-petstore-result.sh similarity index 54% rename from bin/openapi3/nodejs-petstore-server.sh rename to bin/swift5-petstore-result.sh index a987aced35..803c79a4f7 100755 --- a/bin/openapi3/nodejs-petstore-server.sh +++ b/bin/swift5-petstore-result.sh @@ -22,11 +22,21 @@ executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" if [ ! -f "$executable" ] then - mvn clean package + mvn -B clean package fi # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/nodejs -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g nodejs-server-deprecated -o samples/server/petstore/nodejs -Dservice $@" +ags="generate -t modules/openapi-generator/src/main/resources/swift5 -i modules/openapi-generator/src/test/resources/2_0/swift/petstore-with-fake-endpoints-models-for-testing.yaml -g swift5 -c ./bin/swift5-petstore-result.json -o samples/client/petstore/swift5/resultLibrary --generate-alias-as-model $@" java $JAVA_OPTS -jar $executable $ags + +if type "xcodegen" > /dev/null 2>&1; then + cd samples/client/petstore/swift5/resultLibrary + xcodegen generate +fi + +if type "swiftlint" > /dev/null 2>&1; then + cd samples/client/petstore/swift5/resultLibrary + swiftlint autocorrect +fi \ No newline at end of file diff --git a/bin/swift5-petstore-rxswift.json b/bin/swift5-petstore-rxswift.json new file mode 100644 index 0000000000..eb8b11dde5 --- /dev/null +++ b/bin/swift5-petstore-rxswift.json @@ -0,0 +1,7 @@ +{ + "podSummary": "PetstoreClient", + "podHomepage": "https://github.com/openapitools/openapi-generator", + "podAuthors": "", + "projectName": "PetstoreClient", + "responseAs": "RxSwift" +} diff --git a/bin/swift5-petstore-rxswift.sh b/bin/swift5-petstore-rxswift.sh new file mode 100755 index 0000000000..9c8398248e --- /dev/null +++ b/bin/swift5-petstore-rxswift.sh @@ -0,0 +1,42 @@ +#!/bin/sh + +SCRIPT="$0" +echo "# START SCRIPT: $SCRIPT" + +while [ -h "$SCRIPT" ] ; do + ls=`ls -ld "$SCRIPT"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + SCRIPT="$link" + else + SCRIPT=`dirname "$SCRIPT"`/"$link" + fi +done + +if [ ! -d "${APP_DIR}" ]; then + APP_DIR=`dirname "$SCRIPT"`/.. + APP_DIR=`cd "${APP_DIR}"; pwd` +fi + +executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" + +if [ ! -f "$executable" ] +then + mvn -B clean package +fi + +# if you've executed sbt assembly previously it will use that instead. +export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" +ags="generate -t modules/openapi-generator/src/main/resources/swift5 -i modules/openapi-generator/src/test/resources/2_0/swift/petstore-with-fake-endpoints-models-for-testing.yaml -g swift5 -c ./bin/swift5-petstore-rxswift.json -o samples/client/petstore/swift5/rxswiftLibrary --generate-alias-as-model $@" + +java $JAVA_OPTS -jar $executable $ags + +if type "xcodegen" > /dev/null 2>&1; then + cd samples/client/petstore/swift5/rxswiftLibrary + xcodegen generate +fi + +if type "swiftlint" > /dev/null 2>&1; then + cd samples/client/petstore/swift5/rxswiftLibrary + swiftlint autocorrect +fi \ No newline at end of file diff --git a/bin/swift5-petstore-urlsession.json b/bin/swift5-petstore-urlsession.json new file mode 100644 index 0000000000..db0f6c9fbf --- /dev/null +++ b/bin/swift5-petstore-urlsession.json @@ -0,0 +1,7 @@ +{ + "podSummary": "PetstoreClient", + "podHomepage": "https://github.com/openapitools/openapi-generator", + "podAuthors": "", + "projectName": "PetstoreClient", + "library": "urlsession" +} diff --git a/bin/swift5-petstore-urlsession.sh b/bin/swift5-petstore-urlsession.sh new file mode 100755 index 0000000000..76a674d431 --- /dev/null +++ b/bin/swift5-petstore-urlsession.sh @@ -0,0 +1,42 @@ +#!/bin/sh + +SCRIPT="$0" +echo "# START SCRIPT: $SCRIPT" + +while [ -h "$SCRIPT" ] ; do + ls=`ls -ld "$SCRIPT"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + SCRIPT="$link" + else + SCRIPT=`dirname "$SCRIPT"`/"$link" + fi +done + +if [ ! -d "${APP_DIR}" ]; then + APP_DIR=`dirname "$SCRIPT"`/.. + APP_DIR=`cd "${APP_DIR}"; pwd` +fi + +executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" + +if [ ! -f "$executable" ] +then + mvn -B clean package +fi + +# if you've executed sbt assembly previously it will use that instead. +export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" +ags="generate -t modules/openapi-generator/src/main/resources/swift5 -i modules/openapi-generator/src/test/resources/2_0/swift/petstore-with-fake-endpoints-models-for-testing.yaml -g swift5 -c ./bin/swift5-petstore-urlsession.json -o samples/client/petstore/swift5/urlsessionLibrary --generate-alias-as-model $@" + +java $JAVA_OPTS -jar $executable $ags + +if type "xcodegen" > /dev/null 2>&1; then + cd samples/client/petstore/swift5/urlsessionLibrary + xcodegen generate +fi + +if type "swiftlint" > /dev/null 2>&1; then + cd samples/client/petstore/swift5/urlsessionLibrary + swiftlint autocorrect +fi \ No newline at end of file diff --git a/bin/swift5-petstore.json b/bin/swift5-petstore.json new file mode 100644 index 0000000000..59bd94f43e --- /dev/null +++ b/bin/swift5-petstore.json @@ -0,0 +1,6 @@ +{ + "podSummary": "PetstoreClient", + "podHomepage": "https://github.com/openapitools/openapi-generator", + "podAuthors": "", + "projectName": "PetstoreClient" +} diff --git a/bin/nodejs-petstore-server.sh b/bin/swift5-petstore.sh similarity index 57% rename from bin/nodejs-petstore-server.sh rename to bin/swift5-petstore.sh index fbbed3e46f..f2752acc1a 100755 --- a/bin/nodejs-petstore-server.sh +++ b/bin/swift5-petstore.sh @@ -27,6 +27,16 @@ fi # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/nodejs -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g nodejs-server-deprecated -o samples/server/petstore/nodejs -Dservice $@" +ags="generate -t modules/openapi-generator/src/main/resources/swift5 -i modules/openapi-generator/src/test/resources/2_0/swift/petstore-with-fake-endpoints-models-for-testing.yaml -g swift5 -c ./bin/swift5-petstore.json -o samples/client/petstore/swift5/default --generate-alias-as-model $@" java $JAVA_OPTS -jar $executable $ags + +if type "xcodegen" > /dev/null 2>&1; then + cd samples/client/petstore/swift5/default + xcodegen generate +fi + +if type "swiftlint" > /dev/null 2>&1; then + cd samples/client/petstore/swift5/default + swiftlint autocorrect +fi diff --git a/bin/swift5-test.json b/bin/swift5-test.json new file mode 100644 index 0000000000..9341b740a2 --- /dev/null +++ b/bin/swift5-test.json @@ -0,0 +1,6 @@ +{ + "podSummary": "TestClient", + "podHomepage": "https://github.com/openapitools/openapi-generator", + "podAuthors": "", + "projectName": "TestClient" +} diff --git a/bin/nodejs-petstore-google-cloud-functions.sh b/bin/swift5-test.sh similarity index 60% rename from bin/nodejs-petstore-google-cloud-functions.sh rename to bin/swift5-test.sh index bfb02d960d..1620ea6e27 100755 --- a/bin/nodejs-petstore-google-cloud-functions.sh +++ b/bin/swift5-test.sh @@ -27,6 +27,16 @@ fi # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g nodejs-server-deprecated --additional-properties=googleCloudFunctions=true -o samples/server/petstore/nodejs-google-cloud-functions -Dservice $@" +ags="generate -t modules/openapi-generator/src/main/resources/swift5 -i modules/openapi-generator/src/test/resources/2_0/swift5Test.json -g swift5 -c ./bin/swift5-test.json -o samples/client/test/swift5/default --generate-alias-as-model $@" java $JAVA_OPTS -jar $executable $ags + +if type "xcodegen" > /dev/null 2>&1; then + cd samples/client/test/swift5/default + xcodegen generate +fi + +if type "swiftlint" > /dev/null 2>&1; then + cd samples/client/test/swift5/default + swiftlint autocorrect +fi diff --git a/bin/utils/ensure-up-to-date b/bin/utils/ensure-up-to-date index f7d7172d47..80ca209e27 100755 --- a/bin/utils/ensure-up-to-date +++ b/bin/utils/ensure-up-to-date @@ -39,13 +39,14 @@ declare -a samples=( "${root}/bin/mysql-schema-petstore.sh" "${root}/bin/nim-client-petstore.sh" "${root}/bin/python-petstore-all.sh" +"${root}/bin/python-server-all.sh" "${root}/bin/openapi3/python-petstore.sh" "${root}/bin/php-petstore.sh" "${root}/bin/php-silex-petstore-server.sh" "${root}/bin/php-symfony-petstore.sh" "${root}/bin/php-lumen-petstore-server.sh" "${root}/bin/php-slim-server-petstore.sh" -"${root}/bin/php-slim4-server-petstore.sh" +#"${root}/bin/php-slim4-server-petstore.sh" "${root}/bin/php-ze-ph-petstore-server.sh" "${root}/bin/openapi3/php-petstore.sh" "${root}/bin/typescript-angularjs-petstore.sh" diff --git a/bin/utils/export_generator.sh b/bin/utils/export_generator.sh index 6ec536aa28..a566522a90 100755 --- a/bin/utils/export_generator.sh +++ b/bin/utils/export_generator.sh @@ -14,4 +14,4 @@ fi executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" -java -jar ${executable} config-help -g "${NAME}" --named-header --format markdown --markdown-header -o "docs/generators/${NAME}.md" +java -jar ${executable} config-help -g "${NAME}" --full-details --named-header --format markdown --markdown-header -o "docs/generators/${NAME}.md" diff --git a/bin/utils/release/bump.sh b/bin/utils/release/bump.sh index 1afeffde16..1de9df213d 100755 --- a/bin/utils/release/bump.sh +++ b/bin/utils/release/bump.sh @@ -8,7 +8,7 @@ # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # -# http://www.apache.org/licenses/LICENSE-2.0 +# https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, diff --git a/bin/utils/release/release_version_update.sh b/bin/utils/release/release_version_update.sh index abc227a202..95d41712c5 100755 --- a/bin/utils/release/release_version_update.sh +++ b/bin/utils/release/release_version_update.sh @@ -11,7 +11,7 @@ # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # -# http://www.apache.org/licenses/LICENSE-2.0 +# https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, diff --git a/bin/utils/release/release_version_update_docs.sh b/bin/utils/release/release_version_update_docs.sh index 287b9a3e7d..cfd66070e9 100755 --- a/bin/utils/release/release_version_update_docs.sh +++ b/bin/utils/release/release_version_update_docs.sh @@ -11,7 +11,7 @@ # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # -# http://www.apache.org/licenses/LICENSE-2.0 +# https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, @@ -105,6 +105,8 @@ declare -a xml_files=( "${root}/modules/openapi-generator-maven-plugin/README.md" "${root}/modules/openapi-generator-gradle-plugin/samples/local-spec/README.md" "${root}/README.md" + "${root}/docs/installation.md" + "${root}/website/pages/en/index.js" ) declare -a commented_files=( diff --git a/bin/utils/release_checkout.rb b/bin/utils/release_checkout.rb index 8f82bf4bdc..2ceabba344 100755 --- a/bin/utils/release_checkout.rb +++ b/bin/utils/release_checkout.rb @@ -75,9 +75,9 @@ def check_readme url = "https://raw.githubusercontent.com/OpenAPITools/openapi-generator/master/README.md" matches = ["[#{$version}](https://github.com/OpenAPITools/openapi-generator/releases/tag/v#{$version})", - "JAR location: `http://central.maven.org/maven2/org/openapitools/openapi-generator-cli/#{$version}/openapi-generator-cli-#{$version}.jar`", - "wget http://central.maven.org/maven2/org/openapitools/openapi-generator-cli/#{$version}/openapi-generator-cli-#{$version}.jar -O openapi-generator-cli.jar", - "Invoke-WebRequest -OutFile openapi-generator-cli.jar http://central.maven.org/maven2/org/openapitools/openapi-generator-cli/#{$version}/openapi-generator-cli-#{$version}.jar"] + "JAR location: `https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/#{$version}/openapi-generator-cli-#{$version}.jar`", + "wget https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/#{$version}/openapi-generator-cli-#{$version}.jar -O openapi-generator-cli.jar", + "Invoke-WebRequest -OutFile openapi-generator-cli.jar https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/#{$version}/openapi-generator-cli-#{$version}.jar"] open(url) do |f| content = f.read has_outdated = false @@ -104,7 +104,7 @@ end def check_openapi_generator_jar print "Checking openapi-generator JAR ... " - url = "http://central.maven.org/maven2/org/openapitools/openapi-generator/#{$version}/openapi-generator-#{$version}.jar" + url = "https://repo1.maven.org/maven2/org/openapitools/openapi-generator/#{$version}/openapi-generator-#{$version}.jar" if check_url(url) puts "[OK]" @@ -118,7 +118,7 @@ end def check_openapi_generator_cli_jar print "Checking openapi-generator-cli JAR ... " - url = "http://central.maven.org/maven2/org/openapitools/openapi-generator-cli/#{$version}/openapi-generator-cli-#{$version}.jar" + url = "https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/#{$version}/openapi-generator-cli-#{$version}.jar" if check_url(url) puts "[OK]" @@ -130,7 +130,7 @@ end def check_openapi_generator_maven_plugin_jar print "Checking openapi-generator-maven-plugin JAR ... " - url = "http://central.maven.org/maven2/org/openapitools/openapi-generator-maven-plugin/#{$version}/openapi-generator-maven-plugin-#{$version}.jar" + url = "https://repo1.maven.org/maven2/org/openapitools/openapi-generator-maven-plugin/#{$version}/openapi-generator-maven-plugin-#{$version}.jar" if check_url(url) puts "[OK]" @@ -142,7 +142,7 @@ end def check_openapi_generator_gradle_plugin_jar print "Checking openapi-generator-gradle-plugin JAR ... " - url = "http://central.maven.org/maven2/org/openapitools/openapi-generator-gradle-plugin/#{$version}/openapi-generator-gradle-plugin-#{$version}.jar" + url = "https://repo1.maven.org/maven2/org/openapitools/openapi-generator-gradle-plugin/#{$version}/openapi-generator-gradle-plugin-#{$version}.jar" if check_url(url) puts "[OK]" @@ -154,7 +154,7 @@ end def check_openapi_generator_online_jar print "Checking openapi-generator-online JAR ... " - url = "http://central.maven.org/maven2/org/openapitools/openapi-generator-online/#{$version}/openapi-generator-online-#{$version}.jar" + url = "https://repo1.maven.org/maven2/org/openapitools/openapi-generator-online/#{$version}/openapi-generator-online-#{$version}.jar" if check_url(url) puts "[OK]" @@ -166,7 +166,7 @@ end def check_openapi_generator_project_pom print "Checking openapi-generator-project pom.xml ... " - url = "http://central.maven.org/maven2/org/openapitools/openapi-generator-project/#{$version}/openapi-generator-project-#{$version}.pom" + url = "https://repo1.maven.org/maven2/org/openapitools/openapi-generator-project/#{$version}/openapi-generator-project-#{$version}.pom" if check_url(url) puts "[OK]" diff --git a/bin/utils/release_version_update_docs.sh b/bin/utils/release_version_update_docs.sh index df743e8e47..c6b8f12921 100755 --- a/bin/utils/release_version_update_docs.sh +++ b/bin/utils/release_version_update_docs.sh @@ -8,7 +8,7 @@ # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # -# http://www.apache.org/licenses/LICENSE-2.0 +# https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, diff --git a/bin/windows/kotlin-client-all.bat b/bin/windows/kotlin-client-all.bat index 3833a95c7d..d4dd27a9f6 100644 --- a/bin/windows/kotlin-client-all.bat +++ b/bin/windows/kotlin-client-all.bat @@ -7,5 +7,5 @@ call powershell -command "& '%~dp0\kotlin-client-petstore.bat'" call powershell -command "& '%~dp0\kotlin-client-string.bat'" call powershell -command "& '%~dp0\kotlin-client-threetenbp.bat'" call powershell -command "& '%~dp0\kotlin-client-nullable.bat'" -call powershell -command "& '%~dp0\kotlin-client-json-request-date.bat'" +call powershell -command "& '%~dp0\kotlin-client-json-request-string.bat'" call powershell -command "& '%~dp0\kotlin-client-retrofit2.bat'" \ No newline at end of file diff --git a/bin/windows/kotlin-client-json-request-date.bat b/bin/windows/kotlin-client-json-request-date.bat deleted file mode 100644 index 47fd16af7a..0000000000 --- a/bin/windows/kotlin-client-json-request-date.bat +++ /dev/null @@ -1,10 +0,0 @@ -set executable=.\modules\openapi-generator-cli\target\openapi-generator-cli.jar - -If Not Exist %executable% ( - mvn clean package -) - -REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -DloggerPath=conf/log4j.properties -set ags=generate --artifact-id "kotlin-petstore-json-request-date" -i modules\openapi-generator\src\test\resources\2_0\petstore-with-date-field.yaml -g kotlin --additional-properties requestDateConverter=toJson -o samples\client\petstore\kotlin-json-request-date - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/kotlin-client-json-request-string.bat b/bin/windows/kotlin-client-json-request-string.bat new file mode 100644 index 0000000000..1b257af020 --- /dev/null +++ b/bin/windows/kotlin-client-json-request-string.bat @@ -0,0 +1,10 @@ +set executable=.\modules\openapi-generator-cli\target\openapi-generator-cli.jar + +If Not Exist %executable% ( + mvn clean package +) + +REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -DloggerPath=conf/log4j.properties +set ags=generate --artifact-id "kotlin-petstore-json-request-string" -i modules\openapi-generator\src\test\resources\2_0\petstore-with-date-field.yaml -g kotlin --additional-properties requestDateConverter=toString -o samples\client\petstore\kotlin-json-request-string + +java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/swift5-all.bat b/bin/windows/swift5-all.bat new file mode 100755 index 0000000000..663df4e22d --- /dev/null +++ b/bin/windows/swift5-all.bat @@ -0,0 +1,2 @@ +call .\bin\windows\swift5-petstore-all.bat +call .\bin\windows\swift5-test.bat diff --git a/bin/windows/swift5-petstore-alamofire.bat b/bin/windows/swift5-petstore-alamofire.bat new file mode 100755 index 0000000000..b982ea061e --- /dev/null +++ b/bin/windows/swift5-petstore-alamofire.bat @@ -0,0 +1,10 @@ +set executable=.\modules\openapi-generator-cli\target\openapi-generator-cli.jar + +If Not Exist %executable% ( + mvn clean package +) + +REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M +set ags=generate -i modules\openapi-generator\src\test\resources\2_0\swift\petstore-with-fake-endpoints-models-for-testing.yaml -g swift5 -c bin\swift5-petstore-alamofire.json -o samples\client\petstore\swift5\alamofireLibrary + +java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/swift5-petstore-all.bat b/bin/windows/swift5-petstore-all.bat new file mode 100755 index 0000000000..1daaa1fee7 --- /dev/null +++ b/bin/windows/swift5-petstore-all.bat @@ -0,0 +1,9 @@ +call .\bin\windows\swift5-petstore.bat +call .\bin\windows\swift5-petstore-promisekit.bat +call .\bin\windows\swift5-petstore-result.bat +call .\bin\windows\swift5-petstore-rxswift.bat +call .\bin\windows\swift5-petstore-objcCompatible.bat +call .\bin\windows\swift5-petstore-nonPublicApi.bat +call .\bin\windows\swift5-petstore-urlsession.bat +call .\bin\windows\swift5-petstore-alamofire.bat +call .\bin\windows\swift5-petstore-combine.bat diff --git a/bin/windows/swift5-petstore-combine.bat b/bin/windows/swift5-petstore-combine.bat new file mode 100755 index 0000000000..5ea7cc88db --- /dev/null +++ b/bin/windows/swift5-petstore-combine.bat @@ -0,0 +1,10 @@ +set executable=.\modules\openapi-generator-cli\target\openapi-generator-cli.jar + +If Not Exist %executable% ( + mvn clean package +) + +REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M +set ags=generate -i modules\openapi-generator\src\test\resources\2_0\swift\petstore-with-fake-endpoints-models-for-testing.yaml -g swift5 -c bin\swift5-petstore-combine.json -o samples\client\petstore\swift5\combineLibrary + +java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/swift5-petstore-nonPublicApi.bat b/bin/windows/swift5-petstore-nonPublicApi.bat new file mode 100755 index 0000000000..6853336901 --- /dev/null +++ b/bin/windows/swift5-petstore-nonPublicApi.bat @@ -0,0 +1,10 @@ +set executable=.\modules\openapi-generator-cli\target\openapi-generator-cli.jar + +If Not Exist %executable% ( + mvn clean package +) + +REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M +set ags=generate -i modules\openapi-generator\src\test\resources\2_0\swift\petstore-with-fake-endpoints-models-for-testing.yaml -g swift5 -c bin\swift5-petstore-nonPublicApi.json -o samples\client\petstore\swift5\nonPublicApi + +java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/swift5-petstore-objcCompatible.bat b/bin/windows/swift5-petstore-objcCompatible.bat new file mode 100755 index 0000000000..7d9b7047b4 --- /dev/null +++ b/bin/windows/swift5-petstore-objcCompatible.bat @@ -0,0 +1,10 @@ +set executable=.\modules\openapi-generator-cli\target\openapi-generator-cli.jar + +If Not Exist %executable% ( + mvn clean package +) + +REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M +set ags=generate -i modules\openapi-generator\src\test\resources\2_0\swift\petstore-with-fake-endpoints-models-for-testing.yaml -g swift5 -c bin\swift5-petstore-objcCompatible.json -o samples\client\petstore\swift5\objcCompatible + +java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/swift5-petstore-promisekit.bat b/bin/windows/swift5-petstore-promisekit.bat new file mode 100755 index 0000000000..cfd9ff41ef --- /dev/null +++ b/bin/windows/swift5-petstore-promisekit.bat @@ -0,0 +1,10 @@ +set executable=.\modules\openapi-generator-cli\target\openapi-generator-cli.jar + +If Not Exist %executable% ( + mvn clean package +) + +REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M +set ags=generate -i modules\openapi-generator\src\test\resources\2_0\swift\petstore-with-fake-endpoints-models-for-testing.yaml -g swift5 -c bin\swift5-petstore-promisekit.json -o samples\client\petstore\swift5\promisekitLibrary + +java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/swift5-petstore-result.bat b/bin/windows/swift5-petstore-result.bat new file mode 100755 index 0000000000..4aabf28d50 --- /dev/null +++ b/bin/windows/swift5-petstore-result.bat @@ -0,0 +1,10 @@ +set executable=.\modules\openapi-generator-cli\target\openapi-generator-cli.jar + +If Not Exist %executable% ( + mvn clean package +) + +REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M +set ags=generate -i modules\openapi-generator\src\test\resources\2_0\swift\petstore-with-fake-endpoints-models-for-testing.yaml -g swift5 -c bin\swift5-petstore-result.json -o samples\client\petstore\swift5\resultLibrary + +java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/swift5-petstore-rxswift.bat b/bin/windows/swift5-petstore-rxswift.bat new file mode 100755 index 0000000000..862c182067 --- /dev/null +++ b/bin/windows/swift5-petstore-rxswift.bat @@ -0,0 +1,10 @@ +set executable=.\modules\openapi-generator-cli\target\openapi-generator-cli.jar + +If Not Exist %executable% ( + mvn clean package +) + +REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M +set ags=generate -i modules\openapi-generator\src\test\resources\2_0\swift\petstore-with-fake-endpoints-models-for-testing.yaml -g swift5 -c bin\swift5-petstore-rxswift.json -o samples\client\petstore\swift5\rxswiftLibrary + +java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/swift5-petstore-urlSession.bat b/bin/windows/swift5-petstore-urlSession.bat new file mode 100755 index 0000000000..594317a3fa --- /dev/null +++ b/bin/windows/swift5-petstore-urlSession.bat @@ -0,0 +1,10 @@ +set executable=.\modules\openapi-generator-cli\target\openapi-generator-cli.jar + +If Not Exist %executable% ( + mvn clean package +) + +REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M +set ags=generate -i modules\openapi-generator\src\test\resources\2_0\swift\petstore-with-fake-endpoints-models-for-testing.yaml -g swift5 -c bin\swift5-petstore-urlsession.json -o samples\client\petstore\swift5\urlsessionLibrary + +java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/swift5-petstore.bat b/bin/windows/swift5-petstore.bat new file mode 100755 index 0000000000..26cee2940f --- /dev/null +++ b/bin/windows/swift5-petstore.bat @@ -0,0 +1,10 @@ +set executable=.\modules\openapi-generator-cli\target\openapi-generator-cli.jar + +If Not Exist %executable% ( + mvn clean package +) + +REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M +set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore-with-fake-endpoints-models-for-testing.yaml -g swift5 -o samples\client\petstore\swift5\default + +java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/swift5-test.bat b/bin/windows/swift5-test.bat new file mode 100755 index 0000000000..60d74aabcf --- /dev/null +++ b/bin/windows/swift5-test.bat @@ -0,0 +1,10 @@ +set executable=.\modules\openapi-generator-cli\target\openapi-generator-cli.jar + +If Not Exist %executable% ( + mvn clean package +) + +REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M +set ags=generate -i modules\openapi-generator\src\test\resources\2_0\swift5Test.json -g swift5 -c bin\swift5-test.json -o samples\client\test\swift5\default + +java %JAVA_OPTS% -jar %executable% %ags% diff --git a/docs/building.md b/docs/building.md index aa029b4cb6..257721f418 100644 --- a/docs/building.md +++ b/docs/building.md @@ -7,9 +7,9 @@ title: Building the code To build from source, you need the following installed and available in your `$PATH:` -* [Java 8](http://java.oracle.com) +* [Java 8](https://java.oracle.com) -* [Apache maven 3.3.4 or greater](http://maven.apache.org/) +* [Apache maven 3.3.4 or greater](https://maven.apache.org/) After cloning the project, you can build it from source with this command: @@ -53,7 +53,7 @@ Once built, `run-in-docker.sh` will act as an executable for openapi-generator-c Prerequisite: install [Vagrant](https://www.vagrantup.com/downloads.html) and [VirtualBox](https://www.virtualbox.org/wiki/Downloads). ```bash -git clone http://github.com/openapitools/openapi-generator.git +git clone https://github.com/openapitools/openapi-generator.git cd openapi-generator vagrant up vagrant ssh diff --git a/docs/contributing.md b/docs/contributing.md index aa0e6f4ff8..8038fa512e 100644 --- a/docs/contributing.md +++ b/docs/contributing.md @@ -105,5 +105,5 @@ To start the CI tests, you can run `mvn verify -Psamples` (assuming you've all t - Make sure test cases passed after the change (one way is to leverage https://travis-ci.org/ to run the CI tests) - File a PR with meaningful title, description and commit messages. - Recommended git settings - - `git config --global core.autocrlf input` to tell Git convert CRLF to LF on commit but not the other way around + - `git config core.autocrlf input` to tell Git convert CRLF to LF on commit but not the other way around - To close an issue (e.g. issue 1542) automatically after a PR is merged, use keywords "fix", "close", "resolve" in the PR description, e.g. `fix #1542`. (Ref: [closing issues using keywords](https://help.github.com/articles/closing-issues-using-keywords/)) diff --git a/docs/generators.md b/docs/generators.md index 59935cc3a6..8be760e7cc 100644 --- a/docs/generators.md +++ b/docs/generators.md @@ -57,6 +57,7 @@ The following generators are available: * [swift2-deprecated (deprecated)](generators/swift2-deprecated.md) * [swift3-deprecated (deprecated)](generators/swift3-deprecated.md) * [swift4](generators/swift4.md) +* [swift5 (beta)](generators/swift5.md) * [typescript-angular](generators/typescript-angular.md) * [typescript-angularjs](generators/typescript-angularjs.md) * [typescript-aurelia](generators/typescript-aurelia.md) diff --git a/docs/generators/README.md b/docs/generators/README.md index 070ef96c15..cd9e5f551c 100644 --- a/docs/generators/README.md +++ b/docs/generators/README.md @@ -1,123 +1,138 @@ + The following generators are available: -* CLIENT generators: - - [ada](ada.md) - - [android](android.md) - - [apex](apex.md) - - [bash](bash.md) - - [c](c.md) - - [clojure](clojure.md) - - [cpp-qt5-client](cpp-qt5-client.md) - - [cpp-restsdk](cpp-restsdk.md) - - [cpp-tizen](cpp-tizen.md) - - [csharp](csharp.md) - - [csharp-dotnet2](csharp-dotnet2.md) - - [csharp-refactor](csharp-refactor.md) - - [dart](dart.md) - - [dart-dio](dart-dio.md) - - [dart-jaguar](dart-jaguar.md) - - [eiffel](eiffel.md) - - [elixir](elixir.md) - - [elm](elm.md) - - [erlang-client](erlang-client.md) - - [erlang-proper](erlang-proper.md) - - [flash](flash.md) - - [go](go.md) - - [groovy](groovy.md) - - [haskell-http-client](haskell-http-client.md) - - [java](java.md) - - [javascript](javascript.md) - - [javascript-closure-angular](javascript-closure-angular.md) - - [javascript-flowtyped](javascript-flowtyped.md) - - [jaxrs-cxf-client](jaxrs-cxf-client.md) - - [jmeter](jmeter.md) - - [kotlin](kotlin.md) - - [lua](lua.md) - - [objc](objc.md) - - [perl](perl.md) - - [php](php.md) - - [powershell](powershell.md) - - [python](python.md) - - [r](r.md) - - [ruby](ruby.md) - - [rust](rust.md) - - [scala-akka](scala-akka.md) - - [scala-gatling](scala-gatling.md) - - [scala-httpclient](scala-httpclient.md) - - [scalaz](scalaz.md) - - [swift2-deprecated](swift2-deprecated.md) - - [swift3-deprecated](swift3-deprecated.md) - - [swift4](swift4.md) - - [typescript-angular](typescript-angular.md) - - [typescript-angularjs](typescript-angularjs.md) - - [typescript-aurelia](typescript-aurelia.md) - - [typescript-axios](typescript-axios.md) - - [typescript-fetch](typescript-fetch.md) - - [typescript-inversify](typescript-inversify.md) - - [typescript-jquery](typescript-jquery.md) - - [typescript-node](typescript-node.md) - - [typescript-rxjs](typescript-rxjs.md) +## CLIENT generators +* [ada](ada.md) +* [android](android.md) +* [apex](apex.md) +* [bash](bash.md) +* [c](c.md) +* [clojure](clojure.md) +* [cpp-qt5-client](cpp-qt5-client.md) +* [cpp-restsdk](cpp-restsdk.md) +* [cpp-tizen](cpp-tizen.md) +* [csharp](csharp.md) +* [csharp-netcore](csharp-netcore.md) +* [dart](dart.md) +* [dart-dio](dart-dio.md) +* [dart-jaguar](dart-jaguar.md) +* [eiffel](eiffel.md) +* [elixir](elixir.md) +* [elm](elm.md) +* [erlang-client](erlang-client.md) +* [erlang-proper](erlang-proper.md) +* [flash](flash.md) +* [go](go.md) +* [go-experimental (experimental)](go-experimental.md) +* [groovy](groovy.md) +* [haskell-http-client](haskell-http-client.md) +* [java](java.md) +* [javascript](javascript.md) +* [javascript-closure-angular](javascript-closure-angular.md) +* [javascript-flowtyped](javascript-flowtyped.md) +* [jaxrs-cxf-client](jaxrs-cxf-client.md) +* [jmeter](jmeter.md) +* [kotlin](kotlin.md) +* [lua](lua.md) +* [nim (beta)](nim.md) +* [objc](objc.md) +* [ocaml](ocaml.md) +* [perl](perl.md) +* [php](php.md) +* [powershell](powershell.md) +* [python](python.md) +* [python-experimental (experimental)](python-experimental.md) +* [r](r.md) +* [ruby](ruby.md) +* [rust](rust.md) +* [scala-akka](scala-akka.md) +* [scala-gatling](scala-gatling.md) +* [scalaz](scalaz.md) +* [swift4](swift4.md) +* [swift5 (beta)](swift5.md) +* [typescript-angular](typescript-angular.md) +* [typescript-angularjs](typescript-angularjs.md) +* [typescript-aurelia](typescript-aurelia.md) +* [typescript-axios](typescript-axios.md) +* [typescript-fetch](typescript-fetch.md) +* [typescript-inversify](typescript-inversify.md) +* [typescript-jquery](typescript-jquery.md) +* [typescript-node](typescript-node.md) +* [typescript-redux-query](typescript-redux-query.md) +* [typescript-rxjs](typescript-rxjs.md) -* SERVER generators: - - [ada-server](ada-server.md) - - [aspnetcore](aspnetcore.md) - - [cpp-pistache-server](cpp-pistache-server.md) - - [cpp-qt5-qhttpengine-server](cpp-qt5-qhttpengine-server.md) - - [cpp-restbed-server](cpp-restbed-server.md) - - [csharp-nancyfx](csharp-nancyfx.md) - - [erlang-server](erlang-server.md) - - [go-gin-server](go-gin-server.md) - - [go-server](go-server.md) - - [graphql-server](graphql-server.md) - - [haskell](haskell.md) - - [java-inflector](java-inflector.md) - - [java-msf4j](java-msf4j.md) - - [java-pkmst](java-pkmst.md) - - [java-play-framework](java-play-framework.md) - - [java-undertow-server](java-undertow-server.md) - - [java-vertx](java-vertx.md) - - [jaxrs-cxf](jaxrs-cxf.md) - - [jaxrs-cxf-cdi](jaxrs-cxf-cdi.md) - - [jaxrs-jersey](jaxrs-jersey.md) - - [jaxrs-resteasy](jaxrs-resteasy.md) - - [jaxrs-resteasy-eap](jaxrs-resteasy-eap.md) - - [jaxrs-spec](jaxrs-spec.md) - - [kotlin-server](kotlin-server.md) - - [kotlin-spring](kotlin-spring.md) - - [nodejs-server](nodejs-server.md) - - [php-laravel](php-laravel.md) - - [php-lumen](php-lumen.md) - - [php-silex](php-silex.md) - - [php-slim](php-slim.md) - - [php-symfony](php-symfony.md) - - [php-ze-ph](php-ze-ph.md) - - [python-flask](python-flask.md) - - [ruby-on-rails](ruby-on-rails.md) - - [ruby-sinatra](ruby-sinatra.md) - - [rust-server](rust-server.md) - - [scala-finch](scala-finch.md) - - [scala-lagom-server](scala-lagom-server.md) - - [scalatra](scalatra.md) - - [spring](spring.md) +## SERVER generators +* [ada-server](ada-server.md) +* [aspnetcore](aspnetcore.md) +* [cpp-pistache-server](cpp-pistache-server.md) +* [cpp-qt5-qhttpengine-server](cpp-qt5-qhttpengine-server.md) +* [cpp-restbed-server](cpp-restbed-server.md) +* [csharp-nancyfx](csharp-nancyfx.md) +* [erlang-server](erlang-server.md) +* [fsharp-functions (beta)](fsharp-functions.md) +* [fsharp-giraffe-server (beta)](fsharp-giraffe-server.md) +* [go-gin-server](go-gin-server.md) +* [go-server](go-server.md) +* [graphql-nodejs-express-server](graphql-nodejs-express-server.md) +* [haskell](haskell.md) +* [java-inflector](java-inflector.md) +* [java-msf4j](java-msf4j.md) +* [java-pkmst](java-pkmst.md) +* [java-play-framework](java-play-framework.md) +* [java-undertow-server](java-undertow-server.md) +* [java-vertx](java-vertx.md) +* [java-vertx-web (beta)](java-vertx-web.md) +* [jaxrs-cxf](jaxrs-cxf.md) +* [jaxrs-cxf-cdi](jaxrs-cxf-cdi.md) +* [jaxrs-cxf-extended](jaxrs-cxf-extended.md) +* [jaxrs-jersey](jaxrs-jersey.md) +* [jaxrs-resteasy](jaxrs-resteasy.md) +* [jaxrs-resteasy-eap](jaxrs-resteasy-eap.md) +* [jaxrs-spec](jaxrs-spec.md) +* [kotlin-server](kotlin-server.md) +* [kotlin-spring](kotlin-spring.md) +* [kotlin-vertx (beta)](kotlin-vertx.md) +* [nodejs-express-server (beta)](nodejs-express-server.md) +* [php-laravel](php-laravel.md) +* [php-lumen](php-lumen.md) +* [php-silex](php-silex.md) +* [php-slim4](php-slim4.md) +* [php-symfony](php-symfony.md) +* [php-ze-ph](php-ze-ph.md) +* [python-aiohttp](python-aiohttp.md) +* [python-blueplanet](python-blueplanet.md) +* [python-flask](python-flask.md) +* [ruby-on-rails](ruby-on-rails.md) +* [ruby-sinatra](ruby-sinatra.md) +* [rust-server](rust-server.md) +* [scala-finch](scala-finch.md) +* [scala-lagom-server](scala-lagom-server.md) +* [scala-play-server](scala-play-server.md) +* [scalatra](scalatra.md) +* [spring](spring.md) -* DOCUMENTATION generators: - - [cwiki](cwiki.md) - - [dynamic-html](dynamic-html.md) - - [html](html.md) - - [html2](html2.md) - - [openapi](openapi.md) - - [openapi-yaml](openapi-yaml.md) +## DOCUMENTATION generators +* [asciidoc](asciidoc.md) +* [cwiki](cwiki.md) +* [dynamic-html](dynamic-html.md) +* [html](html.md) +* [html2](html2.md) +* [markdown (beta)](markdown.md) +* [openapi](openapi.md) +* [openapi-yaml](openapi-yaml.md) -* SCHEMA generators: - - [mysql-schema](mysql-schema.md) +## SCHEMA generators +* [avro-schema (beta)](avro-schema.md) +* [mysql-schema](mysql-schema.md) -* CONFIG generators: - - [apache2](apache2.md) - - [graphql-schema](graphql-schema.md) +## CONFIG generators +* [apache2](apache2.md) +* [graphql-schema](graphql-schema.md) +* [protobuf-schema (beta)](protobuf-schema.md) diff --git a/docs/generators/ada-server.md b/docs/generators/ada-server.md index 479a9a54bc..61f5b1c53e 100644 --- a/docs/generators/ada-server.md +++ b/docs/generators/ada-server.md @@ -5,9 +5,109 @@ sidebar_label: ada-server | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| |projectName|GNAT project name| |defaultProject| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | + + +## LANGUAGE PRIMITIVES + + + +## RESERVED WORDS + + diff --git a/docs/generators/ada.md b/docs/generators/ada.md index 3341e16373..60d6a74739 100644 --- a/docs/generators/ada.md +++ b/docs/generators/ada.md @@ -5,9 +5,109 @@ sidebar_label: ada | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| |projectName|GNAT project name| |defaultProject| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | + + +## LANGUAGE PRIMITIVES + + + +## RESERVED WORDS + + diff --git a/docs/generators/android.md b/docs/generators/android.md index 96c4695f43..8bcc419aa7 100644 --- a/docs/generators/android.md +++ b/docs/generators/android.md @@ -5,21 +5,132 @@ sidebar_label: android | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| -|modelPackage|package for generated models| |null| -|apiPackage|package for generated api classes| |null| -|invokerPackage|root package for generated code| |null| -|groupId|groupId for use in the generated build.gradle and pom.xml| |null| -|artifactId|artifactId for use in the generated build.gradle and pom.xml| |null| -|artifactVersion|artifact version for use in the generated build.gradle and pom.xml| |null| -|sourceFolder|source folder for generated code| |null| -|useAndroidMavenGradlePlugin|A flag to toggle android-maven gradle plugin.| |true| +|androidBuildToolsVersion|buildToolsVersion version for use in the generated build.gradle| |null| |androidGradleVersion|gradleVersion version for use in the generated build.gradle| |null| |androidSdkVersion|compileSdkVersion version for use in the generated build.gradle| |null| -|androidBuildToolsVersion|buildToolsVersion version for use in the generated build.gradle| |null| -|serializableModel|boolean - toggle "implements Serializable" for generated models| |false| +|apiPackage|package for generated api classes| |null| +|artifactId|artifactId for use in the generated build.gradle and pom.xml| |null| +|artifactVersion|artifact version for use in the generated build.gradle and pom.xml| |null| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|groupId|groupId for use in the generated build.gradle and pom.xml| |null| +|invokerPackage|root package for generated code| |null| |library|library template (sub-template) to use|
**volley**
HTTP client: Volley 1.0.19 (default)
**httpclient**
HTTP client: Apache HttpClient 4.3.6. JSON processing: Gson 2.3.1. IMPORTANT: Android client using HttpClient is not actively maintained and will be depecreated in the next major release.
|null| +|modelPackage|package for generated models| |null| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|serializableModel|boolean - toggle "implements Serializable" for generated models| |false| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| +|sourceFolder|source folder for generated code| |null| +|useAndroidMavenGradlePlugin|A flag to toggle android-maven gradle plugin.| |true| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | +|Array|java.util.List| +|ArrayList|java.util.ArrayList| +|BigDecimal|java.math.BigDecimal| +|Date|java.util.Date| +|DateTime|org.joda.time.*| +|File|java.io.File| +|HashMap|java.util.HashMap| +|List|java.util.*| +|LocalDate|org.joda.time.*| +|LocalDateTime|org.joda.time.*| +|LocalTime|org.joda.time.*| +|Map|java.util.Map| +|Set|java.util.*| +|Timestamp|java.sql.Timestamp| +|URI|java.net.URI| +|UUID|java.util.UUID| + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | +|array|ArrayList| +|map|HashMap| + + +## LANGUAGE PRIMITIVES + + + +## RESERVED WORDS + + diff --git a/docs/generators/apache2.md b/docs/generators/apache2.md index bb7e852bfd..80dbcb60ff 100644 --- a/docs/generators/apache2.md +++ b/docs/generators/apache2.md @@ -5,9 +5,45 @@ sidebar_label: apache2 | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| |userInfoPath|Path to the user and group files| |null| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | +|Array|java.util.List| +|ArrayList|java.util.ArrayList| +|BigDecimal|java.math.BigDecimal| +|Date|java.util.Date| +|DateTime|org.joda.time.*| +|File|java.io.File| +|HashMap|java.util.HashMap| +|List|java.util.*| +|LocalDate|org.joda.time.*| +|LocalDateTime|org.joda.time.*| +|LocalTime|org.joda.time.*| +|Map|java.util.Map| +|Set|java.util.*| +|Timestamp|java.sql.Timestamp| +|URI|java.net.URI| +|UUID|java.util.UUID| + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | + + +## LANGUAGE PRIMITIVES + + + +## RESERVED WORDS + + diff --git a/docs/generators/apex.md b/docs/generators/apex.md index bf9606d33a..d80fb0f3fe 100644 --- a/docs/generators/apex.md +++ b/docs/generators/apex.md @@ -5,12 +5,182 @@ sidebar_label: apex | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| -|classPrefix|Prefix for generated classes. Set this to avoid overwriting existing classes in your org.| |null| |apiVersion|The Metadata API version number to use for components in this package.| |null| |buildMethod|The build method for this package.| |null| +|classPrefix|Prefix for generated classes. Set this to avoid overwriting existing classes in your org.| |null| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |namedCredential|The named credential name for the HTTP callouts| |null| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | +|array|List| +|map|Map| + + +## LANGUAGE PRIMITIVES + + + +## RESERVED WORDS + + diff --git a/docs/generators/asciidoc.md b/docs/generators/asciidoc.md index d69dbacdb7..9243aaface 100644 --- a/docs/generators/asciidoc.md +++ b/docs/generators/asciidoc.md @@ -5,21 +5,41 @@ sidebar_label: asciidoc | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| -|appName|short name of the application| |null| |appDescription|description of the application| |null| -|infoUrl|a URL where users can get more information about the application| |null| -|infoEmail|an email address to contact for inquiries about the application| |null| -|licenseInfo|a short description of the license| |null| -|licenseUrl|a URL pointing to the full license| |null| -|invokerPackage|root package for generated code| |null| -|groupId|groupId in generated pom.xml| |null| +|appName|short name of the application| |null| |artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |null| |artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |null| -|snippetDir|path with includable markup snippets (e.g. test output generated by restdoc, default: .)| |.| -|specDir|path with includable markup spec files (e.g. handwritten additional docs, default: ..)| |..| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|groupId|groupId in generated pom.xml| |null| |headerAttributes|generation of asciidoc header meta data attributes (set to false to suppress, default: true)| |true| +|infoEmail|an email address to contact for inquiries about the application| |null| +|infoUrl|a URL where users can get more information about the application| |null| +|invokerPackage|root package for generated code| |null| +|licenseInfo|a short description of the license| |null| +|licenseUrl|a URL pointing to the full license| |null| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|snippetDir|path with includable markup snippets (e.g. test output generated by restdoc, default: .)| |.| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| +|specDir|path with includable markup spec files (e.g. handwritten additional docs, default: ..)| |..| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | + + +## LANGUAGE PRIMITIVES + + + +## RESERVED WORDS + + diff --git a/docs/generators/aspnetcore.md b/docs/generators/aspnetcore.md index 761ba0f0c4..eda0e8a9f2 100644 --- a/docs/generators/aspnetcore.md +++ b/docs/generators/aspnetcore.md @@ -5,32 +5,187 @@ sidebar_label: aspnetcore | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|licenseUrl|The URL of the license| |http://localhost| -|licenseName|The name of the license| |NoLicense| -|packageCopyright|Specifies an AssemblyCopyright for the .NET Framework global assembly attributes stored in the AssemblyInfo file.| |No Copyright| -|packageAuthors|Specifies Authors property in the .NET Core project file.| |OpenAPI| -|packageTitle|Specifies an AssemblyTitle for the .NET Framework global assembly attributes stored in the AssemblyInfo file.| |OpenAPI Library| -|packageName|C# package name (convention: Title.Case).| |Org.OpenAPITools| -|packageVersion|C# package version.| |1.0.0| -|packageGuid|The GUID that will be associated with the C# project| |null| -|sourceFolder|source folder for generated code| |src| -|compatibilityVersion|ASP.Net Core CompatibilityVersion| |Version_2_2| |aspnetCoreVersion|ASP.NET Core version: 3.0 (preview4 only), 2.2, 2.1, 2.0 (deprecated)| |2.2| -|swashbuckleVersion|Swashbucke version: 3.0.0, 4.0.0| |3.0.0| -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|useDateTimeOffset|Use DateTimeOffset to model date-time properties| |false| -|useCollection|Deserialize array types to Collection<T> instead of List<T>.| |false| -|returnICollection|Return ICollection<T> instead of the concrete type.| |false| -|useSwashbuckle|Uses the Swashbuckle.AspNetCore NuGet package for documentation.| |true| +|buildTarget|Target to build an application or library| |program| +|classModifier|Class Modifier can be empty, abstract| || +|compatibilityVersion|ASP.Net Core CompatibilityVersion| |Version_2_2| +|enumNameSuffix|Suffix that will be appended to all enum names.| |Enum| +|enumValueSuffix|Suffix that will be appended to all enum values.| |Enum| +|generateBody|Generates method body.| |true| |isLibrary|Is the build a library| |false| +|licenseName|The name of the license| |NoLicense| +|licenseUrl|The URL of the license| |http://localhost| +|modelClassModifier|Model Class Modifier can be nothing or partial| |partial| +|newtonsoftVersion|Version for Microsoft.AspNetCore.Mvc.NewtonsoftJson for ASP.NET Core 3.0+| |3.0.0-preview5-19227-01| +|operationIsAsync|Set methods to async or sync (default).| |false| +|operationModifier|Operation Modifier can be virtual, abstract or partial| |virtual| +|operationResultTask|Set methods result to Task<>.| |false| +|packageAuthors|Specifies Authors property in the .NET Core project file.| |OpenAPI| +|packageCopyright|Specifies an AssemblyCopyright for the .NET Framework global assembly attributes stored in the AssemblyInfo file.| |No Copyright| +|packageGuid|The GUID that will be associated with the C# project| |null| +|packageName|C# package name (convention: Title.Case).| |Org.OpenAPITools| +|packageTitle|Specifies an AssemblyTitle for the .NET Framework global assembly attributes stored in the AssemblyInfo file.| |OpenAPI Library| +|packageVersion|C# package version.| |1.0.0| +|returnICollection|Return ICollection<T> instead of the concrete type.| |false| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| +|sourceFolder|source folder for generated code| |src| +|swashbuckleVersion|Swashbucke version: 3.0.0, 4.0.0| |3.0.0| +|useCollection|Deserialize array types to Collection<T> instead of List<T>.| |false| +|useDateTimeOffset|Use DateTimeOffset to model date-time properties| |false| +|useDefaultRouting|Use default routing for the ASP.NET Core version. For 3.0 turn off default because it is not yet supported.| |true| |useFrameworkReference|Use frameworkReference for ASP.NET Core 3.0+ and PackageReference ASP.NET Core 2.2 or earlier.| |false| |useNewtonsoft|Uses the Newtonsoft JSON library.| |true| -|newtonsoftVersion|Version for Microsoft.AspNetCore.Mvc.NewtonsoftJson for ASP.NET Core 3.0+| |3.0.0-preview5-19227-01| -|useDefaultRouting|Use default routing for the ASP.NET Core version. For 3.0 turn off default because it is not yet supported.| |true| -|classModifier|Class Modifier can be empty, abstract| || -|operationModifier|Operation Modifier can be virtual, abstract or partial| |virtual| -|buildTarget|Target to build an application or library| |program| -|generateBody|Generates method body.| |true| -|operationIsAsync|Set methods to async or sync (default).| |false| -|operationResultTask|Set methods result to Task<>.| |false| -|modelClassModifier|Model Class Modifier can be nothing or partial| |partial| +|useSwashbuckle|Uses the Swashbuckle.AspNetCore NuGet package for documentation.| |true| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | +|array|List| +|list|List| +|map|Dictionary| + + +## LANGUAGE PRIMITIVES + + + +## RESERVED WORDS + + diff --git a/docs/generators/avro-schema.md b/docs/generators/avro-schema.md index 97e3c9ec50..45256f4895 100644 --- a/docs/generators/avro-schema.md +++ b/docs/generators/avro-schema.md @@ -5,9 +5,46 @@ sidebar_label: avro-schema | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |packageName|package for generated classes (where supported)| |null| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | +|array|Array| +|list|Array| +|map|Object| + + +## LANGUAGE PRIMITIVES + + + +## RESERVED WORDS + + diff --git a/docs/generators/bash.md b/docs/generators/bash.md index d35e805585..c56cbd4047 100644 --- a/docs/generators/bash.md +++ b/docs/generators/bash.md @@ -5,16 +5,75 @@ sidebar_label: bash | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|apiKeyAuthEnvironmentVariable|Name of environment variable where API key can be defined (e.g. PETSTORE_APIKEY='kjhasdGASDa5asdASD')| |false| +|basicAuthEnvironmentVariable|Name of environment variable where username and password can be defined (e.g. PETSTORE_CREDS='username:password')| |null| |curlOptions|Default cURL options| |null| -|processMarkdown|Convert all Markdown Markup into terminal formatting| |false| -|scriptName|The name of the script that will be generated (e.g. petstore-cli)| |null| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |generateBashCompletion|Whether to generate the Bash completion script| |false| |generateZshCompletion|Whether to generate the Zsh completion script| |false| |hostEnvironmentVariable|Name of environment variable where host can be defined (e.g. PETSTORE_HOST='http://api.openapitools.org:8080')| |null| -|basicAuthEnvironmentVariable|Name of environment variable where username and password can be defined (e.g. PETSTORE_CREDS='username:password')| |null| -|apiKeyAuthEnvironmentVariable|Name of environment variable where API key can be defined (e.g. PETSTORE_APIKEY='kjhasdGASDa5asdASD')| |false| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|processMarkdown|Convert all Markdown Markup into terminal formatting| |false| +|scriptName|The name of the script that will be generated (e.g. petstore-cli)| |null| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | +|Array|java.util.List| +|ArrayList|java.util.ArrayList| +|BigDecimal|java.math.BigDecimal| +|Date|java.util.Date| +|DateTime|org.joda.time.*| +|File|java.io.File| +|HashMap|java.util.HashMap| +|List|java.util.*| +|LocalDate|org.joda.time.*| +|LocalDateTime|org.joda.time.*| +|LocalTime|org.joda.time.*| +|Map|java.util.Map| +|Set|java.util.*| +|Timestamp|java.sql.Timestamp| +|URI|java.net.URI| +|UUID|java.util.UUID| + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | + + +## LANGUAGE PRIMITIVES + + + +## RESERVED WORDS + + diff --git a/docs/generators/c.md b/docs/generators/c.md index b60a7fbd49..400db5b79a 100644 --- a/docs/generators/c.md +++ b/docs/generators/c.md @@ -5,9 +5,84 @@ sidebar_label: c | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | + + +## LANGUAGE PRIMITIVES + + + +## RESERVED WORDS + + diff --git a/docs/generators/clojure.md b/docs/generators/clojure.md index 2c49f189b2..ce49769404 100644 --- a/docs/generators/clojure.md +++ b/docs/generators/clojure.md @@ -5,15 +5,51 @@ sidebar_label: clojure | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| +|baseNamespace|the base/top namespace (Default: generated from projectName)| |null| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| -|projectName|name of the project (Default: generated from info.title or "openapi-clj-client")| |null| |projectDescription|description of the project (Default: using info.description or "Client library of <projectName>")| |null| -|projectVersion|version of the project (Default: using info.version or "1.0.0")| |null| -|projectUrl|URL of the project (Default: using info.contact.url or not included in project.clj)| |null| |projectLicenseName|name of the license the project uses (Default: using info.license.name or not included in project.clj)| |null| |projectLicenseUrl|URL of the license the project uses (Default: using info.license.url or not included in project.clj)| |null| -|baseNamespace|the base/top namespace (Default: generated from projectName)| |null| +|projectName|name of the project (Default: generated from info.title or "openapi-clj-client")| |null| +|projectUrl|URL of the project (Default: using info.contact.url or not included in project.clj)| |null| +|projectVersion|version of the project (Default: using info.version or "1.0.0")| |null| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | +|Array|java.util.List| +|ArrayList|java.util.ArrayList| +|BigDecimal|java.math.BigDecimal| +|Date|java.util.Date| +|DateTime|org.joda.time.*| +|File|java.io.File| +|HashMap|java.util.HashMap| +|List|java.util.*| +|LocalDate|org.joda.time.*| +|LocalDateTime|org.joda.time.*| +|LocalTime|org.joda.time.*| +|Map|java.util.Map| +|Set|java.util.*| +|Timestamp|java.sql.Timestamp| +|URI|java.net.URI| +|UUID|java.util.UUID| + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | + + +## LANGUAGE PRIMITIVES + + + +## RESERVED WORDS + + diff --git a/docs/generators/cpp-pistache-server.md b/docs/generators/cpp-pistache-server.md index b925ffc175..fde4459144 100644 --- a/docs/generators/cpp-pistache-server.md +++ b/docs/generators/cpp-pistache-server.md @@ -8,3 +8,35 @@ sidebar_label: cpp-pistache-server |addExternalLibs|Add the Possibility to fetch and compile external Libraries needed by this Framework.| |true| |helpersPackage|Specify the package name to be used for the helpers (e.g. org.openapitools.server.helpers).| |org.openapitools.server.helpers| |useStructModel|Use struct-based model template instead of get/set-based model template| |false| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | +|Object|#include "Object.h"| +|std::map|#include <map>| +|std::string|#include <string>| +|std::vector|#include <vector>| + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | + + +## LANGUAGE PRIMITIVES + + + +## RESERVED WORDS + + diff --git a/docs/generators/cpp-qt5-client.md b/docs/generators/cpp-qt5-client.md index 582f762740..5a5ec0f789 100644 --- a/docs/generators/cpp-qt5-client.md +++ b/docs/generators/cpp-qt5-client.md @@ -5,11 +5,128 @@ sidebar_label: cpp-qt5-client | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| |cppNamespace|C++ namespace (convention: name::space::for::api).| |OpenAPI| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |modelNamePrefix|Prefix that will be prepended to all model names.| |OAI| |optionalProjectFile|Generate client.pri.| |true| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | +|OAIHttpFileElement|#include "OAIHttpFileElement.h"| + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | + + +## LANGUAGE PRIMITIVES + + + +## RESERVED WORDS + + diff --git a/docs/generators/cpp-qt5-qhttpengine-server.md b/docs/generators/cpp-qt5-qhttpengine-server.md index 2531287fac..fd32082fad 100644 --- a/docs/generators/cpp-qt5-qhttpengine-server.md +++ b/docs/generators/cpp-qt5-qhttpengine-server.md @@ -5,10 +5,127 @@ sidebar_label: cpp-qt5-qhttpengine-server | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| |cppNamespace|C++ namespace (convention: name::space::for::api).| |OpenAPI| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |modelNamePrefix|Prefix that will be prepended to all model names.| |OAI| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | +|OAIHttpFileElement|#include "OAIHttpFileElement.h"| + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | + + +## LANGUAGE PRIMITIVES + + + +## RESERVED WORDS + + diff --git a/docs/generators/cpp-restbed-server.md b/docs/generators/cpp-restbed-server.md index 1dde370533..4c59be6e67 100644 --- a/docs/generators/cpp-restbed-server.md +++ b/docs/generators/cpp-restbed-server.md @@ -5,8 +5,128 @@ sidebar_label: cpp-restbed-server | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|modelPackage|C++ namespace for models (convention: name.space.model).| |org.openapitools.server.model| |apiPackage|C++ namespace for apis (convention: name.space.api).| |org.openapitools.server.api| -|packageVersion|C++ package version.| |1.0.0| |declspec|C++ preprocessor to place before the class name for handling dllexport/dllimport.| || |defaultInclude|The default include statement that should be placed in all headers for including things like the declspec (convention: #include "Commons.h" | || +|modelPackage|C++ namespace for models (convention: name.space.model).| |org.openapitools.server.model| +|packageVersion|C++ package version.| |1.0.0| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | +|Object|#include "Object.h"| +|restbed::Bytes|#include <corvusoft/restbed/byte.hpp>| +|std::map|#include <map>| +|std::string|#include <string>| +|std::vector|#include <vector>| + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | + + +## LANGUAGE PRIMITIVES + + + +## RESERVED WORDS + + diff --git a/docs/generators/cpp-restsdk.md b/docs/generators/cpp-restsdk.md index 0518392adf..6bf209af79 100644 --- a/docs/generators/cpp-restsdk.md +++ b/docs/generators/cpp-restsdk.md @@ -5,9 +5,131 @@ sidebar_label: cpp-restsdk | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|modelPackage|C++ namespace for models (convention: name.space.model).| |org.openapitools.client.model| |apiPackage|C++ namespace for apis (convention: name.space.api).| |org.openapitools.client.api| -|packageVersion|C++ package version.| |1.0.0| |declspec|C++ preprocessor to place before the class name for handling dllexport/dllimport.| || |defaultInclude|The default include statement that should be placed in all headers for including things like the declspec (convention: #include "Commons.h" | || |generateGMocksForApis|Generate Google Mock classes for APIs.| |null| +|modelPackage|C++ namespace for models (convention: name.space.model).| |org.openapitools.client.model| +|packageVersion|C++ package version.| |1.0.0| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | +|HttpContent|#include "HttpContent.h"| +|Object|#include "Object.h"| +|std::map|#include <map>| +|std::string|#include <string>| +|std::vector|#include <vector>| +|utility::datetime|#include <cpprest/details/basic_types.h>| +|utility::string_t|#include <cpprest/details/basic_types.h>| + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | + + +## LANGUAGE PRIMITIVES + + + +## RESERVED WORDS + + diff --git a/docs/generators/cpp-tizen.md b/docs/generators/cpp-tizen.md index babc5bd014..4cabf3db44 100644 --- a/docs/generators/cpp-tizen.md +++ b/docs/generators/cpp-tizen.md @@ -5,8 +5,126 @@ sidebar_label: cpp-tizen | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | + + +## LANGUAGE PRIMITIVES + + + +## RESERVED WORDS + + diff --git a/docs/generators/csharp-dotnet2.md b/docs/generators/csharp-dotnet2.md index b4d4ffccf9..adf5841d42 100644 --- a/docs/generators/csharp-dotnet2.md +++ b/docs/generators/csharp-dotnet2.md @@ -5,6 +5,154 @@ sidebar_label: csharp-dotnet2 | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | +|clientPackage|C# client package name (convention: Camel.Case).| |Org.OpenAPITools.Client| |packageName|C# package name (convention: Camel.Case).| |Org.OpenAPITools| |packageVersion|C# package version.| |1.0.0| -|clientPackage|C# client package name (convention: Camel.Case).| |Org.OpenAPITools.Client| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | +|array|List| +|list|List| +|map|Dictionary| + + +## LANGUAGE PRIMITIVES + + + +## RESERVED WORDS + + diff --git a/docs/generators/csharp-nancyfx.md b/docs/generators/csharp-nancyfx.md index b436a6b4b2..48913347f5 100644 --- a/docs/generators/csharp-nancyfx.md +++ b/docs/generators/csharp-nancyfx.md @@ -5,17 +5,80 @@ sidebar_label: csharp-nancyfx | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | +|asyncServer|Set to true to enable the generation of async routes/endpoints.| |false| +|immutable|Enabled by default. If disabled generates model classes with setters| |true| +|interfacePrefix|Prefix interfaces with a community standard or widely accepted prefix.| || +|optionalProjectFile|Generate {PackageName}.csproj.| |true| +|packageContext|Optionally overrides the PackageContext which determines the namespace (namespace=packageName.packageContext). If not set, packageContext will default to basePath.| |null| +|packageGuid|The GUID that will be associated with the C# project| |null| |packageName|C# package name (convention: Title.Case).| |Org.OpenAPITools| |packageVersion|C# package version.| |1.0.0| -|sourceFolder|source folder for generated code| |src| -|interfacePrefix|Prefix interfaces with a community standard or widely accepted prefix.| || -|packageGuid|The GUID that will be associated with the C# project| |null| -|packageContext|Optionally overrides the PackageContext which determines the namespace (namespace=packageName.packageContext). If not set, packageContext will default to basePath.| |null| -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|optionalProjectFile|Generate {PackageName}.csproj.| |true| -|useDateTimeOffset|Use DateTimeOffset to model date-time properties| |false| -|useCollection|Deserialize array types to Collection<T> instead of List<T>.| |false| |returnICollection|Return ICollection<T> instead of the concrete type.| |false| -|immutable|Enabled by default. If disabled generates model classes with setters| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| +|sourceFolder|source folder for generated code| |src| +|useCollection|Deserialize array types to Collection<T> instead of List<T>.| |false| +|useDateTimeOffset|Use DateTimeOffset to model date-time properties| |false| |writeModulePath|Enabled by default. If disabled, module paths will not mirror api base path| |true| -|asyncServer|Set to true to enable the generation of async routes/endpoints.| |false| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | +|array|List| +|list|List| +|map|Dictionary| + + +## LANGUAGE PRIMITIVES + + + +## RESERVED WORDS + + diff --git a/docs/generators/csharp-netcore.md b/docs/generators/csharp-netcore.md index 346932bc6e..fb09d3a1ff 100644 --- a/docs/generators/csharp-netcore.md +++ b/docs/generators/csharp-netcore.md @@ -5,24 +5,172 @@ sidebar_label: csharp-netcore | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|packageName|C# package name (convention: Title.Case).| |Org.OpenAPITools| -|packageVersion|C# package version.| |1.0.0| -|sourceFolder|source folder for generated code| |src| -|packageGuid|The GUID that will be associated with the C# project| |null| -|interfacePrefix|Prefix interfaces with a community standard or widely accepted prefix.| |I| -|targetFramework|The target .NET framework version.|
**netstandard1.3**
.NET Standard 1.3 compatible
**netstandard1.4**
.NET Standard 1.4 compatible
**netstandard1.5**
.NET Standard 1.5 compatible
**netstandard1.6**
.NET Standard 1.6 compatible
**netstandard2.0**
.NET Standard 2.0 compatible
**netcoreapp2.0**
.NET Core 2.0 compatible
|netstandard2.0| -|modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name| |PascalCase| +|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| +|caseInsensitiveResponseHeaders|Make API response's headers case-insensitive| |false| |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true| -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|useDateTimeOffset|Use DateTimeOffset to model date-time properties| |false| -|useCollection|Deserialize array types to Collection<T> instead of List<T>.| |false| -|returnICollection|Return ICollection<T> instead of the concrete type.| |false| -|optionalMethodArgument|C# Optional method argument, e.g. void square(int x=10) (.net 4.0+ only).| |true| +|interfacePrefix|Prefix interfaces with a community standard or widely accepted prefix.| |I| +|modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name| |PascalCase| +|netCoreProjectFile|Use the new format (.NET Core) for .NET project files (.csproj).| |false| +|nonPublicApi|Generates code with reduced access modifiers; allows embedding elsewhere without exposing non-public API calls to consumers.| |false| |optionalAssemblyInfo|Generate AssemblyInfo.cs.| |true| |optionalEmitDefaultValues|Set DataMember's EmitDefaultValue.| |false| +|optionalMethodArgument|C# Optional method argument, e.g. void square(int x=10) (.net 4.0+ only).| |true| |optionalProjectFile|Generate {PackageName}.csproj.| |true| -|nonPublicApi|Generates code with reduced access modifiers; allows embedding elsewhere without exposing non-public API calls to consumers.| |false| -|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|netCoreProjectFile|Use the new format (.NET Core) for .NET project files (.csproj).| |false| +|packageGuid|The GUID that will be associated with the C# project| |null| +|packageName|C# package name (convention: Title.Case).| |Org.OpenAPITools| +|packageVersion|C# package version.| |1.0.0| +|returnICollection|Return ICollection<T> instead of the concrete type.| |false| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| +|sourceFolder|source folder for generated code| |src| +|targetFramework|The target .NET framework version.|
**netstandard1.3**
.NET Standard 1.3 compatible
**netstandard1.4**
.NET Standard 1.4 compatible
**netstandard1.5**
.NET Standard 1.5 compatible
**netstandard1.6**
.NET Standard 1.6 compatible
**netstandard2.0**
.NET Standard 2.0 compatible
**netcoreapp2.0**
.NET Core 2.0 compatible
|netstandard2.0| +|useCollection|Deserialize array types to Collection<T> instead of List<T>.| |false| +|useDateTimeOffset|Use DateTimeOffset to model date-time properties| |false| |validatable|Generates self-validatable models.| |true| -|caseInsensitiveResponseHeaders|Make API response's headers case-insensitive| |false| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | +|array|List| +|list|List| +|map|Dictionary| + + +## LANGUAGE PRIMITIVES + +
  • Boolean
  • +
  • Collection
  • +
  • DateTime
  • +
  • DateTime?
  • +
  • DateTimeOffset
  • +
  • DateTimeOffset?
  • +
  • Dictionary
  • +
  • Double
  • +
  • Float
  • +
  • Guid
  • +
  • Guid?
  • +
  • ICollection
  • +
  • Int32
  • +
  • Int64
  • +
  • List
  • +
  • Object
  • +
  • String
  • +
  • System.IO.Stream
  • +
  • bool
  • +
  • bool?
  • +
  • byte[]
  • +
  • decimal
  • +
  • decimal?
  • +
  • double
  • +
  • double?
  • +
  • float
  • +
  • float?
  • +
  • int
  • +
  • int?
  • +
  • long
  • +
  • long?
  • +
  • string
  • +
+ +## RESERVED WORDS + +
  • Client
  • +
  • abstract
  • +
  • as
  • +
  • base
  • +
  • bool
  • +
  • break
  • +
  • byte
  • +
  • case
  • +
  • catch
  • +
  • char
  • +
  • checked
  • +
  • class
  • +
  • client
  • +
  • const
  • +
  • continue
  • +
  • decimal
  • +
  • default
  • +
  • delegate
  • +
  • do
  • +
  • double
  • +
  • else
  • +
  • enum
  • +
  • event
  • +
  • explicit
  • +
  • extern
  • +
  • false
  • +
  • finally
  • +
  • fixed
  • +
  • float
  • +
  • for
  • +
  • foreach
  • +
  • goto
  • +
  • if
  • +
  • implicit
  • +
  • in
  • +
  • int
  • +
  • interface
  • +
  • internal
  • +
  • is
  • +
  • localVarFileParams
  • +
  • localVarFormParams
  • +
  • localVarHeaderParams
  • +
  • localVarHttpContentType
  • +
  • localVarHttpContentTypes
  • +
  • localVarHttpHeaderAccept
  • +
  • localVarHttpHeaderAccepts
  • +
  • localVarPath
  • +
  • localVarPathParams
  • +
  • localVarPostBody
  • +
  • localVarQueryParams
  • +
  • localVarResponse
  • +
  • localVarStatusCode
  • +
  • lock
  • +
  • long
  • +
  • namespace
  • +
  • new
  • +
  • null
  • +
  • object
  • +
  • operator
  • +
  • out
  • +
  • override
  • +
  • parameter
  • +
  • params
  • +
  • private
  • +
  • protected
  • +
  • public
  • +
  • readonly
  • +
  • ref
  • +
  • return
  • +
  • sbyte
  • +
  • sealed
  • +
  • short
  • +
  • sizeof
  • +
  • stackalloc
  • +
  • static
  • +
  • string
  • +
  • struct
  • +
  • switch
  • +
  • this
  • +
  • throw
  • +
  • true
  • +
  • try
  • +
  • typeof
  • +
  • uint
  • +
  • ulong
  • +
  • unchecked
  • +
  • unsafe
  • +
  • ushort
  • +
  • using
  • +
  • virtual
  • +
  • void
  • +
  • volatile
  • +
  • while
  • +
diff --git a/docs/generators/csharp-refactor.md b/docs/generators/csharp-refactor.md deleted file mode 100644 index d9f5714900..0000000000 --- a/docs/generators/csharp-refactor.md +++ /dev/null @@ -1,29 +0,0 @@ - ---- -id: generator-opts-client-csharp-refactor -title: Config Options for csharp-refactor -sidebar_label: csharp-refactor ---- - -| Option | Description | Values | Default | -| ------ | ----------- | ------ | ------- | -|packageName|C# package name (convention: Title.Case).| |Org.OpenAPITools| -|packageVersion|C# package version.| |1.0.0| -|sourceFolder|source folder for generated code| |src| -|packageGuid|The GUID that will be associated with the C# project| |null| -|interfacePrefix|Prefix interfaces with a community standard or widely accepted prefix.| |I| -|targetFramework|The target .NET framework version.|
**netstandard1.3**
.NET Standard 1.3 compatible
**netstandard1.4**
.NET Standard 1.4 compatible
**netstandard1.5**
.NET Standard 1.5 compatible
**netstandard1.6**
.NET Standard 1.6 compatible
**netstandard2.0**
.NET Standard 2.0 compatible
**netcoreapp2.0**
.NET Core 2.0 compatible
|v4.6.1| -|modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name| |PascalCase| -|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true| -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|useDateTimeOffset|Use DateTimeOffset to model date-time properties| |false| -|useCollection|Deserialize array types to Collection<T> instead of List<T>.| |false| -|returnICollection|Return ICollection<T> instead of the concrete type.| |false| -|optionalMethodArgument|C# Optional method argument, e.g. void square(int x=10) (.net 4.0+ only).| |true| -|optionalAssemblyInfo|Generate AssemblyInfo.cs.| |true| -|optionalProjectFile|Generate {PackageName}.csproj.| |true| -|optionalEmitDefaultValues|Set DataMember's EmitDefaultValue.| |false| -|nonPublicApi|Generates code with reduced access modifiers; allows embedding elsewhere without exposing non-public API calls to consumers.| |false| -|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|netCoreProjectFile|Use the new format (.NET Core) for .NET project files (.csproj).| |false| -|validatable|Generates self-validatable models.| |true| diff --git a/docs/generators/csharp.md b/docs/generators/csharp.md index 802eaae3ee..4ec890a4e8 100644 --- a/docs/generators/csharp.md +++ b/docs/generators/csharp.md @@ -5,26 +5,174 @@ sidebar_label: csharp | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|packageName|C# package name (convention: Title.Case).| |Org.OpenAPITools| -|packageVersion|C# package version.| |1.0.0| -|sourceFolder|source folder for generated code| |src| -|packageGuid|The GUID that will be associated with the C# project| |null| -|interfacePrefix|Prefix interfaces with a community standard or widely accepted prefix.| |I| -|targetFramework|The target .NET framework version.|
**v3.5**
.NET Framework 3.5 compatible
**v4.0**
.NET Framework 4.0 compatible
**v4.5**
.NET Framework 4.5+ compatible
**v5.0**
.NET Standard 1.3 compatible (DEPRECATED. Please use `csharp-netcore` generator instead)
**uwp**
Universal Windows Platform (DEPRECATED. Please use `csharp-netcore` generator instead)
|v4.5| -|modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name| |PascalCase| +|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| +|caseInsensitiveResponseHeaders|Make API response's headers case-insensitive| |false| +|generatePropertyChanged|Specifies a AssemblyDescription for the .NET Framework global assembly attributes stored in the AssemblyInfo file.| |false| |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true| -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|useDateTimeOffset|Use DateTimeOffset to model date-time properties| |false| -|useCollection|Deserialize array types to Collection<T> instead of List<T>.| |false| -|returnICollection|Return ICollection<T> instead of the concrete type.| |false| -|optionalMethodArgument|C# Optional method argument, e.g. void square(int x=10) (.net 4.0+ only).| |true| +|interfacePrefix|Prefix interfaces with a community standard or widely accepted prefix.| |I| +|modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name| |PascalCase| +|netCoreProjectFile|Use the new format (.NET Core) for .NET project files (.csproj).| |false| +|nonPublicApi|Generates code with reduced access modifiers; allows embedding elsewhere without exposing non-public API calls to consumers.| |false| |optionalAssemblyInfo|Generate AssemblyInfo.cs.| |true| |optionalEmitDefaultValues|Set DataMember's EmitDefaultValue.| |false| +|optionalMethodArgument|C# Optional method argument, e.g. void square(int x=10) (.net 4.0+ only).| |true| |optionalProjectFile|Generate {PackageName}.csproj.| |true| -|generatePropertyChanged|Specifies a AssemblyDescription for the .NET Framework global assembly attributes stored in the AssemblyInfo file.| |false| -|nonPublicApi|Generates code with reduced access modifiers; allows embedding elsewhere without exposing non-public API calls to consumers.| |false| -|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|netCoreProjectFile|Use the new format (.NET Core) for .NET project files (.csproj).| |false| -|validatable|Generates self-validatable models.| |true| +|packageGuid|The GUID that will be associated with the C# project| |null| +|packageName|C# package name (convention: Title.Case).| |Org.OpenAPITools| +|packageVersion|C# package version.| |1.0.0| +|returnICollection|Return ICollection<T> instead of the concrete type.| |false| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| +|sourceFolder|source folder for generated code| |src| +|targetFramework|The target .NET framework version.|
**v3.5**
.NET Framework 3.5 compatible
**v4.0**
.NET Framework 4.0 compatible
**v4.5**
.NET Framework 4.5+ compatible
**v5.0**
.NET Standard 1.3 compatible (DEPRECATED. Please use `csharp-netcore` generator instead)
**uwp**
Universal Windows Platform (DEPRECATED. Please use `csharp-netcore` generator instead)
|v4.5| +|useCollection|Deserialize array types to Collection<T> instead of List<T>.| |false| |useCompareNetObjects|Use KellermanSoftware.CompareNetObjects for deep recursive object comparison. WARNING: this option incurs potential performance impact.| |false| -|caseInsensitiveResponseHeaders|Make API response's headers case-insensitive| |false| +|useDateTimeOffset|Use DateTimeOffset to model date-time properties| |false| +|validatable|Generates self-validatable models.| |true| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | +|array|List| +|list|List| +|map|Dictionary| + + +## LANGUAGE PRIMITIVES + +
  • Boolean
  • +
  • Collection
  • +
  • DateTime
  • +
  • DateTime?
  • +
  • DateTimeOffset
  • +
  • DateTimeOffset?
  • +
  • Dictionary
  • +
  • Double
  • +
  • Float
  • +
  • Guid
  • +
  • Guid?
  • +
  • ICollection
  • +
  • Int32
  • +
  • Int64
  • +
  • List
  • +
  • Object
  • +
  • String
  • +
  • System.IO.Stream
  • +
  • bool
  • +
  • bool?
  • +
  • byte[]
  • +
  • decimal
  • +
  • decimal?
  • +
  • double
  • +
  • double?
  • +
  • float
  • +
  • float?
  • +
  • int
  • +
  • int?
  • +
  • long
  • +
  • long?
  • +
  • string
  • +
+ +## RESERVED WORDS + +
  • Client
  • +
  • abstract
  • +
  • as
  • +
  • base
  • +
  • bool
  • +
  • break
  • +
  • byte
  • +
  • case
  • +
  • catch
  • +
  • char
  • +
  • checked
  • +
  • class
  • +
  • client
  • +
  • const
  • +
  • continue
  • +
  • decimal
  • +
  • default
  • +
  • delegate
  • +
  • do
  • +
  • double
  • +
  • else
  • +
  • enum
  • +
  • event
  • +
  • explicit
  • +
  • extern
  • +
  • false
  • +
  • finally
  • +
  • fixed
  • +
  • float
  • +
  • for
  • +
  • foreach
  • +
  • goto
  • +
  • if
  • +
  • implicit
  • +
  • in
  • +
  • int
  • +
  • interface
  • +
  • internal
  • +
  • is
  • +
  • localVarFileParams
  • +
  • localVarFormParams
  • +
  • localVarHeaderParams
  • +
  • localVarHttpContentType
  • +
  • localVarHttpContentTypes
  • +
  • localVarHttpHeaderAccept
  • +
  • localVarHttpHeaderAccepts
  • +
  • localVarPath
  • +
  • localVarPathParams
  • +
  • localVarPostBody
  • +
  • localVarQueryParams
  • +
  • localVarResponse
  • +
  • localVarStatusCode
  • +
  • lock
  • +
  • long
  • +
  • namespace
  • +
  • new
  • +
  • null
  • +
  • object
  • +
  • operator
  • +
  • out
  • +
  • override
  • +
  • parameter
  • +
  • params
  • +
  • private
  • +
  • protected
  • +
  • public
  • +
  • readonly
  • +
  • ref
  • +
  • return
  • +
  • sbyte
  • +
  • sealed
  • +
  • short
  • +
  • sizeof
  • +
  • stackalloc
  • +
  • static
  • +
  • string
  • +
  • struct
  • +
  • switch
  • +
  • this
  • +
  • throw
  • +
  • true
  • +
  • try
  • +
  • typeof
  • +
  • uint
  • +
  • ulong
  • +
  • unchecked
  • +
  • unsafe
  • +
  • ushort
  • +
  • using
  • +
  • virtual
  • +
  • void
  • +
  • volatile
  • +
  • while
  • +
diff --git a/docs/generators/cwiki.md b/docs/generators/cwiki.md index 767d30b1b2..9765e1cc58 100644 --- a/docs/generators/cwiki.md +++ b/docs/generators/cwiki.md @@ -5,18 +5,38 @@ sidebar_label: cwiki | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| -|appName|short name of the application| |null| |appDescription|description of the application| |null| -|infoUrl|a URL where users can get more information about the application| |null| -|infoEmail|an email address to contact for inquiries about the application| |null| -|licenseInfo|a short description of the license| |null| -|licenseUrl|a URL pointing to the full license| |null| -|invokerPackage|root package for generated code| |null| -|groupId|groupId in generated pom.xml| |null| +|appName|short name of the application| |null| |artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |null| |artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |null| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|groupId|groupId in generated pom.xml| |null| +|infoEmail|an email address to contact for inquiries about the application| |null| +|infoUrl|a URL where users can get more information about the application| |null| +|invokerPackage|root package for generated code| |null| +|licenseInfo|a short description of the license| |null| +|licenseUrl|a URL pointing to the full license| |null| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | + + +## LANGUAGE PRIMITIVES + +
    + +## RESERVED WORDS + +
      diff --git a/docs/generators/dart-dio.md b/docs/generators/dart-dio.md index 045175c038..3445c7e165 100644 --- a/docs/generators/dart-dio.md +++ b/docs/generators/dart-dio.md @@ -5,20 +5,120 @@ sidebar_label: dart-dio | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| |browserClient|Is the client browser based (for Dart 1.x only)| |null| -|pubName|Name in generated pubspec| |null| -|pubVersion|Version in generated pubspec| |null| -|pubDescription|Description in generated pubspec| |null| +|dateLibrary|Option. Date library to use|
      **core**
      Dart core library (DateTime)
      **timemachine**
      Time Machine is date and time library for Flutter, Web, and Server with support for timezones, calendars, cultures, formatting and parsing.
      |core| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|nullableFields|Is the null fields should be in the JSON payload| |null| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| |pubAuthor|Author name in generated pubspec| |null| |pubAuthorEmail|Email address of the author in generated pubspec| |null| +|pubDescription|Description in generated pubspec| |null| |pubHomepage|Homepage in generated pubspec| |null| -|useEnumExtension|Allow the 'x-enum-values' extension for enums| |null| +|pubName|Name in generated pubspec| |null| +|pubVersion|Version in generated pubspec| |null| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| |sourceFolder|Source folder for generated code| |null| |supportDart2|Support Dart 2.x (Dart 1.x support has been deprecated)| |true| -|nullableFields|Is the null fields should be in the JSON payload| |null| -|dateLibrary|Option. Date library to use|
      **core**
      Dart core library (DateTime)
      **timemachine**
      Time Machine is date and time library for Flutter, Web, and Server with support for timezones, calendars, cultures, formatting and parsing.
      |core| +|useEnumExtension|Allow the 'x-enum-values' extension for enums| |null| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | +|BuiltList|package:built_collection/built_collection.dart| +|BuiltMap|package:built_collection/built_collection.dart| +|JsonObject|package:built_value/json_object.dart| +|Uint8List|dart:typed_data| + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | +|array|List| +|map|Map| + + +## LANGUAGE PRIMITIVES + +
      • String
      • +
      • bool
      • +
      • double
      • +
      • int
      • +
      • num
      • +
      + +## RESERVED WORDS + +
      • abstract
      • +
      • as
      • +
      • assert
      • +
      • async
      • +
      • await
      • +
      • break
      • +
      • case
      • +
      • catch
      • +
      • class
      • +
      • const
      • +
      • continue
      • +
      • covariant
      • +
      • default
      • +
      • deferred
      • +
      • do
      • +
      • dynamic
      • +
      • else
      • +
      • enum
      • +
      • export
      • +
      • extends
      • +
      • extension
      • +
      • external
      • +
      • factory
      • +
      • false
      • +
      • final
      • +
      • finally
      • +
      • for
      • +
      • function
      • +
      • get
      • +
      • hide
      • +
      • if
      • +
      • implements
      • +
      • import
      • +
      • in
      • +
      • inout
      • +
      • interface
      • +
      • is
      • +
      • late
      • +
      • library
      • +
      • mixin
      • +
      • native
      • +
      • new
      • +
      • null
      • +
      • of
      • +
      • on
      • +
      • operator
      • +
      • out
      • +
      • part
      • +
      • patch
      • +
      • required
      • +
      • rethrow
      • +
      • return
      • +
      • set
      • +
      • show
      • +
      • source
      • +
      • static
      • +
      • super
      • +
      • switch
      • +
      • sync
      • +
      • this
      • +
      • throw
      • +
      • true
      • +
      • try
      • +
      • typedef
      • +
      • var
      • +
      • void
      • +
      • while
      • +
      • with
      • +
      • yield
      • +
      diff --git a/docs/generators/dart-jaguar.md b/docs/generators/dart-jaguar.md index 5a06755bf2..78f1eac7d5 100644 --- a/docs/generators/dart-jaguar.md +++ b/docs/generators/dart-jaguar.md @@ -5,20 +5,116 @@ sidebar_label: dart-jaguar | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| |browserClient|Is the client browser based (for Dart 1.x only)| |null| -|pubName|Name in generated pubspec| |null| -|pubVersion|Version in generated pubspec| |null| -|pubDescription|Description in generated pubspec| |null| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|nullableFields|Is the null fields should be in the JSON payload| |null| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| |pubAuthor|Author name in generated pubspec| |null| |pubAuthorEmail|Email address of the author in generated pubspec| |null| +|pubDescription|Description in generated pubspec| |null| |pubHomepage|Homepage in generated pubspec| |null| -|useEnumExtension|Allow the 'x-enum-values' extension for enums| |null| +|pubName|Name in generated pubspec| |null| +|pubVersion|Version in generated pubspec| |null| +|serialization|Choose serialization format JSON or PROTO is supported| |null| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| |sourceFolder|Source folder for generated code| |null| |supportDart2|Support Dart 2.x (Dart 1.x support has been deprecated)| |true| -|nullableFields|Is the null fields should be in the JSON payload| |null| -|serialization|Choose serialization format JSON or PROTO is supported| |null| +|useEnumExtension|Allow the 'x-enum-values' extension for enums| |null| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | +|array|List| +|map|Map| + + +## LANGUAGE PRIMITIVES + +
      • String
      • +
      • bool
      • +
      • double
      • +
      • int
      • +
      • num
      • +
      + +## RESERVED WORDS + +
      • abstract
      • +
      • as
      • +
      • assert
      • +
      • async
      • +
      • await
      • +
      • break
      • +
      • case
      • +
      • catch
      • +
      • class
      • +
      • const
      • +
      • continue
      • +
      • covariant
      • +
      • default
      • +
      • deferred
      • +
      • do
      • +
      • dynamic
      • +
      • else
      • +
      • enum
      • +
      • export
      • +
      • extends
      • +
      • extension
      • +
      • external
      • +
      • factory
      • +
      • false
      • +
      • final
      • +
      • finally
      • +
      • for
      • +
      • function
      • +
      • get
      • +
      • hide
      • +
      • if
      • +
      • implements
      • +
      • import
      • +
      • in
      • +
      • inout
      • +
      • interface
      • +
      • is
      • +
      • late
      • +
      • library
      • +
      • mixin
      • +
      • native
      • +
      • new
      • +
      • null
      • +
      • of
      • +
      • on
      • +
      • operator
      • +
      • out
      • +
      • part
      • +
      • patch
      • +
      • required
      • +
      • rethrow
      • +
      • return
      • +
      • set
      • +
      • show
      • +
      • source
      • +
      • static
      • +
      • super
      • +
      • switch
      • +
      • sync
      • +
      • this
      • +
      • throw
      • +
      • true
      • +
      • try
      • +
      • typedef
      • +
      • var
      • +
      • void
      • +
      • while
      • +
      • with
      • +
      • yield
      • +
      diff --git a/docs/generators/dart.md b/docs/generators/dart.md index 12c6550b1c..8b1bd158c3 100644 --- a/docs/generators/dart.md +++ b/docs/generators/dart.md @@ -5,18 +5,114 @@ sidebar_label: dart | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| |browserClient|Is the client browser based (for Dart 1.x only)| |null| -|pubName|Name in generated pubspec| |null| -|pubVersion|Version in generated pubspec| |null| -|pubDescription|Description in generated pubspec| |null| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| |pubAuthor|Author name in generated pubspec| |null| |pubAuthorEmail|Email address of the author in generated pubspec| |null| +|pubDescription|Description in generated pubspec| |null| |pubHomepage|Homepage in generated pubspec| |null| -|useEnumExtension|Allow the 'x-enum-values' extension for enums| |null| +|pubName|Name in generated pubspec| |null| +|pubVersion|Version in generated pubspec| |null| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| |sourceFolder|Source folder for generated code| |null| |supportDart2|Support Dart 2.x (Dart 1.x support has been deprecated)| |true| +|useEnumExtension|Allow the 'x-enum-values' extension for enums| |null| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | +|array|List| +|map|Map| + + +## LANGUAGE PRIMITIVES + +
      • String
      • +
      • bool
      • +
      • double
      • +
      • int
      • +
      • num
      • +
      + +## RESERVED WORDS + +
      • abstract
      • +
      • as
      • +
      • assert
      • +
      • async
      • +
      • await
      • +
      • break
      • +
      • case
      • +
      • catch
      • +
      • class
      • +
      • const
      • +
      • continue
      • +
      • covariant
      • +
      • default
      • +
      • deferred
      • +
      • do
      • +
      • dynamic
      • +
      • else
      • +
      • enum
      • +
      • export
      • +
      • extends
      • +
      • extension
      • +
      • external
      • +
      • factory
      • +
      • false
      • +
      • final
      • +
      • finally
      • +
      • for
      • +
      • function
      • +
      • get
      • +
      • hide
      • +
      • if
      • +
      • implements
      • +
      • import
      • +
      • in
      • +
      • inout
      • +
      • interface
      • +
      • is
      • +
      • late
      • +
      • library
      • +
      • mixin
      • +
      • native
      • +
      • new
      • +
      • null
      • +
      • of
      • +
      • on
      • +
      • operator
      • +
      • out
      • +
      • part
      • +
      • patch
      • +
      • required
      • +
      • rethrow
      • +
      • return
      • +
      • set
      • +
      • show
      • +
      • source
      • +
      • static
      • +
      • super
      • +
      • switch
      • +
      • sync
      • +
      • this
      • +
      • throw
      • +
      • true
      • +
      • try
      • +
      • typedef
      • +
      • var
      • +
      • void
      • +
      • while
      • +
      • with
      • +
      • yield
      • +
      diff --git a/docs/generators/dynamic-html.md b/docs/generators/dynamic-html.md index 50752f564c..1fa63d3434 100644 --- a/docs/generators/dynamic-html.md +++ b/docs/generators/dynamic-html.md @@ -5,12 +5,34 @@ sidebar_label: dynamic-html | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| -|invokerPackage|root package for generated code| |null| -|groupId|groupId in generated pom.xml| |null| |artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |null| |artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |null| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|groupId|groupId in generated pom.xml| |null| +|invokerPackage|root package for generated code| |null| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | +|array|ArrayList| +|map|HashMap| + + +## LANGUAGE PRIMITIVES + +
        + +## RESERVED WORDS + +
          diff --git a/docs/generators/eiffel.md b/docs/generators/eiffel.md index fb6b8d9cb9..2f239b7c40 100644 --- a/docs/generators/eiffel.md +++ b/docs/generators/eiffel.md @@ -5,6 +5,116 @@ sidebar_label: eiffel | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | +|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true| |packageName|Eiffel Cluster name (convention: lowercase).| |openapi| |packageVersion|Eiffel package version.| |1.0.0| -|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | +|Array|java.util.List| +|ArrayList|java.util.ArrayList| +|BigDecimal|java.math.BigDecimal| +|Date|java.util.Date| +|DateTime|org.joda.time.*| +|File|java.io.File| +|HashMap|java.util.HashMap| +|List|java.util.*| +|LocalDate|org.joda.time.*| +|LocalDateTime|org.joda.time.*| +|LocalTime|org.joda.time.*| +|Map|java.util.Map| +|Set|java.util.*| +|Timestamp|java.sql.Timestamp| +|URI|java.net.URI| +|UUID|java.util.UUID| + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | +|array|ARRAYED_LIST| +|list|ARRAYED_LIST| +|map|STRING_TABLE| + + +## LANGUAGE PRIMITIVES + +
          • BOOLEAN
          • +
          • INTEGER_16
          • +
          • INTEGER_32
          • +
          • INTEGER_64
          • +
          • INTEGER_8
          • +
          • NATURAL_16
          • +
          • NATURAL_32
          • +
          • NATURAL_64
          • +
          • NATURAL_8
          • +
          • REAL_32
          • +
          • REAL_64
          • +
          + +## RESERVED WORDS + +
          • across
          • +
          • agent
          • +
          • alias
          • +
          • all
          • +
          • and
          • +
          • as
          • +
          • assign
          • +
          • attribute
          • +
          • check
          • +
          • class
          • +
          • convert
          • +
          • create
          • +
          • current
          • +
          • debug
          • +
          • deferred
          • +
          • do
          • +
          • else
          • +
          • elseif
          • +
          • end
          • +
          • ensure
          • +
          • expanded
          • +
          • export
          • +
          • external
          • +
          • false
          • +
          • feature
          • +
          • from
          • +
          • frozen
          • +
          • if
          • +
          • implies
          • +
          • inherit
          • +
          • inspect
          • +
          • invariant
          • +
          • like
          • +
          • local
          • +
          • loop
          • +
          • not
          • +
          • note
          • +
          • obsolete
          • +
          • old
          • +
          • once
          • +
          • only
          • +
          • or
          • +
          • precursor
          • +
          • redefine
          • +
          • rename
          • +
          • require
          • +
          • rescue
          • +
          • result
          • +
          • retry
          • +
          • select
          • +
          • separate
          • +
          • then
          • +
          • true
          • +
          • tuple
          • +
          • undefine
          • +
          • until
          • +
          • variant
          • +
          • void
          • +
          • when
          • +
          • xor
          • +
          diff --git a/docs/generators/elixir.md b/docs/generators/elixir.md index 2fb1cf776b..fae1d80bd3 100644 --- a/docs/generators/elixir.md +++ b/docs/generators/elixir.md @@ -5,11 +5,65 @@ sidebar_label: elixir | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |invokerPackage|The main namespace to use for all classes. e.g. Yay.Pets| |null| |licenseHeader|The license header to prepend to the top of all source files.| |null| |packageName|Elixir package name (convention: lowercase).| |null| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | +|Array|java.util.List| +|ArrayList|java.util.ArrayList| +|BigDecimal|java.math.BigDecimal| +|Date|java.util.Date| +|DateTime|org.joda.time.*| +|File|java.io.File| +|HashMap|java.util.HashMap| +|List|java.util.*| +|LocalDate|org.joda.time.*| +|LocalDateTime|org.joda.time.*| +|LocalTime|org.joda.time.*| +|Map|java.util.Map| +|Set|java.util.*| +|Timestamp|java.sql.Timestamp| +|URI|java.net.URI| +|UUID|java.util.UUID| + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | + + +## LANGUAGE PRIMITIVES + +
          • Atom
          • +
          • Boolean
          • +
          • DateTime
          • +
          • Float
          • +
          • Integer
          • +
          • List
          • +
          • Map
          • +
          • PID
          • +
          • String
          • +
          • Tuple
          • +
          + +## RESERVED WORDS + +
          • __CALLER__
          • +
          • __DIR__
          • +
          • __ENV__
          • +
          • __FILE__
          • +
          • __MODULE__
          • +
          • false
          • +
          • nil
          • +
          • true
          • +
          diff --git a/docs/generators/elm.md b/docs/generators/elm.md index b9df3d2422..0fefd01e78 100644 --- a/docs/generators/elm.md +++ b/docs/generators/elm.md @@ -5,3 +5,45 @@ sidebar_label: elm | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | +|array|List| +|map|Dict| + + +## LANGUAGE PRIMITIVES + +
          • Bool
          • +
          • Dict
          • +
          • Float
          • +
          • Int
          • +
          • List
          • +
          • String
          • +
          + +## RESERVED WORDS + +
          • as
          • +
          • case
          • +
          • else
          • +
          • exposing
          • +
          • if
          • +
          • import
          • +
          • in
          • +
          • let
          • +
          • module
          • +
          • of
          • +
          • port
          • +
          • then
          • +
          • type
          • +
          • where
          • +
          diff --git a/docs/generators/erlang-client.md b/docs/generators/erlang-client.md index 675e15f80f..72e4df6061 100644 --- a/docs/generators/erlang-client.md +++ b/docs/generators/erlang-client.md @@ -6,4 +6,67 @@ sidebar_label: erlang-client | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | |packageName|Erlang application name (convention: lowercase).| |openapi| -|packageName|Erlang application version| |1.0.0| +|packageVersion|Erlang application version| |1.0.0| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | +|Array|java.util.List| +|ArrayList|java.util.ArrayList| +|BigDecimal|java.math.BigDecimal| +|Date|java.util.Date| +|DateTime|org.joda.time.*| +|File|java.io.File| +|HashMap|java.util.HashMap| +|List|java.util.*| +|LocalDate|org.joda.time.*| +|LocalDateTime|org.joda.time.*| +|LocalTime|org.joda.time.*| +|Map|java.util.Map| +|Set|java.util.*| +|Timestamp|java.sql.Timestamp| +|URI|java.net.URI| +|UUID|java.util.UUID| + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | + + +## LANGUAGE PRIMITIVES + +
            + +## RESERVED WORDS + +
            • after
            • +
            • and
            • +
            • andalso
            • +
            • band
            • +
            • begin
            • +
            • bnot
            • +
            • bor
            • +
            • bsl
            • +
            • bsr
            • +
            • bxor
            • +
            • case
            • +
            • catch
            • +
            • cond
            • +
            • div
            • +
            • end
            • +
            • fun
            • +
            • if
            • +
            • let
            • +
            • not
            • +
            • of
            • +
            • or
            • +
            • orelse
            • +
            • receive
            • +
            • rem
            • +
            • try
            • +
            • when
            • +
            • xor
            • +
            diff --git a/docs/generators/erlang-proper.md b/docs/generators/erlang-proper.md index 57187fdf49..6d48712bdc 100644 --- a/docs/generators/erlang-proper.md +++ b/docs/generators/erlang-proper.md @@ -6,4 +6,67 @@ sidebar_label: erlang-proper | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | |packageName|Erlang application name (convention: lowercase).| |openapi| -|packageName|Erlang application version| |1.0.0| +|packageVersion|Erlang application version| |1.0.0| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | +|Array|java.util.List| +|ArrayList|java.util.ArrayList| +|BigDecimal|java.math.BigDecimal| +|Date|java.util.Date| +|DateTime|org.joda.time.*| +|File|java.io.File| +|HashMap|java.util.HashMap| +|List|java.util.*| +|LocalDate|org.joda.time.*| +|LocalDateTime|org.joda.time.*| +|LocalTime|org.joda.time.*| +|Map|java.util.Map| +|Set|java.util.*| +|Timestamp|java.sql.Timestamp| +|URI|java.net.URI| +|UUID|java.util.UUID| + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | + + +## LANGUAGE PRIMITIVES + +
              + +## RESERVED WORDS + +
              • after
              • +
              • and
              • +
              • andalso
              • +
              • band
              • +
              • begin
              • +
              • bnot
              • +
              • bor
              • +
              • bsl
              • +
              • bsr
              • +
              • bxor
              • +
              • case
              • +
              • catch
              • +
              • cond
              • +
              • div
              • +
              • end
              • +
              • fun
              • +
              • if
              • +
              • let
              • +
              • not
              • +
              • of
              • +
              • or
              • +
              • orelse
              • +
              • receive
              • +
              • rem
              • +
              • try
              • +
              • when
              • +
              • xor
              • +
              diff --git a/docs/generators/erlang-server.md b/docs/generators/erlang-server.md index 8e109cd37d..8db2184f0d 100644 --- a/docs/generators/erlang-server.md +++ b/docs/generators/erlang-server.md @@ -5,5 +5,68 @@ sidebar_label: erlang-server | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|packageName|Erlang package name (convention: lowercase).| |openapi| |openAPISpecName|Openapi Spec Name.| |openapi| +|packageName|Erlang package name (convention: lowercase).| |openapi| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | +|Array|java.util.List| +|ArrayList|java.util.ArrayList| +|BigDecimal|java.math.BigDecimal| +|Date|java.util.Date| +|DateTime|org.joda.time.*| +|File|java.io.File| +|HashMap|java.util.HashMap| +|List|java.util.*| +|LocalDate|org.joda.time.*| +|LocalDateTime|org.joda.time.*| +|LocalTime|org.joda.time.*| +|Map|java.util.Map| +|Set|java.util.*| +|Timestamp|java.sql.Timestamp| +|URI|java.net.URI| +|UUID|java.util.UUID| + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | + + +## LANGUAGE PRIMITIVES + +
                + +## RESERVED WORDS + +
                • after
                • +
                • and
                • +
                • andalso
                • +
                • band
                • +
                • begin
                • +
                • bnot
                • +
                • bor
                • +
                • bsl
                • +
                • bsr
                • +
                • bxor
                • +
                • case
                • +
                • catch
                • +
                • cond
                • +
                • div
                • +
                • end
                • +
                • fun
                • +
                • if
                • +
                • let
                • +
                • not
                • +
                • of
                • +
                • or
                • +
                • orelse
                • +
                • receive
                • +
                • rem
                • +
                • try
                • +
                • when
                • +
                • xor
                • +
                diff --git a/docs/generators/flash.md b/docs/generators/flash.md index 53312f0fb4..5d6fd829b1 100644 --- a/docs/generators/flash.md +++ b/docs/generators/flash.md @@ -5,7 +5,65 @@ sidebar_label: flash | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | +|invokerPackage|root package for generated code| |null| |packageName|flash package name (convention: package.name)| |org.openapitools| |packageVersion|flash package version| |1.0.0| -|invokerPackage|root package for generated code| |null| |sourceFolder|source folder for generated code. e.g. flash| |null| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | +|File|flash.filesystem.File| + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | + + +## LANGUAGE PRIMITIVES + +
                • Array
                • +
                • Boolean
                • +
                • Date
                • +
                • Dictionary
                • +
                • Number
                • +
                • String
                • +
                + +## RESERVED WORDS + +
                • add
                • +
                • and
                • +
                • break
                • +
                • continue
                • +
                • delete
                • +
                • do
                • +
                • else
                • +
                • eq
                • +
                • for
                • +
                • function
                • +
                • ge
                • +
                • gt
                • +
                • if
                • +
                • ifframeloaded
                • +
                • in
                • +
                • le
                • +
                • lt
                • +
                • ne
                • +
                • new
                • +
                • not
                • +
                • on
                • +
                • onclipevent
                • +
                • or
                • +
                • return
                • +
                • telltarget
                • +
                • this
                • +
                • typeof
                • +
                • var
                • +
                • void
                • +
                • while
                • +
                • with
                • +
                diff --git a/docs/generators/fsharp-functions.md b/docs/generators/fsharp-functions.md index 145573d67d..389c94b133 100644 --- a/docs/generators/fsharp-functions.md +++ b/docs/generators/fsharp-functions.md @@ -5,17 +5,183 @@ sidebar_label: fsharp-functions | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| -|licenseUrl|The URL of the license| |http://localhost| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |licenseName|The name of the license| |NoLicense| -|packageCopyright|Specifies an AssemblyCopyright for the .NET Framework global assembly attributes stored in the AssemblyInfo file.| |No Copyright| +|licenseUrl|The URL of the license| |http://localhost| |packageAuthors|Specifies Authors property in the .NET Core project file.| |OpenAPI| -|packageTitle|Specifies an AssemblyTitle for the .NET Framework global assembly attributes stored in the AssemblyInfo file.| |OpenAPI Library| -|packageName|F# module name (convention: Title.Case).| |OpenAPI| -|packageVersion|F# package version.| |1.0.0| +|packageCopyright|Specifies an AssemblyCopyright for the .NET Framework global assembly attributes stored in the AssemblyInfo file.| |No Copyright| |packageGuid|The GUID that will be associated with the C# project| |null| +|packageName|F# module name (convention: Title.Case).| |OpenAPI| +|packageTitle|Specifies an AssemblyTitle for the .NET Framework global assembly attributes stored in the AssemblyInfo file.| |OpenAPI Library| +|packageVersion|F# package version.| |1.0.0| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| |sourceFolder|source folder for generated code| |OpenAPI/src| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | +|IDictionary|System.Collections.Generic| + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | +|array|list| +|list|list| +|map|IDictionary| + + +## LANGUAGE PRIMITIVES + +
                • Collection
                • +
                • DataTimeOffset
                • +
                • DateTime
                • +
                • Dictionary
                • +
                • Double
                • +
                • ICollection
                • +
                • Int32
                • +
                • Int64
                • +
                • List
                • +
                • String
                • +
                • System.IO.Stream
                • +
                • bool
                • +
                • byte[]
                • +
                • char
                • +
                • decimal
                • +
                • dict
                • +
                • double
                • +
                • float
                • +
                • float32
                • +
                • int
                • +
                • int16
                • +
                • int64
                • +
                • list
                • +
                • nativeint
                • +
                • obj
                • +
                • seq
                • +
                • single
                • +
                • string
                • +
                • uint16
                • +
                • uint32
                • +
                • uint64
                • +
                • unativeint
                • +
                + +## RESERVED WORDS + +
                • abstract
                • +
                • and
                • +
                • as
                • +
                • assert
                • +
                • async
                • +
                • await
                • +
                • base
                • +
                • begin
                • +
                • bool
                • +
                • break
                • +
                • byte
                • +
                • case
                • +
                • catch
                • +
                • char
                • +
                • checked
                • +
                • class
                • +
                • const
                • +
                • continue
                • +
                • decimal
                • +
                • default
                • +
                • delegate
                • +
                • do
                • +
                • done
                • +
                • double
                • +
                • downcast
                • +
                • downto
                • +
                • dynamic
                • +
                • elif
                • +
                • else
                • +
                • end
                • +
                • enum
                • +
                • event
                • +
                • exception
                • +
                • explicit
                • +
                • extern
                • +
                • false
                • +
                • finally
                • +
                • fixed
                • +
                • float
                • +
                • for
                • +
                • foreach
                • +
                • fun
                • +
                • function
                • +
                • if
                • +
                • in
                • +
                • inherit
                • +
                • inline
                • +
                • int
                • +
                • interface
                • +
                • internal
                • +
                • is
                • +
                • lazy
                • +
                • let
                • +
                • let!
                • +
                • localVarFileParams
                • +
                • localVarFormParams
                • +
                • localVarHeaderParams
                • +
                • localVarHttpContentType
                • +
                • localVarHttpContentTypes
                • +
                • localVarHttpHeaderAccept
                • +
                • localVarHttpHeaderAccepts
                • +
                • localVarPath
                • +
                • localVarPathParams
                • +
                • localVarPostBody
                • +
                • localVarQueryParams
                • +
                • localVarResponse
                • +
                • localVarStatusCode
                • +
                • lock
                • +
                • match
                • +
                • match!
                • +
                • member
                • +
                • module
                • +
                • mutable
                • +
                • namespace
                • +
                • new
                • +
                • not
                • +
                • null
                • +
                • of
                • +
                • open
                • +
                • option
                • +
                • or
                • +
                • override
                • +
                • params
                • +
                • private
                • +
                • public
                • +
                • raise
                • +
                • rec
                • +
                • return
                • +
                • return!
                • +
                • sealed
                • +
                • select
                • +
                • static
                • +
                • string
                • +
                • struct
                • +
                • then
                • +
                • to
                • +
                • true
                • +
                • try
                • +
                • type
                • +
                • upcast
                • +
                • use
                • +
                • use!
                • +
                • val
                • +
                • void
                • +
                • volatile
                • +
                • when
                • +
                • while
                • +
                • with
                • +
                • yield
                • +
                • yield!
                • +
                diff --git a/docs/generators/fsharp-giraffe-server.md b/docs/generators/fsharp-giraffe-server.md index bec1994334..d05383c75d 100644 --- a/docs/generators/fsharp-giraffe-server.md +++ b/docs/generators/fsharp-giraffe-server.md @@ -5,19 +5,185 @@ sidebar_label: fsharp-giraffe-server | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|licenseUrl|The URL of the license| |http://localhost| -|licenseName|The name of the license| |NoLicense| -|packageCopyright|Specifies an AssemblyCopyright for the .NET Framework global assembly attributes stored in the AssemblyInfo file.| |No Copyright| -|packageAuthors|Specifies Authors property in the .NET Core project file.| |OpenAPI| -|packageTitle|Specifies an AssemblyTitle for the .NET Framework global assembly attributes stored in the AssemblyInfo file.| |OpenAPI Library| -|packageName|F# module name (convention: Title.Case).| |OpenAPI| -|packageVersion|F# package version.| |1.0.0| -|packageGuid|The GUID that will be associated with the C# project| |null| -|sourceFolder|source folder for generated code| |OpenAPI/src| -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|useDateTimeOffset|Use DateTimeOffset to model date-time properties| |false| -|useCollection|Deserialize array types to Collection<T> instead of List<T>.| |false| -|returnICollection|Return ICollection<T> instead of the concrete type.| |false| -|useSwashbuckle|Uses the Swashbuckle.AspNetCore NuGet package for documentation.| |false| -|generateBody|Generates method body.| |true| |buildTarget|Target the build for a program or library.| |program| +|generateBody|Generates method body.| |true| +|licenseName|The name of the license| |NoLicense| +|licenseUrl|The URL of the license| |http://localhost| +|packageAuthors|Specifies Authors property in the .NET Core project file.| |OpenAPI| +|packageCopyright|Specifies an AssemblyCopyright for the .NET Framework global assembly attributes stored in the AssemblyInfo file.| |No Copyright| +|packageGuid|The GUID that will be associated with the C# project| |null| +|packageName|F# module name (convention: Title.Case).| |OpenAPI| +|packageTitle|Specifies an AssemblyTitle for the .NET Framework global assembly attributes stored in the AssemblyInfo file.| |OpenAPI Library| +|packageVersion|F# package version.| |1.0.0| +|returnICollection|Return ICollection<T> instead of the concrete type.| |false| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| +|sourceFolder|source folder for generated code| |OpenAPI/src| +|useCollection|Deserialize array types to Collection<T> instead of List<T>.| |false| +|useDateTimeOffset|Use DateTimeOffset to model date-time properties| |false| +|useSwashbuckle|Uses the Swashbuckle.AspNetCore NuGet package for documentation.| |false| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | +|IDictionary|System.Collections.Generic| + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | +|array|list| +|list|list| +|map|IDictionary| + + +## LANGUAGE PRIMITIVES + +
                • Collection
                • +
                • DataTimeOffset
                • +
                • DateTime
                • +
                • Dictionary
                • +
                • Double
                • +
                • ICollection
                • +
                • Int32
                • +
                • Int64
                • +
                • List
                • +
                • String
                • +
                • System.IO.Stream
                • +
                • bool
                • +
                • byte[]
                • +
                • char
                • +
                • decimal
                • +
                • dict
                • +
                • double
                • +
                • float
                • +
                • float32
                • +
                • int
                • +
                • int16
                • +
                • int64
                • +
                • list
                • +
                • nativeint
                • +
                • obj
                • +
                • seq
                • +
                • single
                • +
                • string
                • +
                • uint16
                • +
                • uint32
                • +
                • uint64
                • +
                • unativeint
                • +
                + +## RESERVED WORDS + +
                • abstract
                • +
                • and
                • +
                • as
                • +
                • assert
                • +
                • async
                • +
                • await
                • +
                • base
                • +
                • begin
                • +
                • bool
                • +
                • break
                • +
                • byte
                • +
                • case
                • +
                • catch
                • +
                • char
                • +
                • checked
                • +
                • class
                • +
                • const
                • +
                • continue
                • +
                • decimal
                • +
                • default
                • +
                • delegate
                • +
                • do
                • +
                • done
                • +
                • double
                • +
                • downcast
                • +
                • downto
                • +
                • dynamic
                • +
                • elif
                • +
                • else
                • +
                • end
                • +
                • enum
                • +
                • event
                • +
                • exception
                • +
                • explicit
                • +
                • extern
                • +
                • false
                • +
                • finally
                • +
                • fixed
                • +
                • float
                • +
                • for
                • +
                • foreach
                • +
                • fun
                • +
                • function
                • +
                • if
                • +
                • in
                • +
                • inherit
                • +
                • inline
                • +
                • int
                • +
                • interface
                • +
                • internal
                • +
                • is
                • +
                • lazy
                • +
                • let
                • +
                • let!
                • +
                • localVarFileParams
                • +
                • localVarFormParams
                • +
                • localVarHeaderParams
                • +
                • localVarHttpContentType
                • +
                • localVarHttpContentTypes
                • +
                • localVarHttpHeaderAccept
                • +
                • localVarHttpHeaderAccepts
                • +
                • localVarPath
                • +
                • localVarPathParams
                • +
                • localVarPostBody
                • +
                • localVarQueryParams
                • +
                • localVarResponse
                • +
                • localVarStatusCode
                • +
                • lock
                • +
                • match
                • +
                • match!
                • +
                • member
                • +
                • module
                • +
                • mutable
                • +
                • namespace
                • +
                • new
                • +
                • not
                • +
                • null
                • +
                • of
                • +
                • open
                • +
                • option
                • +
                • or
                • +
                • override
                • +
                • params
                • +
                • private
                • +
                • public
                • +
                • raise
                • +
                • rec
                • +
                • return
                • +
                • return!
                • +
                • sealed
                • +
                • select
                • +
                • static
                • +
                • string
                • +
                • struct
                • +
                • then
                • +
                • to
                • +
                • true
                • +
                • try
                • +
                • type
                • +
                • upcast
                • +
                • use
                • +
                • use!
                • +
                • val
                • +
                • void
                • +
                • volatile
                • +
                • when
                • +
                • while
                • +
                • with
                • +
                • yield
                • +
                • yield!
                • +
                diff --git a/docs/generators/fsharp-giraffe.md b/docs/generators/fsharp-giraffe.md deleted file mode 100644 index 473781b7c5..0000000000 --- a/docs/generators/fsharp-giraffe.md +++ /dev/null @@ -1,25 +0,0 @@ - ---- -id: generator-opts-server-fsharp-giraffe -title: Config Options for fsharp-giraffe -sidebar_label: fsharp-giraffe ---- - -| Option | Description | Values | Default | -| ------ | ----------- | ------ | ------- | -|licenseUrl|The URL of the license| |http://localhost| -|licenseName|The name of the license| |NoLicense| -|packageCopyright|Specifies an AssemblyCopyright for the .NET Framework global assembly attributes stored in the AssemblyInfo file.| |No Copyright| -|packageAuthors|Specifies Authors property in the .NET Core project file.| |OpenAPI| -|packageTitle|Specifies an AssemblyTitle for the .NET Framework global assembly attributes stored in the AssemblyInfo file.| |OpenAPI Library| -|packageName|F# module name (convention: Title.Case).| |OpenAPI| -|packageVersion|F# package version.| |1.0.0| -|packageGuid|The GUID that will be associated with the C# project| |null| -|sourceFolder|source folder for generated code| |OpenAPI/src| -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|useDateTimeOffset|Use DateTimeOffset to model date-time properties| |false| -|useCollection|Deserialize array types to Collection<T> instead of List<T>.| |false| -|returnICollection|Return ICollection<T> instead of the concrete type.| |false| -|useSwashbuckle|Uses the Swashbuckle.AspNetCore NuGet package for documentation.| |false| -|generateBody|Generates method body.| |true| -|buildTarget|Target the build for a program or library.| |program| diff --git a/docs/generators/go-experimental.md b/docs/generators/go-experimental.md index 00cec6310b..6099220d65 100644 --- a/docs/generators/go-experimental.md +++ b/docs/generators/go-experimental.md @@ -5,13 +5,93 @@ sidebar_label: go-experimental | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|packageName|Go package name (convention: lowercase).| |openapi| -|packageVersion|Go package version.| |1.0.0| +|enumClassPrefix|Prefix enum with class name| |false| |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true| |isGoSubmodule|whether the generated Go module is a submodule| |false| -|withGoCodegenComment|whether to include Go codegen comment to disable Go Lint and collapse by default GitHub in PRs and diffs| |false| -|withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false| -|enumClassPrefix|Prefix enum with class name| |false| +|packageName|Go package name (convention: lowercase).| |openapi| +|packageVersion|Go package version.| |1.0.0| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| |structPrefix|whether to prefix struct with the class name. e.g. DeletePetOpts => PetApiDeletePetOpts| |false| |withAWSV4Signature|whether to include AWS v4 signature support| |false| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|withGoCodegenComment|whether to include Go codegen comment to disable Go Lint and collapse by default GitHub in PRs and diffs| |false| +|withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | + + +## LANGUAGE PRIMITIVES + +
                • bool
                • +
                • byte
                • +
                • complex128
                • +
                • complex64
                • +
                • float32
                • +
                • float64
                • +
                • int
                • +
                • int32
                • +
                • int64
                • +
                • rune
                • +
                • string
                • +
                • uint
                • +
                • uint32
                • +
                • uint64
                • +
                + +## RESERVED WORDS + +
                • bool
                • +
                • break
                • +
                • byte
                • +
                • case
                • +
                • chan
                • +
                • complex128
                • +
                • complex64
                • +
                • const
                • +
                • continue
                • +
                • default
                • +
                • defer
                • +
                • else
                • +
                • error
                • +
                • fallthrough
                • +
                • float32
                • +
                • float64
                • +
                • for
                • +
                • func
                • +
                • go
                • +
                • goto
                • +
                • if
                • +
                • import
                • +
                • int
                • +
                • int16
                • +
                • int32
                • +
                • int64
                • +
                • int8
                • +
                • interface
                • +
                • map
                • +
                • nil
                • +
                • package
                • +
                • range
                • +
                • return
                • +
                • rune
                • +
                • select
                • +
                • string
                • +
                • struct
                • +
                • switch
                • +
                • type
                • +
                • uint
                • +
                • uint16
                • +
                • uint32
                • +
                • uint64
                • +
                • uint8
                • +
                • uintptr
                • +
                • var
                • +
                diff --git a/docs/generators/go-gin-server.md b/docs/generators/go-gin-server.md index 445f3c2d16..189705f092 100644 --- a/docs/generators/go-gin-server.md +++ b/docs/generators/go-gin-server.md @@ -5,6 +5,86 @@ sidebar_label: go-gin-server | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | +|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true| |packageName|Go package name (convention: lowercase).| |openapi| |packageVersion|Go package version.| |1.0.0| -|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | + + +## LANGUAGE PRIMITIVES + +
                • bool
                • +
                • byte
                • +
                • complex128
                • +
                • complex64
                • +
                • float32
                • +
                • float64
                • +
                • int
                • +
                • int32
                • +
                • int64
                • +
                • rune
                • +
                • string
                • +
                • uint
                • +
                • uint32
                • +
                • uint64
                • +
                + +## RESERVED WORDS + +
                • bool
                • +
                • break
                • +
                • byte
                • +
                • case
                • +
                • chan
                • +
                • complex128
                • +
                • complex64
                • +
                • const
                • +
                • continue
                • +
                • default
                • +
                • defer
                • +
                • else
                • +
                • error
                • +
                • fallthrough
                • +
                • float32
                • +
                • float64
                • +
                • for
                • +
                • func
                • +
                • go
                • +
                • goto
                • +
                • if
                • +
                • import
                • +
                • int
                • +
                • int16
                • +
                • int32
                • +
                • int64
                • +
                • int8
                • +
                • interface
                • +
                • map
                • +
                • nil
                • +
                • package
                • +
                • range
                • +
                • return
                • +
                • rune
                • +
                • select
                • +
                • string
                • +
                • struct
                • +
                • switch
                • +
                • type
                • +
                • uint
                • +
                • uint16
                • +
                • uint32
                • +
                • uint64
                • +
                • uint8
                • +
                • uintptr
                • +
                • var
                • +
                diff --git a/docs/generators/go-server.md b/docs/generators/go-server.md index a602a39c42..0125db11e9 100644 --- a/docs/generators/go-server.md +++ b/docs/generators/go-server.md @@ -5,9 +5,89 @@ sidebar_label: go-server | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | +|featureCORS|Enable Cross-Origin Resource Sharing middleware| |false| +|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true| |packageName|Go package name (convention: lowercase).| |openapi| |packageVersion|Go package version.| |1.0.0| -|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true| -|sourceFolder|source folder for generated code| |go| |serverPort|The network port the generated server binds to| |8080| -|featureCORS|Enable Cross-Origin Resource Sharing middleware| |false| +|sourceFolder|source folder for generated code| |go| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | + + +## LANGUAGE PRIMITIVES + +
                • bool
                • +
                • byte
                • +
                • complex128
                • +
                • complex64
                • +
                • float32
                • +
                • float64
                • +
                • int
                • +
                • int32
                • +
                • int64
                • +
                • rune
                • +
                • string
                • +
                • uint
                • +
                • uint32
                • +
                • uint64
                • +
                + +## RESERVED WORDS + +
                • bool
                • +
                • break
                • +
                • byte
                • +
                • case
                • +
                • chan
                • +
                • complex128
                • +
                • complex64
                • +
                • const
                • +
                • continue
                • +
                • default
                • +
                • defer
                • +
                • else
                • +
                • error
                • +
                • fallthrough
                • +
                • float32
                • +
                • float64
                • +
                • for
                • +
                • func
                • +
                • go
                • +
                • goto
                • +
                • if
                • +
                • import
                • +
                • int
                • +
                • int16
                • +
                • int32
                • +
                • int64
                • +
                • int8
                • +
                • interface
                • +
                • map
                • +
                • nil
                • +
                • package
                • +
                • range
                • +
                • return
                • +
                • rune
                • +
                • select
                • +
                • string
                • +
                • struct
                • +
                • switch
                • +
                • type
                • +
                • uint
                • +
                • uint16
                • +
                • uint32
                • +
                • uint64
                • +
                • uint8
                • +
                • uintptr
                • +
                • var
                • +
                diff --git a/docs/generators/go.md b/docs/generators/go.md index 0801d2108f..1d8909bbfc 100644 --- a/docs/generators/go.md +++ b/docs/generators/go.md @@ -5,13 +5,93 @@ sidebar_label: go | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|packageName|Go package name (convention: lowercase).| |openapi| -|packageVersion|Go package version.| |1.0.0| +|enumClassPrefix|Prefix enum with class name| |false| |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true| |isGoSubmodule|whether the generated Go module is a submodule| |false| -|withGoCodegenComment|whether to include Go codegen comment to disable Go Lint and collapse by default GitHub in PRs and diffs| |false| -|withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false| -|enumClassPrefix|Prefix enum with class name| |false| +|packageName|Go package name (convention: lowercase).| |openapi| +|packageVersion|Go package version.| |1.0.0| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| |structPrefix|whether to prefix struct with the class name. e.g. DeletePetOpts => PetApiDeletePetOpts| |false| |withAWSV4Signature|whether to include AWS v4 signature support| |false| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|withGoCodegenComment|whether to include Go codegen comment to disable Go Lint and collapse by default GitHub in PRs and diffs| |false| +|withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | + + +## LANGUAGE PRIMITIVES + +
                • bool
                • +
                • byte
                • +
                • complex128
                • +
                • complex64
                • +
                • float32
                • +
                • float64
                • +
                • int
                • +
                • int32
                • +
                • int64
                • +
                • rune
                • +
                • string
                • +
                • uint
                • +
                • uint32
                • +
                • uint64
                • +
                + +## RESERVED WORDS + +
                • bool
                • +
                • break
                • +
                • byte
                • +
                • case
                • +
                • chan
                • +
                • complex128
                • +
                • complex64
                • +
                • const
                • +
                • continue
                • +
                • default
                • +
                • defer
                • +
                • else
                • +
                • error
                • +
                • fallthrough
                • +
                • float32
                • +
                • float64
                • +
                • for
                • +
                • func
                • +
                • go
                • +
                • goto
                • +
                • if
                • +
                • import
                • +
                • int
                • +
                • int16
                • +
                • int32
                • +
                • int64
                • +
                • int8
                • +
                • interface
                • +
                • map
                • +
                • nil
                • +
                • package
                • +
                • range
                • +
                • return
                • +
                • rune
                • +
                • select
                • +
                • string
                • +
                • struct
                • +
                • switch
                • +
                • type
                • +
                • uint
                • +
                • uint16
                • +
                • uint32
                • +
                • uint64
                • +
                • uint8
                • +
                • uintptr
                • +
                • var
                • +
                diff --git a/docs/generators/graphql-nodejs-express-server.md b/docs/generators/graphql-nodejs-express-server.md index 3ab10107cf..8200c47531 100644 --- a/docs/generators/graphql-nodejs-express-server.md +++ b/docs/generators/graphql-nodejs-express-server.md @@ -5,6 +5,59 @@ sidebar_label: graphql-nodejs-express-server | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | +|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true| |packageName|GraphQL Node.js Express server package name (convention: lowercase).| |openapi3graphql-server| |packageVersion|GraphQL Node.js Express server package version.| |1.0.0| -|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | +|Array|java.util.List| +|ArrayList|java.util.ArrayList| +|BigDecimal|java.math.BigDecimal| +|Date|java.util.Date| +|DateTime|org.joda.time.*| +|File|java.io.File| +|HashMap|java.util.HashMap| +|List|java.util.*| +|LocalDate|org.joda.time.*| +|LocalDateTime|org.joda.time.*| +|LocalTime|org.joda.time.*| +|Map|java.util.Map| +|Set|java.util.*| +|Timestamp|java.sql.Timestamp| +|URI|java.net.URI| +|UUID|java.util.UUID| + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | + + +## LANGUAGE PRIMITIVES + +
                • Boolean
                • +
                • Float
                • +
                • ID
                • +
                • Int
                • +
                • String
                • +
                • null
                • +
                + +## RESERVED WORDS + +
                • boolean
                • +
                • float
                • +
                • id
                • +
                • implements
                • +
                • int
                • +
                • interface
                • +
                • null
                • +
                • query
                • +
                • string
                • +
                • type
                • +
                • union
                • +
                diff --git a/docs/generators/graphql-schema.md b/docs/generators/graphql-schema.md index 83b90af0be..5cc481fa24 100644 --- a/docs/generators/graphql-schema.md +++ b/docs/generators/graphql-schema.md @@ -5,6 +5,59 @@ sidebar_label: graphql-schema | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | +|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true| |packageName|GraphQL package name (convention: lowercase).| |openapi2graphql| |packageVersion|GraphQL package version.| |1.0.0| -|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | +|Array|java.util.List| +|ArrayList|java.util.ArrayList| +|BigDecimal|java.math.BigDecimal| +|Date|java.util.Date| +|DateTime|org.joda.time.*| +|File|java.io.File| +|HashMap|java.util.HashMap| +|List|java.util.*| +|LocalDate|org.joda.time.*| +|LocalDateTime|org.joda.time.*| +|LocalTime|org.joda.time.*| +|Map|java.util.Map| +|Set|java.util.*| +|Timestamp|java.sql.Timestamp| +|URI|java.net.URI| +|UUID|java.util.UUID| + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | + + +## LANGUAGE PRIMITIVES + +
                • Boolean
                • +
                • Float
                • +
                • ID
                • +
                • Int
                • +
                • String
                • +
                • null
                • +
                + +## RESERVED WORDS + +
                • boolean
                • +
                • float
                • +
                • id
                • +
                • implements
                • +
                • int
                • +
                • interface
                • +
                • null
                • +
                • query
                • +
                • string
                • +
                • type
                • +
                • union
                • +
                diff --git a/docs/generators/graphql-server.md b/docs/generators/graphql-server.md deleted file mode 100644 index 97fb578008..0000000000 --- a/docs/generators/graphql-server.md +++ /dev/null @@ -1,12 +0,0 @@ - ---- -id: generator-opts-server-graphql-server -title: Config Options for graphql-server -sidebar_label: graphql-server ---- - -| Option | Description | Values | Default | -| ------ | ----------- | ------ | ------- | -|packageName|GraphQL express server package name (convention: lowercase).| |openapi3graphql-server| -|packageVersion|GraphQL express server package version.| |1.0.0| -|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true| diff --git a/docs/generators/groovy.md b/docs/generators/groovy.md index a3a5463a3b..13e9a1a619 100644 --- a/docs/generators/groovy.md +++ b/docs/generators/groovy.md @@ -5,38 +5,159 @@ sidebar_label: groovy | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations)| |null| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| -|modelPackage|package for generated models| |org.openapitools.model| |apiPackage|package for generated api classes| |org.openapitools.api| -|invokerPackage|root package for generated code| |org.openapitools.api| -|groupId|groupId in generated pom.xml| |org.openapitools| |artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |openapi-groovy| |artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |1.0.0| +|bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false| +|booleanGetterPrefix|Set booleanGetterPrefix| |get| +|dateLibrary|Option. Date library to use|
                **joda**
                Joda (for legacy app only)
                **legacy**
                Legacy java.util.Date (if you really have a good reason not to use threetenbp
                **java8-localdatetime**
                Java 8 using LocalDateTime (for legacy app only)
                **java8**
                Java 8 native JSR310 (preferred for jdk 1.8+) - note: this also sets "java8" to true
                **threetenbp**
                Backport of JSR310 (preferred for jdk < 1.8)
                |legacy| +|developerEmail|developer email in generated pom.xml| |team@openapitools.org| +|developerName|developer name in generated pom.xml| |OpenAPI-Generator Contributors| +|developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org| +|developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org| +|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false| +|groupId|groupId in generated pom.xml| |org.openapitools| +|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false| +|invokerPackage|root package for generated code| |org.openapitools.api| +|java8|Option. Use Java8 classes instead of third party equivalents|
                **true**
                Use Java 8 classes such as Base64
                **false**
                Various third party libraries as needed
                |false| +|licenseName|The name of the license| |Unlicense| +|licenseUrl|The URL of the license| |http://unlicense.org| +|modelPackage|package for generated models| |org.openapitools.model| +|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| +|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| +|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| |scmConnection|SCM connection in generated pom.xml| |scm:git:git@github.com:openapitools/openapi-generator.git| |scmDeveloperConnection|SCM developer connection in generated pom.xml| |scm:git:git@github.com:openapitools/openapi-generator.git| |scmUrl|SCM URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| -|developerName|developer name in generated pom.xml| |OpenAPI-Generator Contributors| -|developerEmail|developer email in generated pom.xml| |team@openapitools.org| -|developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org| -|developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org| -|licenseName|The name of the license| |Unlicense| -|licenseUrl|The URL of the license| |http://unlicense.org| -|sourceFolder|source folder for generated code| |src/main/groovy| |serializableModel|boolean - toggle "implements Serializable" for generated models| |false| -|bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false| -|fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false| -|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false| -|withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false| -|dateLibrary|Option. Date library to use|
                **joda**
                Joda (for legacy app only)
                **legacy**
                Legacy java.util.Date (if you really have a good reason not to use threetenbp
                **java8-localdatetime**
                Java 8 using LocalDateTime (for legacy app only)
                **java8**
                Java 8 native JSR310 (preferred for jdk 1.8+) - note: this also sets "java8" to true
                **threetenbp**
                Backport of JSR310 (preferred for jdk < 1.8)
                |legacy| -|java8|Option. Use Java8 classes instead of third party equivalents|
                **true**
                Use Java 8 classes such as Base64
                **false**
                Various third party libraries as needed
                |false| -|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false| -|booleanGetterPrefix|Set booleanGetterPrefix| |get| -|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations)| |null| -|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| -|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| -|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| |snapshotVersion|Uses a SNAPSHOT version.|
                **true**
                Use a SnapShot Version
                **false**
                Use a Release Version
                |null| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| +|sourceFolder|source folder for generated code| |src/main/groovy| +|withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | +|Array|java.util.List| +|ArrayList|java.util.ArrayList| +|BigDecimal|java.math.BigDecimal| +|Date|java.util.Date| +|DateTime|org.joda.time.*| +|File|java.io.File| +|HashMap|java.util.HashMap| +|List|java.util.*| +|LocalDate|org.joda.time.*| +|LocalDateTime|org.joda.time.*| +|LocalTime|org.joda.time.*| +|Map|java.util.Map| +|Set|java.util.*| +|Timestamp|java.sql.Timestamp| +|URI|java.net.URI| +|UUID|java.util.UUID| + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | +|array|ArrayList| +|map|HashMap| + + +## LANGUAGE PRIMITIVES + +
                • ArrayList
                • +
                • Boolean
                • +
                • Date
                • +
                • Double
                • +
                • File
                • +
                • Float
                • +
                • Integer
                • +
                • Long
                • +
                • Map
                • +
                • Object
                • +
                • String
                • +
                • boolean
                • +
                • byte[]
                • +
                + +## RESERVED WORDS + +
                • abstract
                • +
                • apiclient
                • +
                • apiexception
                • +
                • apiresponse
                • +
                • assert
                • +
                • boolean
                • +
                • break
                • +
                • byte
                • +
                • case
                • +
                • catch
                • +
                • char
                • +
                • class
                • +
                • configuration
                • +
                • const
                • +
                • continue
                • +
                • default
                • +
                • do
                • +
                • double
                • +
                • else
                • +
                • enum
                • +
                • extends
                • +
                • final
                • +
                • finally
                • +
                • float
                • +
                • for
                • +
                • goto
                • +
                • if
                • +
                • implements
                • +
                • import
                • +
                • instanceof
                • +
                • int
                • +
                • interface
                • +
                • localreturntype
                • +
                • localvaraccept
                • +
                • localvaraccepts
                • +
                • localvarauthnames
                • +
                • localvarcollectionqueryparams
                • +
                • localvarcontenttype
                • +
                • localvarcontenttypes
                • +
                • localvarcookieparams
                • +
                • localvarformparams
                • +
                • localvarheaderparams
                • +
                • localvarpath
                • +
                • localvarpostbody
                • +
                • localvarqueryparams
                • +
                • long
                • +
                • native
                • +
                • new
                • +
                • null
                • +
                • object
                • +
                • package
                • +
                • private
                • +
                • protected
                • +
                • public
                • +
                • return
                • +
                • short
                • +
                • static
                • +
                • strictfp
                • +
                • stringutil
                • +
                • super
                • +
                • switch
                • +
                • synchronized
                • +
                • this
                • +
                • throw
                • +
                • throws
                • +
                • transient
                • +
                • try
                • +
                • void
                • +
                • volatile
                • +
                • while
                • +
                diff --git a/docs/generators/grpc-schema.md b/docs/generators/grpc-schema.md deleted file mode 100644 index 17a765fbbc..0000000000 --- a/docs/generators/grpc-schema.md +++ /dev/null @@ -1,9 +0,0 @@ - ---- -id: generator-opts-config-grpc-schema -title: Config Options for grpc-schema -sidebar_label: grpc-schema ---- - -| Option | Description | Values | Default | -| ------ | ----------- | ------ | ------- | diff --git a/docs/generators/haskell-http-client.md b/docs/generators/haskell-http-client.md index f79606c6db..3a68e2276a 100644 --- a/docs/generators/haskell-http-client.md +++ b/docs/generators/haskell-http-client.md @@ -5,29 +5,93 @@ sidebar_label: haskell-http-client | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|allowFromJsonNulls|allow JSON Null during model decoding from JSON| |true| +|allowNonUniqueOperationIds|allow different API modules to contain the same operationId. Each API must be imported qualified| |false| +|allowToJsonNulls|allow emitting JSON Null during model encoding to JSON| |false| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|baseModule|Set the base module namespace| |null| |cabalPackage|Set the cabal package name, which consists of one or more alphanumeric words separated by hyphens| |null| |cabalVersion|Set the cabal version number, consisting of a sequence of one or more integers separated by dots| |null| -|baseModule|Set the base module namespace| |null| -|requestType|Set the name of the type used to generate requests| |null| |configType|Set the name of the type used for configuration| |null| -|allowFromJsonNulls|allow JSON Null during model decoding from JSON| |true| -|allowToJsonNulls|allow emitting JSON Null during model encoding to JSON| |false| -|allowNonUniqueOperationIds|allow different API modules to contain the same operationId. Each API must be imported qualified| |false| -|generateLenses|Generate Lens optics for Models| |true| -|generateModelConstructors|Generate smart constructors (only supply required fields) for models| |true| -|generateEnums|Generate specific datatypes for OpenAPI enums| |true| -|generateFormUrlEncodedInstances|Generate FromForm/ToForm instances for models that are used by operations that produce or consume application/x-www-form-urlencoded| |true| -|inlineMimeTypes|Inline (hardcode) the content-type and accept parameters on operations, when there is only 1 option| |true| -|modelDeriving|Additional classes to include in the deriving() clause of Models| |null| -|strictFields|Add strictness annotations to all model fields| |true| -|useKatip|Sets the default value for the UseKatip cabal flag. If true, the katip package provides logging instead of monad-logger| |true| +|customTestInstanceModule|test module used to provide typeclass instances for types not known by the generator| |null| +|dateFormat|format string used to parse/render a date| |%Y-%m-%d| |dateTimeFormat|format string used to parse/render a datetime| |null| |dateTimeParseFormat|overrides the format string used to parse a datetime| |null| -|dateFormat|format string used to parse/render a date| |%Y-%m-%d| -|customTestInstanceModule|test module used to provide typeclass instances for types not known by the generator| |null| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|generateEnums|Generate specific datatypes for OpenAPI enums| |true| +|generateFormUrlEncodedInstances|Generate FromForm/ToForm instances for models that are used by operations that produce or consume application/x-www-form-urlencoded| |true| +|generateLenses|Generate Lens optics for Models| |true| +|generateModelConstructors|Generate smart constructors (only supply required fields) for models| |true| |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true| +|inlineMimeTypes|Inline (hardcode) the content-type and accept parameters on operations, when there is only 1 option| |true| +|modelDeriving|Additional classes to include in the deriving() clause of Models| |null| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|requestType|Set the name of the type used to generate requests| |null| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| +|strictFields|Add strictness annotations to all model fields| |true| +|useKatip|Sets the default value for the UseKatip cabal flag. If true, the katip package provides logging instead of monad-logger| |true| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | + + +## LANGUAGE PRIMITIVES + +
                • Bool
                • +
                • Char
                • +
                • Double
                • +
                • FilePath
                • +
                • Float
                • +
                • Int
                • +
                • Integer
                • +
                • List
                • +
                • String
                • +
                • Text
                • +
                + +## RESERVED WORDS + +
                • accept
                • +
                • as
                • +
                • case
                • +
                • class
                • +
                • contenttype
                • +
                • data
                • +
                • default
                • +
                • deriving
                • +
                • do
                • +
                • else
                • +
                • family
                • +
                • forall
                • +
                • foreign
                • +
                • hiding
                • +
                • if
                • +
                • import
                • +
                • in
                • +
                • infix
                • +
                • infixl
                • +
                • infixr
                • +
                • instance
                • +
                • let
                • +
                • mdo
                • +
                • module
                • +
                • newtype
                • +
                • of
                • +
                • proc
                • +
                • pure
                • +
                • qualified
                • +
                • rec
                • +
                • return
                • +
                • then
                • +
                • type
                • +
                • where
                • +
                diff --git a/docs/generators/haskell.md b/docs/generators/haskell.md index 89cd90586d..3e0cb77314 100644 --- a/docs/generators/haskell.md +++ b/docs/generators/haskell.md @@ -5,11 +5,71 @@ sidebar_label: haskell | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| -|modelPackage|package for generated models| |null| |apiPackage|package for generated api classes| |null| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|modelPackage|package for generated models| |null| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| |serveStatic|serve will serve files from the directory 'static'.| |true| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | +|Map|qualified Data.Map as Map| + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | + + +## LANGUAGE PRIMITIVES + +
                • Bool
                • +
                • Char
                • +
                • Double
                • +
                • FilePath
                • +
                • Float
                • +
                • Int
                • +
                • Integer
                • +
                • List
                • +
                • String
                • +
                + +## RESERVED WORDS + +
                • as
                • +
                • case
                • +
                • class
                • +
                • data
                • +
                • default
                • +
                • deriving
                • +
                • do
                • +
                • else
                • +
                • family
                • +
                • forall
                • +
                • foreign
                • +
                • hiding
                • +
                • if
                • +
                • import
                • +
                • in
                • +
                • infix
                • +
                • infixl
                • +
                • infixr
                • +
                • instance
                • +
                • let
                • +
                • mdo
                • +
                • module
                • +
                • newtype
                • +
                • of
                • +
                • proc
                • +
                • qualified
                • +
                • rec
                • +
                • then
                • +
                • type
                • +
                • where
                • +
                diff --git a/docs/generators/html.md b/docs/generators/html.md index 0c75b44dd0..d538d0f91d 100644 --- a/docs/generators/html.md +++ b/docs/generators/html.md @@ -5,18 +5,38 @@ sidebar_label: html | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| -|appName|short name of the application| |null| |appDescription|description of the application| |null| -|infoUrl|a URL where users can get more information about the application| |null| -|infoEmail|an email address to contact for inquiries about the application| |null| -|licenseInfo|a short description of the license| |null| -|licenseUrl|a URL pointing to the full license| |null| -|invokerPackage|root package for generated code| |null| -|groupId|groupId in generated pom.xml| |null| +|appName|short name of the application| |null| |artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |null| |artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |null| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|groupId|groupId in generated pom.xml| |null| +|infoEmail|an email address to contact for inquiries about the application| |null| +|infoUrl|a URL where users can get more information about the application| |null| +|invokerPackage|root package for generated code| |null| +|licenseInfo|a short description of the license| |null| +|licenseUrl|a URL pointing to the full license| |null| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | + + +## LANGUAGE PRIMITIVES + +
                  + +## RESERVED WORDS + +
                    diff --git a/docs/generators/html2.md b/docs/generators/html2.md index 3b7775d5fc..82374353c4 100644 --- a/docs/generators/html2.md +++ b/docs/generators/html2.md @@ -5,22 +5,42 @@ sidebar_label: html2 | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| -|appName|short name of the application| |null| |appDescription|description of the application| |null| -|infoUrl|a URL where users can get more information about the application| |null| -|infoEmail|an email address to contact for inquiries about the application| |null| -|licenseInfo|a short description of the license| |null| -|licenseUrl|a URL pointing to the full license| |null| -|invokerPackage|root package for generated code| |null| -|phpInvokerPackage|root package for generated php code| |null| -|perlModuleName|root module name for generated perl code| |null| -|pythonPackageName|package name for generated python code| |null| -|packageName|C# package name| |null| -|groupId|groupId in generated pom.xml| |null| +|appName|short name of the application| |null| |artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |null| |artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |null| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|groupId|groupId in generated pom.xml| |null| +|infoEmail|an email address to contact for inquiries about the application| |null| +|infoUrl|a URL where users can get more information about the application| |null| +|invokerPackage|root package for generated code| |null| +|licenseInfo|a short description of the license| |null| +|licenseUrl|a URL pointing to the full license| |null| +|packageName|C# package name| |null| +|perlModuleName|root module name for generated perl code| |null| +|phpInvokerPackage|root package for generated php code| |null| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|pythonPackageName|package name for generated python code| |null| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | + + +## LANGUAGE PRIMITIVES + +
                      + +## RESERVED WORDS + +
                        diff --git a/docs/generators/java-inflector.md b/docs/generators/java-inflector.md index f50718a448..9a0da4b39a 100644 --- a/docs/generators/java-inflector.md +++ b/docs/generators/java-inflector.md @@ -5,40 +5,157 @@ sidebar_label: java-inflector | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations)| |null| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| -|modelPackage|package for generated models| |org.openapitools.model| |apiPackage|package for generated api classes| |org.openapitools.controllers| -|invokerPackage|root package for generated code| |org.openapitools.controllers| -|groupId|groupId in generated pom.xml| |org.openapitools| -|artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |openapi-inflector-server| -|artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |1.0.0| -|artifactUrl|artifact URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| |artifactDescription|artifact description in generated pom.xml| |OpenAPI Java| +|artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |openapi-inflector-server| +|artifactUrl|artifact URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| +|artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |1.0.0| +|bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false| +|booleanGetterPrefix|Set booleanGetterPrefix| |get| +|dateLibrary|Option. Date library to use|
                        **joda**
                        Joda (for legacy app only)
                        **legacy**
                        Legacy java.util.Date (if you really have a good reason not to use threetenbp
                        **java8-localdatetime**
                        Java 8 using LocalDateTime (for legacy app only)
                        **java8**
                        Java 8 native JSR310 (preferred for jdk 1.8+) - note: this also sets "java8" to true
                        **threetenbp**
                        Backport of JSR310 (preferred for jdk < 1.8)
                        |legacy| +|developerEmail|developer email in generated pom.xml| |team@openapitools.org| +|developerName|developer name in generated pom.xml| |OpenAPI-Generator Contributors| +|developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org| +|developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org| +|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false| +|groupId|groupId in generated pom.xml| |org.openapitools| +|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false| +|invokerPackage|root package for generated code| |org.openapitools.controllers| +|java8|Option. Use Java8 classes instead of third party equivalents|
                        **true**
                        Use Java 8 classes such as Base64
                        **false**
                        Various third party libraries as needed
                        |false| +|licenseName|The name of the license| |Unlicense| +|licenseUrl|The URL of the license| |http://unlicense.org| +|modelPackage|package for generated models| |org.openapitools.model| +|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| +|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| +|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| |scmConnection|SCM connection in generated pom.xml| |scm:git:git@github.com:openapitools/openapi-generator.git| |scmDeveloperConnection|SCM developer connection in generated pom.xml| |scm:git:git@github.com:openapitools/openapi-generator.git| |scmUrl|SCM URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| -|developerName|developer name in generated pom.xml| |OpenAPI-Generator Contributors| -|developerEmail|developer email in generated pom.xml| |team@openapitools.org| -|developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org| -|developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org| -|licenseName|The name of the license| |Unlicense| -|licenseUrl|The URL of the license| |http://unlicense.org| -|sourceFolder|source folder for generated code| |src/gen/java| |serializableModel|boolean - toggle "implements Serializable" for generated models| |false| -|bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false| -|fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false| -|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false| -|withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false| -|dateLibrary|Option. Date library to use|
                        **joda**
                        Joda (for legacy app only)
                        **legacy**
                        Legacy java.util.Date (if you really have a good reason not to use threetenbp
                        **java8-localdatetime**
                        Java 8 using LocalDateTime (for legacy app only)
                        **java8**
                        Java 8 native JSR310 (preferred for jdk 1.8+) - note: this also sets "java8" to true
                        **threetenbp**
                        Backport of JSR310 (preferred for jdk < 1.8)
                        |legacy| -|java8|Option. Use Java8 classes instead of third party equivalents|
                        **true**
                        Use Java 8 classes such as Base64
                        **false**
                        Various third party libraries as needed
                        |false| -|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false| -|booleanGetterPrefix|Set booleanGetterPrefix| |get| -|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations)| |null| -|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| -|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| -|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| |snapshotVersion|Uses a SNAPSHOT version.|
                        **true**
                        Use a SnapShot Version
                        **false**
                        Use a Release Version
                        |null| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| +|sourceFolder|source folder for generated code| |src/gen/java| +|withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | +|Array|java.util.List| +|ArrayList|java.util.ArrayList| +|BigDecimal|java.math.BigDecimal| +|Date|java.util.Date| +|DateTime|org.joda.time.*| +|File|java.io.File| +|HashMap|java.util.HashMap| +|List|java.util.*| +|LocalDate|org.joda.time.*| +|LocalDateTime|org.joda.time.*| +|LocalTime|org.joda.time.*| +|Map|java.util.Map| +|Set|java.util.*| +|Timestamp|java.sql.Timestamp| +|URI|java.net.URI| +|UUID|java.util.UUID| + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | +|array|ArrayList| +|map|HashMap| + + +## LANGUAGE PRIMITIVES + +
                        • Boolean
                        • +
                        • Double
                        • +
                        • Float
                        • +
                        • Integer
                        • +
                        • Long
                        • +
                        • Object
                        • +
                        • String
                        • +
                        • boolean
                        • +
                        • byte[]
                        • +
                        + +## RESERVED WORDS + +
                        • abstract
                        • +
                        • apiclient
                        • +
                        • apiexception
                        • +
                        • apiresponse
                        • +
                        • assert
                        • +
                        • boolean
                        • +
                        • break
                        • +
                        • byte
                        • +
                        • case
                        • +
                        • catch
                        • +
                        • char
                        • +
                        • class
                        • +
                        • configuration
                        • +
                        • const
                        • +
                        • continue
                        • +
                        • default
                        • +
                        • do
                        • +
                        • double
                        • +
                        • else
                        • +
                        • enum
                        • +
                        • extends
                        • +
                        • final
                        • +
                        • finally
                        • +
                        • float
                        • +
                        • for
                        • +
                        • goto
                        • +
                        • if
                        • +
                        • implements
                        • +
                        • import
                        • +
                        • instanceof
                        • +
                        • int
                        • +
                        • interface
                        • +
                        • localreturntype
                        • +
                        • localvaraccept
                        • +
                        • localvaraccepts
                        • +
                        • localvarauthnames
                        • +
                        • localvarcollectionqueryparams
                        • +
                        • localvarcontenttype
                        • +
                        • localvarcontenttypes
                        • +
                        • localvarcookieparams
                        • +
                        • localvarformparams
                        • +
                        • localvarheaderparams
                        • +
                        • localvarpath
                        • +
                        • localvarpostbody
                        • +
                        • localvarqueryparams
                        • +
                        • long
                        • +
                        • native
                        • +
                        • new
                        • +
                        • null
                        • +
                        • object
                        • +
                        • package
                        • +
                        • private
                        • +
                        • protected
                        • +
                        • public
                        • +
                        • return
                        • +
                        • short
                        • +
                        • static
                        • +
                        • strictfp
                        • +
                        • stringutil
                        • +
                        • super
                        • +
                        • switch
                        • +
                        • synchronized
                        • +
                        • this
                        • +
                        • throw
                        • +
                        • throws
                        • +
                        • transient
                        • +
                        • try
                        • +
                        • void
                        • +
                        • volatile
                        • +
                        • while
                        • +
                        diff --git a/docs/generators/java-msf4j.md b/docs/generators/java-msf4j.md index d6f8235503..d0ecb290ff 100644 --- a/docs/generators/java-msf4j.md +++ b/docs/generators/java-msf4j.md @@ -5,45 +5,162 @@ sidebar_label: java-msf4j | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations)| |null| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| -|modelPackage|package for generated models| |org.openapitools.model| |apiPackage|package for generated api classes| |org.openapitools.api| -|invokerPackage|root package for generated code| |org.openapitools.api| -|groupId|groupId in generated pom.xml| |org.openapitools| -|artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |openapi-jaxrs-server| -|artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |1.0.0| -|artifactUrl|artifact URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| |artifactDescription|artifact description in generated pom.xml| |OpenAPI Java| +|artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |openapi-jaxrs-server| +|artifactUrl|artifact URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| +|artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |1.0.0| +|bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false| +|booleanGetterPrefix|Set booleanGetterPrefix| |get| +|dateLibrary|Option. Date library to use|
                        **joda**
                        Joda (for legacy app only)
                        **legacy**
                        Legacy java.util.Date (if you really have a good reason not to use threetenbp
                        **java8-localdatetime**
                        Java 8 using LocalDateTime (for legacy app only)
                        **java8**
                        Java 8 native JSR310 (preferred for jdk 1.8+) - note: this also sets "java8" to true
                        **threetenbp**
                        Backport of JSR310 (preferred for jdk < 1.8)
                        |legacy| +|developerEmail|developer email in generated pom.xml| |team@openapitools.org| +|developerName|developer name in generated pom.xml| |OpenAPI-Generator Contributors| +|developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org| +|developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org| +|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false| +|groupId|groupId in generated pom.xml| |org.openapitools| +|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false| +|implFolder|folder for generated implementation code| |src/main/java| +|invokerPackage|root package for generated code| |org.openapitools.api| +|java8|Option. Use Java8 classes instead of third party equivalents|
                        **true**
                        Use Java 8 classes such as Base64
                        **false**
                        Various third party libraries as needed
                        |false| +|library|library template (sub-template)|
                        **jersey1**
                        Jersey core 1.x
                        **jersey2**
                        Jersey core 2.x
                        |jersey2| +|licenseName|The name of the license| |Unlicense| +|licenseUrl|The URL of the license| |http://unlicense.org| +|modelPackage|package for generated models| |org.openapitools.model| +|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| +|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| +|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| |scmConnection|SCM connection in generated pom.xml| |scm:git:git@github.com:openapitools/openapi-generator.git| |scmDeveloperConnection|SCM developer connection in generated pom.xml| |scm:git:git@github.com:openapitools/openapi-generator.git| |scmUrl|SCM URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| -|developerName|developer name in generated pom.xml| |OpenAPI-Generator Contributors| -|developerEmail|developer email in generated pom.xml| |team@openapitools.org| -|developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org| -|developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org| -|licenseName|The name of the license| |Unlicense| -|licenseUrl|The URL of the license| |http://unlicense.org| -|sourceFolder|source folder for generated code| |src/main/java| |serializableModel|boolean - toggle "implements Serializable" for generated models| |false| -|bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false| -|fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false| -|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false| -|withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false| -|dateLibrary|Option. Date library to use|
                        **joda**
                        Joda (for legacy app only)
                        **legacy**
                        Legacy java.util.Date (if you really have a good reason not to use threetenbp
                        **java8-localdatetime**
                        Java 8 using LocalDateTime (for legacy app only)
                        **java8**
                        Java 8 native JSR310 (preferred for jdk 1.8+) - note: this also sets "java8" to true
                        **threetenbp**
                        Backport of JSR310 (preferred for jdk < 1.8)
                        |legacy| -|java8|Option. Use Java8 classes instead of third party equivalents|
                        **true**
                        Use Java 8 classes such as Base64
                        **false**
                        Various third party libraries as needed
                        |false| -|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false| -|booleanGetterPrefix|Set booleanGetterPrefix| |get| -|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations)| |null| -|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| -|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| -|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| +|serverPort|The port on which the server should be started| |8080| |snapshotVersion|Uses a SNAPSHOT version.|
                        **true**
                        Use a SnapShot Version
                        **false**
                        Use a Release Version
                        |null| -|implFolder|folder for generated implementation code| |src/main/java| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| +|sourceFolder|source folder for generated code| |src/main/java| |title|a title describing the application| |OpenAPI Server| |useBeanValidation|Use BeanValidation API annotations| |true| -|serverPort|The port on which the server should be started| |8080| -|library|library template (sub-template)|
                        **jersey1**
                        Jersey core 1.x
                        **jersey2**
                        Jersey core 2.x
                        |jersey2| +|withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | +|Array|java.util.List| +|ArrayList|java.util.ArrayList| +|BigDecimal|java.math.BigDecimal| +|Date|java.util.Date| +|DateTime|org.joda.time.*| +|File|java.io.File| +|HashMap|java.util.HashMap| +|List|java.util.*| +|LocalDate|org.joda.time.*| +|LocalDateTime|org.joda.time.*| +|LocalTime|org.joda.time.*| +|Map|java.util.Map| +|Set|java.util.*| +|Timestamp|java.sql.Timestamp| +|URI|java.net.URI| +|UUID|java.util.UUID| + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | +|array|ArrayList| +|map|HashMap| + + +## LANGUAGE PRIMITIVES + +
                        • Boolean
                        • +
                        • Double
                        • +
                        • Float
                        • +
                        • Integer
                        • +
                        • Long
                        • +
                        • Object
                        • +
                        • String
                        • +
                        • boolean
                        • +
                        • byte[]
                        • +
                        + +## RESERVED WORDS + +
                        • abstract
                        • +
                        • apiclient
                        • +
                        • apiexception
                        • +
                        • apiresponse
                        • +
                        • assert
                        • +
                        • boolean
                        • +
                        • break
                        • +
                        • byte
                        • +
                        • case
                        • +
                        • catch
                        • +
                        • char
                        • +
                        • class
                        • +
                        • configuration
                        • +
                        • const
                        • +
                        • continue
                        • +
                        • default
                        • +
                        • do
                        • +
                        • double
                        • +
                        • else
                        • +
                        • enum
                        • +
                        • extends
                        • +
                        • final
                        • +
                        • finally
                        • +
                        • float
                        • +
                        • for
                        • +
                        • goto
                        • +
                        • if
                        • +
                        • implements
                        • +
                        • import
                        • +
                        • instanceof
                        • +
                        • int
                        • +
                        • interface
                        • +
                        • localreturntype
                        • +
                        • localvaraccept
                        • +
                        • localvaraccepts
                        • +
                        • localvarauthnames
                        • +
                        • localvarcollectionqueryparams
                        • +
                        • localvarcontenttype
                        • +
                        • localvarcontenttypes
                        • +
                        • localvarcookieparams
                        • +
                        • localvarformparams
                        • +
                        • localvarheaderparams
                        • +
                        • localvarpath
                        • +
                        • localvarpostbody
                        • +
                        • localvarqueryparams
                        • +
                        • long
                        • +
                        • native
                        • +
                        • new
                        • +
                        • null
                        • +
                        • object
                        • +
                        • package
                        • +
                        • private
                        • +
                        • protected
                        • +
                        • public
                        • +
                        • return
                        • +
                        • short
                        • +
                        • static
                        • +
                        • strictfp
                        • +
                        • stringutil
                        • +
                        • super
                        • +
                        • switch
                        • +
                        • synchronized
                        • +
                        • this
                        • +
                        • throw
                        • +
                        • throws
                        • +
                        • transient
                        • +
                        • try
                        • +
                        • void
                        • +
                        • volatile
                        • +
                        • while
                        • +
                        diff --git a/docs/generators/java-pkmst.md b/docs/generators/java-pkmst.md index a9ef34390f..8ab96c097d 100644 --- a/docs/generators/java-pkmst.md +++ b/docs/generators/java-pkmst.md @@ -5,47 +5,164 @@ sidebar_label: java-pkmst | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations)| |null| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| -|modelPackage|package for generated models| |com.prokarma.pkmst.model| |apiPackage|package for generated api classes| |com.prokarma.pkmst.controller| -|invokerPackage|root package for generated code| |com.prokarma.pkmst.controller| -|groupId|groupId in generated pom.xml| |com.prokarma| -|artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |pkmst-microservice| -|artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |1.0.0| -|artifactUrl|artifact URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| |artifactDescription|artifact description in generated pom.xml| |OpenAPI Java| +|artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |pkmst-microservice| +|artifactUrl|artifact URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| +|artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |1.0.0| +|basePackage|base package for java source code| |null| +|bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false| +|booleanGetterPrefix|Set booleanGetterPrefix| |get| +|dateLibrary|Option. Date library to use|
                        **joda**
                        Joda (for legacy app only)
                        **legacy**
                        Legacy java.util.Date (if you really have a good reason not to use threetenbp
                        **java8-localdatetime**
                        Java 8 using LocalDateTime (for legacy app only)
                        **java8**
                        Java 8 native JSR310 (preferred for jdk 1.8+) - note: this also sets "java8" to true
                        **threetenbp**
                        Backport of JSR310 (preferred for jdk < 1.8)
                        |threetenbp| +|developerEmail|developer email in generated pom.xml| |team@openapitools.org| +|developerName|developer name in generated pom.xml| |OpenAPI-Generator Contributors| +|developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org| +|developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org| +|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|eurekaUri|Eureka URI| |null| +|fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false| +|groupId|groupId in generated pom.xml| |com.prokarma| +|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false| +|invokerPackage|root package for generated code| |com.prokarma.pkmst.controller| +|java8|Option. Use Java8 classes instead of third party equivalents|
                        **true**
                        Use Java 8 classes such as Base64
                        **false**
                        Various third party libraries as needed
                        |false| +|licenseName|The name of the license| |Unlicense| +|licenseUrl|The URL of the license| |http://unlicense.org| +|modelPackage|package for generated models| |com.prokarma.pkmst.model| +|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| +|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| +|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| +|pkmstInterceptor|PKMST Interceptor| |null| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| |scmConnection|SCM connection in generated pom.xml| |scm:git:git@github.com:openapitools/openapi-generator.git| |scmDeveloperConnection|SCM developer connection in generated pom.xml| |scm:git:git@github.com:openapitools/openapi-generator.git| |scmUrl|SCM URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| -|developerName|developer name in generated pom.xml| |OpenAPI-Generator Contributors| -|developerEmail|developer email in generated pom.xml| |team@openapitools.org| -|developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org| -|developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org| -|licenseName|The name of the license| |Unlicense| -|licenseUrl|The URL of the license| |http://unlicense.org| -|sourceFolder|source folder for generated code| |src/main/java| |serializableModel|boolean - toggle "implements Serializable" for generated models| |false| -|bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false| -|fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false| -|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false| -|withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false| -|dateLibrary|Option. Date library to use|
                        **joda**
                        Joda (for legacy app only)
                        **legacy**
                        Legacy java.util.Date (if you really have a good reason not to use threetenbp
                        **java8-localdatetime**
                        Java 8 using LocalDateTime (for legacy app only)
                        **java8**
                        Java 8 native JSR310 (preferred for jdk 1.8+) - note: this also sets "java8" to true
                        **threetenbp**
                        Backport of JSR310 (preferred for jdk < 1.8)
                        |threetenbp| -|java8|Option. Use Java8 classes instead of third party equivalents|
                        **true**
                        Use Java 8 classes such as Base64
                        **false**
                        Various third party libraries as needed
                        |false| -|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false| -|booleanGetterPrefix|Set booleanGetterPrefix| |get| -|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations)| |null| -|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| -|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| -|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| -|snapshotVersion|Uses a SNAPSHOT version.|
                        **true**
                        Use a SnapShot Version
                        **false**
                        Use a Release Version
                        |null| -|basePackage|base package for java source code| |null| |serviceName|Service Name| |null| -|title|server title name or client service name| |null| -|eurekaUri|Eureka URI| |null| -|zipkinUri|Zipkin URI| |null| +|snapshotVersion|Uses a SNAPSHOT version.|
                        **true**
                        Use a SnapShot Version
                        **false**
                        Use a Release Version
                        |null| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| +|sourceFolder|source folder for generated code| |src/main/java| |springBootAdminUri|Spring-Boot URI| |null| -|pkmstInterceptor|PKMST Interceptor| |null| +|title|server title name or client service name| |null| +|withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false| +|zipkinUri|Zipkin URI| |null| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | +|Array|java.util.List| +|ArrayList|java.util.ArrayList| +|BigDecimal|java.math.BigDecimal| +|Date|java.util.Date| +|DateTime|org.joda.time.*| +|File|java.io.File| +|HashMap|java.util.HashMap| +|List|java.util.*| +|LocalDate|org.joda.time.*| +|LocalDateTime|org.joda.time.*| +|LocalTime|org.joda.time.*| +|Map|java.util.Map| +|Set|java.util.*| +|Timestamp|java.sql.Timestamp| +|URI|java.net.URI| +|UUID|java.util.UUID| + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | +|array|ArrayList| +|map|HashMap| + + +## LANGUAGE PRIMITIVES + +
                        • Boolean
                        • +
                        • Double
                        • +
                        • Float
                        • +
                        • Integer
                        • +
                        • Long
                        • +
                        • Object
                        • +
                        • String
                        • +
                        • boolean
                        • +
                        • byte[]
                        • +
                        + +## RESERVED WORDS + +
                        • abstract
                        • +
                        • apiclient
                        • +
                        • apiexception
                        • +
                        • apiresponse
                        • +
                        • assert
                        • +
                        • boolean
                        • +
                        • break
                        • +
                        • byte
                        • +
                        • case
                        • +
                        • catch
                        • +
                        • char
                        • +
                        • class
                        • +
                        • configuration
                        • +
                        • const
                        • +
                        • continue
                        • +
                        • default
                        • +
                        • do
                        • +
                        • double
                        • +
                        • else
                        • +
                        • enum
                        • +
                        • extends
                        • +
                        • final
                        • +
                        • finally
                        • +
                        • float
                        • +
                        • for
                        • +
                        • goto
                        • +
                        • if
                        • +
                        • implements
                        • +
                        • import
                        • +
                        • instanceof
                        • +
                        • int
                        • +
                        • interface
                        • +
                        • localreturntype
                        • +
                        • localvaraccept
                        • +
                        • localvaraccepts
                        • +
                        • localvarauthnames
                        • +
                        • localvarcollectionqueryparams
                        • +
                        • localvarcontenttype
                        • +
                        • localvarcontenttypes
                        • +
                        • localvarcookieparams
                        • +
                        • localvarformparams
                        • +
                        • localvarheaderparams
                        • +
                        • localvarpath
                        • +
                        • localvarpostbody
                        • +
                        • localvarqueryparams
                        • +
                        • long
                        • +
                        • native
                        • +
                        • new
                        • +
                        • null
                        • +
                        • object
                        • +
                        • package
                        • +
                        • private
                        • +
                        • protected
                        • +
                        • public
                        • +
                        • return
                        • +
                        • short
                        • +
                        • static
                        • +
                        • strictfp
                        • +
                        • stringutil
                        • +
                        • super
                        • +
                        • switch
                        • +
                        • synchronized
                        • +
                        • this
                        • +
                        • throw
                        • +
                        • throws
                        • +
                        • transient
                        • +
                        • try
                        • +
                        • void
                        • +
                        • volatile
                        • +
                        • while
                        • +
                        diff --git a/docs/generators/java-play-framework.md b/docs/generators/java-play-framework.md index bb4fb690a2..c087518409 100644 --- a/docs/generators/java-play-framework.md +++ b/docs/generators/java-play-framework.md @@ -5,49 +5,166 @@ sidebar_label: java-play-framework | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations)| |null| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| -|modelPackage|package for generated models| |apimodels| |apiPackage|package for generated api classes| |controllers| -|invokerPackage|root package for generated code| |org.openapitools.api| -|groupId|groupId in generated pom.xml| |org.openapitools| -|artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |openapi-java-playframework| -|artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |1.0.0| -|artifactUrl|artifact URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| |artifactDescription|artifact description in generated pom.xml| |OpenAPI Java| +|artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |openapi-java-playframework| +|artifactUrl|artifact URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| +|artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |1.0.0| +|basePackage|base package for generated code| |org.openapitools| +|bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false| +|booleanGetterPrefix|Set booleanGetterPrefix| |get| +|configPackage|configuration package for generated code| |org.openapitools.configuration| +|controllerOnly|Whether to generate only API interface stubs without the server files.| |false| +|dateLibrary|Option. Date library to use|
                        **joda**
                        Joda (for legacy app only)
                        **legacy**
                        Legacy java.util.Date (if you really have a good reason not to use threetenbp
                        **java8-localdatetime**
                        Java 8 using LocalDateTime (for legacy app only)
                        **java8**
                        Java 8 native JSR310 (preferred for jdk 1.8+) - note: this also sets "java8" to true
                        **threetenbp**
                        Backport of JSR310 (preferred for jdk < 1.8)
                        |threetenbp| +|developerEmail|developer email in generated pom.xml| |team@openapitools.org| +|developerName|developer name in generated pom.xml| |OpenAPI-Generator Contributors| +|developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org| +|developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org| +|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false| +|groupId|groupId in generated pom.xml| |org.openapitools| +|handleExceptions|Add a 'throw exception' to each controller function. Add also a custom error handler where you can put your custom logic| |true| +|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false| +|invokerPackage|root package for generated code| |org.openapitools.api| +|java8|Option. Use Java8 classes instead of third party equivalents|
                        **true**
                        Use Java 8 classes such as Base64
                        **false**
                        Various third party libraries as needed
                        |false| +|licenseName|The name of the license| |Unlicense| +|licenseUrl|The URL of the license| |http://unlicense.org| +|modelPackage|package for generated models| |apimodels| +|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| +|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| +|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| |scmConnection|SCM connection in generated pom.xml| |scm:git:git@github.com:openapitools/openapi-generator.git| |scmDeveloperConnection|SCM developer connection in generated pom.xml| |scm:git:git@github.com:openapitools/openapi-generator.git| |scmUrl|SCM URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| -|developerName|developer name in generated pom.xml| |OpenAPI-Generator Contributors| -|developerEmail|developer email in generated pom.xml| |team@openapitools.org| -|developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org| -|developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org| -|licenseName|The name of the license| |Unlicense| -|licenseUrl|The URL of the license| |http://unlicense.org| -|sourceFolder|source folder for generated code| |/app| |serializableModel|boolean - toggle "implements Serializable" for generated models| |false| -|bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false| -|fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false| -|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false| -|withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false| -|dateLibrary|Option. Date library to use|
                        **joda**
                        Joda (for legacy app only)
                        **legacy**
                        Legacy java.util.Date (if you really have a good reason not to use threetenbp
                        **java8-localdatetime**
                        Java 8 using LocalDateTime (for legacy app only)
                        **java8**
                        Java 8 native JSR310 (preferred for jdk 1.8+) - note: this also sets "java8" to true
                        **threetenbp**
                        Backport of JSR310 (preferred for jdk < 1.8)
                        |threetenbp| -|java8|Option. Use Java8 classes instead of third party equivalents|
                        **true**
                        Use Java 8 classes such as Base64
                        **false**
                        Various third party libraries as needed
                        |false| -|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false| -|booleanGetterPrefix|Set booleanGetterPrefix| |get| -|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations)| |null| -|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| -|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| -|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| |snapshotVersion|Uses a SNAPSHOT version.|
                        **true**
                        Use a SnapShot Version
                        **false**
                        Use a Release Version
                        |null| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| +|sourceFolder|source folder for generated code| |/app| |title|server title name or client service name| |openapi-java-playframework| -|configPackage|configuration package for generated code| |org.openapitools.configuration| -|basePackage|base package for generated code| |org.openapitools| -|controllerOnly|Whether to generate only API interface stubs without the server files.| |false| |useBeanValidation|Use BeanValidation API annotations| |true| |useInterfaces|Makes the controllerImp implements an interface to facilitate automatic completion when updating from version x to y of your spec| |true| -|handleExceptions|Add a 'throw exception' to each controller function. Add also a custom error handler where you can put your custom logic| |true| -|wrapCalls|Add a wrapper to each controller function to handle things like metrics, response modification, etc..| |true| |useSwaggerUI|Add a route to /api which show your documentation in swagger-ui. Will also import needed dependencies| |true| +|withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false| +|wrapCalls|Add a wrapper to each controller function to handle things like metrics, response modification, etc..| |true| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | +|Array|java.util.List| +|ArrayList|java.util.ArrayList| +|BigDecimal|java.math.BigDecimal| +|Date|java.util.Date| +|DateTime|org.joda.time.*| +|File|java.io.File| +|HashMap|java.util.HashMap| +|List|java.util.*| +|LocalDate|org.joda.time.*| +|LocalDateTime|org.joda.time.*| +|LocalTime|org.joda.time.*| +|Map|java.util.Map| +|Set|java.util.*| +|Timestamp|java.sql.Timestamp| +|URI|java.net.URI| +|UUID|java.util.UUID| + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | +|array|ArrayList| +|map|HashMap| + + +## LANGUAGE PRIMITIVES + +
                        • Boolean
                        • +
                        • Double
                        • +
                        • Float
                        • +
                        • Integer
                        • +
                        • Long
                        • +
                        • Object
                        • +
                        • String
                        • +
                        • boolean
                        • +
                        • byte[]
                        • +
                        + +## RESERVED WORDS + +
                        • abstract
                        • +
                        • apiclient
                        • +
                        • apiexception
                        • +
                        • apiresponse
                        • +
                        • assert
                        • +
                        • boolean
                        • +
                        • break
                        • +
                        • byte
                        • +
                        • case
                        • +
                        • catch
                        • +
                        • char
                        • +
                        • class
                        • +
                        • configuration
                        • +
                        • const
                        • +
                        • continue
                        • +
                        • default
                        • +
                        • do
                        • +
                        • double
                        • +
                        • else
                        • +
                        • enum
                        • +
                        • extends
                        • +
                        • final
                        • +
                        • finally
                        • +
                        • float
                        • +
                        • for
                        • +
                        • goto
                        • +
                        • if
                        • +
                        • implements
                        • +
                        • import
                        • +
                        • instanceof
                        • +
                        • int
                        • +
                        • interface
                        • +
                        • localreturntype
                        • +
                        • localvaraccept
                        • +
                        • localvaraccepts
                        • +
                        • localvarauthnames
                        • +
                        • localvarcollectionqueryparams
                        • +
                        • localvarcontenttype
                        • +
                        • localvarcontenttypes
                        • +
                        • localvarcookieparams
                        • +
                        • localvarformparams
                        • +
                        • localvarheaderparams
                        • +
                        • localvarpath
                        • +
                        • localvarpostbody
                        • +
                        • localvarqueryparams
                        • +
                        • long
                        • +
                        • native
                        • +
                        • new
                        • +
                        • null
                        • +
                        • object
                        • +
                        • package
                        • +
                        • private
                        • +
                        • protected
                        • +
                        • public
                        • +
                        • return
                        • +
                        • short
                        • +
                        • static
                        • +
                        • strictfp
                        • +
                        • stringutil
                        • +
                        • super
                        • +
                        • switch
                        • +
                        • synchronized
                        • +
                        • this
                        • +
                        • throw
                        • +
                        • throws
                        • +
                        • transient
                        • +
                        • try
                        • +
                        • void
                        • +
                        • volatile
                        • +
                        • while
                        • +
                        diff --git a/docs/generators/java-undertow-server.md b/docs/generators/java-undertow-server.md index dd4bac2ca0..3e13225d8d 100644 --- a/docs/generators/java-undertow-server.md +++ b/docs/generators/java-undertow-server.md @@ -5,40 +5,157 @@ sidebar_label: java-undertow-server | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations)| |null| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| -|modelPackage|package for generated models| |null| |apiPackage|package for generated api classes| |null| -|invokerPackage|root package for generated code| |org.openapitools.handler| -|groupId|groupId in generated pom.xml| |org.openapitools| -|artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |openapi-undertow-server| -|artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |1.0.0| -|artifactUrl|artifact URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| |artifactDescription|artifact description in generated pom.xml| |OpenAPI Java| +|artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |openapi-undertow-server| +|artifactUrl|artifact URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| +|artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |1.0.0| +|bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false| +|booleanGetterPrefix|Set booleanGetterPrefix| |get| +|dateLibrary|Option. Date library to use|
                        **joda**
                        Joda (for legacy app only)
                        **legacy**
                        Legacy java.util.Date (if you really have a good reason not to use threetenbp
                        **java8-localdatetime**
                        Java 8 using LocalDateTime (for legacy app only)
                        **java8**
                        Java 8 native JSR310 (preferred for jdk 1.8+) - note: this also sets "java8" to true
                        **threetenbp**
                        Backport of JSR310 (preferred for jdk < 1.8)
                        |legacy| +|developerEmail|developer email in generated pom.xml| |team@openapitools.org| +|developerName|developer name in generated pom.xml| |OpenAPI-Generator Contributors| +|developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org| +|developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org| +|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false| +|groupId|groupId in generated pom.xml| |org.openapitools| +|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false| +|invokerPackage|root package for generated code| |org.openapitools.handler| +|java8|Option. Use Java8 classes instead of third party equivalents|
                        **true**
                        Use Java 8 classes such as Base64
                        **false**
                        Various third party libraries as needed
                        |false| +|licenseName|The name of the license| |Unlicense| +|licenseUrl|The URL of the license| |http://unlicense.org| +|modelPackage|package for generated models| |null| +|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| +|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| +|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| |scmConnection|SCM connection in generated pom.xml| |scm:git:git@github.com:openapitools/openapi-generator.git| |scmDeveloperConnection|SCM developer connection in generated pom.xml| |scm:git:git@github.com:openapitools/openapi-generator.git| |scmUrl|SCM URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| -|developerName|developer name in generated pom.xml| |OpenAPI-Generator Contributors| -|developerEmail|developer email in generated pom.xml| |team@openapitools.org| -|developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org| -|developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org| -|licenseName|The name of the license| |Unlicense| -|licenseUrl|The URL of the license| |http://unlicense.org| -|sourceFolder|source folder for generated code| |src/main/java| |serializableModel|boolean - toggle "implements Serializable" for generated models| |false| -|bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false| -|fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false| -|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false| -|withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false| -|dateLibrary|Option. Date library to use|
                        **joda**
                        Joda (for legacy app only)
                        **legacy**
                        Legacy java.util.Date (if you really have a good reason not to use threetenbp
                        **java8-localdatetime**
                        Java 8 using LocalDateTime (for legacy app only)
                        **java8**
                        Java 8 native JSR310 (preferred for jdk 1.8+) - note: this also sets "java8" to true
                        **threetenbp**
                        Backport of JSR310 (preferred for jdk < 1.8)
                        |legacy| -|java8|Option. Use Java8 classes instead of third party equivalents|
                        **true**
                        Use Java 8 classes such as Base64
                        **false**
                        Various third party libraries as needed
                        |false| -|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false| -|booleanGetterPrefix|Set booleanGetterPrefix| |get| -|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations)| |null| -|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| -|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| -|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| |snapshotVersion|Uses a SNAPSHOT version.|
                        **true**
                        Use a SnapShot Version
                        **false**
                        Use a Release Version
                        |null| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| +|sourceFolder|source folder for generated code| |src/main/java| +|withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | +|Array|java.util.List| +|ArrayList|java.util.ArrayList| +|BigDecimal|java.math.BigDecimal| +|Date|java.util.Date| +|DateTime|org.joda.time.*| +|File|java.io.File| +|HashMap|java.util.HashMap| +|List|java.util.*| +|LocalDate|org.joda.time.*| +|LocalDateTime|org.joda.time.*| +|LocalTime|org.joda.time.*| +|Map|java.util.Map| +|Set|java.util.*| +|Timestamp|java.sql.Timestamp| +|URI|java.net.URI| +|UUID|java.util.UUID| + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | +|array|ArrayList| +|map|HashMap| + + +## LANGUAGE PRIMITIVES + +
                        • Boolean
                        • +
                        • Double
                        • +
                        • Float
                        • +
                        • Integer
                        • +
                        • Long
                        • +
                        • Object
                        • +
                        • String
                        • +
                        • boolean
                        • +
                        • byte[]
                        • +
                        + +## RESERVED WORDS + +
                        • abstract
                        • +
                        • apiclient
                        • +
                        • apiexception
                        • +
                        • apiresponse
                        • +
                        • assert
                        • +
                        • boolean
                        • +
                        • break
                        • +
                        • byte
                        • +
                        • case
                        • +
                        • catch
                        • +
                        • char
                        • +
                        • class
                        • +
                        • configuration
                        • +
                        • const
                        • +
                        • continue
                        • +
                        • default
                        • +
                        • do
                        • +
                        • double
                        • +
                        • else
                        • +
                        • enum
                        • +
                        • extends
                        • +
                        • final
                        • +
                        • finally
                        • +
                        • float
                        • +
                        • for
                        • +
                        • goto
                        • +
                        • if
                        • +
                        • implements
                        • +
                        • import
                        • +
                        • instanceof
                        • +
                        • int
                        • +
                        • interface
                        • +
                        • localreturntype
                        • +
                        • localvaraccept
                        • +
                        • localvaraccepts
                        • +
                        • localvarauthnames
                        • +
                        • localvarcollectionqueryparams
                        • +
                        • localvarcontenttype
                        • +
                        • localvarcontenttypes
                        • +
                        • localvarcookieparams
                        • +
                        • localvarformparams
                        • +
                        • localvarheaderparams
                        • +
                        • localvarpath
                        • +
                        • localvarpostbody
                        • +
                        • localvarqueryparams
                        • +
                        • long
                        • +
                        • native
                        • +
                        • new
                        • +
                        • null
                        • +
                        • object
                        • +
                        • package
                        • +
                        • private
                        • +
                        • protected
                        • +
                        • public
                        • +
                        • return
                        • +
                        • short
                        • +
                        • static
                        • +
                        • strictfp
                        • +
                        • stringutil
                        • +
                        • super
                        • +
                        • switch
                        • +
                        • synchronized
                        • +
                        • this
                        • +
                        • throw
                        • +
                        • throws
                        • +
                        • transient
                        • +
                        • try
                        • +
                        • void
                        • +
                        • volatile
                        • +
                        • while
                        • +
                        diff --git a/docs/generators/java-vertx-web.md b/docs/generators/java-vertx-web.md index 2cc47cad07..584fae2dc2 100644 --- a/docs/generators/java-vertx-web.md +++ b/docs/generators/java-vertx-web.md @@ -5,40 +5,157 @@ sidebar_label: java-vertx-web | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations)| |null| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| -|modelPackage|package for generated models| |org.openapitools.vertxweb.server.model| |apiPackage|package for generated api classes| |org.openapitools.vertxweb.server.api| -|invokerPackage|root package for generated code| |org.openapitools.vertxweb.server| -|groupId|groupId in generated pom.xml| |org.openapitools| -|artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |openapi-java-vertx-web-server| -|artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |1.0.0-SNAPSHOT| -|artifactUrl|artifact URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| |artifactDescription|artifact description in generated pom.xml| |OpenAPI Java| +|artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |openapi-java-vertx-web-server| +|artifactUrl|artifact URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| +|artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |1.0.0-SNAPSHOT| +|bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false| +|booleanGetterPrefix|Set booleanGetterPrefix| |get| +|dateLibrary|Option. Date library to use|
                        **joda**
                        Joda (for legacy app only)
                        **legacy**
                        Legacy java.util.Date (if you really have a good reason not to use threetenbp
                        **java8-localdatetime**
                        Java 8 using LocalDateTime (for legacy app only)
                        **java8**
                        Java 8 native JSR310 (preferred for jdk 1.8+) - note: this also sets "java8" to true
                        **threetenbp**
                        Backport of JSR310 (preferred for jdk < 1.8)
                        |java8| +|developerEmail|developer email in generated pom.xml| |team@openapitools.org| +|developerName|developer name in generated pom.xml| |OpenAPI-Generator Contributors| +|developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org| +|developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org| +|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false| +|groupId|groupId in generated pom.xml| |org.openapitools| +|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false| +|invokerPackage|root package for generated code| |org.openapitools.vertxweb.server| +|java8|Option. Use Java8 classes instead of third party equivalents|
                        **true**
                        Use Java 8 classes such as Base64
                        **false**
                        Various third party libraries as needed
                        |false| +|licenseName|The name of the license| |Unlicense| +|licenseUrl|The URL of the license| |http://unlicense.org| +|modelPackage|package for generated models| |org.openapitools.vertxweb.server.model| +|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| +|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| +|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| |scmConnection|SCM connection in generated pom.xml| |scm:git:git@github.com:openapitools/openapi-generator.git| |scmDeveloperConnection|SCM developer connection in generated pom.xml| |scm:git:git@github.com:openapitools/openapi-generator.git| |scmUrl|SCM URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| -|developerName|developer name in generated pom.xml| |OpenAPI-Generator Contributors| -|developerEmail|developer email in generated pom.xml| |team@openapitools.org| -|developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org| -|developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org| -|licenseName|The name of the license| |Unlicense| -|licenseUrl|The URL of the license| |http://unlicense.org| -|sourceFolder|source folder for generated code| |src/main/java| |serializableModel|boolean - toggle "implements Serializable" for generated models| |false| -|bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false| -|fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false| -|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false| -|withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false| -|dateLibrary|Option. Date library to use|
                        **joda**
                        Joda (for legacy app only)
                        **legacy**
                        Legacy java.util.Date (if you really have a good reason not to use threetenbp
                        **java8-localdatetime**
                        Java 8 using LocalDateTime (for legacy app only)
                        **java8**
                        Java 8 native JSR310 (preferred for jdk 1.8+) - note: this also sets "java8" to true
                        **threetenbp**
                        Backport of JSR310 (preferred for jdk < 1.8)
                        |java8| -|java8|Option. Use Java8 classes instead of third party equivalents|
                        **true**
                        Use Java 8 classes such as Base64
                        **false**
                        Various third party libraries as needed
                        |false| -|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false| -|booleanGetterPrefix|Set booleanGetterPrefix| |get| -|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations)| |null| -|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| -|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| -|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| |snapshotVersion|Uses a SNAPSHOT version.|
                        **true**
                        Use a SnapShot Version
                        **false**
                        Use a Release Version
                        |null| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| +|sourceFolder|source folder for generated code| |src/main/java| +|withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | +|Array|java.util.List| +|ArrayList|java.util.ArrayList| +|BigDecimal|java.math.BigDecimal| +|Date|java.util.Date| +|DateTime|org.joda.time.*| +|File|java.io.File| +|HashMap|java.util.HashMap| +|List|java.util.*| +|LocalDate|org.joda.time.*| +|LocalDateTime|org.joda.time.*| +|LocalTime|org.joda.time.*| +|Map|java.util.Map| +|Set|java.util.*| +|Timestamp|java.sql.Timestamp| +|URI|java.net.URI| +|UUID|java.util.UUID| + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | +|array|ArrayList| +|map|HashMap| + + +## LANGUAGE PRIMITIVES + +
                        • Boolean
                        • +
                        • Double
                        • +
                        • Float
                        • +
                        • Integer
                        • +
                        • Long
                        • +
                        • Object
                        • +
                        • String
                        • +
                        • boolean
                        • +
                        • byte[]
                        • +
                        + +## RESERVED WORDS + +
                        • abstract
                        • +
                        • apiclient
                        • +
                        • apiexception
                        • +
                        • apiresponse
                        • +
                        • assert
                        • +
                        • boolean
                        • +
                        • break
                        • +
                        • byte
                        • +
                        • case
                        • +
                        • catch
                        • +
                        • char
                        • +
                        • class
                        • +
                        • configuration
                        • +
                        • const
                        • +
                        • continue
                        • +
                        • default
                        • +
                        • do
                        • +
                        • double
                        • +
                        • else
                        • +
                        • enum
                        • +
                        • extends
                        • +
                        • final
                        • +
                        • finally
                        • +
                        • float
                        • +
                        • for
                        • +
                        • goto
                        • +
                        • if
                        • +
                        • implements
                        • +
                        • import
                        • +
                        • instanceof
                        • +
                        • int
                        • +
                        • interface
                        • +
                        • localreturntype
                        • +
                        • localvaraccept
                        • +
                        • localvaraccepts
                        • +
                        • localvarauthnames
                        • +
                        • localvarcollectionqueryparams
                        • +
                        • localvarcontenttype
                        • +
                        • localvarcontenttypes
                        • +
                        • localvarcookieparams
                        • +
                        • localvarformparams
                        • +
                        • localvarheaderparams
                        • +
                        • localvarpath
                        • +
                        • localvarpostbody
                        • +
                        • localvarqueryparams
                        • +
                        • long
                        • +
                        • native
                        • +
                        • new
                        • +
                        • null
                        • +
                        • object
                        • +
                        • package
                        • +
                        • private
                        • +
                        • protected
                        • +
                        • public
                        • +
                        • return
                        • +
                        • short
                        • +
                        • static
                        • +
                        • strictfp
                        • +
                        • stringutil
                        • +
                        • super
                        • +
                        • switch
                        • +
                        • synchronized
                        • +
                        • this
                        • +
                        • throw
                        • +
                        • throws
                        • +
                        • transient
                        • +
                        • try
                        • +
                        • void
                        • +
                        • volatile
                        • +
                        • while
                        • +
                        diff --git a/docs/generators/java-vertx.md b/docs/generators/java-vertx.md index 1ad7527103..ea93520b0b 100644 --- a/docs/generators/java-vertx.md +++ b/docs/generators/java-vertx.md @@ -5,43 +5,160 @@ sidebar_label: java-vertx | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations)| |null| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| -|modelPackage|package for generated models| |org.openapitools.server.api.model| |apiPackage|package for generated api classes| |org.openapitools.server.api.verticle| -|invokerPackage|root package for generated code| |org.openapitools| -|groupId|groupId in generated pom.xml| |org.openapitools| -|artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |openapi-java-vertx-server| -|artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |1.0.0-SNAPSHOT| -|artifactUrl|artifact URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| |artifactDescription|artifact description in generated pom.xml| |OpenAPI Java| +|artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |openapi-java-vertx-server| +|artifactUrl|artifact URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| +|artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |1.0.0-SNAPSHOT| +|bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false| +|booleanGetterPrefix|Set booleanGetterPrefix| |get| +|dateLibrary|Option. Date library to use|
                        **joda**
                        Joda (for legacy app only)
                        **legacy**
                        Legacy java.util.Date (if you really have a good reason not to use threetenbp
                        **java8-localdatetime**
                        Java 8 using LocalDateTime (for legacy app only)
                        **java8**
                        Java 8 native JSR310 (preferred for jdk 1.8+) - note: this also sets "java8" to true
                        **threetenbp**
                        Backport of JSR310 (preferred for jdk < 1.8)
                        |java8| +|developerEmail|developer email in generated pom.xml| |team@openapitools.org| +|developerName|developer name in generated pom.xml| |OpenAPI-Generator Contributors| +|developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org| +|developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org| +|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false| +|groupId|groupId in generated pom.xml| |org.openapitools| +|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false| +|invokerPackage|root package for generated code| |org.openapitools| +|java8|Option. Use Java8 classes instead of third party equivalents|
                        **true**
                        Use Java 8 classes such as Base64
                        **false**
                        Various third party libraries as needed
                        |false| +|licenseName|The name of the license| |Unlicense| +|licenseUrl|The URL of the license| |http://unlicense.org| +|modelPackage|package for generated models| |org.openapitools.server.api.model| +|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| +|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| +|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|rxInterface|When specified, API interfaces are generated with RX and methods return Single<> and Comparable.| |false| +|rxVersion2|When specified in combination with rxInterface, API interfaces are generated with RxJava2.| |false| |scmConnection|SCM connection in generated pom.xml| |scm:git:git@github.com:openapitools/openapi-generator.git| |scmDeveloperConnection|SCM developer connection in generated pom.xml| |scm:git:git@github.com:openapitools/openapi-generator.git| |scmUrl|SCM URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| -|developerName|developer name in generated pom.xml| |OpenAPI-Generator Contributors| -|developerEmail|developer email in generated pom.xml| |team@openapitools.org| -|developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org| -|developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org| -|licenseName|The name of the license| |Unlicense| -|licenseUrl|The URL of the license| |http://unlicense.org| -|sourceFolder|source folder for generated code| |src/main/java| |serializableModel|boolean - toggle "implements Serializable" for generated models| |false| -|bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false| -|fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false| -|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false| -|withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false| -|dateLibrary|Option. Date library to use|
                        **joda**
                        Joda (for legacy app only)
                        **legacy**
                        Legacy java.util.Date (if you really have a good reason not to use threetenbp
                        **java8-localdatetime**
                        Java 8 using LocalDateTime (for legacy app only)
                        **java8**
                        Java 8 native JSR310 (preferred for jdk 1.8+) - note: this also sets "java8" to true
                        **threetenbp**
                        Backport of JSR310 (preferred for jdk < 1.8)
                        |java8| -|java8|Option. Use Java8 classes instead of third party equivalents|
                        **true**
                        Use Java 8 classes such as Base64
                        **false**
                        Various third party libraries as needed
                        |false| -|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false| -|booleanGetterPrefix|Set booleanGetterPrefix| |get| -|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations)| |null| -|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| -|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| -|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| |snapshotVersion|Uses a SNAPSHOT version.|
                        **true**
                        Use a SnapShot Version
                        **false**
                        Use a Release Version
                        |null| -|rxInterface|When specified, API interfaces are generated with RX and methods return Single<> and Comparable.| |false| -|rxVersion2|When specified in combination with rxInterface, API interfaces are generated with RxJava2.| |false| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| +|sourceFolder|source folder for generated code| |src/main/java| |vertxSwaggerRouterVersion|Specify the version of the swagger router library| |null| +|withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | +|Array|java.util.List| +|ArrayList|java.util.ArrayList| +|BigDecimal|java.math.BigDecimal| +|Date|java.util.Date| +|DateTime|org.joda.time.*| +|File|java.io.File| +|HashMap|java.util.HashMap| +|List|java.util.*| +|LocalDate|org.joda.time.*| +|LocalDateTime|org.joda.time.*| +|LocalTime|org.joda.time.*| +|Map|java.util.Map| +|Set|java.util.*| +|Timestamp|java.sql.Timestamp| +|URI|java.net.URI| +|UUID|java.util.UUID| + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | +|array|ArrayList| +|map|HashMap| + + +## LANGUAGE PRIMITIVES + +
                        • Boolean
                        • +
                        • Double
                        • +
                        • Float
                        • +
                        • Integer
                        • +
                        • Long
                        • +
                        • Object
                        • +
                        • String
                        • +
                        • boolean
                        • +
                        • byte[]
                        • +
                        + +## RESERVED WORDS + +
                        • abstract
                        • +
                        • apiclient
                        • +
                        • apiexception
                        • +
                        • apiresponse
                        • +
                        • assert
                        • +
                        • boolean
                        • +
                        • break
                        • +
                        • byte
                        • +
                        • case
                        • +
                        • catch
                        • +
                        • char
                        • +
                        • class
                        • +
                        • configuration
                        • +
                        • const
                        • +
                        • continue
                        • +
                        • default
                        • +
                        • do
                        • +
                        • double
                        • +
                        • else
                        • +
                        • enum
                        • +
                        • extends
                        • +
                        • final
                        • +
                        • finally
                        • +
                        • float
                        • +
                        • for
                        • +
                        • goto
                        • +
                        • if
                        • +
                        • implements
                        • +
                        • import
                        • +
                        • instanceof
                        • +
                        • int
                        • +
                        • interface
                        • +
                        • localreturntype
                        • +
                        • localvaraccept
                        • +
                        • localvaraccepts
                        • +
                        • localvarauthnames
                        • +
                        • localvarcollectionqueryparams
                        • +
                        • localvarcontenttype
                        • +
                        • localvarcontenttypes
                        • +
                        • localvarcookieparams
                        • +
                        • localvarformparams
                        • +
                        • localvarheaderparams
                        • +
                        • localvarpath
                        • +
                        • localvarpostbody
                        • +
                        • localvarqueryparams
                        • +
                        • long
                        • +
                        • native
                        • +
                        • new
                        • +
                        • null
                        • +
                        • object
                        • +
                        • package
                        • +
                        • private
                        • +
                        • protected
                        • +
                        • public
                        • +
                        • return
                        • +
                        • short
                        • +
                        • static
                        • +
                        • strictfp
                        • +
                        • stringutil
                        • +
                        • super
                        • +
                        • switch
                        • +
                        • synchronized
                        • +
                        • this
                        • +
                        • throw
                        • +
                        • throws
                        • +
                        • transient
                        • +
                        • try
                        • +
                        • void
                        • +
                        • volatile
                        • +
                        • while
                        • +
                        diff --git a/docs/generators/java.md b/docs/generators/java.md index 9c267d17fb..fddd7ba9ff 100644 --- a/docs/generators/java.md +++ b/docs/generators/java.md @@ -5,55 +5,172 @@ sidebar_label: java | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations)| |null| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| -|modelPackage|package for generated models| |org.openapitools.client.model| |apiPackage|package for generated api classes| |org.openapitools.client.api| -|invokerPackage|root package for generated code| |org.openapitools.client| -|groupId|groupId in generated pom.xml| |org.openapitools| -|artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |openapi-java-client| -|artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |1.0.0| -|artifactUrl|artifact URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| |artifactDescription|artifact description in generated pom.xml| |OpenAPI Java| +|artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |openapi-java-client| +|artifactUrl|artifact URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| +|artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |1.0.0| +|bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false| +|booleanGetterPrefix|Set booleanGetterPrefix| |get| +|caseInsensitiveResponseHeaders|Make API response's headers case-insensitive. Available on okhttp-gson, jersey2 libraries| |false| +|dateLibrary|Option. Date library to use|
                        **joda**
                        Joda (for legacy app only)
                        **legacy**
                        Legacy java.util.Date (if you really have a good reason not to use threetenbp
                        **java8-localdatetime**
                        Java 8 using LocalDateTime (for legacy app only)
                        **java8**
                        Java 8 native JSR310 (preferred for jdk 1.8+) - note: this also sets "java8" to true
                        **threetenbp**
                        Backport of JSR310 (preferred for jdk < 1.8)
                        |threetenbp| +|developerEmail|developer email in generated pom.xml| |team@openapitools.org| +|developerName|developer name in generated pom.xml| |OpenAPI-Generator Contributors| +|developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org| +|developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org| +|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|feignVersion|Version of OpenFeign: '10.x', '9.x' (default)| |false| +|fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false| +|groupId|groupId in generated pom.xml| |org.openapitools| +|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false| +|invokerPackage|root package for generated code| |org.openapitools.client| +|java8|Option. Use Java8 classes instead of third party equivalents|
                        **true**
                        Use Java 8 classes such as Base64
                        **false**
                        Various third party libraries as needed
                        |false| +|library|library template (sub-template) to use|
                        **jersey1**
                        HTTP client: Jersey client 1.19.x. JSON processing: Jackson 2.9.x. Enable Java6 support using '-DsupportJava6=true'. Enable gzip request encoding using '-DuseGzipFeature=true'. IMPORTANT NOTE: jersey 1.x is no longer actively maintained so please upgrade to 'jersey2' or other HTTP libaries instead.
                        **jersey2**
                        HTTP client: Jersey client 2.25.1. JSON processing: Jackson 2.9.x
                        **feign**
                        HTTP client: OpenFeign 9.x or 10.x. JSON processing: Jackson 2.9.x. To enable OpenFeign 10.x, set the 'feignVersion' option to '10.x'
                        **okhttp-gson**
                        [DEFAULT] HTTP client: OkHttp 3.x. JSON processing: Gson 2.8.x. Enable Parcelable models on Android using '-DparcelableModel=true'. Enable gzip request encoding using '-DuseGzipFeature=true'.
                        **retrofit**
                        HTTP client: OkHttp 2.x. JSON processing: Gson 2.x (Retrofit 1.9.0). IMPORTANT NOTE: retrofit1.x is no longer actively maintained so please upgrade to 'retrofit2' instead.
                        **retrofit2**
                        HTTP client: OkHttp 3.x. JSON processing: Gson 2.x (Retrofit 2.3.0). Enable the RxJava adapter using '-DuseRxJava[2]=true'. (RxJava 1.x or 2.x)
                        **resttemplate**
                        HTTP client: Spring RestTemplate 4.x. JSON processing: Jackson 2.9.x
                        **webclient**
                        HTTP client: Spring WebClient 5.x. JSON processing: Jackson 2.9.x
                        **resteasy**
                        HTTP client: Resteasy client 3.x. JSON processing: Jackson 2.9.x
                        **vertx**
                        HTTP client: VertX client 3.x. JSON processing: Jackson 2.9.x
                        **google-api-client**
                        HTTP client: Google API client 1.x. JSON processing: Jackson 2.9.x
                        **rest-assured**
                        HTTP client: rest-assured : 4.x. JSON processing: Gson 2.x or Jackson 2.9.x. Only for Java8
                        **native**
                        HTTP client: Java native HttpClient. JSON processing: Jackson 2.9.x. Only for Java11+
                        **microprofile**
                        HTTP client: Microprofile client X.x. JSON processing: Jackson 2.9.x
                        |okhttp-gson| +|licenseName|The name of the license| |Unlicense| +|licenseUrl|The URL of the license| |http://unlicense.org| +|modelPackage|package for generated models| |org.openapitools.client.model| +|parcelableModel|Whether to generate models for Android that implement Parcelable with the okhttp-gson library.| |false| +|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| +|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| +|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| +|performBeanValidation|Perform BeanValidation| |false| +|playVersion|Version of Play! Framework (possible values "play24", "play25" (default), "play26")| |null| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| |scmConnection|SCM connection in generated pom.xml| |scm:git:git@github.com:openapitools/openapi-generator.git| |scmDeveloperConnection|SCM developer connection in generated pom.xml| |scm:git:git@github.com:openapitools/openapi-generator.git| |scmUrl|SCM URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| -|developerName|developer name in generated pom.xml| |OpenAPI-Generator Contributors| -|developerEmail|developer email in generated pom.xml| |team@openapitools.org| -|developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org| -|developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org| -|licenseName|The name of the license| |Unlicense| -|licenseUrl|The URL of the license| |http://unlicense.org| -|sourceFolder|source folder for generated code| |src/main/java| |serializableModel|boolean - toggle "implements Serializable" for generated models| |false| -|bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false| -|fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false| -|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false| -|withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false| -|dateLibrary|Option. Date library to use|
                        **joda**
                        Joda (for legacy app only)
                        **legacy**
                        Legacy java.util.Date (if you really have a good reason not to use threetenbp
                        **java8-localdatetime**
                        Java 8 using LocalDateTime (for legacy app only)
                        **java8**
                        Java 8 native JSR310 (preferred for jdk 1.8+) - note: this also sets "java8" to true
                        **threetenbp**
                        Backport of JSR310 (preferred for jdk < 1.8)
                        |threetenbp| -|java8|Option. Use Java8 classes instead of third party equivalents|
                        **true**
                        Use Java 8 classes such as Base64
                        **false**
                        Various third party libraries as needed
                        |false| -|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false| -|booleanGetterPrefix|Set booleanGetterPrefix| |get| -|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations)| |null| -|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| -|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| -|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| +|serializationLibrary|Serialization library, default depends from the library|
                        **jackson**
                        Use Jackson as serialization library
                        **gson**
                        Use Gson as serialization library
                        |null| |snapshotVersion|Uses a SNAPSHOT version.|
                        **true**
                        Use a SnapShot Version
                        **false**
                        Use a Release Version
                        |null| -|useRxJava|Whether to use the RxJava adapter with the retrofit2 library.| |false| -|useRxJava2|Whether to use the RxJava2 adapter with the retrofit2 library.| |false| -|parcelableModel|Whether to generate models for Android that implement Parcelable with the okhttp-gson library.| |false| -|usePlayWS|Use Play! Async HTTP client (Play WS API)| |false| -|playVersion|Version of Play! Framework (possible values "play24", "play25" (default), "play26")| |null| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| +|sourceFolder|source folder for generated code| |src/main/java| |supportJava6|Whether to support Java6 with the Jersey1 library.| |false| |useBeanValidation|Use BeanValidation API annotations| |false| -|performBeanValidation|Perform BeanValidation| |false| |useGzipFeature|Send gzip-encoded requests| |false| -|useRuntimeException|Use RuntimeException instead of Exception| |false| -|feignVersion|Version of OpenFeign: '10.x', '9.x' (default)| |false| +|usePlayWS|Use Play! Async HTTP client (Play WS API)| |false| |useReflectionEqualsHashCode|Use org.apache.commons.lang3.builder for equals and hashCode in the models. WARNING: This will fail under a security manager, unless the appropriate permissions are set up correctly and also there's potential performance impact.| |false| -|caseInsensitiveResponseHeaders|Make API response's headers case-insensitive. Available on okhttp-gson, jersey2 libraries| |false| -|library|library template (sub-template) to use|
                        **jersey1**
                        HTTP client: Jersey client 1.19.x. JSON processing: Jackson 2.9.x. Enable Java6 support using '-DsupportJava6=true'. Enable gzip request encoding using '-DuseGzipFeature=true'. IMPORTANT NOTE: jersey 1.x is no longer actively maintained so please upgrade to 'jersey2' or other HTTP libaries instead.
                        **jersey2**
                        HTTP client: Jersey client 2.25.1. JSON processing: Jackson 2.9.x
                        **feign**
                        HTTP client: OpenFeign 9.x or 10.x. JSON processing: Jackson 2.9.x. To enable OpenFeign 10.x, set the 'feignVersion' option to '10.x'
                        **okhttp-gson**
                        [DEFAULT] HTTP client: OkHttp 3.x. JSON processing: Gson 2.8.x. Enable Parcelable models on Android using '-DparcelableModel=true'. Enable gzip request encoding using '-DuseGzipFeature=true'.
                        **retrofit**
                        HTTP client: OkHttp 2.x. JSON processing: Gson 2.x (Retrofit 1.9.0). IMPORTANT NOTE: retrofit1.x is no longer actively maintained so please upgrade to 'retrofit2' instead.
                        **retrofit2**
                        HTTP client: OkHttp 3.x. JSON processing: Gson 2.x (Retrofit 2.3.0). Enable the RxJava adapter using '-DuseRxJava[2]=true'. (RxJava 1.x or 2.x)
                        **resttemplate**
                        HTTP client: Spring RestTemplate 4.x. JSON processing: Jackson 2.9.x
                        **webclient**
                        HTTP client: Spring WebClient 5.x. JSON processing: Jackson 2.9.x
                        **resteasy**
                        HTTP client: Resteasy client 3.x. JSON processing: Jackson 2.9.x
                        **vertx**
                        HTTP client: VertX client 3.x. JSON processing: Jackson 2.9.x
                        **google-api-client**
                        HTTP client: Google API client 1.x. JSON processing: Jackson 2.9.x
                        **rest-assured**
                        HTTP client: rest-assured : 4.x. JSON processing: Gson 2.x or Jackson 2.9.x. Only for Java8
                        **native**
                        HTTP client: Java native HttpClient. JSON processing: Jackson 2.9.x. Only for Java11+
                        **microprofile**
                        HTTP client: Microprofile client X.x. JSON processing: Jackson 2.9.x
                        |okhttp-gson| -|serializationLibrary|Serialization library, default depends from the library|
                        **jackson**
                        Use Jackson as serialization library
                        **gson**
                        Use Gson as serialization library
                        |null| +|useRuntimeException|Use RuntimeException instead of Exception| |false| +|useRxJava|Whether to use the RxJava adapter with the retrofit2 library.| |false| +|useRxJava2|Whether to use the RxJava2 adapter with the retrofit2 library.| |false| +|withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | +|Array|java.util.List| +|ArrayList|java.util.ArrayList| +|BigDecimal|java.math.BigDecimal| +|Date|java.util.Date| +|DateTime|org.joda.time.*| +|File|java.io.File| +|HashMap|java.util.HashMap| +|List|java.util.*| +|LocalDate|org.joda.time.*| +|LocalDateTime|org.joda.time.*| +|LocalTime|org.joda.time.*| +|Map|java.util.Map| +|Set|java.util.*| +|Timestamp|java.sql.Timestamp| +|URI|java.net.URI| +|UUID|java.util.UUID| + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | +|array|ArrayList| +|map|HashMap| + + +## LANGUAGE PRIMITIVES + +
                        • Boolean
                        • +
                        • Double
                        • +
                        • Float
                        • +
                        • Integer
                        • +
                        • Long
                        • +
                        • Object
                        • +
                        • String
                        • +
                        • boolean
                        • +
                        • byte[]
                        • +
                        + +## RESERVED WORDS + +
                        • abstract
                        • +
                        • apiclient
                        • +
                        • apiexception
                        • +
                        • apiresponse
                        • +
                        • assert
                        • +
                        • boolean
                        • +
                        • break
                        • +
                        • byte
                        • +
                        • case
                        • +
                        • catch
                        • +
                        • char
                        • +
                        • class
                        • +
                        • configuration
                        • +
                        • const
                        • +
                        • continue
                        • +
                        • default
                        • +
                        • do
                        • +
                        • double
                        • +
                        • else
                        • +
                        • enum
                        • +
                        • extends
                        • +
                        • final
                        • +
                        • finally
                        • +
                        • float
                        • +
                        • for
                        • +
                        • goto
                        • +
                        • if
                        • +
                        • implements
                        • +
                        • import
                        • +
                        • instanceof
                        • +
                        • int
                        • +
                        • interface
                        • +
                        • localreturntype
                        • +
                        • localvaraccept
                        • +
                        • localvaraccepts
                        • +
                        • localvarauthnames
                        • +
                        • localvarcollectionqueryparams
                        • +
                        • localvarcontenttype
                        • +
                        • localvarcontenttypes
                        • +
                        • localvarcookieparams
                        • +
                        • localvarformparams
                        • +
                        • localvarheaderparams
                        • +
                        • localvarpath
                        • +
                        • localvarpostbody
                        • +
                        • localvarqueryparams
                        • +
                        • long
                        • +
                        • native
                        • +
                        • new
                        • +
                        • null
                        • +
                        • object
                        • +
                        • package
                        • +
                        • private
                        • +
                        • protected
                        • +
                        • public
                        • +
                        • return
                        • +
                        • short
                        • +
                        • static
                        • +
                        • strictfp
                        • +
                        • stringutil
                        • +
                        • super
                        • +
                        • switch
                        • +
                        • synchronized
                        • +
                        • this
                        • +
                        • throw
                        • +
                        • throws
                        • +
                        • transient
                        • +
                        • try
                        • +
                        • void
                        • +
                        • volatile
                        • +
                        • while
                        • +
                        diff --git a/docs/generators/javascript-closure-angular.md b/docs/generators/javascript-closure-angular.md index 20c4048fec..0308a0a824 100644 --- a/docs/generators/javascript-closure-angular.md +++ b/docs/generators/javascript-closure-angular.md @@ -5,10 +5,81 @@ sidebar_label: javascript-closure-angular | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| |useEs6|use ES6 templates| |false| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | +|array|Array| + + +## LANGUAGE PRIMITIVES + +
                        • Blob
                        • +
                        • Date
                        • +
                        • Object
                        • +
                        • boolean
                        • +
                        • number
                        • +
                        • string
                        • +
                        + +## RESERVED WORDS + +
                        • abstract
                        • +
                        • assert
                        • +
                        • break
                        • +
                        • byte
                        • +
                        • case
                        • +
                        • catch
                        • +
                        • char
                        • +
                        • class
                        • +
                        • const
                        • +
                        • continue
                        • +
                        • default
                        • +
                        • do
                        • +
                        • double
                        • +
                        • else
                        • +
                        • enum
                        • +
                        • extends
                        • +
                        • final
                        • +
                        • finally
                        • +
                        • for
                        • +
                        • goto
                        • +
                        • if
                        • +
                        • implements
                        • +
                        • import
                        • +
                        • instanceof
                        • +
                        • int
                        • +
                        • interface
                        • +
                        • new
                        • +
                        • package
                        • +
                        • private
                        • +
                        • protected
                        • +
                        • public
                        • +
                        • return
                        • +
                        • short
                        • +
                        • static
                        • +
                        • super
                        • +
                        • switch
                        • +
                        • synchronized
                        • +
                        • this
                        • +
                        • throw
                        • +
                        • throws
                        • +
                        • transient
                        • +
                        • try
                        • +
                        • void
                        • +
                        • while
                        • +
                        diff --git a/docs/generators/javascript-flowtyped.md b/docs/generators/javascript-flowtyped.md index f5fb5207f4..0946f51912 100644 --- a/docs/generators/javascript-flowtyped.md +++ b/docs/generators/javascript-flowtyped.md @@ -5,14 +5,131 @@ sidebar_label: javascript-flowtyped | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name| |camelCase| -|supportsES6|Generate code that conforms to ES6.| |false| |npmName|The name under which you want to publish generated npm package. Required to generate a full package| |null| -|npmVersion|The version of your npm package. If not provided, using the version from the OpenAPI specification file.| |1.0.0| -|snapshot|When setting this property to true, the version will be suffixed with -SNAPSHOT.yyyyMMddHHmm| |false| |npmRepository|Use this property to set an url your private npmRepo in the package.json| |null| +|npmVersion|The version of your npm package. If not provided, using the version from the OpenAPI specification file.| |1.0.0| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|snapshot|When setting this property to true, the version will be suffixed with -SNAPSHOT.yyyyMMddHHmm| |false| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| +|supportsES6|Generate code that conforms to ES6.| |false| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | +|array|Array| +|list|Array| +|map|Object| + + +## LANGUAGE PRIMITIVES + +
                        • Array
                        • +
                        • Blob
                        • +
                        • Date
                        • +
                        • File
                        • +
                        • Object
                        • +
                        • boolean
                        • +
                        • number
                        • +
                        • string
                        • +
                        + +## RESERVED WORDS + +
                        • abstract
                        • +
                        • arguments
                        • +
                        • array
                        • +
                        • boolean
                        • +
                        • break
                        • +
                        • byte
                        • +
                        • case
                        • +
                        • catch
                        • +
                        • char
                        • +
                        • class
                        • +
                        • const
                        • +
                        • continue
                        • +
                        • date
                        • +
                        • debugger
                        • +
                        • default
                        • +
                        • delete
                        • +
                        • do
                        • +
                        • double
                        • +
                        • else
                        • +
                        • enum
                        • +
                        • eval
                        • +
                        • export
                        • +
                        • extends
                        • +
                        • false
                        • +
                        • final
                        • +
                        • finally
                        • +
                        • float
                        • +
                        • for
                        • +
                        • formparams
                        • +
                        • function
                        • +
                        • goto
                        • +
                        • hasownproperty
                        • +
                        • headerparams
                        • +
                        • if
                        • +
                        • implements
                        • +
                        • import
                        • +
                        • in
                        • +
                        • infinity
                        • +
                        • instanceof
                        • +
                        • int
                        • +
                        • interface
                        • +
                        • isfinite
                        • +
                        • isnan
                        • +
                        • isprototypeof
                        • +
                        • let
                        • +
                        • long
                        • +
                        • math
                        • +
                        • nan
                        • +
                        • native
                        • +
                        • new
                        • +
                        • null
                        • +
                        • number
                        • +
                        • object
                        • +
                        • package
                        • +
                        • private
                        • +
                        • protected
                        • +
                        • prototype
                        • +
                        • public
                        • +
                        • queryparameters
                        • +
                        • requestoptions
                        • +
                        • return
                        • +
                        • short
                        • +
                        • static
                        • +
                        • string
                        • +
                        • super
                        • +
                        • switch
                        • +
                        • synchronized
                        • +
                        • this
                        • +
                        • throw
                        • +
                        • throws
                        • +
                        • tostring
                        • +
                        • transient
                        • +
                        • true
                        • +
                        • try
                        • +
                        • typeof
                        • +
                        • undefined
                        • +
                        • useformdata
                        • +
                        • valueof
                        • +
                        • var
                        • +
                        • varlocaldeferred
                        • +
                        • varlocalpath
                        • +
                        • void
                        • +
                        • volatile
                        • +
                        • while
                        • +
                        • with
                        • +
                        • yield
                        • +
                        diff --git a/docs/generators/javascript.md b/docs/generators/javascript.md index 23aa54a57b..7064b4a287 100644 --- a/docs/generators/javascript.md +++ b/docs/generators/javascript.md @@ -5,24 +5,135 @@ sidebar_label: javascript | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| -|sourceFolder|source folder for generated code| |src| -|invokerPackage|root package for generated code| |null| |apiPackage|package for generated api classes| |null| -|modelPackage|package for generated models| |null| -|projectName|name of the project (Default: generated from info.title or "openapi-js-client")| |null| -|moduleName|module name for AMD, Node or globals (Default: generated from <projectName>)| |null| -|projectDescription|description of the project (Default: using info.description or "Client library of <projectName>")| |null| -|projectVersion|version of the project (Default: using info.version or "1.0.0")| |null| -|licenseName|name of the license the project uses (Default: using info.license.name)| |null| -|usePromises|use Promises as return values from the client API, instead of superagent callbacks| |false| -|emitModelMethods|generate getters and setters for model properties| |false| |emitJSDoc|generate JSDoc comments| |true| -|useInheritance|use JavaScript prototype chains & delegation for inheritance| |true| +|emitModelMethods|generate getters and setters for model properties| |false| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true| -|useES6|use JavaScript ES6 (ECMAScript 6) (beta). Default is ES6.| |true| +|invokerPackage|root package for generated code| |null| +|licenseName|name of the license the project uses (Default: using info.license.name)| |null| +|modelPackage|package for generated models| |null| |modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name| |camelCase| +|moduleName|module name for AMD, Node or globals (Default: generated from <projectName>)| |null| +|npmRepository|Use this property to set an url your private npmRepo in the package.json| |null| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|projectDescription|description of the project (Default: using info.description or "Client library of <projectName>")| |null| +|projectName|name of the project (Default: generated from info.title or "openapi-js-client")| |null| +|projectVersion|version of the project (Default: using info.version or "1.0.0")| |null| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| +|sourceFolder|source folder for generated code| |src| +|useES6|use JavaScript ES6 (ECMAScript 6) (beta). Default is ES6.| |true| +|useInheritance|use JavaScript prototype chains & delegation for inheritance| |true| +|usePromises|use Promises as return values from the client API, instead of superagent callbacks| |false| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | +|array|Array| +|list|Array| +|map|Object| + + +## LANGUAGE PRIMITIVES + +
                        • Array
                        • +
                        • Blob
                        • +
                        • Boolean
                        • +
                        • Date
                        • +
                        • File
                        • +
                        • Number
                        • +
                        • Object
                        • +
                        • String
                        • +
                        + +## RESERVED WORDS + +
                        • abstract
                        • +
                        • arguments
                        • +
                        • array
                        • +
                        • boolean
                        • +
                        • break
                        • +
                        • byte
                        • +
                        • case
                        • +
                        • catch
                        • +
                        • char
                        • +
                        • class
                        • +
                        • const
                        • +
                        • continue
                        • +
                        • date
                        • +
                        • debugger
                        • +
                        • default
                        • +
                        • delete
                        • +
                        • do
                        • +
                        • double
                        • +
                        • else
                        • +
                        • enum
                        • +
                        • eval
                        • +
                        • export
                        • +
                        • extends
                        • +
                        • false
                        • +
                        • final
                        • +
                        • finally
                        • +
                        • float
                        • +
                        • for
                        • +
                        • function
                        • +
                        • goto
                        • +
                        • hasownproperty
                        • +
                        • if
                        • +
                        • implements
                        • +
                        • import
                        • +
                        • in
                        • +
                        • infinity
                        • +
                        • instanceof
                        • +
                        • int
                        • +
                        • interface
                        • +
                        • isfinite
                        • +
                        • isnan
                        • +
                        • isprototypeof
                        • +
                        • let
                        • +
                        • long
                        • +
                        • math
                        • +
                        • nan
                        • +
                        • native
                        • +
                        • new
                        • +
                        • null
                        • +
                        • number
                        • +
                        • object
                        • +
                        • package
                        • +
                        • private
                        • +
                        • protected
                        • +
                        • prototype
                        • +
                        • public
                        • +
                        • return
                        • +
                        • short
                        • +
                        • static
                        • +
                        • string
                        • +
                        • super
                        • +
                        • switch
                        • +
                        • synchronized
                        • +
                        • this
                        • +
                        • throw
                        • +
                        • throws
                        • +
                        • tostring
                        • +
                        • transient
                        • +
                        • true
                        • +
                        • try
                        • +
                        • typeof
                        • +
                        • undefined
                        • +
                        • valueof
                        • +
                        • var
                        • +
                        • void
                        • +
                        • volatile
                        • +
                        • while
                        • +
                        • with
                        • +
                        • yield
                        • +
                        diff --git a/docs/generators/jaxrs-cxf-cdi.md b/docs/generators/jaxrs-cxf-cdi.md index ff8be78361..0842a00cce 100644 --- a/docs/generators/jaxrs-cxf-cdi.md +++ b/docs/generators/jaxrs-cxf-cdi.md @@ -5,51 +5,167 @@ sidebar_label: jaxrs-cxf-cdi | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations)| |null| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| -|modelPackage|package for generated models| |org.openapitools.model| |apiPackage|package for generated api classes| |org.openapitools.api| -|invokerPackage|root package for generated code| |org.openapitools.api| -|groupId|groupId in generated pom.xml| |org.openapitools| -|artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |openapi-jaxrs-cxf-cdi-server| -|artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |1.0.0| -|artifactUrl|artifact URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| |artifactDescription|artifact description in generated pom.xml| |OpenAPI Java| +|artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |openapi-jaxrs-cxf-cdi-server| +|artifactUrl|artifact URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| +|artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |1.0.0| +|bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false| +|booleanGetterPrefix|Set booleanGetterPrefix| |get| +|dateLibrary|Option. Date library to use|
                        **joda**
                        Joda (for legacy app only)
                        **legacy**
                        Legacy java.util.Date (if you really have a good reason not to use threetenbp
                        **java8-localdatetime**
                        Java 8 using LocalDateTime (for legacy app only)
                        **java8**
                        Java 8 native JSR310 (preferred for jdk 1.8+) - note: this also sets "java8" to true
                        **threetenbp**
                        Backport of JSR310 (preferred for jdk < 1.8)
                        |legacy| +|developerEmail|developer email in generated pom.xml| |team@openapitools.org| +|developerName|developer name in generated pom.xml| |OpenAPI-Generator Contributors| +|developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org| +|developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org| +|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false| +|generatePom|Whether to generate pom.xml if the file does not already exist.| |true| +|groupId|groupId in generated pom.xml| |org.openapitools| +|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false| +|implFolder|folder for generated implementation code| |src/main/java| +|interfaceOnly|Whether to generate only API interface stubs without the server files.| |false| +|invokerPackage|root package for generated code| |org.openapitools.api| +|java8|Option. Use Java8 classes instead of third party equivalents|
                        **true**
                        Use Java 8 classes such as Base64
                        **false**
                        Various third party libraries as needed
                        |false| +|library|library template (sub-template)|
                        **<default>**
                        JAXRS spec only, to be deployed in an app server (TomEE, JBoss, WLS, ...)
                        **quarkus**
                        Server using Quarkus
                        **thorntail**
                        Server using Thorntail
                        **openliberty**
                        Server using Open Liberty
                        **helidon**
                        Server using Helidon
                        |<default>| +|licenseName|The name of the license| |Unlicense| +|licenseUrl|The URL of the license| |http://unlicense.org| +|modelPackage|package for generated models| |org.openapitools.model| +|openApiSpecFileLocation|Location where the file containing the spec will be generated in the output folder. No file generated when set to null or empty string.| |null| +|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| +|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| +|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|returnResponse|Whether generate API interface should return javax.ws.rs.core.Response instead of a deserialized entity. Only useful if interfaceOnly is true.| |false| |scmConnection|SCM connection in generated pom.xml| |scm:git:git@github.com:openapitools/openapi-generator.git| |scmDeveloperConnection|SCM developer connection in generated pom.xml| |scm:git:git@github.com:openapitools/openapi-generator.git| |scmUrl|SCM URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| -|developerName|developer name in generated pom.xml| |OpenAPI-Generator Contributors| -|developerEmail|developer email in generated pom.xml| |team@openapitools.org| -|developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org| -|developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org| -|licenseName|The name of the license| |Unlicense| -|licenseUrl|The URL of the license| |http://unlicense.org| -|sourceFolder|source folder for generated code| |src/gen/java| |serializableModel|boolean - toggle "implements Serializable" for generated models| |false| -|bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false| -|fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false| -|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false| -|withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false| -|dateLibrary|Option. Date library to use|
                        **joda**
                        Joda (for legacy app only)
                        **legacy**
                        Legacy java.util.Date (if you really have a good reason not to use threetenbp
                        **java8-localdatetime**
                        Java 8 using LocalDateTime (for legacy app only)
                        **java8**
                        Java 8 native JSR310 (preferred for jdk 1.8+) - note: this also sets "java8" to true
                        **threetenbp**
                        Backport of JSR310 (preferred for jdk < 1.8)
                        |legacy| -|java8|Option. Use Java8 classes instead of third party equivalents|
                        **true**
                        Use Java 8 classes such as Base64
                        **false**
                        Various third party libraries as needed
                        |false| -|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false| -|booleanGetterPrefix|Set booleanGetterPrefix| |get| -|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations)| |null| -|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| -|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| -|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| +|serverPort|The port on which the server should be started| |8080| |snapshotVersion|Uses a SNAPSHOT version.|
                        **true**
                        Use a SnapShot Version
                        **false**
                        Use a Release Version
                        |null| -|implFolder|folder for generated implementation code| |src/main/java| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| +|sourceFolder|source folder for generated code| |src/gen/java| |title|a title describing the application| |OpenAPI Server| |useBeanValidation|Use BeanValidation API annotations| |true| -|serverPort|The port on which the server should be started| |8080| -|library|library template (sub-template)|
                        **<default>**
                        JAXRS spec only, to be deployed in an app server (TomEE, JBoss, WLS, ...)
                        **quarkus**
                        Server using Quarkus
                        **thorntail**
                        Server using Thorntail
                        **openliberty**
                        Server using Open Liberty
                        **helidon**
                        Server using Helidon
                        |<default>| -|generatePom|Whether to generate pom.xml if the file does not already exist.| |true| -|interfaceOnly|Whether to generate only API interface stubs without the server files.| |false| -|returnResponse|Whether generate API interface should return javax.ws.rs.core.Response instead of a deserialized entity. Only useful if interfaceOnly is true.| |false| |useSwaggerAnnotations|Whether to generate Swagger annotations.| |true| -|openApiSpecFileLocation|Location where the file containing the spec will be generated in the output folder. No file generated when set to null or empty string.| |null| -|useBeanValidation|Use BeanValidation API annotations| |true| +|withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | +|Array|java.util.List| +|ArrayList|java.util.ArrayList| +|BigDecimal|java.math.BigDecimal| +|Date|java.util.Date| +|DateTime|org.joda.time.*| +|File|java.io.File| +|HashMap|java.util.HashMap| +|List|java.util.*| +|LocalDate|org.joda.time.LocalDate| +|LocalDateTime|org.joda.time.*| +|LocalTime|org.joda.time.*| +|Map|java.util.Map| +|Set|java.util.*| +|Timestamp|java.sql.Timestamp| +|URI|java.net.URI| +|UUID|java.util.UUID| + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | +|array|ArrayList| +|map|HashMap| + + +## LANGUAGE PRIMITIVES + +
                        • Boolean
                        • +
                        • Double
                        • +
                        • Float
                        • +
                        • Integer
                        • +
                        • Long
                        • +
                        • Object
                        • +
                        • String
                        • +
                        • boolean
                        • +
                        • byte[]
                        • +
                        + +## RESERVED WORDS + +
                        • abstract
                        • +
                        • apiclient
                        • +
                        • apiexception
                        • +
                        • apiresponse
                        • +
                        • assert
                        • +
                        • boolean
                        • +
                        • break
                        • +
                        • byte
                        • +
                        • case
                        • +
                        • catch
                        • +
                        • char
                        • +
                        • class
                        • +
                        • configuration
                        • +
                        • const
                        • +
                        • continue
                        • +
                        • default
                        • +
                        • do
                        • +
                        • double
                        • +
                        • else
                        • +
                        • enum
                        • +
                        • extends
                        • +
                        • final
                        • +
                        • finally
                        • +
                        • float
                        • +
                        • for
                        • +
                        • goto
                        • +
                        • if
                        • +
                        • implements
                        • +
                        • import
                        • +
                        • instanceof
                        • +
                        • int
                        • +
                        • interface
                        • +
                        • localreturntype
                        • +
                        • localvaraccept
                        • +
                        • localvaraccepts
                        • +
                        • localvarauthnames
                        • +
                        • localvarcollectionqueryparams
                        • +
                        • localvarcontenttype
                        • +
                        • localvarcontenttypes
                        • +
                        • localvarcookieparams
                        • +
                        • localvarformparams
                        • +
                        • localvarheaderparams
                        • +
                        • localvarpath
                        • +
                        • localvarpostbody
                        • +
                        • localvarqueryparams
                        • +
                        • long
                        • +
                        • native
                        • +
                        • new
                        • +
                        • null
                        • +
                        • object
                        • +
                        • package
                        • +
                        • private
                        • +
                        • protected
                        • +
                        • public
                        • +
                        • return
                        • +
                        • short
                        • +
                        • static
                        • +
                        • strictfp
                        • +
                        • stringutil
                        • +
                        • super
                        • +
                        • switch
                        • +
                        • synchronized
                        • +
                        • this
                        • +
                        • throw
                        • +
                        • throws
                        • +
                        • transient
                        • +
                        • try
                        • +
                        • void
                        • +
                        • volatile
                        • +
                        • while
                        • +
                        diff --git a/docs/generators/jaxrs-cxf-client.md b/docs/generators/jaxrs-cxf-client.md index 401b13a22c..713ef85478 100644 --- a/docs/generators/jaxrs-cxf-client.md +++ b/docs/generators/jaxrs-cxf-client.md @@ -5,44 +5,161 @@ sidebar_label: jaxrs-cxf-client | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations)| |null| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| -|modelPackage|package for generated models| |org.openapitools.model| |apiPackage|package for generated api classes| |org.openapitools.api| -|invokerPackage|root package for generated code| |org.openapitools.api| -|groupId|groupId in generated pom.xml| |org.openapitools| -|artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |openapi-jaxrs-client| -|artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |1.0.0| -|artifactUrl|artifact URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| |artifactDescription|artifact description in generated pom.xml| |OpenAPI Java| +|artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |openapi-jaxrs-client| +|artifactUrl|artifact URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| +|artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |1.0.0| +|bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false| +|booleanGetterPrefix|Set booleanGetterPrefix| |get| +|dateLibrary|Option. Date library to use|
                        **joda**
                        Joda (for legacy app only)
                        **legacy**
                        Legacy java.util.Date (if you really have a good reason not to use threetenbp
                        **java8-localdatetime**
                        Java 8 using LocalDateTime (for legacy app only)
                        **java8**
                        Java 8 native JSR310 (preferred for jdk 1.8+) - note: this also sets "java8" to true
                        **threetenbp**
                        Backport of JSR310 (preferred for jdk < 1.8)
                        |legacy| +|developerEmail|developer email in generated pom.xml| |team@openapitools.org| +|developerName|developer name in generated pom.xml| |OpenAPI-Generator Contributors| +|developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org| +|developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org| +|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false| +|groupId|groupId in generated pom.xml| |org.openapitools| +|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false| +|invokerPackage|root package for generated code| |org.openapitools.api| +|java8|Option. Use Java8 classes instead of third party equivalents|
                        **true**
                        Use Java 8 classes such as Base64
                        **false**
                        Various third party libraries as needed
                        |false| +|licenseName|The name of the license| |Unlicense| +|licenseUrl|The URL of the license| |http://unlicense.org| +|modelPackage|package for generated models| |org.openapitools.model| +|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| +|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| +|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| |scmConnection|SCM connection in generated pom.xml| |scm:git:git@github.com:openapitools/openapi-generator.git| |scmDeveloperConnection|SCM developer connection in generated pom.xml| |scm:git:git@github.com:openapitools/openapi-generator.git| |scmUrl|SCM URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| -|developerName|developer name in generated pom.xml| |OpenAPI-Generator Contributors| -|developerEmail|developer email in generated pom.xml| |team@openapitools.org| -|developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org| -|developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org| -|licenseName|The name of the license| |Unlicense| -|licenseUrl|The URL of the license| |http://unlicense.org| -|sourceFolder|source folder for generated code| |src/gen/java| |serializableModel|boolean - toggle "implements Serializable" for generated models| |false| -|bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false| -|fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false| -|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false| -|withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false| -|dateLibrary|Option. Date library to use|
                        **joda**
                        Joda (for legacy app only)
                        **legacy**
                        Legacy java.util.Date (if you really have a good reason not to use threetenbp
                        **java8-localdatetime**
                        Java 8 using LocalDateTime (for legacy app only)
                        **java8**
                        Java 8 native JSR310 (preferred for jdk 1.8+) - note: this also sets "java8" to true
                        **threetenbp**
                        Backport of JSR310 (preferred for jdk < 1.8)
                        |legacy| -|java8|Option. Use Java8 classes instead of third party equivalents|
                        **true**
                        Use Java 8 classes such as Base64
                        **false**
                        Various third party libraries as needed
                        |false| -|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false| -|booleanGetterPrefix|Set booleanGetterPrefix| |get| -|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations)| |null| -|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| -|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| -|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| |snapshotVersion|Uses a SNAPSHOT version.|
                        **true**
                        Use a SnapShot Version
                        **false**
                        Use a Release Version
                        |null| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| +|sourceFolder|source folder for generated code| |src/gen/java| |useBeanValidation|Use BeanValidation API annotations| |false| +|useGenericResponse|Use generic response| |false| |useGzipFeatureForTests|Use Gzip Feature for tests| |false| |useLoggingFeatureForTests|Use Logging Feature for tests| |false| -|useGenericResponse|Use generic response| |false| +|withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | +|Array|java.util.List| +|ArrayList|java.util.ArrayList| +|BigDecimal|java.math.BigDecimal| +|Date|java.util.Date| +|DateTime|org.joda.time.*| +|File|java.io.File| +|HashMap|java.util.HashMap| +|List|java.util.*| +|LocalDate|org.joda.time.LocalDate| +|LocalDateTime|org.joda.time.*| +|LocalTime|org.joda.time.*| +|Map|java.util.Map| +|Set|java.util.*| +|Timestamp|java.sql.Timestamp| +|URI|java.net.URI| +|UUID|java.util.UUID| + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | +|array|ArrayList| +|map|HashMap| + + +## LANGUAGE PRIMITIVES + +
                        • Boolean
                        • +
                        • Double
                        • +
                        • Float
                        • +
                        • Integer
                        • +
                        • Long
                        • +
                        • Object
                        • +
                        • String
                        • +
                        • boolean
                        • +
                        • byte[]
                        • +
                        + +## RESERVED WORDS + +
                        • abstract
                        • +
                        • apiclient
                        • +
                        • apiexception
                        • +
                        • apiresponse
                        • +
                        • assert
                        • +
                        • boolean
                        • +
                        • break
                        • +
                        • byte
                        • +
                        • case
                        • +
                        • catch
                        • +
                        • char
                        • +
                        • class
                        • +
                        • configuration
                        • +
                        • const
                        • +
                        • continue
                        • +
                        • default
                        • +
                        • do
                        • +
                        • double
                        • +
                        • else
                        • +
                        • enum
                        • +
                        • extends
                        • +
                        • final
                        • +
                        • finally
                        • +
                        • float
                        • +
                        • for
                        • +
                        • goto
                        • +
                        • if
                        • +
                        • implements
                        • +
                        • import
                        • +
                        • instanceof
                        • +
                        • int
                        • +
                        • interface
                        • +
                        • localreturntype
                        • +
                        • localvaraccept
                        • +
                        • localvaraccepts
                        • +
                        • localvarauthnames
                        • +
                        • localvarcollectionqueryparams
                        • +
                        • localvarcontenttype
                        • +
                        • localvarcontenttypes
                        • +
                        • localvarcookieparams
                        • +
                        • localvarformparams
                        • +
                        • localvarheaderparams
                        • +
                        • localvarpath
                        • +
                        • localvarpostbody
                        • +
                        • localvarqueryparams
                        • +
                        • long
                        • +
                        • native
                        • +
                        • new
                        • +
                        • null
                        • +
                        • object
                        • +
                        • package
                        • +
                        • private
                        • +
                        • protected
                        • +
                        • public
                        • +
                        • return
                        • +
                        • short
                        • +
                        • static
                        • +
                        • strictfp
                        • +
                        • stringutil
                        • +
                        • super
                        • +
                        • switch
                        • +
                        • synchronized
                        • +
                        • this
                        • +
                        • throw
                        • +
                        • throws
                        • +
                        • transient
                        • +
                        • try
                        • +
                        • void
                        • +
                        • volatile
                        • +
                        • while
                        • +
                        diff --git a/docs/generators/jaxrs-cxf-extended.md b/docs/generators/jaxrs-cxf-extended.md index 03dcf52b07..14e8995141 100644 --- a/docs/generators/jaxrs-cxf-extended.md +++ b/docs/generators/jaxrs-cxf-extended.md @@ -5,66 +5,183 @@ sidebar_label: jaxrs-cxf-extended | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|addConsumesProducesJson|Add @Consumes/@Produces Json to API interface| |false| +|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations)| |null| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| -|modelPackage|package for generated models| |org.openapitools.model| |apiPackage|package for generated api classes| |org.openapitools.api| -|invokerPackage|root package for generated code| |org.openapitools.api| -|groupId|groupId in generated pom.xml| |org.openapitools| -|artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |openapi-cxf-server| -|artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |1.0.0| -|artifactUrl|artifact URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| |artifactDescription|artifact description in generated pom.xml| |OpenAPI Java| +|artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |openapi-cxf-server| +|artifactUrl|artifact URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| +|artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |1.0.0| +|bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false| +|booleanGetterPrefix|Set booleanGetterPrefix| |get| +|dateLibrary|Option. Date library to use|
                        **joda**
                        Joda (for legacy app only)
                        **legacy**
                        Legacy java.util.Date (if you really have a good reason not to use threetenbp
                        **java8-localdatetime**
                        Java 8 using LocalDateTime (for legacy app only)
                        **java8**
                        Java 8 native JSR310 (preferred for jdk 1.8+) - note: this also sets "java8" to true
                        **threetenbp**
                        Backport of JSR310 (preferred for jdk < 1.8)
                        |legacy| +|developerEmail|developer email in generated pom.xml| |team@openapitools.org| +|developerName|developer name in generated pom.xml| |OpenAPI-Generator Contributors| +|developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org| +|developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org| +|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false| +|generateJbossDeploymentDescriptor|Generate Jboss Deployment Descriptor| |false| +|generateNonSpringApplication|Generate non-Spring application| |false| +|generateOperationBody|Generate fully functional operation bodies| |false| +|generateSpringApplication|Generate Spring application| |false| +|generateSpringBootApplication|Generate Spring Boot application| |false| +|groupId|groupId in generated pom.xml| |org.openapitools| +|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false| +|implFolder|folder for generated implementation code| |src/main/java| +|invokerPackage|root package for generated code| |org.openapitools.api| +|java8|Option. Use Java8 classes instead of third party equivalents|
                        **true**
                        Use Java 8 classes such as Base64
                        **false**
                        Various third party libraries as needed
                        |false| +|licenseName|The name of the license| |Unlicense| +|licenseUrl|The URL of the license| |http://unlicense.org| +|loadTestDataFromFile|Load test data from a generated JSON file| |false| +|modelPackage|package for generated models| |org.openapitools.model| +|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| +|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| +|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| |scmConnection|SCM connection in generated pom.xml| |scm:git:git@github.com:openapitools/openapi-generator.git| |scmDeveloperConnection|SCM developer connection in generated pom.xml| |scm:git:git@github.com:openapitools/openapi-generator.git| |scmUrl|SCM URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| -|developerName|developer name in generated pom.xml| |OpenAPI-Generator Contributors| -|developerEmail|developer email in generated pom.xml| |team@openapitools.org| -|developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org| -|developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org| -|licenseName|The name of the license| |Unlicense| -|licenseUrl|The URL of the license| |http://unlicense.org| -|sourceFolder|source folder for generated code| |src/main/java| |serializableModel|boolean - toggle "implements Serializable" for generated models| |false| -|bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false| -|fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false| -|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false| -|withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false| -|dateLibrary|Option. Date library to use|
                        **joda**
                        Joda (for legacy app only)
                        **legacy**
                        Legacy java.util.Date (if you really have a good reason not to use threetenbp
                        **java8-localdatetime**
                        Java 8 using LocalDateTime (for legacy app only)
                        **java8**
                        Java 8 native JSR310 (preferred for jdk 1.8+) - note: this also sets "java8" to true
                        **threetenbp**
                        Backport of JSR310 (preferred for jdk < 1.8)
                        |legacy| -|java8|Option. Use Java8 classes instead of third party equivalents|
                        **true**
                        Use Java 8 classes such as Base64
                        **false**
                        Various third party libraries as needed
                        |false| -|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false| -|booleanGetterPrefix|Set booleanGetterPrefix| |get| -|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations)| |null| -|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| -|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| -|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| -|snapshotVersion|Uses a SNAPSHOT version.|
                        **true**
                        Use a SnapShot Version
                        **false**
                        Use a Release Version
                        |null| -|implFolder|folder for generated implementation code| |src/main/java| -|title|a title describing the application| |OpenAPI Server| -|useBeanValidation|Use BeanValidation API annotations| |true| |serverPort|The port on which the server should be started| |8080| -|generateSpringApplication|Generate Spring application| |false| +|snapshotVersion|Uses a SNAPSHOT version.|
                        **true**
                        Use a SnapShot Version
                        **false**
                        Use a Release Version
                        |null| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| +|sourceFolder|source folder for generated code| |src/main/java| +|supportMultipleSpringServices|Support generation of Spring services from multiple specifications| |false| +|testDataControlFile|JSON file to control test data generation| |null| +|testDataFile|JSON file to contain generated test data| |null| +|title|a title describing the application| |OpenAPI Server| +|useAnnotatedBasePath|Use @Path annotations for basePath| |false| +|useBeanValidation|Use BeanValidation API annotations| |true| +|useBeanValidationFeature|Use BeanValidation Feature| |false| +|useGenericResponse|Use generic response| |false| +|useGzipFeature|Use Gzip Feature| |false| +|useGzipFeatureForTests|Use Gzip Feature for tests| |false| +|useLoggingFeature|Use Logging Feature| |false| +|useLoggingFeatureForTests|Use Logging Feature for tests| |false| +|useMultipartFeature|Use Multipart Feature| |false| |useSpringAnnotationConfig|Use Spring Annotation Config| |false| |useSwaggerFeature|Use Swagger Feature| |false| |useSwaggerUI|Use Swagger UI| |false| |useWadlFeature|Use WADL Feature| |false| -|useMultipartFeature|Use Multipart Feature| |false| -|useGzipFeature|Use Gzip Feature| |false| -|useGzipFeatureForTests|Use Gzip Feature for tests| |false| -|useBeanValidationFeature|Use BeanValidation Feature| |false| -|useLoggingFeature|Use Logging Feature| |false| -|useLoggingFeatureForTests|Use Logging Feature for tests| |false| -|generateSpringBootApplication|Generate Spring Boot application| |false| -|generateJbossDeploymentDescriptor|Generate Jboss Deployment Descriptor| |false| -|addConsumesProducesJson|Add @Consumes/@Produces Json to API interface| |false| -|useAnnotatedBasePath|Use @Path annotations for basePath| |false| -|generateNonSpringApplication|Generate non-Spring application| |false| -|useGenericResponse|Use generic response| |false| -|supportMultipleSpringServices|Support generation of Spring services from multiple specifications| |false| -|generateOperationBody|Generate fully functional operation bodies| |false| -|loadTestDataFromFile|Load test data from a generated JSON file| |false| -|testDataFile|JSON file to contain generated test data| |null| -|testDataControlFile|JSON file to control test data generation| |null| +|withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | +|Array|java.util.List| +|ArrayList|java.util.ArrayList| +|BigDecimal|java.math.BigDecimal| +|Date|java.util.Date| +|DateTime|org.joda.time.*| +|File|java.io.File| +|HashMap|java.util.HashMap| +|List|java.util.*| +|LocalDate|org.joda.time.LocalDate| +|LocalDateTime|org.joda.time.*| +|LocalTime|org.joda.time.*| +|Map|java.util.Map| +|Set|java.util.*| +|Timestamp|java.sql.Timestamp| +|URI|java.net.URI| +|UUID|java.util.UUID| + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | +|array|ArrayList| +|map|HashMap| + + +## LANGUAGE PRIMITIVES + +
                        • Boolean
                        • +
                        • Double
                        • +
                        • Float
                        • +
                        • Integer
                        • +
                        • Long
                        • +
                        • Object
                        • +
                        • String
                        • +
                        • boolean
                        • +
                        • byte[]
                        • +
                        + +## RESERVED WORDS + +
                        • abstract
                        • +
                        • apiclient
                        • +
                        • apiexception
                        • +
                        • apiresponse
                        • +
                        • assert
                        • +
                        • boolean
                        • +
                        • break
                        • +
                        • byte
                        • +
                        • case
                        • +
                        • catch
                        • +
                        • char
                        • +
                        • class
                        • +
                        • configuration
                        • +
                        • const
                        • +
                        • continue
                        • +
                        • default
                        • +
                        • do
                        • +
                        • double
                        • +
                        • else
                        • +
                        • enum
                        • +
                        • extends
                        • +
                        • final
                        • +
                        • finally
                        • +
                        • float
                        • +
                        • for
                        • +
                        • goto
                        • +
                        • if
                        • +
                        • implements
                        • +
                        • import
                        • +
                        • instanceof
                        • +
                        • int
                        • +
                        • interface
                        • +
                        • localreturntype
                        • +
                        • localvaraccept
                        • +
                        • localvaraccepts
                        • +
                        • localvarauthnames
                        • +
                        • localvarcollectionqueryparams
                        • +
                        • localvarcontenttype
                        • +
                        • localvarcontenttypes
                        • +
                        • localvarcookieparams
                        • +
                        • localvarformparams
                        • +
                        • localvarheaderparams
                        • +
                        • localvarpath
                        • +
                        • localvarpostbody
                        • +
                        • localvarqueryparams
                        • +
                        • long
                        • +
                        • native
                        • +
                        • new
                        • +
                        • null
                        • +
                        • object
                        • +
                        • package
                        • +
                        • private
                        • +
                        • protected
                        • +
                        • public
                        • +
                        • return
                        • +
                        • short
                        • +
                        • static
                        • +
                        • strictfp
                        • +
                        • stringutil
                        • +
                        • super
                        • +
                        • switch
                        • +
                        • synchronized
                        • +
                        • this
                        • +
                        • throw
                        • +
                        • throws
                        • +
                        • transient
                        • +
                        • try
                        • +
                        • void
                        • +
                        • volatile
                        • +
                        • while
                        • +
                        diff --git a/docs/generators/jaxrs-cxf.md b/docs/generators/jaxrs-cxf.md index 5bb65f09b1..1fc41f7b17 100644 --- a/docs/generators/jaxrs-cxf.md +++ b/docs/generators/jaxrs-cxf.md @@ -5,61 +5,178 @@ sidebar_label: jaxrs-cxf | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|addConsumesProducesJson|Add @Consumes/@Produces Json to API interface| |false| +|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations)| |null| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| -|modelPackage|package for generated models| |org.openapitools.model| |apiPackage|package for generated api classes| |org.openapitools.api| -|invokerPackage|root package for generated code| |org.openapitools.api| -|groupId|groupId in generated pom.xml| |org.openapitools| -|artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |openapi-cxf-server| -|artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |1.0.0| -|artifactUrl|artifact URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| |artifactDescription|artifact description in generated pom.xml| |OpenAPI Java| +|artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |openapi-cxf-server| +|artifactUrl|artifact URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| +|artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |1.0.0| +|bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false| +|booleanGetterPrefix|Set booleanGetterPrefix| |get| +|dateLibrary|Option. Date library to use|
                        **joda**
                        Joda (for legacy app only)
                        **legacy**
                        Legacy java.util.Date (if you really have a good reason not to use threetenbp
                        **java8-localdatetime**
                        Java 8 using LocalDateTime (for legacy app only)
                        **java8**
                        Java 8 native JSR310 (preferred for jdk 1.8+) - note: this also sets "java8" to true
                        **threetenbp**
                        Backport of JSR310 (preferred for jdk < 1.8)
                        |legacy| +|developerEmail|developer email in generated pom.xml| |team@openapitools.org| +|developerName|developer name in generated pom.xml| |OpenAPI-Generator Contributors| +|developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org| +|developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org| +|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false| +|generateJbossDeploymentDescriptor|Generate Jboss Deployment Descriptor| |false| +|generateNonSpringApplication|Generate non-Spring application| |false| +|generateSpringApplication|Generate Spring application| |false| +|generateSpringBootApplication|Generate Spring Boot application| |false| +|groupId|groupId in generated pom.xml| |org.openapitools| +|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false| +|implFolder|folder for generated implementation code| |src/main/java| +|invokerPackage|root package for generated code| |org.openapitools.api| +|java8|Option. Use Java8 classes instead of third party equivalents|
                        **true**
                        Use Java 8 classes such as Base64
                        **false**
                        Various third party libraries as needed
                        |false| +|licenseName|The name of the license| |Unlicense| +|licenseUrl|The URL of the license| |http://unlicense.org| +|modelPackage|package for generated models| |org.openapitools.model| +|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| +|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| +|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| |scmConnection|SCM connection in generated pom.xml| |scm:git:git@github.com:openapitools/openapi-generator.git| |scmDeveloperConnection|SCM developer connection in generated pom.xml| |scm:git:git@github.com:openapitools/openapi-generator.git| |scmUrl|SCM URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| -|developerName|developer name in generated pom.xml| |OpenAPI-Generator Contributors| -|developerEmail|developer email in generated pom.xml| |team@openapitools.org| -|developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org| -|developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org| -|licenseName|The name of the license| |Unlicense| -|licenseUrl|The URL of the license| |http://unlicense.org| -|sourceFolder|source folder for generated code| |src/main/java| |serializableModel|boolean - toggle "implements Serializable" for generated models| |false| -|bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false| -|fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false| -|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false| -|withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false| -|dateLibrary|Option. Date library to use|
                        **joda**
                        Joda (for legacy app only)
                        **legacy**
                        Legacy java.util.Date (if you really have a good reason not to use threetenbp
                        **java8-localdatetime**
                        Java 8 using LocalDateTime (for legacy app only)
                        **java8**
                        Java 8 native JSR310 (preferred for jdk 1.8+) - note: this also sets "java8" to true
                        **threetenbp**
                        Backport of JSR310 (preferred for jdk < 1.8)
                        |legacy| -|java8|Option. Use Java8 classes instead of third party equivalents|
                        **true**
                        Use Java 8 classes such as Base64
                        **false**
                        Various third party libraries as needed
                        |false| -|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false| -|booleanGetterPrefix|Set booleanGetterPrefix| |get| -|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations)| |null| -|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| -|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| -|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| -|snapshotVersion|Uses a SNAPSHOT version.|
                        **true**
                        Use a SnapShot Version
                        **false**
                        Use a Release Version
                        |null| -|implFolder|folder for generated implementation code| |src/main/java| -|title|a title describing the application| |OpenAPI Server| -|useBeanValidation|Use BeanValidation API annotations| |true| |serverPort|The port on which the server should be started| |8080| -|generateSpringApplication|Generate Spring application| |false| +|snapshotVersion|Uses a SNAPSHOT version.|
                        **true**
                        Use a SnapShot Version
                        **false**
                        Use a Release Version
                        |null| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| +|sourceFolder|source folder for generated code| |src/main/java| +|title|a title describing the application| |OpenAPI Server| +|useAnnotatedBasePath|Use @Path annotations for basePath| |false| +|useBeanValidation|Use BeanValidation API annotations| |true| +|useBeanValidationFeature|Use BeanValidation Feature| |false| +|useGenericResponse|Use generic response| |false| +|useGzipFeature|Use Gzip Feature| |false| +|useGzipFeatureForTests|Use Gzip Feature for tests| |false| +|useLoggingFeature|Use Logging Feature| |false| +|useLoggingFeatureForTests|Use Logging Feature for tests| |false| +|useMultipartFeature|Use Multipart Feature| |false| |useSpringAnnotationConfig|Use Spring Annotation Config| |false| |useSwaggerFeature|Use Swagger Feature| |false| |useSwaggerUI|Use Swagger UI| |false| |useWadlFeature|Use WADL Feature| |false| -|useMultipartFeature|Use Multipart Feature| |false| -|useGzipFeature|Use Gzip Feature| |false| -|useGzipFeatureForTests|Use Gzip Feature for tests| |false| -|useBeanValidationFeature|Use BeanValidation Feature| |false| -|useLoggingFeature|Use Logging Feature| |false| -|useLoggingFeatureForTests|Use Logging Feature for tests| |false| -|generateSpringBootApplication|Generate Spring Boot application| |false| -|generateJbossDeploymentDescriptor|Generate Jboss Deployment Descriptor| |false| -|addConsumesProducesJson|Add @Consumes/@Produces Json to API interface| |false| -|useAnnotatedBasePath|Use @Path annotations for basePath| |false| -|generateNonSpringApplication|Generate non-Spring application| |false| -|useGenericResponse|Use generic response| |false| +|withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | +|Array|java.util.List| +|ArrayList|java.util.ArrayList| +|BigDecimal|java.math.BigDecimal| +|Date|java.util.Date| +|DateTime|org.joda.time.*| +|File|java.io.File| +|HashMap|java.util.HashMap| +|List|java.util.*| +|LocalDate|org.joda.time.LocalDate| +|LocalDateTime|org.joda.time.*| +|LocalTime|org.joda.time.*| +|Map|java.util.Map| +|Set|java.util.*| +|Timestamp|java.sql.Timestamp| +|URI|java.net.URI| +|UUID|java.util.UUID| + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | +|array|ArrayList| +|map|HashMap| + + +## LANGUAGE PRIMITIVES + +
                        • Boolean
                        • +
                        • Double
                        • +
                        • Float
                        • +
                        • Integer
                        • +
                        • Long
                        • +
                        • Object
                        • +
                        • String
                        • +
                        • boolean
                        • +
                        • byte[]
                        • +
                        + +## RESERVED WORDS + +
                        • abstract
                        • +
                        • apiclient
                        • +
                        • apiexception
                        • +
                        • apiresponse
                        • +
                        • assert
                        • +
                        • boolean
                        • +
                        • break
                        • +
                        • byte
                        • +
                        • case
                        • +
                        • catch
                        • +
                        • char
                        • +
                        • class
                        • +
                        • configuration
                        • +
                        • const
                        • +
                        • continue
                        • +
                        • default
                        • +
                        • do
                        • +
                        • double
                        • +
                        • else
                        • +
                        • enum
                        • +
                        • extends
                        • +
                        • final
                        • +
                        • finally
                        • +
                        • float
                        • +
                        • for
                        • +
                        • goto
                        • +
                        • if
                        • +
                        • implements
                        • +
                        • import
                        • +
                        • instanceof
                        • +
                        • int
                        • +
                        • interface
                        • +
                        • localreturntype
                        • +
                        • localvaraccept
                        • +
                        • localvaraccepts
                        • +
                        • localvarauthnames
                        • +
                        • localvarcollectionqueryparams
                        • +
                        • localvarcontenttype
                        • +
                        • localvarcontenttypes
                        • +
                        • localvarcookieparams
                        • +
                        • localvarformparams
                        • +
                        • localvarheaderparams
                        • +
                        • localvarpath
                        • +
                        • localvarpostbody
                        • +
                        • localvarqueryparams
                        • +
                        • long
                        • +
                        • native
                        • +
                        • new
                        • +
                        • null
                        • +
                        • object
                        • +
                        • package
                        • +
                        • private
                        • +
                        • protected
                        • +
                        • public
                        • +
                        • return
                        • +
                        • short
                        • +
                        • static
                        • +
                        • strictfp
                        • +
                        • stringutil
                        • +
                        • super
                        • +
                        • switch
                        • +
                        • synchronized
                        • +
                        • this
                        • +
                        • throw
                        • +
                        • throws
                        • +
                        • transient
                        • +
                        • try
                        • +
                        • void
                        • +
                        • volatile
                        • +
                        • while
                        • +
                        diff --git a/docs/generators/jaxrs-jersey.md b/docs/generators/jaxrs-jersey.md index 489987ffc0..d1851341f6 100644 --- a/docs/generators/jaxrs-jersey.md +++ b/docs/generators/jaxrs-jersey.md @@ -5,47 +5,164 @@ sidebar_label: jaxrs-jersey | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations)| |null| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| -|modelPackage|package for generated models| |org.openapitools.model| |apiPackage|package for generated api classes| |org.openapitools.api| -|invokerPackage|root package for generated code| |org.openapitools.api| -|groupId|groupId in generated pom.xml| |org.openapitools| -|artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |openapi-jaxrs-server| -|artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |1.0.0| -|artifactUrl|artifact URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| |artifactDescription|artifact description in generated pom.xml| |OpenAPI Java| +|artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |openapi-jaxrs-server| +|artifactUrl|artifact URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| +|artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |1.0.0| +|bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false| +|booleanGetterPrefix|Set booleanGetterPrefix| |get| +|dateLibrary|Option. Date library to use|
                        **joda**
                        Joda (for legacy app only)
                        **legacy**
                        Legacy java.util.Date (if you really have a good reason not to use threetenbp
                        **java8-localdatetime**
                        Java 8 using LocalDateTime (for legacy app only)
                        **java8**
                        Java 8 native JSR310 (preferred for jdk 1.8+) - note: this also sets "java8" to true
                        **threetenbp**
                        Backport of JSR310 (preferred for jdk < 1.8)
                        |legacy| +|developerEmail|developer email in generated pom.xml| |team@openapitools.org| +|developerName|developer name in generated pom.xml| |OpenAPI-Generator Contributors| +|developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org| +|developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org| +|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false| +|groupId|groupId in generated pom.xml| |org.openapitools| +|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false| +|implFolder|folder for generated implementation code| |src/main/java| +|invokerPackage|root package for generated code| |org.openapitools.api| +|java8|Option. Use Java8 classes instead of third party equivalents|
                        **true**
                        Use Java 8 classes such as Base64
                        **false**
                        Various third party libraries as needed
                        |false| +|library|library template (sub-template)|
                        **jersey1**
                        Jersey core 1.x
                        **jersey2**
                        Jersey core 2.x
                        |jersey2| +|licenseName|The name of the license| |Unlicense| +|licenseUrl|The URL of the license| |http://unlicense.org| +|modelPackage|package for generated models| |org.openapitools.model| +|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| +|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| +|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| |scmConnection|SCM connection in generated pom.xml| |scm:git:git@github.com:openapitools/openapi-generator.git| |scmDeveloperConnection|SCM developer connection in generated pom.xml| |scm:git:git@github.com:openapitools/openapi-generator.git| |scmUrl|SCM URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| -|developerName|developer name in generated pom.xml| |OpenAPI-Generator Contributors| -|developerEmail|developer email in generated pom.xml| |team@openapitools.org| -|developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org| -|developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org| -|licenseName|The name of the license| |Unlicense| -|licenseUrl|The URL of the license| |http://unlicense.org| -|sourceFolder|source folder for generated code| |src/main/java| |serializableModel|boolean - toggle "implements Serializable" for generated models| |false| -|bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false| -|fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false| -|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false| -|withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false| -|dateLibrary|Option. Date library to use|
                        **joda**
                        Joda (for legacy app only)
                        **legacy**
                        Legacy java.util.Date (if you really have a good reason not to use threetenbp
                        **java8-localdatetime**
                        Java 8 using LocalDateTime (for legacy app only)
                        **java8**
                        Java 8 native JSR310 (preferred for jdk 1.8+) - note: this also sets "java8" to true
                        **threetenbp**
                        Backport of JSR310 (preferred for jdk < 1.8)
                        |legacy| -|java8|Option. Use Java8 classes instead of third party equivalents|
                        **true**
                        Use Java 8 classes such as Base64
                        **false**
                        Various third party libraries as needed
                        |false| -|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false| -|booleanGetterPrefix|Set booleanGetterPrefix| |get| -|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations)| |null| -|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| -|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| -|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| +|serverPort|The port on which the server should be started| |8080| |snapshotVersion|Uses a SNAPSHOT version.|
                        **true**
                        Use a SnapShot Version
                        **false**
                        Use a Release Version
                        |null| -|implFolder|folder for generated implementation code| |src/main/java| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| +|sourceFolder|source folder for generated code| |src/main/java| +|supportJava6|Whether to support Java6 with the Jersey1/2 library.| |false| |title|a title describing the application| |OpenAPI Server| |useBeanValidation|Use BeanValidation API annotations| |true| -|serverPort|The port on which the server should be started| |8080| -|library|library template (sub-template)|
                        **jersey1**
                        Jersey core 1.x
                        **jersey2**
                        Jersey core 2.x
                        |jersey2| -|supportJava6|Whether to support Java6 with the Jersey1/2 library.| |false| |useTags|use tags for creating interface and controller classnames| |false| +|withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | +|Array|java.util.List| +|ArrayList|java.util.ArrayList| +|BigDecimal|java.math.BigDecimal| +|Date|java.util.Date| +|DateTime|org.joda.time.*| +|File|java.io.File| +|HashMap|java.util.HashMap| +|List|java.util.*| +|LocalDate|org.joda.time.*| +|LocalDateTime|org.joda.time.*| +|LocalTime|org.joda.time.*| +|Map|java.util.Map| +|Set|java.util.*| +|Timestamp|java.sql.Timestamp| +|URI|java.net.URI| +|UUID|java.util.UUID| + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | +|array|ArrayList| +|map|HashMap| + + +## LANGUAGE PRIMITIVES + +
                        • Boolean
                        • +
                        • Double
                        • +
                        • Float
                        • +
                        • Integer
                        • +
                        • Long
                        • +
                        • Object
                        • +
                        • String
                        • +
                        • boolean
                        • +
                        • byte[]
                        • +
                        + +## RESERVED WORDS + +
                        • abstract
                        • +
                        • apiclient
                        • +
                        • apiexception
                        • +
                        • apiresponse
                        • +
                        • assert
                        • +
                        • boolean
                        • +
                        • break
                        • +
                        • byte
                        • +
                        • case
                        • +
                        • catch
                        • +
                        • char
                        • +
                        • class
                        • +
                        • configuration
                        • +
                        • const
                        • +
                        • continue
                        • +
                        • default
                        • +
                        • do
                        • +
                        • double
                        • +
                        • else
                        • +
                        • enum
                        • +
                        • extends
                        • +
                        • final
                        • +
                        • finally
                        • +
                        • float
                        • +
                        • for
                        • +
                        • goto
                        • +
                        • if
                        • +
                        • implements
                        • +
                        • import
                        • +
                        • instanceof
                        • +
                        • int
                        • +
                        • interface
                        • +
                        • localreturntype
                        • +
                        • localvaraccept
                        • +
                        • localvaraccepts
                        • +
                        • localvarauthnames
                        • +
                        • localvarcollectionqueryparams
                        • +
                        • localvarcontenttype
                        • +
                        • localvarcontenttypes
                        • +
                        • localvarcookieparams
                        • +
                        • localvarformparams
                        • +
                        • localvarheaderparams
                        • +
                        • localvarpath
                        • +
                        • localvarpostbody
                        • +
                        • localvarqueryparams
                        • +
                        • long
                        • +
                        • native
                        • +
                        • new
                        • +
                        • null
                        • +
                        • object
                        • +
                        • package
                        • +
                        • private
                        • +
                        • protected
                        • +
                        • public
                        • +
                        • return
                        • +
                        • short
                        • +
                        • static
                        • +
                        • strictfp
                        • +
                        • stringutil
                        • +
                        • super
                        • +
                        • switch
                        • +
                        • synchronized
                        • +
                        • this
                        • +
                        • throw
                        • +
                        • throws
                        • +
                        • transient
                        • +
                        • try
                        • +
                        • void
                        • +
                        • volatile
                        • +
                        • while
                        • +
                        diff --git a/docs/generators/jaxrs-resteasy-eap.md b/docs/generators/jaxrs-resteasy-eap.md index 3dce1089ae..378769bd75 100644 --- a/docs/generators/jaxrs-resteasy-eap.md +++ b/docs/generators/jaxrs-resteasy-eap.md @@ -5,47 +5,163 @@ sidebar_label: jaxrs-resteasy-eap | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations)| |null| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| -|modelPackage|package for generated models| |org.openapitools.model| |apiPackage|package for generated api classes| |org.openapitools.api| -|invokerPackage|root package for generated code| |org.openapitools.api| -|groupId|groupId in generated pom.xml| |org.openapitools| -|artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |openapi-jaxrs-resteasy-eap-server| -|artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |1.0.0| -|artifactUrl|artifact URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| |artifactDescription|artifact description in generated pom.xml| |OpenAPI Java| +|artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |openapi-jaxrs-resteasy-eap-server| +|artifactUrl|artifact URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| +|artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |1.0.0| +|bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false| +|booleanGetterPrefix|Set booleanGetterPrefix| |get| +|dateLibrary|Option. Date library to use|
                        **joda**
                        Joda (for legacy app only)
                        **legacy**
                        Legacy java.util.Date (if you really have a good reason not to use threetenbp
                        **java8-localdatetime**
                        Java 8 using LocalDateTime (for legacy app only)
                        **java8**
                        Java 8 native JSR310 (preferred for jdk 1.8+) - note: this also sets "java8" to true
                        **threetenbp**
                        Backport of JSR310 (preferred for jdk < 1.8)
                        |legacy| +|developerEmail|developer email in generated pom.xml| |team@openapitools.org| +|developerName|developer name in generated pom.xml| |OpenAPI-Generator Contributors| +|developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org| +|developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org| +|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false| +|generateJbossDeploymentDescriptor|Generate Jboss Deployment Descriptor| |true| +|groupId|groupId in generated pom.xml| |org.openapitools| +|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false| +|implFolder|folder for generated implementation code| |src/main/java| +|invokerPackage|root package for generated code| |org.openapitools.api| +|java8|Option. Use Java8 classes instead of third party equivalents|
                        **true**
                        Use Java 8 classes such as Base64
                        **false**
                        Various third party libraries as needed
                        |false| +|licenseName|The name of the license| |Unlicense| +|licenseUrl|The URL of the license| |http://unlicense.org| +|modelPackage|package for generated models| |org.openapitools.model| +|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| +|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| +|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| |scmConnection|SCM connection in generated pom.xml| |scm:git:git@github.com:openapitools/openapi-generator.git| |scmDeveloperConnection|SCM developer connection in generated pom.xml| |scm:git:git@github.com:openapitools/openapi-generator.git| |scmUrl|SCM URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| -|developerName|developer name in generated pom.xml| |OpenAPI-Generator Contributors| -|developerEmail|developer email in generated pom.xml| |team@openapitools.org| -|developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org| -|developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org| -|licenseName|The name of the license| |Unlicense| -|licenseUrl|The URL of the license| |http://unlicense.org| -|sourceFolder|source folder for generated code| |src/main/java| |serializableModel|boolean - toggle "implements Serializable" for generated models| |false| -|bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false| -|fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false| -|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false| -|withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false| -|dateLibrary|Option. Date library to use|
                        **joda**
                        Joda (for legacy app only)
                        **legacy**
                        Legacy java.util.Date (if you really have a good reason not to use threetenbp
                        **java8-localdatetime**
                        Java 8 using LocalDateTime (for legacy app only)
                        **java8**
                        Java 8 native JSR310 (preferred for jdk 1.8+) - note: this also sets "java8" to true
                        **threetenbp**
                        Backport of JSR310 (preferred for jdk < 1.8)
                        |legacy| -|java8|Option. Use Java8 classes instead of third party equivalents|
                        **true**
                        Use Java 8 classes such as Base64
                        **false**
                        Various third party libraries as needed
                        |false| -|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false| -|booleanGetterPrefix|Set booleanGetterPrefix| |get| -|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations)| |null| -|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| -|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| -|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| +|serverPort|The port on which the server should be started| |8080| |snapshotVersion|Uses a SNAPSHOT version.|
                        **true**
                        Use a SnapShot Version
                        **false**
                        Use a Release Version
                        |null| -|implFolder|folder for generated implementation code| |src/main/java| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| +|sourceFolder|source folder for generated code| |src/main/java| |title|a title describing the application| |OpenAPI Server| |useBeanValidation|Use BeanValidation API annotations| |true| -|serverPort|The port on which the server should be started| |8080| -|useBeanValidation|Use BeanValidation API annotations| |true| -|generateJbossDeploymentDescriptor|Generate Jboss Deployment Descriptor| |true| |useSwaggerFeature|Use dynamic Swagger generator| |false| +|withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | +|Array|java.util.List| +|ArrayList|java.util.ArrayList| +|BigDecimal|java.math.BigDecimal| +|Date|java.util.Date| +|DateTime|org.joda.time.*| +|File|java.io.File| +|HashMap|java.util.HashMap| +|List|java.util.*| +|LocalDate|org.joda.time.*| +|LocalDateTime|org.joda.time.*| +|LocalTime|org.joda.time.*| +|Map|java.util.Map| +|Set|java.util.*| +|Timestamp|java.sql.Timestamp| +|URI|java.net.URI| +|UUID|java.util.UUID| + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | +|array|ArrayList| +|map|HashMap| + + +## LANGUAGE PRIMITIVES + +
                        • Boolean
                        • +
                        • Double
                        • +
                        • Float
                        • +
                        • Integer
                        • +
                        • Long
                        • +
                        • Object
                        • +
                        • String
                        • +
                        • boolean
                        • +
                        • byte[]
                        • +
                        + +## RESERVED WORDS + +
                        • abstract
                        • +
                        • apiclient
                        • +
                        • apiexception
                        • +
                        • apiresponse
                        • +
                        • assert
                        • +
                        • boolean
                        • +
                        • break
                        • +
                        • byte
                        • +
                        • case
                        • +
                        • catch
                        • +
                        • char
                        • +
                        • class
                        • +
                        • configuration
                        • +
                        • const
                        • +
                        • continue
                        • +
                        • default
                        • +
                        • do
                        • +
                        • double
                        • +
                        • else
                        • +
                        • enum
                        • +
                        • extends
                        • +
                        • final
                        • +
                        • finally
                        • +
                        • float
                        • +
                        • for
                        • +
                        • goto
                        • +
                        • if
                        • +
                        • implements
                        • +
                        • import
                        • +
                        • instanceof
                        • +
                        • int
                        • +
                        • interface
                        • +
                        • localreturntype
                        • +
                        • localvaraccept
                        • +
                        • localvaraccepts
                        • +
                        • localvarauthnames
                        • +
                        • localvarcollectionqueryparams
                        • +
                        • localvarcontenttype
                        • +
                        • localvarcontenttypes
                        • +
                        • localvarcookieparams
                        • +
                        • localvarformparams
                        • +
                        • localvarheaderparams
                        • +
                        • localvarpath
                        • +
                        • localvarpostbody
                        • +
                        • localvarqueryparams
                        • +
                        • long
                        • +
                        • native
                        • +
                        • new
                        • +
                        • null
                        • +
                        • object
                        • +
                        • package
                        • +
                        • private
                        • +
                        • protected
                        • +
                        • public
                        • +
                        • return
                        • +
                        • short
                        • +
                        • static
                        • +
                        • strictfp
                        • +
                        • stringutil
                        • +
                        • super
                        • +
                        • switch
                        • +
                        • synchronized
                        • +
                        • this
                        • +
                        • throw
                        • +
                        • throws
                        • +
                        • transient
                        • +
                        • try
                        • +
                        • void
                        • +
                        • volatile
                        • +
                        • while
                        • +
                        diff --git a/docs/generators/jaxrs-resteasy.md b/docs/generators/jaxrs-resteasy.md index 4712a95cdc..9b85ad5e17 100644 --- a/docs/generators/jaxrs-resteasy.md +++ b/docs/generators/jaxrs-resteasy.md @@ -5,45 +5,162 @@ sidebar_label: jaxrs-resteasy | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations)| |null| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| -|modelPackage|package for generated models| |org.openapitools.model| |apiPackage|package for generated api classes| |org.openapitools.api| -|invokerPackage|root package for generated code| |org.openapitools.api| -|groupId|groupId in generated pom.xml| |org.openapitools| -|artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |openapi-jaxrs-resteasy-server| -|artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |1.0.0| -|artifactUrl|artifact URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| |artifactDescription|artifact description in generated pom.xml| |OpenAPI Java| +|artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |openapi-jaxrs-resteasy-server| +|artifactUrl|artifact URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| +|artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |1.0.0| +|bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false| +|booleanGetterPrefix|Set booleanGetterPrefix| |get| +|dateLibrary|Option. Date library to use|
                        **joda**
                        Joda (for legacy app only)
                        **legacy**
                        Legacy java.util.Date (if you really have a good reason not to use threetenbp
                        **java8-localdatetime**
                        Java 8 using LocalDateTime (for legacy app only)
                        **java8**
                        Java 8 native JSR310 (preferred for jdk 1.8+) - note: this also sets "java8" to true
                        **threetenbp**
                        Backport of JSR310 (preferred for jdk < 1.8)
                        |legacy| +|developerEmail|developer email in generated pom.xml| |team@openapitools.org| +|developerName|developer name in generated pom.xml| |OpenAPI-Generator Contributors| +|developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org| +|developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org| +|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false| +|generateJbossDeploymentDescriptor|Generate Jboss Deployment Descriptor| |false| +|groupId|groupId in generated pom.xml| |org.openapitools| +|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false| +|implFolder|folder for generated implementation code| |src/main/java| +|invokerPackage|root package for generated code| |org.openapitools.api| +|java8|Option. Use Java8 classes instead of third party equivalents|
                        **true**
                        Use Java 8 classes such as Base64
                        **false**
                        Various third party libraries as needed
                        |false| +|licenseName|The name of the license| |Unlicense| +|licenseUrl|The URL of the license| |http://unlicense.org| +|modelPackage|package for generated models| |org.openapitools.model| +|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| +|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| +|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| |scmConnection|SCM connection in generated pom.xml| |scm:git:git@github.com:openapitools/openapi-generator.git| |scmDeveloperConnection|SCM developer connection in generated pom.xml| |scm:git:git@github.com:openapitools/openapi-generator.git| |scmUrl|SCM URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| -|developerName|developer name in generated pom.xml| |OpenAPI-Generator Contributors| -|developerEmail|developer email in generated pom.xml| |team@openapitools.org| -|developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org| -|developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org| -|licenseName|The name of the license| |Unlicense| -|licenseUrl|The URL of the license| |http://unlicense.org| -|sourceFolder|source folder for generated code| |src/main/java| |serializableModel|boolean - toggle "implements Serializable" for generated models| |false| -|bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false| -|fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false| -|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false| -|withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false| -|dateLibrary|Option. Date library to use|
                        **joda**
                        Joda (for legacy app only)
                        **legacy**
                        Legacy java.util.Date (if you really have a good reason not to use threetenbp
                        **java8-localdatetime**
                        Java 8 using LocalDateTime (for legacy app only)
                        **java8**
                        Java 8 native JSR310 (preferred for jdk 1.8+) - note: this also sets "java8" to true
                        **threetenbp**
                        Backport of JSR310 (preferred for jdk < 1.8)
                        |legacy| -|java8|Option. Use Java8 classes instead of third party equivalents|
                        **true**
                        Use Java 8 classes such as Base64
                        **false**
                        Various third party libraries as needed
                        |false| -|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false| -|booleanGetterPrefix|Set booleanGetterPrefix| |get| -|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations)| |null| -|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| -|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| -|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| +|serverPort|The port on which the server should be started| |8080| |snapshotVersion|Uses a SNAPSHOT version.|
                        **true**
                        Use a SnapShot Version
                        **false**
                        Use a Release Version
                        |null| -|implFolder|folder for generated implementation code| |src/main/java| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| +|sourceFolder|source folder for generated code| |src/main/java| |title|a title describing the application| |OpenAPI Server| |useBeanValidation|Use BeanValidation API annotations| |true| -|serverPort|The port on which the server should be started| |8080| -|generateJbossDeploymentDescriptor|Generate Jboss Deployment Descriptor| |false| +|withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | +|Array|java.util.List| +|ArrayList|java.util.ArrayList| +|BigDecimal|java.math.BigDecimal| +|Date|java.util.Date| +|DateTime|org.joda.time.*| +|File|java.io.File| +|HashMap|java.util.HashMap| +|List|java.util.*| +|LocalDate|org.joda.time.*| +|LocalDateTime|org.joda.time.*| +|LocalTime|org.joda.time.*| +|Map|java.util.Map| +|Set|java.util.*| +|Timestamp|java.sql.Timestamp| +|URI|java.net.URI| +|UUID|java.util.UUID| + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | +|array|ArrayList| +|map|HashMap| + + +## LANGUAGE PRIMITIVES + +
                        • Boolean
                        • +
                        • Double
                        • +
                        • Float
                        • +
                        • Integer
                        • +
                        • Long
                        • +
                        • Object
                        • +
                        • String
                        • +
                        • boolean
                        • +
                        • byte[]
                        • +
                        + +## RESERVED WORDS + +
                        • abstract
                        • +
                        • apiclient
                        • +
                        • apiexception
                        • +
                        • apiresponse
                        • +
                        • assert
                        • +
                        • boolean
                        • +
                        • break
                        • +
                        • byte
                        • +
                        • case
                        • +
                        • catch
                        • +
                        • char
                        • +
                        • class
                        • +
                        • configuration
                        • +
                        • const
                        • +
                        • continue
                        • +
                        • default
                        • +
                        • do
                        • +
                        • double
                        • +
                        • else
                        • +
                        • enum
                        • +
                        • extends
                        • +
                        • final
                        • +
                        • finally
                        • +
                        • float
                        • +
                        • for
                        • +
                        • goto
                        • +
                        • if
                        • +
                        • implements
                        • +
                        • import
                        • +
                        • instanceof
                        • +
                        • int
                        • +
                        • interface
                        • +
                        • localreturntype
                        • +
                        • localvaraccept
                        • +
                        • localvaraccepts
                        • +
                        • localvarauthnames
                        • +
                        • localvarcollectionqueryparams
                        • +
                        • localvarcontenttype
                        • +
                        • localvarcontenttypes
                        • +
                        • localvarcookieparams
                        • +
                        • localvarformparams
                        • +
                        • localvarheaderparams
                        • +
                        • localvarpath
                        • +
                        • localvarpostbody
                        • +
                        • localvarqueryparams
                        • +
                        • long
                        • +
                        • native
                        • +
                        • new
                        • +
                        • null
                        • +
                        • object
                        • +
                        • package
                        • +
                        • private
                        • +
                        • protected
                        • +
                        • public
                        • +
                        • return
                        • +
                        • short
                        • +
                        • static
                        • +
                        • strictfp
                        • +
                        • stringutil
                        • +
                        • super
                        • +
                        • switch
                        • +
                        • synchronized
                        • +
                        • this
                        • +
                        • throw
                        • +
                        • throws
                        • +
                        • transient
                        • +
                        • try
                        • +
                        • void
                        • +
                        • volatile
                        • +
                        • while
                        • +
                        diff --git a/docs/generators/jaxrs-spec.md b/docs/generators/jaxrs-spec.md index eac2f0d61b..d9c32ce88a 100644 --- a/docs/generators/jaxrs-spec.md +++ b/docs/generators/jaxrs-spec.md @@ -5,50 +5,167 @@ sidebar_label: jaxrs-spec | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations)| |null| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| -|modelPackage|package for generated models| |org.openapitools.model| |apiPackage|package for generated api classes| |org.openapitools.api| -|invokerPackage|root package for generated code| |org.openapitools.api| -|groupId|groupId in generated pom.xml| |org.openapitools| -|artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |openapi-jaxrs-server| -|artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |1.0.0| -|artifactUrl|artifact URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| |artifactDescription|artifact description in generated pom.xml| |OpenAPI Java| +|artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |openapi-jaxrs-server| +|artifactUrl|artifact URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| +|artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |1.0.0| +|bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false| +|booleanGetterPrefix|Set booleanGetterPrefix| |get| +|dateLibrary|Option. Date library to use|
                        **joda**
                        Joda (for legacy app only)
                        **legacy**
                        Legacy java.util.Date (if you really have a good reason not to use threetenbp
                        **java8-localdatetime**
                        Java 8 using LocalDateTime (for legacy app only)
                        **java8**
                        Java 8 native JSR310 (preferred for jdk 1.8+) - note: this also sets "java8" to true
                        **threetenbp**
                        Backport of JSR310 (preferred for jdk < 1.8)
                        |legacy| +|developerEmail|developer email in generated pom.xml| |team@openapitools.org| +|developerName|developer name in generated pom.xml| |OpenAPI-Generator Contributors| +|developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org| +|developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org| +|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false| +|generatePom|Whether to generate pom.xml if the file does not already exist.| |true| +|groupId|groupId in generated pom.xml| |org.openapitools| +|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false| +|implFolder|folder for generated implementation code| |src/main/java| +|interfaceOnly|Whether to generate only API interface stubs without the server files.| |false| +|invokerPackage|root package for generated code| |org.openapitools.api| +|java8|Option. Use Java8 classes instead of third party equivalents|
                        **true**
                        Use Java 8 classes such as Base64
                        **false**
                        Various third party libraries as needed
                        |false| +|library|library template (sub-template)|
                        **<default>**
                        JAXRS spec only, to be deployed in an app server (TomEE, JBoss, WLS, ...)
                        **quarkus**
                        Server using Quarkus
                        **thorntail**
                        Server using Thorntail
                        **openliberty**
                        Server using Open Liberty
                        **helidon**
                        Server using Helidon
                        |<default>| +|licenseName|The name of the license| |Unlicense| +|licenseUrl|The URL of the license| |http://unlicense.org| +|modelPackage|package for generated models| |org.openapitools.model| +|openApiSpecFileLocation|Location where the file containing the spec will be generated in the output folder. No file generated when set to null or empty string.| |null| +|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| +|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| +|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|returnResponse|Whether generate API interface should return javax.ws.rs.core.Response instead of a deserialized entity. Only useful if interfaceOnly is true.| |false| |scmConnection|SCM connection in generated pom.xml| |scm:git:git@github.com:openapitools/openapi-generator.git| |scmDeveloperConnection|SCM developer connection in generated pom.xml| |scm:git:git@github.com:openapitools/openapi-generator.git| |scmUrl|SCM URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| -|developerName|developer name in generated pom.xml| |OpenAPI-Generator Contributors| -|developerEmail|developer email in generated pom.xml| |team@openapitools.org| -|developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org| -|developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org| -|licenseName|The name of the license| |Unlicense| -|licenseUrl|The URL of the license| |http://unlicense.org| -|sourceFolder|source folder for generated code| |src/main/java| |serializableModel|boolean - toggle "implements Serializable" for generated models| |false| -|bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false| -|fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false| -|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false| -|withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false| -|dateLibrary|Option. Date library to use|
                        **joda**
                        Joda (for legacy app only)
                        **legacy**
                        Legacy java.util.Date (if you really have a good reason not to use threetenbp
                        **java8-localdatetime**
                        Java 8 using LocalDateTime (for legacy app only)
                        **java8**
                        Java 8 native JSR310 (preferred for jdk 1.8+) - note: this also sets "java8" to true
                        **threetenbp**
                        Backport of JSR310 (preferred for jdk < 1.8)
                        |legacy| -|java8|Option. Use Java8 classes instead of third party equivalents|
                        **true**
                        Use Java 8 classes such as Base64
                        **false**
                        Various third party libraries as needed
                        |false| -|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false| -|booleanGetterPrefix|Set booleanGetterPrefix| |get| -|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations)| |null| -|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| -|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| -|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| +|serverPort|The port on which the server should be started| |8080| |snapshotVersion|Uses a SNAPSHOT version.|
                        **true**
                        Use a SnapShot Version
                        **false**
                        Use a Release Version
                        |null| -|implFolder|folder for generated implementation code| |src/main/java| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| +|sourceFolder|source folder for generated code| |src/main/java| |title|a title describing the application| |OpenAPI Server| |useBeanValidation|Use BeanValidation API annotations| |true| -|serverPort|The port on which the server should be started| |8080| -|library|library template (sub-template)|
                        **<default>**
                        JAXRS spec only, to be deployed in an app server (TomEE, JBoss, WLS, ...)
                        **quarkus**
                        Server using Quarkus
                        **thorntail**
                        Server using Thorntail
                        **openliberty**
                        Server using Open Liberty
                        **helidon**
                        Server using Helidon
                        |<default>| -|generatePom|Whether to generate pom.xml if the file does not already exist.| |true| -|interfaceOnly|Whether to generate only API interface stubs without the server files.| |false| -|returnResponse|Whether generate API interface should return javax.ws.rs.core.Response instead of a deserialized entity. Only useful if interfaceOnly is true.| |false| |useSwaggerAnnotations|Whether to generate Swagger annotations.| |true| -|openApiSpecFileLocation|Location where the file containing the spec will be generated in the output folder. No file generated when set to null or empty string.| |null| +|withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | +|Array|java.util.List| +|ArrayList|java.util.ArrayList| +|BigDecimal|java.math.BigDecimal| +|Date|java.util.Date| +|DateTime|org.joda.time.*| +|File|java.io.File| +|HashMap|java.util.HashMap| +|List|java.util.*| +|LocalDate|org.joda.time.LocalDate| +|LocalDateTime|org.joda.time.*| +|LocalTime|org.joda.time.*| +|Map|java.util.Map| +|Set|java.util.*| +|Timestamp|java.sql.Timestamp| +|URI|java.net.URI| +|UUID|java.util.UUID| + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | +|array|ArrayList| +|map|HashMap| + + +## LANGUAGE PRIMITIVES + +
                        • Boolean
                        • +
                        • Double
                        • +
                        • Float
                        • +
                        • Integer
                        • +
                        • Long
                        • +
                        • Object
                        • +
                        • String
                        • +
                        • boolean
                        • +
                        • byte[]
                        • +
                        + +## RESERVED WORDS + +
                        • abstract
                        • +
                        • apiclient
                        • +
                        • apiexception
                        • +
                        • apiresponse
                        • +
                        • assert
                        • +
                        • boolean
                        • +
                        • break
                        • +
                        • byte
                        • +
                        • case
                        • +
                        • catch
                        • +
                        • char
                        • +
                        • class
                        • +
                        • configuration
                        • +
                        • const
                        • +
                        • continue
                        • +
                        • default
                        • +
                        • do
                        • +
                        • double
                        • +
                        • else
                        • +
                        • enum
                        • +
                        • extends
                        • +
                        • final
                        • +
                        • finally
                        • +
                        • float
                        • +
                        • for
                        • +
                        • goto
                        • +
                        • if
                        • +
                        • implements
                        • +
                        • import
                        • +
                        • instanceof
                        • +
                        • int
                        • +
                        • interface
                        • +
                        • localreturntype
                        • +
                        • localvaraccept
                        • +
                        • localvaraccepts
                        • +
                        • localvarauthnames
                        • +
                        • localvarcollectionqueryparams
                        • +
                        • localvarcontenttype
                        • +
                        • localvarcontenttypes
                        • +
                        • localvarcookieparams
                        • +
                        • localvarformparams
                        • +
                        • localvarheaderparams
                        • +
                        • localvarpath
                        • +
                        • localvarpostbody
                        • +
                        • localvarqueryparams
                        • +
                        • long
                        • +
                        • native
                        • +
                        • new
                        • +
                        • null
                        • +
                        • object
                        • +
                        • package
                        • +
                        • private
                        • +
                        • protected
                        • +
                        • public
                        • +
                        • return
                        • +
                        • short
                        • +
                        • static
                        • +
                        • strictfp
                        • +
                        • stringutil
                        • +
                        • super
                        • +
                        • switch
                        • +
                        • synchronized
                        • +
                        • this
                        • +
                        • throw
                        • +
                        • throws
                        • +
                        • transient
                        • +
                        • try
                        • +
                        • void
                        • +
                        • volatile
                        • +
                        • while
                        • +
                        diff --git a/docs/generators/jmeter.md b/docs/generators/jmeter.md index 20f3183420..2aff0efbb2 100644 --- a/docs/generators/jmeter.md +++ b/docs/generators/jmeter.md @@ -5,8 +5,46 @@ sidebar_label: jmeter | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | +|Array|java.util.List| +|ArrayList|java.util.ArrayList| +|BigDecimal|java.math.BigDecimal| +|Date|java.util.Date| +|DateTime|org.joda.time.*| +|File|java.io.File| +|HashMap|java.util.HashMap| +|List|java.util.*| +|LocalDate|org.joda.time.*| +|LocalDateTime|org.joda.time.*| +|LocalTime|org.joda.time.*| +|Map|java.util.Map| +|Set|java.util.*| +|Timestamp|java.sql.Timestamp| +|URI|java.net.URI| +|UUID|java.util.UUID| + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | + + +## LANGUAGE PRIMITIVES + +
                          + +## RESERVED WORDS + +
                          • sample1
                          • +
                          • sample2
                          • +
                          diff --git a/docs/generators/kotlin-server.md b/docs/generators/kotlin-server.md index 135c570669..cffcda881f 100644 --- a/docs/generators/kotlin-server.md +++ b/docs/generators/kotlin-server.md @@ -5,22 +5,97 @@ sidebar_label: kotlin-server | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sourceFolder|source folder for generated code| |src/main/kotlin| -|packageName|Generated artifact package name.| |org.openapitools.server| |apiSuffix|suffix for api classes| |Api| -|groupId|Generated artifact package's organization (i.e. maven groupId).| |org.openapitools| |artifactId|Generated artifact id (name of jar).| |kotlin-server| |artifactVersion|Generated artifact's package version.| |1.0.0| |enumPropertyNaming|Naming convention for enum properties: 'camelCase', 'PascalCase', 'snake_case', 'UPPERCASE', and 'original'| |camelCase| -|serializationLibrary|What serialization library to use: 'moshi' (default), or 'gson'| |moshi| -|parcelizeModels|toggle "@Parcelize" for generated models| |null| -|serializableModel|boolean - toggle "implements Serializable" for generated models| |null| -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |null| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |null| -|modelMutable|Create mutable models| |false| -|library|library template (sub-template)|
                          **ktor**
                          ktor framework
                          |ktor| |featureAutoHead|Automatically provide responses to HEAD requests for existing routes that have the GET verb defined.| |true| -|featureConditionalHeaders|Avoid sending content if client already has same content, by checking ETag or LastModified properties.| |false| -|featureHSTS|Avoid sending content if client already has same content, by checking ETag or LastModified properties.| |true| |featureCORS|Ktor by default provides an interceptor for implementing proper support for Cross-Origin Resource Sharing (CORS). See enable-cors.org.| |false| |featureCompression|Adds ability to compress outgoing content using gzip, deflate or custom encoder and thus reduce size of the response.| |true| +|featureConditionalHeaders|Avoid sending content if client already has same content, by checking ETag or LastModified properties.| |false| +|featureHSTS|Avoid sending content if client already has same content, by checking ETag or LastModified properties.| |true| +|groupId|Generated artifact package's organization (i.e. maven groupId).| |org.openapitools| +|library|library template (sub-template)|
                          **ktor**
                          ktor framework
                          |ktor| +|modelMutable|Create mutable models| |false| +|packageName|Generated artifact package name.| |org.openapitools.server| +|parcelizeModels|toggle "@Parcelize" for generated models| |null| +|serializableModel|boolean - toggle "implements Serializable" for generated models| |null| +|serializationLibrary|What serialization library to use: 'moshi' (default), or 'gson'| |moshi| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |null| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |null| +|sourceFolder|source folder for generated code| |src/main/kotlin| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | +|BigDecimal|java.math.BigDecimal| +|Date|java.util.Date| +|DateTime|java.time.LocalDateTime| +|File|java.io.File| +|LocalDate|java.time.LocalDate| +|LocalDateTime|java.time.LocalDateTime| +|LocalTime|java.time.LocalTime| +|Timestamp|java.sql.Timestamp| +|URI|java.net.URI| +|UUID|java.util.UUID| + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | +|array|kotlin.arrayOf| +|list|kotlin.arrayOf| +|map|kotlin.mapOf| + + +## LANGUAGE PRIMITIVES + +
                          • kotlin.Array
                          • +
                          • kotlin.Boolean
                          • +
                          • kotlin.Byte
                          • +
                          • kotlin.ByteArray
                          • +
                          • kotlin.Char
                          • +
                          • kotlin.Double
                          • +
                          • kotlin.Float
                          • +
                          • kotlin.Int
                          • +
                          • kotlin.Long
                          • +
                          • kotlin.Short
                          • +
                          • kotlin.String
                          • +
                          • kotlin.collections.List
                          • +
                          • kotlin.collections.Map
                          • +
                          • kotlin.collections.Set
                          • +
                          + +## RESERVED WORDS + +
                          • as
                          • +
                          • break
                          • +
                          • class
                          • +
                          • continue
                          • +
                          • do
                          • +
                          • else
                          • +
                          • false
                          • +
                          • for
                          • +
                          • fun
                          • +
                          • if
                          • +
                          • in
                          • +
                          • interface
                          • +
                          • is
                          • +
                          • null
                          • +
                          • object
                          • +
                          • package
                          • +
                          • return
                          • +
                          • super
                          • +
                          • this
                          • +
                          • throw
                          • +
                          • true
                          • +
                          • try
                          • +
                          • typealias
                          • +
                          • typeof
                          • +
                          • val
                          • +
                          • var
                          • +
                          • when
                          • +
                          • while
                          • +
                          diff --git a/docs/generators/kotlin-spring.md b/docs/generators/kotlin-spring.md index 2ad78b7b90..11d7a924b2 100644 --- a/docs/generators/kotlin-spring.md +++ b/docs/generators/kotlin-spring.md @@ -5,31 +5,109 @@ sidebar_label: kotlin-spring | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sourceFolder|source folder for generated code| |src/main/kotlin| -|packageName|Generated artifact package name.| |org.openapitools| +|apiPackage|api package for generated code| |org.openapitools.api| |apiSuffix|suffix for api classes| |Api| -|groupId|Generated artifact package's organization (i.e. maven groupId).| |org.openapitools| |artifactId|Generated artifact id (name of jar).| |openapi-spring| |artifactVersion|Generated artifact's package version.| |1.0.0| -|enumPropertyNaming|Naming convention for enum properties: 'camelCase', 'PascalCase', 'snake_case', 'UPPERCASE', and 'original'| |camelCase| -|serializationLibrary|What serialization library to use: 'moshi' (default), or 'gson'| |moshi| -|parcelizeModels|toggle "@Parcelize" for generated models| |null| -|serializableModel|boolean - toggle "implements Serializable" for generated models| |null| -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |null| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |null| -|modelMutable|Create mutable models| |false| -|title|server title name or client service name| |OpenAPI Kotlin Spring| |basePackage|base package (invokerPackage) for generated code| |org.openapitools| -|serverPort|configuration the port in which the sever is to run on| |8080| -|modelPackage|model package for generated code| |org.openapitools.model| -|apiPackage|api package for generated code| |org.openapitools.api| +|delegatePattern|Whether to generate the server files using the delegate pattern| |false| +|enumPropertyNaming|Naming convention for enum properties: 'camelCase', 'PascalCase', 'snake_case', 'UPPERCASE', and 'original'| |camelCase| |exceptionHandler|generate default global exception handlers (not compatible with reactive. enabling reactive will disable exceptionHandler )| |true| |gradleBuildFile|generate a gradle build file using the Kotlin DSL| |true| -|swaggerAnnotations|generate swagger annotations to go alongside controllers and models| |false| -|serviceInterface|generate service interfaces to go alongside controllers. In most cases this option would be used to update an existing project, so not to override implementations. Useful to help facilitate the generation gap pattern| |false| -|serviceImplementation|generate stub service implementations that extends service interfaces. If this is set to true service interfaces will also be generated| |false| -|useBeanValidation|Use BeanValidation API annotations to validate data types| |true| -|reactive|use coroutines for reactive behavior| |false| +|groupId|Generated artifact package's organization (i.e. maven groupId).| |org.openapitools| |interfaceOnly|Whether to generate only API interface stubs without the server files.| |false| -|delegatePattern|Whether to generate the server files using the delegate pattern| |false| |library|library template (sub-template)|
                          **spring-boot**
                          Spring-boot Server application.
                          |spring-boot| +|modelMutable|Create mutable models| |false| +|modelPackage|model package for generated code| |org.openapitools.model| +|packageName|Generated artifact package name.| |org.openapitools| +|parcelizeModels|toggle "@Parcelize" for generated models| |null| +|reactive|use coroutines for reactive behavior| |false| +|serializableModel|boolean - toggle "implements Serializable" for generated models| |null| +|serializationLibrary|What serialization library to use: 'moshi' (default), or 'gson'| |moshi| +|serverPort|configuration the port in which the sever is to run on| |8080| +|serviceImplementation|generate stub service implementations that extends service interfaces. If this is set to true service interfaces will also be generated| |false| +|serviceInterface|generate service interfaces to go alongside controllers. In most cases this option would be used to update an existing project, so not to override implementations. Useful to help facilitate the generation gap pattern| |false| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |null| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |null| +|sourceFolder|source folder for generated code| |src/main/kotlin| +|swaggerAnnotations|generate swagger annotations to go alongside controllers and models| |false| +|title|server title name or client service name| |OpenAPI Kotlin Spring| +|useBeanValidation|Use BeanValidation API annotations to validate data types| |true| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | +|BigDecimal|java.math.BigDecimal| +|Date|java.time.LocalDate| +|DateTime|java.time.OffsetDateTime| +|File|java.io.File| +|LocalDate|java.time.LocalDate| +|LocalDateTime|java.time.LocalDateTime| +|LocalTime|java.time.LocalTime| +|Timestamp|java.sql.Timestamp| +|URI|java.net.URI| +|UUID|java.util.UUID| + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | +|array|kotlin.arrayOf| +|list|kotlin.arrayOf| +|map|kotlin.mapOf| + + +## LANGUAGE PRIMITIVES + +
                          • kotlin.Array
                          • +
                          • kotlin.Boolean
                          • +
                          • kotlin.Byte
                          • +
                          • kotlin.ByteArray
                          • +
                          • kotlin.Char
                          • +
                          • kotlin.Double
                          • +
                          • kotlin.Float
                          • +
                          • kotlin.Int
                          • +
                          • kotlin.Long
                          • +
                          • kotlin.Short
                          • +
                          • kotlin.String
                          • +
                          • kotlin.collections.List
                          • +
                          • kotlin.collections.Map
                          • +
                          • kotlin.collections.Set
                          • +
                          + +## RESERVED WORDS + +
                          • ApiClient
                          • +
                          • ApiException
                          • +
                          • ApiResponse
                          • +
                          • as
                          • +
                          • break
                          • +
                          • class
                          • +
                          • continue
                          • +
                          • do
                          • +
                          • else
                          • +
                          • false
                          • +
                          • for
                          • +
                          • fun
                          • +
                          • if
                          • +
                          • in
                          • +
                          • interface
                          • +
                          • is
                          • +
                          • null
                          • +
                          • object
                          • +
                          • package
                          • +
                          • return
                          • +
                          • super
                          • +
                          • this
                          • +
                          • throw
                          • +
                          • true
                          • +
                          • try
                          • +
                          • typealias
                          • +
                          • typeof
                          • +
                          • val
                          • +
                          • var
                          • +
                          • when
                          • +
                          • while
                          • +
                          diff --git a/docs/generators/kotlin-vertx.md b/docs/generators/kotlin-vertx.md index fd37a2cc8d..20a85045d0 100644 --- a/docs/generators/kotlin-vertx.md +++ b/docs/generators/kotlin-vertx.md @@ -5,16 +5,91 @@ sidebar_label: kotlin-vertx | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sourceFolder|source folder for generated code| |src/main/kotlin| -|packageName|Generated artifact package name.| |org.openapitools| |apiSuffix|suffix for api classes| |Api| -|groupId|Generated artifact package's organization (i.e. maven groupId).| |org.openapitools| |artifactId|Generated artifact id (name of jar).| |null| |artifactVersion|Generated artifact's package version.| |1.0.0| |enumPropertyNaming|Naming convention for enum properties: 'camelCase', 'PascalCase', 'snake_case', 'UPPERCASE', and 'original'| |camelCase| -|serializationLibrary|What serialization library to use: 'moshi' (default), or 'gson'| |moshi| +|groupId|Generated artifact package's organization (i.e. maven groupId).| |org.openapitools| +|modelMutable|Create mutable models| |false| +|packageName|Generated artifact package name.| |org.openapitools| |parcelizeModels|toggle "@Parcelize" for generated models| |null| |serializableModel|boolean - toggle "implements Serializable" for generated models| |null| -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |null| +|serializationLibrary|What serialization library to use: 'moshi' (default), or 'gson'| |moshi| |sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |null| -|modelMutable|Create mutable models| |false| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |null| +|sourceFolder|source folder for generated code| |src/main/kotlin| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | +|BigDecimal|java.math.BigDecimal| +|Date|java.util.Date| +|DateTime|java.time.LocalDateTime| +|File|java.io.File| +|LocalDate|java.time.LocalDate| +|LocalDateTime|java.time.LocalDateTime| +|LocalTime|java.time.LocalTime| +|Timestamp|java.sql.Timestamp| +|URI|java.net.URI| +|UUID|java.util.UUID| + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | +|array|kotlin.arrayOf| +|list|kotlin.arrayOf| +|map|kotlin.mapOf| + + +## LANGUAGE PRIMITIVES + +
                          • kotlin.Array
                          • +
                          • kotlin.Boolean
                          • +
                          • kotlin.Byte
                          • +
                          • kotlin.ByteArray
                          • +
                          • kotlin.Char
                          • +
                          • kotlin.Double
                          • +
                          • kotlin.Float
                          • +
                          • kotlin.Int
                          • +
                          • kotlin.Long
                          • +
                          • kotlin.Short
                          • +
                          • kotlin.String
                          • +
                          • kotlin.collections.List
                          • +
                          • kotlin.collections.Map
                          • +
                          • kotlin.collections.Set
                          • +
                          + +## RESERVED WORDS + +
                          • as
                          • +
                          • break
                          • +
                          • class
                          • +
                          • continue
                          • +
                          • do
                          • +
                          • else
                          • +
                          • false
                          • +
                          • for
                          • +
                          • fun
                          • +
                          • if
                          • +
                          • in
                          • +
                          • interface
                          • +
                          • is
                          • +
                          • null
                          • +
                          • object
                          • +
                          • package
                          • +
                          • return
                          • +
                          • super
                          • +
                          • this
                          • +
                          • throw
                          • +
                          • true
                          • +
                          • try
                          • +
                          • typealias
                          • +
                          • typeof
                          • +
                          • val
                          • +
                          • var
                          • +
                          • when
                          • +
                          • while
                          • +
                          diff --git a/docs/generators/kotlin.md b/docs/generators/kotlin.md index 5c8f71e679..cdd75b8927 100644 --- a/docs/generators/kotlin.md +++ b/docs/generators/kotlin.md @@ -5,20 +5,95 @@ sidebar_label: kotlin | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sourceFolder|source folder for generated code| |src/main/kotlin| -|packageName|Generated artifact package name.| |org.openapitools.client| |apiSuffix|suffix for api classes| |Api| -|groupId|Generated artifact package's organization (i.e. maven groupId).| |org.openapitools| |artifactId|Generated artifact id (name of jar).| |kotlin-client| |artifactVersion|Generated artifact's package version.| |1.0.0| -|enumPropertyNaming|Naming convention for enum properties: 'camelCase', 'PascalCase', 'snake_case', 'UPPERCASE', and 'original'| |camelCase| -|serializationLibrary|What serialization library to use: 'moshi' (default), or 'gson'| |moshi| -|parcelizeModels|toggle "@Parcelize" for generated models| |null| -|serializableModel|boolean - toggle "implements Serializable" for generated models| |null| -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |null| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |null| -|modelMutable|Create mutable models| |false| -|dateLibrary|Option. Date library to use|
                          **threetenbp-localdatetime**
                          Threetenbp - Backport of JSR310 (jvm only, for legacy app only)
                          **string**
                          String
                          **java8-localdatetime**
                          Java 8 native JSR310 (jvm only, for legacy app only)
                          **java8**
                          Java 8 native JSR310 (jvm only, preferred for jdk 1.8+)
                          **threetenbp**
                          Threetenbp - Backport of JSR310 (jvm only, preferred for jdk < 1.8)
                          |java8| |collectionType|Option. Collection type to use|
                          **array**
                          kotlin.Array
                          **list**
                          kotlin.collections.List
                          |array| +|dateLibrary|Option. Date library to use|
                          **threetenbp-localdatetime**
                          Threetenbp - Backport of JSR310 (jvm only, for legacy app only)
                          **string**
                          String
                          **java8-localdatetime**
                          Java 8 native JSR310 (jvm only, for legacy app only)
                          **java8**
                          Java 8 native JSR310 (jvm only, preferred for jdk 1.8+)
                          **threetenbp**
                          Threetenbp - Backport of JSR310 (jvm only, preferred for jdk < 1.8)
                          |java8| +|enumPropertyNaming|Naming convention for enum properties: 'camelCase', 'PascalCase', 'snake_case', 'UPPERCASE', and 'original'| |camelCase| +|groupId|Generated artifact package's organization (i.e. maven groupId).| |org.openapitools| |library|Library template (sub-template) to use|
                          **jvm-okhttp4**
                          [DEFAULT] Platform: Java Virtual Machine. HTTP client: OkHttp 4.2.0 (Android 5.0+ and Java 8+). JSON processing: Moshi 1.8.0.
                          **jvm-okhttp3**
                          Platform: Java Virtual Machine. HTTP client: OkHttp 3.12.4 (Android 2.3+ and Java 7+). JSON processing: Moshi 1.8.0.
                          **jvm-retrofit2**
                          Platform: Java Virtual Machine. HTTP client: Retrofit 2.6.2.
                          **multiplatform**
                          Platform: Kotlin multiplatform. HTTP client: Ktor 1.2.4. JSON processing: Kotlinx Serialization: 0.12.0.
                          |jvm-okhttp4| -|requestDateConverter|JVM-Option. Defines in how to handle date-time objects that are used for a request (as query or parameter)|
                          **toJson**
                          Date formater option using a json converter.
                          **toString**
                          [DEFAULT] Use the 'toString'-method of the date-time object to retrieve the related string representation.
                          |toString| +|modelMutable|Create mutable models| |false| +|packageName|Generated artifact package name.| |org.openapitools.client| +|parcelizeModels|toggle "@Parcelize" for generated models| |null| +|requestDateConverter|JVM-Option. Defines in how to handle date-time objects that are used for a request (as query or parameter)|
                          **toJson**
                          [DEFAULT] Date formater option using a json converter.
                          **toString**
                          Use the 'toString'-method of the date-time object to retrieve the related string representation.
                          |toJson| +|serializableModel|boolean - toggle "implements Serializable" for generated models| |null| +|serializationLibrary|What serialization library to use: 'moshi' (default), or 'gson'| |moshi| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |null| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |null| +|sourceFolder|source folder for generated code| |src/main/kotlin| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | +|BigDecimal|java.math.BigDecimal| +|Date|java.util.Date| +|DateTime|java.time.LocalDateTime| +|File|java.io.File| +|LocalDate|java.time.LocalDate| +|LocalDateTime|java.time.LocalDateTime| +|LocalTime|java.time.LocalTime| +|Timestamp|java.sql.Timestamp| +|URI|java.net.URI| +|UUID|java.util.UUID| + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | +|array|kotlin.arrayOf| +|list|kotlin.arrayOf| +|map|kotlin.mapOf| + + +## LANGUAGE PRIMITIVES + +
                          • kotlin.Array
                          • +
                          • kotlin.Boolean
                          • +
                          • kotlin.Byte
                          • +
                          • kotlin.ByteArray
                          • +
                          • kotlin.Char
                          • +
                          • kotlin.Double
                          • +
                          • kotlin.Float
                          • +
                          • kotlin.Int
                          • +
                          • kotlin.Long
                          • +
                          • kotlin.Short
                          • +
                          • kotlin.String
                          • +
                          • kotlin.collections.List
                          • +
                          • kotlin.collections.Map
                          • +
                          • kotlin.collections.Set
                          • +
                          + +## RESERVED WORDS + +
                          • as
                          • +
                          • break
                          • +
                          • class
                          • +
                          • continue
                          • +
                          • do
                          • +
                          • else
                          • +
                          • false
                          • +
                          • for
                          • +
                          • fun
                          • +
                          • if
                          • +
                          • in
                          • +
                          • interface
                          • +
                          • is
                          • +
                          • null
                          • +
                          • object
                          • +
                          • package
                          • +
                          • return
                          • +
                          • super
                          • +
                          • this
                          • +
                          • throw
                          • +
                          • true
                          • +
                          • try
                          • +
                          • typealias
                          • +
                          • typeof
                          • +
                          • val
                          • +
                          • var
                          • +
                          • when
                          • +
                          • while
                          • +
                          diff --git a/docs/generators/lua.md b/docs/generators/lua.md index b466a5a70f..4062270334 100644 --- a/docs/generators/lua.md +++ b/docs/generators/lua.md @@ -5,6 +5,60 @@ sidebar_label: lua | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | +|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true| |packageName|Lua package name (convention: single word).| |openapiclient| |packageVersion|Lua package version.| |1.0.0-1| -|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | +|*os.File|os| +|os|io/ioutil| +|time.Time|time| + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | + + +## LANGUAGE PRIMITIVES + +
                          • boolean
                          • +
                          • nil
                          • +
                          • number
                          • +
                          • string
                          • +
                          + +## RESERVED WORDS + +
                          • and
                          • +
                          • boolean
                          • +
                          • break
                          • +
                          • do
                          • +
                          • else
                          • +
                          • elseif
                          • +
                          • end
                          • +
                          • false
                          • +
                          • for
                          • +
                          • function
                          • +
                          • if
                          • +
                          • in
                          • +
                          • local
                          • +
                          • nil
                          • +
                          • not
                          • +
                          • number
                          • +
                          • or
                          • +
                          • repeat
                          • +
                          • return
                          • +
                          • string
                          • +
                          • table
                          • +
                          • then
                          • +
                          • thread
                          • +
                          • true
                          • +
                          • until
                          • +
                          • userdata
                          • +
                          • while
                          • +
                          diff --git a/docs/generators/markdown.md b/docs/generators/markdown.md index 5fe5f9d699..3c7777b2a9 100644 --- a/docs/generators/markdown.md +++ b/docs/generators/markdown.md @@ -5,8 +5,44 @@ sidebar_label: markdown | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | +|Array|java.util.List| +|ArrayList|java.util.ArrayList| +|BigDecimal|java.math.BigDecimal| +|Date|java.util.Date| +|DateTime|org.joda.time.*| +|File|java.io.File| +|HashMap|java.util.HashMap| +|List|java.util.*| +|LocalDate|org.joda.time.*| +|LocalDateTime|org.joda.time.*| +|LocalTime|org.joda.time.*| +|Map|java.util.Map| +|Set|java.util.*| +|Timestamp|java.sql.Timestamp| +|URI|java.net.URI| +|UUID|java.util.UUID| + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | + + +## LANGUAGE PRIMITIVES + +
                            + +## RESERVED WORDS + +
                              diff --git a/docs/generators/mysql-schema.md b/docs/generators/mysql-schema.md index 6b48a721cb..67e235168b 100644 --- a/docs/generators/mysql-schema.md +++ b/docs/generators/mysql-schema.md @@ -6,5 +6,311 @@ sidebar_label: mysql-schema | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | |defaultDatabaseName|Default database name for all MySQL queries| || -|jsonDataTypeEnabled|Use special JSON MySQL data type for complex model properties. Requires MySQL version 5.7.8. Generates TEXT data type when disabled| |true| |identifierNamingConvention|Naming convention of MySQL identifiers(table names and column names). This is not related to database name which is defined by defaultDatabaseName option|
                              **original**
                              Do not transform original names
                              **snake_case**
                              Use snake_case names
                              |original| +|jsonDataTypeEnabled|Use special JSON MySQL data type for complex model properties. Requires MySQL version 5.7.8. Generates TEXT data type when disabled| |true| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | + + +## LANGUAGE PRIMITIVES + +
                              • BigDecimal
                              • +
                              • ByteArray
                              • +
                              • Date
                              • +
                              • DateTime
                              • +
                              • URI
                              • +
                              • UUID
                              • +
                              • binary
                              • +
                              • bool
                              • +
                              • boolean
                              • +
                              • byte
                              • +
                              • char
                              • +
                              • date
                              • +
                              • double
                              • +
                              • file
                              • +
                              • float
                              • +
                              • int
                              • +
                              • integer
                              • +
                              • long
                              • +
                              • mixed
                              • +
                              • number
                              • +
                              • short
                              • +
                              • string
                              • +
                              • void
                              • +
                              + +## RESERVED WORDS + +
                              • accessible
                              • +
                              • add
                              • +
                              • all
                              • +
                              • alter
                              • +
                              • analyze
                              • +
                              • and
                              • +
                              • as
                              • +
                              • asc
                              • +
                              • asensitive
                              • +
                              • before
                              • +
                              • between
                              • +
                              • bigint
                              • +
                              • binary
                              • +
                              • blob
                              • +
                              • both
                              • +
                              • by
                              • +
                              • call
                              • +
                              • cascade
                              • +
                              • case
                              • +
                              • change
                              • +
                              • char
                              • +
                              • character
                              • +
                              • check
                              • +
                              • collate
                              • +
                              • column
                              • +
                              • condition
                              • +
                              • constraint
                              • +
                              • continue
                              • +
                              • convert
                              • +
                              • create
                              • +
                              • cross
                              • +
                              • cube
                              • +
                              • cume_dist
                              • +
                              • current_date
                              • +
                              • current_time
                              • +
                              • current_timestamp
                              • +
                              • current_user
                              • +
                              • cursor
                              • +
                              • database
                              • +
                              • databases
                              • +
                              • day_hour
                              • +
                              • day_microsecond
                              • +
                              • day_minute
                              • +
                              • day_second
                              • +
                              • dec
                              • +
                              • decimal
                              • +
                              • declare
                              • +
                              • default
                              • +
                              • delayed
                              • +
                              • delete
                              • +
                              • dense_rank
                              • +
                              • desc
                              • +
                              • describe
                              • +
                              • deterministic
                              • +
                              • distinct
                              • +
                              • distinctrow
                              • +
                              • div
                              • +
                              • double
                              • +
                              • drop
                              • +
                              • dual
                              • +
                              • each
                              • +
                              • else
                              • +
                              • elseif
                              • +
                              • empty
                              • +
                              • enclosed
                              • +
                              • escaped
                              • +
                              • except
                              • +
                              • exists
                              • +
                              • exit
                              • +
                              • explain
                              • +
                              • false
                              • +
                              • fetch
                              • +
                              • first_value
                              • +
                              • float
                              • +
                              • float4
                              • +
                              • float8
                              • +
                              • for
                              • +
                              • force
                              • +
                              • foreign
                              • +
                              • from
                              • +
                              • fulltext
                              • +
                              • function
                              • +
                              • generated
                              • +
                              • get
                              • +
                              • grant
                              • +
                              • group
                              • +
                              • grouping
                              • +
                              • groups
                              • +
                              • having
                              • +
                              • high_priority
                              • +
                              • hour_microsecond
                              • +
                              • hour_minute
                              • +
                              • hour_second
                              • +
                              • if
                              • +
                              • ignore
                              • +
                              • in
                              • +
                              • index
                              • +
                              • infile
                              • +
                              • inner
                              • +
                              • inout
                              • +
                              • insensitive
                              • +
                              • insert
                              • +
                              • int
                              • +
                              • int1
                              • +
                              • int2
                              • +
                              • int3
                              • +
                              • int4
                              • +
                              • int8
                              • +
                              • integer
                              • +
                              • interval
                              • +
                              • into
                              • +
                              • io_after_gtids
                              • +
                              • io_before_gtids
                              • +
                              • is
                              • +
                              • iterate
                              • +
                              • join
                              • +
                              • json_table
                              • +
                              • key
                              • +
                              • keys
                              • +
                              • kill
                              • +
                              • lag
                              • +
                              • last_value
                              • +
                              • lead
                              • +
                              • leading
                              • +
                              • leave
                              • +
                              • left
                              • +
                              • like
                              • +
                              • limit
                              • +
                              • linear
                              • +
                              • lines
                              • +
                              • load
                              • +
                              • localtime
                              • +
                              • localtimestamp
                              • +
                              • lock
                              • +
                              • long
                              • +
                              • longblob
                              • +
                              • longtext
                              • +
                              • loop
                              • +
                              • low_priority
                              • +
                              • master_bind
                              • +
                              • master_ssl_verify_server_cert
                              • +
                              • match
                              • +
                              • maxvalue
                              • +
                              • mediumblob
                              • +
                              • mediumint
                              • +
                              • mediumtext
                              • +
                              • middleint
                              • +
                              • minute_microsecond
                              • +
                              • minute_second
                              • +
                              • mod
                              • +
                              • modifies
                              • +
                              • natural
                              • +
                              • no_write_to_binlog
                              • +
                              • not
                              • +
                              • nth_value
                              • +
                              • ntile
                              • +
                              • null
                              • +
                              • numeric
                              • +
                              • of
                              • +
                              • on
                              • +
                              • optimize
                              • +
                              • optimizer_costs
                              • +
                              • option
                              • +
                              • optionally
                              • +
                              • or
                              • +
                              • order
                              • +
                              • out
                              • +
                              • outer
                              • +
                              • outfile
                              • +
                              • over
                              • +
                              • partition
                              • +
                              • percent_rank
                              • +
                              • persist
                              • +
                              • persist_only
                              • +
                              • precision
                              • +
                              • primary
                              • +
                              • procedure
                              • +
                              • purge
                              • +
                              • range
                              • +
                              • rank
                              • +
                              • read
                              • +
                              • read_write
                              • +
                              • reads
                              • +
                              • real
                              • +
                              • recursive
                              • +
                              • references
                              • +
                              • regexp
                              • +
                              • release
                              • +
                              • rename
                              • +
                              • repeat
                              • +
                              • replace
                              • +
                              • require
                              • +
                              • resignal
                              • +
                              • restrict
                              • +
                              • return
                              • +
                              • revoke
                              • +
                              • right
                              • +
                              • rlike
                              • +
                              • role
                              • +
                              • row
                              • +
                              • row_number
                              • +
                              • rows
                              • +
                              • schema
                              • +
                              • schemas
                              • +
                              • second_microsecond
                              • +
                              • select
                              • +
                              • sensitive
                              • +
                              • separator
                              • +
                              • set
                              • +
                              • show
                              • +
                              • signal
                              • +
                              • smallint
                              • +
                              • spatial
                              • +
                              • specific
                              • +
                              • sql
                              • +
                              • sql_big_result
                              • +
                              • sql_calc_found_rows
                              • +
                              • sql_small_result
                              • +
                              • sqlexception
                              • +
                              • sqlstate
                              • +
                              • sqlwarning
                              • +
                              • ssl
                              • +
                              • starting
                              • +
                              • stored
                              • +
                              • straight_join
                              • +
                              • system
                              • +
                              • table
                              • +
                              • terminated
                              • +
                              • then
                              • +
                              • tinyblob
                              • +
                              • tinyint
                              • +
                              • tinytext
                              • +
                              • to
                              • +
                              • trailing
                              • +
                              • trigger
                              • +
                              • true
                              • +
                              • undo
                              • +
                              • union
                              • +
                              • unique
                              • +
                              • unlock
                              • +
                              • unsigned
                              • +
                              • update
                              • +
                              • usage
                              • +
                              • use
                              • +
                              • using
                              • +
                              • utc_date
                              • +
                              • utc_time
                              • +
                              • utc_timestamp
                              • +
                              • values
                              • +
                              • varbinary
                              • +
                              • varchar
                              • +
                              • varcharacter
                              • +
                              • varying
                              • +
                              • virtual
                              • +
                              • when
                              • +
                              • where
                              • +
                              • while
                              • +
                              • window
                              • +
                              • with
                              • +
                              • write
                              • +
                              • xor
                              • +
                              • year_month
                              • +
                              • zerofill
                              • +
                              diff --git a/docs/generators/nim.md b/docs/generators/nim.md index 7368aa1e8b..946669ccbe 100644 --- a/docs/generators/nim.md +++ b/docs/generators/nim.md @@ -5,8 +5,128 @@ sidebar_label: nim | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | +|Array|java.util.List| +|ArrayList|java.util.ArrayList| +|BigDecimal|java.math.BigDecimal| +|Date|java.util.Date| +|DateTime|org.joda.time.*| +|File|java.io.File| +|HashMap|java.util.HashMap| +|List|java.util.*| +|LocalDate|org.joda.time.*| +|LocalDateTime|org.joda.time.*| +|LocalTime|org.joda.time.*| +|Map|java.util.Map| +|Set|java.util.*| +|Timestamp|java.sql.Timestamp| +|URI|java.net.URI| +|UUID|java.util.UUID| + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | + + +## LANGUAGE PRIMITIVES + +
                              • bool
                              • +
                              • char
                              • +
                              • cstring
                              • +
                              • float
                              • +
                              • float32
                              • +
                              • float64
                              • +
                              • int
                              • +
                              • int16
                              • +
                              • int32
                              • +
                              • int64
                              • +
                              • int8
                              • +
                              • pointer
                              • +
                              • string
                              • +
                              • uint
                              • +
                              • uint16
                              • +
                              • uint32
                              • +
                              • uint64
                              • +
                              • uint8
                              • +
                              + +## RESERVED WORDS + +
                              • addr
                              • +
                              • and
                              • +
                              • as
                              • +
                              • asm
                              • +
                              • bind
                              • +
                              • block
                              • +
                              • break
                              • +
                              • case
                              • +
                              • cast
                              • +
                              • concept
                              • +
                              • const
                              • +
                              • continue
                              • +
                              • converter
                              • +
                              • defer
                              • +
                              • discard
                              • +
                              • distinct
                              • +
                              • div
                              • +
                              • do
                              • +
                              • elif
                              • +
                              • else
                              • +
                              • end
                              • +
                              • enum
                              • +
                              • except
                              • +
                              • export
                              • +
                              • finally
                              • +
                              • for
                              • +
                              • from
                              • +
                              • func
                              • +
                              • if
                              • +
                              • import
                              • +
                              • in
                              • +
                              • include
                              • +
                              • interface
                              • +
                              • is
                              • +
                              • isnot
                              • +
                              • iterator
                              • +
                              • let
                              • +
                              • macro
                              • +
                              • method
                              • +
                              • mixin
                              • +
                              • mod
                              • +
                              • nil
                              • +
                              • not
                              • +
                              • notin
                              • +
                              • object
                              • +
                              • of
                              • +
                              • or
                              • +
                              • out
                              • +
                              • proc
                              • +
                              • ptr
                              • +
                              • raise
                              • +
                              • ref
                              • +
                              • return
                              • +
                              • shl
                              • +
                              • shr
                              • +
                              • static
                              • +
                              • template
                              • +
                              • try
                              • +
                              • tuple
                              • +
                              • type
                              • +
                              • using
                              • +
                              • var
                              • +
                              • when
                              • +
                              • while
                              • +
                              • xor
                              • +
                              • yield
                              • +
                              diff --git a/docs/generators/nodejs-express-server.md b/docs/generators/nodejs-express-server.md index 0f00358644..b0a8db1c49 100644 --- a/docs/generators/nodejs-express-server.md +++ b/docs/generators/nodejs-express-server.md @@ -5,9 +5,79 @@ sidebar_label: nodejs-express-server | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| |serverPort|TCP port to listen on.| |null| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | +|Array|java.util.List| +|ArrayList|java.util.ArrayList| +|BigDecimal|java.math.BigDecimal| +|Date|java.util.Date| +|DateTime|org.joda.time.*| +|File|java.io.File| +|HashMap|java.util.HashMap| +|List|java.util.*| +|LocalDate|org.joda.time.*| +|LocalDateTime|org.joda.time.*| +|LocalTime|org.joda.time.*| +|Map|java.util.Map| +|Set|java.util.*| +|Timestamp|java.sql.Timestamp| +|URI|java.net.URI| +|UUID|java.util.UUID| + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | + + +## LANGUAGE PRIMITIVES + +
                                + +## RESERVED WORDS + +
                                • break
                                • +
                                • case
                                • +
                                • catch
                                • +
                                • class
                                • +
                                • const
                                • +
                                • continue
                                • +
                                • debugger
                                • +
                                • default
                                • +
                                • delete
                                • +
                                • do
                                • +
                                • else
                                • +
                                • export
                                • +
                                • extends
                                • +
                                • finally
                                • +
                                • for
                                • +
                                • function
                                • +
                                • if
                                • +
                                • import
                                • +
                                • in
                                • +
                                • instanceof
                                • +
                                • let
                                • +
                                • new
                                • +
                                • return
                                • +
                                • super
                                • +
                                • switch
                                • +
                                • this
                                • +
                                • throw
                                • +
                                • try
                                • +
                                • typeof
                                • +
                                • var
                                • +
                                • void
                                • +
                                • while
                                • +
                                • with
                                • +
                                • yield
                                • +
                                diff --git a/docs/generators/nodejs-server-deprecated.md b/docs/generators/nodejs-server-deprecated.md index 113637d89a..0967505e68 100644 --- a/docs/generators/nodejs-server-deprecated.md +++ b/docs/generators/nodejs-server-deprecated.md @@ -5,11 +5,81 @@ sidebar_label: nodejs-server-deprecated | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| -|googleCloudFunctions|When specified, it will generate the code which runs within Google Cloud Functions instead of standalone Node.JS server. See https://cloud.google.com/functions/docs/quickstart for the details of how to deploy the generated code.| |false| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |exportedName|When the generated code will be deployed to Google Cloud Functions, this option can be used to update the name of the exported function. By default, it refers to the basePath. This does not affect normal standalone nodejs server code.| |null| +|googleCloudFunctions|When specified, it will generate the code which runs within Google Cloud Functions instead of standalone Node.JS server. See https://cloud.google.com/functions/docs/quickstart for the details of how to deploy the generated code.| |false| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| |serverPort|TCP port to listen on.| |null| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | +|Array|java.util.List| +|ArrayList|java.util.ArrayList| +|BigDecimal|java.math.BigDecimal| +|Date|java.util.Date| +|DateTime|org.joda.time.*| +|File|java.io.File| +|HashMap|java.util.HashMap| +|List|java.util.*| +|LocalDate|org.joda.time.*| +|LocalDateTime|org.joda.time.*| +|LocalTime|org.joda.time.*| +|Map|java.util.Map| +|Set|java.util.*| +|Timestamp|java.sql.Timestamp| +|URI|java.net.URI| +|UUID|java.util.UUID| + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | + + +## LANGUAGE PRIMITIVES + +
                                  + +## RESERVED WORDS + +
                                  • break
                                  • +
                                  • case
                                  • +
                                  • catch
                                  • +
                                  • class
                                  • +
                                  • const
                                  • +
                                  • continue
                                  • +
                                  • debugger
                                  • +
                                  • default
                                  • +
                                  • delete
                                  • +
                                  • do
                                  • +
                                  • else
                                  • +
                                  • export
                                  • +
                                  • extends
                                  • +
                                  • finally
                                  • +
                                  • for
                                  • +
                                  • function
                                  • +
                                  • if
                                  • +
                                  • import
                                  • +
                                  • in
                                  • +
                                  • instanceof
                                  • +
                                  • let
                                  • +
                                  • new
                                  • +
                                  • return
                                  • +
                                  • super
                                  • +
                                  • switch
                                  • +
                                  • this
                                  • +
                                  • throw
                                  • +
                                  • try
                                  • +
                                  • typeof
                                  • +
                                  • var
                                  • +
                                  • void
                                  • +
                                  • while
                                  • +
                                  • with
                                  • +
                                  • yield
                                  • +
                                  diff --git a/docs/generators/nodejs-server.md b/docs/generators/nodejs-server.md deleted file mode 100644 index d66e4e4f01..0000000000 --- a/docs/generators/nodejs-server.md +++ /dev/null @@ -1,16 +0,0 @@ - ---- -id: generator-opts-server-nodejs-server -title: Config Options for nodejs-server -sidebar_label: nodejs-server ---- - -| Option | Description | Values | Default | -| ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| -|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| -|googleCloudFunctions|When specified, it will generate the code which runs within Google Cloud Functions instead of standalone Node.JS server. See https://cloud.google.com/functions/docs/quickstart for the details of how to deploy the generated code.| |false| -|exportedName|When the generated code will be deployed to Google Cloud Functions, this option can be used to update the name of the exported function. By default, it refers to the basePath. This does not affect normal standalone nodejs server code.| |null| -|serverPort|TCP port to listen on.| |null| diff --git a/docs/generators/objc.md b/docs/generators/objc.md index dff34b94fa..49148761b6 100644 --- a/docs/generators/objc.md +++ b/docs/generators/objc.md @@ -5,11 +5,102 @@ sidebar_label: objc | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|coreData|Should generate core data models| |false| -|classPrefix|prefix for generated classes (convention: Abbreviation of pod name e.g. `HN` for `HackerNews`).`| |OAI| -|podName|cocoapods package name (convention: CameCase).| |OpenAPIClient| -|podVersion|cocoapods package version.| |1.0.0| -|authorName|Name to use in the podspec file.| |OpenAPI| |authorEmail|Email to use in the podspec file.| |team@openapitools.org| +|authorName|Name to use in the podspec file.| |OpenAPI| +|classPrefix|prefix for generated classes (convention: Abbreviation of pod name e.g. `HN` for `HackerNews`).`| |OAI| +|coreData|Should generate core data models| |false| |gitRepoURL|URL for the git repo where this podspec should point to.| |https://github.com/openapitools/openapi-generator| |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true| +|podName|cocoapods package name (convention: CameCase).| |OpenAPIClient| +|podVersion|cocoapods package version.| |1.0.0| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | +|array|NSMutableArray| +|map|NSMutableDictionary| + + +## LANGUAGE PRIMITIVES + +
                                  • BOOL
                                  • +
                                  • NSData
                                  • +
                                  • NSDate
                                  • +
                                  • NSNumber
                                  • +
                                  • NSObject
                                  • +
                                  • NSString
                                  • +
                                  • NSURL
                                  • +
                                  • bool
                                  • +
                                  + +## RESERVED WORDS + +
                                  • _packed
                                  • +
                                  • authsettings
                                  • +
                                  • auto
                                  • +
                                  • bodyparam
                                  • +
                                  • break
                                  • +
                                  • case
                                  • +
                                  • cgfloat
                                  • +
                                  • char
                                  • +
                                  • class
                                  • +
                                  • const
                                  • +
                                  • continue
                                  • +
                                  • default
                                  • +
                                  • description
                                  • +
                                  • do
                                  • +
                                  • double
                                  • +
                                  • else
                                  • +
                                  • enum
                                  • +
                                  • extern
                                  • +
                                  • float
                                  • +
                                  • for
                                  • +
                                  • formparams
                                  • +
                                  • goto
                                  • +
                                  • headerparams
                                  • +
                                  • id
                                  • +
                                  • if
                                  • +
                                  • implementation
                                  • +
                                  • int
                                  • +
                                  • interface
                                  • +
                                  • localvarfiles
                                  • +
                                  • long
                                  • +
                                  • nonatomic
                                  • +
                                  • nsinteger
                                  • +
                                  • nsnumber
                                  • +
                                  • nsobject
                                  • +
                                  • pathparams
                                  • +
                                  • property
                                  • +
                                  • protocol
                                  • +
                                  • queryparams
                                  • +
                                  • readonly
                                  • +
                                  • readwrite
                                  • +
                                  • register
                                  • +
                                  • requestcontenttype
                                  • +
                                  • resourcepath
                                  • +
                                  • responsecontenttype
                                  • +
                                  • retain
                                  • +
                                  • return
                                  • +
                                  • short
                                  • +
                                  • signed
                                  • +
                                  • sizeof
                                  • +
                                  • static
                                  • +
                                  • strong
                                  • +
                                  • struct
                                  • +
                                  • switch
                                  • +
                                  • typedef
                                  • +
                                  • union
                                  • +
                                  • unsafe_unretained
                                  • +
                                  • unsigned
                                  • +
                                  • void
                                  • +
                                  • volatile
                                  • +
                                  • weak
                                  • +
                                  • while
                                  • +
                                  diff --git a/docs/generators/ocaml-client.md b/docs/generators/ocaml-client.md deleted file mode 100644 index 52874232c1..0000000000 --- a/docs/generators/ocaml-client.md +++ /dev/null @@ -1,13 +0,0 @@ - ---- -id: generator-opts-client-ocaml-client -title: Config Options for ocaml-client -sidebar_label: ocaml-client ---- - -| Option | Description | Values | Default | -| ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| -|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| diff --git a/docs/generators/ocaml.md b/docs/generators/ocaml.md index 2e9278e513..87721f5984 100644 --- a/docs/generators/ocaml.md +++ b/docs/generators/ocaml.md @@ -5,8 +5,110 @@ sidebar_label: ocaml | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | +|Array|java.util.List| +|ArrayList|java.util.ArrayList| +|BigDecimal|java.math.BigDecimal| +|Date|java.util.Date| +|DateTime|org.joda.time.*| +|HashMap|java.util.HashMap| +|List|java.util.*| +|LocalDate|org.joda.time.*| +|LocalDateTime|org.joda.time.*| +|LocalTime|org.joda.time.*| +|Map|java.util.Map| +|Set|java.util.*| +|Timestamp|java.sql.Timestamp| +|URI|java.net.URI| +|UUID|java.util.UUID| + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | + + +## LANGUAGE PRIMITIVES + +
                                  • Yojson.Safe.t
                                  • +
                                  • bool
                                  • +
                                  • bytes
                                  • +
                                  • char
                                  • +
                                  • float
                                  • +
                                  • int
                                  • +
                                  • int32
                                  • +
                                  • int64
                                  • +
                                  • list
                                  • +
                                  • string
                                  • +
                                  + +## RESERVED WORDS + +
                                  • and
                                  • +
                                  • as
                                  • +
                                  • asr
                                  • +
                                  • assert
                                  • +
                                  • begin
                                  • +
                                  • class
                                  • +
                                  • constraint
                                  • +
                                  • do
                                  • +
                                  • done
                                  • +
                                  • downto
                                  • +
                                  • else
                                  • +
                                  • end
                                  • +
                                  • exception
                                  • +
                                  • external
                                  • +
                                  • false
                                  • +
                                  • for
                                  • +
                                  • fun
                                  • +
                                  • function
                                  • +
                                  • functor
                                  • +
                                  • if
                                  • +
                                  • in
                                  • +
                                  • include
                                  • +
                                  • inherit
                                  • +
                                  • initializer
                                  • +
                                  • land
                                  • +
                                  • lazy
                                  • +
                                  • let
                                  • +
                                  • lor
                                  • +
                                  • lsl
                                  • +
                                  • lsr
                                  • +
                                  • lxor
                                  • +
                                  • match
                                  • +
                                  • method
                                  • +
                                  • mod
                                  • +
                                  • module
                                  • +
                                  • mutable
                                  • +
                                  • new
                                  • +
                                  • nonrec
                                  • +
                                  • object
                                  • +
                                  • of
                                  • +
                                  • open
                                  • +
                                  • or
                                  • +
                                  • private
                                  • +
                                  • rec
                                  • +
                                  • result
                                  • +
                                  • sig
                                  • +
                                  • struct
                                  • +
                                  • then
                                  • +
                                  • to
                                  • +
                                  • true
                                  • +
                                  • try
                                  • +
                                  • type
                                  • +
                                  • val
                                  • +
                                  • virtual
                                  • +
                                  • when
                                  • +
                                  • while
                                  • +
                                  • with
                                  • +
                                  diff --git a/docs/generators/openapi-yaml.md b/docs/generators/openapi-yaml.md index 6c31814c58..96021a3a3e 100644 --- a/docs/generators/openapi-yaml.md +++ b/docs/generators/openapi-yaml.md @@ -5,9 +5,45 @@ sidebar_label: openapi-yaml | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |outputFile|Output filename| |openapi/openapi.yaml| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | +|Array|java.util.List| +|ArrayList|java.util.ArrayList| +|BigDecimal|java.math.BigDecimal| +|Date|java.util.Date| +|DateTime|org.joda.time.*| +|File|java.io.File| +|HashMap|java.util.HashMap| +|List|java.util.*| +|LocalDate|org.joda.time.*| +|LocalDateTime|org.joda.time.*| +|LocalTime|org.joda.time.*| +|Map|java.util.Map| +|Set|java.util.*| +|Timestamp|java.sql.Timestamp| +|URI|java.net.URI| +|UUID|java.util.UUID| + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | + + +## LANGUAGE PRIMITIVES + +
                                    + +## RESERVED WORDS + +
                                      diff --git a/docs/generators/openapi.md b/docs/generators/openapi.md index b4fe221913..95b8fd6ace 100644 --- a/docs/generators/openapi.md +++ b/docs/generators/openapi.md @@ -5,8 +5,44 @@ sidebar_label: openapi | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | +|Array|java.util.List| +|ArrayList|java.util.ArrayList| +|BigDecimal|java.math.BigDecimal| +|Date|java.util.Date| +|DateTime|org.joda.time.*| +|File|java.io.File| +|HashMap|java.util.HashMap| +|List|java.util.*| +|LocalDate|org.joda.time.*| +|LocalDateTime|org.joda.time.*| +|LocalTime|org.joda.time.*| +|Map|java.util.Map| +|Set|java.util.*| +|Timestamp|java.sql.Timestamp| +|URI|java.net.URI| +|UUID|java.util.UUID| + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | + + +## LANGUAGE PRIMITIVES + +
                                        + +## RESERVED WORDS + +
                                          diff --git a/docs/generators/perl.md b/docs/generators/perl.md index 2cac430a58..3a65f291a4 100644 --- a/docs/generators/perl.md +++ b/docs/generators/perl.md @@ -5,9 +5,77 @@ sidebar_label: perl | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|moduleName|Perl module name (convention: CamelCase or Long::Module).| |OpenAPIClient| -|moduleVersion|Perl module version.| |1.0.0| -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true| +|moduleName|Perl module name (convention: CamelCase or Long::Module).| |OpenAPIClient| +|moduleVersion|Perl module version.| |1.0.0| |prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | + + +## LANGUAGE PRIMITIVES + +
                                          • ARRAY
                                          • +
                                          • DateTime
                                          • +
                                          • HASH
                                          • +
                                          • boolean
                                          • +
                                          • double
                                          • +
                                          • int
                                          • +
                                          • object
                                          • +
                                          • string
                                          • +
                                          + +## RESERVED WORDS + +
                                          • __end__
                                          • +
                                          • __file__
                                          • +
                                          • __line__
                                          • +
                                          • __package__
                                          • +
                                          • and
                                          • +
                                          • cmp
                                          • +
                                          • continue
                                          • +
                                          • core
                                          • +
                                          • do
                                          • +
                                          • else
                                          • +
                                          • elsif
                                          • +
                                          • eq
                                          • +
                                          • exp
                                          • +
                                          • for
                                          • +
                                          • foreach
                                          • +
                                          • ge
                                          • +
                                          • gt
                                          • +
                                          • if
                                          • +
                                          • le
                                          • +
                                          • lock
                                          • +
                                          • lt
                                          • +
                                          • m
                                          • +
                                          • ne
                                          • +
                                          • no
                                          • +
                                          • or
                                          • +
                                          • package
                                          • +
                                          • q
                                          • +
                                          • qq
                                          • +
                                          • qr
                                          • +
                                          • qw
                                          • +
                                          • qx
                                          • +
                                          • return
                                          • +
                                          • s
                                          • +
                                          • sub
                                          • +
                                          • tr
                                          • +
                                          • unless
                                          • +
                                          • until
                                          • +
                                          • while
                                          • +
                                          • xor
                                          • +
                                          • y
                                          • +
                                          diff --git a/docs/generators/php-laravel.md b/docs/generators/php-laravel.md index dee3787142..a0b7443d87 100644 --- a/docs/generators/php-laravel.md +++ b/docs/generators/php-laravel.md @@ -5,15 +5,138 @@ sidebar_label: php-laravel | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| -|modelPackage|package for generated models| |null| |apiPackage|package for generated api classes| |null| -|variableNamingConvention|naming convention of variable name, e.g. camelCase.| |snake_case| -|invokerPackage|The main namespace to use for all classes. e.g. Yay\Pets| |null| -|packageName|The main package name for classes. e.g. GeneratedPetstore| |null| -|srcBasePath|The directory to serve as source root.| |null| |artifactVersion|The version to use in the composer package version field. e.g. 1.2.3| |null| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|invokerPackage|The main namespace to use for all classes. e.g. Yay\Pets| |null| +|modelPackage|package for generated models| |null| +|packageName|The main package name for classes. e.g. GeneratedPetstore| |null| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| +|srcBasePath|The directory to serve as source root.| |null| +|variableNamingConvention|naming convention of variable name, e.g. camelCase.| |snake_case| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | +|Array|java.util.List| +|ArrayList|java.util.ArrayList| +|BigDecimal|java.math.BigDecimal| +|Date|java.util.Date| +|DateTime|org.joda.time.*| +|File|java.io.File| +|HashMap|java.util.HashMap| +|List|java.util.*| +|LocalDate|org.joda.time.*| +|LocalDateTime|org.joda.time.*| +|LocalTime|org.joda.time.*| +|Map|java.util.Map| +|Set|java.util.*| +|Timestamp|java.sql.Timestamp| +|URI|java.net.URI| +|UUID|java.util.UUID| + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | +|array|array| +|map|map| + + +## LANGUAGE PRIMITIVES + +
                                          • DateTime
                                          • +
                                          • bool
                                          • +
                                          • boolean
                                          • +
                                          • byte
                                          • +
                                          • double
                                          • +
                                          • float
                                          • +
                                          • int
                                          • +
                                          • integer
                                          • +
                                          • mixed
                                          • +
                                          • number
                                          • +
                                          • object
                                          • +
                                          • string
                                          • +
                                          • void
                                          • +
                                          + +## RESERVED WORDS + +
                                          • __halt_compiler
                                          • +
                                          • _header_accept
                                          • +
                                          • _tempbody
                                          • +
                                          • abstract
                                          • +
                                          • and
                                          • +
                                          • array
                                          • +
                                          • as
                                          • +
                                          • break
                                          • +
                                          • callable
                                          • +
                                          • case
                                          • +
                                          • catch
                                          • +
                                          • class
                                          • +
                                          • clone
                                          • +
                                          • const
                                          • +
                                          • continue
                                          • +
                                          • declare
                                          • +
                                          • default
                                          • +
                                          • die
                                          • +
                                          • do
                                          • +
                                          • echo
                                          • +
                                          • else
                                          • +
                                          • elseif
                                          • +
                                          • empty
                                          • +
                                          • enddeclare
                                          • +
                                          • endfor
                                          • +
                                          • endforeach
                                          • +
                                          • endif
                                          • +
                                          • endswitch
                                          • +
                                          • endwhile
                                          • +
                                          • eval
                                          • +
                                          • exit
                                          • +
                                          • extends
                                          • +
                                          • final
                                          • +
                                          • for
                                          • +
                                          • foreach
                                          • +
                                          • formparams
                                          • +
                                          • function
                                          • +
                                          • global
                                          • +
                                          • goto
                                          • +
                                          • headerparams
                                          • +
                                          • httpbody
                                          • +
                                          • if
                                          • +
                                          • implements
                                          • +
                                          • include
                                          • +
                                          • include_once
                                          • +
                                          • instanceof
                                          • +
                                          • insteadof
                                          • +
                                          • interface
                                          • +
                                          • isset
                                          • +
                                          • list
                                          • +
                                          • namespace
                                          • +
                                          • new
                                          • +
                                          • or
                                          • +
                                          • print
                                          • +
                                          • private
                                          • +
                                          • protected
                                          • +
                                          • public
                                          • +
                                          • queryparams
                                          • +
                                          • require
                                          • +
                                          • require_once
                                          • +
                                          • resourcepath
                                          • +
                                          • return
                                          • +
                                          • static
                                          • +
                                          • switch
                                          • +
                                          • throw
                                          • +
                                          • trait
                                          • +
                                          • try
                                          • +
                                          • unset
                                          • +
                                          • use
                                          • +
                                          • var
                                          • +
                                          • while
                                          • +
                                          • xor
                                          • +
                                          diff --git a/docs/generators/php-lumen.md b/docs/generators/php-lumen.md index 96af22e02a..4a33196eca 100644 --- a/docs/generators/php-lumen.md +++ b/docs/generators/php-lumen.md @@ -5,15 +5,138 @@ sidebar_label: php-lumen | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| -|modelPackage|package for generated models| |null| |apiPackage|package for generated api classes| |null| -|variableNamingConvention|naming convention of variable name, e.g. camelCase.| |snake_case| -|invokerPackage|The main namespace to use for all classes. e.g. Yay\Pets| |null| -|packageName|The main package name for classes. e.g. GeneratedPetstore| |null| -|srcBasePath|The directory to serve as source root.| |null| |artifactVersion|The version to use in the composer package version field. e.g. 1.2.3| |null| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|invokerPackage|The main namespace to use for all classes. e.g. Yay\Pets| |null| +|modelPackage|package for generated models| |null| +|packageName|The main package name for classes. e.g. GeneratedPetstore| |null| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| +|srcBasePath|The directory to serve as source root.| |null| +|variableNamingConvention|naming convention of variable name, e.g. camelCase.| |snake_case| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | +|Array|java.util.List| +|ArrayList|java.util.ArrayList| +|BigDecimal|java.math.BigDecimal| +|Date|java.util.Date| +|DateTime|org.joda.time.*| +|File|java.io.File| +|HashMap|java.util.HashMap| +|List|java.util.*| +|LocalDate|org.joda.time.*| +|LocalDateTime|org.joda.time.*| +|LocalTime|org.joda.time.*| +|Map|java.util.Map| +|Set|java.util.*| +|Timestamp|java.sql.Timestamp| +|URI|java.net.URI| +|UUID|java.util.UUID| + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | +|array|array| +|map|map| + + +## LANGUAGE PRIMITIVES + +
                                          • DateTime
                                          • +
                                          • bool
                                          • +
                                          • boolean
                                          • +
                                          • byte
                                          • +
                                          • double
                                          • +
                                          • float
                                          • +
                                          • int
                                          • +
                                          • integer
                                          • +
                                          • mixed
                                          • +
                                          • number
                                          • +
                                          • object
                                          • +
                                          • string
                                          • +
                                          • void
                                          • +
                                          + +## RESERVED WORDS + +
                                          • __halt_compiler
                                          • +
                                          • _header_accept
                                          • +
                                          • _tempbody
                                          • +
                                          • abstract
                                          • +
                                          • and
                                          • +
                                          • array
                                          • +
                                          • as
                                          • +
                                          • break
                                          • +
                                          • callable
                                          • +
                                          • case
                                          • +
                                          • catch
                                          • +
                                          • class
                                          • +
                                          • clone
                                          • +
                                          • const
                                          • +
                                          • continue
                                          • +
                                          • declare
                                          • +
                                          • default
                                          • +
                                          • die
                                          • +
                                          • do
                                          • +
                                          • echo
                                          • +
                                          • else
                                          • +
                                          • elseif
                                          • +
                                          • empty
                                          • +
                                          • enddeclare
                                          • +
                                          • endfor
                                          • +
                                          • endforeach
                                          • +
                                          • endif
                                          • +
                                          • endswitch
                                          • +
                                          • endwhile
                                          • +
                                          • eval
                                          • +
                                          • exit
                                          • +
                                          • extends
                                          • +
                                          • final
                                          • +
                                          • for
                                          • +
                                          • foreach
                                          • +
                                          • formparams
                                          • +
                                          • function
                                          • +
                                          • global
                                          • +
                                          • goto
                                          • +
                                          • headerparams
                                          • +
                                          • httpbody
                                          • +
                                          • if
                                          • +
                                          • implements
                                          • +
                                          • include
                                          • +
                                          • include_once
                                          • +
                                          • instanceof
                                          • +
                                          • insteadof
                                          • +
                                          • interface
                                          • +
                                          • isset
                                          • +
                                          • list
                                          • +
                                          • namespace
                                          • +
                                          • new
                                          • +
                                          • or
                                          • +
                                          • print
                                          • +
                                          • private
                                          • +
                                          • protected
                                          • +
                                          • public
                                          • +
                                          • queryparams
                                          • +
                                          • require
                                          • +
                                          • require_once
                                          • +
                                          • resourcepath
                                          • +
                                          • return
                                          • +
                                          • static
                                          • +
                                          • switch
                                          • +
                                          • throw
                                          • +
                                          • trait
                                          • +
                                          • try
                                          • +
                                          • unset
                                          • +
                                          • use
                                          • +
                                          • var
                                          • +
                                          • while
                                          • +
                                          • xor
                                          • +
                                          diff --git a/docs/generators/php-silex.md b/docs/generators/php-silex.md index 67000a6a3b..7c515f135e 100644 --- a/docs/generators/php-silex.md +++ b/docs/generators/php-silex.md @@ -5,8 +5,121 @@ sidebar_label: php-silex | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | +|Array|java.util.List| +|ArrayList|java.util.ArrayList| +|BigDecimal|java.math.BigDecimal| +|Date|java.util.Date| +|DateTime|org.joda.time.*| +|File|java.io.File| +|HashMap|java.util.HashMap| +|List|java.util.*| +|LocalDate|org.joda.time.*| +|LocalDateTime|org.joda.time.*| +|LocalTime|org.joda.time.*| +|Map|java.util.Map| +|Set|java.util.*| +|Timestamp|java.sql.Timestamp| +|URI|java.net.URI| +|UUID|java.util.UUID| + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | +|array|array| +|map|map| + + +## LANGUAGE PRIMITIVES + +
                                          • DateTime
                                          • +
                                          • boolean
                                          • +
                                          • double
                                          • +
                                          • float
                                          • +
                                          • int
                                          • +
                                          • integer
                                          • +
                                          • mixed
                                          • +
                                          • number
                                          • +
                                          • object
                                          • +
                                          • string
                                          • +
                                          + +## RESERVED WORDS + +
                                          • __halt_compiler
                                          • +
                                          • abstract
                                          • +
                                          • and
                                          • +
                                          • array
                                          • +
                                          • as
                                          • +
                                          • break
                                          • +
                                          • callable
                                          • +
                                          • case
                                          • +
                                          • catch
                                          • +
                                          • class
                                          • +
                                          • clone
                                          • +
                                          • const
                                          • +
                                          • continue
                                          • +
                                          • declare
                                          • +
                                          • default
                                          • +
                                          • die
                                          • +
                                          • do
                                          • +
                                          • echo
                                          • +
                                          • else
                                          • +
                                          • elseif
                                          • +
                                          • empty
                                          • +
                                          • enddeclare
                                          • +
                                          • endfor
                                          • +
                                          • endforeach
                                          • +
                                          • endif
                                          • +
                                          • endswitch
                                          • +
                                          • endwhile
                                          • +
                                          • eval
                                          • +
                                          • exit
                                          • +
                                          • extends
                                          • +
                                          • final
                                          • +
                                          • for
                                          • +
                                          • foreach
                                          • +
                                          • function
                                          • +
                                          • global
                                          • +
                                          • goto
                                          • +
                                          • if
                                          • +
                                          • implements
                                          • +
                                          • include
                                          • +
                                          • include_once
                                          • +
                                          • instanceof
                                          • +
                                          • insteadof
                                          • +
                                          • interface
                                          • +
                                          • isset
                                          • +
                                          • list
                                          • +
                                          • namespace
                                          • +
                                          • new
                                          • +
                                          • or
                                          • +
                                          • print
                                          • +
                                          • private
                                          • +
                                          • protected
                                          • +
                                          • public
                                          • +
                                          • require
                                          • +
                                          • require_once
                                          • +
                                          • return
                                          • +
                                          • static
                                          • +
                                          • switch
                                          • +
                                          • throw
                                          • +
                                          • trait
                                          • +
                                          • try
                                          • +
                                          • unset
                                          • +
                                          • use
                                          • +
                                          • var
                                          • +
                                          • while
                                          • +
                                          • xor
                                          • +
                                          diff --git a/docs/generators/php-slim-deprecated.md b/docs/generators/php-slim-deprecated.md index b15405df2b..7e6cd21fdb 100644 --- a/docs/generators/php-slim-deprecated.md +++ b/docs/generators/php-slim-deprecated.md @@ -5,15 +5,122 @@ sidebar_label: php-slim-deprecated | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| -|modelPackage|package for generated models| |null| |apiPackage|package for generated api classes| |null| -|variableNamingConvention|naming convention of variable name, e.g. camelCase.| |camelCase| -|invokerPackage|The main namespace to use for all classes. e.g. Yay\Pets| |null| -|packageName|The main package name for classes. e.g. GeneratedPetstore| |null| -|srcBasePath|The directory to serve as source root.| |null| |artifactVersion|The version to use in the composer package version field. e.g. 1.2.3| |null| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|invokerPackage|The main namespace to use for all classes. e.g. Yay\Pets| |null| +|modelPackage|package for generated models| |null| +|packageName|The main package name for classes. e.g. GeneratedPetstore| |null| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| +|srcBasePath|The directory to serve as source root.| |null| +|variableNamingConvention|naming convention of variable name, e.g. camelCase.| |camelCase| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | +|array|array| +|map|map| + + +## LANGUAGE PRIMITIVES + +
                                          • DateTime
                                          • +
                                          • bool
                                          • +
                                          • boolean
                                          • +
                                          • byte
                                          • +
                                          • double
                                          • +
                                          • float
                                          • +
                                          • int
                                          • +
                                          • integer
                                          • +
                                          • mixed
                                          • +
                                          • number
                                          • +
                                          • object
                                          • +
                                          • string
                                          • +
                                          • void
                                          • +
                                          + +## RESERVED WORDS + +
                                          • __halt_compiler
                                          • +
                                          • _header_accept
                                          • +
                                          • _tempbody
                                          • +
                                          • abstract
                                          • +
                                          • and
                                          • +
                                          • array
                                          • +
                                          • as
                                          • +
                                          • break
                                          • +
                                          • callable
                                          • +
                                          • case
                                          • +
                                          • catch
                                          • +
                                          • class
                                          • +
                                          • clone
                                          • +
                                          • const
                                          • +
                                          • continue
                                          • +
                                          • declare
                                          • +
                                          • default
                                          • +
                                          • die
                                          • +
                                          • do
                                          • +
                                          • echo
                                          • +
                                          • else
                                          • +
                                          • elseif
                                          • +
                                          • empty
                                          • +
                                          • enddeclare
                                          • +
                                          • endfor
                                          • +
                                          • endforeach
                                          • +
                                          • endif
                                          • +
                                          • endswitch
                                          • +
                                          • endwhile
                                          • +
                                          • eval
                                          • +
                                          • exit
                                          • +
                                          • extends
                                          • +
                                          • final
                                          • +
                                          • for
                                          • +
                                          • foreach
                                          • +
                                          • formparams
                                          • +
                                          • function
                                          • +
                                          • global
                                          • +
                                          • goto
                                          • +
                                          • headerparams
                                          • +
                                          • httpbody
                                          • +
                                          • if
                                          • +
                                          • implements
                                          • +
                                          • include
                                          • +
                                          • include_once
                                          • +
                                          • instanceof
                                          • +
                                          • insteadof
                                          • +
                                          • interface
                                          • +
                                          • isset
                                          • +
                                          • list
                                          • +
                                          • namespace
                                          • +
                                          • new
                                          • +
                                          • or
                                          • +
                                          • print
                                          • +
                                          • private
                                          • +
                                          • protected
                                          • +
                                          • public
                                          • +
                                          • queryparams
                                          • +
                                          • require
                                          • +
                                          • require_once
                                          • +
                                          • resourcepath
                                          • +
                                          • return
                                          • +
                                          • static
                                          • +
                                          • switch
                                          • +
                                          • throw
                                          • +
                                          • trait
                                          • +
                                          • try
                                          • +
                                          • unset
                                          • +
                                          • use
                                          • +
                                          • var
                                          • +
                                          • while
                                          • +
                                          • xor
                                          • +
                                          diff --git a/docs/generators/php-slim.md b/docs/generators/php-slim.md deleted file mode 100644 index d9e188a425..0000000000 --- a/docs/generators/php-slim.md +++ /dev/null @@ -1,18 +0,0 @@ ---- -title: Config Options for php-slim -sidebar_label: php-slim ---- - -| Option | Description | Values | Default | -| ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| -|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| -|modelPackage|package for generated models| |null| -|apiPackage|package for generated api classes| |null| -|variableNamingConvention|naming convention of variable name, e.g. camelCase.| |camelCase| -|invokerPackage|The main namespace to use for all classes. e.g. Yay\Pets| |null| -|packageName|The main package name for classes. e.g. GeneratedPetstore| |null| -|srcBasePath|The directory to serve as source root.| |null| -|artifactVersion|The version to use in the composer package version field. e.g. 1.2.3| |null| diff --git a/docs/generators/php-slim4.md b/docs/generators/php-slim4.md index 6ca37b8adc..1e96ca09b3 100644 --- a/docs/generators/php-slim4.md +++ b/docs/generators/php-slim4.md @@ -5,16 +5,123 @@ sidebar_label: php-slim4 | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| -|modelPackage|package for generated models| |null| |apiPackage|package for generated api classes| |null| -|variableNamingConvention|naming convention of variable name, e.g. camelCase.| |camelCase| -|invokerPackage|The main namespace to use for all classes. e.g. Yay\Pets| |null| -|packageName|The main package name for classes. e.g. GeneratedPetstore| |null| -|srcBasePath|The directory to serve as source root.| |null| |artifactVersion|The version to use in the composer package version field. e.g. 1.2.3| |null| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|invokerPackage|The main namespace to use for all classes. e.g. Yay\Pets| |null| +|modelPackage|package for generated models| |null| +|packageName|The main package name for classes. e.g. GeneratedPetstore| |null| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| |psr7Implementation|Slim 4 provides its own PSR-7 implementation so that it works out of the box. However, you are free to replace Slim’s default PSR-7 objects with a third-party implementation. Ref: https://www.slimframework.com/docs/v4/concepts/value-objects.html|
                                          **slim-psr7**
                                          Slim PSR-7 Message implementation
                                          **nyholm-psr7**
                                          Nyholm PSR-7 Message implementation
                                          **guzzle-psr7**
                                          Guzzle PSR-7 Message implementation
                                          **zend-diactoros**
                                          Zend Diactoros PSR-7 Message implementation
                                          |slim-psr7| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| +|srcBasePath|The directory to serve as source root.| |null| +|variableNamingConvention|naming convention of variable name, e.g. camelCase.| |camelCase| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | +|array|array| +|map|map| + + +## LANGUAGE PRIMITIVES + +
                                          • DateTime
                                          • +
                                          • bool
                                          • +
                                          • boolean
                                          • +
                                          • byte
                                          • +
                                          • double
                                          • +
                                          • float
                                          • +
                                          • int
                                          • +
                                          • integer
                                          • +
                                          • mixed
                                          • +
                                          • number
                                          • +
                                          • object
                                          • +
                                          • string
                                          • +
                                          • void
                                          • +
                                          + +## RESERVED WORDS + +
                                          • __halt_compiler
                                          • +
                                          • _header_accept
                                          • +
                                          • _tempbody
                                          • +
                                          • abstract
                                          • +
                                          • and
                                          • +
                                          • array
                                          • +
                                          • as
                                          • +
                                          • break
                                          • +
                                          • callable
                                          • +
                                          • case
                                          • +
                                          • catch
                                          • +
                                          • class
                                          • +
                                          • clone
                                          • +
                                          • const
                                          • +
                                          • continue
                                          • +
                                          • declare
                                          • +
                                          • default
                                          • +
                                          • die
                                          • +
                                          • do
                                          • +
                                          • echo
                                          • +
                                          • else
                                          • +
                                          • elseif
                                          • +
                                          • empty
                                          • +
                                          • enddeclare
                                          • +
                                          • endfor
                                          • +
                                          • endforeach
                                          • +
                                          • endif
                                          • +
                                          • endswitch
                                          • +
                                          • endwhile
                                          • +
                                          • eval
                                          • +
                                          • exit
                                          • +
                                          • extends
                                          • +
                                          • final
                                          • +
                                          • for
                                          • +
                                          • foreach
                                          • +
                                          • formparams
                                          • +
                                          • function
                                          • +
                                          • global
                                          • +
                                          • goto
                                          • +
                                          • headerparams
                                          • +
                                          • httpbody
                                          • +
                                          • if
                                          • +
                                          • implements
                                          • +
                                          • include
                                          • +
                                          • include_once
                                          • +
                                          • instanceof
                                          • +
                                          • insteadof
                                          • +
                                          • interface
                                          • +
                                          • isset
                                          • +
                                          • list
                                          • +
                                          • namespace
                                          • +
                                          • new
                                          • +
                                          • or
                                          • +
                                          • print
                                          • +
                                          • private
                                          • +
                                          • protected
                                          • +
                                          • public
                                          • +
                                          • queryparams
                                          • +
                                          • require
                                          • +
                                          • require_once
                                          • +
                                          • resourcepath
                                          • +
                                          • return
                                          • +
                                          • static
                                          • +
                                          • switch
                                          • +
                                          • throw
                                          • +
                                          • trait
                                          • +
                                          • try
                                          • +
                                          • unset
                                          • +
                                          • use
                                          • +
                                          • var
                                          • +
                                          • while
                                          • +
                                          • xor
                                          • +
                                          diff --git a/docs/generators/php-symfony.md b/docs/generators/php-symfony.md index 913c5be6a5..a6fbd33e45 100644 --- a/docs/generators/php-symfony.md +++ b/docs/generators/php-symfony.md @@ -5,21 +5,126 @@ sidebar_label: php-symfony | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| -|modelPackage|package for generated models| |null| |apiPackage|package for generated api classes| |null| -|variableNamingConvention|naming convention of variable name, e.g. camelCase.| |snake_case| -|invokerPackage|The main namespace to use for all classes. e.g. Yay\Pets| |null| -|packageName|The main package name for classes. e.g. GeneratedPetstore| |null| -|srcBasePath|The directory to serve as source root.| |null| |artifactVersion|The version to use in the composer package version field. e.g. 1.2.3| |null| -|composerVendorName|The vendor name used in the composer package name. The template uses {{composerVendorName}}/{{composerProjectName}} for the composer package name. e.g. yaypets| |null| -|bundleName|The name of the Symfony bundle. The template uses {{bundleName}}| |null| |bundleAlias|The alias of the Symfony bundle. The template uses {{aliasName}}| |null| +|bundleName|The name of the Symfony bundle. The template uses {{bundleName}}| |null| |composerProjectName|The project name used in the composer package name. The template uses {{composerVendorName}}/{{composerProjectName}} for the composer package name. e.g. petstore-client| |null| +|composerVendorName|The vendor name used in the composer package name. The template uses {{composerVendorName}}/{{composerProjectName}} for the composer package name. e.g. yaypets| |null| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true| +|invokerPackage|The main namespace to use for all classes. e.g. Yay\Pets| |null| +|modelPackage|package for generated models| |null| +|packageName|The main package name for classes. e.g. GeneratedPetstore| |null| |phpLegacySupport|Should the generated code be compatible with PHP 5.x?| |true| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| +|srcBasePath|The directory to serve as source root.| |null| +|variableNamingConvention|naming convention of variable name, e.g. camelCase.| |snake_case| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | +|array|array| +|map|map| + + +## LANGUAGE PRIMITIVES + +
                                          • array
                                          • +
                                          • bool
                                          • +
                                          • byte
                                          • +
                                          • double
                                          • +
                                          • float
                                          • +
                                          • int
                                          • +
                                          • mixed
                                          • +
                                          • number
                                          • +
                                          • object
                                          • +
                                          • string
                                          • +
                                          • void
                                          • +
                                          + +## RESERVED WORDS + +
                                          • __halt_compiler
                                          • +
                                          • _header_accept
                                          • +
                                          • _tempbody
                                          • +
                                          • abstract
                                          • +
                                          • and
                                          • +
                                          • array
                                          • +
                                          • as
                                          • +
                                          • break
                                          • +
                                          • callable
                                          • +
                                          • case
                                          • +
                                          • catch
                                          • +
                                          • class
                                          • +
                                          • clone
                                          • +
                                          • const
                                          • +
                                          • continue
                                          • +
                                          • declare
                                          • +
                                          • default
                                          • +
                                          • die
                                          • +
                                          • do
                                          • +
                                          • echo
                                          • +
                                          • else
                                          • +
                                          • elseif
                                          • +
                                          • empty
                                          • +
                                          • enddeclare
                                          • +
                                          • endfor
                                          • +
                                          • endforeach
                                          • +
                                          • endif
                                          • +
                                          • endswitch
                                          • +
                                          • endwhile
                                          • +
                                          • eval
                                          • +
                                          • exit
                                          • +
                                          • extends
                                          • +
                                          • final
                                          • +
                                          • for
                                          • +
                                          • foreach
                                          • +
                                          • formparams
                                          • +
                                          • function
                                          • +
                                          • global
                                          • +
                                          • goto
                                          • +
                                          • headerparams
                                          • +
                                          • httpbody
                                          • +
                                          • if
                                          • +
                                          • implements
                                          • +
                                          • include
                                          • +
                                          • include_once
                                          • +
                                          • instanceof
                                          • +
                                          • insteadof
                                          • +
                                          • interface
                                          • +
                                          • isset
                                          • +
                                          • list
                                          • +
                                          • namespace
                                          • +
                                          • new
                                          • +
                                          • or
                                          • +
                                          • print
                                          • +
                                          • private
                                          • +
                                          • protected
                                          • +
                                          • public
                                          • +
                                          • queryparams
                                          • +
                                          • require
                                          • +
                                          • require_once
                                          • +
                                          • resourcepath
                                          • +
                                          • return
                                          • +
                                          • static
                                          • +
                                          • switch
                                          • +
                                          • throw
                                          • +
                                          • trait
                                          • +
                                          • try
                                          • +
                                          • unset
                                          • +
                                          • use
                                          • +
                                          • var
                                          • +
                                          • while
                                          • +
                                          • xor
                                          • +
                                          diff --git a/docs/generators/php-ze-ph.md b/docs/generators/php-ze-ph.md index a1066f34dc..99bf251414 100644 --- a/docs/generators/php-ze-ph.md +++ b/docs/generators/php-ze-ph.md @@ -5,15 +5,138 @@ sidebar_label: php-ze-ph | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| -|modelPackage|package for generated models| |null| |apiPackage|package for generated api classes| |null| -|variableNamingConvention|naming convention of variable name, e.g. camelCase.| |snake_case| -|invokerPackage|The main namespace to use for all classes. e.g. Yay\Pets| |null| -|packageName|The main package name for classes. e.g. GeneratedPetstore| |null| -|srcBasePath|The directory to serve as source root.| |null| |artifactVersion|The version to use in the composer package version field. e.g. 1.2.3| |null| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|invokerPackage|The main namespace to use for all classes. e.g. Yay\Pets| |null| +|modelPackage|package for generated models| |null| +|packageName|The main package name for classes. e.g. GeneratedPetstore| |null| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| +|srcBasePath|The directory to serve as source root.| |null| +|variableNamingConvention|naming convention of variable name, e.g. camelCase.| |snake_case| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | +|Array|java.util.List| +|ArrayList|java.util.ArrayList| +|BigDecimal|java.math.BigDecimal| +|Date|java.util.Date| +|DateTime|org.joda.time.*| +|File|java.io.File| +|HashMap|java.util.HashMap| +|List|java.util.*| +|LocalDate|org.joda.time.*| +|LocalDateTime|org.joda.time.*| +|LocalTime|org.joda.time.*| +|Map|java.util.Map| +|Set|java.util.*| +|Timestamp|java.sql.Timestamp| +|URI|java.net.URI| +|UUID|java.util.UUID| + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | +|array|array| +|map|map| + + +## LANGUAGE PRIMITIVES + +
                                          • DateTime
                                          • +
                                          • bool
                                          • +
                                          • boolean
                                          • +
                                          • byte
                                          • +
                                          • double
                                          • +
                                          • float
                                          • +
                                          • int
                                          • +
                                          • integer
                                          • +
                                          • mixed
                                          • +
                                          • number
                                          • +
                                          • object
                                          • +
                                          • string
                                          • +
                                          • void
                                          • +
                                          + +## RESERVED WORDS + +
                                          • __halt_compiler
                                          • +
                                          • _header_accept
                                          • +
                                          • _tempbody
                                          • +
                                          • abstract
                                          • +
                                          • and
                                          • +
                                          • array
                                          • +
                                          • as
                                          • +
                                          • break
                                          • +
                                          • callable
                                          • +
                                          • case
                                          • +
                                          • catch
                                          • +
                                          • class
                                          • +
                                          • clone
                                          • +
                                          • const
                                          • +
                                          • continue
                                          • +
                                          • declare
                                          • +
                                          • default
                                          • +
                                          • die
                                          • +
                                          • do
                                          • +
                                          • echo
                                          • +
                                          • else
                                          • +
                                          • elseif
                                          • +
                                          • empty
                                          • +
                                          • enddeclare
                                          • +
                                          • endfor
                                          • +
                                          • endforeach
                                          • +
                                          • endif
                                          • +
                                          • endswitch
                                          • +
                                          • endwhile
                                          • +
                                          • eval
                                          • +
                                          • exit
                                          • +
                                          • extends
                                          • +
                                          • final
                                          • +
                                          • for
                                          • +
                                          • foreach
                                          • +
                                          • formparams
                                          • +
                                          • function
                                          • +
                                          • global
                                          • +
                                          • goto
                                          • +
                                          • headerparams
                                          • +
                                          • httpbody
                                          • +
                                          • if
                                          • +
                                          • implements
                                          • +
                                          • include
                                          • +
                                          • include_once
                                          • +
                                          • instanceof
                                          • +
                                          • insteadof
                                          • +
                                          • interface
                                          • +
                                          • isset
                                          • +
                                          • list
                                          • +
                                          • namespace
                                          • +
                                          • new
                                          • +
                                          • or
                                          • +
                                          • print
                                          • +
                                          • private
                                          • +
                                          • protected
                                          • +
                                          • public
                                          • +
                                          • queryparams
                                          • +
                                          • require
                                          • +
                                          • require_once
                                          • +
                                          • resourcepath
                                          • +
                                          • return
                                          • +
                                          • static
                                          • +
                                          • switch
                                          • +
                                          • throw
                                          • +
                                          • trait
                                          • +
                                          • try
                                          • +
                                          • unset
                                          • +
                                          • use
                                          • +
                                          • var
                                          • +
                                          • while
                                          • +
                                          • xor
                                          • +
                                          diff --git a/docs/generators/php.md b/docs/generators/php.md index c7d1766f24..b8de32ff81 100644 --- a/docs/generators/php.md +++ b/docs/generators/php.md @@ -5,16 +5,123 @@ sidebar_label: php | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| -|modelPackage|package for generated models| |null| |apiPackage|package for generated api classes| |null| -|variableNamingConvention|naming convention of variable name, e.g. camelCase.| |snake_case| -|invokerPackage|The main namespace to use for all classes. e.g. Yay\Pets| |null| -|packageName|The main package name for classes. e.g. GeneratedPetstore| |null| -|srcBasePath|The directory to serve as source root.| |null| |artifactVersion|The version to use in the composer package version field. e.g. 1.2.3| |null| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |hideGenerationTimestamp|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |true| +|invokerPackage|The main namespace to use for all classes. e.g. Yay\Pets| |null| +|modelPackage|package for generated models| |null| +|packageName|The main package name for classes. e.g. GeneratedPetstore| |null| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| +|srcBasePath|The directory to serve as source root.| |null| +|variableNamingConvention|naming convention of variable name, e.g. camelCase.| |snake_case| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | +|array|array| +|map|map| + + +## LANGUAGE PRIMITIVES + +
                                          • DateTime
                                          • +
                                          • bool
                                          • +
                                          • boolean
                                          • +
                                          • byte
                                          • +
                                          • double
                                          • +
                                          • float
                                          • +
                                          • int
                                          • +
                                          • integer
                                          • +
                                          • mixed
                                          • +
                                          • number
                                          • +
                                          • object
                                          • +
                                          • string
                                          • +
                                          • void
                                          • +
                                          + +## RESERVED WORDS + +
                                          • __halt_compiler
                                          • +
                                          • _header_accept
                                          • +
                                          • _tempbody
                                          • +
                                          • abstract
                                          • +
                                          • and
                                          • +
                                          • array
                                          • +
                                          • as
                                          • +
                                          • break
                                          • +
                                          • callable
                                          • +
                                          • case
                                          • +
                                          • catch
                                          • +
                                          • class
                                          • +
                                          • clone
                                          • +
                                          • const
                                          • +
                                          • continue
                                          • +
                                          • declare
                                          • +
                                          • default
                                          • +
                                          • die
                                          • +
                                          • do
                                          • +
                                          • echo
                                          • +
                                          • else
                                          • +
                                          • elseif
                                          • +
                                          • empty
                                          • +
                                          • enddeclare
                                          • +
                                          • endfor
                                          • +
                                          • endforeach
                                          • +
                                          • endif
                                          • +
                                          • endswitch
                                          • +
                                          • endwhile
                                          • +
                                          • eval
                                          • +
                                          • exit
                                          • +
                                          • extends
                                          • +
                                          • final
                                          • +
                                          • for
                                          • +
                                          • foreach
                                          • +
                                          • formparams
                                          • +
                                          • function
                                          • +
                                          • global
                                          • +
                                          • goto
                                          • +
                                          • headerparams
                                          • +
                                          • httpbody
                                          • +
                                          • if
                                          • +
                                          • implements
                                          • +
                                          • include
                                          • +
                                          • include_once
                                          • +
                                          • instanceof
                                          • +
                                          • insteadof
                                          • +
                                          • interface
                                          • +
                                          • isset
                                          • +
                                          • list
                                          • +
                                          • namespace
                                          • +
                                          • new
                                          • +
                                          • or
                                          • +
                                          • print
                                          • +
                                          • private
                                          • +
                                          • protected
                                          • +
                                          • public
                                          • +
                                          • queryparams
                                          • +
                                          • require
                                          • +
                                          • require_once
                                          • +
                                          • resourcepath
                                          • +
                                          • return
                                          • +
                                          • static
                                          • +
                                          • switch
                                          • +
                                          • throw
                                          • +
                                          • trait
                                          • +
                                          • try
                                          • +
                                          • unset
                                          • +
                                          • use
                                          • +
                                          • var
                                          • +
                                          • while
                                          • +
                                          • xor
                                          • +
                                          diff --git a/docs/generators/powershell.md b/docs/generators/powershell.md index bef12a7aaf..e8fcfaf8af 100644 --- a/docs/generators/powershell.md +++ b/docs/generators/powershell.md @@ -5,6 +5,96 @@ sidebar_label: powershell | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|packageName|Client package name (e.g. org.openapitools.client).| |Org.OpenAPITools| -|packageGuid|GUID for PowerShell module (e.g. a27b908d-2a20-467f-bc32-af6f3a654ac5). A random GUID will be generated by default.| |null| |csharpClientPath|Path to the C# API client generated by OpenAPI Generator, e.g. $ScriptDir\..\csharp\OpenAPIClient where $ScriptDir is the current directory. NOTE: you will need to generate the C# API client separately.| |$ScriptDir\csharp\OpenAPIClient| +|packageGuid|GUID for PowerShell module (e.g. a27b908d-2a20-467f-bc32-af6f3a654ac5). A random GUID will be generated by default.| |null| +|packageName|Client package name (e.g. org.openapitools.client).| |Org.OpenAPITools| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | +|Array|java.util.List| +|ArrayList|java.util.ArrayList| +|BigDecimal|java.math.BigDecimal| +|Date|java.util.Date| +|DateTime|org.joda.time.*| +|File|java.io.File| +|HashMap|java.util.HashMap| +|List|java.util.*| +|LocalDate|org.joda.time.*| +|LocalDateTime|org.joda.time.*| +|LocalTime|org.joda.time.*| +|Map|java.util.Map| +|Set|java.util.*| +|Timestamp|java.sql.Timestamp| +|URI|java.net.URI| +|UUID|java.util.UUID| + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | + + +## LANGUAGE PRIMITIVES + +
                                          • Boolean
                                          • +
                                          • Byte
                                          • +
                                          • Byte[]
                                          • +
                                          • Char
                                          • +
                                          • Decimal
                                          • +
                                          • Double
                                          • +
                                          • Guid
                                          • +
                                          • Int16
                                          • +
                                          • Int32
                                          • +
                                          • Int64
                                          • +
                                          • ProgressRecord
                                          • +
                                          • SByte
                                          • +
                                          • SecureString
                                          • +
                                          • Single
                                          • +
                                          • String
                                          • +
                                          • System.DateTime
                                          • +
                                          • TimeSpan
                                          • +
                                          • UInt16
                                          • +
                                          • UInt32
                                          • +
                                          • UInt64
                                          • +
                                          • Uri
                                          • +
                                          • Version
                                          • +
                                          • XmlDocument
                                          • +
                                          + +## RESERVED WORDS + +
                                          • Begin
                                          • +
                                          • Break
                                          • +
                                          • Catch
                                          • +
                                          • Continue
                                          • +
                                          • Data
                                          • +
                                          • Do
                                          • +
                                          • Dynamicparam
                                          • +
                                          • Else
                                          • +
                                          • Elseif
                                          • +
                                          • End
                                          • +
                                          • Exit
                                          • +
                                          • Filter
                                          • +
                                          • Finally
                                          • +
                                          • For
                                          • +
                                          • Foreach
                                          • +
                                          • From
                                          • +
                                          • Function
                                          • +
                                          • If
                                          • +
                                          • In
                                          • +
                                          • Local
                                          • +
                                          • Param
                                          • +
                                          • Private
                                          • +
                                          • Process
                                          • +
                                          • Return
                                          • +
                                          • Switch
                                          • +
                                          • Throw
                                          • +
                                          • Trap
                                          • +
                                          • Try
                                          • +
                                          • Until
                                          • +
                                          • Where
                                          • +
                                          • While
                                          • +
                                          diff --git a/docs/generators/protobuf-schema.md b/docs/generators/protobuf-schema.md index 68edd8d6e2..71b97282c3 100644 --- a/docs/generators/protobuf-schema.md +++ b/docs/generators/protobuf-schema.md @@ -5,3 +5,41 @@ sidebar_label: protobuf-schema | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | +|array|repeat| + + +## LANGUAGE PRIMITIVES + +
                                          • array
                                          • +
                                          • bool
                                          • +
                                          • bytes
                                          • +
                                          • double
                                          • +
                                          • fixed32
                                          • +
                                          • fixed64
                                          • +
                                          • float
                                          • +
                                          • int32
                                          • +
                                          • int64
                                          • +
                                          • map
                                          • +
                                          • sfixed32
                                          • +
                                          • sfixed64
                                          • +
                                          • sint32
                                          • +
                                          • sint64
                                          • +
                                          • string
                                          • +
                                          • uint32
                                          • +
                                          • uint64
                                          • +
                                          + +## RESERVED WORDS + +
                                            diff --git a/docs/generators/python-aiohttp.md b/docs/generators/python-aiohttp.md index a116fc6e96..3fa24defa3 100644 --- a/docs/generators/python-aiohttp.md +++ b/docs/generators/python-aiohttp.md @@ -5,15 +5,100 @@ sidebar_label: python-aiohttp | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| -|packageName|python package name (convention: snake_case).| |openapi_server| -|packageVersion|python package version.| |1.0.0| |controllerPackage|controller package| |controllers| |defaultController|default controller| |default_controller| -|supportPython2|support python2| |false| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|packageName|python package name (convention: snake_case).| |openapi_server| +|packageVersion|python package version.| |1.0.0| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| |serverPort|TCP port to listen to in app.run| |8080| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| +|supportPython2|support python2| |false| |useNose|use the nose test framework| |false| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | +|Array|java.util.List| +|ArrayList|java.util.ArrayList| +|BigDecimal|java.math.BigDecimal| +|Date|java.util.Date| +|DateTime|org.joda.time.*| +|File|java.io.File| +|HashMap|java.util.HashMap| +|List|java.util.*| +|LocalDate|org.joda.time.*| +|LocalDateTime|org.joda.time.*| +|LocalTime|org.joda.time.*| +|Map|java.util.Map| +|Set|java.util.*| +|Timestamp|java.sql.Timestamp| +|URI|java.net.URI| +|UUID|java.util.UUID| + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | + + +## LANGUAGE PRIMITIVES + +
                                            • Dict
                                            • +
                                            • List
                                            • +
                                            • bool
                                            • +
                                            • byte
                                            • +
                                            • bytearray
                                            • +
                                            • date
                                            • +
                                            • datetime
                                            • +
                                            • file
                                            • +
                                            • float
                                            • +
                                            • int
                                            • +
                                            • object
                                            • +
                                            • str
                                            • +
                                            + +## RESERVED WORDS + +
                                            • and
                                            • +
                                            • as
                                            • +
                                            • assert
                                            • +
                                            • break
                                            • +
                                            • class
                                            • +
                                            • continue
                                            • +
                                            • def
                                            • +
                                            • del
                                            • +
                                            • elif
                                            • +
                                            • else
                                            • +
                                            • except
                                            • +
                                            • exec
                                            • +
                                            • false
                                            • +
                                            • finally
                                            • +
                                            • for
                                            • +
                                            • from
                                            • +
                                            • global
                                            • +
                                            • if
                                            • +
                                            • import
                                            • +
                                            • in
                                            • +
                                            • is
                                            • +
                                            • lambda
                                            • +
                                            • none
                                            • +
                                            • nonlocal
                                            • +
                                            • not
                                            • +
                                            • or
                                            • +
                                            • pass
                                            • +
                                            • print
                                            • +
                                            • property
                                            • +
                                            • raise
                                            • +
                                            • return
                                            • +
                                            • self
                                            • +
                                            • true
                                            • +
                                            • try
                                            • +
                                            • while
                                            • +
                                            • with
                                            • +
                                            • yield
                                            • +
                                            diff --git a/docs/generators/python-blueplanet.md b/docs/generators/python-blueplanet.md index 7114953628..6acfe09100 100644 --- a/docs/generators/python-blueplanet.md +++ b/docs/generators/python-blueplanet.md @@ -5,15 +5,100 @@ sidebar_label: python-blueplanet | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| -|packageName|python package name (convention: snake_case).| |openapi_server| -|packageVersion|python package version.| |1.0.0| |controllerPackage|controller package| |controllers| |defaultController|default controller| |default_controller| -|supportPython2|support python2| |false| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|packageName|python package name (convention: snake_case).| |openapi_server| +|packageVersion|python package version.| |1.0.0| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| |serverPort|TCP port to listen to in app.run| |8080| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| +|supportPython2|support python2| |false| |useNose|use the nose test framework| |false| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | +|Array|java.util.List| +|ArrayList|java.util.ArrayList| +|BigDecimal|java.math.BigDecimal| +|Date|java.util.Date| +|DateTime|org.joda.time.*| +|File|java.io.File| +|HashMap|java.util.HashMap| +|List|java.util.*| +|LocalDate|org.joda.time.*| +|LocalDateTime|org.joda.time.*| +|LocalTime|org.joda.time.*| +|Map|java.util.Map| +|Set|java.util.*| +|Timestamp|java.sql.Timestamp| +|URI|java.net.URI| +|UUID|java.util.UUID| + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | + + +## LANGUAGE PRIMITIVES + +
                                            • Dict
                                            • +
                                            • List
                                            • +
                                            • bool
                                            • +
                                            • byte
                                            • +
                                            • bytearray
                                            • +
                                            • date
                                            • +
                                            • datetime
                                            • +
                                            • file
                                            • +
                                            • float
                                            • +
                                            • int
                                            • +
                                            • object
                                            • +
                                            • str
                                            • +
                                            + +## RESERVED WORDS + +
                                            • and
                                            • +
                                            • as
                                            • +
                                            • assert
                                            • +
                                            • break
                                            • +
                                            • class
                                            • +
                                            • continue
                                            • +
                                            • def
                                            • +
                                            • del
                                            • +
                                            • elif
                                            • +
                                            • else
                                            • +
                                            • except
                                            • +
                                            • exec
                                            • +
                                            • false
                                            • +
                                            • finally
                                            • +
                                            • for
                                            • +
                                            • from
                                            • +
                                            • global
                                            • +
                                            • if
                                            • +
                                            • import
                                            • +
                                            • in
                                            • +
                                            • is
                                            • +
                                            • lambda
                                            • +
                                            • none
                                            • +
                                            • nonlocal
                                            • +
                                            • not
                                            • +
                                            • or
                                            • +
                                            • pass
                                            • +
                                            • print
                                            • +
                                            • property
                                            • +
                                            • raise
                                            • +
                                            • return
                                            • +
                                            • self
                                            • +
                                            • true
                                            • +
                                            • try
                                            • +
                                            • while
                                            • +
                                            • with
                                            • +
                                            • yield
                                            • +
                                            diff --git a/docs/generators/python-experimental.md b/docs/generators/python-experimental.md index 8ba2d699ed..1c42e76919 100644 --- a/docs/generators/python-experimental.md +++ b/docs/generators/python-experimental.md @@ -5,12 +5,93 @@ sidebar_label: python-experimental | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|packageName|python package name (convention: snake_case).| |openapi_client| -|projectName|python project name in setup.py (e.g. petstore-api).| |null| -|packageVersion|python package version.| |1.0.0| -|packageUrl|python package URL.| |null| -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true| |generateSourceCodeOnly|Specifies that only a library source code is to be generated.| |false| -|useNose|use the nose test framework| |false| +|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true| |library|library template (sub-template) to use: asyncio, tornado, urllib3| |urllib3| +|packageName|python package name (convention: snake_case).| |openapi_client| +|packageUrl|python package URL.| |null| +|packageVersion|python package version.| |1.0.0| +|projectName|python project name in setup.py (e.g. petstore-api).| |null| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| +|useNose|use the nose test framework| |false| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | +|map|dict| + + +## LANGUAGE PRIMITIVES + +
                                            • bool
                                            • +
                                            • date
                                            • +
                                            • datetime
                                            • +
                                            • dict
                                            • +
                                            • file
                                            • +
                                            • file_type
                                            • +
                                            • float
                                            • +
                                            • int
                                            • +
                                            • list
                                            • +
                                            • none_type
                                            • +
                                            • object
                                            • +
                                            • str
                                            • +
                                            + +## RESERVED WORDS + +
                                            • all_params
                                            • +
                                            • and
                                            • +
                                            • as
                                            • +
                                            • assert
                                            • +
                                            • async
                                            • +
                                            • auth_settings
                                            • +
                                            • await
                                            • +
                                            • body_params
                                            • +
                                            • break
                                            • +
                                            • class
                                            • +
                                            • continue
                                            • +
                                            • def
                                            • +
                                            • del
                                            • +
                                            • elif
                                            • +
                                            • else
                                            • +
                                            • except
                                            • +
                                            • exec
                                            • +
                                            • false
                                            • +
                                            • finally
                                            • +
                                            • for
                                            • +
                                            • form_params
                                            • +
                                            • from
                                            • +
                                            • global
                                            • +
                                            • header_params
                                            • +
                                            • if
                                            • +
                                            • import
                                            • +
                                            • in
                                            • +
                                            • is
                                            • +
                                            • lambda
                                            • +
                                            • local_var_files
                                            • +
                                            • none
                                            • +
                                            • nonlocal
                                            • +
                                            • not
                                            • +
                                            • or
                                            • +
                                            • pass
                                            • +
                                            • path_params
                                            • +
                                            • print
                                            • +
                                            • property
                                            • +
                                            • query_params
                                            • +
                                            • raise
                                            • +
                                            • resource_path
                                            • +
                                            • return
                                            • +
                                            • self
                                            • +
                                            • true
                                            • +
                                            • try
                                            • +
                                            • while
                                            • +
                                            • with
                                            • +
                                            • yield
                                            • +
                                            diff --git a/docs/generators/python-flask.md b/docs/generators/python-flask.md index 1b68530a86..1f76e43466 100644 --- a/docs/generators/python-flask.md +++ b/docs/generators/python-flask.md @@ -5,15 +5,100 @@ sidebar_label: python-flask | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| -|packageName|python package name (convention: snake_case).| |openapi_server| -|packageVersion|python package version.| |1.0.0| |controllerPackage|controller package| |controllers| |defaultController|default controller| |default_controller| -|supportPython2|support python2| |false| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|packageName|python package name (convention: snake_case).| |openapi_server| +|packageVersion|python package version.| |1.0.0| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| |serverPort|TCP port to listen to in app.run| |8080| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| +|supportPython2|support python2| |false| |useNose|use the nose test framework| |false| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | +|Array|java.util.List| +|ArrayList|java.util.ArrayList| +|BigDecimal|java.math.BigDecimal| +|Date|java.util.Date| +|DateTime|org.joda.time.*| +|File|java.io.File| +|HashMap|java.util.HashMap| +|List|java.util.*| +|LocalDate|org.joda.time.*| +|LocalDateTime|org.joda.time.*| +|LocalTime|org.joda.time.*| +|Map|java.util.Map| +|Set|java.util.*| +|Timestamp|java.sql.Timestamp| +|URI|java.net.URI| +|UUID|java.util.UUID| + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | + + +## LANGUAGE PRIMITIVES + +
                                            • Dict
                                            • +
                                            • List
                                            • +
                                            • bool
                                            • +
                                            • byte
                                            • +
                                            • bytearray
                                            • +
                                            • date
                                            • +
                                            • datetime
                                            • +
                                            • file
                                            • +
                                            • float
                                            • +
                                            • int
                                            • +
                                            • object
                                            • +
                                            • str
                                            • +
                                            + +## RESERVED WORDS + +
                                            • and
                                            • +
                                            • as
                                            • +
                                            • assert
                                            • +
                                            • break
                                            • +
                                            • class
                                            • +
                                            • continue
                                            • +
                                            • def
                                            • +
                                            • del
                                            • +
                                            • elif
                                            • +
                                            • else
                                            • +
                                            • except
                                            • +
                                            • exec
                                            • +
                                            • false
                                            • +
                                            • finally
                                            • +
                                            • for
                                            • +
                                            • from
                                            • +
                                            • global
                                            • +
                                            • if
                                            • +
                                            • import
                                            • +
                                            • in
                                            • +
                                            • is
                                            • +
                                            • lambda
                                            • +
                                            • none
                                            • +
                                            • nonlocal
                                            • +
                                            • not
                                            • +
                                            • or
                                            • +
                                            • pass
                                            • +
                                            • print
                                            • +
                                            • property
                                            • +
                                            • raise
                                            • +
                                            • return
                                            • +
                                            • self
                                            • +
                                            • true
                                            • +
                                            • try
                                            • +
                                            • while
                                            • +
                                            • with
                                            • +
                                            • yield
                                            • +
                                            diff --git a/docs/generators/python.md b/docs/generators/python.md index ee581848b0..19e268b90d 100644 --- a/docs/generators/python.md +++ b/docs/generators/python.md @@ -5,12 +5,90 @@ sidebar_label: python | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|packageName|python package name (convention: snake_case).| |openapi_client| -|projectName|python project name in setup.py (e.g. petstore-api).| |null| -|packageVersion|python package version.| |1.0.0| -|packageUrl|python package URL.| |null| -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true| |generateSourceCodeOnly|Specifies that only a library source code is to be generated.| |false| -|useNose|use the nose test framework| |false| +|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true| |library|library template (sub-template) to use: asyncio, tornado, urllib3| |urllib3| +|packageName|python package name (convention: snake_case).| |openapi_client| +|packageUrl|python package URL.| |null| +|packageVersion|python package version.| |1.0.0| +|projectName|python project name in setup.py (e.g. petstore-api).| |null| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| +|useNose|use the nose test framework| |false| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | + + +## LANGUAGE PRIMITIVES + +
                                            • bool
                                            • +
                                            • date
                                            • +
                                            • datetime
                                            • +
                                            • dict
                                            • +
                                            • file
                                            • +
                                            • float
                                            • +
                                            • int
                                            • +
                                            • list
                                            • +
                                            • object
                                            • +
                                            • str
                                            • +
                                            + +## RESERVED WORDS + +
                                            • all_params
                                            • +
                                            • and
                                            • +
                                            • as
                                            • +
                                            • assert
                                            • +
                                            • async
                                            • +
                                            • auth_settings
                                            • +
                                            • await
                                            • +
                                            • body_params
                                            • +
                                            • break
                                            • +
                                            • class
                                            • +
                                            • continue
                                            • +
                                            • def
                                            • +
                                            • del
                                            • +
                                            • elif
                                            • +
                                            • else
                                            • +
                                            • except
                                            • +
                                            • exec
                                            • +
                                            • false
                                            • +
                                            • finally
                                            • +
                                            • for
                                            • +
                                            • form_params
                                            • +
                                            • from
                                            • +
                                            • global
                                            • +
                                            • header_params
                                            • +
                                            • if
                                            • +
                                            • import
                                            • +
                                            • in
                                            • +
                                            • is
                                            • +
                                            • lambda
                                            • +
                                            • local_var_files
                                            • +
                                            • none
                                            • +
                                            • nonlocal
                                            • +
                                            • not
                                            • +
                                            • or
                                            • +
                                            • pass
                                            • +
                                            • path_params
                                            • +
                                            • print
                                            • +
                                            • property
                                            • +
                                            • query_params
                                            • +
                                            • raise
                                            • +
                                            • resource_path
                                            • +
                                            • return
                                            • +
                                            • self
                                            • +
                                            • true
                                            • +
                                            • try
                                            • +
                                            • while
                                            • +
                                            • with
                                            • +
                                            • yield
                                            • +
                                            diff --git a/docs/generators/r.md b/docs/generators/r.md index fa257ae0ed..8d71a39a69 100644 --- a/docs/generators/r.md +++ b/docs/generators/r.md @@ -5,8 +5,53 @@ sidebar_label: r | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | +|exceptionPackage|Specify the exception handling package|
                                            **default**
                                            Use stop() for raising exceptions.
                                            **rlang**
                                            Use rlang package for exceptions.
                                            |default| +|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true| |packageName|R package name (convention: lowercase).| |openapi| |packageVersion|R package version.| |1.0.0| -|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true| |returnExceptionOnFailure|Throw an exception on non success response codes| |false| -|exceptionPackage|Specify the exception handling package|
                                            **default**
                                            Use stop() for raising exceptions.
                                            **rlang**
                                            Use rlang package for exceptions.
                                            |default| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | + + +## LANGUAGE PRIMITIVES + +
                                            • character
                                            • +
                                            • data.frame
                                            • +
                                            • integer
                                            • +
                                            • numeric
                                            • +
                                            • object
                                            • +
                                            + +## RESERVED WORDS + +
                                            • apiresponse
                                            • +
                                            • break
                                            • +
                                            • else
                                            • +
                                            • false
                                            • +
                                            • for
                                            • +
                                            • function
                                            • +
                                            • if
                                            • +
                                            • in
                                            • +
                                            • inf
                                            • +
                                            • na
                                            • +
                                            • na_character_
                                            • +
                                            • na_complex_
                                            • +
                                            • na_integer_
                                            • +
                                            • na_real_
                                            • +
                                            • nan
                                            • +
                                            • next
                                            • +
                                            • null
                                            • +
                                            • repeat
                                            • +
                                            • true
                                            • +
                                            • while
                                            • +
                                            diff --git a/docs/generators/ruby-on-rails.md b/docs/generators/ruby-on-rails.md index d55421f8d6..82d9f33bb3 100644 --- a/docs/generators/ruby-on-rails.md +++ b/docs/generators/ruby-on-rails.md @@ -6,3 +6,87 @@ sidebar_label: ruby-on-rails | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | |databaseAdapter|The adapter for database (e.g. mysql, sqlite). Default: sqlite| |sqlite| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | +|Array|java.util.List| +|ArrayList|java.util.ArrayList| +|BigDecimal|java.math.BigDecimal| +|Date|java.util.Date| +|DateTime|org.joda.time.*| +|File|java.io.File| +|HashMap|java.util.HashMap| +|List|java.util.*| +|LocalDate|org.joda.time.*| +|LocalDateTime|org.joda.time.*| +|LocalTime|org.joda.time.*| +|Map|java.util.Map| +|Set|java.util.*| +|Timestamp|java.sql.Timestamp| +|URI|java.net.URI| +|UUID|java.util.UUID| + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | + + +## LANGUAGE PRIMITIVES + +
                                            • Array
                                            • +
                                            • Boolean
                                            • +
                                            • Date
                                            • +
                                            • DateTime
                                            • +
                                            • File
                                            • +
                                            • Float
                                            • +
                                            • Hash
                                            • +
                                            • Integer
                                            • +
                                            • Object
                                            • +
                                            • String
                                            • +
                                            + +## RESERVED WORDS + +
                                            • __file__
                                            • +
                                            • __line__
                                            • +
                                            • alias
                                            • +
                                            • and
                                            • +
                                            • begin
                                            • +
                                            • break
                                            • +
                                            • case
                                            • +
                                            • class
                                            • +
                                            • def
                                            • +
                                            • defined?
                                            • +
                                            • do
                                            • +
                                            • else
                                            • +
                                            • elsif
                                            • +
                                            • end
                                            • +
                                            • ensure
                                            • +
                                            • false
                                            • +
                                            • for
                                            • +
                                            • if
                                            • +
                                            • in
                                            • +
                                            • module
                                            • +
                                            • next
                                            • +
                                            • nil
                                            • +
                                            • not
                                            • +
                                            • or
                                            • +
                                            • redo
                                            • +
                                            • rescue
                                            • +
                                            • retry
                                            • +
                                            • return
                                            • +
                                            • self
                                            • +
                                            • super
                                            • +
                                            • then
                                            • +
                                            • true
                                            • +
                                            • undef
                                            • +
                                            • unless
                                            • +
                                            • until
                                            • +
                                            • when
                                            • +
                                            • while
                                            • +
                                            • yield
                                            • +
                                            diff --git a/docs/generators/ruby-sinatra.md b/docs/generators/ruby-sinatra.md index f46767a209..b759489632 100644 --- a/docs/generators/ruby-sinatra.md +++ b/docs/generators/ruby-sinatra.md @@ -5,3 +5,87 @@ sidebar_label: ruby-sinatra | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | +|Array|java.util.List| +|ArrayList|java.util.ArrayList| +|BigDecimal|java.math.BigDecimal| +|Date|java.util.Date| +|DateTime|org.joda.time.*| +|File|java.io.File| +|HashMap|java.util.HashMap| +|List|java.util.*| +|LocalDate|org.joda.time.*| +|LocalDateTime|org.joda.time.*| +|LocalTime|org.joda.time.*| +|Map|java.util.Map| +|Set|java.util.*| +|Timestamp|java.sql.Timestamp| +|URI|java.net.URI| +|UUID|java.util.UUID| + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | + + +## LANGUAGE PRIMITIVES + +
                                            • Array
                                            • +
                                            • Boolean
                                            • +
                                            • Date
                                            • +
                                            • DateTime
                                            • +
                                            • File
                                            • +
                                            • Float
                                            • +
                                            • Hash
                                            • +
                                            • Integer
                                            • +
                                            • Object
                                            • +
                                            • String
                                            • +
                                            + +## RESERVED WORDS + +
                                            • __file__
                                            • +
                                            • __line__
                                            • +
                                            • alias
                                            • +
                                            • and
                                            • +
                                            • begin
                                            • +
                                            • break
                                            • +
                                            • case
                                            • +
                                            • class
                                            • +
                                            • def
                                            • +
                                            • defined?
                                            • +
                                            • do
                                            • +
                                            • else
                                            • +
                                            • elsif
                                            • +
                                            • end
                                            • +
                                            • ensure
                                            • +
                                            • false
                                            • +
                                            • for
                                            • +
                                            • if
                                            • +
                                            • in
                                            • +
                                            • module
                                            • +
                                            • next
                                            • +
                                            • nil
                                            • +
                                            • not
                                            • +
                                            • or
                                            • +
                                            • redo
                                            • +
                                            • rescue
                                            • +
                                            • retry
                                            • +
                                            • return
                                            • +
                                            • self
                                            • +
                                            • super
                                            • +
                                            • then
                                            • +
                                            • true
                                            • +
                                            • undef
                                            • +
                                            • unless
                                            • +
                                            • until
                                            • +
                                            • when
                                            • +
                                            • while
                                            • +
                                            • yield
                                            • +
                                            diff --git a/docs/generators/ruby.md b/docs/generators/ruby.md index 17eab9c029..f749fa9667 100644 --- a/docs/generators/ruby.md +++ b/docs/generators/ruby.md @@ -5,20 +5,102 @@ sidebar_label: ruby | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| -|gemName|gem name (convention: underscore_case).| |openapi_client| -|moduleName|top module name (convention: CamelCase, usually corresponding to gem name).| |OpenAPIClient| -|gemVersion|gem version.| |1.0.0| -|gemLicense|gem license. | |unlicense| -|gemRequiredRubyVersion|gem required Ruby version. | |>= 1.9| -|gemHomepage|gem homepage. | |http://org.openapitools| -|gemSummary|gem summary. | |A ruby wrapper for the REST APIs| -|gemDescription|gem description. | |This gem maps to a REST API| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |gemAuthor|gem author (only one is supported).| |null| |gemAuthorEmail|gem author email (only one is supported).| |null| +|gemDescription|gem description. | |This gem maps to a REST API| +|gemHomepage|gem homepage. | |http://org.openapitools| +|gemLicense|gem license. | |unlicense| +|gemName|gem name (convention: underscore_case).| |openapi_client| +|gemRequiredRubyVersion|gem required Ruby version. | |>= 1.9| +|gemSummary|gem summary. | |A ruby wrapper for the REST APIs| +|gemVersion|gem version.| |1.0.0| |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true| |library|HTTP library template (sub-template) to use|
                                            **faraday**
                                            Faraday (https://github.com/lostisland/faraday) (Beta support)
                                            **typhoeus**
                                            Typhoeus >= 1.0.1 (https://github.com/typhoeus/typhoeus)
                                            |typhoeus| +|moduleName|top module name (convention: CamelCase, usually corresponding to gem name).| |OpenAPIClient| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | + + +## LANGUAGE PRIMITIVES + +
                                            • Array
                                            • +
                                            • Boolean
                                            • +
                                            • Date
                                            • +
                                            • DateTime
                                            • +
                                            • File
                                            • +
                                            • Float
                                            • +
                                            • Hash
                                            • +
                                            • Integer
                                            • +
                                            • Object
                                            • +
                                            • String
                                            • +
                                            • array
                                            • +
                                            • int
                                            • +
                                            • map
                                            • +
                                            • string
                                            • +
                                            + +## RESERVED WORDS + +
                                            • __file__
                                            • +
                                            • __line__
                                            • +
                                            • _header_accept
                                            • +
                                            • _header_accept_result
                                            • +
                                            • _header_content_type
                                            • +
                                            • alias
                                            • +
                                            • and
                                            • +
                                            • auth_names
                                            • +
                                            • begin
                                            • +
                                            • break
                                            • +
                                            • case
                                            • +
                                            • class
                                            • +
                                            • def
                                            • +
                                            • defined?
                                            • +
                                            • do
                                            • +
                                            • else
                                            • +
                                            • elsif
                                            • +
                                            • end
                                            • +
                                            • ensure
                                            • +
                                            • false
                                            • +
                                            • for
                                            • +
                                            • form_params
                                            • +
                                            • header_params
                                            • +
                                            • if
                                            • +
                                            • in
                                            • +
                                            • local_var_path
                                            • +
                                            • module
                                            • +
                                            • next
                                            • +
                                            • nil
                                            • +
                                            • not
                                            • +
                                            • or
                                            • +
                                            • post_body
                                            • +
                                            • query_params
                                            • +
                                            • redo
                                            • +
                                            • rescue
                                            • +
                                            • retry
                                            • +
                                            • return
                                            • +
                                            • self
                                            • +
                                            • send
                                            • +
                                            • super
                                            • +
                                            • then
                                            • +
                                            • true
                                            • +
                                            • undef
                                            • +
                                            • unless
                                            • +
                                            • until
                                            • +
                                            • when
                                            • +
                                            • while
                                            • +
                                            • yield
                                            • +
                                            diff --git a/docs/generators/rust-server.md b/docs/generators/rust-server.md index 9671d82b9f..50551fa841 100644 --- a/docs/generators/rust-server.md +++ b/docs/generators/rust-server.md @@ -7,3 +7,92 @@ sidebar_label: rust-server | ------ | ----------- | ------ | ------- | |packageName|Rust crate name (convention: snake_case).| |openapi_client| |packageVersion|Rust crate version.| |null| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | +|array|Vec| +|map|Map| + + +## LANGUAGE PRIMITIVES + +
                                            • String
                                            • +
                                            • bool
                                            • +
                                            • char
                                            • +
                                            • f32
                                            • +
                                            • f64
                                            • +
                                            • i16
                                            • +
                                            • i32
                                            • +
                                            • i64
                                            • +
                                            • i8
                                            • +
                                            • isize
                                            • +
                                            • str
                                            • +
                                            • u16
                                            • +
                                            • u32
                                            • +
                                            • u64
                                            • +
                                            • u8
                                            • +
                                            • usize
                                            • +
                                            + +## RESERVED WORDS + +
                                            • abstract
                                            • +
                                            • alignof
                                            • +
                                            • as
                                            • +
                                            • become
                                            • +
                                            • box
                                            • +
                                            • break
                                            • +
                                            • const
                                            • +
                                            • continue
                                            • +
                                            • crate
                                            • +
                                            • do
                                            • +
                                            • else
                                            • +
                                            • enum
                                            • +
                                            • extern
                                            • +
                                            • false
                                            • +
                                            • final
                                            • +
                                            • fn
                                            • +
                                            • for
                                            • +
                                            • if
                                            • +
                                            • impl
                                            • +
                                            • in
                                            • +
                                            • let
                                            • +
                                            • loop
                                            • +
                                            • macro
                                            • +
                                            • match
                                            • +
                                            • mod
                                            • +
                                            • move
                                            • +
                                            • mut
                                            • +
                                            • offsetof
                                            • +
                                            • override
                                            • +
                                            • priv
                                            • +
                                            • proc
                                            • +
                                            • pub
                                            • +
                                            • pure
                                            • +
                                            • ref
                                            • +
                                            • return
                                            • +
                                            • self
                                            • +
                                            • sizeof
                                            • +
                                            • static
                                            • +
                                            • struct
                                            • +
                                            • super
                                            • +
                                            • trait
                                            • +
                                            • true
                                            • +
                                            • type
                                            • +
                                            • typeof
                                            • +
                                            • unsafe
                                            • +
                                            • unsized
                                            • +
                                            • use
                                            • +
                                            • virtual
                                            • +
                                            • where
                                            • +
                                            • while
                                            • +
                                            • yield
                                            • +
                                            diff --git a/docs/generators/rust.md b/docs/generators/rust.md index 2f1aa5d747..9dfff407df 100644 --- a/docs/generators/rust.md +++ b/docs/generators/rust.md @@ -5,7 +5,109 @@ sidebar_label: rust | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|packageName|Rust package name (convention: lowercase).| |openapi| -|packageVersion|Rust package version.| |1.0.0| |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true| |library|library template (sub-template) to use.|
                                            **hyper**
                                            HTTP client: Hyper.
                                            **reqwest**
                                            HTTP client: Reqwest.
                                            |hyper| +|packageName|Rust package name (convention: lowercase).| |openapi| +|packageVersion|Rust package version.| |1.0.0| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | +|Array|java.util.List| +|ArrayList|java.util.ArrayList| +|BigDecimal|java.math.BigDecimal| +|Date|java.util.Date| +|DateTime|org.joda.time.*| +|File|java.io.File| +|HashMap|java.util.HashMap| +|List|java.util.*| +|LocalDate|org.joda.time.*| +|LocalDateTime|org.joda.time.*| +|LocalTime|org.joda.time.*| +|Map|java.util.Map| +|Set|java.util.*| +|Timestamp|java.sql.Timestamp| +|URI|java.net.URI| +|UUID|java.util.UUID| + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | + + +## LANGUAGE PRIMITIVES + +
                                            • File
                                            • +
                                            • String
                                            • +
                                            • Vec<u8>
                                            • +
                                            • bool
                                            • +
                                            • char
                                            • +
                                            • f32
                                            • +
                                            • f64
                                            • +
                                            • i16
                                            • +
                                            • i32
                                            • +
                                            • i64
                                            • +
                                            • i8
                                            • +
                                            • u16
                                            • +
                                            • u32
                                            • +
                                            • u64
                                            • +
                                            • u8
                                            • +
                                            + +## RESERVED WORDS + +
                                            • abstract
                                            • +
                                            • alignof
                                            • +
                                            • as
                                            • +
                                            • become
                                            • +
                                            • box
                                            • +
                                            • break
                                            • +
                                            • const
                                            • +
                                            • continue
                                            • +
                                            • crate
                                            • +
                                            • do
                                            • +
                                            • else
                                            • +
                                            • enum
                                            • +
                                            • extern
                                            • +
                                            • false
                                            • +
                                            • final
                                            • +
                                            • fn
                                            • +
                                            • for
                                            • +
                                            • if
                                            • +
                                            • impl
                                            • +
                                            • in
                                            • +
                                            • let
                                            • +
                                            • loop
                                            • +
                                            • macro
                                            • +
                                            • match
                                            • +
                                            • mod
                                            • +
                                            • move
                                            • +
                                            • mut
                                            • +
                                            • offsetof
                                            • +
                                            • override
                                            • +
                                            • priv
                                            • +
                                            • proc
                                            • +
                                            • pub
                                            • +
                                            • pure
                                            • +
                                            • ref
                                            • +
                                            • return
                                            • +
                                            • self
                                            • +
                                            • sizeof
                                            • +
                                            • static
                                            • +
                                            • struct
                                            • +
                                            • super
                                            • +
                                            • trait
                                            • +
                                            • true
                                            • +
                                            • type
                                            • +
                                            • typeof
                                            • +
                                            • unsafe
                                            • +
                                            • unsized
                                            • +
                                            • use
                                            • +
                                            • virtual
                                            • +
                                            • where
                                            • +
                                            • while
                                            • +
                                            • yield
                                            • +
                                            diff --git a/docs/generators/scala-akka.md b/docs/generators/scala-akka.md index ceae6b73ea..3ad7d16a08 100644 --- a/docs/generators/scala-akka.md +++ b/docs/generators/scala-akka.md @@ -5,12 +5,102 @@ sidebar_label: scala-akka | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| -|modelPackage|package for generated models| |null| |apiPackage|package for generated api classes| |null| -|sourceFolder|source folder for generated code| |null| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |mainPackage|Top-level package name, which defines 'apiPackage', 'modelPackage', 'invokerPackage'| |org.openapitools.client| +|modelPackage|package for generated models| |null| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| +|sourceFolder|source folder for generated code| |null| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | +|Array|java.util.List| +|ArrayList|java.util.ArrayList| +|BigDecimal|java.math.BigDecimal| +|Date|java.util.Date| +|DateTime|org.joda.time.DateTime| +|File|java.io.File| +|HashMap|java.util.HashMap| +|ListBuffer|scala.collection.mutable.ListBuffer| +|ListSet|scala.collection.immutable.ListSet| +|LocalDate|org.joda.time.*| +|LocalDateTime|org.joda.time.*| +|LocalTime|org.joda.time.*| +|Timestamp|java.sql.Timestamp| +|URI|java.net.URI| +|UUID|java.util.UUID| + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | +|array|ListBuffer| +|map|Map| +|set|Set| + + +## LANGUAGE PRIMITIVES + +
                                            • Any
                                            • +
                                            • Array
                                            • +
                                            • Boolean
                                            • +
                                            • Double
                                            • +
                                            • Float
                                            • +
                                            • Int
                                            • +
                                            • List
                                            • +
                                            • Long
                                            • +
                                            • Map
                                            • +
                                            • Object
                                            • +
                                            • Seq
                                            • +
                                            • String
                                            • +
                                            • boolean
                                            • +
                                            + +## RESERVED WORDS + +
                                            • abstract
                                            • +
                                            • case
                                            • +
                                            • catch
                                            • +
                                            • class
                                            • +
                                            • def
                                            • +
                                            • do
                                            • +
                                            • else
                                            • +
                                            • extends
                                            • +
                                            • false
                                            • +
                                            • final
                                            • +
                                            • finally
                                            • +
                                            • for
                                            • +
                                            • forsome
                                            • +
                                            • if
                                            • +
                                            • implicit
                                            • +
                                            • import
                                            • +
                                            • lazy
                                            • +
                                            • match
                                            • +
                                            • new
                                            • +
                                            • null
                                            • +
                                            • object
                                            • +
                                            • override
                                            • +
                                            • package
                                            • +
                                            • private
                                            • +
                                            • protected
                                            • +
                                            • return
                                            • +
                                            • sealed
                                            • +
                                            • super
                                            • +
                                            • this
                                            • +
                                            • throw
                                            • +
                                            • trait
                                            • +
                                            • true
                                            • +
                                            • try
                                            • +
                                            • type
                                            • +
                                            • val
                                            • +
                                            • var
                                            • +
                                            • while
                                            • +
                                            • with
                                            • +
                                            • yield
                                            • +
                                            diff --git a/docs/generators/scala-finch.md b/docs/generators/scala-finch.md index 2a38482084..764ea5fd71 100644 --- a/docs/generators/scala-finch.md +++ b/docs/generators/scala-finch.md @@ -5,6 +5,120 @@ sidebar_label: scala-finch | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|packageName|Finch package name (e.g. org.openapitools).| |org.openapitools| -|modelPackage|package for generated models| |null| |apiPackage|package for generated api classes| |null| +|modelPackage|package for generated models| |null| +|packageName|Finch package name (e.g. org.openapitools).| |org.openapitools| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | +|ArrayBuffer|scala.collection.mutable.ArrayBuffer| +|BigDecimal|java.math.BigDecimal| +|Date|java.util.Date| +|DateTime|java.time.LocalDateTime| +|File|java.io.File| +|HashMap|scala.collection.immutable.HashMap| +|LocalDate|java.time.LocalDate| +|LocalDateTime|java.time.LocalDateTime| +|LocalTime|java.time.LocalTime| +|Map|scala.collection.immutable.Map| +|Seq|scala.collection.immutable.Seq| +|Timestamp|java.sql.Timestamp| +|URI|java.net.URI| +|UUID|java.util.UUID| +|ZonedDateTime|java.time.ZonedDateTime| + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | +|array|ArrayList| +|map|HashMap| + + +## LANGUAGE PRIMITIVES + +
                                            • Any
                                            • +
                                            • AnyRef
                                            • +
                                            • AnyVal
                                            • +
                                            • Boolean
                                            • +
                                            • Double
                                            • +
                                            • Float
                                            • +
                                            • Int
                                            • +
                                            • Integer
                                            • +
                                            • Long
                                            • +
                                            • Object
                                            • +
                                            • String
                                            • +
                                            + +## RESERVED WORDS + +
                                            • abstract
                                            • +
                                            • assert
                                            • +
                                            • break
                                            • +
                                            • byte
                                            • +
                                            • case
                                            • +
                                            • catch
                                            • +
                                            • char
                                            • +
                                            • class
                                            • +
                                            • const
                                            • +
                                            • continue
                                            • +
                                            • def
                                            • +
                                            • default
                                            • +
                                            • do
                                            • +
                                            • double
                                            • +
                                            • else
                                            • +
                                            • enum
                                            • +
                                            • extends
                                            • +
                                            • false
                                            • +
                                            • final
                                            • +
                                            • finally
                                            • +
                                            • float
                                            • +
                                            • for
                                            • +
                                            • forsome
                                            • +
                                            • goto
                                            • +
                                            • if
                                            • +
                                            • implements
                                            • +
                                            • implicit
                                            • +
                                            • import
                                            • +
                                            • instanceof
                                            • +
                                            • int
                                            • +
                                            • interface
                                            • +
                                            • lazy
                                            • +
                                            • long
                                            • +
                                            • match
                                            • +
                                            • native
                                            • +
                                            • new
                                            • +
                                            • null
                                            • +
                                            • object
                                            • +
                                            • override
                                            • +
                                            • package
                                            • +
                                            • private
                                            • +
                                            • protected
                                            • +
                                            • public
                                            • +
                                            • return
                                            • +
                                            • sealed
                                            • +
                                            • short
                                            • +
                                            • static
                                            • +
                                            • strictfp
                                            • +
                                            • super
                                            • +
                                            • switch
                                            • +
                                            • synchronized
                                            • +
                                            • this
                                            • +
                                            • throw
                                            • +
                                            • throws
                                            • +
                                            • trait
                                            • +
                                            • transient
                                            • +
                                            • true
                                            • +
                                            • try
                                            • +
                                            • type
                                            • +
                                            • val
                                            • +
                                            • var
                                            • +
                                            • void
                                            • +
                                            • volatile
                                            • +
                                            • while
                                            • +
                                            • with
                                            • +
                                            • yield
                                            • +
                                            diff --git a/docs/generators/scala-gatling.md b/docs/generators/scala-gatling.md index 8f56ccebbf..3354299227 100644 --- a/docs/generators/scala-gatling.md +++ b/docs/generators/scala-gatling.md @@ -5,11 +5,112 @@ sidebar_label: scala-gatling | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| -|modelPackage|package for generated models| |null| |apiPackage|package for generated api classes| |null| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|modelPackage|package for generated models| |null| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| |sourceFolder|source folder for generated code| |null| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | +|Array|java.util.List| +|ArrayList|java.util.ArrayList| +|BigDecimal|java.math.BigDecimal| +|Date|java.util.Date| +|DateTime|org.joda.time.*| +|File|java.io.File| +|HashMap|java.util.HashMap| +|ListBuffer|scala.collection.mutable.ListBuffer| +|ListSet|scala.collection.immutable.ListSet| +|LocalDate|org.joda.time.*| +|LocalDateTime|org.joda.time.*| +|LocalTime|org.joda.time.*| +|Seq|scala.collection.immutable.Seq| +|Timestamp|java.sql.Timestamp| +|URI|java.net.URI| +|UUID|java.util.UUID| + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | +|array|ListBuffer| +|map|HashMap| +|set|Set| + + +## LANGUAGE PRIMITIVES + +
                                            • Any
                                            • +
                                            • Array
                                            • +
                                            • Boolean
                                            • +
                                            • Double
                                            • +
                                            • Float
                                            • +
                                            • Int
                                            • +
                                            • List
                                            • +
                                            • Long
                                            • +
                                            • Map
                                            • +
                                            • Object
                                            • +
                                            • Seq
                                            • +
                                            • String
                                            • +
                                            • boolean
                                            • +
                                            + +## RESERVED WORDS + +
                                            • abstract
                                            • +
                                            • apiinvoker
                                            • +
                                            • basepath
                                            • +
                                            • case
                                            • +
                                            • catch
                                            • +
                                            • class
                                            • +
                                            • contenttype
                                            • +
                                            • contenttypes
                                            • +
                                            • def
                                            • +
                                            • do
                                            • +
                                            • else
                                            • +
                                            • extends
                                            • +
                                            • false
                                            • +
                                            • final
                                            • +
                                            • finally
                                            • +
                                            • for
                                            • +
                                            • formparams
                                            • +
                                            • forsome
                                            • +
                                            • headerparams
                                            • +
                                            • if
                                            • +
                                            • implicit
                                            • +
                                            • import
                                            • +
                                            • lazy
                                            • +
                                            • match
                                            • +
                                            • mp
                                            • +
                                            • new
                                            • +
                                            • null
                                            • +
                                            • object
                                            • +
                                            • override
                                            • +
                                            • package
                                            • +
                                            • path
                                            • +
                                            • postbody
                                            • +
                                            • private
                                            • +
                                            • protected
                                            • +
                                            • queryparams
                                            • +
                                            • return
                                            • +
                                            • sealed
                                            • +
                                            • super
                                            • +
                                            • this
                                            • +
                                            • throw
                                            • +
                                            • trait
                                            • +
                                            • true
                                            • +
                                            • try
                                            • +
                                            • type
                                            • +
                                            • val
                                            • +
                                            • var
                                            • +
                                            • while
                                            • +
                                            • with
                                            • +
                                            • yield
                                            • +
                                            diff --git a/docs/generators/scala-httpclient-deprecated.md b/docs/generators/scala-httpclient-deprecated.md index d27b8bf3a0..4fa157bcd7 100644 --- a/docs/generators/scala-httpclient-deprecated.md +++ b/docs/generators/scala-httpclient-deprecated.md @@ -5,12 +5,113 @@ sidebar_label: scala-httpclient-deprecated | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| -|modelPackage|package for generated models| |null| |apiPackage|package for generated api classes| |null| -|sourceFolder|source folder for generated code| |null| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|modelPackage|package for generated models| |null| |modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name| |camelCase| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| +|sourceFolder|source folder for generated code| |null| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | +|Array|java.util.List| +|ArrayList|java.util.ArrayList| +|BigDecimal|java.math.BigDecimal| +|Date|java.util.Date| +|DateTime|org.joda.time.*| +|File|java.io.File| +|HashMap|java.util.HashMap| +|ListBuffer|scala.collection.mutable.ListBuffer| +|ListSet|scala.collection.immutable.ListSet| +|LocalDate|org.joda.time.*| +|LocalDateTime|org.joda.time.*| +|LocalTime|org.joda.time.*| +|Seq|scala.collection.immutable.Seq| +|Timestamp|java.sql.Timestamp| +|URI|java.net.URI| +|UUID|java.util.UUID| + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | +|array|ListBuffer| +|map|HashMap| +|set|Set| + + +## LANGUAGE PRIMITIVES + +
                                            • Any
                                            • +
                                            • Array
                                            • +
                                            • Boolean
                                            • +
                                            • Double
                                            • +
                                            • Float
                                            • +
                                            • Int
                                            • +
                                            • List
                                            • +
                                            • Long
                                            • +
                                            • Map
                                            • +
                                            • Object
                                            • +
                                            • Seq
                                            • +
                                            • String
                                            • +
                                            • boolean
                                            • +
                                            + +## RESERVED WORDS + +
                                            • abstract
                                            • +
                                            • apiinvoker
                                            • +
                                            • basepath
                                            • +
                                            • case
                                            • +
                                            • catch
                                            • +
                                            • class
                                            • +
                                            • contenttype
                                            • +
                                            • contenttypes
                                            • +
                                            • def
                                            • +
                                            • do
                                            • +
                                            • else
                                            • +
                                            • extends
                                            • +
                                            • false
                                            • +
                                            • final
                                            • +
                                            • finally
                                            • +
                                            • for
                                            • +
                                            • formparams
                                            • +
                                            • forsome
                                            • +
                                            • headerparams
                                            • +
                                            • if
                                            • +
                                            • implicit
                                            • +
                                            • import
                                            • +
                                            • lazy
                                            • +
                                            • match
                                            • +
                                            • mp
                                            • +
                                            • new
                                            • +
                                            • null
                                            • +
                                            • object
                                            • +
                                            • override
                                            • +
                                            • package
                                            • +
                                            • path
                                            • +
                                            • postbody
                                            • +
                                            • private
                                            • +
                                            • protected
                                            • +
                                            • queryparams
                                            • +
                                            • return
                                            • +
                                            • sealed
                                            • +
                                            • super
                                            • +
                                            • this
                                            • +
                                            • throw
                                            • +
                                            • trait
                                            • +
                                            • true
                                            • +
                                            • try
                                            • +
                                            • type
                                            • +
                                            • val
                                            • +
                                            • var
                                            • +
                                            • while
                                            • +
                                            • with
                                            • +
                                            • yield
                                            • +
                                            diff --git a/docs/generators/scala-httpclient.md b/docs/generators/scala-httpclient.md deleted file mode 100644 index 6b85507bc2..0000000000 --- a/docs/generators/scala-httpclient.md +++ /dev/null @@ -1,17 +0,0 @@ - ---- -id: generator-opts-client-scala-httpclient -title: Config Options for scala-httpclient -sidebar_label: scala-httpclient ---- - -| Option | Description | Values | Default | -| ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| -|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| -|modelPackage|package for generated models| |null| -|apiPackage|package for generated api classes| |null| -|sourceFolder|source folder for generated code| |null| -|modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name| |camelCase| diff --git a/docs/generators/scala-lagom-server.md b/docs/generators/scala-lagom-server.md index c0d040c642..0608d6cfa2 100644 --- a/docs/generators/scala-lagom-server.md +++ b/docs/generators/scala-lagom-server.md @@ -5,12 +5,113 @@ sidebar_label: scala-lagom-server | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| -|modelPackage|package for generated models| |null| |apiPackage|package for generated api classes| |null| -|sourceFolder|source folder for generated code| |null| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|modelPackage|package for generated models| |null| |modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name| |camelCase| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| +|sourceFolder|source folder for generated code| |null| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | +|Array|java.util.List| +|ArrayList|java.util.ArrayList| +|BigDecimal|java.math.BigDecimal| +|Date|java.util.Date| +|DateTime|org.joda.time.DateTime| +|File|java.io.File| +|HashMap|java.util.HashMap| +|ListBuffer|scala.collection.mutable.ListBuffer| +|ListSet|scala.collection.immutable.ListSet| +|LocalDate|org.joda.time.*| +|LocalDateTime|org.joda.time.*| +|LocalTime|org.joda.time.*| +|Seq|scala.collection.immutable.Seq| +|Timestamp|java.sql.Timestamp| +|URI|java.net.URI| +|UUID|java.util.UUID| + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | +|array|ListBuffer| +|map|HashMap| +|set|Set| + + +## LANGUAGE PRIMITIVES + +
                                            • Any
                                            • +
                                            • Array
                                            • +
                                            • Boolean
                                            • +
                                            • Double
                                            • +
                                            • Float
                                            • +
                                            • Int
                                            • +
                                            • List
                                            • +
                                            • Long
                                            • +
                                            • Map
                                            • +
                                            • Object
                                            • +
                                            • Seq
                                            • +
                                            • String
                                            • +
                                            • boolean
                                            • +
                                            + +## RESERVED WORDS + +
                                            • abstract
                                            • +
                                            • apiinvoker
                                            • +
                                            • basepath
                                            • +
                                            • case
                                            • +
                                            • catch
                                            • +
                                            • class
                                            • +
                                            • contenttype
                                            • +
                                            • contenttypes
                                            • +
                                            • def
                                            • +
                                            • do
                                            • +
                                            • else
                                            • +
                                            • extends
                                            • +
                                            • false
                                            • +
                                            • final
                                            • +
                                            • finally
                                            • +
                                            • for
                                            • +
                                            • formparams
                                            • +
                                            • forsome
                                            • +
                                            • headerparams
                                            • +
                                            • if
                                            • +
                                            • implicit
                                            • +
                                            • import
                                            • +
                                            • lazy
                                            • +
                                            • match
                                            • +
                                            • mp
                                            • +
                                            • new
                                            • +
                                            • null
                                            • +
                                            • object
                                            • +
                                            • override
                                            • +
                                            • package
                                            • +
                                            • path
                                            • +
                                            • postbody
                                            • +
                                            • private
                                            • +
                                            • protected
                                            • +
                                            • queryparams
                                            • +
                                            • return
                                            • +
                                            • sealed
                                            • +
                                            • super
                                            • +
                                            • this
                                            • +
                                            • throw
                                            • +
                                            • trait
                                            • +
                                            • true
                                            • +
                                            • try
                                            • +
                                            • type
                                            • +
                                            • val
                                            • +
                                            • var
                                            • +
                                            • while
                                            • +
                                            • with
                                            • +
                                            • yield
                                            • +
                                            diff --git a/docs/generators/scala-play-framework.md b/docs/generators/scala-play-framework.md deleted file mode 100644 index ff1f8243e1..0000000000 --- a/docs/generators/scala-play-framework.md +++ /dev/null @@ -1,22 +0,0 @@ - ---- -id: generator-opts-server-scala-play-framework -title: Config Options for scala-play-framework -sidebar_label: scala-play-framework ---- - -| Option | Description | Values | Default | -| ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| -|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| -|modelPackage|package for generated models| |null| -|apiPackage|package for generated api classes| |null| -|sourceFolder|source folder for generated code| |null| -|routesFileName|Name of the routes file to generate.| |routes| -|routesFileName|Base package in which supporting classes are generated.| |org.openapitools| -|skipStubs|If set, skips generation of stub classes.| |false| -|supportAsync|If set, wraps API return types with Futures and generates async actions.| |false| -|generateCustomExceptions|If set, generates custom exception types.| |true| -|useSwaggerUI|Add a route to /api which show your documentation in swagger-ui. Will also import needed dependencies| |true| diff --git a/docs/generators/scala-play-server.md b/docs/generators/scala-play-server.md index 1582e3959f..48d5cc9d55 100644 --- a/docs/generators/scala-play-server.md +++ b/docs/generators/scala-play-server.md @@ -5,17 +5,112 @@ sidebar_label: scala-play-server | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| -|modelPackage|package for generated models| |null| |apiPackage|package for generated api classes| |null| -|sourceFolder|source folder for generated code| |null| -|routesFileName|Name of the routes file to generate.| |routes| |basePackage|Base package in which supporting classes are generated.| |org.openapitools| -|skipStubs|If set, skips generation of stub classes.| |false| -|supportAsync|If set, wraps API return types with Futures and generates async actions.| |false| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |generateCustomExceptions|If set, generates custom exception types.| |true| +|modelPackage|package for generated models| |null| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|routesFileName|Name of the routes file to generate.| |routes| +|skipStubs|If set, skips generation of stub classes.| |false| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| +|sourceFolder|source folder for generated code| |null| +|supportAsync|If set, wraps API return types with Futures and generates async actions.| |false| |useSwaggerUI|Add a route to /api which show your documentation in swagger-ui. Will also import needed dependencies| |true| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | +|Array|java.util.List| +|ArrayList|java.util.ArrayList| +|Date|java.util.Date| +|DateTime|org.joda.time.*| +|File|java.io.File| +|HashMap|java.util.HashMap| +|List|java.util.*| +|ListBuffer|scala.collection.mutable.ListBuffer| +|ListSet|scala.collection.immutable.ListSet| +|LocalDate|java.time.LocalDate| +|LocalDateTime|org.joda.time.*| +|LocalTime|org.joda.time.*| +|Map|java.util.Map| +|OffsetDateTime|java.time.OffsetDateTime| +|Seq|scala.collection.immutable.Seq| +|Set|scala.collection.immutable.Set| +|TemporaryFile|play.api.libs.Files.TemporaryFile| +|Timestamp|java.sql.Timestamp| +|URI|java.net.URI| +|UUID|java.util.UUID| + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | +|array|List| +|map|Map| +|set|Set| + + +## LANGUAGE PRIMITIVES + +
                                            • Any
                                            • +
                                            • Array
                                            • +
                                            • Boolean
                                            • +
                                            • Double
                                            • +
                                            • Float
                                            • +
                                            • Int
                                            • +
                                            • List
                                            • +
                                            • Long
                                            • +
                                            • Map
                                            • +
                                            • Object
                                            • +
                                            • Seq
                                            • +
                                            • String
                                            • +
                                            • boolean
                                            • +
                                            + +## RESERVED WORDS + +
                                            • abstract
                                            • +
                                            • case
                                            • +
                                            • catch
                                            • +
                                            • class
                                            • +
                                            • def
                                            • +
                                            • do
                                            • +
                                            • else
                                            • +
                                            • extends
                                            • +
                                            • false
                                            • +
                                            • final
                                            • +
                                            • finally
                                            • +
                                            • for
                                            • +
                                            • forSome
                                            • +
                                            • if
                                            • +
                                            • implicit
                                            • +
                                            • import
                                            • +
                                            • lazy
                                            • +
                                            • match
                                            • +
                                            • new
                                            • +
                                            • null
                                            • +
                                            • object
                                            • +
                                            • override
                                            • +
                                            • package
                                            • +
                                            • private
                                            • +
                                            • protected
                                            • +
                                            • return
                                            • +
                                            • sealed
                                            • +
                                            • super
                                            • +
                                            • this
                                            • +
                                            • throw
                                            • +
                                            • trait
                                            • +
                                            • true
                                            • +
                                            • try
                                            • +
                                            • type
                                            • +
                                            • val
                                            • +
                                            • var
                                            • +
                                            • while
                                            • +
                                            • with
                                            • +
                                            • yield
                                            • +
                                            diff --git a/docs/generators/scalatra.md b/docs/generators/scalatra.md index c55dc21c74..f420e05199 100644 --- a/docs/generators/scalatra.md +++ b/docs/generators/scalatra.md @@ -5,11 +5,114 @@ sidebar_label: scalatra | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| -|modelPackage|package for generated models| |null| |apiPackage|package for generated api classes| |null| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|modelPackage|package for generated models| |null| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| |sourceFolder|source folder for generated code| |null| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | +|Array|java.util.List| +|ArrayList|java.util.ArrayList| +|BigDecimal|java.math.BigDecimal| +|Date|java.util.Date| +|DateTime|org.joda.time.DateTime| +|File|java.io.File| +|HashMap|java.util.HashMap| +|ListBuffer|scala.collection.mutable.ListBuffer| +|ListSet|scala.collection.immutable.ListSet| +|LocalDate|org.joda.time.LocalDate| +|LocalDateTime|org.joda.time.LocalDateTime| +|LocalTime|org.joda.time.LocalTime| +|Map|java.util.Map| +|Set|scala.collection.immutable.Set| +|Timestamp|java.sql.Timestamp| +|URI|java.net.URI| +|UUID|java.util.UUID| + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | +|map|HashMap| +|set|Set| + + +## LANGUAGE PRIMITIVES + +
                                            • Any
                                            • +
                                            • Array
                                            • +
                                            • Boolean
                                            • +
                                            • Double
                                            • +
                                            • Float
                                            • +
                                            • Int
                                            • +
                                            • List
                                            • +
                                            • Long
                                            • +
                                            • Map
                                            • +
                                            • Object
                                            • +
                                            • Seq
                                            • +
                                            • String
                                            • +
                                            • boolean
                                            • +
                                            + +## RESERVED WORDS + +
                                            • abstract
                                            • +
                                            • assert
                                            • +
                                            • boolean
                                            • +
                                            • break
                                            • +
                                            • byte
                                            • +
                                            • case
                                            • +
                                            • catch
                                            • +
                                            • char
                                            • +
                                            • class
                                            • +
                                            • const
                                            • +
                                            • continue
                                            • +
                                            • default
                                            • +
                                            • do
                                            • +
                                            • double
                                            • +
                                            • else
                                            • +
                                            • enum
                                            • +
                                            • extends
                                            • +
                                            • final
                                            • +
                                            • finally
                                            • +
                                            • float
                                            • +
                                            • for
                                            • +
                                            • goto
                                            • +
                                            • if
                                            • +
                                            • implements
                                            • +
                                            • import
                                            • +
                                            • instanceof
                                            • +
                                            • int
                                            • +
                                            • interface
                                            • +
                                            • long
                                            • +
                                            • native
                                            • +
                                            • new
                                            • +
                                            • package
                                            • +
                                            • private
                                            • +
                                            • protected
                                            • +
                                            • public
                                            • +
                                            • return
                                            • +
                                            • short
                                            • +
                                            • static
                                            • +
                                            • strictfp
                                            • +
                                            • super
                                            • +
                                            • switch
                                            • +
                                            • synchronized
                                            • +
                                            • this
                                            • +
                                            • throw
                                            • +
                                            • throws
                                            • +
                                            • transient
                                            • +
                                            • try
                                            • +
                                            • type
                                            • +
                                            • void
                                            • +
                                            • volatile
                                            • +
                                            • while
                                            • +
                                            diff --git a/docs/generators/scalaz.md b/docs/generators/scalaz.md index bf097e1ced..e6050ab3f1 100644 --- a/docs/generators/scalaz.md +++ b/docs/generators/scalaz.md @@ -5,12 +5,113 @@ sidebar_label: scalaz | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| -|modelPackage|package for generated models| |null| |apiPackage|package for generated api classes| |null| -|sourceFolder|source folder for generated code| |null| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|modelPackage|package for generated models| |null| |modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name| |camelCase| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| +|sourceFolder|source folder for generated code| |null| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | +|Array|java.util.List| +|ArrayList|java.util.ArrayList| +|BigDecimal|java.math.BigDecimal| +|Date|java.util.Date| +|DateTime|org.joda.time.DateTime| +|File|java.io.File| +|HashMap|java.util.HashMap| +|ListBuffer|scala.collection.mutable.ListBuffer| +|ListSet|scala.collection.immutable.ListSet| +|LocalDate|org.joda.time.LocalDate| +|LocalDateTime|org.joda.time.LocalDateTime| +|LocalTime|org.joda.time.LocalTime| +|Seq|scala.collection.immutable.Seq| +|Timestamp|java.sql.Timestamp| +|URI|java.net.URI| +|UUID|java.util.UUID| + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | +|array|ListBuffer| +|map|HashMap| +|set|Set| + + +## LANGUAGE PRIMITIVES + +
                                            • Any
                                            • +
                                            • Array
                                            • +
                                            • Boolean
                                            • +
                                            • Double
                                            • +
                                            • Float
                                            • +
                                            • Int
                                            • +
                                            • List
                                            • +
                                            • Long
                                            • +
                                            • Map
                                            • +
                                            • Object
                                            • +
                                            • Seq
                                            • +
                                            • String
                                            • +
                                            • boolean
                                            • +
                                            + +## RESERVED WORDS + +
                                            • abstract
                                            • +
                                            • apiinvoker
                                            • +
                                            • basepath
                                            • +
                                            • case
                                            • +
                                            • catch
                                            • +
                                            • class
                                            • +
                                            • contenttype
                                            • +
                                            • contenttypes
                                            • +
                                            • def
                                            • +
                                            • do
                                            • +
                                            • else
                                            • +
                                            • extends
                                            • +
                                            • false
                                            • +
                                            • final
                                            • +
                                            • finally
                                            • +
                                            • for
                                            • +
                                            • formparams
                                            • +
                                            • forsome
                                            • +
                                            • headerparams
                                            • +
                                            • if
                                            • +
                                            • implicit
                                            • +
                                            • import
                                            • +
                                            • lazy
                                            • +
                                            • match
                                            • +
                                            • mp
                                            • +
                                            • new
                                            • +
                                            • null
                                            • +
                                            • object
                                            • +
                                            • override
                                            • +
                                            • package
                                            • +
                                            • path
                                            • +
                                            • postbody
                                            • +
                                            • private
                                            • +
                                            • protected
                                            • +
                                            • queryparams
                                            • +
                                            • return
                                            • +
                                            • sealed
                                            • +
                                            • super
                                            • +
                                            • this
                                            • +
                                            • throw
                                            • +
                                            • trait
                                            • +
                                            • true
                                            • +
                                            • try
                                            • +
                                            • type
                                            • +
                                            • val
                                            • +
                                            • var
                                            • +
                                            • while
                                            • +
                                            • with
                                            • +
                                            • yield
                                            • +
                                            diff --git a/docs/generators/spring.md b/docs/generators/spring.md index 6d6d462d80..7ba4dca43d 100644 --- a/docs/generators/spring.md +++ b/docs/generators/spring.md @@ -5,62 +5,179 @@ sidebar_label: spring | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations)| |null| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| -|modelPackage|package for generated models| |org.openapitools.model| +|apiFirst|Generate the API from the OAI spec at server compile time (API first approach)| |false| |apiPackage|package for generated api classes| |org.openapitools.api| -|invokerPackage|root package for generated code| |org.openapitools.api| -|groupId|groupId in generated pom.xml| |org.openapitools| -|artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |openapi-spring| -|artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |1.0.0| -|artifactUrl|artifact URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| |artifactDescription|artifact description in generated pom.xml| |OpenAPI Java| +|artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |openapi-spring| +|artifactUrl|artifact URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| +|artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |1.0.0| +|async|use async Callable controllers| |false| +|basePackage|base package (invokerPackage) for generated code| |org.openapitools| +|bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false| +|booleanGetterPrefix|Set booleanGetterPrefix| |get| +|configPackage|configuration package for generated code| |org.openapitools.configuration| +|dateLibrary|Option. Date library to use|
                                            **joda**
                                            Joda (for legacy app only)
                                            **legacy**
                                            Legacy java.util.Date (if you really have a good reason not to use threetenbp
                                            **java8-localdatetime**
                                            Java 8 using LocalDateTime (for legacy app only)
                                            **java8**
                                            Java 8 native JSR310 (preferred for jdk 1.8+) - note: this also sets "java8" to true
                                            **threetenbp**
                                            Backport of JSR310 (preferred for jdk < 1.8)
                                            |threetenbp| +|delegatePattern|Whether to generate the server files using the delegate pattern| |false| +|developerEmail|developer email in generated pom.xml| |team@openapitools.org| +|developerName|developer name in generated pom.xml| |OpenAPI-Generator Contributors| +|developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org| +|developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org| +|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false| +|groupId|groupId in generated pom.xml| |org.openapitools| +|hateoas|Use Spring HATEOAS library to allow adding HATEOAS links| |false| +|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false| +|implicitHeaders|Skip header parameters in the generated API methods using @ApiImplicitParams annotation.| |false| +|interfaceOnly|Whether to generate only API interface stubs without the server files.| |false| +|invokerPackage|root package for generated code| |org.openapitools.api| +|java8|Option. Use Java8 classes instead of third party equivalents|
                                            **true**
                                            Use Java 8 classes such as Base64. Use java8 default interface when a responseWrapper is used
                                            **false**
                                            Various third party libraries as needed
                                            |false| +|library|library template (sub-template)|
                                            **spring-boot**
                                            Spring-boot Server application using the SpringFox integration.
                                            **spring-mvc**
                                            Spring-MVC Server application using the SpringFox integration.
                                            **spring-cloud**
                                            Spring-Cloud-Feign client with Spring-Boot auto-configured settings.
                                            |spring-boot| +|licenseName|The name of the license| |Unlicense| +|licenseUrl|The URL of the license| |http://unlicense.org| +|modelPackage|package for generated models| |org.openapitools.model| +|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| +|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| +|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| +|performBeanValidation|Use Bean Validation Impl. to perform BeanValidation| |false| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|reactive|wrap responses in Mono/Flux Reactor types (spring-boot only)| |false| +|responseWrapper|wrap the responses in given type (Future, Callable, CompletableFuture,ListenableFuture, DeferredResult, HystrixCommand, RxObservable, RxSingle or fully qualified type)| |null| +|returnSuccessCode|Generated server returns 2xx code| |false| |scmConnection|SCM connection in generated pom.xml| |scm:git:git@github.com:openapitools/openapi-generator.git| |scmDeveloperConnection|SCM developer connection in generated pom.xml| |scm:git:git@github.com:openapitools/openapi-generator.git| |scmUrl|SCM URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| -|developerName|developer name in generated pom.xml| |OpenAPI-Generator Contributors| -|developerEmail|developer email in generated pom.xml| |team@openapitools.org| -|developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org| -|developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org| -|licenseName|The name of the license| |Unlicense| -|licenseUrl|The URL of the license| |http://unlicense.org| -|sourceFolder|source folder for generated code| |src/main/java| |serializableModel|boolean - toggle "implements Serializable" for generated models| |false| -|bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false| -|fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false| -|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false| -|withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false| -|dateLibrary|Option. Date library to use|
                                            **joda**
                                            Joda (for legacy app only)
                                            **legacy**
                                            Legacy java.util.Date (if you really have a good reason not to use threetenbp
                                            **java8-localdatetime**
                                            Java 8 using LocalDateTime (for legacy app only)
                                            **java8**
                                            Java 8 native JSR310 (preferred for jdk 1.8+) - note: this also sets "java8" to true
                                            **threetenbp**
                                            Backport of JSR310 (preferred for jdk < 1.8)
                                            |threetenbp| -|java8|Option. Use Java8 classes instead of third party equivalents|
                                            **true**
                                            Use Java 8 classes such as Base64. Use java8 default interface when a responseWrapper is used
                                            **false**
                                            Various third party libraries as needed
                                            |false| -|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false| -|booleanGetterPrefix|Set booleanGetterPrefix| |get| -|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations)| |null| -|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| -|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| -|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| -|snapshotVersion|Uses a SNAPSHOT version.|
                                            **true**
                                            Use a SnapShot Version
                                            **false**
                                            Use a Release Version
                                            |null| -|title|server title name or client service name| |OpenAPI Spring| -|configPackage|configuration package for generated code| |org.openapitools.configuration| -|basePackage|base package (invokerPackage) for generated code| |org.openapitools| -|interfaceOnly|Whether to generate only API interface stubs without the server files.| |false| -|delegatePattern|Whether to generate the server files using the delegate pattern| |false| |singleContentTypes|Whether to select only one produces/consumes content-type by operation.| |false| |skipDefaultInterface|Whether to generate default implementations for java8 interfaces| |false| -|async|use async Callable controllers| |false| -|reactive|wrap responses in Mono/Flux Reactor types (spring-boot only)| |false| -|responseWrapper|wrap the responses in given type (Future, Callable, CompletableFuture,ListenableFuture, DeferredResult, HystrixCommand, RxObservable, RxSingle or fully qualified type)| |null| -|virtualService|Generates the virtual service. For more details refer - https://github.com/elan-venture/virtualan/wiki| |false| -|useTags|use tags for creating interface and controller classnames| |false| -|useBeanValidation|Use BeanValidation API annotations| |true| -|performBeanValidation|Use Bean Validation Impl. to perform BeanValidation| |false| -|implicitHeaders|Skip header parameters in the generated API methods using @ApiImplicitParams annotation.| |false| +|snapshotVersion|Uses a SNAPSHOT version.|
                                            **true**
                                            Use a SnapShot Version
                                            **false**
                                            Use a Release Version
                                            |null| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| +|sourceFolder|source folder for generated code| |src/main/java| |swaggerDocketConfig|Generate Spring OpenAPI Docket configuration class.| |false| -|apiFirst|Generate the API from the OAI spec at server compile time (API first approach)| |false| -|useOptional|Use Optional container for optional parameters| |false| -|hateoas|Use Spring HATEOAS library to allow adding HATEOAS links| |false| -|returnSuccessCode|Generated server returns 2xx code| |false| +|title|server title name or client service name| |OpenAPI Spring| |unhandledException|Declare operation methods to throw a generic exception and allow unhandled exceptions (useful for Spring `@ControllerAdvice` directives).| |false| -|library|library template (sub-template)|
                                            **spring-boot**
                                            Spring-boot Server application using the SpringFox integration.
                                            **spring-mvc**
                                            Spring-MVC Server application using the SpringFox integration.
                                            **spring-cloud**
                                            Spring-Cloud-Feign client with Spring-Boot auto-configured settings.
                                            |spring-boot| +|useBeanValidation|Use BeanValidation API annotations| |true| +|useOptional|Use Optional container for optional parameters| |false| +|useTags|use tags for creating interface and controller classnames| |false| +|virtualService|Generates the virtual service. For more details refer - https://github.com/elan-venture/virtualan/wiki| |false| +|withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | +|Array|java.util.List| +|ArrayList|java.util.ArrayList| +|BigDecimal|java.math.BigDecimal| +|Date|java.util.Date| +|DateTime|org.joda.time.*| +|File|java.io.File| +|HashMap|java.util.HashMap| +|List|java.util.*| +|LocalDate|org.joda.time.*| +|LocalDateTime|org.joda.time.*| +|LocalTime|org.joda.time.*| +|Map|java.util.Map| +|Set|java.util.*| +|Timestamp|java.sql.Timestamp| +|URI|java.net.URI| +|UUID|java.util.UUID| + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | +|array|ArrayList| +|map|HashMap| + + +## LANGUAGE PRIMITIVES + +
                                            • Boolean
                                            • +
                                            • Double
                                            • +
                                            • Float
                                            • +
                                            • Integer
                                            • +
                                            • Long
                                            • +
                                            • Object
                                            • +
                                            • String
                                            • +
                                            • boolean
                                            • +
                                            • byte[]
                                            • +
                                            + +## RESERVED WORDS + +
                                            • abstract
                                            • +
                                            • apiclient
                                            • +
                                            • apiexception
                                            • +
                                            • apiresponse
                                            • +
                                            • assert
                                            • +
                                            • boolean
                                            • +
                                            • break
                                            • +
                                            • byte
                                            • +
                                            • case
                                            • +
                                            • catch
                                            • +
                                            • char
                                            • +
                                            • class
                                            • +
                                            • configuration
                                            • +
                                            • const
                                            • +
                                            • continue
                                            • +
                                            • default
                                            • +
                                            • do
                                            • +
                                            • double
                                            • +
                                            • else
                                            • +
                                            • enum
                                            • +
                                            • extends
                                            • +
                                            • final
                                            • +
                                            • finally
                                            • +
                                            • float
                                            • +
                                            • for
                                            • +
                                            • goto
                                            • +
                                            • if
                                            • +
                                            • implements
                                            • +
                                            • import
                                            • +
                                            • instanceof
                                            • +
                                            • int
                                            • +
                                            • interface
                                            • +
                                            • localreturntype
                                            • +
                                            • localvaraccept
                                            • +
                                            • localvaraccepts
                                            • +
                                            • localvarauthnames
                                            • +
                                            • localvarcollectionqueryparams
                                            • +
                                            • localvarcontenttype
                                            • +
                                            • localvarcontenttypes
                                            • +
                                            • localvarcookieparams
                                            • +
                                            • localvarformparams
                                            • +
                                            • localvarheaderparams
                                            • +
                                            • localvarpath
                                            • +
                                            • localvarpostbody
                                            • +
                                            • localvarqueryparams
                                            • +
                                            • long
                                            • +
                                            • native
                                            • +
                                            • new
                                            • +
                                            • null
                                            • +
                                            • object
                                            • +
                                            • package
                                            • +
                                            • private
                                            • +
                                            • protected
                                            • +
                                            • public
                                            • +
                                            • return
                                            • +
                                            • short
                                            • +
                                            • static
                                            • +
                                            • strictfp
                                            • +
                                            • stringutil
                                            • +
                                            • super
                                            • +
                                            • switch
                                            • +
                                            • synchronized
                                            • +
                                            • this
                                            • +
                                            • throw
                                            • +
                                            • throws
                                            • +
                                            • transient
                                            • +
                                            • try
                                            • +
                                            • void
                                            • +
                                            • volatile
                                            • +
                                            • while
                                            • +
                                            diff --git a/docs/generators/swift2-deprecated.md b/docs/generators/swift2-deprecated.md index 1ba09b421c..776a950d69 100644 --- a/docs/generators/swift2-deprecated.md +++ b/docs/generators/swift2-deprecated.md @@ -5,24 +5,150 @@ sidebar_label: swift2-deprecated | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true| +|podAuthors|Authors used for Podspec| |null| +|podDescription|Description used for Podspec| |null| +|podDocsetURL|Docset URL used for Podspec| |null| +|podDocumentationURL|Documentation URL used for Podspec| |null| +|podHomepage|Homepage used for Podspec| |null| +|podLicense|License used for Podspec| |null| +|podScreenshots|Screenshots used for Podspec| |null| +|podSocialMediaURL|Social Media URL used for Podspec| |null| +|podSource|Source information used for Podspec| |null| +|podSummary|Summary used for Podspec| |null| +|podVersion|Version used for Podspec| |null| |prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| |projectName|Project name in Xcode| |null| |responseAs|Optionally use libraries to manage response. Currently PromiseKit, RxSwift are available.| |null| -|unwrapRequired|Treat 'required' properties in response as non-optional (which would crash the app if api returns null as opposed to required option specified in json schema| |null| -|podSource|Source information used for Podspec| |null| -|podVersion|Version used for Podspec| |null| -|podAuthors|Authors used for Podspec| |null| -|podSocialMediaURL|Social Media URL used for Podspec| |null| -|podDocsetURL|Docset URL used for Podspec| |null| -|podLicense|License used for Podspec| |null| -|podHomepage|Homepage used for Podspec| |null| -|podSummary|Summary used for Podspec| |null| -|podDescription|Description used for Podspec| |null| -|podScreenshots|Screenshots used for Podspec| |null| -|podDocumentationURL|Documentation URL used for Podspec| |null| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| |swiftUseApiNamespace|Flag to make all the API classes inner-class of {{projectName}}API| |null| -|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true| +|unwrapRequired|Treat 'required' properties in response as non-optional (which would crash the app if api returns null as opposed to required option specified in json schema| |null| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | + + +## LANGUAGE PRIMITIVES + +
                                            • AnyObject
                                            • +
                                            • Bool
                                            • +
                                            • Character
                                            • +
                                            • Double
                                            • +
                                            • Float
                                            • +
                                            • Int
                                            • +
                                            • Int32
                                            • +
                                            • Int64
                                            • +
                                            • String
                                            • +
                                            • Void
                                            • +
                                            + +## RESERVED WORDS + +
                                            • Any
                                            • +
                                            • AnyObject
                                            • +
                                            • Bool
                                            • +
                                            • COLUMN
                                            • +
                                            • Character
                                            • +
                                            • Class
                                            • +
                                            • Data
                                            • +
                                            • Double
                                            • +
                                            • ErrorResponse
                                            • +
                                            • FILE
                                            • +
                                            • FUNCTION
                                            • +
                                            • Float
                                            • +
                                            • Int
                                            • +
                                            • Int32
                                            • +
                                            • Int64
                                            • +
                                            • LINE
                                            • +
                                            • Protocol
                                            • +
                                            • Self
                                            • +
                                            • String
                                            • +
                                            • Type
                                            • +
                                            • Void
                                            • +
                                            • as
                                            • +
                                            • associativity
                                            • +
                                            • break
                                            • +
                                            • case
                                            • +
                                            • catch
                                            • +
                                            • class
                                            • +
                                            • continue
                                            • +
                                            • convenience
                                            • +
                                            • default
                                            • +
                                            • defer
                                            • +
                                            • deinit
                                            • +
                                            • didSet
                                            • +
                                            • do
                                            • +
                                            • dynamic
                                            • +
                                            • dynamicType
                                            • +
                                            • else
                                            • +
                                            • enum
                                            • +
                                            • extension
                                            • +
                                            • fallthrough
                                            • +
                                            • false
                                            • +
                                            • fileprivate
                                            • +
                                            • final
                                            • +
                                            • for
                                            • +
                                            • func
                                            • +
                                            • get
                                            • +
                                            • guard
                                            • +
                                            • if
                                            • +
                                            • import
                                            • +
                                            • in
                                            • +
                                            • indirect
                                            • +
                                            • infix
                                            • +
                                            • init
                                            • +
                                            • inout
                                            • +
                                            • internal
                                            • +
                                            • is
                                            • +
                                            • lazy
                                            • +
                                            • left
                                            • +
                                            • let
                                            • +
                                            • mutating
                                            • +
                                            • nil
                                            • +
                                            • none
                                            • +
                                            • nonmutating
                                            • +
                                            • open
                                            • +
                                            • operator
                                            • +
                                            • optional
                                            • +
                                            • override
                                            • +
                                            • postfix
                                            • +
                                            • precedence
                                            • +
                                            • prefix
                                            • +
                                            • private
                                            • +
                                            • protocol
                                            • +
                                            • public
                                            • +
                                            • repeat
                                            • +
                                            • required
                                            • +
                                            • rethrows
                                            • +
                                            • return
                                            • +
                                            • right
                                            • +
                                            • self
                                            • +
                                            • set
                                            • +
                                            • static
                                            • +
                                            • struct
                                            • +
                                            • subscript
                                            • +
                                            • super
                                            • +
                                            • switch
                                            • +
                                            • throw
                                            • +
                                            • throws
                                            • +
                                            • true
                                            • +
                                            • try
                                            • +
                                            • typealias
                                            • +
                                            • unowned
                                            • +
                                            • var
                                            • +
                                            • weak
                                            • +
                                            • where
                                            • +
                                            • while
                                            • +
                                            • willSet
                                            • +
                                            diff --git a/docs/generators/swift3-deprecated.md b/docs/generators/swift3-deprecated.md index d72fe8b9d2..d605fb9d76 100644 --- a/docs/generators/swift3-deprecated.md +++ b/docs/generators/swift3-deprecated.md @@ -5,26 +5,144 @@ sidebar_label: swift3-deprecated | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true| +|lenientTypeCast|Accept and cast values for simple types (string->bool, string->int, int->string)| |false| +|objcCompatible|Add additional properties and methods for Objective-C compatibility (default: false)| |null| +|podAuthors|Authors used for Podspec| |null| +|podDescription|Description used for Podspec| |null| +|podDocsetURL|Docset URL used for Podspec| |null| +|podDocumentationURL|Documentation URL used for Podspec| |null| +|podHomepage|Homepage used for Podspec| |null| +|podLicense|License used for Podspec| |null| +|podScreenshots|Screenshots used for Podspec| |null| +|podSocialMediaURL|Social Media URL used for Podspec| |null| +|podSource|Source information used for Podspec| |null| +|podSummary|Summary used for Podspec| |null| +|podVersion|Version used for Podspec| |null| |prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| |projectName|Project name in Xcode| |null| |responseAs|Optionally use libraries to manage response. Currently PromiseKit, RxSwift are available.| |null| -|unwrapRequired|Treat 'required' properties in response as non-optional (which would crash the app if api returns null as opposed to required option specified in json schema| |null| -|objcCompatible|Add additional properties and methods for Objective-C compatibility (default: false)| |null| -|podSource|Source information used for Podspec| |null| -|podVersion|Version used for Podspec| |null| -|podAuthors|Authors used for Podspec| |null| -|podSocialMediaURL|Social Media URL used for Podspec| |null| -|podDocsetURL|Docset URL used for Podspec| |null| -|podLicense|License used for Podspec| |null| -|podHomepage|Homepage used for Podspec| |null| -|podSummary|Summary used for Podspec| |null| -|podDescription|Description used for Podspec| |null| -|podScreenshots|Screenshots used for Podspec| |null| -|podDocumentationURL|Documentation URL used for Podspec| |null| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| |swiftUseApiNamespace|Flag to make all the API classes inner-class of {{projectName}}API| |null| -|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true| -|lenientTypeCast|Accept and cast values for simple types (string->bool, string->int, int->string)| |false| +|unwrapRequired|Treat 'required' properties in response as non-optional (which would crash the app if api returns null as opposed to required option specified in json schema| |null| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | + + +## LANGUAGE PRIMITIVES + +
                                            • Any
                                            • +
                                            • AnyObject
                                            • +
                                            • Bool
                                            • +
                                            • Character
                                            • +
                                            • Double
                                            • +
                                            • Float
                                            • +
                                            • Int
                                            • +
                                            • Int32
                                            • +
                                            • Int64
                                            • +
                                            • String
                                            • +
                                            • Void
                                            • +
                                            + +## RESERVED WORDS + +
                                            • Any
                                            • +
                                            • AnyObject
                                            • +
                                            • Bool
                                            • +
                                            • COLUMN
                                            • +
                                            • Character
                                            • +
                                            • Class
                                            • +
                                            • Data
                                            • +
                                            • Double
                                            • +
                                            • Error
                                            • +
                                            • ErrorResponse
                                            • +
                                            • FILE
                                            • +
                                            • FUNCTION
                                            • +
                                            • Float
                                            • +
                                            • Int
                                            • +
                                            • Int32
                                            • +
                                            • Int64
                                            • +
                                            • LINE
                                            • +
                                            • Protocol
                                            • +
                                            • Response
                                            • +
                                            • Self
                                            • +
                                            • String
                                            • +
                                            • Type
                                            • +
                                            • URL
                                            • +
                                            • Void
                                            • +
                                            • as
                                            • +
                                            • associativity
                                            • +
                                            • break
                                            • +
                                            • case
                                            • +
                                            • class
                                            • +
                                            • continue
                                            • +
                                            • convenience
                                            • +
                                            • default
                                            • +
                                            • deinit
                                            • +
                                            • didSet
                                            • +
                                            • do
                                            • +
                                            • dynamic
                                            • +
                                            • dynamicType
                                            • +
                                            • else
                                            • +
                                            • enum
                                            • +
                                            • extension
                                            • +
                                            • fallthrough
                                            • +
                                            • false
                                            • +
                                            • final
                                            • +
                                            • for
                                            • +
                                            • func
                                            • +
                                            • get
                                            • +
                                            • if
                                            • +
                                            • import
                                            • +
                                            • in
                                            • +
                                            • infix
                                            • +
                                            • init
                                            • +
                                            • inout
                                            • +
                                            • internal
                                            • +
                                            • is
                                            • +
                                            • lazy
                                            • +
                                            • left
                                            • +
                                            • let
                                            • +
                                            • mutating
                                            • +
                                            • nil
                                            • +
                                            • none
                                            • +
                                            • nonmutating
                                            • +
                                            • operator
                                            • +
                                            • optional
                                            • +
                                            • override
                                            • +
                                            • postfix
                                            • +
                                            • precedence
                                            • +
                                            • prefix
                                            • +
                                            • private
                                            • +
                                            • protocol
                                            • +
                                            • public
                                            • +
                                            • required
                                            • +
                                            • return
                                            • +
                                            • right
                                            • +
                                            • self
                                            • +
                                            • set
                                            • +
                                            • static
                                            • +
                                            • struct
                                            • +
                                            • subscript
                                            • +
                                            • super
                                            • +
                                            • switch
                                            • +
                                            • true
                                            • +
                                            • typealias
                                            • +
                                            • unowned
                                            • +
                                            • var
                                            • +
                                            • weak
                                            • +
                                            • where
                                            • +
                                            • while
                                            • +
                                            diff --git a/docs/generators/swift4.md b/docs/generators/swift4.md index 53f718d49c..dfd34277fc 100644 --- a/docs/generators/swift4.md +++ b/docs/generators/swift4.md @@ -5,28 +5,202 @@ sidebar_label: swift4 | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true| +|lenientTypeCast|Accept and cast values for simple types (string->bool, string->int, int->string)| |false| +|nonPublicApi|Generates code with reduced access modifiers; allows embedding elsewhere without exposing non-public API calls to consumers.(default: false)| |null| +|objcCompatible|Add additional properties and methods for Objective-C compatibility (default: false)| |null| +|podAuthors|Authors used for Podspec| |null| +|podDescription|Description used for Podspec| |null| +|podDocsetURL|Docset URL used for Podspec| |null| +|podDocumentationURL|Documentation URL used for Podspec| |null| +|podHomepage|Homepage used for Podspec| |null| +|podLicense|License used for Podspec| |null| +|podScreenshots|Screenshots used for Podspec| |null| +|podSocialMediaURL|Social Media URL used for Podspec| |null| +|podSource|Source information used for Podspec| |null| +|podSummary|Summary used for Podspec| |null| +|podVersion|Version used for Podspec| |null| |prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| |projectName|Project name in Xcode| |null| |responseAs|Optionally use libraries to manage response. Currently PromiseKit, RxSwift, Result are available.| |null| -|nonPublicApi|Generates code with reduced access modifiers; allows embedding elsewhere without exposing non-public API calls to consumers.(default: false)| |null| -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |null| -|unwrapRequired|Treat 'required' properties in response as non-optional (which would crash the app if api returns null as opposed to required option specified in json schema| |null| -|objcCompatible|Add additional properties and methods for Objective-C compatibility (default: false)| |null| -|podSource|Source information used for Podspec| |null| -|podVersion|Version used for Podspec| |null| -|podAuthors|Authors used for Podspec| |null| -|podSocialMediaURL|Social Media URL used for Podspec| |null| -|podDocsetURL|Docset URL used for Podspec| |null| -|podLicense|License used for Podspec| |null| -|podHomepage|Homepage used for Podspec| |null| -|podSummary|Summary used for Podspec| |null| -|podDescription|Description used for Podspec| |null| -|podScreenshots|Screenshots used for Podspec| |null| -|podDocumentationURL|Documentation URL used for Podspec| |null| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| |swiftUseApiNamespace|Flag to make all the API classes inner-class of {{projectName}}API| |null| -|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true| -|lenientTypeCast|Accept and cast values for simple types (string->bool, string->int, int->string)| |false| +|unwrapRequired|Treat 'required' properties in response as non-optional (which would crash the app if api returns null as opposed to required option specified in json schema| |null| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | + + +## LANGUAGE PRIMITIVES + +
                                            • Any
                                            • +
                                            • AnyObject
                                            • +
                                            • Bool
                                            • +
                                            • Character
                                            • +
                                            • Data
                                            • +
                                            • Date
                                            • +
                                            • Decimal
                                            • +
                                            • Double
                                            • +
                                            • Float
                                            • +
                                            • Int
                                            • +
                                            • Int32
                                            • +
                                            • Int64
                                            • +
                                            • String
                                            • +
                                            • URL
                                            • +
                                            • UUID
                                            • +
                                            • Void
                                            • +
                                            + +## RESERVED WORDS + +
                                            • #available
                                            • +
                                            • #colorLiteral
                                            • +
                                            • #column
                                            • +
                                            • #else
                                            • +
                                            • #elseif
                                            • +
                                            • #endif
                                            • +
                                            • #file
                                            • +
                                            • #fileLiteral
                                            • +
                                            • #function
                                            • +
                                            • #if
                                            • +
                                            • #imageLiteral
                                            • +
                                            • #line
                                            • +
                                            • #selector
                                            • +
                                            • #sourceLocation
                                            • +
                                            • Any
                                            • +
                                            • AnyObject
                                            • +
                                            • Array
                                            • +
                                            • Bool
                                            • +
                                            • COLUMN
                                            • +
                                            • Character
                                            • +
                                            • Class
                                            • +
                                            • ClosedRange
                                            • +
                                            • Codable
                                            • +
                                            • CountableClosedRange
                                            • +
                                            • CountableRange
                                            • +
                                            • Data
                                            • +
                                            • Decodable
                                            • +
                                            • Dictionary
                                            • +
                                            • Double
                                            • +
                                            • Encodable
                                            • +
                                            • Error
                                            • +
                                            • ErrorResponse
                                            • +
                                            • FILE
                                            • +
                                            • FUNCTION
                                            • +
                                            • Float
                                            • +
                                            • Float32
                                            • +
                                            • Float64
                                            • +
                                            • Float80
                                            • +
                                            • Int
                                            • +
                                            • Int16
                                            • +
                                            • Int32
                                            • +
                                            • Int64
                                            • +
                                            • Int8
                                            • +
                                            • LINE
                                            • +
                                            • OptionSet
                                            • +
                                            • Optional
                                            • +
                                            • Protocol
                                            • +
                                            • Range
                                            • +
                                            • Response
                                            • +
                                            • Self
                                            • +
                                            • Set
                                            • +
                                            • StaticString
                                            • +
                                            • String
                                            • +
                                            • Type
                                            • +
                                            • UInt
                                            • +
                                            • UInt16
                                            • +
                                            • UInt32
                                            • +
                                            • UInt64
                                            • +
                                            • UInt8
                                            • +
                                            • URL
                                            • +
                                            • Unicode
                                            • +
                                            • Void
                                            • +
                                            • _
                                            • +
                                            • as
                                            • +
                                            • associatedtype
                                            • +
                                            • associativity
                                            • +
                                            • break
                                            • +
                                            • case
                                            • +
                                            • catch
                                            • +
                                            • class
                                            • +
                                            • continue
                                            • +
                                            • convenience
                                            • +
                                            • default
                                            • +
                                            • defer
                                            • +
                                            • deinit
                                            • +
                                            • didSet
                                            • +
                                            • do
                                            • +
                                            • dynamic
                                            • +
                                            • dynamicType
                                            • +
                                            • else
                                            • +
                                            • enum
                                            • +
                                            • extension
                                            • +
                                            • fallthrough
                                            • +
                                            • false
                                            • +
                                            • fileprivate
                                            • +
                                            • final
                                            • +
                                            • for
                                            • +
                                            • func
                                            • +
                                            • get
                                            • +
                                            • guard
                                            • +
                                            • if
                                            • +
                                            • import
                                            • +
                                            • in
                                            • +
                                            • indirect
                                            • +
                                            • infix
                                            • +
                                            • init
                                            • +
                                            • inout
                                            • +
                                            • internal
                                            • +
                                            • is
                                            • +
                                            • lazy
                                            • +
                                            • left
                                            • +
                                            • let
                                            • +
                                            • mutating
                                            • +
                                            • nil
                                            • +
                                            • none
                                            • +
                                            • nonmutating
                                            • +
                                            • open
                                            • +
                                            • operator
                                            • +
                                            • optional
                                            • +
                                            • override
                                            • +
                                            • postfix
                                            • +
                                            • precedence
                                            • +
                                            • prefix
                                            • +
                                            • private
                                            • +
                                            • protocol
                                            • +
                                            • public
                                            • +
                                            • repeat
                                            • +
                                            • required
                                            • +
                                            • rethrows
                                            • +
                                            • return
                                            • +
                                            • right
                                            • +
                                            • self
                                            • +
                                            • set
                                            • +
                                            • static
                                            • +
                                            • struct
                                            • +
                                            • subscript
                                            • +
                                            • super
                                            • +
                                            • switch
                                            • +
                                            • throw
                                            • +
                                            • throws
                                            • +
                                            • true
                                            • +
                                            • try
                                            • +
                                            • typealias
                                            • +
                                            • unowned
                                            • +
                                            • var
                                            • +
                                            • weak
                                            • +
                                            • where
                                            • +
                                            • while
                                            • +
                                            • willSet
                                            • +
                                            diff --git a/docs/generators/swift5.md b/docs/generators/swift5.md new file mode 100644 index 0000000000..b5295c9075 --- /dev/null +++ b/docs/generators/swift5.md @@ -0,0 +1,205 @@ +--- +title: Config Options for swift5 +sidebar_label: swift5 +--- + +| Option | Description | Values | Default | +| ------ | ----------- | ------ | ------- | +|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true| +|lenientTypeCast|Accept and cast values for simple types (string->bool, string->int, int->string)| |false| +|library|Library template (sub-template) to use|
                                            **urlsession**
                                            [DEFAULT] HTTP client: URLSession
                                            **alamofire**
                                            HTTP client: Alamofire
                                            |urlsession| +|nonPublicApi|Generates code with reduced access modifiers; allows embedding elsewhere without exposing non-public API calls to consumers.(default: false)| |null| +|objcCompatible|Add additional properties and methods for Objective-C compatibility (default: false)| |null| +|podAuthors|Authors used for Podspec| |null| +|podDescription|Description used for Podspec| |null| +|podDocumentationURL|Documentation URL used for Podspec| |null| +|podHomepage|Homepage used for Podspec| |null| +|podLicense|License used for Podspec| |null| +|podScreenshots|Screenshots used for Podspec| |null| +|podSocialMediaURL|Social Media URL used for Podspec| |null| +|podSource|Source information used for Podspec| |null| +|podSummary|Summary used for Podspec| |null| +|podVersion|Version used for Podspec| |null| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|projectName|Project name in Xcode| |null| +|responseAs|Optionally use libraries to manage response. Currently PromiseKit, RxSwift, Result, Combine are available.| |null| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| +|swiftUseApiNamespace|Flag to make all the API classes inner-class of {{projectName}}API| |null| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | + + +## LANGUAGE PRIMITIVES + +
                                            • Any
                                            • +
                                            • AnyObject
                                            • +
                                            • Bool
                                            • +
                                            • Character
                                            • +
                                            • Data
                                            • +
                                            • Date
                                            • +
                                            • Decimal
                                            • +
                                            • Double
                                            • +
                                            • Float
                                            • +
                                            • Int
                                            • +
                                            • Int32
                                            • +
                                            • Int64
                                            • +
                                            • String
                                            • +
                                            • URL
                                            • +
                                            • UUID
                                            • +
                                            • Void
                                            • +
                                            + +## RESERVED WORDS + +
                                            • #available
                                            • +
                                            • #colorLiteral
                                            • +
                                            • #column
                                            • +
                                            • #else
                                            • +
                                            • #elseif
                                            • +
                                            • #endif
                                            • +
                                            • #file
                                            • +
                                            • #fileLiteral
                                            • +
                                            • #function
                                            • +
                                            • #if
                                            • +
                                            • #imageLiteral
                                            • +
                                            • #line
                                            • +
                                            • #selector
                                            • +
                                            • #sourceLocation
                                            • +
                                            • Any
                                            • +
                                            • AnyObject
                                            • +
                                            • Array
                                            • +
                                            • Bool
                                            • +
                                            • COLUMN
                                            • +
                                            • Character
                                            • +
                                            • Class
                                            • +
                                            • ClosedRange
                                            • +
                                            • Codable
                                            • +
                                            • CountableClosedRange
                                            • +
                                            • CountableRange
                                            • +
                                            • Data
                                            • +
                                            • Decodable
                                            • +
                                            • Dictionary
                                            • +
                                            • Double
                                            • +
                                            • Encodable
                                            • +
                                            • Error
                                            • +
                                            • ErrorResponse
                                            • +
                                            • FILE
                                            • +
                                            • FUNCTION
                                            • +
                                            • Float
                                            • +
                                            • Float32
                                            • +
                                            • Float64
                                            • +
                                            • Float80
                                            • +
                                            • Int
                                            • +
                                            • Int16
                                            • +
                                            • Int32
                                            • +
                                            • Int64
                                            • +
                                            • Int8
                                            • +
                                            • LINE
                                            • +
                                            • OptionSet
                                            • +
                                            • Optional
                                            • +
                                            • Protocol
                                            • +
                                            • Range
                                            • +
                                            • Response
                                            • +
                                            • Self
                                            • +
                                            • Set
                                            • +
                                            • StaticString
                                            • +
                                            • String
                                            • +
                                            • Type
                                            • +
                                            • UInt
                                            • +
                                            • UInt16
                                            • +
                                            • UInt32
                                            • +
                                            • UInt64
                                            • +
                                            • UInt8
                                            • +
                                            • URL
                                            • +
                                            • Unicode
                                            • +
                                            • Void
                                            • +
                                            • _
                                            • +
                                            • as
                                            • +
                                            • associatedtype
                                            • +
                                            • associativity
                                            • +
                                            • break
                                            • +
                                            • case
                                            • +
                                            • catch
                                            • +
                                            • class
                                            • +
                                            • continue
                                            • +
                                            • convenience
                                            • +
                                            • default
                                            • +
                                            • defer
                                            • +
                                            • deinit
                                            • +
                                            • didSet
                                            • +
                                            • do
                                            • +
                                            • dynamic
                                            • +
                                            • dynamicType
                                            • +
                                            • else
                                            • +
                                            • enum
                                            • +
                                            • extension
                                            • +
                                            • fallthrough
                                            • +
                                            • false
                                            • +
                                            • fileprivate
                                            • +
                                            • final
                                            • +
                                            • for
                                            • +
                                            • func
                                            • +
                                            • get
                                            • +
                                            • guard
                                            • +
                                            • if
                                            • +
                                            • import
                                            • +
                                            • in
                                            • +
                                            • indirect
                                            • +
                                            • infix
                                            • +
                                            • init
                                            • +
                                            • inout
                                            • +
                                            • internal
                                            • +
                                            • is
                                            • +
                                            • lazy
                                            • +
                                            • left
                                            • +
                                            • let
                                            • +
                                            • mutating
                                            • +
                                            • nil
                                            • +
                                            • none
                                            • +
                                            • nonmutating
                                            • +
                                            • open
                                            • +
                                            • operator
                                            • +
                                            • optional
                                            • +
                                            • override
                                            • +
                                            • postfix
                                            • +
                                            • precedence
                                            • +
                                            • prefix
                                            • +
                                            • private
                                            • +
                                            • protocol
                                            • +
                                            • public
                                            • +
                                            • repeat
                                            • +
                                            • required
                                            • +
                                            • rethrows
                                            • +
                                            • return
                                            • +
                                            • right
                                            • +
                                            • self
                                            • +
                                            • set
                                            • +
                                            • static
                                            • +
                                            • struct
                                            • +
                                            • subscript
                                            • +
                                            • super
                                            • +
                                            • switch
                                            • +
                                            • throw
                                            • +
                                            • throws
                                            • +
                                            • true
                                            • +
                                            • try
                                            • +
                                            • typealias
                                            • +
                                            • unowned
                                            • +
                                            • var
                                            • +
                                            • weak
                                            • +
                                            • where
                                            • +
                                            • while
                                            • +
                                            • willSet
                                            • +
                                            diff --git a/docs/generators/typescript-angular.md b/docs/generators/typescript-angular.md index 11711420ff..cb9160d26a 100644 --- a/docs/generators/typescript-angular.md +++ b/docs/generators/typescript-angular.md @@ -5,26 +5,133 @@ sidebar_label: typescript-angular | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| -|modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name| |camelCase| -|supportsES6|Generate code that conforms to ES6.| |false| -|npmName|The name under which you want to publish generated npm package. Required to generate a full package| |null| -|npmVersion|The version of your npm package. If not provided, using the version from the OpenAPI specification file.| |1.0.0| -|snapshot|When setting this property to true, the version will be suffixed with -SNAPSHOT.yyyyMMddHHmm| |false| -|npmRepository|Use this property to set an url your private npmRepo in the package.json| |null| -|withInterfaces|Setting this property to true will generate interfaces next to the default class implementations.| |false| -|useSingleRequestParameter|Setting this property to true will generate functions with a single argument containing all API endpoint parameters instead of one argument per parameter.| |false| -|taggedUnions|Use discriminators to create tagged unions instead of extending interfaces.| |false| -|providedInRoot|Use this property to provide Injectables in root (it is only valid in angular version greater or equal to 6.0.0).| |false| -|ngVersion|The version of Angular.| |8.0.0| |apiModulePrefix|The prefix of the generated ApiModule.| |null| -|serviceSuffix|The suffix of the generated service.| |Service| -|serviceFileSuffix|The suffix of the file of the generated service (service<suffix>.ts).| |.service| -|modelSuffix|The suffix of the generated model.| |null| -|modelFileSuffix|The suffix of the file of the generated model (model<suffix>.ts).| |null| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |fileNaming|Naming convention for the output files: 'camelCase', 'kebab-case'.| |camelCase| +|modelFileSuffix|The suffix of the file of the generated model (model<suffix>.ts).| |null| +|modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name| |camelCase| +|modelSuffix|The suffix of the generated model.| |null| +|ngVersion|The version of Angular.| |8.0.0| +|npmName|The name under which you want to publish generated npm package. Required to generate a full package| |null| +|npmRepository|Use this property to set an url your private npmRepo in the package.json| |null| +|npmVersion|The version of your npm package. If not provided, using the version from the OpenAPI specification file.| |1.0.0| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|providedInRoot|Use this property to provide Injectables in root (it is only valid in angular version greater or equal to 6.0.0).| |false| +|serviceFileSuffix|The suffix of the file of the generated service (service<suffix>.ts).| |.service| +|serviceSuffix|The suffix of the generated service.| |Service| +|snapshot|When setting this property to true, the version will be suffixed with -SNAPSHOT.yyyyMMddHHmm| |false| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| |stringEnums|Generate string enums instead of objects for enum values.| |false| +|supportsES6|Generate code that conforms to ES6.| |false| +|taggedUnions|Use discriminators to create tagged unions instead of extending interfaces.| |false| +|useSingleRequestParameter|Setting this property to true will generate functions with a single argument containing all API endpoint parameters instead of one argument per parameter.| |false| +|withInterfaces|Setting this property to true will generate interfaces next to the default class implementations.| |false| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | +|array|Array| + + +## LANGUAGE PRIMITIVES + +
                                            • Array
                                            • +
                                            • Blob
                                            • +
                                            • Boolean
                                            • +
                                            • Date
                                            • +
                                            • Double
                                            • +
                                            • Error
                                            • +
                                            • File
                                            • +
                                            • Float
                                            • +
                                            • Integer
                                            • +
                                            • Long
                                            • +
                                            • Map
                                            • +
                                            • Object
                                            • +
                                            • String
                                            • +
                                            • any
                                            • +
                                            • boolean
                                            • +
                                            • number
                                            • +
                                            • object
                                            • +
                                            • string
                                            • +
                                            + +## RESERVED WORDS + +
                                            • abstract
                                            • +
                                            • await
                                            • +
                                            • boolean
                                            • +
                                            • break
                                            • +
                                            • byte
                                            • +
                                            • case
                                            • +
                                            • catch
                                            • +
                                            • char
                                            • +
                                            • class
                                            • +
                                            • const
                                            • +
                                            • continue
                                            • +
                                            • debugger
                                            • +
                                            • default
                                            • +
                                            • delete
                                            • +
                                            • do
                                            • +
                                            • double
                                            • +
                                            • else
                                            • +
                                            • enum
                                            • +
                                            • export
                                            • +
                                            • extends
                                            • +
                                            • false
                                            • +
                                            • final
                                            • +
                                            • finally
                                            • +
                                            • float
                                            • +
                                            • for
                                            • +
                                            • formParams
                                            • +
                                            • function
                                            • +
                                            • goto
                                            • +
                                            • headerParams
                                            • +
                                            • if
                                            • +
                                            • implements
                                            • +
                                            • import
                                            • +
                                            • in
                                            • +
                                            • instanceof
                                            • +
                                            • int
                                            • +
                                            • interface
                                            • +
                                            • let
                                            • +
                                            • long
                                            • +
                                            • native
                                            • +
                                            • new
                                            • +
                                            • null
                                            • +
                                            • package
                                            • +
                                            • private
                                            • +
                                            • protected
                                            • +
                                            • public
                                            • +
                                            • queryParameters
                                            • +
                                            • requestOptions
                                            • +
                                            • return
                                            • +
                                            • short
                                            • +
                                            • static
                                            • +
                                            • super
                                            • +
                                            • switch
                                            • +
                                            • synchronized
                                            • +
                                            • this
                                            • +
                                            • throw
                                            • +
                                            • transient
                                            • +
                                            • true
                                            • +
                                            • try
                                            • +
                                            • typeof
                                            • +
                                            • useFormData
                                            • +
                                            • var
                                            • +
                                            • varLocalDeferred
                                            • +
                                            • varLocalPath
                                            • +
                                            • void
                                            • +
                                            • volatile
                                            • +
                                            • while
                                            • +
                                            • with
                                            • +
                                            • yield
                                            • +
                                            diff --git a/docs/generators/typescript-angularjs.md b/docs/generators/typescript-angularjs.md index 5fd86f3d8e..932d469935 100644 --- a/docs/generators/typescript-angularjs.md +++ b/docs/generators/typescript-angularjs.md @@ -5,10 +5,116 @@ sidebar_label: typescript-angularjs | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name| |camelCase| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| |supportsES6|Generate code that conforms to ES6.| |false| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | +|array|Array| + + +## LANGUAGE PRIMITIVES + +
                                            • Array
                                            • +
                                            • Boolean
                                            • +
                                            • Date
                                            • +
                                            • Double
                                            • +
                                            • Error
                                            • +
                                            • File
                                            • +
                                            • Float
                                            • +
                                            • Integer
                                            • +
                                            • Long
                                            • +
                                            • Map
                                            • +
                                            • Object
                                            • +
                                            • String
                                            • +
                                            • any
                                            • +
                                            • boolean
                                            • +
                                            • number
                                            • +
                                            • object
                                            • +
                                            • string
                                            • +
                                            + +## RESERVED WORDS + +
                                            • abstract
                                            • +
                                            • await
                                            • +
                                            • boolean
                                            • +
                                            • break
                                            • +
                                            • byte
                                            • +
                                            • case
                                            • +
                                            • catch
                                            • +
                                            • char
                                            • +
                                            • class
                                            • +
                                            • const
                                            • +
                                            • continue
                                            • +
                                            • debugger
                                            • +
                                            • default
                                            • +
                                            • delete
                                            • +
                                            • do
                                            • +
                                            • double
                                            • +
                                            • else
                                            • +
                                            • enum
                                            • +
                                            • export
                                            • +
                                            • extends
                                            • +
                                            • false
                                            • +
                                            • final
                                            • +
                                            • finally
                                            • +
                                            • float
                                            • +
                                            • for
                                            • +
                                            • formParams
                                            • +
                                            • function
                                            • +
                                            • goto
                                            • +
                                            • headerParams
                                            • +
                                            • if
                                            • +
                                            • implements
                                            • +
                                            • import
                                            • +
                                            • in
                                            • +
                                            • instanceof
                                            • +
                                            • int
                                            • +
                                            • interface
                                            • +
                                            • let
                                            • +
                                            • long
                                            • +
                                            • native
                                            • +
                                            • new
                                            • +
                                            • null
                                            • +
                                            • package
                                            • +
                                            • private
                                            • +
                                            • protected
                                            • +
                                            • public
                                            • +
                                            • queryParameters
                                            • +
                                            • requestOptions
                                            • +
                                            • return
                                            • +
                                            • short
                                            • +
                                            • static
                                            • +
                                            • super
                                            • +
                                            • switch
                                            • +
                                            • synchronized
                                            • +
                                            • this
                                            • +
                                            • throw
                                            • +
                                            • transient
                                            • +
                                            • true
                                            • +
                                            • try
                                            • +
                                            • typeof
                                            • +
                                            • useFormData
                                            • +
                                            • var
                                            • +
                                            • varLocalDeferred
                                            • +
                                            • varLocalPath
                                            • +
                                            • void
                                            • +
                                            • volatile
                                            • +
                                            • while
                                            • +
                                            • with
                                            • +
                                            • yield
                                            • +
                                            diff --git a/docs/generators/typescript-aurelia.md b/docs/generators/typescript-aurelia.md index fe5f6d13c9..6f65c5174f 100644 --- a/docs/generators/typescript-aurelia.md +++ b/docs/generators/typescript-aurelia.md @@ -5,13 +5,119 @@ sidebar_label: typescript-aurelia | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name| |camelCase| -|supportsES6|Generate code that conforms to ES6.| |false| |npmName|The name under which you want to publish generated npm package. Required to generate a full package| |null| |npmVersion|The version of your npm package. If not provided, using the version from the OpenAPI specification file.| |1.0.0| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| |snapshot|When setting this property to true, the version will be suffixed with -SNAPSHOT.yyyyMMddHHmm| |false| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| +|supportsES6|Generate code that conforms to ES6.| |false| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | +|array|Array| + + +## LANGUAGE PRIMITIVES + +
                                            • Array
                                            • +
                                            • Boolean
                                            • +
                                            • Date
                                            • +
                                            • Double
                                            • +
                                            • Error
                                            • +
                                            • File
                                            • +
                                            • Float
                                            • +
                                            • Integer
                                            • +
                                            • Long
                                            • +
                                            • Map
                                            • +
                                            • Object
                                            • +
                                            • String
                                            • +
                                            • any
                                            • +
                                            • boolean
                                            • +
                                            • number
                                            • +
                                            • object
                                            • +
                                            • string
                                            • +
                                            + +## RESERVED WORDS + +
                                            • abstract
                                            • +
                                            • await
                                            • +
                                            • boolean
                                            • +
                                            • break
                                            • +
                                            • byte
                                            • +
                                            • case
                                            • +
                                            • catch
                                            • +
                                            • char
                                            • +
                                            • class
                                            • +
                                            • const
                                            • +
                                            • continue
                                            • +
                                            • debugger
                                            • +
                                            • default
                                            • +
                                            • delete
                                            • +
                                            • do
                                            • +
                                            • double
                                            • +
                                            • else
                                            • +
                                            • enum
                                            • +
                                            • export
                                            • +
                                            • extends
                                            • +
                                            • false
                                            • +
                                            • final
                                            • +
                                            • finally
                                            • +
                                            • float
                                            • +
                                            • for
                                            • +
                                            • formParams
                                            • +
                                            • function
                                            • +
                                            • goto
                                            • +
                                            • headerParams
                                            • +
                                            • if
                                            • +
                                            • implements
                                            • +
                                            • import
                                            • +
                                            • in
                                            • +
                                            • instanceof
                                            • +
                                            • int
                                            • +
                                            • interface
                                            • +
                                            • let
                                            • +
                                            • long
                                            • +
                                            • native
                                            • +
                                            • new
                                            • +
                                            • null
                                            • +
                                            • package
                                            • +
                                            • private
                                            • +
                                            • protected
                                            • +
                                            • public
                                            • +
                                            • queryParameters
                                            • +
                                            • requestOptions
                                            • +
                                            • return
                                            • +
                                            • short
                                            • +
                                            • static
                                            • +
                                            • super
                                            • +
                                            • switch
                                            • +
                                            • synchronized
                                            • +
                                            • this
                                            • +
                                            • throw
                                            • +
                                            • transient
                                            • +
                                            • true
                                            • +
                                            • try
                                            • +
                                            • typeof
                                            • +
                                            • useFormData
                                            • +
                                            • var
                                            • +
                                            • varLocalDeferred
                                            • +
                                            • varLocalPath
                                            • +
                                            • void
                                            • +
                                            • volatile
                                            • +
                                            • while
                                            • +
                                            • with
                                            • +
                                            • yield
                                            • +
                                            diff --git a/docs/generators/typescript-axios.md b/docs/generators/typescript-axios.md index 9b03c130ac..7df54bceb8 100644 --- a/docs/generators/typescript-axios.md +++ b/docs/generators/typescript-axios.md @@ -5,17 +5,123 @@ sidebar_label: typescript-axios | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name| |camelCase| -|supportsES6|Generate code that conforms to ES6.| |false| |npmName|The name under which you want to publish generated npm package. Required to generate a full package| |null| -|npmVersion|The version of your npm package. If not provided, using the version from the OpenAPI specification file.| |1.0.0| -|snapshot|When setting this property to true, the version will be suffixed with -SNAPSHOT.yyyyMMddHHmm| |false| |npmRepository|Use this property to set an url of your private npmRepo in the package.json| |null| +|npmVersion|The version of your npm package. If not provided, using the version from the OpenAPI specification file.| |1.0.0| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|snapshot|When setting this property to true, the version will be suffixed with -SNAPSHOT.yyyyMMddHHmm| |false| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| +|supportsES6|Generate code that conforms to ES6.| |false| |withInterfaces|Setting this property to true will generate interfaces next to the default class implementations.| |false| |withSeparateModelsAndApi|Put the model and api in separate folders and in separate classes| |false| |withoutPrefixEnums|Don't prefix enum names with class names| |false| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | +|array|Array| + + +## LANGUAGE PRIMITIVES + +
                                            • Array
                                            • +
                                            • Boolean
                                            • +
                                            • Date
                                            • +
                                            • Double
                                            • +
                                            • Error
                                            • +
                                            • File
                                            • +
                                            • Float
                                            • +
                                            • Integer
                                            • +
                                            • Long
                                            • +
                                            • Map
                                            • +
                                            • Object
                                            • +
                                            • String
                                            • +
                                            • any
                                            • +
                                            • boolean
                                            • +
                                            • number
                                            • +
                                            • object
                                            • +
                                            • string
                                            • +
                                            + +## RESERVED WORDS + +
                                            • abstract
                                            • +
                                            • await
                                            • +
                                            • boolean
                                            • +
                                            • break
                                            • +
                                            • byte
                                            • +
                                            • case
                                            • +
                                            • catch
                                            • +
                                            • char
                                            • +
                                            • class
                                            • +
                                            • const
                                            • +
                                            • continue
                                            • +
                                            • debugger
                                            • +
                                            • default
                                            • +
                                            • delete
                                            • +
                                            • do
                                            • +
                                            • double
                                            • +
                                            • else
                                            • +
                                            • enum
                                            • +
                                            • export
                                            • +
                                            • extends
                                            • +
                                            • false
                                            • +
                                            • final
                                            • +
                                            • finally
                                            • +
                                            • float
                                            • +
                                            • for
                                            • +
                                            • formParams
                                            • +
                                            • function
                                            • +
                                            • goto
                                            • +
                                            • headerParams
                                            • +
                                            • if
                                            • +
                                            • implements
                                            • +
                                            • import
                                            • +
                                            • in
                                            • +
                                            • instanceof
                                            • +
                                            • int
                                            • +
                                            • interface
                                            • +
                                            • let
                                            • +
                                            • long
                                            • +
                                            • native
                                            • +
                                            • new
                                            • +
                                            • null
                                            • +
                                            • package
                                            • +
                                            • private
                                            • +
                                            • protected
                                            • +
                                            • public
                                            • +
                                            • queryParameters
                                            • +
                                            • requestOptions
                                            • +
                                            • return
                                            • +
                                            • short
                                            • +
                                            • static
                                            • +
                                            • super
                                            • +
                                            • switch
                                            • +
                                            • synchronized
                                            • +
                                            • this
                                            • +
                                            • throw
                                            • +
                                            • transient
                                            • +
                                            • true
                                            • +
                                            • try
                                            • +
                                            • typeof
                                            • +
                                            • useFormData
                                            • +
                                            • var
                                            • +
                                            • varLocalDeferred
                                            • +
                                            • varLocalPath
                                            • +
                                            • void
                                            • +
                                            • volatile
                                            • +
                                            • while
                                            • +
                                            • with
                                            • +
                                            • yield
                                            • +
                                            diff --git a/docs/generators/typescript-fetch.md b/docs/generators/typescript-fetch.md index d603f8de2d..98a52b89d7 100644 --- a/docs/generators/typescript-fetch.md +++ b/docs/generators/typescript-fetch.md @@ -5,18 +5,149 @@ sidebar_label: typescript-fetch | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name| |camelCase| -|supportsES6|Generate code that conforms to ES6.| |false| |npmName|The name under which you want to publish generated npm package. Required to generate a full package| |null| -|npmVersion|The version of your npm package. If not provided, using the version from the OpenAPI specification file.| |1.0.0| -|snapshot|When setting this property to true, the version will be suffixed with -SNAPSHOT.yyyyMMddHHmm| |false| |npmRepository|Use this property to set an url your private npmRepo in the package.json| |null| -|withInterfaces|Setting this property to true will generate interfaces next to the default class implementations.| |false| -|useSingleRequestParameter|Setting this property to true will generate functions with a single argument containing all API endpoint parameters instead of one argument per parameter.| |true| +|npmVersion|The version of your npm package. If not provided, using the version from the OpenAPI specification file.| |1.0.0| |prefixParameterInterfaces|Setting this property to true will generate parameter interface declarations prefixed with API class name to avoid name conflicts.| |false| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|snapshot|When setting this property to true, the version will be suffixed with -SNAPSHOT.yyyyMMddHHmm| |false| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| +|supportsES6|Generate code that conforms to ES6.| |false| |typescriptThreePlus|Setting this property to true will generate TypeScript 3.6+ compatible code.| |false| +|useSingleRequestParameter|Setting this property to true will generate functions with a single argument containing all API endpoint parameters instead of one argument per parameter.| |true| +|withInterfaces|Setting this property to true will generate interfaces next to the default class implementations.| |false| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | +|array|Array| + + +## LANGUAGE PRIMITIVES + +
                                            • Array
                                            • +
                                            • Boolean
                                            • +
                                            • Date
                                            • +
                                            • Double
                                            • +
                                            • Error
                                            • +
                                            • File
                                            • +
                                            • Float
                                            • +
                                            • Integer
                                            • +
                                            • Long
                                            • +
                                            • Map
                                            • +
                                            • Object
                                            • +
                                            • String
                                            • +
                                            • any
                                            • +
                                            • boolean
                                            • +
                                            • number
                                            • +
                                            • object
                                            • +
                                            • string
                                            • +
                                            + +## RESERVED WORDS + +
                                            • ApiResponse
                                            • +
                                            • BASE_PATH
                                            • +
                                            • BaseAPI
                                            • +
                                            • BlobApiResponse
                                            • +
                                            • COLLECTION_FORMATS
                                            • +
                                            • Configuration
                                            • +
                                            • ConfigurationParameters
                                            • +
                                            • FetchAPI
                                            • +
                                            • FetchParams
                                            • +
                                            • HTTPBody
                                            • +
                                            • HTTPHeaders
                                            • +
                                            • HTTPMethod
                                            • +
                                            • HTTPQuery
                                            • +
                                            • JSONApiResponse
                                            • +
                                            • Middleware
                                            • +
                                            • ModelPropertyNaming
                                            • +
                                            • RequestContext
                                            • +
                                            • RequestOpts
                                            • +
                                            • RequiredError
                                            • +
                                            • ResponseContext
                                            • +
                                            • ResponseTransformer
                                            • +
                                            • TextApiResponse
                                            • +
                                            • VoidApiResponse
                                            • +
                                            • abstract
                                            • +
                                            • await
                                            • +
                                            • boolean
                                            • +
                                            • break
                                            • +
                                            • byte
                                            • +
                                            • case
                                            • +
                                            • catch
                                            • +
                                            • char
                                            • +
                                            • class
                                            • +
                                            • configuration
                                            • +
                                            • const
                                            • +
                                            • continue
                                            • +
                                            • debugger
                                            • +
                                            • default
                                            • +
                                            • delete
                                            • +
                                            • do
                                            • +
                                            • double
                                            • +
                                            • else
                                            • +
                                            • enum
                                            • +
                                            • exists
                                            • +
                                            • export
                                            • +
                                            • extends
                                            • +
                                            • false
                                            • +
                                            • final
                                            • +
                                            • finally
                                            • +
                                            • float
                                            • +
                                            • for
                                            • +
                                            • formParams
                                            • +
                                            • function
                                            • +
                                            • goto
                                            • +
                                            • headerParams
                                            • +
                                            • if
                                            • +
                                            • implements
                                            • +
                                            • import
                                            • +
                                            • in
                                            • +
                                            • instanceof
                                            • +
                                            • int
                                            • +
                                            • interface
                                            • +
                                            • let
                                            • +
                                            • long
                                            • +
                                            • native
                                            • +
                                            • new
                                            • +
                                            • null
                                            • +
                                            • package
                                            • +
                                            • private
                                            • +
                                            • protected
                                            • +
                                            • public
                                            • +
                                            • queryParameters
                                            • +
                                            • requestOptions
                                            • +
                                            • return
                                            • +
                                            • short
                                            • +
                                            • static
                                            • +
                                            • super
                                            • +
                                            • switch
                                            • +
                                            • synchronized
                                            • +
                                            • this
                                            • +
                                            • throw
                                            • +
                                            • transient
                                            • +
                                            • true
                                            • +
                                            • try
                                            • +
                                            • typeof
                                            • +
                                            • useFormData
                                            • +
                                            • var
                                            • +
                                            • varLocalDeferred
                                            • +
                                            • varLocalPath
                                            • +
                                            • void
                                            • +
                                            • volatile
                                            • +
                                            • while
                                            • +
                                            • with
                                            • +
                                            • yield
                                            • +
                                            diff --git a/docs/generators/typescript-inversify.md b/docs/generators/typescript-inversify.md index 3acc05d8b7..c3bf2d710f 100644 --- a/docs/generators/typescript-inversify.md +++ b/docs/generators/typescript-inversify.md @@ -5,18 +5,126 @@ sidebar_label: typescript-inversify | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name| |camelCase| -|supportsES6|Generate code that conforms to ES6.| |false| |npmName|The name under which you want to publish generated npm package. Required to generate a full package| |null| -|npmVersion|The version of your npm package. If not provided, using the version from the OpenAPI specification file.| |1.0.0| -|snapshot|When setting this property to true, the version will be suffixed with -SNAPSHOT.yyyyMMddHHmm| |false| |npmRepository|Use this property to set an url your private npmRepo in the package.json| |null| -|withInterfaces|Setting this property to true will generate interfaces next to the default class implementations.| |false| +|npmVersion|The version of your npm package. If not provided, using the version from the OpenAPI specification file.| |1.0.0| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|snapshot|When setting this property to true, the version will be suffixed with -SNAPSHOT.yyyyMMddHHmm| |false| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| +|supportsES6|Generate code that conforms to ES6.| |false| +|taggedUnions|Use discriminators to create tagged unions instead of extending interfaces.| |false| |usePromise|Setting this property to use promise instead of observable inside every service.| |false| |useRxJS6|Setting this property to use rxjs 6 instead of rxjs 5.| |false| -|taggedUnions|Use discriminators to create tagged unions instead of extending interfaces.| |false| +|withInterfaces|Setting this property to true will generate interfaces next to the default class implementations.| |false| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | +|array|Array| + + +## LANGUAGE PRIMITIVES + +
                                            • Array
                                            • +
                                            • Blob
                                            • +
                                            • Boolean
                                            • +
                                            • Date
                                            • +
                                            • Double
                                            • +
                                            • Error
                                            • +
                                            • File
                                            • +
                                            • Float
                                            • +
                                            • Integer
                                            • +
                                            • Long
                                            • +
                                            • Map
                                            • +
                                            • Object
                                            • +
                                            • String
                                            • +
                                            • any
                                            • +
                                            • boolean
                                            • +
                                            • number
                                            • +
                                            • object
                                            • +
                                            • string
                                            • +
                                            + +## RESERVED WORDS + +
                                            • abstract
                                            • +
                                            • await
                                            • +
                                            • boolean
                                            • +
                                            • break
                                            • +
                                            • byte
                                            • +
                                            • case
                                            • +
                                            • catch
                                            • +
                                            • char
                                            • +
                                            • class
                                            • +
                                            • const
                                            • +
                                            • continue
                                            • +
                                            • debugger
                                            • +
                                            • default
                                            • +
                                            • delete
                                            • +
                                            • do
                                            • +
                                            • double
                                            • +
                                            • else
                                            • +
                                            • enum
                                            • +
                                            • export
                                            • +
                                            • extends
                                            • +
                                            • false
                                            • +
                                            • final
                                            • +
                                            • finally
                                            • +
                                            • float
                                            • +
                                            • for
                                            • +
                                            • formParams
                                            • +
                                            • function
                                            • +
                                            • goto
                                            • +
                                            • headerParams
                                            • +
                                            • if
                                            • +
                                            • implements
                                            • +
                                            • import
                                            • +
                                            • in
                                            • +
                                            • instanceof
                                            • +
                                            • int
                                            • +
                                            • interface
                                            • +
                                            • let
                                            • +
                                            • long
                                            • +
                                            • map
                                            • +
                                            • native
                                            • +
                                            • new
                                            • +
                                            • null
                                            • +
                                            • package
                                            • +
                                            • private
                                            • +
                                            • protected
                                            • +
                                            • public
                                            • +
                                            • queryParameters
                                            • +
                                            • requestOptions
                                            • +
                                            • return
                                            • +
                                            • short
                                            • +
                                            • static
                                            • +
                                            • super
                                            • +
                                            • switch
                                            • +
                                            • synchronized
                                            • +
                                            • this
                                            • +
                                            • throw
                                            • +
                                            • transient
                                            • +
                                            • true
                                            • +
                                            • try
                                            • +
                                            • typeof
                                            • +
                                            • useFormData
                                            • +
                                            • var
                                            • +
                                            • varLocalDeferred
                                            • +
                                            • varLocalPath
                                            • +
                                            • void
                                            • +
                                            • volatile
                                            • +
                                            • while
                                            • +
                                            • with
                                            • +
                                            • yield
                                            • +
                                            diff --git a/docs/generators/typescript-jquery.md b/docs/generators/typescript-jquery.md index da4df1c90a..07d320ffe8 100644 --- a/docs/generators/typescript-jquery.md +++ b/docs/generators/typescript-jquery.md @@ -5,15 +5,121 @@ sidebar_label: typescript-jquery | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| -|modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name| |camelCase| -|supportsES6|Generate code that conforms to ES6.| |false| -|npmName|The name under which you want to publish generated npm package. Required to generate a full package| |null| -|npmVersion|The version of your npm package. If not provided, using the version from the OpenAPI specification file.| |1.0.0| -|snapshot|When setting this property to true, the version will be suffixed with -SNAPSHOT.yyyyMMddHHmm| |false| -|npmRepository|Use this property to set an url your private npmRepo in the package.json| |null| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |jqueryAlreadyImported|When using this in legacy app using mix of typescript and javascript, this will only declare jquery and not import it| |false| +|modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name| |camelCase| +|npmName|The name under which you want to publish generated npm package. Required to generate a full package| |null| +|npmRepository|Use this property to set an url your private npmRepo in the package.json| |null| +|npmVersion|The version of your npm package. If not provided, using the version from the OpenAPI specification file.| |1.0.0| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|snapshot|When setting this property to true, the version will be suffixed with -SNAPSHOT.yyyyMMddHHmm| |false| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| +|supportsES6|Generate code that conforms to ES6.| |false| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | +|array|Array| + + +## LANGUAGE PRIMITIVES + +
                                            • Array
                                            • +
                                            • Boolean
                                            • +
                                            • Date
                                            • +
                                            • Double
                                            • +
                                            • Error
                                            • +
                                            • File
                                            • +
                                            • Float
                                            • +
                                            • Integer
                                            • +
                                            • Long
                                            • +
                                            • Map
                                            • +
                                            • Object
                                            • +
                                            • String
                                            • +
                                            • any
                                            • +
                                            • boolean
                                            • +
                                            • number
                                            • +
                                            • object
                                            • +
                                            • string
                                            • +
                                            + +## RESERVED WORDS + +
                                            • abstract
                                            • +
                                            • await
                                            • +
                                            • boolean
                                            • +
                                            • break
                                            • +
                                            • byte
                                            • +
                                            • case
                                            • +
                                            • catch
                                            • +
                                            • char
                                            • +
                                            • class
                                            • +
                                            • const
                                            • +
                                            • continue
                                            • +
                                            • debugger
                                            • +
                                            • default
                                            • +
                                            • delete
                                            • +
                                            • do
                                            • +
                                            • double
                                            • +
                                            • else
                                            • +
                                            • enum
                                            • +
                                            • export
                                            • +
                                            • extends
                                            • +
                                            • false
                                            • +
                                            • final
                                            • +
                                            • finally
                                            • +
                                            • float
                                            • +
                                            • for
                                            • +
                                            • formParams
                                            • +
                                            • function
                                            • +
                                            • goto
                                            • +
                                            • headerParams
                                            • +
                                            • if
                                            • +
                                            • implements
                                            • +
                                            • import
                                            • +
                                            • in
                                            • +
                                            • instanceof
                                            • +
                                            • int
                                            • +
                                            • interface
                                            • +
                                            • let
                                            • +
                                            • long
                                            • +
                                            • native
                                            • +
                                            • new
                                            • +
                                            • null
                                            • +
                                            • package
                                            • +
                                            • private
                                            • +
                                            • protected
                                            • +
                                            • public
                                            • +
                                            • queryParameters
                                            • +
                                            • requestOptions
                                            • +
                                            • return
                                            • +
                                            • short
                                            • +
                                            • static
                                            • +
                                            • super
                                            • +
                                            • switch
                                            • +
                                            • synchronized
                                            • +
                                            • this
                                            • +
                                            • throw
                                            • +
                                            • transient
                                            • +
                                            • true
                                            • +
                                            • try
                                            • +
                                            • typeof
                                            • +
                                            • useFormData
                                            • +
                                            • var
                                            • +
                                            • varLocalDeferred
                                            • +
                                            • varLocalPath
                                            • +
                                            • void
                                            • +
                                            • volatile
                                            • +
                                            • while
                                            • +
                                            • with
                                            • +
                                            • yield
                                            • +
                                            diff --git a/docs/generators/typescript-node.md b/docs/generators/typescript-node.md index aea7c2a40c..331905fd5c 100644 --- a/docs/generators/typescript-node.md +++ b/docs/generators/typescript-node.md @@ -5,14 +5,124 @@ sidebar_label: typescript-node | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name| |camelCase| -|supportsES6|Generate code that conforms to ES6.| |false| |npmName|The name under which you want to publish generated npm package. Required to generate a full package| |null| -|npmVersion|The version of your npm package. If not provided, using the version from the OpenAPI specification file.| |1.0.0| -|snapshot|When setting this property to true, the version will be suffixed with -SNAPSHOT.yyyyMMddHHmm| |false| |npmRepository|Use this property to set an url your private npmRepo in the package.json| |null| +|npmVersion|The version of your npm package. If not provided, using the version from the OpenAPI specification file.| |1.0.0| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|snapshot|When setting this property to true, the version will be suffixed with -SNAPSHOT.yyyyMMddHHmm| |false| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| +|supportsES6|Generate code that conforms to ES6.| |false| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | +|array|Array| + + +## LANGUAGE PRIMITIVES + +
                                            • Array
                                            • +
                                            • Boolean
                                            • +
                                            • Buffer
                                            • +
                                            • Date
                                            • +
                                            • Double
                                            • +
                                            • Error
                                            • +
                                            • File
                                            • +
                                            • Float
                                            • +
                                            • Integer
                                            • +
                                            • Long
                                            • +
                                            • Map
                                            • +
                                            • Object
                                            • +
                                            • ReadStream
                                            • +
                                            • RequestDetailedFile
                                            • +
                                            • RequestFile
                                            • +
                                            • String
                                            • +
                                            • any
                                            • +
                                            • boolean
                                            • +
                                            • number
                                            • +
                                            • object
                                            • +
                                            • string
                                            • +
                                            + +## RESERVED WORDS + +
                                            • abstract
                                            • +
                                            • await
                                            • +
                                            • boolean
                                            • +
                                            • break
                                            • +
                                            • byte
                                            • +
                                            • case
                                            • +
                                            • catch
                                            • +
                                            • char
                                            • +
                                            • class
                                            • +
                                            • const
                                            • +
                                            • continue
                                            • +
                                            • debugger
                                            • +
                                            • default
                                            • +
                                            • delete
                                            • +
                                            • do
                                            • +
                                            • double
                                            • +
                                            • else
                                            • +
                                            • enum
                                            • +
                                            • export
                                            • +
                                            • extends
                                            • +
                                            • false
                                            • +
                                            • final
                                            • +
                                            • finally
                                            • +
                                            • float
                                            • +
                                            • for
                                            • +
                                            • formParams
                                            • +
                                            • function
                                            • +
                                            • goto
                                            • +
                                            • headerParams
                                            • +
                                            • if
                                            • +
                                            • implements
                                            • +
                                            • import
                                            • +
                                            • in
                                            • +
                                            • instanceof
                                            • +
                                            • int
                                            • +
                                            • interface
                                            • +
                                            • let
                                            • +
                                            • long
                                            • +
                                            • native
                                            • +
                                            • new
                                            • +
                                            • null
                                            • +
                                            • package
                                            • +
                                            • private
                                            • +
                                            • protected
                                            • +
                                            • public
                                            • +
                                            • queryParameters
                                            • +
                                            • requestOptions
                                            • +
                                            • return
                                            • +
                                            • short
                                            • +
                                            • static
                                            • +
                                            • super
                                            • +
                                            • switch
                                            • +
                                            • synchronized
                                            • +
                                            • this
                                            • +
                                            • throw
                                            • +
                                            • transient
                                            • +
                                            • true
                                            • +
                                            • try
                                            • +
                                            • typeof
                                            • +
                                            • useFormData
                                            • +
                                            • var
                                            • +
                                            • varLocalDeferred
                                            • +
                                            • varLocalPath
                                            • +
                                            • void
                                            • +
                                            • volatile
                                            • +
                                            • while
                                            • +
                                            • with
                                            • +
                                            • yield
                                            • +
                                            diff --git a/docs/generators/typescript-redux-query.md b/docs/generators/typescript-redux-query.md index 1f4c0850ba..1bdb95c142 100644 --- a/docs/generators/typescript-redux-query.md +++ b/docs/generators/typescript-redux-query.md @@ -5,16 +5,145 @@ sidebar_label: typescript-redux-query | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name| |camelCase| -|supportsES6|Generate code that conforms to ES6.| |false| |npmName|The name under which you want to publish generated npm package. Required to generate a full package| |null| -|npmVersion|The version of your npm package. If not provided, using the version from the OpenAPI specification file.| |1.0.0| -|snapshot|When setting this property to true, the version will be suffixed with -SNAPSHOT.yyyyMMddHHmm| |false| |npmRepository|Use this property to set an url your private npmRepo in the package.json| |null| -|withInterfaces|Setting this property to true will generate interfaces next to the default class implementations.| |false| +|npmVersion|The version of your npm package. If not provided, using the version from the OpenAPI specification file.| |1.0.0| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|snapshot|When setting this property to true, the version will be suffixed with -SNAPSHOT.yyyyMMddHHmm| |false| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| +|supportsES6|Generate code that conforms to ES6.| |false| |useSingleRequestParameter|Setting this property to true will generate functions with a single argument containing all API endpoint parameters instead of one argument per parameter.| |true| +|withInterfaces|Setting this property to true will generate interfaces next to the default class implementations.| |false| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | +|array|Array| + + +## LANGUAGE PRIMITIVES + +
                                            • Array
                                            • +
                                            • Boolean
                                            • +
                                            • Date
                                            • +
                                            • Double
                                            • +
                                            • Error
                                            • +
                                            • File
                                            • +
                                            • Float
                                            • +
                                            • Integer
                                            • +
                                            • Long
                                            • +
                                            • Map
                                            • +
                                            • Object
                                            • +
                                            • String
                                            • +
                                            • any
                                            • +
                                            • boolean
                                            • +
                                            • number
                                            • +
                                            • object
                                            • +
                                            • string
                                            • +
                                            + +## RESERVED WORDS + +
                                            • ApiResponse
                                            • +
                                            • BASE_PATH
                                            • +
                                            • BaseAPI
                                            • +
                                            • BlobApiResponse
                                            • +
                                            • COLLECTION_FORMATS
                                            • +
                                            • Configuration
                                            • +
                                            • ConfigurationParameters
                                            • +
                                            • HTTPBody
                                            • +
                                            • HTTPHeaders
                                            • +
                                            • HTTPMethod
                                            • +
                                            • HTTPQuery
                                            • +
                                            • JSONApiResponse
                                            • +
                                            • Middleware
                                            • +
                                            • ModelPropertyNaming
                                            • +
                                            • RequestContext
                                            • +
                                            • RequestOpts
                                            • +
                                            • RequiredError
                                            • +
                                            • ResponseContext
                                            • +
                                            • ResponseTransformer
                                            • +
                                            • TextApiResponse
                                            • +
                                            • VoidApiResponse
                                            • +
                                            • abstract
                                            • +
                                            • await
                                            • +
                                            • boolean
                                            • +
                                            • break
                                            • +
                                            • byte
                                            • +
                                            • case
                                            • +
                                            • catch
                                            • +
                                            • char
                                            • +
                                            • class
                                            • +
                                            • configuration
                                            • +
                                            • const
                                            • +
                                            • continue
                                            • +
                                            • debugger
                                            • +
                                            • default
                                            • +
                                            • delete
                                            • +
                                            • do
                                            • +
                                            • double
                                            • +
                                            • else
                                            • +
                                            • enum
                                            • +
                                            • exists
                                            • +
                                            • export
                                            • +
                                            • extends
                                            • +
                                            • false
                                            • +
                                            • final
                                            • +
                                            • finally
                                            • +
                                            • float
                                            • +
                                            • for
                                            • +
                                            • formParams
                                            • +
                                            • function
                                            • +
                                            • goto
                                            • +
                                            • headerParams
                                            • +
                                            • if
                                            • +
                                            • implements
                                            • +
                                            • import
                                            • +
                                            • in
                                            • +
                                            • instanceof
                                            • +
                                            • int
                                            • +
                                            • interface
                                            • +
                                            • let
                                            • +
                                            • long
                                            • +
                                            • native
                                            • +
                                            • new
                                            • +
                                            • null
                                            • +
                                            • package
                                            • +
                                            • private
                                            • +
                                            • protected
                                            • +
                                            • public
                                            • +
                                            • queryParameters
                                            • +
                                            • requestOptions
                                            • +
                                            • return
                                            • +
                                            • short
                                            • +
                                            • static
                                            • +
                                            • super
                                            • +
                                            • switch
                                            • +
                                            • synchronized
                                            • +
                                            • this
                                            • +
                                            • throw
                                            • +
                                            • transient
                                            • +
                                            • true
                                            • +
                                            • try
                                            • +
                                            • typeof
                                            • +
                                            • useFormData
                                            • +
                                            • var
                                            • +
                                            • varLocalDeferred
                                            • +
                                            • varLocalPath
                                            • +
                                            • void
                                            • +
                                            • volatile
                                            • +
                                            • while
                                            • +
                                            • with
                                            • +
                                            • yield
                                            • +
                                            diff --git a/docs/generators/typescript-rxjs.md b/docs/generators/typescript-rxjs.md index a2473ca26f..3d8bf8a331 100644 --- a/docs/generators/typescript-rxjs.md +++ b/docs/generators/typescript-rxjs.md @@ -5,15 +5,140 @@ sidebar_label: typescript-rxjs | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name| |camelCase| -|supportsES6|Generate code that conforms to ES6.| |false| |npmName|The name under which you want to publish generated npm package. Required to generate a full package| |null| -|npmVersion|The version of your npm package. If not provided, using the version from the OpenAPI specification file.| |1.0.0| -|snapshot|When setting this property to true, the version will be suffixed with -SNAPSHOT.yyyyMMddHHmm| |false| |npmRepository|Use this property to set an url your private npmRepo in the package.json| |null| +|npmVersion|The version of your npm package. If not provided, using the version from the OpenAPI specification file.| |1.0.0| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|snapshot|When setting this property to true, the version will be suffixed with -SNAPSHOT.yyyyMMddHHmm| |false| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| +|supportsES6|Generate code that conforms to ES6.| |false| |withInterfaces|Setting this property to true will generate interfaces next to the default class implementations.| |false| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | +|array|Array| + + +## LANGUAGE PRIMITIVES + +
                                            • Array
                                            • +
                                            • Blob
                                            • +
                                            • Boolean
                                            • +
                                            • Date
                                            • +
                                            • Double
                                            • +
                                            • Error
                                            • +
                                            • File
                                            • +
                                            • Float
                                            • +
                                            • Integer
                                            • +
                                            • Long
                                            • +
                                            • Map
                                            • +
                                            • Object
                                            • +
                                            • String
                                            • +
                                            • any
                                            • +
                                            • boolean
                                            • +
                                            • number
                                            • +
                                            • object
                                            • +
                                            • string
                                            • +
                                            + +## RESERVED WORDS + +
                                            • AjaxRequest
                                            • +
                                            • AjaxResponse
                                            • +
                                            • BASE_PATH
                                            • +
                                            • BaseAPI
                                            • +
                                            • COLLECTION_FORMATS
                                            • +
                                            • Configuration
                                            • +
                                            • ConfigurationParameters
                                            • +
                                            • HttpBody
                                            • +
                                            • HttpHeaders
                                            • +
                                            • HttpMethod
                                            • +
                                            • HttpQuery
                                            • +
                                            • Middleware
                                            • +
                                            • ModelPropertyNaming
                                            • +
                                            • RequestArgs
                                            • +
                                            • RequestOpts
                                            • +
                                            • RequiredError
                                            • +
                                            • ResponseArgs
                                            • +
                                            • abstract
                                            • +
                                            • await
                                            • +
                                            • boolean
                                            • +
                                            • break
                                            • +
                                            • byte
                                            • +
                                            • case
                                            • +
                                            • catch
                                            • +
                                            • char
                                            • +
                                            • class
                                            • +
                                            • const
                                            • +
                                            • continue
                                            • +
                                            • debugger
                                            • +
                                            • default
                                            • +
                                            • delete
                                            • +
                                            • do
                                            • +
                                            • double
                                            • +
                                            • else
                                            • +
                                            • enum
                                            • +
                                            • exists
                                            • +
                                            • export
                                            • +
                                            • extends
                                            • +
                                            • false
                                            • +
                                            • final
                                            • +
                                            • finally
                                            • +
                                            • float
                                            • +
                                            • for
                                            • +
                                            • formParams
                                            • +
                                            • function
                                            • +
                                            • goto
                                            • +
                                            • headerParams
                                            • +
                                            • if
                                            • +
                                            • implements
                                            • +
                                            • import
                                            • +
                                            • in
                                            • +
                                            • instanceof
                                            • +
                                            • int
                                            • +
                                            • interface
                                            • +
                                            • let
                                            • +
                                            • long
                                            • +
                                            • native
                                            • +
                                            • new
                                            • +
                                            • null
                                            • +
                                            • package
                                            • +
                                            • private
                                            • +
                                            • protected
                                            • +
                                            • public
                                            • +
                                            • queryParameters
                                            • +
                                            • requestOptions
                                            • +
                                            • return
                                            • +
                                            • short
                                            • +
                                            • static
                                            • +
                                            • super
                                            • +
                                            • switch
                                            • +
                                            • synchronized
                                            • +
                                            • this
                                            • +
                                            • throw
                                            • +
                                            • transient
                                            • +
                                            • true
                                            • +
                                            • try
                                            • +
                                            • typeof
                                            • +
                                            • useFormData
                                            • +
                                            • var
                                            • +
                                            • varLocalDeferred
                                            • +
                                            • varLocalPath
                                            • +
                                            • void
                                            • +
                                            • volatile
                                            • +
                                            • while
                                            • +
                                            • with
                                            • +
                                            • yield
                                            • +
                                            diff --git a/docs/installation.md b/docs/installation.md index 0c555d1350..60105c9a9b 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -20,11 +20,11 @@ npm install @openapitools/openapi-generator-cli -g ``` To install a specific version of the tool, pass the version during installation: - + ```bash -npm install @openapitools/openapi-generator-cli@cli-3.3.4 -g +npm install @openapitools/openapi-generator-cli@cli-4.2.2 -g ``` - + To install the tool as a dev dependency in your current project: ```bash @@ -77,21 +77,23 @@ docker run --rm \ > **Platform(s)**: Linux, macOS, Windows + If you're looking for the latest stable version, you can grab it directly from Maven.org (Java 8 runtime at a minimum): -JAR location: `http://central.maven.org/maven2/org/openapitools/openapi-generator-cli/3.3.4/openapi-generator-cli-3.3.4.jar` +JAR location: `https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/4.2.2/openapi-generator-cli-4.2.2.jar` For **Mac/Linux** users: ```bash -wget http://central.maven.org/maven2/org/openapitools/openapi-generator-cli/3.3.4/openapi-generator-cli-3.3.4.jar -O openapi-generator-cli.jar +wget https//repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/4.2.2/openapi-generator-cli-4.2.2.jar -O openapi-generator-cli.jar ``` For **Windows** users, you will need to install [wget](http://gnuwin32.sourceforge.net/packages/wget.htm) or you can use Invoke-WebRequest in PowerShell (3.0+), e.g. ``` -Invoke-WebRequest -OutFile openapi-generator-cli.jar http://central.maven.org/maven2/org/openapitools/openapi-generator-cli/3.3.4/openapi-generator-cli-3.3.4.jar +Invoke-WebRequest -OutFile openapi-generator-cli.jar https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/4.2.2/openapi-generator-cli-4.2.2.jar ``` + After downloading the JAR, run `java -jar openapi-generator-cli.jar help` to show the usage. diff --git a/docs/plugins.md b/docs/plugins.md index 923d1ea24e..2b46257e39 100644 --- a/docs/plugins.md +++ b/docs/plugins.md @@ -51,7 +51,7 @@ To include in your project, add the following to `build.gradle`: buildscript { repositories { mavenLocal() - mavenCentral() + maven { url "https://repo1.maven.org/maven2" } } dependencies { classpath "org.openapitools:openapi-generator-gradle-plugin:3.3.4" @@ -96,4 +96,4 @@ openApiGenerate { dateLibrary: "java8" ] } -``` \ No newline at end of file +``` diff --git a/docs/templating.md b/docs/templating.md index 04c512e7c1..a2f5b2335b 100644 --- a/docs/templating.md +++ b/docs/templating.md @@ -150,7 +150,7 @@ index 04a9d55..7a93c50 100644 @@ -140,9 +142,18 @@ ext { jersey_version = "1.19.4" jodatime_version = "2.9.9" - junit_version = "4.12" + junit_version = "4.13" + aspectjVersion = '1.9.0' } diff --git a/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/OpenAPIGenerator.java b/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/OpenAPIGenerator.java index 5806bc6312..8770c48a35 100644 --- a/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/OpenAPIGenerator.java +++ b/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/OpenAPIGenerator.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/CompletionCommand.java b/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/CompletionCommand.java index 2ffa120835..369137fa9f 100644 --- a/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/CompletionCommand.java +++ b/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/CompletionCommand.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/ConfigHelp.java b/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/ConfigHelp.java index dfd9296eef..8e55421c7b 100644 --- a/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/ConfigHelp.java +++ b/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/ConfigHelp.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -30,19 +30,24 @@ import org.slf4j.LoggerFactory; import java.io.*; import java.nio.charset.StandardCharsets; import java.nio.file.Paths; +import java.util.Locale; import java.util.Map; +import java.util.TreeMap; +import java.util.function.Function; +import java.util.stream.Collectors; import static org.apache.commons.lang3.StringEscapeUtils.escapeHtml4; import static org.apache.commons.lang3.StringUtils.isEmpty; +@SuppressWarnings("unused") @Command(name = "config-help", description = "Config help for chosen lang") public class ConfigHelp implements Runnable { private static final Logger LOGGER = LoggerFactory.getLogger(Generate.class); - public static final String FORMAT_TEXT = "text"; - public static final String FORMAT_MARKDOWN = "markdown"; - public static final String FORMAT_YAMLSAMPLE = "yamlsample"; + private static final String FORMAT_TEXT = "text"; + private static final String FORMAT_MARKDOWN = "markdown"; + private static final String FORMAT_YAMLSAMPLE = "yamlsample"; @Option(name = {"-g", "--generator-name"}, title = "generator name", description = "generator to get config help for") @@ -61,18 +66,41 @@ public class ConfigHelp implements Runnable { FORMAT_TEXT, FORMAT_MARKDOWN, FORMAT_YAMLSAMPLE}) private String format; + @Option(name = {"--import-mappings"}, title = "import mappings", description = "displays the default import mappings (types and aliases, and what imports they will pull into the template)") + private Boolean importMappings; + + @Option(name = {"--language-specific-primitive"}, title = "language specific primitives", description = "displays the language specific primitives (types which require no additional imports, or which may conflict with user defined model names)") + private Boolean languageSpecificPrimitives; + + @Option(name = {"--reserved-words"}, title = "language specific reserved words", description = "displays the reserved words which may result in renamed model or property names") + private Boolean reservedWords; + + @Option(name = {"--instantiation-types"}, title = "instantiation types", description = "displays types used to instantiate simple type/alias names") + private Boolean instantiationTypes; + @Option(name = { "--markdown-header"}, title = "markdown header", description = "When format=markdown, include this option to write out markdown headers (e.g. for docusaurus).") private Boolean markdownHeader; + @Option(name = {"--full-details"}, title = "full generator details", description = "displays CLI options as well as other configs/mappings (implies --instantiation-types, --reserved-words, --language-specific-primitives, --import-mappings, --supporting-files)") + private Boolean fullDetails; + private String newline = System.lineSeparator(); - @Override public void run() { + @Override + public void run() { if (isEmpty(generatorName)) { LOGGER.error("[error] A generator name (--generator-name / -g) is required."); System.exit(1); } + if (Boolean.TRUE.equals(fullDetails)) { + instantiationTypes = Boolean.TRUE; + reservedWords = Boolean.TRUE; + languageSpecificPrimitives = Boolean.TRUE; + importMappings = Boolean.TRUE; + } + try { StringBuilder sb = new StringBuilder(); CodegenConfig config = CodegenConfigLoader.forName(generatorName); @@ -97,9 +125,9 @@ public class ConfigHelp implements Runnable { if (!isEmpty(outputFile)) { File out = Paths.get(outputFile).toFile(); - //noinspection ResultOfMethodCallIgnored File parentFolder = out.getParentFile(); if (parentFolder != null && parentFolder.isDirectory()) { + //noinspection ResultOfMethodCallIgnored parentFolder.mkdirs(); } @@ -119,6 +147,135 @@ public class ConfigHelp implements Runnable { } } + private void generateMarkdownHelp(StringBuilder sb, CodegenConfig config) { + if (Boolean.TRUE.equals(markdownHeader)) { + sb.append("---").append(newline); + sb.append("title: Config Options for ").append(generatorName).append(newline); + sb.append("sidebar_label: ").append(generatorName).append(newline); + sb.append("---").append(newline); + } else { + sb.append(newline); + sb.append("## CONFIG OPTIONS"); + + if (Boolean.TRUE.equals(namedHeader)) { + sb.append(" for ").append(generatorName).append("").append(newline); + } + } + + sb.append(newline); + + sb.append("| Option | Description | Values | Default |").append(newline); + sb.append("| ------ | ----------- | ------ | ------- |").append(newline); + + Map langCliOptions = config.cliOptions() + .stream() + .collect(Collectors.toMap(CliOption::getOpt, Function.identity(), (a, b) -> { + throw new IllegalStateException(String.format(Locale.ROOT, "Duplicated options! %s and %s", a.getOpt(), b.getOpt())); + }, TreeMap::new)); + + langCliOptions.forEach((key, langCliOption) -> { + // start + sb.append("|"); + + // option + sb.append(escapeHtml4(key)).append("|"); + // description + sb.append(escapeHtml4(langCliOption.getDescription())).append("|"); + + // values + Map enums = langCliOption.getEnum(); + if (enums != null) { + sb.append("
                                            "); + + for (Map.Entry entry : enums.entrySet()) { + sb.append("
                                            **").append(escapeHtml4(entry.getKey())).append("**
                                            "); + sb.append("
                                            ").append(escapeHtml4(entry.getValue())).append("
                                            "); + } + + sb.append("
                                            "); + } else { + sb.append(" "); + } + sb.append("|"); + + // default + sb.append(escapeHtml4(langCliOption.getDefault())).append("|"); + + sb.append(newline); + }); + + + if (Boolean.TRUE.equals(importMappings)) { + sb.append(newline); + sb.append("## IMPORT MAPPING"); + sb.append(newline); + sb.append(newline); + + sb.append("| Type/Alias | Imports |").append(newline); + sb.append("| ---------- | ------- |").append(newline); + + config.importMapping() + .entrySet() + .stream() + .sorted(Map.Entry.comparingByKey()) + .forEachOrdered(kvp -> { + sb.append("|").append(escapeHtml4(kvp.getKey())).append("|").append(escapeHtml4(kvp.getValue())).append("|"); + sb.append(newline); + }); + + sb.append(newline); + } + + if (Boolean.TRUE.equals(instantiationTypes)) { + sb.append(newline); + sb.append("## INSTANTIATION TYPES"); + sb.append(newline); + sb.append(newline); + + sb.append("| Type/Alias | Instantiated By |").append(newline); + sb.append("| ---------- | --------------- |").append(newline); + + config.instantiationTypes() + .entrySet() + .stream() + .sorted(Map.Entry.comparingByKey()) + .forEachOrdered(kvp -> { + sb.append("|").append(escapeHtml4(kvp.getKey())).append("|").append(escapeHtml4(kvp.getValue())).append("|"); + sb.append(newline); + }); + + sb.append(newline); + } + + if (Boolean.TRUE.equals(languageSpecificPrimitives)) { + sb.append(newline); + sb.append("## LANGUAGE PRIMITIVES"); + sb.append(newline); + sb.append(newline); + sb.append("
                                              "); + config.languageSpecificPrimitives() + .stream() + .sorted(String::compareTo) + .forEach(s -> sb.append("
                                            • ").append(escapeHtml4(s)).append("
                                            • ").append(newline)); + sb.append("
                                            "); + sb.append(newline); + } + + if (Boolean.TRUE.equals(reservedWords)) { + sb.append(newline); + sb.append("## RESERVED WORDS"); + sb.append(newline); + sb.append(newline); + sb.append("
                                              "); + config.reservedWords() + .stream() + .sorted(String::compareTo) + .forEach(s -> sb.append("
                                            • ").append(escapeHtml4(s)).append("
                                            • ").append(newline)); + sb.append("
                                            "); + sb.append(newline); + } + } + private void generateYamlSample(StringBuilder sb, CodegenConfig config) { for (CliOption langCliOption : config.cliOptions()) { @@ -147,58 +304,6 @@ public class ConfigHelp implements Runnable { } } - private void generateMarkdownHelp(StringBuilder sb, CodegenConfig config) { - if (Boolean.TRUE.equals(markdownHeader)) { - sb.append("---").append(newline); - sb.append("title: Config Options for ").append(generatorName).append(newline); - sb.append("sidebar_label: ").append(generatorName).append(newline); - sb.append("---").append(newline); - } else { - sb.append(newline); - sb.append("## CONFIG OPTIONS"); - - if (Boolean.TRUE.equals(namedHeader)) { - sb.append(" for ").append(generatorName).append("").append(newline); - } - } - - sb.append(newline); - - sb.append("| Option | Description | Values | Default |").append(newline); - sb.append("| ------ | ----------- | ------ | ------- |").append(newline); - - for (CliOption langCliOption : config.cliOptions()) { - // start - sb.append("|"); - - // option - sb.append(escapeHtml4(langCliOption.getOpt())).append("|"); - // description - sb.append(escapeHtml4(langCliOption.getDescription())).append("|"); - - // values - Map enums = langCliOption.getEnum(); - if (enums != null) { - sb.append("
                                            "); - - for (Map.Entry entry : enums.entrySet()) { - sb.append("
                                            **").append(escapeHtml4(entry.getKey())).append("**
                                            "); - sb.append("
                                            ").append(escapeHtml4(entry.getValue())).append("
                                            "); - } - - sb.append("
                                            "); - } else { - sb.append(" "); - } - sb.append("|"); - - // default - sb.append(escapeHtml4(langCliOption.getDefault())).append("|"); - - sb.append(newline); - } - } - private void generatePlainTextHelp(StringBuilder sb, CodegenConfig config) { sb.append(newline); sb.append("CONFIG OPTIONS"); @@ -206,15 +311,129 @@ public class ConfigHelp implements Runnable { sb.append(" for ").append(generatorName).append(newline); } + sb.append(newline); sb.append(newline); - for (CliOption langCliOption : config.cliOptions()) { - sb.append("\t").append(langCliOption.getOpt()); + String optIndent = "\t"; + String optNestedIndent = "\t "; + + Map langCliOptions = config.cliOptions() + .stream() + .collect(Collectors.toMap(CliOption::getOpt, Function.identity(), (a, b) -> { + throw new IllegalStateException(String.format(Locale.ROOT, "Duplicated options! %s and %s", a.getOpt(), b.getOpt())); + }, TreeMap::new)); + + langCliOptions.forEach((key, langCliOption) -> { + sb.append(optIndent).append(key); sb.append(newline); - sb.append("\t ").append(langCliOption.getOptionHelp() - .replaceAll("\n", System.lineSeparator() + "\t ")); + sb.append(optNestedIndent).append(langCliOption.getOptionHelp() + .replaceAll("\n", System.lineSeparator() + optNestedIndent)); sb.append(newline); sb.append(newline); + }); + + if (Boolean.TRUE.equals(importMappings)) { + sb.append(newline); + sb.append("IMPORT MAPPING"); + sb.append(newline); + sb.append(newline); + Map map = config.importMapping() + .entrySet() + .stream() + .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (a, b) -> { + throw new IllegalStateException(String.format(Locale.ROOT, "Duplicated options! %s and %s", a, b)); + }, TreeMap::new)); + writePlainTextFromMap(sb, map, optIndent, optNestedIndent, "Type/Alias", "Imports"); + sb.append(newline); + } + + if (Boolean.TRUE.equals(instantiationTypes)) { + sb.append(newline); + sb.append("INSTANTIATION TYPES"); + sb.append(newline); + sb.append(newline); + Map map = config.instantiationTypes() + .entrySet() + .stream() + .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (a, b) -> { + throw new IllegalStateException(String.format(Locale.ROOT, "Duplicated options! %s and %s", a, b)); + }, TreeMap::new)); + writePlainTextFromMap(sb, map, optIndent, optNestedIndent, "Type/Alias", "Instantiated By"); + sb.append(newline); + } + + if (Boolean.TRUE.equals(languageSpecificPrimitives)) { + sb.append(newline); + sb.append("LANGUAGE PRIMITIVES"); + sb.append(newline); + sb.append(newline); + String[] arr = config.languageSpecificPrimitives().stream().sorted().toArray(String[]::new); + writePlainTextFromArray(sb, arr, optIndent); + sb.append(newline); + } + + if (Boolean.TRUE.equals(reservedWords)) { + sb.append(newline); + sb.append("RESERVED WORDS"); + sb.append(newline); + sb.append(newline); + String[] arr = config.reservedWords().stream().sorted().toArray(String[]::new); + writePlainTextFromArray(sb, arr, optIndent); + sb.append(newline); + } + } + + private void writePlainTextFromMap( + StringBuilder sb, + Map map, + String optIndent, + String optNestedIndent, + @SuppressWarnings("SameParameterValue") String keyHeader, + String valueHeader) { + if (map != null && map.size() > 0) { + int maxKey = keyHeader.length(); + int maxValue = valueHeader.length(); + + for (Map.Entry entry : map.entrySet()) { + String k = entry.getKey(); + String v = entry.getValue(); + maxKey = Math.max(maxKey, k.length()); + maxValue = Math.max(maxValue, v.length()); + } + + String format = "%-" + maxKey + "s\t%-" + maxValue + "s"; + sb.append(optIndent).append(String.format(Locale.ROOT, format, keyHeader, valueHeader)); + sb.append(newline); + sb.append(optIndent).append(String.format(Locale.ROOT, format, StringUtils.repeat("-", maxKey), StringUtils.repeat("-", maxValue))); + map.forEach((key, value) -> { + sb.append(newline); + sb.append(optIndent).append(String.format(Locale.ROOT, format, key, value)); + }); + } else { + sb.append(optIndent).append("None"); + } + } + + private void writePlainTextFromArray(StringBuilder sb, String[] arr, String optIndent) { + if (arr.length > 0) { + // target a width of 20, then take the max up to 40. + int width = 20; + for (String s : arr) { + width = Math.max(width, Math.min(40, s.length())); + } + + // do three columns if possible (assume terminal width ~90), otherwise do two columns. + int columns = width < 30 ? 3 : 2; + String format = "%-" + (90 / columns) + "s"; + for (int i = 0; i < arr.length; i++) { + String current = arr[i]; + sb.append(optIndent).append(String.format(Locale.ROOT, format, current)); + if ((i + 1) % columns == 0) { + sb.append(newline); + } + } + } else { + sb.append(optIndent).append("None"); } } } diff --git a/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/Generate.java b/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/Generate.java index 99080ba9c0..cf8f8a1dd3 100644 --- a/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/Generate.java +++ b/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/Generate.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/GenerateBatch.java b/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/GenerateBatch.java index bbcab6c446..f1e6632b33 100644 --- a/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/GenerateBatch.java +++ b/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/GenerateBatch.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/ListGenerators.java b/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/ListGenerators.java index a9270dc41d..3cab8cf656 100644 --- a/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/ListGenerators.java +++ b/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/ListGenerators.java @@ -25,6 +25,9 @@ public class ListGenerators implements Runnable { @Option(name = {"-d", "--docsite" }, description = "format for docusaurus site output", hidden = true) private Boolean docusaurus = false; + @Option(name = {"--github-nested-index" }, description = "format for github index at docs/generators/README.md", hidden = true) + private Boolean githubNestedIndex = false; + @Option(name = {"-i", "--include" }, description = "comma-separated list of stability indexes to include (value: all,beta,stable,experimental,deprecated). Excludes deprecated by default.", allowedValues = { "all", "beta", "stable", "experimental", "deprecated" }) @@ -85,7 +88,7 @@ public class ListGenerators implements Runnable { .collect(Collectors.toList()); if(!list.isEmpty()) { - if (docusaurus) { + if (docusaurus || githubNestedIndex) { sb.append("## ").append(typeName).append(" generators"); } else { sb.append(typeName).append(" generators:"); @@ -94,9 +97,10 @@ public class ListGenerators implements Runnable { list.forEach(generator -> { GeneratorMetadata meta = generator.getGeneratorMetadata(); - if (docusaurus) { + if (docusaurus || githubNestedIndex) { sb.append("* "); - String id = "generators/" + generator.getName() + ".md"; + String idPrefix = docusaurus ? "generators/" : ""; + String id = idPrefix + generator.getName() + ".md"; sb.append("[").append(generator.getName()); if (meta != null && meta.getStability() != null && meta.getStability() != Stability.STABLE) { diff --git a/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/Meta.java b/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/Meta.java index e16b281d6d..2326dcadf2 100644 --- a/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/Meta.java +++ b/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/Meta.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -36,6 +36,7 @@ import org.slf4j.LoggerFactory; import java.io.File; import java.io.IOException; import java.io.Reader; +import java.nio.charset.StandardCharsets; import java.util.List; import java.util.Map; @@ -159,7 +160,7 @@ public class Meta implements Runnable { LOGGER.info("copying file to {}", outputFile.getAbsolutePath()); } - FileUtils.writeStringToFile(outputFile, formatted); + FileUtils.writeStringToFile(outputFile, formatted, StandardCharsets.UTF_8); return outputFile; } catch (IOException e) { diff --git a/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/Validate.java b/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/Validate.java index 4011a44888..153475f503 100644 --- a/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/Validate.java +++ b/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/Validate.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/Version.java b/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/Version.java index eb6bfa5608..93e2b378a7 100644 --- a/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/Version.java +++ b/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/Version.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator-cli/src/test/java/org/openapitools/codegen/cmd/GenerateTest.java b/modules/openapi-generator-cli/src/test/java/org/openapitools/codegen/cmd/GenerateTest.java index a2304283d6..8f1879dd98 100644 --- a/modules/openapi-generator-cli/src/test/java/org/openapitools/codegen/cmd/GenerateTest.java +++ b/modules/openapi-generator-cli/src/test/java/org/openapitools/codegen/cmd/GenerateTest.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator-cli/src/test/java/org/openapitools/codegen/cmd/utils/OptionUtilsTest.java b/modules/openapi-generator-cli/src/test/java/org/openapitools/codegen/cmd/utils/OptionUtilsTest.java index 143659b556..37c4039423 100644 --- a/modules/openapi-generator-cli/src/test/java/org/openapitools/codegen/cmd/utils/OptionUtilsTest.java +++ b/modules/openapi-generator-cli/src/test/java/org/openapitools/codegen/cmd/utils/OptionUtilsTest.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/api/AbstractTemplatingEngineAdapter.java b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/api/AbstractTemplatingEngineAdapter.java index cc6786bb53..6c568f6ad3 100644 --- a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/api/AbstractTemplatingEngineAdapter.java +++ b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/api/AbstractTemplatingEngineAdapter.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/api/TemplatingEngineAdapter.java b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/api/TemplatingEngineAdapter.java index 7923026782..93b371c963 100644 --- a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/api/TemplatingEngineAdapter.java +++ b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/api/TemplatingEngineAdapter.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/api/TemplatingGenerator.java b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/api/TemplatingGenerator.java index ddafbc0345..57a4d0f3df 100644 --- a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/api/TemplatingGenerator.java +++ b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/api/TemplatingGenerator.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/config/Context.java b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/config/Context.java index 6bd2588ae1..4aceaacb2c 100644 --- a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/config/Context.java +++ b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/config/Context.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/config/GeneratorSettings.java b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/config/GeneratorSettings.java index e0772f8aea..495ac2df1a 100644 --- a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/config/GeneratorSettings.java +++ b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/config/GeneratorSettings.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/config/WorkflowSettings.java b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/config/WorkflowSettings.java index 174109f37b..2bc94188cf 100644 --- a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/config/WorkflowSettings.java +++ b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/config/WorkflowSettings.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/FeatureSet.java b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/FeatureSet.java new file mode 100644 index 0000000000..3d93eefd93 --- /dev/null +++ b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/FeatureSet.java @@ -0,0 +1,530 @@ +/* + * Copyright 2019 OpenAPI-Generator Contributors (https://openapi-generator.tech) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.openapitools.codegen.meta; + +import org.openapitools.codegen.meta.features.*; + +import java.util.Arrays; +import java.util.EnumSet; +import java.util.stream.Collectors; + +/** + * Defines the feature set for a target generator. + */ +@SuppressWarnings({"unused", "WeakerAccess"}) +public class FeatureSet { + public static FeatureSet UNSPECIFIED = FeatureSet.newBuilder().build(); + + private EnumSet clientModificationFeatures; + private EnumSet dataTypeFeatures; + private EnumSet documentationFeatures; + private EnumSet globalFeatures; + private EnumSet schemaSupportFeatures; + private EnumSet parameterFeatures; + private EnumSet securityFeatures; + private EnumSet wireFormatFeatures; + + private FeatureSet(Builder builder) { + if (builder != null) { + clientModificationFeatures = builder.clientModificationFeatures; + dataTypeFeatures = builder.dataTypeFeatures; + documentationFeatures = builder.documentationFeatures; + schemaSupportFeatures = builder.schemaSupportFeatures; + globalFeatures = builder.globalFeatures; + parameterFeatures = builder.parameterFeatures; + securityFeatures = builder.securityFeatures; + wireFormatFeatures = builder.wireFormatFeatures; + } + } + + public Builder modify() { + return FeatureSet.newBuilder(this); + } + + public static Builder newBuilder() { + return new Builder(); + } + + public static Builder newBuilder(FeatureSet copy) { + Builder builder = new Builder(); + if (copy != null) { + builder.clientModificationFeatures = copy.getClientModificationFeatures(); + builder.dataTypeFeatures = copy.getDataTypeFeatures(); + builder.documentationFeatures = copy.getDocumentationFeatures(); + builder.schemaSupportFeatures = copy.getSchemaSupportFeatures(); + builder.globalFeatures = copy.getGlobalFeatures(); + builder.parameterFeatures = copy.getParameterFeatures(); + builder.securityFeatures = copy.getSecurityFeatures(); + builder.wireFormatFeatures = copy.getWireFormatFeatures(); + } + return builder; + } + + /** + * Returns the set of client modification features supported by the generator. + * + * @return A new copy of the defined feature set. Changes to this instance are not promoted. + */ + public EnumSet getClientModificationFeatures() { + if (clientModificationFeatures != null) { + return EnumSet.copyOf(clientModificationFeatures); + } else { + return EnumSet.noneOf(ClientModificationFeature.class); + } + } + + /** + * Returns the set of common data types supported by the generator + * + * @return A new copy of the defined feature set. Changes to this instance are not promoted. + */ + public EnumSet getDataTypeFeatures() { + if (dataTypeFeatures != null) { + return EnumSet.copyOf(dataTypeFeatures); + } else { + return EnumSet.noneOf(DataTypeFeature.class); + } + } + + /** + * Returns the documentation type available in generated output. + * + * @return A new copy of the defined feature set. Changes to this instance are not promoted. + */ + public EnumSet getDocumentationFeatures() { + if (documentationFeatures != null) { + return EnumSet.copyOf(documentationFeatures); + } else { + return EnumSet.noneOf(DocumentationFeature.class); + } + } + + /** + * Returns special circumstances handled by the generator. + * + * @return A new copy of the defined feature set. Changes to this instance are not promoted. + */ + public EnumSet getSchemaSupportFeatures() { + if (schemaSupportFeatures != null) { + return EnumSet.copyOf(schemaSupportFeatures); + } else { + return EnumSet.noneOf(SchemaSupportFeature.class); + } + } + + /** + * Returns the spec features supported "globally" for a document (shared across all operations and/or models). + * + * @return A new copy of the defined feature set. Changes to this instance are not promoted. + */ + public EnumSet getGlobalFeatures() { + if (globalFeatures != null) { + return EnumSet.copyOf(globalFeatures); + } else { + return EnumSet.noneOf(GlobalFeature.class); + } + } + + /** + * Returns the types of parameters supported by endpoints in the generated code. + * + * @return A new copy of the defined feature set. Changes to this instance are not promoted. + */ + public EnumSet getParameterFeatures() { + if (parameterFeatures != null) { + return EnumSet.copyOf(parameterFeatures); + } else { + return EnumSet.noneOf(ParameterFeature.class); + } + } + + /** + * Returns the security features supported in the generated code. + * + * @return A new copy of the defined feature set. Changes to this instance are not promoted. + */ + public EnumSet getSecurityFeatures() { + if (securityFeatures != null) { + return EnumSet.copyOf(securityFeatures); + } else { + return EnumSet.noneOf(SecurityFeature.class); + } + } + + /** + * Returns the wire format options officially supported by the generated code. + * + * @return A new copy of the defined feature set. Changes to this instance are not promoted. + */ + public EnumSet getWireFormatFeatures() { + if (wireFormatFeatures != null) { + return EnumSet.copyOf(wireFormatFeatures); + } else { + return EnumSet.noneOf(WireFormatFeature.class); + } + } + + /** + * {@code FeatureSet} builder static inner class. + */ + public static final class Builder { + private EnumSet clientModificationFeatures; + private EnumSet dataTypeFeatures; + private EnumSet documentationFeatures; + private EnumSet schemaSupportFeatures; + private EnumSet globalFeatures; + private EnumSet parameterFeatures; + private EnumSet securityFeatures; + private EnumSet wireFormatFeatures; + + private Builder() { + this.clientModificationFeatures = EnumSet.noneOf(ClientModificationFeature.class); + this.dataTypeFeatures = EnumSet.noneOf(DataTypeFeature.class); + this.documentationFeatures = EnumSet.noneOf(DocumentationFeature.class); + this.schemaSupportFeatures = EnumSet.noneOf(SchemaSupportFeature.class); + this.parameterFeatures = EnumSet.noneOf(ParameterFeature.class); + this.securityFeatures = EnumSet.noneOf(SecurityFeature.class); + this.globalFeatures = EnumSet.noneOf(GlobalFeature.class); + this.wireFormatFeatures = EnumSet.noneOf(WireFormatFeature.class); + } + + /** + * Sets the {@code clientModificationFeatures} and returns a reference to this Builder so that the methods can be chained together. + * + * @param clientModificationFeatures the {@code clientModificationFeatures} to set + * @return a reference to this Builder + */ + public Builder clientModificationFeatures(EnumSet clientModificationFeatures) { + if (clientModificationFeatures != null) { + this.clientModificationFeatures = clientModificationFeatures; + } else { + this.clientModificationFeatures = EnumSet.noneOf(ClientModificationFeature.class); + } + return this; + } + + /** + * Includes the defined {@link ClientModificationFeature} to the new/existing set of supported features. + * + * @param clientModificationFeature One or more {@code clientModificationFeature} to ensure are included in the set. + * + * @return a reference to this Builder + */ + public Builder includeClientModificationFeatures(ClientModificationFeature... clientModificationFeature) { + this.clientModificationFeatures.addAll(Arrays.stream(clientModificationFeature).collect(Collectors.toList())); + return this; + } + + /** + * Excludes the defined {@link ClientModificationFeature} from the set of supported features. + * + * @param clientModificationFeature One or more {@code clientModificationFeature} to ensure are excluded from the set. + * + * @return a reference to this Builder + */ + public Builder excludeClientModificationFeatures(ClientModificationFeature... clientModificationFeature) { + this.clientModificationFeatures.removeAll(Arrays.stream(clientModificationFeature).collect(Collectors.toList())); + return this; + } + + /** + * Sets the {@code dataTypeFeatures} and returns a reference to this Builder so that the methods can be chained together. + * + * @param dataTypeFeatures the {@code dataTypeFeatures} to set + * @return a reference to this Builder + */ + public Builder dataTypeFeatures(EnumSet dataTypeFeatures) { + if (dataTypeFeatures != null) { + this.dataTypeFeatures = dataTypeFeatures; + } else { + this.dataTypeFeatures = EnumSet.noneOf(DataTypeFeature.class); + } + return this; + } + + /** + * Includes the defined {@link DataTypeFeature} to the new/existing set of supported features. + * + * @param dataTypeFeature One or more {@code dataTypeFeature} to ensure are included in the set. + * + * @return a reference to this Builder + */ + public Builder includeDataTypeFeatures(DataTypeFeature... dataTypeFeature) { + this.dataTypeFeatures.addAll(Arrays.stream(dataTypeFeature).collect(Collectors.toList())); + return this; + } + + /** + * Excludes the defined {@link DataTypeFeature} from the set of supported features. + * + * @param dataTypeFeature One or more {@code dataTypeFeature} to ensure are excluded from the set. + * + * @return a reference to this Builder + */ + public Builder excludeDataTypeFeatures(DataTypeFeature... dataTypeFeature) { + this.dataTypeFeatures.removeAll(Arrays.stream(dataTypeFeature).collect(Collectors.toList())); + return this; + } + + /** + * Sets the {@code documentationFeature} and returns a reference to this Builder so that the methods can be chained together. + * + * @param documentationFeatures the {@code documentationFeature} to set + * @return a reference to this Builder + */ + public Builder documentationFeatures(EnumSet documentationFeatures) { + if (documentationFeatures != null) { + this.documentationFeatures = documentationFeatures; + } else { + this.documentationFeatures = EnumSet.noneOf(DocumentationFeature.class); + } + return this; + } + + /** + * Includes the defined {@link DocumentationFeature} to the new/existing set of supported features. + * + * @param documentationFeature One or more {@code documentationFeature} to ensure are included in the set. + * + * @return a reference to this Builder + */ + public Builder includeDocumentationFeatures(DocumentationFeature... documentationFeature) { + this.documentationFeatures.addAll(Arrays.stream(documentationFeature).collect(Collectors.toList())); + return this; + } + + /** + * Excludes the defined {@link DocumentationFeature} from the set of supported features. + * + * @param documentationFeature One or more {@code documentationFeature} to ensure are excluded from the set. + * + * @return a reference to this Builder + */ + public Builder excludeDocumentationFeatures(DocumentationFeature... documentationFeature) { + this.documentationFeatures.removeAll(Arrays.stream(documentationFeature).collect(Collectors.toList())); + return this; + } + + /** + * Sets the {@code schemaSupportFeature} and returns a reference to this Builder so that the methods can be chained together. + * + * @param schemaSupportFeatures the {@code schemaSupportFeature} to set + * @return a reference to this Builder + */ + public Builder schemaSupportFeatures(EnumSet schemaSupportFeatures) { + if (schemaSupportFeatures != null) { + this.schemaSupportFeatures = schemaSupportFeatures; + } else { + this.schemaSupportFeatures = EnumSet.noneOf(SchemaSupportFeature.class); + } + return this; + } + + /** + * Includes the defined {@link SchemaSupportFeature} to the new/existing set of supported features. + * + * @param schemaSupportFeature One or more {@code schemaSupportFeature} to ensure are included in the set. + * + * @return a reference to this Builder + */ + public Builder includeSchemaSupportFeatures(SchemaSupportFeature... schemaSupportFeature) { + this.schemaSupportFeatures.addAll(Arrays.stream(schemaSupportFeature).collect(Collectors.toList())); + return this; + } + + /** + * Excludes the defined {@link SchemaSupportFeature} from the set of supported features. + * + * @param schemaSupportFeature One or more {@code schemaSupportFeature} to ensure are excluded from the set. + * + * @return a reference to this Builder + */ + public Builder excludeSchemaSupportFeatures(SchemaSupportFeature... schemaSupportFeature) { + this.schemaSupportFeatures.removeAll(Arrays.stream(schemaSupportFeature).collect(Collectors.toList())); + return this; + } + + /** + * Sets the {@code parameterFeature} and returns a reference to this Builder so that the methods can be chained together. + * + * @param parameterFeatures the {@code parameterFeature} to set + * @return a reference to this Builder + */ + public Builder parameterFeatures(EnumSet parameterFeatures) { + if (parameterFeatures != null) { + this.parameterFeatures = parameterFeatures; + } else { + this.parameterFeatures = EnumSet.noneOf(ParameterFeature.class); + } + return this; + } + + /** + * Includes the defined {@link ParameterFeature} to the new/existing set of supported features. + * + * @param parameterFeature One or more {@code parameterFeature} to ensure are included in the set. + * + * @return a reference to this Builder + */ + public Builder includeParameterFeatures(ParameterFeature... parameterFeature) { + this.parameterFeatures.addAll(Arrays.stream(parameterFeature).collect(Collectors.toList())); + return this; + } + + /** + * Excludes the defined {@link ParameterFeature} from the set of supported features. + * + * @param parameterFeature One or more {@code parameterFeature} to ensure are excluded from the set. + * + * @return a reference to this Builder + */ + public Builder excludeParameterFeatures(ParameterFeature... parameterFeature) { + this.parameterFeatures.removeAll(Arrays.stream(parameterFeature).collect(Collectors.toList())); + return this; + } + + /** + * Sets the {@code securityFeature} and returns a reference to this Builder so that the methods can be chained together. + * + * @param securityFeatures the {@code securityFeatures} to set + * @return a reference to this Builder + */ + public Builder securityFeatures(EnumSet securityFeatures) { + if (securityFeatures != null) { + this.securityFeatures = securityFeatures; + } else { + this.securityFeatures = EnumSet.noneOf(SecurityFeature.class); + } + return this; + } + + /** + * Includes the defined {@link SecurityFeature} to the new/existing set of supported features. + * + * @param securityFeature One or more {@code securityFeature} to ensure are included in the set. + * + * @return a reference to this Builder + */ + public Builder includeSecurityFeatures(SecurityFeature... securityFeature) { + this.securityFeatures.addAll(Arrays.stream(securityFeature).collect(Collectors.toList())); + return this; + } + + /** + * Excludes the defined {@link SecurityFeature} from the set of supported features. + * + * @param securityFeature One or more {@code securityFeature} to ensure are excluded from the set. + * + * @return a reference to this Builder + */ + public Builder excludeSecurityFeatures(SecurityFeature... securityFeature) { + this.securityFeatures.removeAll(Arrays.stream(securityFeature).collect(Collectors.toList())); + return this; + } + + /** + * Sets the {@code globalFeatures} and return a reference to this Builder so that the methods can be chained together. + * + * @param globalFeatures the {@code globalFeatures} to set + * @return a reference to this Builder + */ + public Builder globalFeatures(EnumSet globalFeatures) { + if (globalFeatures != null) { + this.globalFeatures = globalFeatures; + } else { + this.globalFeatures = EnumSet.noneOf(GlobalFeature.class); + } + return this; + } + + /** + * Includes the defined {@link GlobalFeature} to the new/existing set of supported features. + * + * @param globalFeature One or more {@code globalFeatures} to ensure are included in the set. + * + * @return a reference to this Builder + */ + public Builder includeGlobalFeatures(GlobalFeature... globalFeature) { + this.globalFeatures.addAll(Arrays.stream(globalFeature).collect(Collectors.toList())); + return this; + } + + /** + * Excludes the defined {@link GlobalFeature} from the set of supported features. + * + * @param globalFeature One or more {@code globalFeatures} to ensure are excluded from the set. + * + * @return a reference to this Builder + */ + public Builder excludeGlobalFeatures(GlobalFeature... globalFeature) { + this.globalFeatures.removeAll(Arrays.stream(globalFeature).collect(Collectors.toList())); + return this; + } + + /** + * Sets the {@code wireFormatFeatures} and return a reference to this Builder so that the methods can be chained together. + * + * @param wireFormatFeatures the {@code wireFormatFeatures} to set + * @return a reference to this Builder + */ + public Builder wireFormatFeatures(EnumSet wireFormatFeatures) { + if (wireFormatFeatures != null) { + this.wireFormatFeatures = wireFormatFeatures; + } else { + this.wireFormatFeatures = EnumSet.noneOf(WireFormatFeature.class); + } + return this; + } + + /** + * Includes the defined {@link WireFormatFeature} to the new/existing set of supported features. + * + * @param wireFormatFeature One or more {@code wireFormatFeatures} to ensure are included in the set. + * + * @return a reference to this Builder + */ + public Builder includeWireFormatFeatures(WireFormatFeature... wireFormatFeature) { + this.wireFormatFeatures.addAll(Arrays.stream(wireFormatFeature).collect(Collectors.toList())); + return this; + } + + /** + * Excludes the defined {@link WireFormatFeature} from the set of supported features. + * + *

                                            + * This option should only be used if something is overtly broken or not possible in a generator. Please log a warning if invoking this method. + *

                                            + * + * @param wireFormatFeature One or more {@code wireFormatFeatures} to ensure are excluded from the set. + * + * @return a reference to this Builder + */ + public Builder excludeWireFormatFeatures(WireFormatFeature... wireFormatFeature) { + this.wireFormatFeatures.removeAll(Arrays.stream(wireFormatFeature).collect(Collectors.toList())); + return this; + } + + /** + * Returns a {@code FeatureSet} built from the parameters previously set. + * + * @return a {@code FeatureSet} built with parameters of this {@code FeatureSet.Builder} + */ + public FeatureSet build() { + return new FeatureSet(this); + } + } +} diff --git a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/GeneratorMetadata.java b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/GeneratorMetadata.java index 4bd538a231..c4bf3d369e 100644 --- a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/GeneratorMetadata.java +++ b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/GeneratorMetadata.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -16,16 +16,29 @@ package org.openapitools.codegen.meta; +import org.openapitools.codegen.meta.features.*; + +import java.util.EnumSet; +import java.util.HashMap; +import java.util.Map; + /** * Represents metadata about a generator. */ +@SuppressWarnings("WeakerAccess") public class GeneratorMetadata { private Stability stability; + private Map libraryFeatures; + private FeatureSet featureSet; private String generationMessage; private GeneratorMetadata(Builder builder) { - stability = builder.stability; - generationMessage = builder.generationMessage; + if (builder != null) { + stability = builder.stability; + generationMessage = builder.generationMessage; + libraryFeatures = builder.libraryFeatures; + featureSet = builder.featureSet; + } } /** @@ -37,18 +50,13 @@ public class GeneratorMetadata { return new Builder(); } - /** - * Creates a new builder object for {@link GeneratorMetadata}, accepting another instance from which to copy properties. - * - * @param copy An existing instance to copy defaults from - * - * @return A new builder instance, with values preset to those of 'copy'. - */ public static Builder newBuilder(GeneratorMetadata copy) { Builder builder = new Builder(); if (copy != null) { builder.stability = copy.getStability(); builder.generationMessage = copy.getGenerationMessage(); + builder.libraryFeatures = copy.getLibraryFeatures(); + builder.featureSet = copy.getFeatureSet(); } return builder; } @@ -71,12 +79,32 @@ public class GeneratorMetadata { return stability; } + /** + * Returns the feature set supported by the generator. + * + * @return The set of available features. + */ + public FeatureSet getFeatureSet() { + return featureSet; + } + + /** + * Returns the list of features supported by generator libraries. + * + * @return A map of library name to feature set for that library. + */ + public Map getLibraryFeatures() { + return libraryFeatures; + } + /** * {@code GeneratorMetadata} builder static inner class. */ public static final class Builder { private Stability stability; private String generationMessage; + private FeatureSet featureSet = FeatureSet.UNSPECIFIED; + private Map libraryFeatures = new HashMap<>(); private Builder() { } @@ -92,6 +120,32 @@ public class GeneratorMetadata { return this; } + /** + * Sets the {@code featureSet} and returns a reference to this Builder so that the methods can be chained together. + * + * @param featureSet the {@code featureSet} to set + * @return a reference to this Builder + */ + public Builder featureSet(FeatureSet featureSet) { + if (featureSet != null) { + this.featureSet = featureSet; + } else { + this.featureSet = FeatureSet.UNSPECIFIED; + } + return this; + } + + /** + * Sets the {@code libraryFeatures} and returns a reference to this Builder so that the methods can be chained together. + * + * @param libraryFeatures the {@code libraryFeatures} to set + * @return a reference to this Builder + */ + public Builder libraryFeatures(Map libraryFeatures) { + this.libraryFeatures = libraryFeatures; + return this; + } + /** * Sets the {@code generationMessage} and returns a reference to this Builder so that the methods can be chained together. * diff --git a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/Stability.java b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/Stability.java index 00c672284e..bc79af2430 100644 --- a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/Stability.java +++ b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/Stability.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/features/ClientModificationFeature.java b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/features/ClientModificationFeature.java new file mode 100644 index 0000000000..3e5a2ad125 --- /dev/null +++ b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/features/ClientModificationFeature.java @@ -0,0 +1,42 @@ +/* + * Copyright 2019 OpenAPI-Generator Contributors (https://openapi-generator.tech) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.openapitools.codegen.meta.features; + +import org.openapitools.codegen.meta.features.annotations.ToolingExtension; + +/** + * Defines a general set of modifications supported by a generated client. + */ +public enum ClientModificationFeature { + /** + * Supports defining a custom overall base path in generated client output. + */ + @ToolingExtension + BasePath, + + /** + * Supports customizing authorizations in generated client output. + */ + @ToolingExtension + Authorizations, + + /** + * Supports customizing the user agent in generated client output. + */ + @ToolingExtension + UserAgent +} diff --git a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/features/DataTypeFeature.java b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/features/DataTypeFeature.java new file mode 100644 index 0000000000..7a86144c68 --- /dev/null +++ b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/features/DataTypeFeature.java @@ -0,0 +1,240 @@ +/* + * Copyright 2019 OpenAPI-Generator Contributors (https://openapi-generator.tech) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.openapitools.codegen.meta.features; + +import org.openapitools.codegen.meta.features.annotations.OAS2; +import org.openapitools.codegen.meta.features.annotations.OAS3; +import org.openapitools.codegen.meta.features.annotations.ToolingExtension; + +/** + * Defines common data types supported by a generator. + * Some of these features are defined in specs, and some are specific to the tool. + * + * Where data types are listed as tool-specific, this either indicates that the data type is common enough that it is an officially + * supported custom data type by the toolset (see {@link DataTypeFeature#Decimal}), or that the consideration of a special type isn't + * explicitly mentioned by the specification(s) but differs enough across languages that it warrants a special callout (see {@link DataTypeFeature#ArrayOfModel}). + */ +public enum DataTypeFeature { + /** + * Supports a generator-specific support usually via type=string's format property (e.g. email, uuid, etc), should be documented in generator README. + * + *

                                            Loosely described in OpenAPI Specification(s). Generally means a custom "format" option applied to a string-typed property.

                                            + */ + @OAS2 @OAS3 + Custom, + + /** + * Supports integer/int32 + */ + @OAS2 @OAS3 + Int32, + + /** + * Supports integer/int64 + */ + @OAS2 @OAS3 + Int64, + + /** + * Supports number/float + */ + @OAS2 @OAS3 + Float, + + /** + * Supports number/double + */ + @OAS2 @OAS3 + Double, + + /** + * Supports number/decimal (a special case for some languages) + * + *

                                            Decimal is not a type defined by OAS 2.0 specification

                                            + */ + @ToolingExtension + Decimal, + + /** + * Supports string + */ + @OAS2 @OAS3 + String, + + /** + * Supports string/byte: base64 encoded + */ + @OAS2 @OAS3 + Byte, + + /** + * Supports string/binary: any collection of octets + */ + @OAS2 @OAS3 + Binary, + + /** + * Supports boolean + */ + @OAS2 @OAS3 + Boolean, + + /** + * Supports string/date: full-date RFC3339 + * + * @see RFC3339 + */ + @OAS2 @OAS3 + Date, + + /** + * Supports string/date-time: date-time RFC3339 + * + * @see RFC3339 + */ + @OAS2 @OAS3 + DateTime, + + /** + * Supports string/password: A hint to UIs to obscure input. + * + * + *

                                            + * This should be used as an indicator for password best practices, such as assigning a variable to + * a character array rather than string, avoiding logging the variable in clear text, and masking the value + * in any user inputs. See OWASP for best practices. + *

                                            + */ + @OAS2 @OAS3 + Password, + + + /** + * Supports file inputs (e.g. multipart support). + * + *

                                            OAS 3.x defines files differently.

                                            + *

                                            + * OAS 3.x does not have an explicit "file" type and instead relies on ContentType or response types. + * That's not to say a generator doesn't support files, only that there's no direct + * "file" type defined in the spec document. + *

                                            + *

                                            + * NOTE: The default workflow may provide an "isFile" helper or synthesize the assumptions around files in the case of OAS 3.x. + *

                                            + */ + @OAS2 + File, + + /** + * Supports arrays of data + */ + @OAS2 @OAS3 + Array, + + /** + * Supports map of data + */ + @ToolingExtension + Maps, + + /** + * Supports specifying the format of the array if type array is used (one of: csv, ssv, tsv, pipes). + * + *

                                            + * For multi support, check {@link DataTypeFeature#CollectionFormatMulti}. OAS 3.x removes collectionFormat in favor of Style properties. + *

                                            + */ + @OAS2 + CollectionFormat, + + /** + * Supports collection format=multi. + * + *

                                            + * This is special cased because it is not as easily implemented as a delimiter as with CollectionFormat. + * OAS 3.x removes collectionFormat for style properties. + *

                                            + */ + @OAS2 + CollectionFormatMulti, + + /** + * Supports enum properties + */ + @OAS2 @OAS3 + Enum, + + /** + * Supports an array of enum + */ + @ToolingExtension + ArrayOfEnum, + + /** + * Supports an array of models + */ + @ToolingExtension + ArrayOfModel, + + /** + * Supports an array of arrays (primitives) + */ + @ToolingExtension + ArrayOfCollectionOfPrimitives, + + /** + * Supports an array of arrays (models) + */ + @ToolingExtension + ArrayOfCollectionOfModel, + + /** + * Supports an array of arrays (enums) + */ + @ToolingExtension + ArrayOfCollectionOfEnum, + + /** + * Supports a map of enums + */ + @ToolingExtension + MapOfEnum, + + /** + * Supports a map of models + */ + @ToolingExtension + MapOfModel, + + /** + * Supports a map of arrays (primitives) + */ + @ToolingExtension + MapOfCollectionOfPrimitives, + + /** + * Supports a map of arrays (models) + */ + @ToolingExtension + MapOfCollectionOfModel, + + /** + * Supports a map of arrays (enums) + */ + @ToolingExtension + MapOfCollectionOfEnum +} diff --git a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/features/DocumentationFeature.java b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/features/DocumentationFeature.java new file mode 100644 index 0000000000..dda611e474 --- /dev/null +++ b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/features/DocumentationFeature.java @@ -0,0 +1,42 @@ +/* + * Copyright 2019 OpenAPI-Generator Contributors (https://openapi-generator.tech) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.openapitools.codegen.meta.features; + +import org.openapitools.codegen.meta.features.annotations.ToolingExtension; + +/** + * Defines the documentation type available in generated output. + */ +public enum DocumentationFeature { + /** + * Generated output includes a README. + */ + @ToolingExtension + Readme, + + /** + * Generated output includes documentation for all generated models. + */ + @ToolingExtension + Model, + + /** + * Generated output includes documentation for all generated APIs. + */ + @ToolingExtension + Api; +} diff --git a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/features/GlobalFeature.java b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/features/GlobalFeature.java new file mode 100644 index 0000000000..f8b2a6d0b6 --- /dev/null +++ b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/features/GlobalFeature.java @@ -0,0 +1,149 @@ +/* + * Copyright 2019 OpenAPI-Generator Contributors (https://openapi-generator.tech) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.openapitools.codegen.meta.features; + +import org.openapitools.codegen.meta.features.annotations.OAS2; +import org.openapitools.codegen.meta.features.annotations.OAS3; + +/** + * Defines a set of globally available features. That is, support of these are often defined at the top-level of the spec, or + * defines general support of a feature (e.g. Examples, XMLStructureDefinitions). + */ +public enum GlobalFeature { + /** + * Supports specifying the host or ip of the target system. If not defined, this should fall back to the + * host/ip (and optional port) of the server which delivered the spec document. + */ + @OAS2 @OAS3 + Host, + + /** + * Supports providing an API prefix, appended to the host. + * + *

                                            OAS 3.x supports this indirectly via servers with template variables.

                                            + */ + @OAS2 @OAS3 + BasePath, + + /** + * Supports passing information about the target server to the client. + * + *

                                            + * Information passed to generated code should be explicitly documented in a generator's README. + *

                                            + */ + @OAS2 @OAS3 + Info, + + /** + * Supports customization of the scheme "http", "https", "ws", "wss". + * + *

                                            + * If a generator only supports partial schemes, please choose the PartialSchemes option. + *

                                            + * + *

                                            OAS 3.x supports this indirectly via servers with template variables.

                                            + */ + @OAS2 @OAS3 + Schemes, + + /** + * Supports fewer than all schemes supported by OpenAPI Specification. + * + *

                                            + * Support should be explicitly documented in a generator's README. + *

                                            + * + *

                                            OAS 3.x supports this indirectly via servers with template variables.

                                            + */ + @OAS2 @OAS3 + PartialSchemes, + + /** + * Supports a globally defined array of consumable MimeTypes. + * + *

                                            Global support is undefined in OAS 3.x.

                                            + */ + @OAS2 + Consumes, + + /** + * Supports a globally defined array of produced MimeTypes. + * + *

                                            Global support is undefined in OAS 3.x.

                                            + */ + @OAS2 + Produces, + + /** + * Exposes external documentation defined in the specification document to generated code. + */ + @OAS2 @OAS3 + ExternalDocumentation, + + /** + * Allows the ability to provide example input/output structures, usually in JSON format. + */ + @OAS2 @OAS3 + Examples, + + /** + * Differs from supporting the MimeType.XML feature, in that this option indicates whether XML structures can be defined by spec document and honored by the caller. + */ + @OAS2 @OAS3 + XMLStructureDefinitions, + + /** + * Supports targeting one or more servers. + * + *

                                            + * That is, server is not hard-coded (although there may be a default). + * This option is valid only for "servers" without open-ended values. + *

                                            + */ + @OAS3 + MultiServer, + + /** + * Supports targeting one or more servers, PLUS the ability to provide values for templated server parts + */ + @OAS3 + ParameterizedServer, + + /** + * Supports OAS 3.x "style" for parameters. + * + *

                                            + * NOTE: This option is more relevant for documentation generators which support HTML stylesheets, but may be used + * to determine structural characteristics of a property (as with OAS 3.x lack of collectionFormat). + *

                                            + */ + @OAS3 + ParameterStyling, + + /** + * Supports OAS 3.x callbacks. + */ + @OAS3 + Callbacks, + + /** + * Supports OAS 3.x link objects, but does *NOT* suggest generated clients auto-follow links. + */ + @OAS3 + LinkObjects +} diff --git a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/features/ParameterFeature.java b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/features/ParameterFeature.java new file mode 100644 index 0000000000..6c9a3d6b88 --- /dev/null +++ b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/features/ParameterFeature.java @@ -0,0 +1,77 @@ +/* + * Copyright 2019 OpenAPI-Generator Contributors (https://openapi-generator.tech) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.openapitools.codegen.meta.features; + +import org.openapitools.codegen.meta.features.annotations.OAS2; +import org.openapitools.codegen.meta.features.annotations.OAS3; + +/** + * Defines parameters supported by endpoints in the generated code. + */ +public enum ParameterFeature { + /** + * Supports path parameters. + */ + @OAS2 @OAS3 + Path, + + /** + * Supports query parameters. + */ + @OAS2 @OAS3 + Query, + + /** + * Supports header parameters. + */ + @OAS2 @OAS3 + Header, + + /** + * Supports body parameters. + * + *

                                            + * OAS 3.x specification supports this structurally rather than as an "in" parameter. + *

                                            + */ + @OAS2 + Body, + + /** + * Supports form encoded parameters. + * + * OAS 3.x specification supports this structurally via content types rather than as an "in" parameter. + */ + @OAS2 + FormUnencoded, + + /** + * Supports multipart parameters. + * + *

                                            OAS 3.x specification supports this structurally via content types rather than as an "in" parameter.

                                            + */ + @OAS2 + FormMultipart, + + /** + * Supports Cookie parameters. + * + *

                                            Not defined in OAS 2.0 and no tooling extensions currently supported for OAS 2.0 support.

                                            + */ + @OAS3 + Cookie +} diff --git a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/features/SchemaSupportFeature.java b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/features/SchemaSupportFeature.java new file mode 100644 index 0000000000..e8a2a65198 --- /dev/null +++ b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/features/SchemaSupportFeature.java @@ -0,0 +1,70 @@ +/* + * Copyright 2019 OpenAPI-Generator Contributors (https://openapi-generator.tech) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.openapitools.codegen.meta.features; + +import org.openapitools.codegen.meta.features.annotations.OAS2; +import org.openapitools.codegen.meta.features.annotations.OAS3; + +/** + * Defines special circumstances handled by the generator. + */ +public enum SchemaSupportFeature { + /** + * Support of simple schemas (those which define properties directly). + */ + @OAS2 @OAS3 + Simple, + + /** + * Support of complex schemas (those which refer to the properties of another model). + * + *

                                            In OpenAPI Specification, this indicates support of AllOf/OneOf.

                                            + */ + @OAS2 @OAS3 + Composite, + + /** + * Support for polymorphic classes. + * + *

                                            + * This suggests Composite support, but may not always be the case and is therefore separate. + *

                                            + * + *

                                            In OpenAPI Specification, this indicates support of AllOf with a discriminator property on the derived schema.

                                            + */ + @OAS2 @OAS3 + Polymorphism, + + /** + * Support for a union type. + * + *

                                            + * This means that a single "Type" in generated code may refer to one of any type in a set of 2 or more types. + * + * This is defined as a union as "OneOf" support is not explicitly limited to physical boundaries in OpenAPI Specification. The + * implementation of such a type is easily represented dynamically (a JSON object), but requires explicit language support and + * potentially a custom implementation (typed instances). + * + * Note that a generator may support "Unions" very loosely by returning an Object/Any/ref/interface{} type, leaving onus + * on type determination to the consumer. This does *NOT* suggest generated code implements a "Union Type". + *

                                            + * + *

                                            This suggests support of OneOf in OpenAPI Specification with a discriminator.

                                            + */ + @OAS3 + Union +} diff --git a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/features/SecurityFeature.java b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/features/SecurityFeature.java new file mode 100644 index 0000000000..194141e8d3 --- /dev/null +++ b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/features/SecurityFeature.java @@ -0,0 +1,77 @@ +/* + * Copyright 2019 OpenAPI-Generator Contributors (https://openapi-generator.tech) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.openapitools.codegen.meta.features; + +import org.openapitools.codegen.meta.features.annotations.OAS2; +import org.openapitools.codegen.meta.features.annotations.OAS3; + +/** + * Defines security features supported in the generated code. + */ +public enum SecurityFeature { + /** + * Supports header-based basic http auth. + */ + @OAS2 @OAS3 + BasicAuth, + + /** + * Supports header-based api-key http auth. + */ + @OAS2 @OAS3 + ApiKey, + + /** + * Supports openid connect based http auth. Implies a requirement on openIdConnectUrl. + */ + @OAS3 + OpenIDConnect, + + /** + * Supports header-based bearer auth (e.g. header + bearer format). + */ + @OAS3 + BearerToken, + + /** + * Supports authorization via OAuth2 implicit flow. + */ + @OAS2 @OAS3 + OAuth2_Implicit, + + /** + * Supports authorization via OAuth2 password flow. + */ + @OAS2 @OAS3 + OAuth2_Password, + + /** + * Supports authorization via OAuth2 client credentials flow ("application" in OAS 2.0). + * + *

                                            In OAS 2.0, this is called "application" flow.

                                            + */ + @OAS2 @OAS3 + OAuth2_ClientCredentials, + + /** + * Supports authorization via OAuth2 flow ("accessCode" in OAS 2.0). + * + *

                                            In OAS 2.0, this is called "accessCode" flow.

                                            + */ + @OAS2 @OAS3 + OAuth2_AuthorizationCode +} diff --git a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/features/WireFormatFeature.java b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/features/WireFormatFeature.java new file mode 100644 index 0000000000..d7b888e12b --- /dev/null +++ b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/features/WireFormatFeature.java @@ -0,0 +1,50 @@ +/* + * Copyright 2019 OpenAPI-Generator Contributors (https://openapi-generator.tech) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.openapitools.codegen.meta.features; + +import org.openapitools.codegen.meta.features.annotations.OAS2; +import org.openapitools.codegen.meta.features.annotations.OAS3; +import org.openapitools.codegen.meta.features.annotations.ToolingExtension; + +/** + * Defines wire formats explicitly defined in spec or supported by the tool. + */ +public enum WireFormatFeature { + /** + * Supports JSON transfer + */ + @OAS2 @OAS3 + JSON, + + /** + * Supports XML transfer + */ + @OAS2 @OAS3 + XML, + + /** + * Supports protocol buffer transfer + */ + @ToolingExtension + PROTOBUF, + + /** + * Supports other mime types or wire formats for transfer, to be documented by generators. + */ + @OAS2 @OAS3 + Custom +} diff --git a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/features/annotations/OAS2.java b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/features/annotations/OAS2.java new file mode 100644 index 0000000000..3926cfa797 --- /dev/null +++ b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/features/annotations/OAS2.java @@ -0,0 +1,27 @@ +/* + * Copyright 2019 OpenAPI-Generator Contributors (https://openapi-generator.tech) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.openapitools.codegen.meta.features.annotations; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +@Retention(RetentionPolicy.RUNTIME) +@Target(ElementType.FIELD) +public @interface OAS2 { +} diff --git a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/features/annotations/OAS3.java b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/features/annotations/OAS3.java new file mode 100644 index 0000000000..75f5b2fc34 --- /dev/null +++ b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/features/annotations/OAS3.java @@ -0,0 +1,27 @@ +/* + * Copyright 2019 OpenAPI-Generator Contributors (https://openapi-generator.tech) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.openapitools.codegen.meta.features.annotations; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +@Retention(RetentionPolicy.RUNTIME) +@Target(ElementType.FIELD) +public @interface OAS3 { +} diff --git a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/features/annotations/ToolingExtension.java b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/features/annotations/ToolingExtension.java new file mode 100644 index 0000000000..5751417bf0 --- /dev/null +++ b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/features/annotations/ToolingExtension.java @@ -0,0 +1,27 @@ +/* + * Copyright 2019 OpenAPI-Generator Contributors (https://openapi-generator.tech) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.openapitools.codegen.meta.features.annotations; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +@Retention(RetentionPolicy.RUNTIME) +@Target(ElementType.FIELD) +public @interface ToolingExtension { +} diff --git a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/GenericValidator.java b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/GenericValidator.java index 2cac087605..c095bc5abd 100644 --- a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/GenericValidator.java +++ b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/GenericValidator.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/Invalid.java b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/Invalid.java index 2f3745ebf0..ad59a62853 100644 --- a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/Invalid.java +++ b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/Invalid.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/Severity.java b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/Severity.java index 7818dfd620..e03d0f68c5 100644 --- a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/Severity.java +++ b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/Severity.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/Valid.java b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/Valid.java index d31443dca2..350f118ed0 100644 --- a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/Valid.java +++ b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/Valid.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/Validated.java b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/Validated.java index 4800cd9ce7..2df3b9c3ae 100644 --- a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/Validated.java +++ b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/Validated.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/ValidationResult.java b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/ValidationResult.java index 166ce2b2df..374c354454 100644 --- a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/ValidationResult.java +++ b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/ValidationResult.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/ValidationRule.java b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/ValidationRule.java index b774e8653d..e220e0482c 100644 --- a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/ValidationRule.java +++ b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/ValidationRule.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/Validator.java b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/Validator.java index a47e829fe6..fdf23fb366 100644 --- a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/Validator.java +++ b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/Validator.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator-core/src/test/java/org/openapitools/codegen/config/WorkflowSettingsTest.java b/modules/openapi-generator-core/src/test/java/org/openapitools/codegen/config/WorkflowSettingsTest.java index c375e98df2..3ab0048677 100644 --- a/modules/openapi-generator-core/src/test/java/org/openapitools/codegen/config/WorkflowSettingsTest.java +++ b/modules/openapi-generator-core/src/test/java/org/openapitools/codegen/config/WorkflowSettingsTest.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator-core/src/test/java/org/openapitools/codegen/validation/GenericValidatorTest.java b/modules/openapi-generator-core/src/test/java/org/openapitools/codegen/validation/GenericValidatorTest.java index 0a258d2a13..d37dc827c8 100644 --- a/modules/openapi-generator-core/src/test/java/org/openapitools/codegen/validation/GenericValidatorTest.java +++ b/modules/openapi-generator-core/src/test/java/org/openapitools/codegen/validation/GenericValidatorTest.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator-core/src/test/java/org/openapitools/codegen/validation/ValidatedTest.java b/modules/openapi-generator-core/src/test/java/org/openapitools/codegen/validation/ValidatedTest.java index 8109461de5..44cf125f5c 100644 --- a/modules/openapi-generator-core/src/test/java/org/openapitools/codegen/validation/ValidatedTest.java +++ b/modules/openapi-generator-core/src/test/java/org/openapitools/codegen/validation/ValidatedTest.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator-core/src/test/java/org/openapitools/codegen/validation/ValidationRuleTest.java b/modules/openapi-generator-core/src/test/java/org/openapitools/codegen/validation/ValidationRuleTest.java index afa6c02ff5..ce0fa165ce 100644 --- a/modules/openapi-generator-core/src/test/java/org/openapitools/codegen/validation/ValidationRuleTest.java +++ b/modules/openapi-generator-core/src/test/java/org/openapitools/codegen/validation/ValidationRuleTest.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator-gradle-plugin/README.adoc b/modules/openapi-generator-gradle-plugin/README.adoc index 806e7734ef..0f97dfb551 100644 --- a/modules/openapi-generator-gradle-plugin/README.adoc +++ b/modules/openapi-generator-gradle-plugin/README.adoc @@ -56,7 +56,7 @@ Using https://docs.gradle.org/current/userguide/plugins.html#sec:old_plugin_appl buildscript { repositories { mavenLocal() - mavenCentral() + maven { url "https://repo1.maven.org/maven2" } // or, via Gradle Plugin Portal: // url "https://plugins.gradle.org/m2/" } diff --git a/modules/openapi-generator-gradle-plugin/build.gradle b/modules/openapi-generator-gradle-plugin/build.gradle index fa60040099..d6886b2175 100644 --- a/modules/openapi-generator-gradle-plugin/build.gradle +++ b/modules/openapi-generator-gradle-plugin/build.gradle @@ -2,7 +2,7 @@ buildscript { ext.kotlin_version = '1.3.20' repositories { mavenLocal() - mavenCentral() + maven { url "https://repo1.maven.org/maven2" } maven { url "https://plugins.gradle.org/m2/" } @@ -46,7 +46,7 @@ targetCompatibility = 1.8 repositories { jcenter() - mavenCentral() + maven { url "https://repo1.maven.org/maven2" } mavenLocal() maven { url "https://oss.sonatype.org/content/repositories/releases/" @@ -119,7 +119,7 @@ publishing { licenses { license { name = "The Apache Software License, Version 2.0" - url = "http://www.apache.org/licenses/LICENSE-2.0.txt" + url = "https://www.apache.org/licenses/LICENSE-2.0.txt" distribution = "repo" } } diff --git a/modules/openapi-generator-gradle-plugin/samples/local-spec/build.gradle b/modules/openapi-generator-gradle-plugin/samples/local-spec/build.gradle index 99e3d0f674..70d810a83c 100644 --- a/modules/openapi-generator-gradle-plugin/samples/local-spec/build.gradle +++ b/modules/openapi-generator-gradle-plugin/samples/local-spec/build.gradle @@ -1,7 +1,7 @@ buildscript { repositories { mavenLocal() - mavenCentral() + maven { url "https://repo1.maven.org/maven2" } maven { url "https://plugins.gradle.org/m2/" } diff --git a/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/OpenApiGeneratorPlugin.kt b/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/OpenApiGeneratorPlugin.kt index 07afe14b5e..f69052bc67 100644 --- a/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/OpenApiGeneratorPlugin.kt +++ b/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/OpenApiGeneratorPlugin.kt @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/extensions/OpenApiGeneratorGenerateExtension.kt b/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/extensions/OpenApiGeneratorGenerateExtension.kt index d7bce4b9b2..55dee4400e 100644 --- a/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/extensions/OpenApiGeneratorGenerateExtension.kt +++ b/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/extensions/OpenApiGeneratorGenerateExtension.kt @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/extensions/OpenApiGeneratorGeneratorsExtension.kt b/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/extensions/OpenApiGeneratorGeneratorsExtension.kt index 53de4c037e..585eaee884 100644 --- a/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/extensions/OpenApiGeneratorGeneratorsExtension.kt +++ b/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/extensions/OpenApiGeneratorGeneratorsExtension.kt @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/extensions/OpenApiGeneratorMetaExtension.kt b/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/extensions/OpenApiGeneratorMetaExtension.kt index 94d298a31b..e78070ab12 100644 --- a/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/extensions/OpenApiGeneratorMetaExtension.kt +++ b/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/extensions/OpenApiGeneratorMetaExtension.kt @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/extensions/OpenApiGeneratorValidateExtension.kt b/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/extensions/OpenApiGeneratorValidateExtension.kt index 3b4a1853b9..cbf525bd7c 100644 --- a/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/extensions/OpenApiGeneratorValidateExtension.kt +++ b/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/extensions/OpenApiGeneratorValidateExtension.kt @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/tasks/GenerateTask.kt b/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/tasks/GenerateTask.kt index a0f2ceccf6..0ffc93cf4f 100644 --- a/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/tasks/GenerateTask.kt +++ b/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/tasks/GenerateTask.kt @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/tasks/GeneratorsTask.kt b/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/tasks/GeneratorsTask.kt index b32a1c1e9b..3960a95de6 100644 --- a/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/tasks/GeneratorsTask.kt +++ b/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/tasks/GeneratorsTask.kt @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/tasks/MetaTask.kt b/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/tasks/MetaTask.kt index 7d11f4d8b6..6a4a180665 100644 --- a/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/tasks/MetaTask.kt +++ b/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/tasks/MetaTask.kt @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/tasks/ValidateTask.kt b/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/tasks/ValidateTask.kt index 0956ba22c2..6e5283163b 100644 --- a/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/tasks/ValidateTask.kt +++ b/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/tasks/ValidateTask.kt @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator-maven-plugin/examples/java-client.xml b/modules/openapi-generator-maven-plugin/examples/java-client.xml index c0416bfe6b..bc5e8d7f3b 100644 --- a/modules/openapi-generator-maven-plugin/examples/java-client.xml +++ b/modules/openapi-generator-maven-plugin/examples/java-client.xml @@ -5,7 +5,7 @@ jar 1.0-SNAPSHOT sample-project - http://maven.apache.org + https://maven.apache.org diff --git a/modules/openapi-generator-maven-plugin/examples/kotlin.xml b/modules/openapi-generator-maven-plugin/examples/kotlin.xml index 83b54be3da..3a2979232c 100644 --- a/modules/openapi-generator-maven-plugin/examples/kotlin.xml +++ b/modules/openapi-generator-maven-plugin/examples/kotlin.xml @@ -6,7 +6,7 @@ jar 1.0-SNAPSHOT sample-project - http://maven.apache.org + https://maven.apache.org diff --git a/modules/openapi-generator-maven-plugin/examples/multi-module/java-client/pom.xml b/modules/openapi-generator-maven-plugin/examples/multi-module/java-client/pom.xml index 63e8de053d..61663a9396 100644 --- a/modules/openapi-generator-maven-plugin/examples/multi-module/java-client/pom.xml +++ b/modules/openapi-generator-maven-plugin/examples/multi-module/java-client/pom.xml @@ -11,7 +11,7 @@ jar 1.0-SNAPSHOT java-client - http://maven.apache.org + https://maven.apache.org diff --git a/modules/openapi-generator-maven-plugin/examples/multi-module/pom.xml b/modules/openapi-generator-maven-plugin/examples/multi-module/pom.xml index 5e4a60c7f1..058c89c3bd 100644 --- a/modules/openapi-generator-maven-plugin/examples/multi-module/pom.xml +++ b/modules/openapi-generator-maven-plugin/examples/multi-module/pom.xml @@ -5,7 +5,7 @@ pom 1.0-SNAPSHOT parent-project - http://maven.apache.org + https://maven.apache.org sample-schema diff --git a/modules/openapi-generator-maven-plugin/examples/multi-module/sample-schema/pom.xml b/modules/openapi-generator-maven-plugin/examples/multi-module/sample-schema/pom.xml index ee143b27a5..6ad8699375 100644 --- a/modules/openapi-generator-maven-plugin/examples/multi-module/sample-schema/pom.xml +++ b/modules/openapi-generator-maven-plugin/examples/multi-module/sample-schema/pom.xml @@ -12,7 +12,7 @@ jar 1.0-SNAPSHOT sample-schema - http://maven.apache.org + https://maven.apache.org diff --git a/modules/openapi-generator-maven-plugin/examples/multi-module/sample-schema/src/main/resources/openapi.yaml b/modules/openapi-generator-maven-plugin/examples/multi-module/sample-schema/src/main/resources/openapi.yaml index c6d37b2575..fffd7f152b 100644 --- a/modules/openapi-generator-maven-plugin/examples/multi-module/sample-schema/src/main/resources/openapi.yaml +++ b/modules/openapi-generator-maven-plugin/examples/multi-module/sample-schema/src/main/resources/openapi.yaml @@ -2,17 +2,17 @@ swagger: "2.0" info: description: "This is a sample server Petstore server. You can find out more about\ - \ Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/).\ + \ Swagger at [https://swagger.io](https://swagger.io) or on [irc.freenode.net, #swagger](https://swagger.io/irc/).\ \ For this sample, you can use the api key `special-key` to test the authorization\ \ filters." version: "1.0.0" title: "Swagger Petstore" - termsOfService: "http://swagger.io/terms/" + termsOfService: "https://swagger.io/terms/" contact: email: "apiteam@swagger.io" license: name: "Apache 2.0" - url: "http://www.apache.org/licenses/LICENSE-2.0.html" + url: "https://www.apache.org/licenses/LICENSE-2.0.html" host: "petstore.swagger.io" basePath: "/v2" tags: @@ -20,14 +20,14 @@ tags: description: "Everything about your Pets" externalDocs: description: "Find out more" - url: "http://swagger.io" + url: "https://swagger.io" - name: "store" description: "Access to Petstore orders" - name: "user" description: "Operations about user" externalDocs: description: "Find out more about our store" - url: "http://swagger.io" + url: "https://swagger.io" schemes: - "http" paths: @@ -699,4 +699,4 @@ definitions: type: "string" externalDocs: description: "Find out more about Swagger" - url: "http://swagger.io" + url: "https://swagger.io" diff --git a/modules/openapi-generator-maven-plugin/examples/non-java-invalid-spec.xml b/modules/openapi-generator-maven-plugin/examples/non-java-invalid-spec.xml index 81f008570a..e05fd2eef0 100644 --- a/modules/openapi-generator-maven-plugin/examples/non-java-invalid-spec.xml +++ b/modules/openapi-generator-maven-plugin/examples/non-java-invalid-spec.xml @@ -5,7 +5,7 @@ jar 1.0-SNAPSHOT sample-project - http://maven.apache.org + https://maven.apache.org diff --git a/modules/openapi-generator-maven-plugin/examples/non-java.xml b/modules/openapi-generator-maven-plugin/examples/non-java.xml index 2ec02ae10f..469d1eb1c7 100644 --- a/modules/openapi-generator-maven-plugin/examples/non-java.xml +++ b/modules/openapi-generator-maven-plugin/examples/non-java.xml @@ -5,7 +5,7 @@ jar 1.0-SNAPSHOT sample-project - http://maven.apache.org + https://maven.apache.org diff --git a/modules/openapi-generator-maven-plugin/examples/spring.xml b/modules/openapi-generator-maven-plugin/examples/spring.xml index cd9b115797..dda872981b 100644 --- a/modules/openapi-generator-maven-plugin/examples/spring.xml +++ b/modules/openapi-generator-maven-plugin/examples/spring.xml @@ -6,7 +6,7 @@ jar 1.0-SNAPSHOT sample-project - http://maven.apache.org + https://maven.apache.org org.springframework.boot diff --git a/modules/openapi-generator-maven-plugin/examples/swagger.yaml b/modules/openapi-generator-maven-plugin/examples/swagger.yaml index c6d37b2575..fffd7f152b 100644 --- a/modules/openapi-generator-maven-plugin/examples/swagger.yaml +++ b/modules/openapi-generator-maven-plugin/examples/swagger.yaml @@ -2,17 +2,17 @@ swagger: "2.0" info: description: "This is a sample server Petstore server. You can find out more about\ - \ Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/).\ + \ Swagger at [https://swagger.io](https://swagger.io) or on [irc.freenode.net, #swagger](https://swagger.io/irc/).\ \ For this sample, you can use the api key `special-key` to test the authorization\ \ filters." version: "1.0.0" title: "Swagger Petstore" - termsOfService: "http://swagger.io/terms/" + termsOfService: "https://swagger.io/terms/" contact: email: "apiteam@swagger.io" license: name: "Apache 2.0" - url: "http://www.apache.org/licenses/LICENSE-2.0.html" + url: "https://www.apache.org/licenses/LICENSE-2.0.html" host: "petstore.swagger.io" basePath: "/v2" tags: @@ -20,14 +20,14 @@ tags: description: "Everything about your Pets" externalDocs: description: "Find out more" - url: "http://swagger.io" + url: "https://swagger.io" - name: "store" description: "Access to Petstore orders" - name: "user" description: "Operations about user" externalDocs: description: "Find out more about our store" - url: "http://swagger.io" + url: "https://swagger.io" schemes: - "http" paths: @@ -699,4 +699,4 @@ definitions: type: "string" externalDocs: description: "Find out more about Swagger" - url: "http://swagger.io" + url: "https://swagger.io" diff --git a/modules/openapi-generator-maven-plugin/src/main/java/org/openapitools/codegen/plugin/CodeGenMojo.java b/modules/openapi-generator-maven-plugin/src/main/java/org/openapitools/codegen/plugin/CodeGenMojo.java index 6a709267e4..6dc8fb5fd0 100644 --- a/modules/openapi-generator-maven-plugin/src/main/java/org/openapitools/codegen/plugin/CodeGenMojo.java +++ b/modules/openapi-generator-maven-plugin/src/main/java/org/openapitools/codegen/plugin/CodeGenMojo.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator-online/pom.xml b/modules/openapi-generator-online/pom.xml index d7c67e6207..ae073f0ae0 100644 --- a/modules/openapi-generator-online/pom.xml +++ b/modules/openapi-generator-online/pom.xml @@ -17,7 +17,7 @@ ${java.version} 2.0.7.RELEASE 2.8.0 - 4.12 + 4.13 diff --git a/modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/OpenAPI2SpringBoot.java b/modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/OpenAPI2SpringBoot.java index 6e525d8fdb..f3d367e224 100644 --- a/modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/OpenAPI2SpringBoot.java +++ b/modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/OpenAPI2SpringBoot.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/RFC3339DateFormat.java b/modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/RFC3339DateFormat.java index 68c3b0db38..fa2752bd6f 100644 --- a/modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/RFC3339DateFormat.java +++ b/modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/RFC3339DateFormat.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/api/ApiOriginFilter.java b/modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/api/ApiOriginFilter.java index dd6ff5dcfe..fe721809dc 100644 --- a/modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/api/ApiOriginFilter.java +++ b/modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/api/ApiOriginFilter.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/api/ApiUtil.java b/modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/api/ApiUtil.java index b58943652b..f6b510480a 100644 --- a/modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/api/ApiUtil.java +++ b/modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/api/ApiUtil.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/api/GenApi.java b/modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/api/GenApi.java index ccebc41337..220a227445 100644 --- a/modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/api/GenApi.java +++ b/modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/api/GenApi.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/api/GenApiController.java b/modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/api/GenApiController.java index 9bc0953512..190cc107ed 100644 --- a/modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/api/GenApiController.java +++ b/modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/api/GenApiController.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/api/GenApiDelegate.java b/modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/api/GenApiDelegate.java index 5f92c365d8..e2f6be0dae 100644 --- a/modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/api/GenApiDelegate.java +++ b/modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/api/GenApiDelegate.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/configuration/HomeController.java b/modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/configuration/HomeController.java index 04912686cc..4d38f5aa11 100644 --- a/modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/configuration/HomeController.java +++ b/modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/configuration/HomeController.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/configuration/OpenAPIDocumentationConfig.java b/modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/configuration/OpenAPIDocumentationConfig.java index 39fb8bb2a5..6d257c070f 100644 --- a/modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/configuration/OpenAPIDocumentationConfig.java +++ b/modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/configuration/OpenAPIDocumentationConfig.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -56,7 +56,7 @@ public class OpenAPIDocumentationConfig { .title("OpenAPI Generator Online") .description("This is an online openapi generator server. You can find out more at https://github.com/OpenAPITools/openapi-generator.") .license("Apache 2.0") - .licenseUrl("http://www.apache.org/licenses/LICENSE-2.0.html") + .licenseUrl("https://www.apache.org/licenses/LICENSE-2.0.html") .termsOfServiceUrl("") .version(version) .contact(new Contact("","", "")) diff --git a/modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/model/ApiResponse.java b/modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/model/ApiResponse.java index 1db77598bd..b1a1938200 100644 --- a/modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/model/ApiResponse.java +++ b/modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/model/ApiResponse.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/model/Generated.java b/modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/model/Generated.java index e78f201bb7..832e178caf 100644 --- a/modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/model/Generated.java +++ b/modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/model/Generated.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/model/GeneratorInput.java b/modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/model/GeneratorInput.java index e36ed64db1..15c71a60c2 100644 --- a/modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/model/GeneratorInput.java +++ b/modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/model/GeneratorInput.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/model/ResponseCode.java b/modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/model/ResponseCode.java index 196569305d..a8af9ab76f 100644 --- a/modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/model/ResponseCode.java +++ b/modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/model/ResponseCode.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/service/GenApiService.java b/modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/service/GenApiService.java index 5d695f5830..f10599b593 100644 --- a/modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/service/GenApiService.java +++ b/modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/service/GenApiService.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/service/Generator.java b/modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/service/Generator.java index dd60956491..1b0ac76c7b 100644 --- a/modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/service/Generator.java +++ b/modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/service/Generator.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/service/ZipUtil.java b/modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/service/ZipUtil.java index 2719cecd1d..7b5e31991b 100644 --- a/modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/service/ZipUtil.java +++ b/modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/service/ZipUtil.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/.gitignore b/modules/openapi-generator/.gitignore deleted file mode 100644 index 3e9b4fcd79..0000000000 --- a/modules/openapi-generator/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -/.settings/ -/test-output/ -/bin/ diff --git a/modules/openapi-generator/pom.xml b/modules/openapi-generator/pom.xml index d47d219973..23c67f2137 100644 --- a/modules/openapi-generator/pom.xml +++ b/modules/openapi-generator/pom.xml @@ -198,8 +198,8 @@ 1.3.0 26.0-jre 1.0.2 - 2.9.10 - 2.9.10 + 2.10.1 + 2.10.0 1.3.60 @@ -212,7 +212,7 @@ ${swagger-parser-groupid} swagger-parser ${swagger-parser-version} - + com.samskivert jmustache @@ -268,6 +268,11 @@ jackson-datatype-guava ${jackson-version} + + com.fasterxml.jackson.core + jackson-core + ${jackson-version} + org.testng testng diff --git a/modules/openapi-generator/src/main/java/config/Config.java b/modules/openapi-generator/src/main/java/config/Config.java deleted file mode 100644 index c4b1718771..0000000000 --- a/modules/openapi-generator/src/main/java/config/Config.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright 2018 OpenAPI-Generator Contributors (https://openapi-generator.tech) - * Copyright 2018 SmartBear Software - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package config; - -import com.google.common.collect.ImmutableMap; - -import java.util.HashMap; -import java.util.Map; - -public class Config { - private Map options; - - public Config() { - this.options = new HashMap(); - } - - public Config(Map properties) { - this.options = properties; - } - - public Map getOptions() { - return ImmutableMap.copyOf(options); - } - - public boolean hasOption(String opt) { - return options.containsKey(opt); - } - - public String getOption(String opt) { - return options.get(opt); - } - - public void setOption(String opt, String value) { - options.put(opt, value); - } -} diff --git a/modules/openapi-generator/src/main/java/config/ConfigParser.java b/modules/openapi-generator/src/main/java/config/ConfigParser.java deleted file mode 100644 index 3c3040faed..0000000000 --- a/modules/openapi-generator/src/main/java/config/ConfigParser.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright 2018 OpenAPI-Generator Contributors (https://openapi-generator.tech) - * Copyright 2018 SmartBear Software - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package config; - -import com.fasterxml.jackson.databind.JsonNode; -import com.fasterxml.jackson.databind.ObjectMapper; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.io.File; -import java.util.Iterator; -import java.util.Map; - -public class ConfigParser { - - private static final Logger LOGGER = LoggerFactory.getLogger(ConfigParser.class); - - public static Config read(String location) { - - LOGGER.info("reading config from " + location); - - ObjectMapper mapper = new ObjectMapper(); - - Config config = new Config(); - - try { - JsonNode rootNode = mapper.readTree(new File(location)); - Iterator> optionNodes = rootNode.fields(); - - while (optionNodes.hasNext()) { - Map.Entry optionNode = optionNodes.next(); - - if (optionNode.getValue().isValueNode()) { - config.setOption(optionNode.getKey(), optionNode.getValue().asText()); - } else { - LOGGER.warn("omitting non-value node " + optionNode.getKey()); - } - } - } catch (Exception e) { - LOGGER.error(e.getMessage()); - return null; - } - - return config; - } -} diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/AbstractGenerator.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/AbstractGenerator.java index f4f62b30bc..64b74e1ad0 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/AbstractGenerator.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/AbstractGenerator.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CliOption.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CliOption.java index 49c8d7143a..940f3fd22f 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CliOption.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CliOption.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/ClientOptInput.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/ClientOptInput.java index 2a6f32028a..ebbadee8e0 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/ClientOptInput.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/ClientOptInput.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenCallback.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenCallback.java index 982433c64d..0efcfeb1e7 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenCallback.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenCallback.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenConfig.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenConfig.java index 69e5cc53cd..2d8d1b9e37 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenConfig.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenConfig.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -25,6 +25,7 @@ import io.swagger.v3.oas.models.security.SecurityScheme; import io.swagger.v3.oas.models.servers.Server; import io.swagger.v3.oas.models.servers.ServerVariable; import org.openapitools.codegen.api.TemplatingEngineAdapter; +import org.openapitools.codegen.meta.FeatureSet; import org.openapitools.codegen.meta.GeneratorMetadata; import java.io.File; @@ -283,4 +284,8 @@ public interface CodegenConfig { boolean isStrictSpecBehavior(); void setStrictSpecBehavior(boolean strictSpecBehavior); + + FeatureSet getFeatureSet(); + + void setFeatureSet(FeatureSet featureSet); } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenConfigLoader.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenConfigLoader.java index 6aa2cb56bf..6c552a97b8 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenConfigLoader.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenConfigLoader.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenConstants.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenConstants.java index 1c79ee3b1d..7bdbad35ed 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenConstants.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenConstants.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -224,6 +224,12 @@ public class CodegenConstants { public static final String MODEL_NAME_SUFFIX = "modelNameSuffix"; public static final String MODEL_NAME_SUFFIX_DESC = "Suffix that will be appended to all model names."; + public static final String ENUM_NAME_SUFFIX = "enumNameSuffix"; + public static final String ENUM_NAME_SUFFIX_DESC = "Suffix that will be appended to all enum names."; + + public static final String ENUM_VALUE_SUFFIX = "enumValueSuffix"; + public static final String ENUM_VALUE_SUFFIX_DESC = "Suffix that will be appended to all enum values. Note: For clients this may impact serialization and deserialization of enum values."; + public static final String GIT_HOST = "gitHost"; public static final String GIT_HOST_DESC = "Git host, e.g. gitlab.com."; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenModel.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenModel.java index f8eb675d47..37a1230f98 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenModel.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenModel.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -81,6 +81,7 @@ public class CodegenModel implements IJsonSchemaValidationProperties { private String minimum; private String maximum; private String pattern; + private Number multipleOf; public String getAdditionalPropertiesType() { return additionalPropertiesType; @@ -414,6 +415,16 @@ public class CodegenModel implements IJsonSchemaValidationProperties { this.maxProperties = maxProperties; } + @Override + public Number getMultipleOf() { + return multipleOf; + } + + @Override + public void setMultipleOf(Number multipleOf) { + this.multipleOf = multipleOf; + } + public List getReadOnlyVars() { return readOnlyVars; } @@ -569,7 +580,9 @@ public class CodegenModel implements IJsonSchemaValidationProperties { Objects.equals(getMinLength(), that.getMinLength()) && Objects.equals(getMinimum(), that.getMinimum()) && Objects.equals(getMaximum(), that.getMaximum()) && - Objects.equals(getPattern(), that.getPattern()); + Objects.equals(getPattern(), that.getPattern()) && + Objects.equals(getMultipleOf(), that.getMultipleOf()); + } @Override @@ -585,7 +598,7 @@ public class CodegenModel implements IJsonSchemaValidationProperties { hasChildren, isMapModel, hasOnlyReadOnly, getExternalDocumentation(), getVendorExtensions(), getAdditionalPropertiesType(), getMaxProperties(), getMinProperties(), getUniqueItems(), getMaxItems(), getMinItems(), getMaxLength(), getMinLength(), getExclusiveMinimum(), getExclusiveMaximum(), getMinimum(), - getMaximum(), getPattern()); + getMaximum(), getPattern(), getMultipleOf()); } @Override @@ -662,6 +675,7 @@ public class CodegenModel implements IJsonSchemaValidationProperties { sb.append(", minimum='").append(minimum).append('\''); sb.append(", maximum='").append(maximum).append('\''); sb.append(", pattern='").append(pattern).append('\''); + sb.append(", multipleOf='").append(multipleOf).append('\''); sb.append('}'); return sb.toString(); } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenModelFactory.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenModelFactory.java index e16c6bf25c..580cc1e77f 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenModelFactory.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenModelFactory.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenModelType.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenModelType.java index 67cfba6719..6d85bcf2c2 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenModelType.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenModelType.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenOperation.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenOperation.java index 2f83917104..117eb9a1ed 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenOperation.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenOperation.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenParameter.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenParameter.java index 4bf23f96d3..3e4619f27a 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenParameter.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenParameter.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -457,5 +457,15 @@ public class CodegenParameter implements IJsonSchemaValidationProperties { this.maxProperties = maxProperties; } + @Override + public Number getMultipleOf() { + return multipleOf; + } + + @Override + public void setMultipleOf(Number multipleOf) { + this.multipleOf = multipleOf; + } + } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenProperty.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenProperty.java index d0d94ec609..1d636d2151 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenProperty.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenProperty.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -49,6 +49,7 @@ public class CodegenProperty implements Cloneable, IJsonSchemaValidationProperti public String jsonSchema; public String minimum; public String maximum; + public Number multipleOf; public boolean exclusiveMinimum; public boolean exclusiveMaximum; public boolean hasMore; @@ -522,6 +523,14 @@ public class CodegenProperty implements Cloneable, IJsonSchemaValidationProperti this.maxProperties = maxProperties; } + public Number getMultipleOf() { + return multipleOf; + } + + public void setMultipleOf(Number multipleOf) { + this.multipleOf = multipleOf; + } + @Override public String toString() { final StringBuilder sb = new StringBuilder("CodegenProperty{"); @@ -600,6 +609,7 @@ public class CodegenProperty implements Cloneable, IJsonSchemaValidationProperti sb.append(", maxProperties=").append(maxProperties); sb.append(", minProperties=").append(minProperties); sb.append(", uniqueItems=").append(uniqueItems); + sb.append(", multipleOf=").append(multipleOf); sb.append(", isXmlAttribute=").append(isXmlAttribute); sb.append(", xmlPrefix='").append(xmlPrefix).append('\''); sb.append(", xmlName='").append(xmlName).append('\''); @@ -690,7 +700,8 @@ public class CodegenProperty implements Cloneable, IJsonSchemaValidationProperti Objects.equals(minItems, that.minItems) && Objects.equals(xmlPrefix, that.xmlPrefix) && Objects.equals(xmlName, that.xmlName) && - Objects.equals(xmlNamespace, that.xmlNamespace); + Objects.equals(xmlNamespace, that.xmlNamespace) && + Objects.equals(multipleOf, that.multipleOf); } @Override @@ -706,6 +717,6 @@ public class CodegenProperty implements Cloneable, IJsonSchemaValidationProperti isWriteOnly, isNullable, isSelfReference, isCircularReference, _enum, allowableValues, items, mostInnerItems, vendorExtensions, hasValidation, isInherited, discriminatorValue, nameInCamelCase, nameInSnakeCase, enumName, maxItems, minItems, isXmlAttribute, xmlPrefix, xmlName, xmlNamespace, - isXmlWrapped); + isXmlWrapped, multipleOf); } } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenResponse.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenResponse.java index b814f2207f..29429c073b 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenResponse.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenResponse.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -66,6 +66,7 @@ public class CodegenResponse implements IJsonSchemaValidationProperties { private String minimum; private String maximum; public String pattern; + public Number multipleOf; @Override public int hashCode() { @@ -127,7 +128,9 @@ public class CodegenResponse implements IJsonSchemaValidationProperties { Objects.equals(exclusiveMaximum, that.exclusiveMaximum) && Objects.equals(getMinimum(), that.getMinimum()) && Objects.equals(getMaximum(), that.getMaximum()) && - Objects.equals(getPattern(), that.getPattern()); + Objects.equals(getPattern(), that.getPattern()) && + Objects.equals(getMultipleOf(), that.getMultipleOf()); + } @Override @@ -250,6 +253,16 @@ public class CodegenResponse implements IJsonSchemaValidationProperties { this.maxProperties = maxProperties; } + @Override + public Number getMultipleOf() { + return multipleOf; + } + + @Override + public void setMultipleOf(Number multipleOf) { + this.multipleOf = multipleOf; + } + @Override public String toString() { final StringBuilder sb = new StringBuilder("CodegenResponse{"); @@ -299,6 +312,7 @@ public class CodegenResponse implements IJsonSchemaValidationProperties { sb.append(", minimum='").append(minimum).append('\''); sb.append(", maximum='").append(maximum).append('\''); sb.append(", pattern='").append(pattern).append('\''); + sb.append(", multipleOf='").append(multipleOf).append('\''); sb.append('}'); return sb.toString(); } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenSecurity.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenSecurity.java index e7abb8c90d..83acfcf482 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenSecurity.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenSecurity.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenType.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenType.java index 1c5e318edb..bf4c9c4d7c 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenType.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenType.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java index df595d68f0..45677bb61e 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -47,8 +47,10 @@ import org.openapitools.codegen.CodegenDiscriminator.MappedModel; import org.openapitools.codegen.api.TemplatingEngineAdapter; import org.openapitools.codegen.config.GlobalSettings; import org.openapitools.codegen.examples.ExampleGenerator; +import org.openapitools.codegen.meta.FeatureSet; import org.openapitools.codegen.meta.GeneratorMetadata; import org.openapitools.codegen.meta.Stability; +import org.openapitools.codegen.meta.features.*; import org.openapitools.codegen.serializer.SerializerUtils; import org.openapitools.codegen.templating.MustacheEngineAdapter; import org.openapitools.codegen.templating.mustache.CamelCaseLambda; @@ -73,6 +75,54 @@ import static org.openapitools.codegen.utils.StringUtils.*; public class DefaultCodegen implements CodegenConfig { private static final Logger LOGGER = LoggerFactory.getLogger(DefaultCodegen.class); + public static FeatureSet DefaultFeatureSet; + + static { + DefaultFeatureSet = FeatureSet.newBuilder() + .includeDataTypeFeatures( + DataTypeFeature.Int32, DataTypeFeature.Int64, DataTypeFeature.Float, DataTypeFeature.Double, + DataTypeFeature.Decimal, DataTypeFeature.String, DataTypeFeature.Byte, DataTypeFeature.Binary, + DataTypeFeature.Boolean, DataTypeFeature.Date, DataTypeFeature.DateTime, DataTypeFeature.Password, + DataTypeFeature.File, DataTypeFeature.Array, DataTypeFeature.Maps, DataTypeFeature.CollectionFormat, + DataTypeFeature.CollectionFormatMulti, DataTypeFeature.Enum, DataTypeFeature.ArrayOfEnum, DataTypeFeature.ArrayOfModel, + DataTypeFeature.ArrayOfCollectionOfPrimitives, DataTypeFeature.ArrayOfCollectionOfModel, DataTypeFeature.ArrayOfCollectionOfEnum, + DataTypeFeature.MapOfEnum, DataTypeFeature.MapOfModel, DataTypeFeature.MapOfCollectionOfPrimitives, + DataTypeFeature.MapOfCollectionOfModel, DataTypeFeature.MapOfCollectionOfEnum + // Custom types are template specific + ) + .includeDocumentationFeatures( + DocumentationFeature.Api, DocumentationFeature.Model + // README is template specific + ) + .includeGlobalFeatures( + GlobalFeature.Host, GlobalFeature.BasePath, GlobalFeature.Info, GlobalFeature.PartialSchemes, + GlobalFeature.Consumes, GlobalFeature.Produces, GlobalFeature.ExternalDocumentation, GlobalFeature.Examples, + GlobalFeature.Callbacks + // TODO: xml structures, styles, link objects, parameterized servers, full schemes for OAS 2.0 + ) + .includeSchemaSupportFeatures( + SchemaSupportFeature.Simple, SchemaSupportFeature.Composite, + SchemaSupportFeature.Polymorphism + // Union (OneOf) not 100% yet. + ) + .includeParameterFeatures( + ParameterFeature.Path, ParameterFeature.Query, ParameterFeature.Header, ParameterFeature.Body, + ParameterFeature.FormUnencoded, ParameterFeature.FormMultipart, ParameterFeature.Cookie + ) + .includeSecurityFeatures( + SecurityFeature.BasicAuth, SecurityFeature.ApiKey, SecurityFeature.BearerToken, + SecurityFeature.OAuth2_Implicit, SecurityFeature.OAuth2_Password, + SecurityFeature.OAuth2_ClientCredentials, SecurityFeature.OAuth2_AuthorizationCode + // OpenIDConnect not yet supported + ) + .includeWireFormatFeatures( + WireFormatFeature.JSON, WireFormatFeature.XML + // PROTOBUF and Custom are generator specific + ) + .build(); + } + + protected FeatureSet featureSet; protected GeneratorMetadata generatorMetadata; protected String inputSpec; protected String outputFolder = ""; @@ -86,6 +136,10 @@ public class DefaultCodegen implements CodegenConfig { protected String modelNamePrefix = "", modelNameSuffix = ""; protected String apiNameSuffix = "Api"; protected String testPackage = ""; + /* + apiTemplateFiles are for API outputs only (controllers/handlers). + API templates may be written multiple times; APIs are grouped by tag and the file is written once per tag group. + */ protected Map apiTemplateFiles = new HashMap(); protected Map modelTemplateFiles = new HashMap(); protected Map apiTestTemplateFiles = new HashMap(); @@ -99,6 +153,11 @@ public class DefaultCodegen implements CodegenConfig { protected Map additionalProperties = new HashMap(); protected Map serverVariables = new HashMap(); protected Map vendorExtensions = new HashMap(); + /* + Supporting files are those which aren't models, APIs, or docs. + These get a different map of data bound to the templates. Supporting files are written once. + See also 'apiTemplateFiles'. + */ protected List supportingFiles = new ArrayList(); protected List cliOptions = new ArrayList(); protected boolean skipOverwrite; @@ -1112,6 +1171,9 @@ public class DefaultCodegen implements CodegenConfig { if (codegenType == null) { codegenType = CodegenType.OTHER; } + + featureSet = DefaultFeatureSet; + generatorMetadata = GeneratorMetadata.newBuilder() .stability(Stability.STABLE) .generationMessage(String.format(Locale.ROOT, "OpenAPI Generator: %s (%s)", getName(), codegenType.toValue())) @@ -2305,6 +2367,9 @@ public class DefaultCodegen implements CodegenConfig { if (p.getExclusiveMaximum() != null) { property.exclusiveMaximum = p.getExclusiveMaximum(); } + if (p.getMultipleOf() != null) { + property.multipleOf = p.getMultipleOf(); + } // check if any validation rule defined // exclusive* are noop without corresponding min/max @@ -5393,4 +5458,14 @@ public class DefaultCodegen implements CodegenConfig { public void setStrictSpecBehavior(final boolean strictSpecBehavior) { this.strictSpecBehavior = strictSpecBehavior; } + + @Override + public FeatureSet getFeatureSet() { + return this.featureSet; + } + + @Override + public void setFeatureSet(final FeatureSet featureSet) { + this.featureSet = featureSet == null ? DefaultFeatureSet : featureSet; + } } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultGenerator.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultGenerator.java index 2d263ed386..2d7b768b31 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultGenerator.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultGenerator.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/Generator.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/Generator.java index 7a62aa5be7..a38ce189e7 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/Generator.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/Generator.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/GlobalSupportingFile.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/GlobalSupportingFile.java index 8e97662c98..06b6e9cfab 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/GlobalSupportingFile.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/GlobalSupportingFile.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/IJsonSchemaValidationProperties.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/IJsonSchemaValidationProperties.java index 8a4f9cea99..c86fbf7c7a 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/IJsonSchemaValidationProperties.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/IJsonSchemaValidationProperties.java @@ -1,41 +1,55 @@ package org.openapitools.codegen; -import java.math.BigDecimal; - public interface IJsonSchemaValidationProperties { String getPattern(); + void setPattern(String pattern); String getMaximum(); + void setMaximum(String maximum); String getMinimum(); + void setMinimum(String minimum); boolean getExclusiveMaximum(); + void setExclusiveMaximum(boolean exclusiveMaximum); - + boolean getExclusiveMinimum(); + void setExclusiveMinimum(boolean exclusiveMinimum); Integer getMinLength(); + void setMinLength(Integer minLength); - + Integer getMaxLength(); + void setMaxLength(Integer maxLength); Integer getMinItems(); + void setMinItems(Integer minItems); Integer getMaxItems(); + void setMaxItems(Integer maxItems); boolean getUniqueItems(); + void setUniqueItems(boolean uniqueItems); Integer getMinProperties(); + void setMinProperties(Integer minProperties); Integer getMaxProperties(); + void setMaxProperties(Integer maxProperties); + + Number getMultipleOf(); + + void setMultipleOf(Number multipleOf); } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/InlineModelResolver.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/InlineModelResolver.java index 8201a27b04..e5e519d32c 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/InlineModelResolver.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/InlineModelResolver.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/SupportingFile.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/SupportingFile.java index 6046da1cd6..a41196e54f 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/SupportingFile.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/SupportingFile.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/TemplatingEngineLoader.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/TemplatingEngineLoader.java index e33e1ff77e..7f7a3000d2 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/TemplatingEngineLoader.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/TemplatingEngineLoader.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/auth/AuthMethod.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/auth/AuthMethod.java index a56257765f..136a3b3b64 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/auth/AuthMethod.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/auth/AuthMethod.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/auth/AuthParser.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/auth/AuthParser.java index 798d9c1e03..a18d8bdcfd 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/auth/AuthParser.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/auth/AuthParser.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/config/CodegenConfigurator.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/config/CodegenConfigurator.java index f19f8d1bf5..31cadc1e29 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/config/CodegenConfigurator.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/config/CodegenConfigurator.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/config/CodegenConfiguratorUtils.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/config/CodegenConfiguratorUtils.java index 6708694993..3c5b6c919b 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/config/CodegenConfiguratorUtils.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/config/CodegenConfiguratorUtils.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/config/GlobalSettings.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/config/GlobalSettings.java index 0f07882102..82855b4ae3 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/config/GlobalSettings.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/config/GlobalSettings.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/examples/ExampleGenerator.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/examples/ExampleGenerator.java index 5ce8089d19..ffc664c3cf 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/examples/ExampleGenerator.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/examples/ExampleGenerator.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/examples/XmlExampleGenerator.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/examples/XmlExampleGenerator.java index 961320c404..562fbe0046 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/examples/XmlExampleGenerator.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/examples/XmlExampleGenerator.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/ignore/CodegenIgnoreProcessor.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/ignore/CodegenIgnoreProcessor.java index fe7991a554..666c13d30d 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/ignore/CodegenIgnoreProcessor.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/ignore/CodegenIgnoreProcessor.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/ignore/rules/DirectoryRule.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/ignore/rules/DirectoryRule.java index 9870a8a434..6081fc4c13 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/ignore/rules/DirectoryRule.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/ignore/rules/DirectoryRule.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/ignore/rules/EverythingRule.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/ignore/rules/EverythingRule.java index 00a3ad6bec..b50222f020 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/ignore/rules/EverythingRule.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/ignore/rules/EverythingRule.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/ignore/rules/FileRule.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/ignore/rules/FileRule.java index dc2b7321b2..c5f731f597 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/ignore/rules/FileRule.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/ignore/rules/FileRule.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/ignore/rules/IgnoreLineParser.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/ignore/rules/IgnoreLineParser.java index a3dcedac12..7bdb44b525 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/ignore/rules/IgnoreLineParser.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/ignore/rules/IgnoreLineParser.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/ignore/rules/InvalidRule.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/ignore/rules/InvalidRule.java index 21c170569c..841a4ff7c0 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/ignore/rules/InvalidRule.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/ignore/rules/InvalidRule.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/ignore/rules/ParserException.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/ignore/rules/ParserException.java index 7ab93f93b4..19cf3ac18b 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/ignore/rules/ParserException.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/ignore/rules/ParserException.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/ignore/rules/Part.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/ignore/rules/Part.java index ef948c416f..eeb47acea5 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/ignore/rules/Part.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/ignore/rules/Part.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/ignore/rules/RootedFileRule.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/ignore/rules/RootedFileRule.java index 5db309afda..91b4499b1a 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/ignore/rules/RootedFileRule.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/ignore/rules/RootedFileRule.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/ignore/rules/Rule.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/ignore/rules/Rule.java index 079ac3c7a1..fd56a05329 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/ignore/rules/Rule.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/ignore/rules/Rule.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractAdaCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractAdaCodegen.java index 50f2db6005..b3177163df 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractAdaCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractAdaCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractApexCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractApexCodegen.java index d2a20593f5..e8a1aca42d 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractApexCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractApexCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractCSharpCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractCSharpCodegen.java index 0e73bbc50d..7e6c09e4ae 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractCSharpCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractCSharpCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -62,6 +62,8 @@ public abstract class AbstractCSharpCodegen extends DefaultCodegen implements Co protected String packageAuthors = "OpenAPI"; protected String interfacePrefix = "I"; + protected String enumNameSuffix = "Enum"; + protected String enumValueSuffix = "Enum"; protected String sourceFolder = "src"; @@ -361,6 +363,14 @@ public abstract class AbstractCSharpCodegen extends DefaultCodegen implements Co } } + if (additionalProperties().containsKey(CodegenConstants.ENUM_NAME_SUFFIX)) { + setEnumNameSuffix(additionalProperties.get(CodegenConstants.ENUM_NAME_SUFFIX).toString()); + } + + if (additionalProperties().containsKey(CodegenConstants.ENUM_VALUE_SUFFIX)) { + setEnumValueSuffix(additionalProperties.get(CodegenConstants.ENUM_VALUE_SUFFIX).toString()); + } + // This either updates additionalProperties with the above fixes, or sets the default if the option was not specified. additionalProperties.put(CodegenConstants.INTERFACE_PREFIX, interfacePrefix); } @@ -1003,6 +1013,14 @@ public abstract class AbstractCSharpCodegen extends DefaultCodegen implements Co this.interfacePrefix = interfacePrefix; } + public void setEnumNameSuffix(final String enumNameSuffix) { + this.enumNameSuffix = enumNameSuffix; + } + + public void setEnumValueSuffix(final String enumValueSuffix) { + this.enumValueSuffix = enumValueSuffix; + } + public boolean isSupportNullable() { return supportNullable; } @@ -1040,7 +1058,7 @@ public abstract class AbstractCSharpCodegen extends DefaultCodegen implements Co enumName = enumName.replaceFirst("^_", ""); enumName = enumName.replaceFirst("_$", ""); - enumName = camelize(enumName) + "Enum"; + enumName = camelize(enumName) + this.enumValueSuffix; if (enumName.matches("\\d.*")) { // starts with number return "_" + enumName; @@ -1051,7 +1069,7 @@ public abstract class AbstractCSharpCodegen extends DefaultCodegen implements Co @Override public String toEnumName(CodegenProperty property) { - return sanitizeName(camelize(property.name)) + "Enum"; + return sanitizeName(camelize(property.name)) + this.enumNameSuffix; } public String testPackageName() { diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractCppCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractCppCodegen.java index df98e9aa55..c49f5681e5 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractCppCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractCppCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractEiffelCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractEiffelCodegen.java index 4b95e1038d..b19a6a2404 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractEiffelCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractEiffelCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractFSharpCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractFSharpCodegen.java index ddb9aa0224..6ec6970518 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractFSharpCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractFSharpCodegen.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractGoCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractGoCodegen.java index 6950cfa4e0..6b910f4467 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractGoCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractGoCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -46,6 +46,8 @@ public abstract class AbstractGoCodegen extends DefaultCodegen implements Codege protected String packageName = "openapi"; protected Set numberTypes; + protected boolean usesOptionals = true; + public AbstractGoCodegen() { super(); @@ -400,7 +402,7 @@ public abstract class AbstractGoCodegen extends DefaultCodegen implements Codege } // import "time" if the operation has a required time parameter. - if (param.required) { + if (param.required || !usesOptionals) { if (!addedTimeImport && "time.Time".equals(param.dataType)) { imports.add(createMapping("import", "time")); addedTimeImport = true; @@ -414,7 +416,7 @@ public abstract class AbstractGoCodegen extends DefaultCodegen implements Codege } // import "optionals" package if the parameter is optional - if (!param.required) { + if (!param.required && usesOptionals) { if (!addedOptionalImport) { imports.add(createMapping("import", "github.com/antihax/optional")); addedOptionalImport = true; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractGraphQLCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractGraphQLCodegen.java index 7eb5421c16..ddfaa16c86 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractGraphQLCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractGraphQLCodegen.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaCodegen.java index 7bc938a681..af6e1cde6c 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -30,6 +30,7 @@ import org.apache.commons.io.FilenameUtils; import org.apache.commons.lang3.BooleanUtils; import org.apache.commons.lang3.StringUtils; import org.openapitools.codegen.*; +import org.openapitools.codegen.meta.features.*; import org.openapitools.codegen.utils.ModelUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -96,6 +97,27 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code public AbstractJavaCodegen() { super(); + + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .wireFormatFeatures(EnumSet.of(WireFormatFeature.JSON, WireFormatFeature.XML)) + .securityFeatures(EnumSet.noneOf( + SecurityFeature.class + )) + .excludeGlobalFeatures( + GlobalFeature.XMLStructureDefinitions, + GlobalFeature.Callbacks, + GlobalFeature.LinkObjects, + GlobalFeature.ParameterStyling + ) + .excludeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism + ) + .includeClientModificationFeatures( + ClientModificationFeature.BasePath + ) + .build(); + supportsInheritance = true; modelTemplateFiles.put("model.mustache", ".java"); apiTemplateFiles.put("api.mustache", ".java"); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaJAXRSServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaJAXRSServerCodegen.java index 4b2d39877d..45ffa3b36b 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaJAXRSServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaJAXRSServerCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractKotlinCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractKotlinCodegen.java index b0227feae1..0c935ed9ff 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractKotlinCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractKotlinCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -33,7 +33,9 @@ import org.slf4j.LoggerFactory; import java.io.File; import java.util.*; +import java.util.function.Function; import java.util.stream.Collectors; +import java.util.stream.Stream; import static org.openapitools.codegen.utils.StringUtils.*; @@ -426,7 +428,7 @@ public abstract class AbstractKotlinCodegen extends DefaultCodegen implements Co additionalProperties.put(CodegenConstants.SORT_PARAMS_BY_REQUIRED_FLAG, getSortParamsByRequiredFlag()); additionalProperties.put(CodegenConstants.SORT_MODEL_PROPERTIES_BY_REQUIRED_FLAG, getSortModelPropertiesByRequiredFlag()); - + additionalProperties.put(CodegenConstants.API_PACKAGE, apiPackage()); additionalProperties.put(CodegenConstants.MODEL_PACKAGE, modelPackage()); @@ -673,9 +675,11 @@ public abstract class AbstractKotlinCodegen extends DefaultCodegen implements Co private String getArrayTypeDeclaration(ArraySchema arr) { // TODO: collection type here should be fully qualified namespace to avoid model conflicts // This supports arrays of arrays. - String arrayType = typeMapping.get("array"); - if (Boolean.TRUE.equals(arr.getUniqueItems())) { + String arrayType; + if (ModelUtils.isSet(arr)) { arrayType = typeMapping.get("set"); + } else { + arrayType = typeMapping.get("array"); } StringBuilder instantiationType = new StringBuilder(arrayType); Schema items = arr.getItems(); @@ -771,7 +775,22 @@ public abstract class AbstractKotlinCodegen extends DefaultCodegen implements Co public CodegenModel fromModel(String name, Schema schema) { CodegenModel m = super.fromModel(name, schema); m.optionalVars = m.optionalVars.stream().distinct().collect(Collectors.toList()); - m.allVars.stream().filter(p -> !m.vars.contains(p)).forEach(p -> p.isInherited = true); + // Update allVars/requiredVars/optionalVars with isInherited + // Each of these lists contains elements that are similar, but they are all cloned + // via CodegenModel.removeAllDuplicatedProperty and therefore need to be updated + // separately. + // First find only the parent vars via baseName matching + Map allVarsMap = m.allVars.stream() + .collect(Collectors.toMap(CodegenProperty::getBaseName, Function.identity())); + allVarsMap.keySet() + .removeAll(m.vars.stream().map(CodegenProperty::getBaseName).collect(Collectors.toSet())); + // Update the allVars + allVarsMap.values().forEach(p -> p.isInherited = true); + // Update any other vars (requiredVars, optionalVars) + Stream.of(m.requiredVars, m.optionalVars) + .flatMap(List::stream) + .filter(p -> allVarsMap.containsKey(p.baseName)) + .forEach(p -> p.isInherited = true); return m; } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractPhpCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractPhpCodegen.java index 340c08f3df..aeb076b850 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractPhpCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractPhpCodegen.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractRubyCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractRubyCodegen.java index 53381ed9d9..e2c1f13128 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractRubyCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractRubyCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractScalaCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractScalaCodegen.java index e0ce0e8c9d..b0e44e5565 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractScalaCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractScalaCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -23,9 +23,7 @@ import io.swagger.v3.oas.models.media.ArraySchema; import io.swagger.v3.oas.models.media.Schema; import org.apache.commons.io.FilenameUtils; import org.apache.commons.lang3.StringUtils; -import org.openapitools.codegen.CliOption; -import org.openapitools.codegen.CodegenConstants; -import org.openapitools.codegen.DefaultCodegen; +import org.openapitools.codegen.*; import org.openapitools.codegen.utils.ModelUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -106,6 +104,14 @@ public abstract class AbstractScalaCodegen extends DefaultCodegen { "yield" )); + importMapping.put("ListBuffer", "scala.collection.mutable.ListBuffer"); + // although Seq is a predef, before Scala 2.13, it _could_ refer to a mutable Seq in some cases. + importMapping.put("Seq", "scala.collection.immutable.Seq"); + importMapping.put("Set", "scala.collection.immutable.Set"); + importMapping.put("ListSet", "scala.collection.immutable.ListSet"); + + instantiationTypes.put("set", "Set"); + cliOptions.add(new CliOption(CodegenConstants.MODEL_PACKAGE, CodegenConstants.MODEL_PACKAGE_DESC)); cliOptions.add(new CliOption(CodegenConstants.API_PACKAGE, CodegenConstants.API_PACKAGE_DESC)); cliOptions.add(new CliOption(CodegenConstants.SOURCE_FOLDER, CodegenConstants.SOURCE_FOLDER_DESC)); @@ -199,7 +205,11 @@ public abstract class AbstractScalaCodegen extends DefaultCodegen { @Override public String getSchemaType(Schema p) { String openAPIType = super.getSchemaType(p); - String type = null; + if (ModelUtils.isSet(p)) { + openAPIType = "set"; + } + + String type; if (typeMapping.containsKey(openAPIType)) { type = typeMapping.get(openAPIType); if (languageSpecificPrimitives.contains(type)) { @@ -219,7 +229,7 @@ public abstract class AbstractScalaCodegen extends DefaultCodegen { } else if (ModelUtils.isArraySchema(p)) { ArraySchema ap = (ArraySchema) p; String inner = getSchemaType(ap.getItems()); - return instantiationTypes.get("array") + "[" + inner + "]"; + return ( ModelUtils.isSet(ap) ? instantiationTypes.get("set") : instantiationTypes.get("array") ) + "[" + inner + "]"; } else { return null; } @@ -248,7 +258,28 @@ public abstract class AbstractScalaCodegen extends DefaultCodegen { } else if (ModelUtils.isArraySchema(p)) { ArraySchema ap = (ArraySchema) p; String inner = getSchemaType(ap.getItems()); - return "new ListBuffer[" + inner + "]() "; + String genericType; + if (ModelUtils.isSet(ap)) { + genericType = instantiationTypes.get("set"); + } else { + genericType = instantiationTypes.get("array"); + } + + // test for immutable Monoids with .empty method for idiomatic defaults + if ("List".equals(genericType) || + "Set".equals(genericType) || + "Seq".equals(genericType) || + "Array".equals(genericType) || + "Vector".equals(genericType) || + "IndexedSeq".equals(genericType) || + "Iterable".equals(genericType) || + "ListSet".equals(genericType) + ) { + return genericType + "[" + inner + "].empty "; + } + + // Assume that any other generic types can be new'd up. + return "new " + genericType + "[" + inner + "]() "; } else if (ModelUtils.isStringSchema(p)) { return null; } else { @@ -256,6 +287,25 @@ public abstract class AbstractScalaCodegen extends DefaultCodegen { } } + /** + * Convert OAS Property object to Codegen Property object + * + * @param name name of the property + * @param p OAS property object + * @return Codegen Property object + */ + @Override + public CodegenProperty fromProperty(String name, Schema p) { + CodegenProperty prop = super.fromProperty(name, p); + if (ModelUtils.isArraySchema(p)) { + ArraySchema as = (ArraySchema) p; + if (ModelUtils.isSet(as)) { + prop.containerType = "set"; + } + } + return prop; + } + @Override public Map postProcessModels(Map objs) { // remove model imports to avoid warnings for importing class in the same package in Scala diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractTypeScriptClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractTypeScriptClientCodegen.java index 0676c8f241..ab6869f5c3 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractTypeScriptClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractTypeScriptClientCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -25,6 +25,7 @@ import io.swagger.v3.oas.models.parameters.Parameter; import org.apache.commons.io.FilenameUtils; import org.apache.commons.lang3.StringUtils; import org.openapitools.codegen.*; +import org.openapitools.codegen.meta.features.*; import org.openapitools.codegen.utils.ModelUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -62,6 +63,26 @@ public abstract class AbstractTypeScriptClientCodegen extends DefaultCodegen imp public AbstractTypeScriptClientCodegen() { super(); + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .wireFormatFeatures(EnumSet.of(WireFormatFeature.JSON, WireFormatFeature.XML)) + .securityFeatures(EnumSet.noneOf( + SecurityFeature.class + )) + .excludeGlobalFeatures( + GlobalFeature.XMLStructureDefinitions, + GlobalFeature.Callbacks, + GlobalFeature.LinkObjects, + GlobalFeature.ParameterStyling + ) + .includeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism + ) + .includeClientModificationFeatures( + ClientModificationFeature.BasePath + ) + .build(); + // clear import mapping (from default generator) as TS does not use it // at the moment importMapping.clear(); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AdaCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AdaCodegen.java index 0099e79098..1726b0cda8 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AdaCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AdaCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -24,6 +24,7 @@ import org.openapitools.codegen.CodegenConfig; import org.openapitools.codegen.CodegenConstants; import org.openapitools.codegen.CodegenType; import org.openapitools.codegen.SupportingFile; +import org.openapitools.codegen.meta.features.*; import java.io.File; import java.io.IOException; @@ -54,6 +55,39 @@ public class AdaCodegen extends AbstractAdaCodegen implements CodegenConfig { @Override public void processOpts() { super.processOpts(); + + // TODO: Ada maintainer review. + featureSet = getFeatureSet().modify() + .excludeDocumentationFeatures(DocumentationFeature.Readme) + .excludeWireFormatFeatures( + WireFormatFeature.XML, + WireFormatFeature.PROTOBUF + ) + .excludeSecurityFeatures( + SecurityFeature.OpenIDConnect, + SecurityFeature.OAuth2_Password, + SecurityFeature.OAuth2_AuthorizationCode, + SecurityFeature.OAuth2_ClientCredentials, + SecurityFeature.OAuth2_Implicit, + SecurityFeature.BearerToken, + SecurityFeature.ApiKey + ) + .excludeGlobalFeatures( + GlobalFeature.XMLStructureDefinitions, + GlobalFeature.Callbacks, + GlobalFeature.LinkObjects, + GlobalFeature.ParameterStyling + ) + .excludeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism + ) + .excludeParameterFeatures( + ParameterFeature.Header, + ParameterFeature.Cookie + ) + .includeClientModificationFeatures(ClientModificationFeature.BasePath) + .build(); + if (additionalProperties.containsKey(CodegenConstants.PACKAGE_NAME)) { packageName = (String) additionalProperties.get(CodegenConstants.PACKAGE_NAME); } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AdaServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AdaServerCodegen.java index 0ee5bb6c43..329065b22c 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AdaServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AdaServerCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -23,6 +23,7 @@ import org.openapitools.codegen.CodegenConfig; import org.openapitools.codegen.CodegenConstants; import org.openapitools.codegen.CodegenType; import org.openapitools.codegen.SupportingFile; +import org.openapitools.codegen.meta.features.*; import java.io.File; import java.io.IOException; @@ -33,6 +34,37 @@ public class AdaServerCodegen extends AbstractAdaCodegen implements CodegenConfi public AdaServerCodegen() { super(); + + // TODO: Ada maintainer review. + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .excludeWireFormatFeatures( + WireFormatFeature.XML, + WireFormatFeature.PROTOBUF + ) + .excludeSecurityFeatures( + SecurityFeature.OpenIDConnect, + SecurityFeature.OAuth2_Password, + SecurityFeature.OAuth2_AuthorizationCode, + SecurityFeature.OAuth2_ClientCredentials, + SecurityFeature.OAuth2_Implicit, + SecurityFeature.BearerToken + ) + .excludeGlobalFeatures( + GlobalFeature.XMLStructureDefinitions, + GlobalFeature.Callbacks, + GlobalFeature.LinkObjects, + GlobalFeature.ParameterStyling + ) + .excludeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism + ) + .excludeParameterFeatures( + ParameterFeature.Header, + ParameterFeature.Cookie + ) + .includeClientModificationFeatures(ClientModificationFeature.BasePath) + .build(); } @Override diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AndroidClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AndroidClientCodegen.java index ec2661e445..150f723180 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AndroidClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AndroidClientCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -21,6 +21,7 @@ import io.swagger.v3.oas.models.media.ArraySchema; import io.swagger.v3.oas.models.media.Schema; import org.apache.commons.lang3.StringUtils; import org.openapitools.codegen.*; +import org.openapitools.codegen.meta.features.*; import org.openapitools.codegen.utils.ModelUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -58,6 +59,36 @@ public class AndroidClientCodegen extends DefaultCodegen implements CodegenConfi public AndroidClientCodegen() { super(); + + // TODO: Android client maintainer review. + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .excludeWireFormatFeatures( + WireFormatFeature.PROTOBUF + ) + .excludeSecurityFeatures( + SecurityFeature.OpenIDConnect, + SecurityFeature.OAuth2_Password, + SecurityFeature.OAuth2_AuthorizationCode, + SecurityFeature.OAuth2_ClientCredentials, + SecurityFeature.OAuth2_Implicit, + SecurityFeature.BearerToken + ) + .excludeGlobalFeatures( + GlobalFeature.XMLStructureDefinitions, + GlobalFeature.Callbacks, + GlobalFeature.LinkObjects, + GlobalFeature.ParameterStyling + ) + .includeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism + ) + .excludeParameterFeatures( + ParameterFeature.Cookie + ) + .includeClientModificationFeatures(ClientModificationFeature.BasePath) + .build(); + outputFolder = "generated-code/android"; modelTemplateFiles.put("model.mustache", ".java"); apiTemplateFiles.put("api.mustache", ".java"); @@ -65,6 +96,7 @@ public class AndroidClientCodegen extends DefaultCodegen implements CodegenConfi apiPackage = "org.openapitools.client.api"; modelPackage = "org.openapitools.client.model"; + setReservedWordsLowerCase( Arrays.asList( // local variable names used in API methods (endpoints) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Apache2ConfigCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Apache2ConfigCodegen.java index 0c717499ab..ebd2cd3b32 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Apache2ConfigCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Apache2ConfigCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -18,10 +18,9 @@ package org.openapitools.codegen.languages; import org.openapitools.codegen.*; +import org.openapitools.codegen.meta.features.*; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; +import java.util.*; public class Apache2ConfigCodegen extends DefaultCodegen implements CodegenConfig { @@ -45,6 +44,19 @@ public class Apache2ConfigCodegen extends DefaultCodegen implements CodegenConfi public Apache2ConfigCodegen() { super(); + + // TODO: Apache2 maintainer review. + featureSet = getFeatureSet().modify() + .parameterFeatures(EnumSet.of(ParameterFeature.Path)) + .securityFeatures(EnumSet.of(SecurityFeature.BasicAuth)) + .dataTypeFeatures(EnumSet.noneOf(DataTypeFeature.class)) + .wireFormatFeatures(EnumSet.noneOf(WireFormatFeature.class)) + .documentationFeatures(EnumSet.noneOf(DocumentationFeature.class)) + .globalFeatures(EnumSet.noneOf(GlobalFeature.class)) + .schemaSupportFeatures(EnumSet.noneOf(SchemaSupportFeature.class)) + .clientModificationFeatures(EnumSet.noneOf(ClientModificationFeature.class)) + .build(); + apiTemplateFiles.put("apache-config.mustache", ".conf"); embeddedTemplateDir = templateDir = "apache2"; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ApexClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ApexClientCodegen.java index b0cebcf66c..38717bf23c 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ApexClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ApexClientCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AsciidocDocumentationCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AsciidocDocumentationCodegen.java index 22c5771002..731e951ec6 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AsciidocDocumentationCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AsciidocDocumentationCodegen.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -24,9 +24,11 @@ import java.io.Writer; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; +import java.util.EnumSet; import java.util.HashMap; import java.util.HashSet; +import org.openapitools.codegen.meta.features.*; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -184,6 +186,15 @@ public class AsciidocDocumentationCodegen extends DefaultCodegen implements Code public AsciidocDocumentationCodegen() { super(); + // TODO: Asciidoc maintainer review. + featureSet = getFeatureSet().modify() + .securityFeatures(EnumSet.noneOf(SecurityFeature.class)) + .documentationFeatures(EnumSet.noneOf(DocumentationFeature.class)) + .globalFeatures(EnumSet.noneOf(GlobalFeature.class)) + .schemaSupportFeatures(EnumSet.noneOf(SchemaSupportFeature.class)) + .clientModificationFeatures(EnumSet.noneOf(ClientModificationFeature.class)) + .build(); + LOGGER.trace("start asciidoc codegen"); outputFolder = "generated-code" + File.separator + "asciidoc"; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AspNetCoreServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AspNetCoreServerCodegen.java index 8126b4dbb7..fdcad979bf 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AspNetCoreServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AspNetCoreServerCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -22,6 +22,7 @@ import io.swagger.v3.oas.models.OpenAPI; import io.swagger.v3.oas.models.media.Schema; import io.swagger.v3.parser.util.SchemaTypeUtil; import org.openapitools.codegen.*; +import org.openapitools.codegen.meta.features.*; import org.openapitools.codegen.utils.ModelUtils; import org.openapitools.codegen.utils.URLPathUtils; import org.slf4j.Logger; @@ -87,6 +88,37 @@ public class AspNetCoreServerCodegen extends AbstractCSharpCodegen { public AspNetCoreServerCodegen() { super(); + // TODO: AspnetCore community review + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .excludeWireFormatFeatures(WireFormatFeature.PROTOBUF) + .includeSecurityFeatures( + SecurityFeature.ApiKey, + SecurityFeature.BasicAuth, + SecurityFeature.BearerToken + ) + .excludeSecurityFeatures( + SecurityFeature.OpenIDConnect, + SecurityFeature.OAuth2_Password, + SecurityFeature.OAuth2_AuthorizationCode, + SecurityFeature.OAuth2_ClientCredentials, + SecurityFeature.OAuth2_Implicit + ) + .excludeGlobalFeatures( + GlobalFeature.XMLStructureDefinitions, + GlobalFeature.Callbacks, + GlobalFeature.LinkObjects, + GlobalFeature.ParameterStyling, + GlobalFeature.MultiServer + ) + .includeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism + ) + .includeParameterFeatures( + ParameterFeature.Cookie + ) + .build(); + outputFolder = "generated-code" + File.separator + getName(); modelTemplateFiles.put("model.mustache", ".cs"); @@ -206,11 +238,18 @@ public class AspNetCoreServerCodegen extends AbstractCSharpCodegen { "Version for Microsoft.AspNetCore.Mvc.NewtonsoftJson for ASP.NET Core 3.0+", newtonsoftVersion); - addSwitch(USE_DEFAULT_ROUTING, "Use default routing for the ASP.NET Core version. For 3.0 turn off default because it is not yet supported.", useDefaultRouting); + addOption(CodegenConstants.ENUM_NAME_SUFFIX, + CodegenConstants.ENUM_NAME_SUFFIX_DESC, + enumNameSuffix); + + addOption(CodegenConstants.ENUM_VALUE_SUFFIX, + "Suffix that will be appended to all enum values.", + enumValueSuffix); + classModifier.addEnum("", "Keep class default with no modifier"); classModifier.addEnum("abstract", "Make class abstract"); classModifier.setDefault(""); @@ -348,7 +387,6 @@ public class AspNetCoreServerCodegen extends AbstractCSharpCodegen { supportingFiles.add(new SupportingFile("Project.nuspec.mustache", packageFolder, packageName + ".nuspec")); } - if (useSwashbuckle) { supportingFiles.add(new SupportingFile("Filters" + File.separator + "BasePathFilter.mustache", packageFolder + File.separator + "Filters", "BasePathFilter.cs")); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AvroSchemaCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AvroSchemaCodegen.java index 9ea0d8a7dd..6e96542eaa 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AvroSchemaCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AvroSchemaCodegen.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -20,11 +20,13 @@ import org.openapitools.codegen.*; import org.openapitools.codegen.meta.GeneratorMetadata; import org.openapitools.codegen.meta.Stability; +import org.openapitools.codegen.meta.features.*; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.io.File; import java.util.Arrays; +import java.util.EnumSet; import java.util.HashSet; import java.util.Map; @@ -41,6 +43,20 @@ public class AvroSchemaCodegen extends DefaultCodegen implements CodegenConfig { .stability(Stability.BETA) .build(); + // TODO: Avro maintainer review. + featureSet = getFeatureSet().modify() + .parameterFeatures(EnumSet.noneOf(ParameterFeature.class)) + .securityFeatures(EnumSet.noneOf(SecurityFeature.class)) + .wireFormatFeatures(EnumSet.noneOf(WireFormatFeature.class)) + .documentationFeatures(EnumSet.noneOf(DocumentationFeature.class)) + .globalFeatures(EnumSet.noneOf(GlobalFeature.class)) + .excludeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism, + SchemaSupportFeature.Union + ) + .clientModificationFeatures(EnumSet.noneOf(ClientModificationFeature.class)) + .build(); + outputFolder = "generated-code/avro-schema"; modelTemplateFiles.put("model.mustache", ".avsc"); // Force the model package to the package name so import can be fully qualified diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/BashClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/BashClientCodegen.java index 7965641d64..3c13a4a2f7 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/BashClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/BashClientCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -29,6 +29,7 @@ import io.swagger.v3.oas.models.servers.Server; import org.apache.commons.lang3.StringEscapeUtils; import org.apache.commons.lang3.StringUtils; import org.openapitools.codegen.*; +import org.openapitools.codegen.meta.features.*; import org.openapitools.codegen.utils.ModelUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -101,6 +102,31 @@ public class BashClientCodegen extends DefaultCodegen implements CodegenConfig { public BashClientCodegen() { super(); + // TODO: Bash maintainer review + featureSet = getFeatureSet().modify() + .documentationFeatures(EnumSet.of( + DocumentationFeature.Readme + )) + .securityFeatures(EnumSet.of( + SecurityFeature.OAuth2_Implicit, + SecurityFeature.BasicAuth, + SecurityFeature.BearerToken, + SecurityFeature.ApiKey + )) + .includeParameterFeatures( + ParameterFeature.Cookie + ) + .includeWireFormatFeatures( + WireFormatFeature.JSON, + WireFormatFeature.XML, + WireFormatFeature.Custom + ) + .excludeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism, + SchemaSupportFeature.Union + ) + .build(); + setReservedWordsLowerCase( Arrays.asList( "case", diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CLibcurlClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CLibcurlClientCodegen.java index bd14a843e6..24c035ab87 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CLibcurlClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CLibcurlClientCodegen.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -22,6 +22,7 @@ import io.swagger.v3.oas.models.media.Schema; import org.apache.commons.io.FilenameUtils; import org.apache.commons.lang3.StringUtils; import org.openapitools.codegen.*; +import org.openapitools.codegen.meta.features.*; import org.openapitools.codegen.utils.ModelUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -49,6 +50,31 @@ public class CLibcurlClientCodegen extends DefaultCodegen implements CodegenConf public CLibcurlClientCodegen() { super(); + // TODO: c maintainer review + // Assumes that C community considers api/model header files as documentation. + // Generator supports Basic, OAuth, and API key explicitly. Bearer is excluded although clients are able to set headers directly. + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures( + DocumentationFeature.Readme + ) + .securityFeatures(EnumSet.of( + SecurityFeature.OAuth2_Implicit, + SecurityFeature.BasicAuth, + SecurityFeature.ApiKey + )) + .excludeParameterFeatures( + ParameterFeature.Cookie + ) + .includeWireFormatFeatures( + WireFormatFeature.JSON, + WireFormatFeature.XML + ) + .excludeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism, + SchemaSupportFeature.Union + ) + .build(); + modelPackage = "models"; apiPackage = "api"; outputFolder = "generated-code" + File.separator + "C-libcurl"; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpClientCodegen.java index 99232bc47b..4f318bb2b5 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpClientCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -22,6 +22,7 @@ import com.samskivert.mustache.Mustache; import io.swagger.v3.oas.models.media.ArraySchema; import io.swagger.v3.oas.models.media.Schema; import org.openapitools.codegen.*; +import org.openapitools.codegen.meta.features.*; import org.openapitools.codegen.utils.ModelUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -78,6 +79,32 @@ public class CSharpClientCodegen extends AbstractCSharpCodegen { public CSharpClientCodegen() { super(); + + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .securityFeatures(EnumSet.of( + SecurityFeature.OAuth2_Implicit, + SecurityFeature.BasicAuth, + SecurityFeature.ApiKey + )) + .excludeGlobalFeatures( + GlobalFeature.XMLStructureDefinitions, + GlobalFeature.Callbacks, + GlobalFeature.LinkObjects, + GlobalFeature.ParameterStyling + ) + .includeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism + ) + .excludeParameterFeatures( + ParameterFeature.Cookie + ) + .includeClientModificationFeatures( + ClientModificationFeature.BasePath, + ClientModificationFeature.UserAgent + ) + .build(); + supportsInheritance = true; modelTemplateFiles.put("model.mustache", ".cs"); apiTemplateFiles.put("api.mustache", ".cs"); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpDotNet2ClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpDotNet2ClientCodegen.java index d3cd3a7306..11d32d5f05 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpDotNet2ClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpDotNet2ClientCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -24,6 +24,7 @@ import org.openapitools.codegen.SupportingFile; import org.openapitools.codegen.meta.GeneratorMetadata; import org.openapitools.codegen.meta.Stability; +import org.openapitools.codegen.meta.features.DocumentationFeature; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -40,6 +41,10 @@ public class CSharpDotNet2ClientCodegen extends AbstractCSharpCodegen { public CSharpDotNet2ClientCodegen() { super(); + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .build(); + generatorMetadata = GeneratorMetadata.newBuilder(generatorMetadata) .stability(Stability.DEPRECATED) .build(); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpNancyFXServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpNancyFXServerCodegen.java index c95fdcde9b..2ca162a2c5 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpNancyFXServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpNancyFXServerCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -22,6 +22,7 @@ import com.google.common.collect.*; import io.swagger.v3.oas.models.OpenAPI; import io.swagger.v3.oas.models.media.Schema; import org.openapitools.codegen.*; +import org.openapitools.codegen.meta.features.*; import org.openapitools.codegen.utils.ModelUtils; import org.openapitools.codegen.utils.URLPathUtils; import org.slf4j.Logger; @@ -66,6 +67,25 @@ public class CSharpNancyFXServerCodegen extends AbstractCSharpCodegen { private boolean asyncServer = false; public CSharpNancyFXServerCodegen() { + super(); + + featureSet = getFeatureSet().modify() + .excludeDocumentationFeatures(DocumentationFeature.Readme) + .securityFeatures(EnumSet.noneOf(SecurityFeature.class)) + .excludeGlobalFeatures( + GlobalFeature.XMLStructureDefinitions, + GlobalFeature.Callbacks, + GlobalFeature.LinkObjects, + GlobalFeature.ParameterStyling + ) + .includeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism + ) + .excludeParameterFeatures( + ParameterFeature.Cookie + ) + .build(); + outputFolder = "generated-code" + File.separator + getName(); apiTemplateFiles.put("api.mustache", ".cs"); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpNetCoreClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpNetCoreClientCodegen.java index 713b2d2de3..dbea3569a4 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpNetCoreClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpNetCoreClientCodegen.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -21,6 +21,7 @@ import com.samskivert.mustache.Mustache; import io.swagger.v3.oas.models.media.ArraySchema; import io.swagger.v3.oas.models.media.Schema; import org.openapitools.codegen.*; +import org.openapitools.codegen.meta.features.*; import org.openapitools.codegen.utils.ModelUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -83,6 +84,31 @@ public class CSharpNetCoreClientCodegen extends AbstractCSharpCodegen { public CSharpNetCoreClientCodegen() { super(); + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .securityFeatures(EnumSet.of( + SecurityFeature.OAuth2_Implicit, + SecurityFeature.BasicAuth, + SecurityFeature.ApiKey + )) + .excludeGlobalFeatures( + GlobalFeature.XMLStructureDefinitions, + GlobalFeature.Callbacks, + GlobalFeature.LinkObjects, + GlobalFeature.ParameterStyling + ) + .includeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism + ) + .includeParameterFeatures( + ParameterFeature.Cookie + ) + .includeClientModificationFeatures( + ClientModificationFeature.BasePath, + ClientModificationFeature.UserAgent + ) + .build(); + // mapped non-nullable type without ? typeMapping = new HashMap(); typeMapping.put("string", "string"); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ClojureClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ClojureClientCodegen.java index 7f8527cec8..6500a8a478 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ClojureClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ClojureClientCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -25,6 +25,7 @@ import io.swagger.v3.oas.models.media.ArraySchema; import io.swagger.v3.oas.models.media.Schema; import org.apache.commons.lang3.StringUtils; import org.openapitools.codegen.*; +import org.openapitools.codegen.meta.features.*; import org.openapitools.codegen.utils.ModelUtils; import java.io.File; @@ -56,6 +57,26 @@ public class ClojureClientCodegen extends DefaultCodegen implements CodegenConfi public ClojureClientCodegen() { super(); + + // TODO: Clojure maintainer review + featureSet = getFeatureSet().modify() + .excludeDocumentationFeatures( + DocumentationFeature.Readme + ) + .securityFeatures(EnumSet.of( + SecurityFeature.OAuth2_Implicit, + SecurityFeature.BasicAuth, + SecurityFeature.ApiKey + )) + .excludeParameterFeatures( + ParameterFeature.Cookie + ) + .excludeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism, + SchemaSupportFeature.Union + ) + .build(); + outputFolder = "generated-code" + File.separator + "clojure"; modelTemplateFiles.put("spec.mustache", ".clj"); apiTemplateFiles.put("api.mustache", ".clj"); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ConfluenceWikiCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ConfluenceWikiCodegen.java index 545fc55308..e368355cc6 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ConfluenceWikiCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ConfluenceWikiCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -20,6 +20,7 @@ package org.openapitools.codegen.languages; import io.swagger.v3.oas.models.media.ArraySchema; import io.swagger.v3.oas.models.media.Schema; import org.openapitools.codegen.*; +import org.openapitools.codegen.meta.features.*; import org.openapitools.codegen.utils.ModelUtils; import java.util.*; @@ -33,6 +34,23 @@ public class ConfluenceWikiCodegen extends DefaultCodegen implements CodegenConf public ConfluenceWikiCodegen() { super(); + + // TODO: ConfluenceWiki maintainer review + featureSet = getFeatureSet().modify() + .documentationFeatures(EnumSet.noneOf(DocumentationFeature.class)) + .securityFeatures(EnumSet.noneOf(SecurityFeature.class)) + .excludeParameterFeatures(ParameterFeature.Cookie) + .includeWireFormatFeatures( + WireFormatFeature.JSON, + WireFormatFeature.XML, + WireFormatFeature.Custom + ) + .excludeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism, + SchemaSupportFeature.Union + ) + .build(); + outputFolder = "docs"; embeddedTemplateDir = templateDir = "confluenceWikiDocs"; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppPistacheServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppPistacheServerCodegen.java index 3de0cbf5b9..6d9ba3c32e 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppPistacheServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppPistacheServerCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -22,17 +22,15 @@ import io.swagger.v3.oas.models.media.ArraySchema; import io.swagger.v3.oas.models.media.Schema; import io.swagger.v3.oas.models.responses.ApiResponse; import io.swagger.v3.oas.models.servers.Server; -import io.swagger.v3.oas.models.OpenAPI; import org.apache.commons.lang3.StringUtils; import org.openapitools.codegen.*; +import org.openapitools.codegen.meta.features.*; import org.openapitools.codegen.utils.ModelUtils; -import org.openapitools.codegen.utils.URLPathUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.io.File; import java.util.*; -import java.net.URL; import static org.openapitools.codegen.utils.StringUtils.*; @@ -67,6 +65,26 @@ public class CppPistacheServerCodegen extends AbstractCppCodegen { public CppPistacheServerCodegen() { super(); + + // TODO: cpp-pistache-server maintainer review + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .securityFeatures(EnumSet.noneOf(SecurityFeature.class)) + .excludeGlobalFeatures( + GlobalFeature.XMLStructureDefinitions, + GlobalFeature.Callbacks, + GlobalFeature.LinkObjects, + GlobalFeature.ParameterStyling, + GlobalFeature.MultiServer + ) + .excludeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism + ) + .excludeParameterFeatures( + ParameterFeature.Cookie + ) + .build(); + if (StringUtils.isEmpty(modelNamePrefix)) { modelNamePrefix = PREFIX; } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppQt5AbstractCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppQt5AbstractCodegen.java index 7ab3d8bfef..22150b58bf 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppQt5AbstractCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppQt5AbstractCodegen.java @@ -9,6 +9,7 @@ import org.openapitools.codegen.CodegenConstants; import org.openapitools.codegen.CodegenModel; import org.openapitools.codegen.CodegenOperation; import org.openapitools.codegen.CodegenParameter; +import org.openapitools.codegen.meta.features.*; import org.openapitools.codegen.utils.ModelUtils; import java.io.File; @@ -29,6 +30,25 @@ public class CppQt5AbstractCodegen extends AbstractCppCodegen implements Codegen public CppQt5AbstractCodegen() { super(); + + featureSet = getFeatureSet().modify() + .excludeWireFormatFeatures(WireFormatFeature.PROTOBUF) + .securityFeatures(EnumSet.noneOf(SecurityFeature.class)) + .excludeGlobalFeatures( + GlobalFeature.XMLStructureDefinitions, + GlobalFeature.Callbacks, + GlobalFeature.LinkObjects, + GlobalFeature.ParameterStyling, + GlobalFeature.MultiServer + ) + .includeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism + ) + .includeParameterFeatures( + ParameterFeature.Cookie + ) + .build(); + // set modelNamePrefix as default for QHttpEngine Server if (StringUtils.isEmpty(modelNamePrefix)) { modelNamePrefix = PREFIX; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppQt5ClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppQt5ClientCodegen.java index 449e2b8351..a199ab9f70 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppQt5ClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppQt5ClientCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppQt5QHttpEngineServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppQt5QHttpEngineServerCodegen.java index a462164107..74f668f369 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppQt5QHttpEngineServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppQt5QHttpEngineServerCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -23,6 +23,7 @@ import io.swagger.v3.oas.models.servers.Server; import org.openapitools.codegen.CodegenConfig; import org.openapitools.codegen.CodegenType; import org.openapitools.codegen.SupportingFile; +import org.openapitools.codegen.meta.features.DocumentationFeature; import org.openapitools.codegen.utils.URLPathUtils; import java.io.File; @@ -43,6 +44,10 @@ public class CppQt5QHttpEngineServerCodegen extends CppQt5AbstractCodegen implem public CppQt5QHttpEngineServerCodegen() { super(); + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .build(); + // set the output folder here outputFolder = "generated-code/cpp-qt5-qhttpengine-server"; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppRestSdkClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppRestSdkClientCodegen.java index 25be57289d..8058932f91 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppRestSdkClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppRestSdkClientCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -26,12 +26,12 @@ import io.swagger.v3.oas.models.responses.ApiResponse; import io.swagger.v3.oas.models.servers.Server; import org.apache.commons.lang3.StringUtils; import org.openapitools.codegen.*; +import org.openapitools.codegen.meta.features.*; import org.openapitools.codegen.utils.ModelUtils; import java.util.*; import static com.google.common.base.Strings.isNullOrEmpty; -import static org.openapitools.codegen.utils.StringUtils.*; public class CppRestSdkClientCodegen extends AbstractCppCodegen { @@ -79,6 +79,29 @@ public class CppRestSdkClientCodegen extends AbstractCppCodegen { public CppRestSdkClientCodegen() { super(); + // TODO: cpp-restsdk maintainer review + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .securityFeatures(EnumSet.of( + SecurityFeature.BasicAuth, + SecurityFeature.OAuth2_Implicit, + SecurityFeature.ApiKey + )) + .excludeGlobalFeatures( + GlobalFeature.XMLStructureDefinitions, + GlobalFeature.Callbacks, + GlobalFeature.LinkObjects, + GlobalFeature.ParameterStyling, + GlobalFeature.MultiServer + ) + .includeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism + ) + .excludeParameterFeatures( + ParameterFeature.Cookie + ) + .build(); + apiPackage = "org.openapitools.client.api"; modelPackage = "org.openapitools.client.model"; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppRestbedServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppRestbedServerCodegen.java index 798639807b..fa22aef268 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppRestbedServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppRestbedServerCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -21,11 +21,13 @@ import io.swagger.v3.oas.models.media.ArraySchema; import io.swagger.v3.oas.models.media.Schema; import org.apache.commons.lang3.StringUtils; import org.openapitools.codegen.*; +import org.openapitools.codegen.meta.features.*; import org.openapitools.codegen.utils.ModelUtils; import org.slf4j.LoggerFactory; import java.io.File; import java.util.*; +import java.util.Map.Entry; import static org.openapitools.codegen.utils.StringUtils.*; @@ -43,6 +45,25 @@ public class CppRestbedServerCodegen extends AbstractCppCodegen { public CppRestbedServerCodegen() { super(); + // TODO: cpp-restbed-server maintainer review + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .securityFeatures(EnumSet.noneOf(SecurityFeature.class)) + .excludeGlobalFeatures( + GlobalFeature.XMLStructureDefinitions, + GlobalFeature.Callbacks, + GlobalFeature.LinkObjects, + GlobalFeature.ParameterStyling, + GlobalFeature.MultiServer + ) + .excludeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism + ) + .excludeParameterFeatures( + ParameterFeature.Cookie + ) + .build(); + apiPackage = "org.openapitools.server.api"; modelPackage = "org.openapitools.server.model"; @@ -100,6 +121,52 @@ public class CppRestbedServerCodegen extends AbstractCppCodegen { importMapping.put("restbed::Bytes", "#include "); } + @Override + public Map updateAllModels(Map objs) { + // Index all CodegenModels by model name. + Map allModels = getAllModels(objs); + + // Clean interfaces of ambiguity + for (Entry cm : allModels.entrySet()) { + if (cm.getValue().getInterfaces() != null && !cm.getValue().getInterfaces().isEmpty()) { + List newIntf = new ArrayList(cm.getValue().getInterfaces()); + + for (String intf : allModels.get(cm.getKey()).getInterfaces()) { + if (allModels.get(intf).getInterfaces() != null && !allModels.get(intf).getInterfaces().isEmpty()) { + for (String intfInner : allModels.get(intf).getInterfaces()) { + newIntf.remove(intfInner); + } + } + } + cm.getValue().setInterfaces(newIntf); + } + } + + objs = super.updateAllModels(objs); + return objs; + } + + /** + * Camelize the method name of the getter and setter, but keep underscores at the front + * + * @param name string to be camelized + * @return Camelized string + */ + @Override + public String getterAndSetterCapitalize(String name) { + if (name == null || name.length() == 0) { + return name; + } + + name = toVarName(name); + + if (name.startsWith("_")) { + return "_" + camelize(name); + } + + return camelize(name); + } + /** * Configures the type of generator. * @@ -187,11 +254,13 @@ public class CppRestbedServerCodegen extends AbstractCppCodegen { codegenModel.imports.add(newImp); } } - + // Import vector if an enum is present + if (codegenModel.hasEnums) { + codegenModel.imports.add("#include "); + } return codegenModel; } - @Override public String toModelFilename(String name) { return toModelName(name); @@ -355,7 +424,7 @@ public class CppRestbedServerCodegen extends AbstractCppCodegen { } return "std::vector<" + inner + ">()"; } else if (!StringUtils.isEmpty(p.get$ref())) { - return "new " + toModelName(ModelUtils.getSimpleRef(p.get$ref())) + "()"; + return "std::make_shared<" + toModelName(ModelUtils.getSimpleRef(p.get$ref())) + ">()"; } return "nullptr"; @@ -371,6 +440,7 @@ public class CppRestbedServerCodegen extends AbstractCppCodegen { if (!isPrimitiveType && !isListContainer && !isString && !parameter.dataType.startsWith("std::shared_ptr")) { parameter.dataType = "std::shared_ptr<" + parameter.dataType + ">"; + parameter.defaultValue = "std::make_shared<" + parameter.dataType + ">()"; } } @@ -393,4 +463,12 @@ public class CppRestbedServerCodegen extends AbstractCppCodegen { type = openAPIType; return toModelName(type); } + + @Override + public void updateCodegenPropertyEnum(CodegenProperty var) { + // Remove prefix added by DefaultCodegen + String originalDefaultValue = var.defaultValue; + super.updateCodegenPropertyEnum(var); + var.defaultValue = originalDefaultValue; + } } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppTizenClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppTizenClientCodegen.java index f22e668550..970753d6a2 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppTizenClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppTizenClientCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -23,10 +23,12 @@ import org.apache.commons.lang3.StringUtils; import org.openapitools.codegen.CodegenConfig; import org.openapitools.codegen.CodegenType; import org.openapitools.codegen.SupportingFile; +import org.openapitools.codegen.meta.features.*; import org.openapitools.codegen.utils.ModelUtils; import java.io.File; import java.util.Arrays; +import java.util.EnumSet; import java.util.HashMap; import java.util.HashSet; @@ -39,6 +41,28 @@ public class CppTizenClientCodegen extends AbstractCppCodegen implements Codegen public CppTizenClientCodegen() { super(); + + // TODO: cpp-tizen maintainer review + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .securityFeatures(EnumSet.of( + SecurityFeature.BearerToken + )) + .excludeGlobalFeatures( + GlobalFeature.XMLStructureDefinitions, + GlobalFeature.Callbacks, + GlobalFeature.LinkObjects, + GlobalFeature.ParameterStyling, + GlobalFeature.MultiServer + ) + .excludeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism + ) + .excludeParameterFeatures( + ParameterFeature.Cookie + ) + .build(); + outputFolder = ""; modelTemplateFiles.put("model-header.mustache", ".h"); modelTemplateFiles.put("model-body.mustache", ".cpp"); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartClientCodegen.java index 4f6d03b4ca..8a2ce0f289 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartClientCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -22,6 +22,7 @@ import io.swagger.v3.oas.models.media.Schema; import org.apache.commons.io.FilenameUtils; import org.apache.commons.lang3.StringUtils; import org.openapitools.codegen.*; +import org.openapitools.codegen.meta.features.*; import org.openapitools.codegen.utils.ModelUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -36,37 +37,6 @@ import java.util.*; import static org.openapitools.codegen.utils.StringUtils.camelize; import static org.openapitools.codegen.utils.StringUtils.underscore; -// import static org.openapitools.codegen.utils.StringUtils.camelize; -// import static org.openapitools.codegen.utils.StringUtils.underscore; - -// import java.io.BufferedReader; -// import java.io.File; -// import java.io.FileInputStream; -// import java.io.InputStreamReader; -// import java.nio.charset.Charset; -// import java.util.ArrayList; -// import java.util.Arrays; -// import java.util.HashMap; -// import java.util.HashSet; -// import java.util.List; -// import java.util.Map; -// import java.util.Set; - -// import javax.xml.validation.Schema; - -// import org.apache.commons.io.FilenameUtils; -// import org.openapitools.codegen.CodegenConfig; -// import org.openapitools.codegen.CodegenConstants; -// import org.openapitools.codegen.CodegenModel; -// import org.openapitools.codegen.CodegenProperty; -// import org.openapitools.codegen.CodegenType; -// import org.openapitools.codegen.DefaultCodegen; -// import org.openapitools.codegen.utils.ModelUtils; -// import org.openapitools.codegen.utils.StringUtils; -// import org.slf4j.LoggerFactory; - -// import io.swagger.v3.oas.models.media.ArraySchema; - public class DartClientCodegen extends DefaultCodegen implements CodegenConfig { private static final Logger LOGGER = LoggerFactory.getLogger(DartClientCodegen.class); @@ -96,6 +66,30 @@ public class DartClientCodegen extends DefaultCodegen implements CodegenConfig { public DartClientCodegen() { super(); + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .securityFeatures(EnumSet.of( + SecurityFeature.OAuth2_Implicit, + SecurityFeature.BasicAuth, + SecurityFeature.ApiKey + )) + .excludeGlobalFeatures( + GlobalFeature.XMLStructureDefinitions, + GlobalFeature.Callbacks, + GlobalFeature.LinkObjects, + GlobalFeature.ParameterStyling + ) + .excludeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism + ) + .includeParameterFeatures( + ParameterFeature.Cookie + ) + .includeClientModificationFeatures( + ClientModificationFeature.BasePath + ) + .build(); + // clear import mapping (from default generator) as dart does not use it at the moment importMapping.clear(); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartDioClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartDioClientCodegen.java index f5e82b6c2b..af85710ef7 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartDioClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartDioClientCodegen.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -232,6 +232,8 @@ public class DartDioClientCodegen extends DartClientCodegen { supportingFiles.add(new SupportingFile("pubspec.mustache", "", "pubspec.yaml")); supportingFiles.add(new SupportingFile("analysis_options.mustache", "", "analysis_options.yaml")); supportingFiles.add(new SupportingFile("apilib.mustache", libFolder, "api.dart")); + supportingFiles.add(new SupportingFile("api_util.mustache", libFolder, "api_util.dart")); + supportingFiles.add(new SupportingFile("serializers.mustache", libFolder, "serializers.dart")); supportingFiles.add(new SupportingFile("gitignore.mustache", "", ".gitignore")); @@ -241,15 +243,13 @@ public class DartDioClientCodegen extends DartClientCodegen { additionalProperties.put("core", "true"); typeMapping.put("Date", "DateTime"); typeMapping.put("date", "DateTime"); - importMapping.put("DateTime", "DateTime"); - importMapping.put("OffsetDateTime", "DateTime"); } else if ("timemachine".equals(dateLibrary)) { additionalProperties.put("timeMachine", "true"); - typeMapping.put("date", "LocalDate"); - typeMapping.put("Date", "LocalDate"); + typeMapping.put("date", "OffsetDate"); + typeMapping.put("Date", "OffsetDate"); typeMapping.put("DateTime", "OffsetDateTime"); typeMapping.put("datetime", "OffsetDateTime"); - importMapping.put("LocalDate", "package:time_machine/time_machine.dart"); + importMapping.put("OffsetDate", "package:time_machine/time_machine.dart"); importMapping.put("OffsetDateTime", "package:time_machine/time_machine.dart"); supportingFiles.add(new SupportingFile("local_date_serializer.mustache", libFolder, "local_date_serializer.dart")); @@ -346,6 +346,10 @@ public class DartDioClientCodegen extends DartClientCodegen { op.vendorExtensions.put("isForm", isForm); op.vendorExtensions.put("isMultipart", isMultipart); + if (op.getHasFormParams()) { + fullImports.add("package:" + pubName + "/api_util.dart"); + } + Set imports = new HashSet<>(); for (String item : op.imports) { if (!modelToIgnore.contains(item.toLowerCase(Locale.ROOT))) { @@ -356,6 +360,7 @@ public class DartDioClientCodegen extends DartClientCodegen { } modelImports.addAll(imports); op.imports = imports; + } objs.put("modelImports", modelImports); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartJaguarClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartJaguarClientCodegen.java index 88cf8535b4..9cc531c096 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartJaguarClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartJaguarClientCodegen.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,6 +17,7 @@ package org.openapitools.codegen.languages; import org.openapitools.codegen.*; +import org.openapitools.codegen.meta.features.*; import org.openapitools.codegen.utils.ModelUtils; import io.swagger.v3.oas.models.media.*; @@ -56,6 +57,31 @@ public class DartJaguarClientCodegen extends DartClientCodegen { public DartJaguarClientCodegen() { super(); + + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .securityFeatures(EnumSet.of( + SecurityFeature.OAuth2_Implicit, + SecurityFeature.BasicAuth, + SecurityFeature.ApiKey + )) + .excludeGlobalFeatures( + GlobalFeature.XMLStructureDefinitions, + GlobalFeature.Callbacks, + GlobalFeature.LinkObjects, + GlobalFeature.ParameterStyling + ) + .excludeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism + ) + .includeParameterFeatures( + ParameterFeature.Cookie + ) + .includeClientModificationFeatures( + ClientModificationFeature.BasePath + ) + .build(); + browserClient = false; outputFolder = "generated-code/dart-jaguar"; embeddedTemplateDir = templateDir = "dart-jaguar"; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/EiffelClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/EiffelClientCodegen.java index 8f7125ae3d..e1f2979564 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/EiffelClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/EiffelClientCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -21,10 +21,12 @@ import org.openapitools.codegen.CodegenConstants; import org.openapitools.codegen.CodegenProperty; import org.openapitools.codegen.CodegenType; import org.openapitools.codegen.SupportingFile; +import org.openapitools.codegen.meta.features.*; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.io.File; +import java.util.EnumSet; import java.util.Locale; import java.util.UUID; @@ -58,6 +60,32 @@ public class EiffelClientCodegen extends AbstractEiffelCodegen { public EiffelClientCodegen() { super(); + + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .securityFeatures(EnumSet.of( + SecurityFeature.OAuth2_Implicit, + SecurityFeature.BasicAuth, + SecurityFeature.ApiKey + )) + .excludeGlobalFeatures( + GlobalFeature.XMLStructureDefinitions, + GlobalFeature.Callbacks, + GlobalFeature.LinkObjects, + GlobalFeature.ParameterStyling + ) + .includeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism + ) + .excludeParameterFeatures( + ParameterFeature.Cookie + ) + .includeClientModificationFeatures( + ClientModificationFeature.BasePath, + ClientModificationFeature.UserAgent + ) + .build(); + uuid = UUID.randomUUID(); uuidTest = UUID.randomUUID(); outputFolder = "generated-code/Eiffel"; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ElixirClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ElixirClientCodegen.java index 165ec84281..d96f85319a 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ElixirClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ElixirClientCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -26,6 +26,7 @@ import io.swagger.v3.oas.models.media.Schema; import io.swagger.v3.oas.models.responses.ApiResponse; import org.apache.commons.lang3.StringUtils; import org.openapitools.codegen.*; +import org.openapitools.codegen.meta.features.*; import org.openapitools.codegen.utils.ModelUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -60,6 +61,29 @@ public class ElixirClientCodegen extends DefaultCodegen implements CodegenConfig public ElixirClientCodegen() { super(); + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .securityFeatures(EnumSet.of( + SecurityFeature.OAuth2_Implicit, + SecurityFeature.BasicAuth + )) + .excludeGlobalFeatures( + GlobalFeature.XMLStructureDefinitions, + GlobalFeature.Callbacks, + GlobalFeature.LinkObjects, + GlobalFeature.ParameterStyling + ) + .excludeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism + ) + .excludeParameterFeatures( + ParameterFeature.Cookie + ) + .includeClientModificationFeatures( + ClientModificationFeature.BasePath + ) + .build(); + // set the output folder here outputFolder = "generated-code/elixir"; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ElmClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ElmClientCodegen.java index 29efd452af..bbaa110b3f 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ElmClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ElmClientCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -23,6 +23,7 @@ import io.swagger.v3.oas.models.responses.ApiResponse; import org.apache.commons.io.FilenameUtils; import org.apache.commons.lang3.StringUtils; import org.openapitools.codegen.*; +import org.openapitools.codegen.meta.features.*; import org.openapitools.codegen.utils.ModelUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -57,6 +58,28 @@ public class ElmClientCodegen extends DefaultCodegen implements CodegenConfig { public ElmClientCodegen() { super(); + + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .wireFormatFeatures(EnumSet.of(WireFormatFeature.JSON)) + .securityFeatures(EnumSet.noneOf(SecurityFeature.class)) + .excludeGlobalFeatures( + GlobalFeature.XMLStructureDefinitions, + GlobalFeature.Callbacks, + GlobalFeature.LinkObjects, + GlobalFeature.ParameterStyling + ) + .excludeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism + ) + .excludeParameterFeatures( + ParameterFeature.Cookie + ) + .includeClientModificationFeatures( + ClientModificationFeature.BasePath + ) + .build(); + templateDir = "elm"; apiPackage = "Api.Request"; modelPackage = "Api"; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ErlangClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ErlangClientCodegen.java index f924229a17..02a25cd9cf 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ErlangClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ErlangClientCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -21,6 +21,7 @@ import com.samskivert.mustache.Mustache; import com.samskivert.mustache.Template; import io.swagger.v3.oas.models.media.Schema; import org.openapitools.codegen.*; +import org.openapitools.codegen.meta.features.*; import org.openapitools.codegen.templating.mustache.JoinWithCommaLambda; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -56,6 +57,28 @@ public class ErlangClientCodegen extends DefaultCodegen implements CodegenConfig public ErlangClientCodegen() { super(); + + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .wireFormatFeatures(EnumSet.of(WireFormatFeature.JSON)) + .securityFeatures(EnumSet.of(SecurityFeature.ApiKey)) + .excludeGlobalFeatures( + GlobalFeature.XMLStructureDefinitions, + GlobalFeature.Callbacks, + GlobalFeature.LinkObjects, + GlobalFeature.ParameterStyling + ) + .excludeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism + ) + .excludeParameterFeatures( + ParameterFeature.Cookie + ) + .includeClientModificationFeatures( + ClientModificationFeature.BasePath + ) + .build(); + outputFolder = "generated-code/erlang"; modelTemplateFiles.put("model.mustache", ".erl"); apiTemplateFiles.put("api.mustache", ".erl"); @@ -101,7 +124,7 @@ public class ErlangClientCodegen extends DefaultCodegen implements CodegenConfig cliOptions.clear(); cliOptions.add(new CliOption(CodegenConstants.PACKAGE_NAME, "Erlang application name (convention: lowercase).") .defaultValue(this.packageName)); - cliOptions.add(new CliOption(CodegenConstants.PACKAGE_NAME, "Erlang application version") + cliOptions.add(new CliOption(CodegenConstants.PACKAGE_VERSION, "Erlang application version") .defaultValue(this.packageVersion)); } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ErlangProperCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ErlangProperCodegen.java index 011501670b..b48eb615be 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ErlangProperCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ErlangProperCodegen.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -21,6 +21,7 @@ import com.samskivert.mustache.Template; import io.swagger.v3.oas.models.media.ArraySchema; import io.swagger.v3.oas.models.media.Schema; import org.openapitools.codegen.*; +import org.openapitools.codegen.meta.features.*; import org.openapitools.codegen.utils.ModelUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -58,6 +59,31 @@ public class ErlangProperCodegen extends DefaultCodegen implements CodegenConfig public ErlangProperCodegen() { super(); + + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .wireFormatFeatures(EnumSet.of(WireFormatFeature.JSON)) + .securityFeatures(EnumSet.of( + SecurityFeature.ApiKey, + SecurityFeature.BasicAuth + )) + .excludeGlobalFeatures( + GlobalFeature.XMLStructureDefinitions, + GlobalFeature.Callbacks, + GlobalFeature.LinkObjects, + GlobalFeature.ParameterStyling + ) + .excludeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism + ) + .excludeParameterFeatures( + ParameterFeature.Cookie + ) + .includeClientModificationFeatures( + ClientModificationFeature.BasePath + ) + .build(); + outputFolder = "generated-code/erlang"; modelTemplateFiles.put("model.mustache", ".erl"); apiTemplateFiles.put("api.mustache", "_api.erl"); @@ -104,7 +130,7 @@ public class ErlangProperCodegen extends DefaultCodegen implements CodegenConfig cliOptions.clear(); cliOptions.add(new CliOption(CodegenConstants.PACKAGE_NAME, "Erlang application name (convention: lowercase).") .defaultValue(this.packageName)); - cliOptions.add(new CliOption(CodegenConstants.PACKAGE_NAME, "Erlang application version") + cliOptions.add(new CliOption(CodegenConstants.PACKAGE_VERSION, "Erlang application version") .defaultValue(this.packageVersion)); } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ErlangServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ErlangServerCodegen.java index d9c280cfc6..068c36a6ff 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ErlangServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ErlangServerCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -18,11 +18,13 @@ package org.openapitools.codegen.languages; import org.openapitools.codegen.*; +import org.openapitools.codegen.meta.features.*; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.io.File; import java.util.Arrays; +import java.util.EnumSet; import java.util.List; import java.util.Map; @@ -41,6 +43,27 @@ public class ErlangServerCodegen extends DefaultCodegen implements CodegenConfig public ErlangServerCodegen() { super(); + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .wireFormatFeatures(EnumSet.of(WireFormatFeature.JSON)) + .securityFeatures(EnumSet.of( + SecurityFeature.ApiKey, + SecurityFeature.OAuth2_Implicit + )) + .excludeGlobalFeatures( + GlobalFeature.XMLStructureDefinitions, + GlobalFeature.Callbacks, + GlobalFeature.LinkObjects, + GlobalFeature.ParameterStyling + ) + .excludeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism + ) + .excludeParameterFeatures( + ParameterFeature.Cookie + ) + .build(); + // set the output folder here outputFolder = "generated-code/erlang-server"; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/FlashClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/FlashClientCodegen.java index ec5a866705..c5a38e1807 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/FlashClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/FlashClientCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -20,12 +20,14 @@ package org.openapitools.codegen.languages; import io.swagger.v3.oas.models.media.Schema; import org.apache.commons.lang3.StringUtils; import org.openapitools.codegen.*; +import org.openapitools.codegen.meta.features.*; import org.openapitools.codegen.utils.ModelUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.io.File; import java.util.Arrays; +import java.util.EnumSet; import java.util.HashMap; import java.util.Locale; @@ -44,6 +46,29 @@ public class FlashClientCodegen extends DefaultCodegen implements CodegenConfig public FlashClientCodegen() { super(); + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .wireFormatFeatures(EnumSet.of(WireFormatFeature.JSON, WireFormatFeature.XML)) + .securityFeatures(EnumSet.of( + SecurityFeature.ApiKey + )) + .excludeGlobalFeatures( + GlobalFeature.XMLStructureDefinitions, + GlobalFeature.Callbacks, + GlobalFeature.LinkObjects, + GlobalFeature.ParameterStyling + ) + .excludeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism + ) + .excludeParameterFeatures( + ParameterFeature.Cookie + ) + .includeClientModificationFeatures( + ClientModificationFeature.BasePath + ) + .build(); + modelPackage = "org.openapitools.client.model"; apiPackage = "org.openapitools.client.api"; outputFolder = "generated-code" + File.separatorChar + "flash"; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/FsharpFunctionsServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/FsharpFunctionsServerCodegen.java index c82a819bd9..a90446eab2 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/FsharpFunctionsServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/FsharpFunctionsServerCodegen.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -29,6 +29,7 @@ import java.util.*; import org.apache.commons.lang3.StringUtils; +import org.openapitools.codegen.meta.features.*; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -52,6 +53,29 @@ public class FsharpFunctionsServerCodegen extends AbstractFSharpCodegen { public FsharpFunctionsServerCodegen() { super(); + // TODO: There's a README.mustache, but it doesn't seem to be referenced… + featureSet = getFeatureSet().modify() +// .includeDocumentationFeatures(DocumentationFeature.Readme) + .wireFormatFeatures(EnumSet.of(WireFormatFeature.JSON)) + .securityFeatures(EnumSet.noneOf( + SecurityFeature.class + )) + .excludeGlobalFeatures( + GlobalFeature.XMLStructureDefinitions, + GlobalFeature.Callbacks, + GlobalFeature.LinkObjects, + GlobalFeature.ParameterStyling, + GlobalFeature.BasePath, + GlobalFeature.Host + ) + .excludeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism + ) + .includeParameterFeatures( + ParameterFeature.Cookie + ) + .build(); + generatorMetadata = GeneratorMetadata.newBuilder(generatorMetadata) .stability(Stability.BETA) .build(); @@ -115,8 +139,6 @@ public class FsharpFunctionsServerCodegen extends AbstractFSharpCodegen { supportingFiles.add(new SupportingFile("host.json", "", "host.json")); supportingFiles.add(new SupportingFile("local.settings.json", "", "local.settings.json")); supportingFiles.add(new SupportingFile("Project.fsproj.mustache", projectFolder, packageName + ".fsproj")); - - } @Override diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/FsharpGiraffeServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/FsharpGiraffeServerCodegen.java index c3f172713b..ea4c79468b 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/FsharpGiraffeServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/FsharpGiraffeServerCodegen.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -25,6 +25,7 @@ import org.openapitools.codegen.CodegenType; import org.openapitools.codegen.meta.GeneratorMetadata; import org.openapitools.codegen.meta.Stability; import org.openapitools.codegen.SupportingFile; +import org.openapitools.codegen.meta.features.DocumentationFeature; import org.openapitools.codegen.utils.URLPathUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -60,6 +61,9 @@ public class FsharpGiraffeServerCodegen extends AbstractFSharpCodegen { public FsharpGiraffeServerCodegen() { super(); + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .build(); generatorMetadata = GeneratorMetadata.newBuilder(generatorMetadata) .stability(Stability.BETA) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GoClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GoClientCodegen.java index 9e5080cf1f..ae267797fb 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GoClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GoClientCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -21,10 +21,12 @@ import org.openapitools.codegen.CliOption; import org.openapitools.codegen.CodegenConstants; import org.openapitools.codegen.CodegenType; import org.openapitools.codegen.SupportingFile; +import org.openapitools.codegen.meta.features.*; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.io.File; +import java.util.EnumSet; public class GoClientCodegen extends AbstractGoCodegen { @@ -42,6 +44,32 @@ public class GoClientCodegen extends AbstractGoCodegen { public GoClientCodegen() { super(); + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .wireFormatFeatures(EnumSet.of(WireFormatFeature.JSON, WireFormatFeature.XML)) + .securityFeatures(EnumSet.of( + SecurityFeature.BasicAuth, + SecurityFeature.ApiKey, + SecurityFeature.OAuth2_Implicit + )) + .excludeGlobalFeatures( + GlobalFeature.XMLStructureDefinitions, + GlobalFeature.Callbacks, + GlobalFeature.LinkObjects, + GlobalFeature.ParameterStyling + ) + .excludeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism + ) + .includeParameterFeatures( + ParameterFeature.Cookie + ) + .includeClientModificationFeatures( + ClientModificationFeature.BasePath, + ClientModificationFeature.UserAgent + ) + .build(); + outputFolder = "generated-code/go"; modelTemplateFiles.put("model.mustache", ".go"); apiTemplateFiles.put("api.mustache", ".go"); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GoClientExperimentalCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GoClientExperimentalCodegen.java index 76d2650496..29e7f55860 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GoClientExperimentalCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GoClientExperimentalCodegen.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -36,6 +36,8 @@ public class GoClientExperimentalCodegen extends GoClientCodegen { outputFolder = "generated-code/go-experimental"; embeddedTemplateDir = templateDir = "go-experimental"; + usesOptionals = false; + generatorMetadata = GeneratorMetadata.newBuilder(generatorMetadata).stability(Stability.EXPERIMENTAL).build(); } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GoGinServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GoGinServerCodegen.java index 46509d8b55..632d4c3eb2 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GoGinServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GoGinServerCodegen.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -20,11 +20,13 @@ import org.openapitools.codegen.CodegenConstants; import org.openapitools.codegen.CodegenOperation; import org.openapitools.codegen.CodegenType; import org.openapitools.codegen.SupportingFile; +import org.openapitools.codegen.meta.features.*; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.io.File; import java.util.Arrays; +import java.util.EnumSet; import java.util.List; import java.util.Map; @@ -40,6 +42,26 @@ public class GoGinServerCodegen extends AbstractGoCodegen { public GoGinServerCodegen() { super(); + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .wireFormatFeatures(EnumSet.of(WireFormatFeature.JSON, WireFormatFeature.XML)) + .securityFeatures(EnumSet.noneOf( + SecurityFeature.class + )) + .excludeGlobalFeatures( + GlobalFeature.XMLStructureDefinitions, + GlobalFeature.Callbacks, + GlobalFeature.LinkObjects, + GlobalFeature.ParameterStyling + ) + .excludeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism + ) + .excludeParameterFeatures( + ParameterFeature.Cookie + ) + .build(); + // set the output folder here outputFolder = "generated-code/go"; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GoServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GoServerCodegen.java index e37f80bf40..0828146346 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GoServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GoServerCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -23,11 +23,13 @@ import org.openapitools.codegen.CodegenOperation; import org.openapitools.codegen.CodegenParameter; import org.openapitools.codegen.CodegenType; import org.openapitools.codegen.SupportingFile; +import org.openapitools.codegen.meta.features.*; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.io.File; import java.util.Arrays; +import java.util.EnumSet; import java.util.List; import java.util.Map; @@ -45,6 +47,26 @@ public class GoServerCodegen extends AbstractGoCodegen { public GoServerCodegen() { super(); + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .wireFormatFeatures(EnumSet.of(WireFormatFeature.JSON, WireFormatFeature.XML)) + .securityFeatures(EnumSet.noneOf( + SecurityFeature.class + )) + .excludeGlobalFeatures( + GlobalFeature.XMLStructureDefinitions, + GlobalFeature.Callbacks, + GlobalFeature.LinkObjects, + GlobalFeature.ParameterStyling + ) + .excludeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism + ) + .excludeParameterFeatures( + ParameterFeature.Cookie + ) + .build(); + // set the output folder here outputFolder = "generated-code/go"; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GraphQLNodeJSExpressServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GraphQLNodeJSExpressServerCodegen.java index fbf8e0b7cb..bebc631748 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GraphQLNodeJSExpressServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GraphQLNodeJSExpressServerCodegen.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -20,11 +20,13 @@ import io.swagger.v3.oas.models.media.ArraySchema; import io.swagger.v3.oas.models.media.Schema; import org.apache.commons.lang3.StringUtils; import org.openapitools.codegen.*; +import org.openapitools.codegen.meta.features.*; import org.openapitools.codegen.utils.ModelUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.io.File; +import java.util.EnumSet; public class GraphQLNodeJSExpressServerCodegen extends AbstractGraphQLCodegen implements CodegenConfig { @@ -48,6 +50,26 @@ public class GraphQLNodeJSExpressServerCodegen extends AbstractGraphQLCodegen im public GraphQLNodeJSExpressServerCodegen() { super(); + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .wireFormatFeatures(EnumSet.of(WireFormatFeature.JSON)) + .securityFeatures(EnumSet.noneOf( + SecurityFeature.class + )) + .excludeGlobalFeatures( + GlobalFeature.XMLStructureDefinitions, + GlobalFeature.Callbacks, + GlobalFeature.LinkObjects, + GlobalFeature.ParameterStyling + ) + .excludeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism + ) + .excludeParameterFeatures( + ParameterFeature.Cookie + ) + .build(); + packageName = "openapi3graphql-server"; packageVersion = "1.0.0"; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GraphQLSchemaCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GraphQLSchemaCodegen.java index bb135be8f2..99c13c2005 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GraphQLSchemaCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GraphQLSchemaCodegen.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -20,9 +20,12 @@ import org.openapitools.codegen.CliOption; import org.openapitools.codegen.CodegenConfig; import org.openapitools.codegen.CodegenConstants; import org.openapitools.codegen.CodegenType; +import org.openapitools.codegen.meta.features.*; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import java.util.EnumSet; + public class GraphQLSchemaCodegen extends AbstractGraphQLCodegen implements CodegenConfig { private static final Logger LOGGER = LoggerFactory.getLogger(GraphQLSchemaCodegen.class); @@ -42,6 +45,24 @@ public class GraphQLSchemaCodegen extends AbstractGraphQLCodegen implements Code public GraphQLSchemaCodegen() { super(); + + featureSet = getFeatureSet().modify() +// .includeDocumentationFeatures(DocumentationFeature.Readme) + .wireFormatFeatures(EnumSet.of(WireFormatFeature.JSON)) + .securityFeatures(EnumSet.noneOf( + SecurityFeature.class + )) + .excludeGlobalFeatures( + GlobalFeature.XMLStructureDefinitions, + GlobalFeature.Callbacks, + GlobalFeature.LinkObjects, + GlobalFeature.ParameterStyling + ) + .excludeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism + ) + .build(); + outputFolder = "generated-code/graphql-schema"; modelTemplateFiles.put("model.mustache", ".graphql"); apiTemplateFiles.put("api.mustache", ".graphql"); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GroovyClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GroovyClientCodegen.java index ecae95083c..22c083218d 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GroovyClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GroovyClientCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -18,8 +18,10 @@ package org.openapitools.codegen.languages; import org.openapitools.codegen.*; +import org.openapitools.codegen.meta.features.*; import java.io.File; +import java.util.EnumSet; import java.util.List; import java.util.Map; @@ -31,6 +33,27 @@ public class GroovyClientCodegen extends AbstractJavaCodegen { public GroovyClientCodegen() { super(); + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .wireFormatFeatures(EnumSet.of(WireFormatFeature.JSON)) + .securityFeatures(EnumSet.noneOf(SecurityFeature.class)) + .excludeGlobalFeatures( + GlobalFeature.XMLStructureDefinitions, + GlobalFeature.Callbacks, + GlobalFeature.LinkObjects, + GlobalFeature.ParameterStyling + ) + .excludeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism + ) + .excludeParameterFeatures( + ParameterFeature.Cookie + ) + .includeClientModificationFeatures( + ClientModificationFeature.BasePath + ) + .build(); + // avoid importing the following as models languageSpecificPrimitives.add("Date"); languageSpecificPrimitives.add("ArrayList"); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/HaskellHttpClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/HaskellHttpClientCodegen.java index 35195ca1dc..e22199b430 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/HaskellHttpClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/HaskellHttpClientCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -27,6 +27,7 @@ import org.apache.commons.lang3.StringEscapeUtils; import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.tuple.Pair; import org.openapitools.codegen.*; +import org.openapitools.codegen.meta.features.*; import org.openapitools.codegen.utils.ModelUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -145,6 +146,32 @@ public class HaskellHttpClientCodegen extends DefaultCodegen implements CodegenC public HaskellHttpClientCodegen() { super(); + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .wireFormatFeatures(EnumSet.of(WireFormatFeature.JSON, WireFormatFeature.XML)) + .securityFeatures(EnumSet.of( + SecurityFeature.ApiKey, + SecurityFeature.BasicAuth, + SecurityFeature.OAuth2_Implicit + )) + .excludeGlobalFeatures( + GlobalFeature.XMLStructureDefinitions, + GlobalFeature.Callbacks, + GlobalFeature.LinkObjects, + GlobalFeature.ParameterStyling + ) + .excludeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism + ) + .excludeParameterFeatures( + ParameterFeature.Cookie + ) + .includeClientModificationFeatures( + ClientModificationFeature.BasePath, + ClientModificationFeature.UserAgent + ) + .build(); + this.prependFormOrBodyParameters = true; // override the mapping to keep the original mapping in Haskell diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/HaskellServantCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/HaskellServantCodegen.java index 8a0d098009..2701f3d2aa 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/HaskellServantCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/HaskellServantCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -25,6 +25,7 @@ import io.swagger.v3.oas.models.servers.Server; import org.apache.commons.io.FilenameUtils; import org.apache.commons.lang3.StringUtils; import org.openapitools.codegen.*; +import org.openapitools.codegen.meta.features.*; import org.openapitools.codegen.utils.ModelUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -79,6 +80,28 @@ public class HaskellServantCodegen extends DefaultCodegen implements CodegenConf public HaskellServantCodegen() { super(); + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .wireFormatFeatures(EnumSet.of(WireFormatFeature.JSON, WireFormatFeature.XML)) + .securityFeatures(EnumSet.of( + SecurityFeature.BasicAuth, + SecurityFeature.ApiKey, + SecurityFeature.OAuth2_Implicit + )) + .excludeGlobalFeatures( + GlobalFeature.XMLStructureDefinitions, + GlobalFeature.Callbacks, + GlobalFeature.LinkObjects, + GlobalFeature.ParameterStyling + ) + .excludeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism + ) + .includeParameterFeatures( + ParameterFeature.Cookie + ) + .build(); + // override the mapping to keep the original mapping in Haskell specialCharReplacements.put("-", "Dash"); specialCharReplacements.put(">", "GreaterThan"); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JMeterClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JMeterClientCodegen.java index 9a00ca8704..17d2a1230f 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JMeterClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JMeterClientCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -25,10 +25,12 @@ import io.swagger.v3.oas.models.media.Schema; import org.openapitools.codegen.CodegenConfig; import org.openapitools.codegen.CodegenType; import org.openapitools.codegen.DefaultCodegen; +import org.openapitools.codegen.meta.features.*; import org.openapitools.codegen.utils.ModelUtils; import java.io.File; import java.util.Arrays; +import java.util.EnumSet; import java.util.HashSet; public class JMeterClientCodegen extends DefaultCodegen implements CodegenConfig { @@ -73,6 +75,30 @@ public class JMeterClientCodegen extends DefaultCodegen implements CodegenConfig public JMeterClientCodegen() { super(); + featureSet = getFeatureSet().modify() + .wireFormatFeatures(EnumSet.of(WireFormatFeature.JSON, WireFormatFeature.XML)) + .securityFeatures(EnumSet.of( + SecurityFeature.BasicAuth, + SecurityFeature.ApiKey, + SecurityFeature.OAuth2_Implicit + )) + .excludeGlobalFeatures( + GlobalFeature.XMLStructureDefinitions, + GlobalFeature.Callbacks, + GlobalFeature.LinkObjects, + GlobalFeature.ParameterStyling + ) + .excludeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism + ) + .includeParameterFeatures( + ParameterFeature.Cookie + ) + .includeClientModificationFeatures( + ClientModificationFeature.BasePath + ) + .build(); + // set the output folder here outputFolder = "generated-code/JMeterClientCodegen"; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaCXFClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaCXFClientCodegen.java index e47deba1e3..bb206b12f6 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaCXFClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaCXFClientCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaCXFExtServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaCXFExtServerCodegen.java index f26731cd95..355afddd0b 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaCXFExtServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaCXFExtServerCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaCXFServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaCXFServerCodegen.java index 7e383fe0c9..24aa5fb62e 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaCXFServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaCXFServerCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaClientCodegen.java index 3138fae2a2..4fbba05d82 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaClientCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -23,8 +23,8 @@ import org.openapitools.codegen.*; import org.openapitools.codegen.languages.features.BeanValidationFeatures; import org.openapitools.codegen.languages.features.GzipFeatures; import org.openapitools.codegen.languages.features.PerformBeanValidationFeatures; +import org.openapitools.codegen.meta.features.DocumentationFeature; import org.openapitools.codegen.templating.mustache.CaseFormatLambda; -import org.openapitools.codegen.utils.ModelUtils; import org.openapitools.codegen.utils.ProcessUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -106,6 +106,10 @@ public class JavaClientCodegen extends AbstractJavaCodegen public JavaClientCodegen() { super(); + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .build(); + outputFolder = "generated-code" + File.separator + "java"; embeddedTemplateDir = templateDir = "Java"; invokerPackage = "org.openapitools.client"; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaInflectorServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaInflectorServerCodegen.java index d44daedd70..e68737e72a 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaInflectorServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaInflectorServerCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -22,6 +22,7 @@ import org.apache.commons.lang3.BooleanUtils; import org.apache.commons.lang3.StringUtils; import org.openapitools.codegen.*; import org.openapitools.codegen.config.GlobalSettings; +import org.openapitools.codegen.meta.features.DocumentationFeature; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -40,6 +41,10 @@ public class JavaInflectorServerCodegen extends AbstractJavaCodegen { public JavaInflectorServerCodegen() { super(); + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .build(); + sourceFolder = "src/gen/java"; apiTestTemplateFiles.clear(); // TODO: add test template embeddedTemplateDir = templateDir = "JavaInflector"; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaJAXRSCXFCDIServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaJAXRSCXFCDIServerCodegen.java index a07d461e26..c680ff5d19 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaJAXRSCXFCDIServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaJAXRSCXFCDIServerCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -53,8 +53,6 @@ public class JavaJAXRSCXFCDIServerCodegen extends JavaJAXRSSpecServerCodegen imp // Updated template directory embeddedTemplateDir = templateDir = JAXRS_TEMPLATE_DIRECTORY_NAME + File.separator + "cxf-cdi"; - - cliOptions.add(CliOption.newBoolean(USE_BEANVALIDATION, "Use BeanValidation API annotations",useBeanValidation)); } @Override diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaJAXRSSpecServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaJAXRSSpecServerCodegen.java index bb969ae172..f47edb272e 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaJAXRSSpecServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaJAXRSSpecServerCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,23 +17,19 @@ package org.openapitools.codegen.languages; -import static org.openapitools.codegen.utils.StringUtils.camelize; - import io.swagger.v3.oas.models.Operation; import io.swagger.v3.oas.models.media.Schema; - import org.apache.commons.lang3.StringUtils; -import org.openapitools.codegen.CliOption; -import org.openapitools.codegen.CodegenConstants; -import org.openapitools.codegen.CodegenModel; -import org.openapitools.codegen.CodegenOperation; -import org.openapitools.codegen.SupportingFile; +import org.openapitools.codegen.*; +import org.openapitools.codegen.meta.features.DocumentationFeature; import java.io.File; import java.util.ArrayList; import java.util.List; import java.util.Map; +import static org.openapitools.codegen.utils.StringUtils.camelize; + public class JavaJAXRSSpecServerCodegen extends AbstractJavaJAXRSServerCodegen { public static final String INTERFACE_ONLY = "interfaceOnly"; @@ -59,6 +55,11 @@ public class JavaJAXRSSpecServerCodegen extends AbstractJavaJAXRSServerCodegen { public JavaJAXRSSpecServerCodegen() { super(); + + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .build(); + invokerPackage = "org.openapitools.api"; artifactId = "openapi-jaxrs-server"; outputFolder = "generated-code/JavaJaxRS-Spec"; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaJerseyServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaJerseyServerCodegen.java index be6467cb9b..a0bb1ac6eb 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaJerseyServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaJerseyServerCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -21,6 +21,7 @@ import io.swagger.v3.oas.models.Operation; import org.apache.commons.lang3.BooleanUtils; import org.apache.commons.lang3.StringUtils; import org.openapitools.codegen.*; +import org.openapitools.codegen.meta.features.DocumentationFeature; import java.util.*; @@ -40,6 +41,10 @@ public class JavaJerseyServerCodegen extends AbstractJavaJAXRSServerCodegen { public JavaJerseyServerCodegen() { super(); + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .build(); + outputFolder = "generated-code/JavaJaxRS-Jersey"; apiTemplateFiles.put("apiService.mustache", ".java"); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaMSF4JServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaMSF4JServerCodegen.java index b7a16a6178..708b7447ee 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaMSF4JServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaMSF4JServerCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -21,6 +21,7 @@ import io.swagger.v3.oas.models.Operation; import org.apache.commons.lang3.BooleanUtils; import org.apache.commons.lang3.StringUtils; import org.openapitools.codegen.*; +import org.openapitools.codegen.meta.features.DocumentationFeature; import java.util.ArrayList; import java.util.HashMap; @@ -37,6 +38,11 @@ public class JavaMSF4JServerCodegen extends AbstractJavaJAXRSServerCodegen { public JavaMSF4JServerCodegen() { super(); + + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .build(); + outputFolder = "generated-code/JavaJaxRS-MSF4J"; apiTemplateFiles.put("apiService.mustache", ".java"); apiTemplateFiles.put("apiServiceImpl.mustache", ".java"); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaPKMSTServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaPKMSTServerCodegen.java index e23d9237d0..7095fa54a2 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaPKMSTServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaPKMSTServerCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -22,6 +22,7 @@ import io.swagger.v3.oas.models.Operation; import io.swagger.v3.oas.models.PathItem; import io.swagger.v3.oas.models.tags.Tag; import org.openapitools.codegen.*; +import org.openapitools.codegen.meta.features.DocumentationFeature; import org.openapitools.codegen.utils.URLPathUtils; import java.io.File; @@ -53,6 +54,10 @@ public class JavaPKMSTServerCodegen extends AbstractJavaCodegen { public JavaPKMSTServerCodegen() { super(); + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .build(); + groupId = "com.prokarma"; artifactId = "pkmst-microservice"; embeddedTemplateDir = templateDir = "java-pkmst"; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaPlayFrameworkCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaPlayFrameworkCodegen.java index 93dccdd8fe..ffe6f8660f 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaPlayFrameworkCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaPlayFrameworkCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -20,6 +20,7 @@ package org.openapitools.codegen.languages; import io.swagger.v3.oas.models.media.Schema; import org.openapitools.codegen.*; import org.openapitools.codegen.languages.features.BeanValidationFeatures; +import org.openapitools.codegen.meta.features.DocumentationFeature; import java.io.File; import java.util.List; @@ -53,6 +54,11 @@ public class JavaPlayFrameworkCodegen extends AbstractJavaCodegen implements Bea public JavaPlayFrameworkCodegen() { super(); + + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .build(); + outputFolder = "generated-code/javaPlayFramework"; apiTestTemplateFiles.clear(); embeddedTemplateDir = templateDir = "JavaPlayFramework"; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaResteasyEapServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaResteasyEapServerCodegen.java index 17e8966007..a8d53dfa28 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaResteasyEapServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaResteasyEapServerCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -24,6 +24,7 @@ import org.openapitools.codegen.*; import org.openapitools.codegen.languages.features.BeanValidationFeatures; import org.openapitools.codegen.languages.features.JbossFeature; import org.openapitools.codegen.languages.features.SwaggerFeatures; +import org.openapitools.codegen.meta.features.DocumentationFeature; import java.io.File; import java.util.ArrayList; @@ -38,9 +39,12 @@ public class JavaResteasyEapServerCodegen extends AbstractJavaJAXRSServerCodegen protected boolean useSwaggerFeature = false; public JavaResteasyEapServerCodegen() { - super(); + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .build(); + artifactId = "openapi-jaxrs-resteasy-eap-server"; useBeanValidation = true; outputFolder = "generated-code/JavaJaxRS-Resteasy-eap"; @@ -59,7 +63,6 @@ public class JavaResteasyEapServerCodegen extends AbstractJavaJAXRSServerCodegen embeddedTemplateDir = templateDir = "JavaJaxRS" + File.separator + "resteasy" + File.separator + "eap"; - cliOptions.add(CliOption.newBoolean(USE_BEANVALIDATION, "Use BeanValidation API annotations",useBeanValidation)); cliOptions.add(CliOption.newBoolean(GENERATE_JBOSS_DEPLOYMENT_DESCRIPTOR, "Generate Jboss Deployment Descriptor",generateJbossDeploymentDescriptor)); cliOptions.add(CliOption.newBoolean(USE_SWAGGER_FEATURE, "Use dynamic Swagger generator",useSwaggerFeature)); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaResteasyServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaResteasyServerCodegen.java index af97dc3c20..b8beedfee1 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaResteasyServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaResteasyServerCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -22,6 +22,7 @@ import org.apache.commons.lang3.BooleanUtils; import org.apache.commons.lang3.StringUtils; import org.openapitools.codegen.*; import org.openapitools.codegen.languages.features.JbossFeature; +import org.openapitools.codegen.meta.features.DocumentationFeature; import java.io.File; import java.util.ArrayList; @@ -34,9 +35,12 @@ public class JavaResteasyServerCodegen extends AbstractJavaJAXRSServerCodegen im protected boolean generateJbossDeploymentDescriptor = true; public JavaResteasyServerCodegen() { - super(); + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .build(); + artifactId = "openapi-jaxrs-resteasy-server"; outputFolder = "generated-code/JavaJaxRS-Resteasy"; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaUndertowServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaUndertowServerCodegen.java index afa273f285..c051d13cb9 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaUndertowServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaUndertowServerCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -20,6 +20,7 @@ package org.openapitools.codegen.languages; import org.apache.commons.lang3.BooleanUtils; import org.openapitools.codegen.*; import org.openapitools.codegen.config.GlobalSettings; +import org.openapitools.codegen.meta.features.DocumentationFeature; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -41,6 +42,10 @@ public class JavaUndertowServerCodegen extends AbstractJavaCodegen { public JavaUndertowServerCodegen() { super(); + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .build(); + embeddedTemplateDir = templateDir = "java-undertow-server"; invokerPackage = "org.openapitools.handler"; artifactId = "openapi-undertow-server"; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaVertXServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaVertXServerCodegen.java index d0e1cf14c0..a9e0332ca7 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaVertXServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaVertXServerCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -24,6 +24,7 @@ import io.swagger.v3.oas.models.PathItem.HttpMethod; import io.swagger.v3.oas.models.media.Schema; import io.swagger.v3.oas.models.servers.Server; import org.openapitools.codegen.*; +import org.openapitools.codegen.meta.features.DocumentationFeature; import org.openapitools.codegen.utils.URLPathUtils; import java.io.File; @@ -58,6 +59,10 @@ public class JavaVertXServerCodegen extends AbstractJavaCodegen { public JavaVertXServerCodegen() { super(); + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .build(); + // set the output folder here outputFolder = "generated-code" + File.separator + "javaVertXServer"; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaVertXWebServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaVertXWebServerCodegen.java index 1f79ab8dd5..82b1f4ba1e 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaVertXWebServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaVertXWebServerCodegen.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptClientCodegen.java index e8f9fd6fec..1bb9c9f2b9 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptClientCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,7 +17,6 @@ package org.openapitools.codegen.languages; -import com.google.common.base.Strings; import io.swagger.v3.oas.models.OpenAPI; import io.swagger.v3.oas.models.info.Info; import io.swagger.v3.oas.models.info.License; @@ -26,6 +25,7 @@ import io.swagger.v3.oas.models.media.Schema; import org.apache.commons.io.FilenameUtils; import org.apache.commons.lang3.StringUtils; import org.openapitools.codegen.*; +import org.openapitools.codegen.meta.features.DocumentationFeature; import org.openapitools.codegen.utils.ModelUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -48,6 +48,7 @@ public class JavascriptClientCodegen extends DefaultCodegen implements CodegenCo public static final String EMIT_MODEL_METHODS = "emitModelMethods"; public static final String EMIT_JS_DOC = "emitJSDoc"; public static final String USE_ES6 = "useES6"; + public static final String NPM_REPOSITORY = "npmRepository"; final String[][] JAVASCRIPT_SUPPORTING_FILES = new String[][]{ new String[]{"package.mustache", "package.json"}, @@ -86,10 +87,16 @@ public class JavascriptClientCodegen extends DefaultCodegen implements CodegenCo protected String apiTestPath = "api/"; protected String modelTestPath = "model/"; protected boolean useES6 = true; // default is ES6 + protected String npmRepository = null; private String modelPropertyNaming = "camelCase"; public JavascriptClientCodegen() { super(); + + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .build(); + outputFolder = "generated-code/js"; modelTemplateFiles.put("model.mustache", ".js"); modelTestTemplateFiles.put("model_test.mustache", ".js"); @@ -193,6 +200,7 @@ public class JavascriptClientCodegen extends DefaultCodegen implements CodegenCo "use JavaScript ES6 (ECMAScript 6) (beta). Default is ES6.") .defaultValue(Boolean.TRUE.toString())); cliOptions.add(new CliOption(CodegenConstants.MODEL_PROPERTY_NAMING, CodegenConstants.MODEL_PROPERTY_NAMING_DESC).defaultValue("camelCase")); + cliOptions.add(new CliOption(NPM_REPOSITORY, "Use this property to set an url your private npmRepo in the package.json")); } @Override @@ -263,6 +271,9 @@ public class JavascriptClientCodegen extends DefaultCodegen implements CodegenCo if (additionalProperties.containsKey(CodegenConstants.MODEL_PROPERTY_NAMING)) { setModelPropertyNaming((String) additionalProperties.get(CodegenConstants.MODEL_PROPERTY_NAMING)); } + if (additionalProperties.containsKey(NPM_REPOSITORY)) { + setNpmRepository(((String) additionalProperties.get(NPM_REPOSITORY))); + } } @Override @@ -326,6 +337,7 @@ public class JavascriptClientCodegen extends DefaultCodegen implements CodegenCo additionalProperties.put(EMIT_MODEL_METHODS, emitModelMethods); additionalProperties.put(EMIT_JS_DOC, emitJSDoc); additionalProperties.put(USE_ES6, useES6); + additionalProperties.put(NPM_REPOSITORY, npmRepository); // make api and model doc path available in mustache template additionalProperties.put("apiDocPath", apiDocPath); @@ -433,6 +445,10 @@ public class JavascriptClientCodegen extends DefaultCodegen implements CodegenCo this.usePromises = usePromises; } + public void setNpmRepository(String npmRepository) { + this.npmRepository = npmRepository; + } + public void setUseES6(boolean useES6) { this.useES6 = useES6; if (useES6) { diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptClosureAngularClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptClosureAngularClientCodegen.java index f73d3c35d7..7cc1215f46 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptClosureAngularClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptClosureAngularClientCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptFlowtypedClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptFlowtypedClientCodegen.java index 21fd8ea4f8..4d97d70437 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptFlowtypedClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptFlowtypedClientCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -19,14 +19,12 @@ package org.openapitools.codegen.languages; import io.swagger.v3.oas.models.OpenAPI; import io.swagger.v3.oas.models.info.Info; -import io.swagger.v3.oas.models.media.ArraySchema; import io.swagger.v3.oas.models.media.Schema; -import io.swagger.v3.parser.util.SchemaTypeUtil; import org.apache.commons.lang3.StringUtils; import org.openapitools.codegen.*; +import org.openapitools.codegen.meta.features.DocumentationFeature; import org.openapitools.codegen.utils.ModelUtils; -import java.text.SimpleDateFormat; import java.util.*; import static org.openapitools.codegen.utils.StringUtils.dashize; @@ -39,6 +37,10 @@ public class JavascriptFlowtypedClientCodegen extends AbstractTypeScriptClientCo public JavascriptFlowtypedClientCodegen() { super(); + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .build(); + // clear import mapping (from default generator) as TS does not use it // at the moment importMapping.clear(); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinClientCodegen.java index 85bffe3f05..ae8409c4a2 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinClientCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -25,6 +25,7 @@ import org.openapitools.codegen.CodegenParameter; import org.openapitools.codegen.CodegenProperty; import org.openapitools.codegen.CodegenType; import org.openapitools.codegen.SupportingFile; +import org.openapitools.codegen.meta.features.*; import java.io.File; import java.util.HashMap; @@ -50,7 +51,7 @@ public class KotlinClientCodegen extends AbstractKotlinCodegen { protected static final String VENDOR_EXTENSION_BASE_NAME_LITERAL = "x-base-name-literal"; protected String dateLibrary = DateLibrary.JAVA8.value; - protected String requestDateConverter = RequestDateConverter.TO_STRING.value; + protected String requestDateConverter = RequestDateConverter.TO_JSON.value; protected String collectionType = CollectionType.ARRAY.value; public enum DateLibrary { @@ -95,6 +96,34 @@ public class KotlinClientCodegen extends AbstractKotlinCodegen { public KotlinClientCodegen() { super(); + /* + * OAuth flows supported _only_ by client explicitly setting bearer token. The "flows" are not supported. + */ + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .excludeWireFormatFeatures(WireFormatFeature.XML, WireFormatFeature.PROTOBUF) + .excludeSecurityFeatures( + SecurityFeature.OpenIDConnect, + SecurityFeature.OAuth2_Password, + SecurityFeature.OAuth2_AuthorizationCode, + SecurityFeature.OAuth2_ClientCredentials, + SecurityFeature.OAuth2_Implicit + ) + .excludeGlobalFeatures( + GlobalFeature.XMLStructureDefinitions, + GlobalFeature.Callbacks, + GlobalFeature.LinkObjects, + GlobalFeature.ParameterStyling + ) + .excludeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism + ) + .excludeParameterFeatures( + ParameterFeature.Cookie + ) + .includeClientModificationFeatures(ClientModificationFeature.BasePath) + .build(); + artifactId = "kotlin-client"; packageName = "org.openapitools.client"; @@ -143,8 +172,8 @@ public class KotlinClientCodegen extends AbstractKotlinCodegen { CliOption requestDateConverter = new CliOption(REQUEST_DATE_CONVERTER, "JVM-Option. Defines in how to handle date-time objects that are used for a request (as query or parameter)"); Map requestDateConverterOptions = new HashMap<>(); - requestDateConverterOptions.put(RequestDateConverter.TO_STRING.value, "[DEFAULT] Use the 'toString'-method of the date-time object to retrieve the related string representation."); - requestDateConverterOptions.put(RequestDateConverter.TO_JSON.value, "Date formater option using a json converter."); + requestDateConverterOptions.put(RequestDateConverter.TO_JSON.value, "[DEFAULT] Date formater option using a json converter."); + requestDateConverterOptions.put(RequestDateConverter.TO_STRING.value, "Use the 'toString'-method of the date-time object to retrieve the related string representation."); requestDateConverter.setEnum(requestDateConverterOptions); requestDateConverter.setDefault(this.requestDateConverter); cliOptions.add(requestDateConverter); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinServerCodegen.java index de4b755c2b..25e40fcd62 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinServerCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -23,11 +23,13 @@ import org.openapitools.codegen.CliOption; import org.openapitools.codegen.CodegenConstants; import org.openapitools.codegen.CodegenType; import org.openapitools.codegen.SupportingFile; +import org.openapitools.codegen.meta.features.*; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.io.File; import java.util.Arrays; +import java.util.EnumSet; import java.util.List; import java.util.Map; @@ -58,6 +60,28 @@ public class KotlinServerCodegen extends AbstractKotlinCodegen { public KotlinServerCodegen() { super(); + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .wireFormatFeatures(EnumSet.of(WireFormatFeature.JSON, WireFormatFeature.XML)) + .securityFeatures(EnumSet.of( + SecurityFeature.BasicAuth, + SecurityFeature.ApiKey, + SecurityFeature.OAuth2_Implicit + )) + .excludeGlobalFeatures( + GlobalFeature.XMLStructureDefinitions, + GlobalFeature.Callbacks, + GlobalFeature.LinkObjects, + GlobalFeature.ParameterStyling + ) + .excludeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism + ) + .excludeParameterFeatures( + ParameterFeature.Cookie + ) + .build(); + artifactId = "kotlin-server"; packageName = "org.openapitools.server"; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinSpringServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinSpringServerCodegen.java index fa884f1bd2..c1b781ce9f 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinSpringServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinSpringServerCodegen.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -26,6 +26,7 @@ import io.swagger.v3.oas.models.Operation; import io.swagger.v3.oas.models.media.Schema; import org.openapitools.codegen.*; import org.openapitools.codegen.languages.features.BeanValidationFeatures; +import org.openapitools.codegen.meta.features.*; import org.openapitools.codegen.utils.URLPathUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -84,6 +85,28 @@ public class KotlinSpringServerCodegen extends AbstractKotlinCodegen public KotlinSpringServerCodegen() { super(); + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .wireFormatFeatures(EnumSet.of(WireFormatFeature.JSON, WireFormatFeature.XML)) + .securityFeatures(EnumSet.of( + SecurityFeature.BasicAuth, + SecurityFeature.ApiKey, + SecurityFeature.OAuth2_Implicit + )) + .excludeGlobalFeatures( + GlobalFeature.XMLStructureDefinitions, + GlobalFeature.Callbacks, + GlobalFeature.LinkObjects, + GlobalFeature.ParameterStyling + ) + .includeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism + ) + .includeParameterFeatures( + ParameterFeature.Cookie + ) + .build(); + reservedWords.addAll(VARIABLE_RESERVED_WORDS); outputFolder = "generated-code/kotlin-spring"; @@ -617,18 +640,6 @@ public class KotlinSpringServerCodegen extends AbstractKotlinCodegen } } - // Can't figure out the logic in DefaultCodegen but optional vars are getting duplicated when there's - // inheritance involved. Also, isInherited doesn't seem to be getting set properly ¯\_(ツ)_/¯ - @Override - public CodegenModel fromModel(String name, Schema schema) { - CodegenModel m = super.fromModel(name, schema); - - m.optionalVars = m.optionalVars.stream().distinct().collect(Collectors.toList()); - m.allVars.stream().filter(p -> !m.vars.contains(p)).forEach(p -> p.isInherited = true); - - return m; - } - /** * Output the proper model name (capitalized). * In case the name belongs to the TypeSystem it won't be renamed. diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinVertxServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinVertxServerCodegen.java index 36fddf1812..193358867c 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinVertxServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinVertxServerCodegen.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -21,11 +21,12 @@ import org.openapitools.codegen.CodegenType; import org.openapitools.codegen.SupportingFile; import org.openapitools.codegen.meta.GeneratorMetadata; import org.openapitools.codegen.meta.Stability; +import org.openapitools.codegen.meta.features.*; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.io.File; -import java.util.Locale; +import java.util.EnumSet; public class KotlinVertxServerCodegen extends AbstractKotlinCodegen { @@ -53,6 +54,26 @@ public class KotlinVertxServerCodegen extends AbstractKotlinCodegen { public KotlinVertxServerCodegen() { super(); + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .wireFormatFeatures(EnumSet.of(WireFormatFeature.JSON, WireFormatFeature.XML)) + .securityFeatures(EnumSet.noneOf( + SecurityFeature.class + )) + .excludeGlobalFeatures( + GlobalFeature.XMLStructureDefinitions, + GlobalFeature.Callbacks, + GlobalFeature.LinkObjects, + GlobalFeature.ParameterStyling + ) + .excludeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism + ) + .includeParameterFeatures( + ParameterFeature.Cookie + ) + .build(); + generatorMetadata = GeneratorMetadata.newBuilder(generatorMetadata) .stability(Stability.BETA) .build(); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/LuaClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/LuaClientCodegen.java index fd647aaa2e..564931583b 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/LuaClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/LuaClientCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -21,6 +21,7 @@ import io.swagger.v3.oas.models.media.ArraySchema; import io.swagger.v3.oas.models.media.Schema; import org.apache.commons.lang3.StringUtils; import org.openapitools.codegen.*; +import org.openapitools.codegen.meta.features.*; import org.openapitools.codegen.utils.ModelUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -55,6 +56,29 @@ public class LuaClientCodegen extends DefaultCodegen implements CodegenConfig { public LuaClientCodegen() { super(); + + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .wireFormatFeatures(EnumSet.of(WireFormatFeature.JSON, WireFormatFeature.XML)) + .securityFeatures(EnumSet.of( + SecurityFeature.BasicAuth, + SecurityFeature.ApiKey, + SecurityFeature.OAuth2_Implicit + )) + .excludeGlobalFeatures( + GlobalFeature.XMLStructureDefinitions, + GlobalFeature.Callbacks, + GlobalFeature.LinkObjects, + GlobalFeature.ParameterStyling + ) + .includeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism + ) + .includeParameterFeatures( + ParameterFeature.Cookie + ) + .build(); + outputFolder = "generated-code/lua"; modelTemplateFiles.put("model.mustache", ".lua"); apiTemplateFiles.put("api.mustache", ".lua"); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/MysqlSchemaCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/MysqlSchemaCodegen.java index 788a981f75..12a7e013f0 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/MysqlSchemaCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/MysqlSchemaCodegen.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,6 +17,7 @@ package org.openapitools.codegen.languages; import org.openapitools.codegen.*; +import org.openapitools.codegen.meta.features.*; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -61,6 +62,21 @@ public class MysqlSchemaCodegen extends DefaultCodegen implements CodegenConfig public MysqlSchemaCodegen() { super(); + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .wireFormatFeatures(EnumSet.noneOf(WireFormatFeature.class)) + .securityFeatures(EnumSet.noneOf(SecurityFeature.class)) + .excludeGlobalFeatures( + GlobalFeature.XMLStructureDefinitions, + GlobalFeature.Callbacks, + GlobalFeature.LinkObjects, + GlobalFeature.ParameterStyling + ) + .excludeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism + ) + .clientModificationFeatures(EnumSet.noneOf(ClientModificationFeature.class)) + .build(); // clear import mapping (from default generator) as mysql does not use import directives importMapping.clear(); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/NimClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/NimClientCodegen.java index 939f7e6249..a0fefd2485 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/NimClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/NimClientCodegen.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -22,6 +22,7 @@ import io.swagger.v3.oas.models.media.StringSchema; import org.openapitools.codegen.*; import org.openapitools.codegen.meta.GeneratorMetadata; import org.openapitools.codegen.meta.Stability; +import org.openapitools.codegen.meta.features.*; import org.openapitools.codegen.utils.ModelUtils; import org.openapitools.codegen.utils.StringUtils; import org.slf4j.Logger; @@ -31,7 +32,6 @@ import java.io.File; import java.util.*; import static org.openapitools.codegen.utils.StringUtils.camelize; -import static org.openapitools.codegen.utils.StringUtils.underscore; public class NimClientCodegen extends DefaultCodegen implements CodegenConfig { static Logger LOGGER = LoggerFactory.getLogger(NimClientCodegen.class); @@ -56,6 +56,28 @@ public class NimClientCodegen extends DefaultCodegen implements CodegenConfig { public NimClientCodegen() { super(); + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .wireFormatFeatures(EnumSet.of(WireFormatFeature.JSON)) + .securityFeatures(EnumSet.noneOf(SecurityFeature.class)) + .excludeGlobalFeatures( + GlobalFeature.XMLStructureDefinitions, + GlobalFeature.Callbacks, + GlobalFeature.LinkObjects, + GlobalFeature.ParameterStyling + ) + .excludeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism + ) + .excludeParameterFeatures( + ParameterFeature.Cookie + ) + .includeClientModificationFeatures( + ClientModificationFeature.BasePath, + ClientModificationFeature.UserAgent + ) + .build(); + generatorMetadata = GeneratorMetadata.newBuilder(generatorMetadata) .stability(Stability.BETA) .build(); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/NodeJSExpressServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/NodeJSExpressServerCodegen.java index 9b9dd6ce40..c57f5abf42 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/NodeJSExpressServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/NodeJSExpressServerCodegen.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -28,6 +28,7 @@ import io.swagger.v3.oas.models.info.Info; import org.openapitools.codegen.*; import org.openapitools.codegen.meta.GeneratorMetadata; import org.openapitools.codegen.meta.Stability; +import org.openapitools.codegen.meta.features.*; import org.openapitools.codegen.utils.URLPathUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -36,7 +37,6 @@ import java.io.File; import java.net.URL; import java.util.*; import java.util.Map.Entry; -import java.util.regex.Pattern; import static org.openapitools.codegen.utils.StringUtils.*; @@ -55,6 +55,26 @@ public class NodeJSExpressServerCodegen extends DefaultCodegen implements Codege public NodeJSExpressServerCodegen() { super(); + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .wireFormatFeatures(EnumSet.of(WireFormatFeature.JSON)) + .securityFeatures(EnumSet.of( + SecurityFeature.OAuth2_Implicit + )) + .excludeGlobalFeatures( + GlobalFeature.XMLStructureDefinitions, + GlobalFeature.Callbacks, + GlobalFeature.LinkObjects, + GlobalFeature.ParameterStyling + ) + .excludeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism + ) + .includeParameterFeatures( + ParameterFeature.Cookie + ) + .build(); + generatorMetadata = GeneratorMetadata.newBuilder(generatorMetadata) .stability(Stability.BETA) .build(); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/NodeJSServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/NodeJSServerCodegen.java index 108aa7a788..d4a3c7594a 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/NodeJSServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/NodeJSServerCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -30,6 +30,7 @@ import org.openapitools.codegen.*; import org.openapitools.codegen.config.GlobalSettings; import org.openapitools.codegen.meta.GeneratorMetadata; import org.openapitools.codegen.meta.Stability; +import org.openapitools.codegen.meta.features.*; import org.openapitools.codegen.utils.URLPathUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -60,6 +61,24 @@ public class NodeJSServerCodegen extends DefaultCodegen implements CodegenConfig public NodeJSServerCodegen() { super(); + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .wireFormatFeatures(EnumSet.of(WireFormatFeature.JSON)) + .securityFeatures(EnumSet.noneOf(SecurityFeature.class)) + .excludeGlobalFeatures( + GlobalFeature.XMLStructureDefinitions, + GlobalFeature.Callbacks, + GlobalFeature.LinkObjects, + GlobalFeature.ParameterStyling + ) + .excludeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism + ) + .excludeParameterFeatures( + ParameterFeature.Cookie + ) + .build(); + // mark the generator as deprecated in the documentation generatorMetadata = GeneratorMetadata.newBuilder(generatorMetadata) .stability(Stability.DEPRECATED) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/OCamlClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/OCamlClientCodegen.java index feffa95ddd..4ce0c93a4e 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/OCamlClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/OCamlClientCodegen.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -25,6 +25,7 @@ import io.swagger.v3.oas.models.responses.ApiResponse; import org.apache.commons.io.FilenameUtils; import org.apache.commons.lang3.StringUtils; import org.openapitools.codegen.*; +import org.openapitools.codegen.meta.features.*; import org.openapitools.codegen.utils.ModelUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -72,6 +73,28 @@ public class OCamlClientCodegen extends DefaultCodegen implements CodegenConfig public OCamlClientCodegen() { super(); + + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .wireFormatFeatures(EnumSet.of(WireFormatFeature.JSON)) + .securityFeatures(EnumSet.of( + SecurityFeature.ApiKey + )) + .excludeGlobalFeatures( + GlobalFeature.XMLStructureDefinitions, + GlobalFeature.Callbacks, + GlobalFeature.LinkObjects, + GlobalFeature.ParameterStyling + ) + .excludeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism + ) + .includeClientModificationFeatures( + ClientModificationFeature.BasePath + ) + .build(); + + outputFolder = "generated-code/ocaml"; modelTemplateFiles.put("model.mustache", ".ml"); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ObjcClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ObjcClientCodegen.java index 510d0c15a5..bcf153340e 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ObjcClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ObjcClientCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -21,6 +21,7 @@ import io.swagger.v3.oas.models.media.ArraySchema; import io.swagger.v3.oas.models.media.Schema; import org.apache.commons.lang3.StringUtils; import org.openapitools.codegen.*; +import org.openapitools.codegen.meta.features.*; import org.openapitools.codegen.utils.ModelUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -63,6 +64,30 @@ public class ObjcClientCodegen extends DefaultCodegen implements CodegenConfig { public ObjcClientCodegen() { super(); + + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .wireFormatFeatures(EnumSet.of(WireFormatFeature.JSON)) + .securityFeatures(EnumSet.of( + SecurityFeature.BasicAuth, + SecurityFeature.ApiKey, + SecurityFeature.OAuth2_Implicit + )) + .excludeGlobalFeatures( + GlobalFeature.XMLStructureDefinitions, + GlobalFeature.Callbacks, + GlobalFeature.LinkObjects, + GlobalFeature.ParameterStyling + ) + .includeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism + ) + .includeClientModificationFeatures( + ClientModificationFeature.BasePath, + ClientModificationFeature.UserAgent + ) + .build(); + supportsInheritance = true; outputFolder = "generated-code" + File.separator + "objc"; modelTemplateFiles.put("model-header.mustache", ".h"); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/OpenAPIGenerator.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/OpenAPIGenerator.java index ae97d9dbce..3cd85d2110 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/OpenAPIGenerator.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/OpenAPIGenerator.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -23,11 +23,14 @@ import org.openapitools.codegen.CodegenConfig; import org.openapitools.codegen.CodegenType; import org.openapitools.codegen.DefaultCodegen; import org.openapitools.codegen.SupportingFile; +import org.openapitools.codegen.meta.features.*; import org.openapitools.codegen.serializer.SerializerUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.io.File; +import java.nio.charset.StandardCharsets; +import java.util.EnumSet; public class OpenAPIGenerator extends DefaultCodegen implements CodegenConfig { @@ -35,6 +38,17 @@ public class OpenAPIGenerator extends DefaultCodegen implements CodegenConfig { public OpenAPIGenerator() { super(); + + featureSet = getFeatureSet().modify() + .documentationFeatures(EnumSet.allOf(DocumentationFeature.class)) + .dataTypeFeatures(EnumSet.allOf(DataTypeFeature.class)) + .wireFormatFeatures(EnumSet.allOf(WireFormatFeature.class)) + .securityFeatures(EnumSet.allOf(SecurityFeature.class)) + .globalFeatures(EnumSet.allOf(GlobalFeature.class)) + .parameterFeatures(EnumSet.allOf(ParameterFeature.class)) + .schemaSupportFeatures(EnumSet.allOf(SchemaSupportFeature.class)) + .build(); + embeddedTemplateDir = templateDir = "openapi"; outputFolder = "generated-code/openapi"; @@ -62,7 +76,7 @@ public class OpenAPIGenerator extends DefaultCodegen implements CodegenConfig { try { String outputFile = outputFolder + File.separator + "openapi.json"; - FileUtils.writeStringToFile(new File(outputFile), jsonOpenAPI); + FileUtils.writeStringToFile(new File(outputFile), jsonOpenAPI, StandardCharsets.UTF_8); LOGGER.info("wrote file to " + outputFile); } catch (Exception e) { LOGGER.error(e.getMessage(), e); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/OpenAPIYamlGenerator.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/OpenAPIYamlGenerator.java index 02481665a5..49c9fb788b 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/OpenAPIYamlGenerator.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/OpenAPIYamlGenerator.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -18,6 +18,7 @@ package org.openapitools.codegen.languages; import org.openapitools.codegen.*; +import org.openapitools.codegen.meta.features.*; import org.openapitools.codegen.templating.mustache.OnChangeLambda; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -28,6 +29,7 @@ import com.samskivert.mustache.Mustache.Lambda; import io.swagger.v3.oas.models.Operation; import java.util.ArrayList; +import java.util.EnumSet; import java.util.List; import java.util.Map; @@ -40,6 +42,17 @@ public class OpenAPIYamlGenerator extends DefaultCodegen implements CodegenConfi public OpenAPIYamlGenerator() { super(); + + featureSet = getFeatureSet().modify() + .documentationFeatures(EnumSet.allOf(DocumentationFeature.class)) + .dataTypeFeatures(EnumSet.allOf(DataTypeFeature.class)) + .wireFormatFeatures(EnumSet.allOf(WireFormatFeature.class)) + .securityFeatures(EnumSet.allOf(SecurityFeature.class)) + .globalFeatures(EnumSet.allOf(GlobalFeature.class)) + .parameterFeatures(EnumSet.allOf(ParameterFeature.class)) + .schemaSupportFeatures(EnumSet.allOf(SchemaSupportFeature.class)) + .build(); + embeddedTemplateDir = templateDir = "openapi-yaml"; outputFolder = "generated-code/openapi-yaml"; cliOptions.add(CliOption.newString(OUTPUT_NAME, "Output filename").defaultValue(outputFile)); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PerlClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PerlClientCodegen.java index 7036c71507..c11841e315 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PerlClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PerlClientCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -22,12 +22,14 @@ import io.swagger.v3.oas.models.media.Schema; import org.apache.commons.io.FilenameUtils; import org.apache.commons.lang3.StringUtils; import org.openapitools.codegen.*; +import org.openapitools.codegen.meta.features.*; import org.openapitools.codegen.utils.ModelUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.io.File; import java.util.Arrays; +import java.util.EnumSet; import java.util.regex.Matcher; import static org.openapitools.codegen.utils.StringUtils.camelize; @@ -49,6 +51,30 @@ public class PerlClientCodegen extends DefaultCodegen implements CodegenConfig { public PerlClientCodegen() { super(); + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .wireFormatFeatures(EnumSet.of(WireFormatFeature.JSON, WireFormatFeature.XML)) + .securityFeatures(EnumSet.of( + SecurityFeature.ApiKey, + SecurityFeature.BasicAuth, + SecurityFeature.BearerToken, + SecurityFeature.OAuth2_Implicit + )) + .excludeGlobalFeatures( + GlobalFeature.XMLStructureDefinitions, + GlobalFeature.Callbacks, + GlobalFeature.LinkObjects, + GlobalFeature.ParameterStyling + ) + .includeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism + ) + .includeClientModificationFeatures( + ClientModificationFeature.BasePath, + ClientModificationFeature.UserAgent + ) + .build(); + // add multiple inheritance support (beta) supportsMultipleInheritance = true; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpClientCodegen.java index d871b1cf39..09524470cd 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpClientCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -22,12 +22,14 @@ import org.openapitools.codegen.CliOption; import org.openapitools.codegen.CodegenConstants; import org.openapitools.codegen.CodegenType; import org.openapitools.codegen.SupportingFile; +import org.openapitools.codegen.meta.features.*; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.io.File; import java.util.ArrayList; import java.util.Collections; +import java.util.EnumSet; import java.util.List; public class PhpClientCodegen extends AbstractPhpCodegen { @@ -37,6 +39,21 @@ public class PhpClientCodegen extends AbstractPhpCodegen { public PhpClientCodegen() { super(); + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .wireFormatFeatures(EnumSet.of(WireFormatFeature.JSON, WireFormatFeature.XML)) + .securityFeatures(EnumSet.noneOf(SecurityFeature.class)) + .excludeGlobalFeatures( + GlobalFeature.XMLStructureDefinitions, + GlobalFeature.Callbacks, + GlobalFeature.LinkObjects, + GlobalFeature.ParameterStyling + ) + .excludeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism + ) + .build(); + // clear import mapping (from default generator) as php does not use it // at the moment importMapping.clear(); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpLaravelServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpLaravelServerCodegen.java index 47a5b9a08e..cccbc73925 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpLaravelServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpLaravelServerCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -20,6 +20,7 @@ package org.openapitools.codegen.languages; import org.openapitools.codegen.CodegenOperation; import org.openapitools.codegen.CodegenType; import org.openapitools.codegen.SupportingFile; +import org.openapitools.codegen.meta.features.*; import java.io.File; import java.util.*; @@ -65,6 +66,21 @@ public class PhpLaravelServerCodegen extends AbstractPhpCodegen { public PhpLaravelServerCodegen() { super(); + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .wireFormatFeatures(EnumSet.of(WireFormatFeature.JSON, WireFormatFeature.XML)) + .securityFeatures(EnumSet.noneOf(SecurityFeature.class)) + .excludeGlobalFeatures( + GlobalFeature.XMLStructureDefinitions, + GlobalFeature.Callbacks, + GlobalFeature.LinkObjects, + GlobalFeature.ParameterStyling + ) + .excludeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism + ) + .build(); + embeddedTemplateDir = templateDir = "php-laravel"; variableNamingConvention = "camelCase"; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpLumenServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpLumenServerCodegen.java index e2fd0eec18..dbfca26277 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpLumenServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpLumenServerCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -20,6 +20,7 @@ package org.openapitools.codegen.languages; import org.openapitools.codegen.CodegenOperation; import org.openapitools.codegen.CodegenType; import org.openapitools.codegen.SupportingFile; +import org.openapitools.codegen.meta.features.*; import java.io.File; import java.util.*; @@ -61,6 +62,21 @@ public class PhpLumenServerCodegen extends AbstractPhpCodegen { public PhpLumenServerCodegen() { super(); + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .wireFormatFeatures(EnumSet.of(WireFormatFeature.JSON, WireFormatFeature.XML)) + .securityFeatures(EnumSet.noneOf(SecurityFeature.class)) + .excludeGlobalFeatures( + GlobalFeature.XMLStructureDefinitions, + GlobalFeature.Callbacks, + GlobalFeature.LinkObjects, + GlobalFeature.ParameterStyling + ) + .excludeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism + ) + .build(); + embeddedTemplateDir = templateDir = "php-lumen"; /* diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpSilexServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpSilexServerCodegen.java index 983ed07181..fb39852d2e 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpSilexServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpSilexServerCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -21,6 +21,7 @@ import io.swagger.v3.oas.models.media.ArraySchema; import io.swagger.v3.oas.models.media.Schema; import org.apache.commons.lang3.StringUtils; import org.openapitools.codegen.*; +import org.openapitools.codegen.meta.features.*; import org.openapitools.codegen.utils.ModelUtils; import java.io.File; @@ -38,6 +39,21 @@ public class PhpSilexServerCodegen extends DefaultCodegen implements CodegenConf public PhpSilexServerCodegen() { super(); + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .wireFormatFeatures(EnumSet.of(WireFormatFeature.JSON, WireFormatFeature.XML)) + .securityFeatures(EnumSet.noneOf(SecurityFeature.class)) + .excludeGlobalFeatures( + GlobalFeature.XMLStructureDefinitions, + GlobalFeature.Callbacks, + GlobalFeature.LinkObjects, + GlobalFeature.ParameterStyling + ) + .excludeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism + ) + .build(); + invokerPackage = camelize("OpenAPIServer"); String packageName = "OpenAPIServer"; modelPackage = "lib" + File.separator + "models"; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpSlim4ServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpSlim4ServerCodegen.java index 4ec5c1f116..2aa867d6aa 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpSlim4ServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpSlim4ServerCodegen.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -44,6 +44,8 @@ public class PhpSlim4ServerCodegen extends PhpSlimServerCodegen { protected String mockPackage = ""; protected String utilsDirName = "Utils"; protected String utilsPackage = ""; + protected String interfacesDirName = "Interfaces"; + protected String interfacesPackage = ""; public PhpSlim4ServerCodegen() { super(); @@ -54,6 +56,7 @@ public class PhpSlim4ServerCodegen extends PhpSlimServerCodegen { mockPackage = invokerPackage + "\\" + mockDirName; utilsPackage = invokerPackage + "\\" + utilsDirName; + interfacesPackage = invokerPackage + "\\" + interfacesDirName; outputFolder = "generated-code" + File.separator + "slim4"; embeddedTemplateDir = templateDir = "php-slim4-server"; @@ -92,6 +95,7 @@ public class PhpSlim4ServerCodegen extends PhpSlimServerCodegen { // Update mockPackage and utilsPackage mockPackage = invokerPackage + "\\" + mockDirName; utilsPackage = invokerPackage + "\\" + utilsDirName; + interfacesPackage = invokerPackage + "\\" + interfacesDirName; } // make mock src path available in mustache template @@ -104,6 +108,11 @@ public class PhpSlim4ServerCodegen extends PhpSlimServerCodegen { additionalProperties.put("utilsSrcPath", "./" + toSrcPath(utilsPackage, srcBasePath)); additionalProperties.put("utilsTestPath", "./" + toSrcPath(utilsPackage, testBasePath)); + // same for interfaces package + additionalProperties.put("interfacesPackage", interfacesPackage); + additionalProperties.put("interfacesSrcPath", "./" + toSrcPath(interfacesPackage, srcBasePath)); + additionalProperties.put("interfacesTestPath", "./" + toSrcPath(interfacesPackage, testBasePath)); + if (additionalProperties.containsKey(PSR7_IMPLEMENTATION)) { this.setPsr7Implementation((String) additionalProperties.get(PSR7_IMPLEMENTATION)); } @@ -147,6 +156,9 @@ public class PhpSlim4ServerCodegen extends PhpSlimServerCodegen { supportingFiles.add(new SupportingFile("string_utils_trait_test.mustache", toSrcPath(utilsPackage, testBasePath), toTraitName("StringUtils") + "Test.php")); supportingFiles.add(new SupportingFile("model_utils_trait.mustache", toSrcPath(utilsPackage, srcBasePath), toTraitName("ModelUtils") + ".php")); supportingFiles.add(new SupportingFile("model_utils_trait_test.mustache", toSrcPath(utilsPackage, testBasePath), toTraitName("ModelUtils") + "Test.php")); + + // model interface + supportingFiles.add(new SupportingFile("model_interface.mustache", toSrcPath(interfacesPackage, srcBasePath), toInterfaceName("Model") + ".php")); } /** diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpSlimServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpSlimServerCodegen.java index dac4cd5774..8c5d84a8e5 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpSlimServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpSlimServerCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -25,6 +25,7 @@ import org.apache.commons.lang3.StringUtils; import org.openapitools.codegen.*; import org.openapitools.codegen.meta.GeneratorMetadata; import org.openapitools.codegen.meta.Stability; +import org.openapitools.codegen.meta.features.*; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -48,6 +49,21 @@ public class PhpSlimServerCodegen extends AbstractPhpCodegen { public PhpSlimServerCodegen() { super(); + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .wireFormatFeatures(EnumSet.of(WireFormatFeature.JSON, WireFormatFeature.XML)) + .securityFeatures(EnumSet.noneOf(SecurityFeature.class)) + .excludeGlobalFeatures( + GlobalFeature.XMLStructureDefinitions, + GlobalFeature.Callbacks, + GlobalFeature.LinkObjects, + GlobalFeature.ParameterStyling + ) + .excludeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism + ) + .build(); + generatorMetadata = GeneratorMetadata.newBuilder(generatorMetadata) .stability(Stability.DEPRECATED) .build(); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpSymfonyServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpSymfonyServerCodegen.java index d6025d2bb2..851fca240d 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpSymfonyServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpSymfonyServerCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -21,6 +21,7 @@ import io.swagger.v3.oas.models.media.ArraySchema; import io.swagger.v3.oas.models.media.Schema; import org.apache.commons.lang3.StringUtils; import org.openapitools.codegen.*; +import org.openapitools.codegen.meta.features.*; import org.openapitools.codegen.utils.ModelUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -80,6 +81,21 @@ public class PhpSymfonyServerCodegen extends AbstractPhpCodegen implements Codeg public PhpSymfonyServerCodegen() { super(); + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .wireFormatFeatures(EnumSet.of(WireFormatFeature.JSON, WireFormatFeature.XML)) + .securityFeatures(EnumSet.noneOf(SecurityFeature.class)) + .excludeGlobalFeatures( + GlobalFeature.XMLStructureDefinitions, + GlobalFeature.Callbacks, + GlobalFeature.LinkObjects, + GlobalFeature.ParameterStyling + ) + .excludeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism + ) + .build(); + // clear import mapping (from default generator) as php does not use it // at the moment importMapping.clear(); @@ -370,7 +386,7 @@ public class PhpSymfonyServerCodegen extends AbstractPhpCodegen implements Codeg operations.put("controllerName", toControllerName((String) operations.get("pathPrefix"))); operations.put("symfonyService", toSymfonyService((String) operations.get("pathPrefix"))); - HashSet authMethods = new HashSet<>(); + List authMethods = new ArrayList(); List operationList = (List) operations.get("operation"); for (CodegenOperation op : operationList) { @@ -415,7 +431,11 @@ public class PhpSymfonyServerCodegen extends AbstractPhpCodegen implements Codeg // Add operation's authentication methods to whole interface if (op.authMethods != null) { - authMethods.addAll(op.authMethods); + for (CodegenSecurity am : op.authMethods) { + if (!authMethods.contains(am)) { + authMethods.add(am); + } + } } } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpZendExpressivePathHandlerServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpZendExpressivePathHandlerServerCodegen.java index 337978615f..19436f73ef 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpZendExpressivePathHandlerServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpZendExpressivePathHandlerServerCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -25,6 +25,7 @@ import io.swagger.v3.oas.models.media.*; import io.swagger.v3.oas.models.parameters.Parameter; import io.swagger.v3.oas.models.parameters.QueryParameter; import org.openapitools.codegen.*; +import org.openapitools.codegen.meta.features.*; import org.openapitools.codegen.utils.ModelUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -57,6 +58,22 @@ public class PhpZendExpressivePathHandlerServerCodegen extends AbstractPhpCodege public PhpZendExpressivePathHandlerServerCodegen() { super(); + + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .wireFormatFeatures(EnumSet.of(WireFormatFeature.JSON, WireFormatFeature.XML)) + .securityFeatures(EnumSet.noneOf(SecurityFeature.class)) + .excludeGlobalFeatures( + GlobalFeature.XMLStructureDefinitions, + GlobalFeature.Callbacks, + GlobalFeature.LinkObjects, + GlobalFeature.ParameterStyling + ) + .excludeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism + ) + .build(); + //no point to use double - http://php.net/manual/en/language.types.float.php , especially because of PHP 7+ float type declaration typeMapping.put("double", "float"); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PowerShellClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PowerShellClientCodegen.java index 24983cef3b..af8f712e93 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PowerShellClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PowerShellClientCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -21,6 +21,7 @@ import io.swagger.v3.oas.models.media.ArraySchema; import io.swagger.v3.oas.models.media.Schema; import org.apache.commons.lang3.StringUtils; import org.openapitools.codegen.*; +import org.openapitools.codegen.meta.features.*; import org.openapitools.codegen.utils.ModelUtils; import org.openapitools.codegen.utils.ProcessUtils; import org.slf4j.Logger; @@ -49,6 +50,28 @@ public class PowerShellClientCodegen extends DefaultCodegen implements CodegenCo public PowerShellClientCodegen() { super(); + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .wireFormatFeatures(EnumSet.of(WireFormatFeature.JSON, WireFormatFeature.XML)) + .securityFeatures(EnumSet.of( + SecurityFeature.BasicAuth, + SecurityFeature.ApiKey, + SecurityFeature.OAuth2_Implicit + )) + .excludeGlobalFeatures( + GlobalFeature.XMLStructureDefinitions, + GlobalFeature.Callbacks, + GlobalFeature.LinkObjects, + GlobalFeature.ParameterStyling + ) + .excludeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism + ) + .excludeParameterFeatures( + ParameterFeature.Cookie + ) + .build(); + outputFolder = "generated-code" + File.separator + "powershell"; modelTemplateFiles.put("model.mustache", ".ps1"); apiTemplateFiles.put("api.mustache", ".ps1"); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ProtobufSchemaCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ProtobufSchemaCodegen.java index 93b7faf09e..66c731d077 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ProtobufSchemaCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ProtobufSchemaCodegen.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -19,13 +19,15 @@ package org.openapitools.codegen.languages; import io.swagger.v3.oas.models.media.ArraySchema; import io.swagger.v3.oas.models.media.Schema; -import org.openapitools.codegen.CliOption; import org.openapitools.codegen.CodegenConfig; import org.openapitools.codegen.CodegenConstants; import org.openapitools.codegen.CodegenType; import org.openapitools.codegen.*; import org.openapitools.codegen.meta.GeneratorMetadata; import org.openapitools.codegen.meta.Stability; +import org.openapitools.codegen.meta.features.DocumentationFeature; +import org.openapitools.codegen.meta.features.SecurityFeature; +import org.openapitools.codegen.meta.features.WireFormatFeature; import org.openapitools.codegen.utils.ProcessUtils; import org.openapitools.codegen.utils.ModelUtils; @@ -67,6 +69,13 @@ public class ProtobufSchemaCodegen extends DefaultCodegen implements CodegenConf .stability(Stability.BETA) .build(); + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .includeWireFormatFeatures(WireFormatFeature.PROTOBUF) + .wireFormatFeatures(EnumSet.of(WireFormatFeature.PROTOBUF)) + .securityFeatures(EnumSet.noneOf(SecurityFeature.class)) + .build(); + outputFolder = "generated-code/protobuf-schema"; modelTemplateFiles.put("model.mustache", ".proto"); apiTemplateFiles.put("api.mustache", ".proto"); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonAbstractConnexionServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonAbstractConnexionServerCodegen.java index 5b6e133cac..3954e98f9b 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonAbstractConnexionServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonAbstractConnexionServerCodegen.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -32,6 +32,7 @@ import io.swagger.v3.oas.models.security.SecurityScheme; import org.apache.commons.io.FilenameUtils; import org.apache.commons.lang3.StringUtils; import org.openapitools.codegen.*; +import org.openapitools.codegen.meta.features.DocumentationFeature; import org.openapitools.codegen.utils.ModelUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -63,6 +64,11 @@ public class PythonAbstractConnexionServerCodegen extends DefaultCodegen impleme public PythonAbstractConnexionServerCodegen(String templateDirectory, boolean fixBodyNameValue) { super(); + + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .build(); + fixBodyName = fixBodyNameValue; modelPackage = "models"; testPackage = "test"; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonAiohttpConnexionServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonAiohttpConnexionServerCodegen.java index eac3c6b0b2..c3afd660f4 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonAiohttpConnexionServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonAiohttpConnexionServerCodegen.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -16,14 +16,41 @@ package org.openapitools.codegen.languages; import org.openapitools.codegen.SupportingFile; +import org.openapitools.codegen.meta.features.*; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import java.util.EnumSet; + public class PythonAiohttpConnexionServerCodegen extends PythonAbstractConnexionServerCodegen { private static final Logger LOGGER = LoggerFactory.getLogger(PythonAiohttpConnexionServerCodegen.class); public PythonAiohttpConnexionServerCodegen() { super("python-aiohttp", true); + + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .wireFormatFeatures(EnumSet.of(WireFormatFeature.JSON, WireFormatFeature.XML, WireFormatFeature.Custom)) + .securityFeatures(EnumSet.of( + SecurityFeature.BasicAuth, + SecurityFeature.BearerToken, + SecurityFeature.ApiKey, + SecurityFeature.OAuth2_Implicit + )) + .excludeGlobalFeatures( + GlobalFeature.XMLStructureDefinitions, + GlobalFeature.Callbacks, + GlobalFeature.LinkObjects, + GlobalFeature.ParameterStyling + ) + .excludeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism + ) + .excludeParameterFeatures( + ParameterFeature.Cookie + ) + .build(); + testPackage = "tests"; embeddedTemplateDir = templateDir = "python-aiohttp"; } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonBluePlanetServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonBluePlanetServerCodegen.java index f45a2f6510..dd60815d0d 100755 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonBluePlanetServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonBluePlanetServerCodegen.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,10 +17,12 @@ package org.openapitools.codegen.languages; import org.openapitools.codegen.CodegenConstants; import org.openapitools.codegen.SupportingFile; +import org.openapitools.codegen.meta.features.*; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.io.File; +import java.util.EnumSet; public class PythonBluePlanetServerCodegen extends PythonAbstractConnexionServerCodegen { private static final Logger LOGGER = LoggerFactory.getLogger(PythonBluePlanetServerCodegen.class); @@ -30,6 +32,30 @@ public class PythonBluePlanetServerCodegen extends PythonAbstractConnexionServer public PythonBluePlanetServerCodegen() { super("python-blueplanet", true); + + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .wireFormatFeatures(EnumSet.of(WireFormatFeature.JSON, WireFormatFeature.XML, WireFormatFeature.Custom)) + .securityFeatures(EnumSet.of( + SecurityFeature.BasicAuth, + SecurityFeature.BearerToken, + SecurityFeature.ApiKey, + SecurityFeature.OAuth2_Implicit + )) + .excludeGlobalFeatures( + GlobalFeature.XMLStructureDefinitions, + GlobalFeature.Callbacks, + GlobalFeature.LinkObjects, + GlobalFeature.ParameterStyling + ) + .excludeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism + ) + .excludeParameterFeatures( + ParameterFeature.Cookie + ) + .build(); + testPackage = "tests"; embeddedTemplateDir = templateDir = "python-blueplanet"; } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientCodegen.java index ef410594ec..fd90aabdd0 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -24,6 +24,7 @@ import io.swagger.v3.oas.models.parameters.Parameter; import org.apache.commons.io.FilenameUtils; import org.apache.commons.lang3.StringUtils; import org.openapitools.codegen.*; +import org.openapitools.codegen.meta.features.*; import org.openapitools.codegen.utils.ModelUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -58,6 +59,29 @@ public class PythonClientCodegen extends DefaultCodegen implements CodegenConfig public PythonClientCodegen() { super(); + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .wireFormatFeatures(EnumSet.of(WireFormatFeature.JSON, WireFormatFeature.XML, WireFormatFeature.Custom)) + .securityFeatures(EnumSet.of( + SecurityFeature.BasicAuth, + SecurityFeature.BearerToken, + SecurityFeature.ApiKey, + SecurityFeature.OAuth2_Implicit + )) + .excludeGlobalFeatures( + GlobalFeature.XMLStructureDefinitions, + GlobalFeature.Callbacks, + GlobalFeature.LinkObjects, + GlobalFeature.ParameterStyling + ) + .excludeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism + ) + .excludeParameterFeatures( + ParameterFeature.Cookie + ) + .build(); + // clear import mapping (from default generator) as python does not use it // at the moment importMapping.clear(); @@ -252,7 +276,7 @@ public class PythonClientCodegen extends DefaultCodegen implements CodegenConfig // If the package name consists of dots(openapi.client), then we need to create the directory structure like openapi/client with __init__ files. String[] packageNameSplits = packageName.split("\\."); String currentPackagePath = ""; - for (int i = 0; i < packageNameSplits.length-1; i++) { + for (int i = 0; i < packageNameSplits.length - 1; i++) { if (i > 0) { currentPackagePath = currentPackagePath + File.separatorChar; } @@ -542,7 +566,7 @@ public class PythonClientCodegen extends DefaultCodegen implements CodegenConfig name = name.replaceAll("-", "_"); // e.g. PhoneNumberApi.py => phone_number_api.py - return underscore(name+ "_" + apiNameSuffix); + return underscore(name + "_" + apiNameSuffix); } @Override @@ -560,7 +584,7 @@ public class PythonClientCodegen extends DefaultCodegen implements CodegenConfig if (name.length() == 0) { return "default_api"; } - return underscore(name+ "_" + apiNameSuffix); + return underscore(name + "_" + apiNameSuffix); } @Override @@ -625,6 +649,7 @@ public class PythonClientCodegen extends DefaultCodegen implements CodegenConfig /** * Return the default value of the property + * * @param p OpenAPI property object * @return string presentation of the default value of the property */ @@ -654,7 +679,7 @@ public class PythonClientCodegen extends DefaultCodegen implements CodegenConfig if (Pattern.compile("\r\n|\r|\n").matcher((String) p.getDefault()).find()) return "'''" + p.getDefault() + "'''"; else - return "'" + ((String) p.getDefault()).replaceAll("'","\'") + "'"; + return "'" + ((String) p.getDefault()).replaceAll("'", "\'") + "'"; } } else if (ModelUtils.isArraySchema(p)) { if (p.getDefault() != null) { diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientExperimentalCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientExperimentalCodegen.java index eb3c65438e..6a18abea01 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientExperimentalCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientExperimentalCodegen.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -29,6 +29,7 @@ import org.apache.commons.io.FilenameUtils; import org.apache.commons.lang3.StringUtils; import org.openapitools.codegen.*; import org.openapitools.codegen.examples.ExampleGenerator; +import org.openapitools.codegen.meta.features.*; import org.openapitools.codegen.utils.ModelUtils; import org.openapitools.codegen.meta.GeneratorMetadata; import org.openapitools.codegen.meta.Stability; @@ -50,8 +51,32 @@ public class PythonClientExperimentalCodegen extends PythonClientCodegen { public PythonClientExperimentalCodegen() { super(); + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .wireFormatFeatures(EnumSet.of(WireFormatFeature.JSON, WireFormatFeature.XML, WireFormatFeature.Custom)) + .securityFeatures(EnumSet.of( + SecurityFeature.BasicAuth, + SecurityFeature.BearerToken, + SecurityFeature.ApiKey, + SecurityFeature.OAuth2_Implicit + )) + .excludeGlobalFeatures( + GlobalFeature.XMLStructureDefinitions, + GlobalFeature.Callbacks, + GlobalFeature.LinkObjects, + GlobalFeature.ParameterStyling + ) + .excludeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism + ) + .excludeParameterFeatures( + ParameterFeature.Cookie + ) + .build(); + // this may set datatype right for additional properties instantiationTypes.put("map", "dict"); + languageSpecificPrimitives.add("file_type"); languageSpecificPrimitives.add("none_type"); @@ -643,6 +668,11 @@ public class PythonClientExperimentalCodegen extends PythonClientCodegen { // fix ListContainers p.complexType = getPythonClassName(p.mostInnerItems.complexType); } + // if a model has a property that is of type self, remove the module name from the dataType + if (p.complexType != null && p.dataType.contains(model.classname)) { + String classNameNoModule = getPythonClassName(model.classname); + p.dataType = p.dataType.replace(model.classname, classNameNoModule); + } } @Override @@ -753,6 +783,10 @@ public class PythonClientExperimentalCodegen extends PythonClientCodegen { result.imports.add(modelName); } } + // if a class has a property of type self, remove the self import from imports + if (result.imports.contains(result.classname)) { + result.imports.remove(result.classname); + } return result; } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonFlaskConnexionServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonFlaskConnexionServerCodegen.java index 5cb5dbb3f9..085b9e821e 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonFlaskConnexionServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonFlaskConnexionServerCodegen.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RClientCodegen.java index c451a5166a..273978d0a7 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RClientCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -23,6 +23,7 @@ import io.swagger.v3.oas.models.media.Schema; import io.swagger.v3.oas.models.parameters.Parameter; import org.apache.commons.lang3.StringUtils; import org.openapitools.codegen.*; +import org.openapitools.codegen.meta.features.*; import org.openapitools.codegen.utils.ModelUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -69,6 +70,33 @@ public class RClientCodegen extends DefaultCodegen implements CodegenConfig { public RClientCodegen() { super(); + + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .wireFormatFeatures(EnumSet.of(WireFormatFeature.JSON, WireFormatFeature.XML, WireFormatFeature.Custom)) + .securityFeatures(EnumSet.of( + SecurityFeature.BasicAuth, + SecurityFeature.ApiKey, + SecurityFeature.OAuth2_Implicit + )) + .excludeGlobalFeatures( + GlobalFeature.XMLStructureDefinitions, + GlobalFeature.Callbacks, + GlobalFeature.LinkObjects, + GlobalFeature.ParameterStyling + ) + .excludeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism + ) + .excludeParameterFeatures( + ParameterFeature.Cookie + ) + .includeClientModificationFeatures( + ClientModificationFeature.BasePath, + ClientModificationFeature.UserAgent + ) + .build(); + outputFolder = "generated-code/r"; modelTemplateFiles.put("model.mustache", ".R"); apiTemplateFiles.put("api.mustache", ".R"); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RubyClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RubyClientCodegen.java index b043f14f40..9022c2462f 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RubyClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RubyClientCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -22,13 +22,14 @@ import io.swagger.v3.oas.models.media.Schema; import io.swagger.v3.oas.models.parameters.Parameter; import org.apache.commons.lang3.StringUtils; import org.openapitools.codegen.*; +import org.openapitools.codegen.meta.features.*; import org.openapitools.codegen.utils.ModelUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.io.File; import java.util.Arrays; -import java.util.Iterator; +import java.util.EnumSet; import java.util.Locale; import java.util.Map; @@ -69,6 +70,33 @@ public class RubyClientCodegen extends AbstractRubyCodegen { public RubyClientCodegen() { super(); + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .wireFormatFeatures(EnumSet.of(WireFormatFeature.JSON, WireFormatFeature.XML, WireFormatFeature.Custom)) + .securityFeatures(EnumSet.of( + SecurityFeature.BasicAuth, + SecurityFeature.BearerToken, + SecurityFeature.ApiKey, + SecurityFeature.OAuth2_Implicit + )) + .excludeGlobalFeatures( + GlobalFeature.XMLStructureDefinitions, + GlobalFeature.Callbacks, + GlobalFeature.LinkObjects, + GlobalFeature.ParameterStyling + ) + .includeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism + ) + .excludeParameterFeatures( + ParameterFeature.Cookie + ) + .includeClientModificationFeatures( + ClientModificationFeature.BasePath, + ClientModificationFeature.UserAgent + ) + .build(); + supportsInheritance = true; // clear import mapping (from default generator) as ruby does not use it @@ -244,8 +272,6 @@ public class RubyClientCodegen extends AbstractRubyCodegen { writeOptional(outputFolder, new SupportingFile("spec_helper.mustache", specFolder, "spec_helper.rb")); writeOptional(outputFolder, new SupportingFile("configuration_spec.mustache", specFolder, "configuration_spec.rb")); writeOptional(outputFolder, new SupportingFile("api_client_spec.mustache", specFolder, "api_client_spec.rb")); - // not including base object test as the moment as not all API has model - //writeOptional(outputFolder, new SupportingFile("base_object_spec.mustache", specFolder, "base_object_spec.rb")); } @Override diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RubyOnRailsServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RubyOnRailsServerCodegen.java index 25a9eed5da..ddcc5c6f21 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RubyOnRailsServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RubyOnRailsServerCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -22,11 +22,13 @@ import org.openapitools.codegen.CliOption; import org.openapitools.codegen.CodegenConstants; import org.openapitools.codegen.CodegenType; import org.openapitools.codegen.SupportingFile; +import org.openapitools.codegen.meta.features.*; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.io.File; import java.text.SimpleDateFormat; +import java.util.EnumSet; import java.util.Locale; import java.util.Map; @@ -71,6 +73,25 @@ public class RubyOnRailsServerCodegen extends AbstractRubyCodegen { public RubyOnRailsServerCodegen() { super(); + + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .wireFormatFeatures(EnumSet.of(WireFormatFeature.JSON, WireFormatFeature.XML, WireFormatFeature.Custom)) + .securityFeatures(EnumSet.noneOf(SecurityFeature.class)) + .excludeGlobalFeatures( + GlobalFeature.XMLStructureDefinitions, + GlobalFeature.Callbacks, + GlobalFeature.LinkObjects, + GlobalFeature.ParameterStyling + ) + .excludeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism + ) + .excludeParameterFeatures( + ParameterFeature.Cookie + ) + .build(); + outputFolder = "generated-code" + File.separator + "rails5"; apiPackage = "app/controllers"; apiTemplateFiles.put("controller.mustache", ".rb"); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RubySinatraServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RubySinatraServerCodegen.java index 0bac873423..7f626aade4 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RubySinatraServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RubySinatraServerCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -20,10 +20,12 @@ package org.openapitools.codegen.languages; import io.swagger.v3.oas.models.media.Schema; import org.openapitools.codegen.CodegenType; import org.openapitools.codegen.SupportingFile; +import org.openapitools.codegen.meta.features.*; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.io.File; +import java.util.EnumSet; import java.util.Map; import static org.openapitools.codegen.utils.StringUtils.camelize; @@ -40,6 +42,25 @@ public class RubySinatraServerCodegen extends AbstractRubyCodegen { public RubySinatraServerCodegen() { super(); + + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .wireFormatFeatures(EnumSet.of(WireFormatFeature.JSON, WireFormatFeature.XML, WireFormatFeature.Custom)) + .securityFeatures(EnumSet.noneOf(SecurityFeature.class)) + .excludeGlobalFeatures( + GlobalFeature.XMLStructureDefinitions, + GlobalFeature.Callbacks, + GlobalFeature.LinkObjects, + GlobalFeature.ParameterStyling + ) + .excludeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism + ) + .excludeParameterFeatures( + ParameterFeature.Cookie + ) + .build(); + apiPackage = "lib"; outputFolder = "generated-code" + File.separator + "sinatra"; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RustClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RustClientCodegen.java index cdac07896c..e5f1e88a4e 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RustClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RustClientCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -22,6 +22,7 @@ import io.swagger.v3.oas.models.media.ArraySchema; import io.swagger.v3.oas.models.media.Schema; import io.swagger.v3.oas.models.media.StringSchema; import org.openapitools.codegen.*; +import org.openapitools.codegen.meta.features.*; import org.openapitools.codegen.utils.ModelUtils; import org.openapitools.codegen.utils.StringUtils; import org.slf4j.Logger; @@ -62,6 +63,33 @@ public class RustClientCodegen extends DefaultCodegen implements CodegenConfig { public RustClientCodegen() { super(); + + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .wireFormatFeatures(EnumSet.of(WireFormatFeature.JSON, WireFormatFeature.XML, WireFormatFeature.Custom)) + .securityFeatures(EnumSet.of( + SecurityFeature.BasicAuth, + SecurityFeature.ApiKey, + SecurityFeature.OAuth2_Implicit + )) + .excludeGlobalFeatures( + GlobalFeature.XMLStructureDefinitions, + GlobalFeature.Callbacks, + GlobalFeature.LinkObjects, + GlobalFeature.ParameterStyling + ) + .excludeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism + ) + .excludeParameterFeatures( + ParameterFeature.Cookie + ) + .includeClientModificationFeatures( + ClientModificationFeature.BasePath, + ClientModificationFeature.UserAgent + ) + .build(); + outputFolder = "generated-code/rust"; modelTemplateFiles.put("model.mustache", ".rs"); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RustServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RustServerCodegen.java index 0f77c53475..d505bf3912 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RustServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RustServerCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -30,6 +30,7 @@ import io.swagger.v3.oas.models.responses.ApiResponse; import io.swagger.v3.oas.models.servers.Server; import org.apache.commons.lang3.StringUtils; import org.openapitools.codegen.*; +import org.openapitools.codegen.meta.features.*; import org.openapitools.codegen.utils.ModelUtils; import org.openapitools.codegen.utils.URLPathUtils; import org.slf4j.Logger; @@ -74,6 +75,34 @@ public class RustServerCodegen extends DefaultCodegen implements CodegenConfig { public RustServerCodegen() { super(); + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .wireFormatFeatures(EnumSet.of(WireFormatFeature.JSON, WireFormatFeature.XML, WireFormatFeature.Custom)) + .securityFeatures(EnumSet.of( + SecurityFeature.ApiKey, + SecurityFeature.BasicAuth, + SecurityFeature.OAuth2_Implicit + )) + .excludeGlobalFeatures( + GlobalFeature.XMLStructureDefinitions, + GlobalFeature.Callbacks, + GlobalFeature.LinkObjects, + GlobalFeature.ParameterStyling + ) + .excludeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism, + SchemaSupportFeature.Union, + SchemaSupportFeature.Composite + ) + .excludeParameterFeatures( + ParameterFeature.Cookie + ) + .includeClientModificationFeatures( + ClientModificationFeature.BasePath + ) + .build(); + + // Show the generation timestamp by default hideGenerationTimestamp = Boolean.FALSE; @@ -514,7 +543,7 @@ public class RustServerCodegen extends DefaultCodegen implements CodegenConfig { } private boolean isMimetypePlain(String mimetype) { - return isMimetypePlainText(mimetype) || isMimetypeHtmlText(mimetype) || isMimetypeOctetStream(mimetype); + return isMimetypePlainText(mimetype) || isMimetypeHtmlText(mimetype) || isMimetypeOctetStream(mimetype); } @Override @@ -522,6 +551,16 @@ public class RustServerCodegen extends DefaultCodegen implements CodegenConfig { Map definitions = ModelUtils.getSchemas(this.openAPI); CodegenOperation op = super.fromOperation(path, httpMethod, operation, servers); + String pathFormatString = op.path; + for (CodegenParameter param : op.pathParams) { + // Replace {baseName} with {paramName} for format string + String paramSearch = "{" + param.baseName + "}"; + String paramReplace = "{" + param.paramName + "}"; + + pathFormatString = pathFormatString.replace(paramSearch, paramReplace); + } + op.vendorExtensions.put("x-path-format-string", pathFormatString); + // The Rust code will need to contain a series of regular expressions. // For performance, we'll construct these at start-of-day and re-use // them. That means we need labels for them. @@ -554,10 +593,18 @@ public class RustServerCodegen extends DefaultCodegen implements CodegenConfig { } // Don't prefix with '^' so that the templates can put the // basePath on the front. - pathSetEntry.put("pathRegEx", op.path.replace("{", "(?P<").replace("}", ">[^/?#]*)") + "$"); + String pathRegEx = op.path; + for (CodegenParameter param : op.pathParams) { + // Replace {baseName} with (?P[^/?#]*) for regex + String paramSearch = "{" + param.baseName + "}"; + String paramReplace = "(?P<" + param.paramName + ">[^/?#]*)"; + + pathRegEx = pathRegEx.replace(paramSearch, paramReplace); + } + + pathSetEntry.put("pathRegEx", pathRegEx + "$"); pathSetMap.put(pathId, pathSetEntry); } - op.vendorExtensions.put("operation_id", underscore(op.operationId)); op.vendorExtensions.put("uppercase_operation_id", underscore(op.operationId).toUpperCase(Locale.ROOT)); op.vendorExtensions.put("path", op.path.replace("{", ":").replace("}", "")); @@ -983,7 +1030,7 @@ public class RustServerCodegen extends DefaultCodegen implements CodegenConfig { am.getItems() != null && !StringUtils.isEmpty(am.getItems().get$ref())) { Schema inner_schema = allDefinitions.get( - ModelUtils.getSimpleRef(am.getItems().get$ref())); + ModelUtils.getSimpleRef(am.getItems().get$ref())); if (inner_schema.getXml() != null && inner_schema.getXml().getName() != null) { @@ -1239,9 +1286,7 @@ public class RustServerCodegen extends DefaultCodegen implements CodegenConfig { // the user than the alternative. LOGGER.warn("Ignoring additionalProperties (see https://github.com/OpenAPITools/openapi-generator/issues/318) alongside defined properties"); cm.dataType = null; - } - else - { + } else { String type; if (typeMapping.containsKey(cm.additionalPropertiesType)) { diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaAkkaClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaAkkaClientCodegen.java index a8f4327f9f..2d291924a7 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaAkkaClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaAkkaClientCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,7 +17,6 @@ package org.openapitools.codegen.languages; -import com.google.common.base.CaseFormat; import com.samskivert.mustache.Mustache; import com.samskivert.mustache.Template; import io.swagger.v3.oas.models.media.ArraySchema; @@ -25,6 +24,7 @@ import io.swagger.v3.oas.models.media.Schema; import io.swagger.v3.oas.models.security.SecurityScheme; import org.apache.commons.lang3.StringUtils; import org.openapitools.codegen.*; +import org.openapitools.codegen.meta.features.*; import org.openapitools.codegen.utils.ModelUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -56,6 +56,32 @@ public class ScalaAkkaClientCodegen extends AbstractScalaCodegen implements Code public ScalaAkkaClientCodegen() { super(); + + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .wireFormatFeatures(EnumSet.of(WireFormatFeature.JSON, WireFormatFeature.XML, WireFormatFeature.Custom)) + .securityFeatures(EnumSet.of( + SecurityFeature.BasicAuth, + SecurityFeature.ApiKey + )) + .excludeGlobalFeatures( + GlobalFeature.XMLStructureDefinitions, + GlobalFeature.Callbacks, + GlobalFeature.LinkObjects, + GlobalFeature.ParameterStyling + ) + .excludeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism + ) + .excludeParameterFeatures( + ParameterFeature.Cookie + ) + .includeClientModificationFeatures( + ClientModificationFeature.BasePath, + ClientModificationFeature.UserAgent + ) + .build(); + outputFolder = "generated-code/scala-akka"; modelTemplateFiles.put("model.mustache", ".scala"); apiTemplateFiles.put("api.mustache", ".scala"); @@ -265,6 +291,9 @@ public class ScalaAkkaClientCodegen extends AbstractScalaCodegen implements Code } else if (ModelUtils.isArraySchema(p)) { ArraySchema ap = (ArraySchema) p; String inner = getSchemaType(ap.getItems()); + if (ModelUtils.isSet(ap)) { + return "Set[" + inner + "].empty "; + } return "Seq[" + inner + "].empty "; } else if (ModelUtils.isStringSchema(p)) { return null; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaFinchServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaFinchServerCodegen.java index 64696f6896..e830d1b316 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaFinchServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaFinchServerCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -20,6 +20,7 @@ package org.openapitools.codegen.languages; import io.swagger.v3.oas.models.media.ArraySchema; import io.swagger.v3.oas.models.media.Schema; import org.openapitools.codegen.*; +import org.openapitools.codegen.meta.features.*; import org.openapitools.codegen.utils.ModelUtils; import java.io.File; @@ -35,6 +36,25 @@ public class ScalaFinchServerCodegen extends DefaultCodegen implements CodegenCo public ScalaFinchServerCodegen() { super(); + + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .wireFormatFeatures(EnumSet.of(WireFormatFeature.JSON, WireFormatFeature.XML, WireFormatFeature.Custom)) + .securityFeatures(EnumSet.noneOf(SecurityFeature.class)) + .excludeGlobalFeatures( + GlobalFeature.XMLStructureDefinitions, + GlobalFeature.Callbacks, + GlobalFeature.LinkObjects, + GlobalFeature.ParameterStyling + ) + .excludeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism + ) + .excludeParameterFeatures( + ParameterFeature.Cookie + ) + .build(); + outputFolder = "generated-code/finch"; modelTemplateFiles.put("model.mustache", ".scala"); apiTemplateFiles.put("api.mustache", ".scala"); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaGatlingCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaGatlingCodegen.java index 000430d1af..304b43a14b 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaGatlingCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaGatlingCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -28,12 +28,14 @@ import org.apache.commons.lang3.StringUtils; import org.openapitools.codegen.CodegenConfig; import org.openapitools.codegen.CodegenType; import org.openapitools.codegen.SupportingFile; +import org.openapitools.codegen.meta.features.*; import org.openapitools.codegen.utils.ModelUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.io.File; import java.io.IOException; +import java.nio.charset.StandardCharsets; import java.util.*; public class ScalaGatlingCodegen extends AbstractScalaCodegen implements CodegenConfig { @@ -77,6 +79,30 @@ public class ScalaGatlingCodegen extends AbstractScalaCodegen implements Codegen public ScalaGatlingCodegen() { super(); + // Although the generator supports authorization, it's done via manual header modification and it's done + // globally. This means it doesn't _technically_ support auth per OpenAPI Spec (which would allow, for example, a different API key per operation), + // so it's not listed here as supported. + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .wireFormatFeatures(EnumSet.of(WireFormatFeature.JSON, WireFormatFeature.XML, WireFormatFeature.Custom)) + .securityFeatures(EnumSet.noneOf(SecurityFeature.class)) + .excludeGlobalFeatures( + GlobalFeature.XMLStructureDefinitions, + GlobalFeature.Callbacks, + GlobalFeature.LinkObjects, + GlobalFeature.ParameterStyling + ) + .excludeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism + ) + .excludeParameterFeatures( + ParameterFeature.Cookie + ) + .includeClientModificationFeatures( + ClientModificationFeature.BasePath + ) + .build(); + sourceFolder = "src" + File.separator + "gatling" + File.separator + "scala"; // set the output folder here @@ -151,7 +177,6 @@ public class ScalaGatlingCodegen extends AbstractScalaCodegen implements Codegen importMapping.remove("Map"); importMapping.put("Date", "java.util.Date"); - importMapping.put("ListBuffer", "scala.collection.mutable.ListBuffer"); typeMapping = new HashMap(); typeMapping.put("enum", "NSString"); @@ -288,7 +313,11 @@ public class ScalaGatlingCodegen extends AbstractScalaCodegen implements Codegen operation.setVendorExtension("x-gatling-body-feeder", operation.getOperationId() + "BodyFeeder"); operation.setVendorExtension("x-gatling-body-feeder-params", StringUtils.join(sessionBodyVars, ",")); try { - FileUtils.writeStringToFile(new File(outputFolder + File.separator + dataFolder + File.separator + operation.getOperationId() + "-" + "bodyParams.csv"), StringUtils.join(bodyFeederParams, ",")); + FileUtils.writeStringToFile( + new File(outputFolder + File.separator + dataFolder + File.separator + operation.getOperationId() + "-" + "bodyParams.csv"), + StringUtils.join(bodyFeederParams, ","), + StandardCharsets.UTF_8 + ); } catch (IOException ioe) { LOGGER.error("Could not create feeder file for operationId" + operation.getOperationId(), ioe); } @@ -334,7 +363,11 @@ public class ScalaGatlingCodegen extends AbstractScalaCodegen implements Codegen operation.addExtension("x-gatling-" + parameterType.toLowerCase(Locale.ROOT) + "-params", vendorList); operation.addExtension("x-gatling-" + parameterType.toLowerCase(Locale.ROOT) + "-feeder", operation.getOperationId() + parameterType.toUpperCase(Locale.ROOT) + "Feeder"); try { - FileUtils.writeStringToFile(new File(outputFolder + File.separator + dataFolder + File.separator + operation.getOperationId() + "-" + parameterType.toLowerCase(Locale.ROOT) + "Params.csv"), StringUtils.join(parameterNames, ",")); + FileUtils.writeStringToFile( + new File(outputFolder + File.separator + dataFolder + File.separator + operation.getOperationId() + "-" + parameterType.toLowerCase(Locale.ROOT) + "Params.csv"), + StringUtils.join(parameterNames, ","), + StandardCharsets.UTF_8 + ); } catch (IOException ioe) { LOGGER.error("Could not create feeder file for operationId" + operation.getOperationId(), ioe); } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaHttpClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaHttpClientCodegen.java index 637a5c819c..0d6462160f 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaHttpClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaHttpClientCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -21,11 +21,13 @@ import org.apache.commons.lang3.StringUtils; import org.openapitools.codegen.*; import org.openapitools.codegen.meta.GeneratorMetadata; import org.openapitools.codegen.meta.Stability; +import org.openapitools.codegen.meta.features.*; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.io.File; import java.util.Arrays; +import java.util.EnumSet; import java.util.HashMap; import static org.openapitools.codegen.utils.StringUtils.camelize; @@ -53,6 +55,27 @@ public class ScalaHttpClientCodegen extends AbstractScalaCodegen implements Code .stability(Stability.DEPRECATED) .build(); + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .wireFormatFeatures(EnumSet.of(WireFormatFeature.JSON, WireFormatFeature.XML, WireFormatFeature.Custom)) + .securityFeatures(EnumSet.noneOf(SecurityFeature.class)) + .excludeGlobalFeatures( + GlobalFeature.XMLStructureDefinitions, + GlobalFeature.Callbacks, + GlobalFeature.LinkObjects, + GlobalFeature.ParameterStyling + ) + .excludeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism + ) + .excludeParameterFeatures( + ParameterFeature.Cookie + ) + .includeClientModificationFeatures( + ClientModificationFeature.BasePath + ) + .build(); + outputFolder = "generated-code/scala-http-client"; modelTemplateFiles.put("model.mustache", ".scala"); apiTemplateFiles.put("api.mustache", ".scala"); @@ -110,7 +133,6 @@ public class ScalaHttpClientCodegen extends AbstractScalaCodegen implements Code importMapping.remove("Map"); importMapping.put("Date", "java.util.Date"); - importMapping.put("ListBuffer", "scala.collection.mutable.ListBuffer"); typeMapping = new HashMap(); typeMapping.put("enum", "NSString"); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaLagomServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaLagomServerCodegen.java index 9b4651e601..c7f97cc690 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaLagomServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaLagomServerCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -19,6 +19,7 @@ package org.openapitools.codegen.languages; import org.apache.commons.lang3.StringUtils; import org.openapitools.codegen.*; +import org.openapitools.codegen.meta.features.*; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -38,6 +39,24 @@ public class ScalaLagomServerCodegen extends AbstractScalaCodegen implements Cod public ScalaLagomServerCodegen() { super(); + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .wireFormatFeatures(EnumSet.of(WireFormatFeature.JSON, WireFormatFeature.XML, WireFormatFeature.Custom)) + .securityFeatures(EnumSet.noneOf(SecurityFeature.class)) + .excludeGlobalFeatures( + GlobalFeature.XMLStructureDefinitions, + GlobalFeature.Callbacks, + GlobalFeature.LinkObjects, + GlobalFeature.ParameterStyling + ) + .excludeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism + ) + .excludeParameterFeatures( + ParameterFeature.Cookie + ) + .build(); + outputFolder = "generated-code/scala-lagom-server"; modelTemplateFiles.put("model.mustache", ".scala"); apiTemplateFiles.put("api.mustache", ".scala"); @@ -76,7 +95,6 @@ public class ScalaLagomServerCodegen extends AbstractScalaCodegen implements Cod importMapping.remove("Map"); importMapping.put("DateTime", "org.joda.time.DateTime"); - importMapping.put("ListBuffer", "scala.collection.mutable.ListBuffer"); typeMapping = new HashMap<>(); typeMapping.put("Integer", "Int"); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaPlayFrameworkServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaPlayFrameworkServerCodegen.java index 1f02cc989f..b0684b48be 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaPlayFrameworkServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaPlayFrameworkServerCodegen.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -22,16 +22,14 @@ import com.samskivert.mustache.Mustache.Lambda; import io.swagger.v3.oas.models.media.ArraySchema; import io.swagger.v3.oas.models.media.Schema; import org.openapitools.codegen.*; +import org.openapitools.codegen.meta.features.*; import org.openapitools.codegen.templating.mustache.IndentedLambda; import org.openapitools.codegen.utils.ModelUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.io.File; -import java.util.HashMap; -import java.util.List; -import java.util.Locale; -import java.util.Map; +import java.util.*; import java.util.regex.Matcher; import java.util.regex.Pattern; import java.util.stream.Collectors; @@ -59,6 +57,25 @@ public class ScalaPlayFrameworkServerCodegen extends AbstractScalaCodegen implem public ScalaPlayFrameworkServerCodegen() { super(); + + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .wireFormatFeatures(EnumSet.of(WireFormatFeature.JSON, WireFormatFeature.XML, WireFormatFeature.Custom)) + .securityFeatures(EnumSet.noneOf(SecurityFeature.class)) + .excludeGlobalFeatures( + GlobalFeature.XMLStructureDefinitions, + GlobalFeature.Callbacks, + GlobalFeature.LinkObjects, + GlobalFeature.ParameterStyling + ) + .includeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism + ) + .excludeParameterFeatures( + ParameterFeature.Cookie + ) + .build(); + outputFolder = "generated-code" + File.separator + "scala-play-server"; modelTemplateFiles.put("model.mustache", ".scala"); apiTemplateFiles.put("api.mustache", ".scala"); @@ -348,6 +365,9 @@ public class ScalaPlayFrameworkServerCodegen extends AbstractScalaCodegen implem if (ModelUtils.isArraySchema(p)) { Schema items = ((ArraySchema) p).getItems(); String inner = getSchemaType(items); + if (ModelUtils.isSet(p)) { + return "Set.empty[" + inner + "]"; + } return "List.empty[" + inner + "]"; } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalatraServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalatraServerCodegen.java index 806157ce87..c511b29ba8 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalatraServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalatraServerCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -18,6 +18,7 @@ package org.openapitools.codegen.languages; import org.openapitools.codegen.*; +import org.openapitools.codegen.meta.features.*; import java.util.*; @@ -29,6 +30,25 @@ public class ScalatraServerCodegen extends AbstractScalaCodegen implements Codeg public ScalatraServerCodegen() { super(); + + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .wireFormatFeatures(EnumSet.of(WireFormatFeature.JSON, WireFormatFeature.XML, WireFormatFeature.Custom)) + .securityFeatures(EnumSet.noneOf(SecurityFeature.class)) + .excludeGlobalFeatures( + GlobalFeature.XMLStructureDefinitions, + GlobalFeature.Callbacks, + GlobalFeature.LinkObjects, + GlobalFeature.ParameterStyling + ) + .excludeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism + ) + .excludeParameterFeatures( + ParameterFeature.Cookie + ) + .build(); + outputFolder = "generated-code/scalatra"; modelTemplateFiles.put("model.mustache", ".scala"); apiTemplateFiles.put("api.mustache", ".scala"); @@ -63,14 +83,27 @@ public class ScalatraServerCodegen extends AbstractScalaCodegen implements Codeg "Integer", "Long", "Float", - "List", "Set", "Map") ); + typeMapping = new HashMap<>(); + typeMapping.put("array", "List"); + typeMapping.put("set", "Set"); + typeMapping.put("boolean", "Boolean"); + typeMapping.put("string", "String"); + typeMapping.put("int", "Int"); typeMapping.put("integer", "Int"); typeMapping.put("long", "Long"); + typeMapping.put("float", "Float"); + typeMapping.put("byte", "Byte"); + typeMapping.put("short", "Short"); + typeMapping.put("char", "Char"); + typeMapping.put("double", "Double"); + typeMapping.put("object", "Any"); + typeMapping.put("file", "File"); typeMapping.put("binary", "File"); + typeMapping.put("number", "Double"); additionalProperties.put("appName", "OpenAPI Sample"); additionalProperties.put("appDescription", "A sample openapi server"); @@ -95,7 +128,6 @@ public class ScalatraServerCodegen extends AbstractScalaCodegen implements Codeg supportingFiles.add(new SupportingFile("project/plugins.sbt", "project", "plugins.sbt")); supportingFiles.add(new SupportingFile("sbt", "", "sbt")); - instantiationTypes.put("array", "ArrayList"); instantiationTypes.put("map", "HashMap"); importMapping = new HashMap(); @@ -113,6 +145,11 @@ public class ScalatraServerCodegen extends AbstractScalaCodegen implements Codeg importMapping.put("LocalDateTime", "org.joda.time.LocalDateTime"); importMapping.put("LocalDate", "org.joda.time.LocalDate"); importMapping.put("LocalTime", "org.joda.time.LocalTime"); + importMapping.put("ListBuffer", "scala.collection.mutable.ListBuffer"); + importMapping.put("Set", "scala.collection.immutable.Set"); + importMapping.put("ListSet", "scala.collection.immutable.ListSet"); + + instantiationTypes.put("set", "Set"); } @Override diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalazClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalazClientCodegen.java index ec9cd9f2bf..8274a6aa65 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalazClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalazClientCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -23,6 +23,7 @@ import io.swagger.v3.oas.models.media.ArraySchema; import io.swagger.v3.oas.models.media.Schema; import org.apache.commons.lang3.StringUtils; import org.openapitools.codegen.*; +import org.openapitools.codegen.meta.features.*; import org.openapitools.codegen.utils.ModelUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -32,6 +33,7 @@ import java.io.IOException; import java.io.StringWriter; import java.io.Writer; import java.util.Arrays; +import java.util.EnumSet; import java.util.HashMap; import static org.openapitools.codegen.utils.StringUtils.camelize; @@ -42,6 +44,24 @@ public class ScalazClientCodegen extends AbstractScalaCodegen implements Codegen public ScalazClientCodegen() { super(); + + featureSet = getFeatureSet().modify() + .wireFormatFeatures(EnumSet.of(WireFormatFeature.JSON)) + .securityFeatures(EnumSet.noneOf(SecurityFeature.class)) + .excludeGlobalFeatures( + GlobalFeature.XMLStructureDefinitions, + GlobalFeature.Callbacks, + GlobalFeature.LinkObjects, + GlobalFeature.ParameterStyling + ) + .excludeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism + ) + .excludeParameterFeatures( + ParameterFeature.Cookie + ) + .build(); + outputFolder = "generated-code/scalaz"; embeddedTemplateDir = templateDir = "scalaz"; apiPackage = "org.openapitools.client.api"; @@ -76,8 +96,6 @@ public class ScalazClientCodegen extends AbstractScalaCodegen implements Codegen importMapping.remove("List"); importMapping.remove("Set"); importMapping.remove("Map"); - - importMapping.put("ListBuffer", "scala.collection.mutable.ListBuffer"); // Overrides defaults applied in DefaultCodegen which don't apply cleanly to Scala. importMapping.put("Date", "java.util.Date"); @@ -214,7 +232,7 @@ public class ScalazClientCodegen extends AbstractScalaCodegen implements Codegen } else if (ModelUtils.isArraySchema(p)) { ArraySchema ap = (ArraySchema) p; String inner = getSchemaType(ap.getItems()); - String collectionType = typeMapping.get("array"); + String collectionType = ModelUtils.isSet(ap) ? typeMapping.get("set") : typeMapping.get("array"); // We assume that users would map these collections to a monoid with an identity function // There's no reason to assume mutable structure here (which may make consumption more difficult) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SpringCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SpringCodegen.java index 9c1cee2685..5478f307bc 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SpringCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SpringCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -26,6 +26,7 @@ import org.openapitools.codegen.*; import org.openapitools.codegen.languages.features.BeanValidationFeatures; import org.openapitools.codegen.languages.features.OptionalFeatures; import org.openapitools.codegen.languages.features.PerformBeanValidationFeatures; +import org.openapitools.codegen.meta.features.*; import org.openapitools.codegen.templating.mustache.SplitStringLambda; import org.openapitools.codegen.templating.mustache.TrimWhitespaceLambda; import org.openapitools.codegen.utils.URLPathUtils; @@ -101,6 +102,33 @@ public class SpringCodegen extends AbstractJavaCodegen public SpringCodegen() { super(); + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .wireFormatFeatures(EnumSet.of(WireFormatFeature.JSON, WireFormatFeature.XML, WireFormatFeature.Custom)) + .securityFeatures(EnumSet.of( + SecurityFeature.OAuth2_Implicit, + SecurityFeature.OAuth2_AuthorizationCode, + SecurityFeature.OAuth2_ClientCredentials, + SecurityFeature.OAuth2_Password, + SecurityFeature.ApiKey, + SecurityFeature.BasicAuth + )) + .excludeGlobalFeatures( + GlobalFeature.Callbacks, + GlobalFeature.LinkObjects, + GlobalFeature.ParameterStyling + ) + .includeGlobalFeatures( + GlobalFeature.XMLStructureDefinitions + ) + .includeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism + ) + .excludeParameterFeatures( + ParameterFeature.Cookie + ) + .build(); + outputFolder = "generated-code/javaSpring"; embeddedTemplateDir = templateDir = "JavaSpring"; apiPackage = "org.openapitools.api"; @@ -849,4 +877,25 @@ public class SpringCodegen extends AbstractJavaCodegen public void setUseOptional(boolean useOptional) { this.useOptional = useOptional; } + + @Override + public void postProcessParameter(CodegenParameter p) { + // we use a custom version of this function to remove the l, d, and f suffixes from Long/Double/Float + // defaultValues + // remove the l because our users will use Long.parseLong(String defaultValue) + // remove the d because our users will use Double.parseDouble(String defaultValue) + // remove the f because our users will use Float.parseFloat(String defaultValue) + // NOTE: for CodegenParameters we DO need these suffixes because those defaultValues are used as java value + // literals assigned to Long/Double/Float + if (p.defaultValue == null) { + return; + } + Boolean fixLong = (p.isLong && "l".equals(p.defaultValue.substring(p.defaultValue.length()-1))); + Boolean fixDouble = (p.isDouble && "d".equals(p.defaultValue.substring(p.defaultValue.length()-1))); + Boolean fixFloat = (p.isFloat && "f".equals(p.defaultValue.substring(p.defaultValue.length()-1))); + if (fixLong || fixDouble || fixFloat) { + p.defaultValue = p.defaultValue.substring(0, p.defaultValue.length()-1); + } + } + } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/StaticDocCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/StaticDocCodegen.java index 8a097acde9..9faa3e7144 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/StaticDocCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/StaticDocCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -18,8 +18,10 @@ package org.openapitools.codegen.languages; import org.openapitools.codegen.*; +import org.openapitools.codegen.meta.features.*; import java.io.File; +import java.util.EnumSet; public class StaticDocCodegen extends DefaultCodegen implements CodegenConfig { protected String invokerPackage = "org.openapitools.client"; @@ -31,6 +33,16 @@ public class StaticDocCodegen extends DefaultCodegen implements CodegenConfig { public StaticDocCodegen() { super(); + featureSet = getFeatureSet().modify() + .documentationFeatures(EnumSet.allOf(DocumentationFeature.class)) + .dataTypeFeatures(EnumSet.allOf(DataTypeFeature.class)) + .wireFormatFeatures(EnumSet.allOf(WireFormatFeature.class)) + .securityFeatures(EnumSet.allOf(SecurityFeature.class)) + .globalFeatures(EnumSet.allOf(GlobalFeature.class)) + .parameterFeatures(EnumSet.allOf(ParameterFeature.class)) + .schemaSupportFeatures(EnumSet.allOf(SchemaSupportFeature.class)) + .build(); + // clear import mapping (from default generator) as this generator does not use it // at the moment importMapping.clear(); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/StaticHtml2Generator.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/StaticHtml2Generator.java index c1daf315ea..13f1e3689b 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/StaticHtml2Generator.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/StaticHtml2Generator.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -27,6 +27,7 @@ import io.swagger.v3.oas.models.media.Schema; import io.swagger.v3.oas.models.servers.Server; import org.apache.commons.lang3.StringUtils; import org.openapitools.codegen.*; +import org.openapitools.codegen.meta.features.*; import org.openapitools.codegen.utils.Markdown; import org.openapitools.codegen.utils.ModelUtils; import org.slf4j.Logger; @@ -52,6 +53,17 @@ public class StaticHtml2Generator extends DefaultCodegen implements CodegenConfi public StaticHtml2Generator() { super(); + + featureSet = getFeatureSet().modify() + .documentationFeatures(EnumSet.allOf(DocumentationFeature.class)) + .dataTypeFeatures(EnumSet.allOf(DataTypeFeature.class)) + .wireFormatFeatures(EnumSet.allOf(WireFormatFeature.class)) + .securityFeatures(EnumSet.allOf(SecurityFeature.class)) + .globalFeatures(EnumSet.allOf(GlobalFeature.class)) + .parameterFeatures(EnumSet.allOf(ParameterFeature.class)) + .schemaSupportFeatures(EnumSet.allOf(SchemaSupportFeature.class)) + .build(); + outputFolder = "docs"; embeddedTemplateDir = templateDir = "htmlDocs2"; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/StaticHtmlGenerator.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/StaticHtmlGenerator.java index 7386270d3f..a633da650a 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/StaticHtmlGenerator.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/StaticHtmlGenerator.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -24,6 +24,7 @@ import io.swagger.v3.oas.models.info.Info; import io.swagger.v3.oas.models.media.ArraySchema; import io.swagger.v3.oas.models.media.Schema; import org.openapitools.codegen.*; +import org.openapitools.codegen.meta.features.*; import org.openapitools.codegen.utils.Markdown; import org.openapitools.codegen.utils.ModelUtils; @@ -39,6 +40,17 @@ public class StaticHtmlGenerator extends DefaultCodegen implements CodegenConfig public StaticHtmlGenerator() { super(); + + featureSet = getFeatureSet().modify() + .documentationFeatures(EnumSet.allOf(DocumentationFeature.class)) + .dataTypeFeatures(EnumSet.allOf(DataTypeFeature.class)) + .wireFormatFeatures(EnumSet.allOf(WireFormatFeature.class)) + .securityFeatures(EnumSet.allOf(SecurityFeature.class)) + .globalFeatures(EnumSet.allOf(GlobalFeature.class)) + .parameterFeatures(EnumSet.allOf(ParameterFeature.class)) + .schemaSupportFeatures(EnumSet.allOf(SchemaSupportFeature.class)) + .build(); + outputFolder = "docs"; embeddedTemplateDir = templateDir = "htmlDocs"; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift3Codegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift3Codegen.java index 61a5e654fd..1f5e536841 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift3Codegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift3Codegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -26,6 +26,7 @@ import org.apache.commons.lang3.text.WordUtils; import org.openapitools.codegen.*; import org.openapitools.codegen.meta.GeneratorMetadata; import org.openapitools.codegen.meta.Stability; +import org.openapitools.codegen.meta.features.*; import org.openapitools.codegen.utils.ModelUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -75,6 +76,23 @@ public class Swift3Codegen extends DefaultCodegen implements CodegenConfig { .stability(Stability.DEPRECATED) .build(); + featureSet = getFeatureSet().modify() + .wireFormatFeatures(EnumSet.of(WireFormatFeature.JSON)) + .securityFeatures(EnumSet.noneOf(SecurityFeature.class)) + .excludeGlobalFeatures( + GlobalFeature.XMLStructureDefinitions, + GlobalFeature.Callbacks, + GlobalFeature.LinkObjects, + GlobalFeature.ParameterStyling + ) + .excludeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism + ) + .excludeParameterFeatures( + ParameterFeature.Cookie + ) + .build(); + outputFolder = "generated-code" + File.separator + "swift"; modelTemplateFiles.put("model.mustache", ".swift"); apiTemplateFiles.put("api.mustache", ".swift"); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift4Codegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift4Codegen.java index 54b8588257..eb669b02df 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift4Codegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift4Codegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -24,6 +24,7 @@ import org.apache.commons.lang3.ArrayUtils; import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.text.WordUtils; import org.openapitools.codegen.*; +import org.openapitools.codegen.meta.features.*; import org.openapitools.codegen.utils.ModelUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -76,6 +77,28 @@ public class Swift4Codegen extends DefaultCodegen implements CodegenConfig { */ public Swift4Codegen() { super(); + + featureSet = getFeatureSet().modify() + .wireFormatFeatures(EnumSet.of(WireFormatFeature.JSON)) + .securityFeatures(EnumSet.of( + SecurityFeature.BasicAuth, + SecurityFeature.ApiKey, + SecurityFeature.OAuth2_Implicit + )) + .excludeGlobalFeatures( + GlobalFeature.XMLStructureDefinitions, + GlobalFeature.Callbacks, + GlobalFeature.LinkObjects, + GlobalFeature.ParameterStyling + ) + .includeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism + ) + .excludeParameterFeatures( + ParameterFeature.Cookie + ) + .build(); + outputFolder = "generated-code" + File.separator + "swift"; modelTemplateFiles.put("model.mustache", ".swift"); apiTemplateFiles.put("api.mustache", ".swift"); @@ -213,8 +236,6 @@ public class Swift4Codegen extends DefaultCodegen implements CodegenConfig { cliOptions.add(new CliOption(CodegenConstants.NON_PUBLIC_API, CodegenConstants.NON_PUBLIC_API_DESC + "(default: false)")); - cliOptions.add(new CliOption(CodegenConstants.SORT_PARAMS_BY_REQUIRED_FLAG, - CodegenConstants.SORT_PARAMS_BY_REQUIRED_FLAG_DESC)); cliOptions.add(new CliOption(UNWRAP_REQUIRED, "Treat 'required' properties in response as non-optional " + "(which would crash the app if api returns null as opposed " diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift5ClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift5ClientCodegen.java new file mode 100644 index 0000000000..5bc9f1ad4d --- /dev/null +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift5ClientCodegen.java @@ -0,0 +1,1074 @@ +/* + * Copyright 2018 OpenAPI-Generator Contributors (https://openapi-generator.tech) + * Copyright 2018 SmartBear Software + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.openapitools.codegen.languages; + +import io.swagger.v3.oas.models.media.ArraySchema; +import io.swagger.v3.oas.models.media.Schema; +import org.apache.commons.io.FilenameUtils; +import org.apache.commons.lang3.ArrayUtils; +import org.apache.commons.lang3.StringUtils; +import org.apache.commons.lang3.text.WordUtils; +import org.openapitools.codegen.*; +import org.openapitools.codegen.meta.GeneratorMetadata; +import org.openapitools.codegen.meta.Stability; +import org.openapitools.codegen.utils.ModelUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.io.File; +import java.util.*; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +import static org.openapitools.codegen.utils.StringUtils.camelize; + + +public class Swift5ClientCodegen extends DefaultCodegen implements CodegenConfig { + private static final Logger LOGGER = LoggerFactory.getLogger(Swift5ClientCodegen.class); + + public static final String PROJECT_NAME = "projectName"; + public static final String RESPONSE_AS = "responseAs"; + public static final String OBJC_COMPATIBLE = "objcCompatible"; + public static final String POD_SOURCE = "podSource"; + public static final String POD_AUTHORS = "podAuthors"; + public static final String POD_SOCIAL_MEDIA_URL = "podSocialMediaURL"; + public static final String POD_LICENSE = "podLicense"; + public static final String POD_HOMEPAGE = "podHomepage"; + public static final String POD_SUMMARY = "podSummary"; + public static final String POD_DESCRIPTION = "podDescription"; + public static final String POD_SCREENSHOTS = "podScreenshots"; + public static final String POD_DOCUMENTATION_URL = "podDocumentationURL"; + public static final String SWIFT_USE_API_NAMESPACE = "swiftUseApiNamespace"; + public static final String DEFAULT_POD_AUTHORS = "OpenAPI Generator"; + public static final String LENIENT_TYPE_CAST = "lenientTypeCast"; + protected static final String LIBRARY_ALAMOFIRE = "alamofire"; + protected static final String LIBRARY_URLSESSION = "urlsession"; + protected static final String RESPONSE_LIBRARY_PROMISE_KIT = "PromiseKit"; + protected static final String RESPONSE_LIBRARY_RX_SWIFT = "RxSwift"; + protected static final String RESPONSE_LIBRARY_RESULT = "Result"; + protected static final String RESPONSE_LIBRARY_COMBINE = "Combine"; + protected static final String[] RESPONSE_LIBRARIES = {RESPONSE_LIBRARY_PROMISE_KIT, RESPONSE_LIBRARY_RX_SWIFT, RESPONSE_LIBRARY_RESULT, RESPONSE_LIBRARY_COMBINE}; + protected String projectName = "OpenAPIClient"; + protected boolean nonPublicApi = false; + protected boolean objcCompatible = false; + protected boolean lenientTypeCast = false; + protected boolean swiftUseApiNamespace; + protected String[] responseAs = new String[0]; + protected String sourceFolder = "Classes" + File.separator + "OpenAPIs"; + protected HashSet objcReservedWords; + protected String apiDocPath = "docs/"; + protected String modelDocPath = "docs/"; + + /** + * Constructor for the swift5 language codegen module. + */ + public Swift5ClientCodegen() { + super(); + + generatorMetadata = GeneratorMetadata.newBuilder(generatorMetadata) + .stability(Stability.BETA) + .build(); + + outputFolder = "generated-code" + File.separator + "swift"; + modelTemplateFiles.put("model.mustache", ".swift"); + apiTemplateFiles.put("api.mustache", ".swift"); + embeddedTemplateDir = templateDir = "swift5"; + apiPackage = File.separator + "APIs"; + modelPackage = File.separator + "Models"; + modelDocTemplateFiles.put("model_doc.mustache", ".md"); + apiDocTemplateFiles.put("api_doc.mustache", ".md"); + + languageSpecificPrimitives = new HashSet<>( + Arrays.asList( + "Int", + "Int32", + "Int64", + "Float", + "Double", + "Bool", + "Void", + "String", + "URL", + "Data", + "Date", + "Character", + "UUID", + "URL", + "AnyObject", + "Any", + "Decimal") + ); + defaultIncludes = new HashSet<>( + Arrays.asList( + "Data", + "Date", + "URL", // for file + "UUID", + "Array", + "Dictionary", + "Set", + "Any", + "Empty", + "AnyObject", + "Any", + "Decimal") + ); + + objcReservedWords = new HashSet<>( + Arrays.asList( + // Added for Objective-C compatibility + "id", "description", "NSArray", "NSURL", "CGFloat", "NSSet", "NSString", "NSInteger", "NSUInteger", + "NSError", "NSDictionary" + ) + ); + + reservedWords = new HashSet<>( + Arrays.asList( + // name used by swift client + "ErrorResponse", "Response", + + // Swift keywords. This list is taken from here: + // https://developer.apple.com/library/content/documentation/Swift/Conceptual/Swift_Programming_Language/LexicalStructure.html#//apple_ref/doc/uid/TP40014097-CH30-ID410 + // + // Keywords used in declarations + "associatedtype", "class", "deinit", "enum", "extension", "fileprivate", "func", "import", "init", + "inout", "internal", "let", "open", "operator", "private", "protocol", "public", "static", "struct", + "subscript", "typealias", "var", + // Keywords uses in statements + "break", "case", "continue", "default", "defer", "do", "else", "fallthrough", "for", "guard", "if", + "in", "repeat", "return", "switch", "where", "while", + // Keywords used in expressions and types + "as", "Any", "catch", "false", "is", "nil", "rethrows", "super", "self", "Self", "throw", "throws", "true", "try", + // Keywords used in patterns + "_", + // Keywords that begin with a number sign + "#available", "#colorLiteral", "#column", "#else", "#elseif", "#endif", "#file", "#fileLiteral", "#function", "#if", + "#imageLiteral", "#line", "#selector", "#sourceLocation", + // Keywords reserved in particular contexts + "associativity", "convenience", "dynamic", "didSet", "final", "get", "infix", "indirect", "lazy", "left", + "mutating", "none", "nonmutating", "optional", "override", "postfix", "precedence", "prefix", "Protocol", + "required", "right", "set", "Type", "unowned", "weak", "willSet", + + // + // Swift Standard Library types + // https://developer.apple.com/documentation/swift + // + // Numbers and Basic Values + "Bool", "Int", "Double", "Float", "Range", "ClosedRange", "Error", "Optional", + // Special-Use Numeric Types + "UInt", "UInt8", "UInt16", "UInt32", "UInt64", "Int8", "Int16", "Int32", "Int64", "Float80", "Float32", "Float64", + // Strings and Text + "String", "Character", "Unicode", "StaticString", + // Collections + "Array", "Dictionary", "Set", "OptionSet", "CountableRange", "CountableClosedRange", + + // The following are commonly-used Foundation types + "URL", "Data", "Codable", "Encodable", "Decodable", + + // The following are other words we want to reserve + "Void", "AnyObject", "Class", "dynamicType", "COLUMN", "FILE", "FUNCTION", "LINE" + ) + ); + + typeMapping = new HashMap<>(); + typeMapping.put("array", "Array"); + typeMapping.put("List", "Array"); + typeMapping.put("map", "Dictionary"); + typeMapping.put("date", "Date"); + typeMapping.put("Date", "Date"); + typeMapping.put("DateTime", "Date"); + typeMapping.put("boolean", "Bool"); + typeMapping.put("string", "String"); + typeMapping.put("char", "Character"); + typeMapping.put("short", "Int"); + typeMapping.put("int", "Int"); + typeMapping.put("long", "Int64"); + typeMapping.put("integer", "Int"); + typeMapping.put("Integer", "Int"); + typeMapping.put("float", "Float"); + typeMapping.put("number", "Double"); + typeMapping.put("double", "Double"); + typeMapping.put("object", "Any"); + typeMapping.put("file", "URL"); + typeMapping.put("binary", "URL"); + typeMapping.put("ByteArray", "Data"); + typeMapping.put("UUID", "UUID"); + typeMapping.put("URI", "String"); + typeMapping.put("BigDecimal", "Decimal"); + + importMapping = new HashMap<>(); + + cliOptions.add(new CliOption(PROJECT_NAME, "Project name in Xcode")); + cliOptions.add(new CliOption(RESPONSE_AS, + "Optionally use libraries to manage response. Currently " + + StringUtils.join(RESPONSE_LIBRARIES, ", ") + + " are available.")); + cliOptions.add(new CliOption(CodegenConstants.NON_PUBLIC_API, + CodegenConstants.NON_PUBLIC_API_DESC + + "(default: false)")); + cliOptions.add(new CliOption(OBJC_COMPATIBLE, + "Add additional properties and methods for Objective-C " + + "compatibility (default: false)")); + cliOptions.add(new CliOption(POD_SOURCE, "Source information used for Podspec")); + cliOptions.add(new CliOption(CodegenConstants.POD_VERSION, "Version used for Podspec")); + cliOptions.add(new CliOption(POD_AUTHORS, "Authors used for Podspec")); + cliOptions.add(new CliOption(POD_SOCIAL_MEDIA_URL, "Social Media URL used for Podspec")); + cliOptions.add(new CliOption(POD_LICENSE, "License used for Podspec")); + cliOptions.add(new CliOption(POD_HOMEPAGE, "Homepage used for Podspec")); + cliOptions.add(new CliOption(POD_SUMMARY, "Summary used for Podspec")); + cliOptions.add(new CliOption(POD_DESCRIPTION, "Description used for Podspec")); + cliOptions.add(new CliOption(POD_SCREENSHOTS, "Screenshots used for Podspec")); + cliOptions.add(new CliOption(POD_DOCUMENTATION_URL, + "Documentation URL used for Podspec")); + cliOptions.add(new CliOption(SWIFT_USE_API_NAMESPACE, + "Flag to make all the API classes inner-class " + + "of {{projectName}}API")); + cliOptions.add(new CliOption(CodegenConstants.HIDE_GENERATION_TIMESTAMP, + CodegenConstants.HIDE_GENERATION_TIMESTAMP_DESC) + .defaultValue(Boolean.TRUE.toString())); + cliOptions.add(new CliOption(LENIENT_TYPE_CAST, + "Accept and cast values for simple types (string->bool, " + + "string->int, int->string)") + .defaultValue(Boolean.FALSE.toString())); + + supportedLibraries.put(LIBRARY_URLSESSION, "[DEFAULT] HTTP client: URLSession"); + supportedLibraries.put(LIBRARY_ALAMOFIRE, "HTTP client: Alamofire"); + + CliOption libraryOption = new CliOption(CodegenConstants.LIBRARY, "Library template (sub-template) to use"); + libraryOption.setEnum(supportedLibraries); + libraryOption.setDefault(LIBRARY_URLSESSION); + cliOptions.add(libraryOption); + setLibrary(LIBRARY_URLSESSION); + } + + private static CodegenModel reconcileProperties(CodegenModel codegenModel, + CodegenModel parentCodegenModel) { + // To support inheritance in this generator, we will analyze + // the parent and child models, look for properties that match, and remove + // them from the child models and leave them in the parent. + // Because the child models extend the parents, the properties + // will be available via the parent. + + // Get the properties for the parent and child models + final List parentModelCodegenProperties = parentCodegenModel.vars; + List codegenProperties = codegenModel.vars; + codegenModel.allVars = new ArrayList(codegenProperties); + codegenModel.parentVars = parentCodegenModel.allVars; + + // Iterate over all of the parent model properties + boolean removedChildProperty = false; + + for (CodegenProperty parentModelCodegenProperty : parentModelCodegenProperties) { + // Now that we have found a prop in the parent class, + // and search the child class for the same prop. + Iterator iterator = codegenProperties.iterator(); + while (iterator.hasNext()) { + CodegenProperty codegenProperty = iterator.next(); + if (codegenProperty.baseName.equals(parentModelCodegenProperty.baseName)) { + // We found a property in the child class that is + // a duplicate of the one in the parent, so remove it. + iterator.remove(); + removedChildProperty = true; + } + } + } + + if (removedChildProperty) { + // If we removed an entry from this model's vars, we need to ensure hasMore is updated + int count = 0; + int numVars = codegenProperties.size(); + for (CodegenProperty codegenProperty : codegenProperties) { + count += 1; + codegenProperty.hasMore = count < numVars; + } + codegenModel.vars = codegenProperties; + } + + + return codegenModel; + } + + @Override + public CodegenType getTag() { + return CodegenType.CLIENT; + } + + @Override + public String getName() { + return "swift5"; + } + + @Override + public String getHelp() { + return "Generates a Swift 5.x client library."; + } + + @Override + protected void addAdditionPropertiesToCodeGenModel(CodegenModel codegenModel, + Schema schema) { + + final Schema additionalProperties = ModelUtils.getAdditionalProperties(schema); + + if (additionalProperties != null) { + codegenModel.additionalPropertiesType = getSchemaType(additionalProperties); + } + } + + @Override + public void processOpts() { + super.processOpts(); + + if (StringUtils.isEmpty(System.getenv("SWIFT_POST_PROCESS_FILE"))) { + LOGGER.info("Environment variable SWIFT_POST_PROCESS_FILE not defined so the Swift code may not be properly formatted. To define it, try 'export SWIFT_POST_PROCESS_FILE=/usr/local/bin/swiftformat' (Linux/Mac)"); + LOGGER.info("NOTE: To enable file post-processing, 'enablePostProcessFile' must be set to `true` (--enable-post-process-file for CLI)."); + } + + // Setup project name + if (additionalProperties.containsKey(PROJECT_NAME)) { + setProjectName((String) additionalProperties.get(PROJECT_NAME)); + } else { + additionalProperties.put(PROJECT_NAME, projectName); + } + sourceFolder = projectName + File.separator + sourceFolder; + + // Setup nonPublicApi option, which generates code with reduced access + // modifiers; allows embedding elsewhere without exposing non-public API calls + // to consumers + if (additionalProperties.containsKey(CodegenConstants.NON_PUBLIC_API)) { + setNonPublicApi(convertPropertyToBooleanAndWriteBack(CodegenConstants.NON_PUBLIC_API)); + } + additionalProperties.put(CodegenConstants.NON_PUBLIC_API, nonPublicApi); + + // Setup objcCompatible option, which adds additional properties + // and methods for Objective-C compatibility + if (additionalProperties.containsKey(OBJC_COMPATIBLE)) { + setObjcCompatible(convertPropertyToBooleanAndWriteBack(OBJC_COMPATIBLE)); + } + additionalProperties.put(OBJC_COMPATIBLE, objcCompatible); + + // add objc reserved words + if (Boolean.TRUE.equals(objcCompatible)) { + reservedWords.addAll(objcReservedWords); + } + + if (additionalProperties.containsKey(RESPONSE_AS)) { + Object responseAsObject = additionalProperties.get(RESPONSE_AS); + if (responseAsObject instanceof String) { + setResponseAs(((String) responseAsObject).split(",")); + } else { + setResponseAs((String[]) responseAsObject); + } + } + additionalProperties.put(RESPONSE_AS, responseAs); + if (ArrayUtils.contains(responseAs, RESPONSE_LIBRARY_PROMISE_KIT)) { + additionalProperties.put("usePromiseKit", true); + } + if (ArrayUtils.contains(responseAs, RESPONSE_LIBRARY_RX_SWIFT)) { + additionalProperties.put("useRxSwift", true); + } + if (ArrayUtils.contains(responseAs, RESPONSE_LIBRARY_RESULT)) { + additionalProperties.put("useResult", true); + } + if (ArrayUtils.contains(responseAs, RESPONSE_LIBRARY_COMBINE)) { + additionalProperties.put("useCombine", true); + } + + // Setup swiftUseApiNamespace option, which makes all the API + // classes inner-class of {{projectName}}API + if (additionalProperties.containsKey(SWIFT_USE_API_NAMESPACE)) { + setSwiftUseApiNamespace(convertPropertyToBooleanAndWriteBack(SWIFT_USE_API_NAMESPACE)); + } + + if (!additionalProperties.containsKey(POD_AUTHORS)) { + additionalProperties.put(POD_AUTHORS, DEFAULT_POD_AUTHORS); + } + + setLenientTypeCast(convertPropertyToBooleanAndWriteBack(LENIENT_TYPE_CAST)); + + // make api and model doc path available in mustache template + additionalProperties.put("apiDocPath", apiDocPath); + additionalProperties.put("modelDocPath", modelDocPath); + + supportingFiles.add(new SupportingFile("Podspec.mustache", + "", + projectName + ".podspec")); + supportingFiles.add(new SupportingFile("Cartfile.mustache", + "", + "Cartfile")); + supportingFiles.add(new SupportingFile("Package.swift.mustache", + "", + "Package.swift")); + supportingFiles.add(new SupportingFile("APIHelper.mustache", + sourceFolder, + "APIHelper.swift")); + supportingFiles.add(new SupportingFile("Configuration.mustache", + sourceFolder, + "Configuration.swift")); + supportingFiles.add(new SupportingFile("Extensions.mustache", + sourceFolder, + "Extensions.swift")); + supportingFiles.add(new SupportingFile("Models.mustache", + sourceFolder, + "Models.swift")); + supportingFiles.add(new SupportingFile("APIs.mustache", + sourceFolder, + "APIs.swift")); + supportingFiles.add(new SupportingFile("CodableHelper.mustache", + sourceFolder, + "CodableHelper.swift")); + supportingFiles.add(new SupportingFile("OpenISO8601DateFormatter.mustache", + sourceFolder, + "OpenISO8601DateFormatter.swift")); + supportingFiles.add(new SupportingFile("JSONDataEncoding.mustache", + sourceFolder, + "JSONDataEncoding.swift")); + supportingFiles.add(new SupportingFile("JSONEncodingHelper.mustache", + sourceFolder, + "JSONEncodingHelper.swift")); + supportingFiles.add(new SupportingFile("git_push.sh.mustache", + "", + "git_push.sh")); + supportingFiles.add(new SupportingFile("SynchronizedDictionary.mustache", + sourceFolder, + "SynchronizedDictionary.swift")); + supportingFiles.add(new SupportingFile("gitignore.mustache", + "", + ".gitignore")); + supportingFiles.add(new SupportingFile("README.mustache", + "", + "README.md")); + supportingFiles.add(new SupportingFile("XcodeGen.mustache", + "", + "project.yml")); + + switch (getLibrary()) { + case LIBRARY_ALAMOFIRE: + additionalProperties.put("useAlamofire", true); + supportingFiles.add(new SupportingFile("AlamofireImplementations.mustache", + sourceFolder, + "AlamofireImplementations.swift")); + break; + case LIBRARY_URLSESSION: + additionalProperties.put("useURLSession", true); + supportingFiles.add(new SupportingFile("URLSessionImplementations.mustache", + sourceFolder, + "URLSessionImplementations.swift")); + break; + default: + break; + } + + } + + @Override + protected boolean isReservedWord(String word) { + return word != null && reservedWords.contains(word); //don't lowercase as super does + } + + @Override + public String escapeReservedWord(String name) { + if (this.reservedWordsMappings().containsKey(name)) { + return this.reservedWordsMappings().get(name); + } + return "_" + name; // add an underscore to the name + } + + @Override + public String modelFileFolder() { + return outputFolder + File.separator + sourceFolder + + modelPackage().replace('.', File.separatorChar); + } + + @Override + public String apiFileFolder() { + return outputFolder + File.separator + sourceFolder + + apiPackage().replace('.', File.separatorChar); + } + + @Override + public String getTypeDeclaration(Schema p) { + if (ModelUtils.isArraySchema(p)) { + ArraySchema ap = (ArraySchema) p; + Schema inner = ap.getItems(); + return "[" + getTypeDeclaration(inner) + "]"; + } else if (ModelUtils.isMapSchema(p)) { + Schema inner = ModelUtils.getAdditionalProperties(p); + return "[String:" + getTypeDeclaration(inner) + "]"; + } + return super.getTypeDeclaration(p); + } + + @Override + public String getSchemaType(Schema p) { + String openAPIType = super.getSchemaType(p); + String type; + if (typeMapping.containsKey(openAPIType)) { + type = typeMapping.get(openAPIType); + if (languageSpecificPrimitives.contains(type) || defaultIncludes.contains(type)) { + return type; + } + } else { + type = openAPIType; + } + return toModelName(type); + } + + @Override + public boolean isDataTypeFile(String dataType) { + return dataType != null && dataType.equals("URL"); + } + + @Override + public boolean isDataTypeBinary(final String dataType) { + return dataType != null && dataType.equals("Data"); + } + + /** + * Output the proper model name (capitalized). + * + * @param name the name of the model + * @return capitalized model name + */ + @Override + public String toModelName(String name) { + // FIXME parameter should not be assigned. Also declare it as "final" + name = sanitizeName(name); + + if (!StringUtils.isEmpty(modelNameSuffix)) { // set model suffix + name = name + "_" + modelNameSuffix; + } + + if (!StringUtils.isEmpty(modelNamePrefix)) { // set model prefix + name = modelNamePrefix + "_" + name; + } + + // camelize the model name + // phone_number => PhoneNumber + name = camelize(name); + + // model name cannot use reserved keyword, e.g. return + if (isReservedWord(name)) { + String modelName = "Model" + name; + LOGGER.warn(name + " (reserved word) cannot be used as model name. Renamed to " + + modelName); + return modelName; + } + + // model name starts with number + if (name.matches("^\\d.*")) { + // e.g. 200Response => Model200Response (after camelize) + String modelName = "Model" + name; + LOGGER.warn(name + + " (model name starts with number) cannot be used as model name." + + " Renamed to " + modelName); + return modelName; + } + + return name; + } + + /** + * Return the capitalized file name of the model. + * + * @param name the model name + * @return the file name of the model + */ + @Override + public String toModelFilename(String name) { + // should be the same as the model name + return toModelName(name); + } + + @Override + public String toDefaultValue(Schema p) { + if (p.getEnum() != null && !p.getEnum().isEmpty()) { + if (p.getDefault() != null) { + if (ModelUtils.isStringSchema(p)) { + return "." + toEnumVarName(escapeText((String) p.getDefault()), p.getType()); + } else { + return "." + toEnumVarName(escapeText(p.getDefault().toString()), p.getType()); + } + } + } + if (ModelUtils.isIntegerSchema(p) || ModelUtils.isNumberSchema(p) || ModelUtils.isBooleanSchema(p)) { + if (p.getDefault() != null) { + return p.getDefault().toString(); + } + } else if (ModelUtils.isStringSchema(p)) { + if (p.getDefault() != null) { + return "\"" + escapeText((String) p.getDefault()) + "\""; + } + } + return null; + } + + @Override + public String toInstantiationType(Schema p) { + if (ModelUtils.isMapSchema(p)) { + return getSchemaType(ModelUtils.getAdditionalProperties(p)); + } else if (ModelUtils.isArraySchema(p)) { + ArraySchema ap = (ArraySchema) p; + String inner = getSchemaType(ap.getItems()); + return "[" + inner + "]"; + } + return null; + } + + @Override + public String toApiName(String name) { + if (name.length() == 0) { + return "DefaultAPI"; + } + return camelize(name) + "API"; + } + + @Override + public String apiDocFileFolder() { + return (outputFolder + "/" + apiDocPath).replace("/", File.separator); + } + + @Override + public String modelDocFileFolder() { + return (outputFolder + "/" + modelDocPath).replace("/", File.separator); + } + + @Override + public String toModelDocFilename(String name) { + return toModelName(name); + } + + @Override + public String toApiDocFilename(String name) { + return toApiName(name); + } + + @Override + public String toOperationId(String operationId) { + operationId = camelize(sanitizeName(operationId), true); + + // Throw exception if method name is empty. + // This should not happen but keep the check just in case + if (StringUtils.isEmpty(operationId)) { + throw new RuntimeException("Empty method name (operationId) not allowed"); + } + + // method name cannot use reserved keyword, e.g. return + if (isReservedWord(operationId)) { + String newOperationId = camelize(("call_" + operationId), true); + LOGGER.warn(operationId + " (reserved word) cannot be used as method name." + + " Renamed to " + newOperationId); + return newOperationId; + } + + // operationId starts with a number + if (operationId.matches("^\\d.*")) { + LOGGER.warn(operationId + " (starting with a number) cannot be used as method name. Renamed to " + camelize(sanitizeName("call_" + operationId), true)); + operationId = camelize(sanitizeName("call_" + operationId), true); + } + + + return operationId; + } + + @Override + public String toVarName(String name) { + // sanitize name + name = sanitizeName(name); + + // if it's all uppper case, do nothing + if (name.matches("^[A-Z_]*$")) { + return name; + } + + // camelize the variable name + // pet_id => petId + name = camelize(name, true); + + // for reserved word or word starting with number, append _ + if (isReservedWord(name) || name.matches("^\\d.*")) { + name = escapeReservedWord(name); + } + + return name; + } + + @Override + public String toParamName(String name) { + // sanitize name + name = sanitizeName(name); + + // replace - with _ e.g. created-at => created_at + name = name.replaceAll("-", "_"); + + // if it's all uppper case, do nothing + if (name.matches("^[A-Z_]*$")) { + return name; + } + + // camelize(lower) the variable name + // pet_id => petId + name = camelize(name, true); + + // for reserved word or word starting with number, append _ + if (isReservedWord(name) || name.matches("^\\d.*")) { + name = escapeReservedWord(name); + } + + return name; + } + + @Override + public CodegenModel fromModel(String name, Schema model) { + Map allDefinitions = ModelUtils.getSchemas(this.openAPI); + CodegenModel codegenModel = super.fromModel(name, model); + if (codegenModel.description != null) { + codegenModel.imports.add("ApiModel"); + } + if (allDefinitions != null) { + String parentSchema = codegenModel.parentSchema; + + // multilevel inheritance: reconcile properties of all the parents + while (parentSchema != null) { + final Schema parentModel = allDefinitions.get(parentSchema); + final CodegenModel parentCodegenModel = super.fromModel(codegenModel.parent, + parentModel); + codegenModel = Swift5ClientCodegen.reconcileProperties(codegenModel, parentCodegenModel); + + // get the next parent + parentSchema = parentCodegenModel.parentSchema; + } + } + + return codegenModel; + } + + public void setProjectName(String projectName) { + this.projectName = projectName; + } + + public void setNonPublicApi(boolean nonPublicApi) { + this.nonPublicApi = nonPublicApi; + } + + public void setObjcCompatible(boolean objcCompatible) { + this.objcCompatible = objcCompatible; + } + + public void setLenientTypeCast(boolean lenientTypeCast) { + this.lenientTypeCast = lenientTypeCast; + } + + public void setResponseAs(String[] responseAs) { + this.responseAs = responseAs; + } + + public void setSwiftUseApiNamespace(boolean swiftUseApiNamespace) { + this.swiftUseApiNamespace = swiftUseApiNamespace; + } + + @Override + public String toEnumValue(String value, String datatype) { + // for string, array of string + if ("String".equals(datatype) || "[String]".equals(datatype) || "[String:String]".equals(datatype)) { + return "\"" + String.valueOf(value) + "\""; + } else { + return String.valueOf(value); + } + } + + @Override + public String toEnumDefaultValue(String value, String datatype) { + return datatype + "_" + value; + } + + @Override + public String toEnumVarName(String name, String datatype) { + if (name.length() == 0) { + return "empty"; + } + + Pattern startWithNumberPattern = Pattern.compile("^\\d+"); + Matcher startWithNumberMatcher = startWithNumberPattern.matcher(name); + if (startWithNumberMatcher.find()) { + String startingNumbers = startWithNumberMatcher.group(0); + String nameWithoutStartingNumbers = name.substring(startingNumbers.length()); + + return "_" + startingNumbers + camelize(nameWithoutStartingNumbers, true); + } + + // for symbol, e.g. $, # + if (getSymbolName(name) != null) { + return camelize(WordUtils.capitalizeFully(getSymbolName(name).toUpperCase(Locale.ROOT)), true); + } + + // Camelize only when we have a structure defined below + Boolean camelized = false; + if (name.matches("[A-Z][a-z0-9]+[a-zA-Z0-9]*")) { + name = camelize(name, true); + camelized = true; + } + + // Reserved Name + String nameLowercase = StringUtils.lowerCase(name); + if (isReservedWord(nameLowercase)) { + return escapeReservedWord(nameLowercase); + } + + // Check for numerical conversions + if ("Int".equals(datatype) || "Int32".equals(datatype) || "Int64".equals(datatype) + || "Float".equals(datatype) || "Double".equals(datatype)) { + String varName = "number" + camelize(name); + varName = varName.replaceAll("-", "minus"); + varName = varName.replaceAll("\\+", "plus"); + varName = varName.replaceAll("\\.", "dot"); + return varName; + } + + // If we have already camelized the word, don't progress + // any further + if (camelized) { + return name; + } + + char[] separators = {'-', '_', ' ', ':', '(', ')'}; + return camelize(WordUtils.capitalizeFully(StringUtils.lowerCase(name), separators) + .replaceAll("[-_ :\\(\\)]", ""), + true); + } + + @Override + public String toEnumName(CodegenProperty property) { + String enumName = toModelName(property.name); + + // Ensure that the enum type doesn't match a reserved word or + // the variable name doesn't match the generated enum type or the + // Swift compiler will generate an error + if (isReservedWord(property.datatypeWithEnum) + || toVarName(property.name).equals(property.datatypeWithEnum)) { + enumName = property.datatypeWithEnum + "Enum"; + } + + // TODO: toModelName already does something for names starting with number, + // so this code is probably never called + if (enumName.matches("\\d.*")) { // starts with number + return "_" + enumName; + } else { + return enumName; + } + } + + @Override + public Map postProcessModels(Map objs) { + Map postProcessedModelsEnum = postProcessModelsEnum(objs); + + // We iterate through the list of models, and also iterate through each of the + // properties for each model. For each property, if: + // + // CodegenProperty.name != CodegenProperty.baseName + // + // then we set + // + // CodegenProperty.vendorExtensions["x-codegen-escaped-property-name"] = true + // + // Also, if any property in the model has x-codegen-escaped-property-name=true, then we mark: + // + // CodegenModel.vendorExtensions["x-codegen-has-escaped-property-names"] = true + // + List models = (List) postProcessedModelsEnum.get("models"); + for (Object _mo : models) { + Map mo = (Map) _mo; + CodegenModel cm = (CodegenModel) mo.get("model"); + boolean modelHasPropertyWithEscapedName = false; + for (CodegenProperty prop : cm.allVars) { + if (!prop.name.equals(prop.baseName)) { + prop.vendorExtensions.put("x-codegen-escaped-property-name", true); + modelHasPropertyWithEscapedName = true; + } + } + if (modelHasPropertyWithEscapedName) { + cm.vendorExtensions.put("x-codegen-has-escaped-property-names", true); + } + } + + return postProcessedModelsEnum; + } + + @Override + public void postProcessModelProperty(CodegenModel model, CodegenProperty property) { + super.postProcessModelProperty(model, property); + + boolean isSwiftScalarType = property.isInteger || property.isLong || property.isFloat + || property.isDouble || property.isBoolean; + if ((!property.required || property.isNullable) && isSwiftScalarType) { + // Optional scalar types like Int?, Int64?, Float?, Double?, and Bool? + // do not translate to Objective-C. So we want to flag those + // properties in case we want to put special code in the templates + // which provide Objective-C compatibility. + property.vendorExtensions.put("x-swift-optional-scalar", true); + } + } + + @Override + public String escapeQuotationMark(String input) { + // remove " to avoid code injection + return input.replace("\"", ""); + } + + @Override + public String escapeUnsafeCharacters(String input) { + return input.replace("*/", "*_/").replace("/*", "/_*"); + } + + @Override + public void postProcessFile(File file, String fileType) { + if (file == null) { + return; + } + String swiftPostProcessFile = System.getenv("SWIFT_POST_PROCESS_FILE"); + if (StringUtils.isEmpty(swiftPostProcessFile)) { + return; // skip if SWIFT_POST_PROCESS_FILE env variable is not defined + } + // only process files with swift extension + if ("swift".equals(FilenameUtils.getExtension(file.toString()))) { + String command = swiftPostProcessFile + " " + file.toString(); + try { + Process p = Runtime.getRuntime().exec(command); + int exitValue = p.waitFor(); + if (exitValue != 0) { + LOGGER.error("Error running the command ({}). Exit value: {}", command, exitValue); + } else { + LOGGER.info("Successfully executed: " + command); + } + } catch (Exception e) { + LOGGER.error("Error running the command ({}). Exception: {}", command, e.getMessage()); + } + } + } + + @Override + public Map postProcessOperationsWithModels(Map objs, List allModels) { + Map objectMap = (Map) objs.get("operations"); + + HashMap modelMaps = new HashMap(); + for (Object o : allModels) { + HashMap h = (HashMap) o; + CodegenModel m = (CodegenModel) h.get("model"); + modelMaps.put(m.classname, m); + } + + List operations = (List) objectMap.get("operation"); + for (CodegenOperation operation : operations) { + for (CodegenParameter cp : operation.allParams) { + cp.vendorExtensions.put("x-swift-example", constructExampleCode(cp, modelMaps)); + } + } + return objs; + } + + public String constructExampleCode(CodegenParameter codegenParameter, HashMap modelMaps) { + if (codegenParameter.isListContainer) { // array + return "[" + constructExampleCode(codegenParameter.items, modelMaps) + "]"; + } else if (codegenParameter.isMapContainer) { // TODO: map, file type + return "\"TODO\""; + } else if (languageSpecificPrimitives.contains(codegenParameter.dataType)) { // primitive type + if ("String".equals(codegenParameter.dataType) || "Character".equals(codegenParameter.dataType)) { + if (StringUtils.isEmpty(codegenParameter.example)) { + return "\"" + codegenParameter.example + "\""; + } else { + return "\"" + codegenParameter.paramName + "_example\""; + } + } else if ("Bool".equals(codegenParameter.dataType)) { // boolean + if (Boolean.TRUE.equals(codegenParameter.example)) { + return "true"; + } else { + return "false"; + } + } else if ("URL".equals(codegenParameter.dataType)) { // URL + return "URL(string: \"https://example.com\")!"; + } else if ("Date".equals(codegenParameter.dataType)) { // date + return "Date()"; + } else { // numeric + if (StringUtils.isEmpty(codegenParameter.example)) { + return codegenParameter.example; + } else { + return "987"; + } + } + } else { // model + // look up the model + if (modelMaps.containsKey(codegenParameter.dataType)) { + return constructExampleCode(modelMaps.get(codegenParameter.dataType), modelMaps); + } else { + //LOGGER.error("Error in constructing examples. Failed to look up the model " + codegenParameter.dataType); + return "TODO"; + } + } + } + + public String constructExampleCode(CodegenProperty codegenProperty, HashMap modelMaps) { + if (codegenProperty.isListContainer) { // array + return "[" + constructExampleCode(codegenProperty.items, modelMaps) + "]"; + } else if (codegenProperty.isMapContainer) { // TODO: map, file type + return "\"TODO\""; + } else if (languageSpecificPrimitives.contains(codegenProperty.dataType)) { // primitive type + if ("String".equals(codegenProperty.dataType) || "Character".equals(codegenProperty.dataType)) { + if (StringUtils.isEmpty(codegenProperty.example)) { + return "\"" + codegenProperty.example + "\""; + } else { + return "\"" + codegenProperty.name + "_example\""; + } + } else if ("Bool".equals(codegenProperty.dataType)) { // boolean + if (Boolean.TRUE.equals(codegenProperty.example)) { + return "true"; + } else { + return "false"; + } + } else if ("URL".equals(codegenProperty.dataType)) { // URL + return "URL(string: \"https://example.com\")!"; + } else if ("Date".equals(codegenProperty.dataType)) { // date + return "Date()"; + } else { // numeric + if (StringUtils.isEmpty(codegenProperty.example)) { + return codegenProperty.example; + } else { + return "123"; + } + } + } else { + // look up the model + if (modelMaps.containsKey(codegenProperty.dataType)) { + return constructExampleCode(modelMaps.get(codegenProperty.dataType), modelMaps); + } else { + //LOGGER.error("Error in constructing examples. Failed to look up the model " + codegenProperty.dataType); + return "\"TODO\""; + } + } + } + + public String constructExampleCode(CodegenModel codegenModel, HashMap modelMaps) { + String example; + example = codegenModel.name + "("; + List propertyExamples = new ArrayList<>(); + for (CodegenProperty codegenProperty : codegenModel.vars) { + propertyExamples.add(codegenProperty.name + ": " + constructExampleCode(codegenProperty, modelMaps)); + } + example += StringUtils.join(propertyExamples, ", "); + example += ")"; + return example; + } +} diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SwiftClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SwiftClientCodegen.java index 7f3b529988..c5daa1f54c 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SwiftClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SwiftClientCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -27,6 +27,7 @@ import org.apache.commons.lang3.text.WordUtils; import org.openapitools.codegen.*; import org.openapitools.codegen.meta.GeneratorMetadata; import org.openapitools.codegen.meta.Stability; +import org.openapitools.codegen.meta.features.*; import org.openapitools.codegen.utils.ModelUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -94,6 +95,23 @@ public class SwiftClientCodegen extends DefaultCodegen implements CodegenConfig .stability(Stability.DEPRECATED) .build(); + featureSet = getFeatureSet().modify() + .wireFormatFeatures(EnumSet.of(WireFormatFeature.JSON)) + .securityFeatures(EnumSet.noneOf(SecurityFeature.class)) + .excludeGlobalFeatures( + GlobalFeature.XMLStructureDefinitions, + GlobalFeature.Callbacks, + GlobalFeature.LinkObjects, + GlobalFeature.ParameterStyling + ) + .excludeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism + ) + .excludeParameterFeatures( + ParameterFeature.Cookie + ) + .build(); + outputFolder = "generated-code" + File.separator + "swift"; modelTemplateFiles.put("model.mustache", ".swift"); apiTemplateFiles.put("api.mustache", ".swift"); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptAngularClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptAngularClientCodegen.java index 832152b892..ef30687897 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptAngularClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptAngularClientCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,10 +17,9 @@ package org.openapitools.codegen.languages; -import io.swagger.v3.oas.models.OpenAPI; import io.swagger.v3.oas.models.media.Schema; -import io.swagger.v3.parser.util.SchemaTypeUtil; import org.openapitools.codegen.*; +import org.openapitools.codegen.meta.features.DocumentationFeature; import org.openapitools.codegen.utils.ModelUtils; import org.openapitools.codegen.utils.SemVer; import org.slf4j.Logger; @@ -28,7 +27,6 @@ import org.slf4j.LoggerFactory; import java.io.File; import java.util.*; -import java.util.regex.Pattern; import static org.apache.commons.lang3.StringUtils.capitalize; import static org.openapitools.codegen.utils.StringUtils.*; @@ -71,6 +69,11 @@ public class TypeScriptAngularClientCodegen extends AbstractTypeScriptClientCode public TypeScriptAngularClientCodegen() { super(); + + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .build(); + this.outputFolder = "generated-code/typescript-angular"; supportsMultipleInheritance = true; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptAngularJsClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptAngularJsClientCodegen.java index dc68aace1e..3b51411718 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptAngularJsClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptAngularJsClientCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptAureliaClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptAureliaClientCodegen.java index 3ed6203c2a..e989b00638 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptAureliaClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptAureliaClientCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptAxiosClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptAxiosClientCodegen.java index 3976629470..4d9f143835 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptAxiosClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptAxiosClientCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,7 +17,6 @@ package org.openapitools.codegen.languages; -import io.swagger.v3.oas.models.media.ArraySchema; import io.swagger.v3.oas.models.media.Schema; import io.swagger.v3.parser.util.SchemaTypeUtil; import org.apache.commons.lang3.StringUtils; @@ -26,9 +25,9 @@ import org.openapitools.codegen.CodegenModel; import org.openapitools.codegen.CodegenProperty; import org.openapitools.codegen.CodegenOperation; import org.openapitools.codegen.SupportingFile; +import org.openapitools.codegen.meta.features.DocumentationFeature; import org.openapitools.codegen.utils.ModelUtils; -import java.text.SimpleDateFormat; import java.util.*; public class TypeScriptAxiosClientCodegen extends AbstractTypeScriptClientCodegen { @@ -45,6 +44,10 @@ public class TypeScriptAxiosClientCodegen extends AbstractTypeScriptClientCodege public TypeScriptAxiosClientCodegen() { super(); + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .build(); + // clear import mapping (from default generator) as TS does not use it // at the moment importMapping.clear(); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptFetchClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptFetchClientCodegen.java index 966fe26218..b21869c748 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptFetchClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptFetchClientCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -21,6 +21,7 @@ import io.swagger.v3.oas.models.media.ArraySchema; import io.swagger.v3.oas.models.media.Schema; import io.swagger.v3.parser.util.SchemaTypeUtil; import org.openapitools.codegen.*; +import org.openapitools.codegen.meta.features.DocumentationFeature; import org.openapitools.codegen.utils.ModelUtils; import java.io.File; @@ -47,6 +48,10 @@ public class TypeScriptFetchClientCodegen extends AbstractTypeScriptClientCodege public TypeScriptFetchClientCodegen() { super(); + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .build(); + // clear import mapping (from default generator) as TS does not use it // at the moment importMapping.clear(); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptInversifyClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptInversifyClientCodegen.java index 1fbe90664d..75b91392fa 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptInversifyClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptInversifyClientCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -22,6 +22,7 @@ import io.swagger.v3.oas.models.media.FileSchema; import io.swagger.v3.oas.models.media.Schema; import io.swagger.v3.parser.util.SchemaTypeUtil; import org.openapitools.codegen.*; +import org.openapitools.codegen.meta.features.DocumentationFeature; import org.openapitools.codegen.utils.ModelUtils; import java.io.File; @@ -42,6 +43,11 @@ public class TypeScriptInversifyClientCodegen extends AbstractTypeScriptClientCo public TypeScriptInversifyClientCodegen() { super(); + + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .build(); + this.outputFolder = "generated-code/typescript-inversify"; embeddedTemplateDir = templateDir = "typescript-inversify"; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptJqueryClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptJqueryClientCodegen.java index b0a84d0796..275af5c82e 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptJqueryClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptJqueryClientCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -22,14 +22,12 @@ import io.swagger.v3.parser.util.SchemaTypeUtil; import org.openapitools.codegen.CliOption; import org.openapitools.codegen.CodegenModel; import org.openapitools.codegen.SupportingFile; +import org.openapitools.codegen.meta.features.DocumentationFeature; import org.openapitools.codegen.utils.ModelUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.io.File; -import java.text.SimpleDateFormat; -import java.util.Date; -import java.util.Locale; public class TypeScriptJqueryClientCodegen extends AbstractTypeScriptClientCodegen { private static final Logger LOGGER = LoggerFactory.getLogger(TypeScriptJqueryClientCodegen.class); @@ -42,6 +40,10 @@ public class TypeScriptJqueryClientCodegen extends AbstractTypeScriptClientCodeg public TypeScriptJqueryClientCodegen() { super(); + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .build(); + modelTemplateFiles.put("model.mustache", ".ts"); apiTemplateFiles.put("api.mustache", ".ts"); typeMapping.put("Date", "Date"); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptNodeClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptNodeClientCodegen.java index b5ccea1606..9eac980e36 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptNodeClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptNodeClientCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptReduxQueryClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptReduxQueryClientCodegen.java index 6c6cffadfa..560083e601 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptReduxQueryClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptReduxQueryClientCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptRxjsClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptRxjsClientCodegen.java index 93a25c21f4..7510a25f09 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptRxjsClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptRxjsClientCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -21,15 +21,13 @@ import io.swagger.v3.oas.models.media.ArraySchema; import io.swagger.v3.oas.models.media.Schema; import io.swagger.v3.parser.util.SchemaTypeUtil; import org.openapitools.codegen.*; +import org.openapitools.codegen.meta.features.DocumentationFeature; import org.openapitools.codegen.utils.ModelUtils; import java.io.File; -import java.text.SimpleDateFormat; import java.util.TreeSet; -import java.util.Date; import java.util.List; import java.util.ArrayList; -import java.util.Locale; import java.util.Map; public class TypeScriptRxjsClientCodegen extends AbstractTypeScriptClientCodegen { @@ -42,6 +40,10 @@ public class TypeScriptRxjsClientCodegen extends AbstractTypeScriptClientCodegen public TypeScriptRxjsClientCodegen() { super(); + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .build(); + outputFolder = "generated-code/typescript-rxjs"; embeddedTemplateDir = templateDir = "typescript-rxjs"; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/features/BeanValidationExtendedFeatures.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/features/BeanValidationExtendedFeatures.java index 68c7aa93b0..172ac8f025 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/features/BeanValidationExtendedFeatures.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/features/BeanValidationExtendedFeatures.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/features/BeanValidationFeatures.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/features/BeanValidationFeatures.java index aa06e03c6f..44ded47f71 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/features/BeanValidationFeatures.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/features/BeanValidationFeatures.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/features/CXFFeatures.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/features/CXFFeatures.java index 094ab91d23..2564ea05f8 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/features/CXFFeatures.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/features/CXFFeatures.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/features/CXFServerFeatures.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/features/CXFServerFeatures.java index 4a23170c05..d009595e20 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/features/CXFServerFeatures.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/features/CXFServerFeatures.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/features/GzipFeatures.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/features/GzipFeatures.java index 7112155d60..683d23f258 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/features/GzipFeatures.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/features/GzipFeatures.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/features/GzipTestFeatures.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/features/GzipTestFeatures.java index 6b57cc4828..26a6f93aef 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/features/GzipTestFeatures.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/features/GzipTestFeatures.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/features/JbossFeature.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/features/JbossFeature.java index ca2fac36e3..463075836a 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/features/JbossFeature.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/features/JbossFeature.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/features/LoggingFeatures.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/features/LoggingFeatures.java index 91b95b7861..17a79e1a59 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/features/LoggingFeatures.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/features/LoggingFeatures.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/features/LoggingTestFeatures.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/features/LoggingTestFeatures.java index e5b2a52d4e..cef8873cdc 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/features/LoggingTestFeatures.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/features/LoggingTestFeatures.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/features/OptionalFeatures.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/features/OptionalFeatures.java index a714697258..39c1746f09 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/features/OptionalFeatures.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/features/OptionalFeatures.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/features/PerformBeanValidationFeatures.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/features/PerformBeanValidationFeatures.java index b9f2f13809..a09e00815e 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/features/PerformBeanValidationFeatures.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/features/PerformBeanValidationFeatures.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/features/SpringFeatures.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/features/SpringFeatures.java index 59a8bf5251..78ff54738e 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/features/SpringFeatures.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/features/SpringFeatures.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/features/SwaggerFeatures.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/features/SwaggerFeatures.java index f84b203def..0487bcef88 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/features/SwaggerFeatures.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/features/SwaggerFeatures.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/features/SwaggerUIFeatures.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/features/SwaggerUIFeatures.java index 1bcb85a508..27483bce2d 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/features/SwaggerUIFeatures.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/features/SwaggerUIFeatures.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/features/UseGenericResponseFeatures.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/features/UseGenericResponseFeatures.java index 6e4cfffc16..713e349e3a 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/features/UseGenericResponseFeatures.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/features/UseGenericResponseFeatures.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/templating/HandlebarsEngineAdapter.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/templating/HandlebarsEngineAdapter.java index 21158b95ca..974c2097ac 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/templating/HandlebarsEngineAdapter.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/templating/HandlebarsEngineAdapter.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/templating/MustacheEngineAdapter.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/templating/MustacheEngineAdapter.java index 0e0b7ea4d8..e5606afdad 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/templating/MustacheEngineAdapter.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/templating/MustacheEngineAdapter.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/templating/mustache/CamelCaseLambda.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/templating/mustache/CamelCaseLambda.java index 2c5fbd9e55..32f62042c9 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/templating/mustache/CamelCaseLambda.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/templating/mustache/CamelCaseLambda.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/templating/mustache/IndentedLambda.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/templating/mustache/IndentedLambda.java index c3656ed64a..ffd1269516 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/templating/mustache/IndentedLambda.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/templating/mustache/IndentedLambda.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/templating/mustache/JoinWithCommaLambda.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/templating/mustache/JoinWithCommaLambda.java index ec99428222..2c6e80e262 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/templating/mustache/JoinWithCommaLambda.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/templating/mustache/JoinWithCommaLambda.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/templating/mustache/LowercaseLambda.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/templating/mustache/LowercaseLambda.java index 42f292f240..f930eaa2c0 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/templating/mustache/LowercaseLambda.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/templating/mustache/LowercaseLambda.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/templating/mustache/SplitStringLambda.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/templating/mustache/SplitStringLambda.java index 89e99804aa..70c7e5ee15 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/templating/mustache/SplitStringLambda.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/templating/mustache/SplitStringLambda.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/templating/mustache/TitlecaseLambda.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/templating/mustache/TitlecaseLambda.java index a51218f0ee..2d94a5ad7b 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/templating/mustache/TitlecaseLambda.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/templating/mustache/TitlecaseLambda.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/templating/mustache/TrimWhitespaceLambda.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/templating/mustache/TrimWhitespaceLambda.java index bdf1d13653..29e2e36c35 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/templating/mustache/TrimWhitespaceLambda.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/templating/mustache/TrimWhitespaceLambda.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/templating/mustache/UppercaseLambda.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/templating/mustache/UppercaseLambda.java index b225eafd3c..4063f3a842 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/templating/mustache/UppercaseLambda.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/templating/mustache/UppercaseLambda.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/ImplementationVersion.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/ImplementationVersion.java index 1a14420018..6c5c5839b6 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/ImplementationVersion.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/ImplementationVersion.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/JsonCache.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/JsonCache.java index 561d1e6e53..df68513a95 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/JsonCache.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/JsonCache.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/JsonCacheImpl.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/JsonCacheImpl.java index 9409372b4d..a08173dedb 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/JsonCacheImpl.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/JsonCacheImpl.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -1364,7 +1364,11 @@ class JsonCacheImpl implements JsonCache.Root { } else { JsonNode node = root.at(ptr); Object value = node.isPojo() && !JsonNode.class.isAssignableFrom(type) ? ((POJONode) node).getPojo() : node; - result = mapper.convertValue(value, type); + if ((value != null) && (value.getClass() == type)) { + result = (T) value; + } else { + result = mapper.convertValue(value, type); + } } return result; } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/Markdown.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/Markdown.java index add7e674cc..0afc19159f 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/Markdown.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/Markdown.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/ModelUtils.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/ModelUtils.java index 89c84256d6..08c878b21c 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/ModelUtils.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/ModelUtils.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -386,6 +386,10 @@ public class ModelUtils { return (schema instanceof ArraySchema); } + public static boolean isSet(Schema schema) { + return ModelUtils.isArraySchema(schema) && Boolean.TRUE.equals(schema.getUniqueItems()); + } + public static boolean isStringSchema(Schema schema) { if (schema instanceof StringSchema || SchemaTypeUtil.STRING_TYPE.equals(schema.getType())) { return true; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/OptionUtils.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/OptionUtils.java index 543714c015..8aea1fa934 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/OptionUtils.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/OptionUtils.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/SemVer.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/SemVer.java index 80262459de..b2b58a8da3 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/SemVer.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/SemVer.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/URLPathUtils.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/URLPathUtils.java index fffccddd90..abb50ca496 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/URLPathUtils.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/URLPathUtils.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/resources/C-libcurl/apiClient.c.mustache b/modules/openapi-generator/src/main/resources/C-libcurl/apiClient.c.mustache index c6f29bc491..0c3df633df 100644 --- a/modules/openapi-generator/src/main/resources/C-libcurl/apiClient.c.mustache +++ b/modules/openapi-generator/src/main/resources/C-libcurl/apiClient.c.mustache @@ -12,7 +12,7 @@ size_t writeDataCallback(void *buffer, size_t size, size_t nmemb, void *userp); apiClient_t *apiClient_create() { curl_global_init(CURL_GLOBAL_ALL); apiClient_t *apiClient = malloc(sizeof(apiClient_t)); - apiClient->basePath = "{{{basePath}}}"; + apiClient->basePath = strdup("{{{basePath}}}"); apiClient->dataReceived = NULL; apiClient->response_code = 0; {{#hasAuthMethods}} @@ -33,7 +33,56 @@ apiClient_t *apiClient_create() { return apiClient; } +apiClient_t *apiClient_create_with_base_path(const char *basePath +{{#hasAuthMethods}} +{{#authMethods}} +{{#isApiKey}} +, list_t *apiKeys +{{/isApiKey}} +{{/authMethods}} +{{/hasAuthMethods}} +) { + curl_global_init(CURL_GLOBAL_ALL); + apiClient_t *apiClient = malloc(sizeof(apiClient_t)); + if(basePath){ + apiClient->basePath = strdup(basePath); + }else{ + apiClient->basePath = strdup("{{{basePath}}}"); + } + apiClient->dataReceived = NULL; + apiClient->response_code = 0; + {{#hasAuthMethods}} + {{#authMethods}} + {{#isBasic}} + apiClient->username = NULL; + apiClient->password = NULL; + {{/isBasic}} + {{#isOAuth}} + apiClient->accessToken = NULL; + {{/isOAuth}} + {{#isApiKey}} + if(apiKeys!= NULL) { + apiClient->apiKeys = list_create(); + listEntry_t *listEntry = NULL; + list_ForEach(listEntry, apiKeys) { + keyValuePair_t *pair = listEntry->data; + keyValuePair_t *pairDup = keyValuePair_create(strdup(pair->key), strdup(pair->value)); + list_addElement(apiClient->apiKeys, pairDup); + } + }else{ + apiClient->apiKeys = NULL; + } + {{/isApiKey}} + {{/authMethods}} + {{/hasAuthMethods}} + + return apiClient; +} + void apiClient_free(apiClient_t *apiClient) { + if(apiClient->basePath) { + free(apiClient->basePath); + } {{#hasAuthMethods}} {{#authMethods}} {{#isBasic}} @@ -51,6 +100,17 @@ void apiClient_free(apiClient_t *apiClient) { {{/isOAuth}} {{#isApiKey}} if(apiClient->apiKeys) { + listEntry_t *listEntry = NULL; + list_ForEach(listEntry, apiClient->apiKeys) { + keyValuePair_t *pair = listEntry->data; + if(pair->key){ + free(pair->key); + } + if(pair->value){ + free(pair->value); + } + keyValuePair_free(pair); + } list_free(apiClient->apiKeys); } {{/isApiKey}} diff --git a/modules/openapi-generator/src/main/resources/C-libcurl/apiClient.h.mustache b/modules/openapi-generator/src/main/resources/C-libcurl/apiClient.h.mustache index 8b133e9f28..5abae164e6 100644 --- a/modules/openapi-generator/src/main/resources/C-libcurl/apiClient.h.mustache +++ b/modules/openapi-generator/src/main/resources/C-libcurl/apiClient.h.mustache @@ -37,6 +37,16 @@ typedef struct binary_t apiClient_t* apiClient_create(); +apiClient_t* apiClient_create_with_base_path(const char *basePath +{{#hasAuthMethods}} +{{#authMethods}} +{{#isApiKey}} +, list_t *apiKeys +{{/isApiKey}} +{{/authMethods}} +{{/hasAuthMethods}} +); + void apiClient_free(apiClient_t *apiClient); void apiClient_invoke(apiClient_t *apiClient,char* operationParameter, list_t *queryParameters, list_t *headerParameters, list_t *formParameters,list_t *headerType,list_t *contentType, char *bodyParameters, char *requestType); diff --git a/modules/openapi-generator/src/main/resources/C-libcurl/model-body.mustache b/modules/openapi-generator/src/main/resources/C-libcurl/model-body.mustache index 3c133c12dc..fb4f691615 100644 --- a/modules/openapi-generator/src/main/resources/C-libcurl/model-body.mustache +++ b/modules/openapi-generator/src/main/resources/C-libcurl/model-body.mustache @@ -282,18 +282,18 @@ cJSON *{{classname}}_convertToJSON({{classname}}_t *{{classname}}) { {{^isContainer}} {{#isPrimitiveType}} {{#isNumeric}} - if(cJSON_AddNumberToObject(item, "{{{name}}}", {{{classname}}}->{{{name}}}) == NULL) { + if(cJSON_AddNumberToObject(item, "{{{baseName}}}", {{{classname}}}->{{{name}}}) == NULL) { goto fail; //Numeric } {{/isNumeric}} {{#isBoolean}} - if(cJSON_AddBoolToObject(item, "{{{name}}}", {{{classname}}}->{{{name}}}) == NULL) { + if(cJSON_AddBoolToObject(item, "{{{baseName}}}", {{{classname}}}->{{{name}}}) == NULL) { goto fail; //Bool } {{/isBoolean}} {{#isEnum}} {{#isString}} - if(cJSON_AddStringToObject(item, "{{{name}}}", {{{name}}}{{classname}}_ToString({{{classname}}}->{{{name}}})) == NULL) + if(cJSON_AddStringToObject(item, "{{{baseName}}}", {{{name}}}{{classname}}_ToString({{{classname}}}->{{{name}}})) == NULL) { goto fail; //Enum } @@ -301,30 +301,30 @@ cJSON *{{classname}}_convertToJSON({{classname}}_t *{{classname}}) { {{/isEnum}} {{^isEnum}} {{#isString}} - if(cJSON_AddStringToObject(item, "{{{name}}}", {{{classname}}}->{{{name}}}) == NULL) { + if(cJSON_AddStringToObject(item, "{{{baseName}}}", {{{classname}}}->{{{name}}}) == NULL) { goto fail; //String } {{/isString}} {{/isEnum}} {{#isByteArray}} - if(cJSON_AddNumberToObject(item, "{{{name}}}", {{{classname}}}->{{{name}}}) == NULL) { + if(cJSON_AddNumberToObject(item, "{{{baseName}}}", {{{classname}}}->{{{name}}}) == NULL) { goto fail; //Byte } {{/isByteArray}} {{#isBinary}} char* encoded_str_{{{name}}} = base64encode({{{classname}}}->{{{name}}}->data,{{{classname}}}->{{{name}}}->len); - if(cJSON_AddStringToObject(item, "{{{name}}}", encoded_str_{{{name}}}) == NULL) { + if(cJSON_AddStringToObject(item, "{{{baseName}}}", encoded_str_{{{name}}}) == NULL) { goto fail; //Binary } free (encoded_str_{{{name}}}); {{/isBinary}} {{#isDate}} - if(cJSON_AddStringToObject(item, "{{{name}}}", {{{classname}}}->{{{name}}}) == NULL) { + if(cJSON_AddStringToObject(item, "{{{baseName}}}", {{{classname}}}->{{{name}}}) == NULL) { goto fail; //Date } {{/isDate}} {{#isDateTime}} - if(cJSON_AddStringToObject(item, "{{{name}}}", {{{classname}}}->{{{name}}}) == NULL) { + if(cJSON_AddStringToObject(item, "{{{baseName}}}", {{{classname}}}->{{{name}}}) == NULL) { goto fail; //Date-Time } {{/isDateTime}} @@ -336,7 +336,7 @@ cJSON *{{classname}}_convertToJSON({{classname}}_t *{{classname}}) { if({{{name}}}_enum_local_JSON == NULL) { goto fail; // enum } - cJSON_AddItemToObject(item, "{{{name}}}", {{{name}}}_enum_local_JSON); + cJSON_AddItemToObject(item, "{{{baseName}}}", {{{name}}}_enum_local_JSON); if(item->child == NULL) { goto fail; } @@ -346,19 +346,19 @@ cJSON *{{classname}}_convertToJSON({{classname}}_t *{{classname}}) { if({{{name}}}_local_JSON == NULL) { goto fail; //model } - cJSON_AddItemToObject(item, "{{{name}}}", {{{name}}}_local_JSON); + cJSON_AddItemToObject(item, "{{{baseName}}}", {{{name}}}_local_JSON); if(item->child == NULL) { goto fail; } {{/isEnum}} {{/isModel}} {{#isUuid}} - if(cJSON_AddStringToObject(item, "{{{name}}}", {{{classname}}}->{{{name}}}) == NULL) { + if(cJSON_AddStringToObject(item, "{{{baseName}}}", {{{classname}}}->{{{name}}}) == NULL) { goto fail; //uuid } {{/isUuid}} {{#isEmail}} - if(cJSON_AddStringToObject(item, "{{{name}}}", {{{classname}}}->{{{name}}}) == NULL) { + if(cJSON_AddStringToObject(item, "{{{baseName}}}", {{{classname}}}->{{{name}}}) == NULL) { goto fail; //Email } {{/isEmail}} @@ -367,7 +367,7 @@ cJSON *{{classname}}_convertToJSON({{classname}}_t *{{classname}}) { if({{{name}}}_object == NULL) { goto fail; //model } - cJSON_AddItemToObject(item, "{{{name}}}", {{{name}}}_object); + cJSON_AddItemToObject(item, "{{{baseName}}}", {{{name}}}_object); if(item->child == NULL) { goto fail; } @@ -377,7 +377,7 @@ cJSON *{{classname}}_convertToJSON({{classname}}_t *{{classname}}) { {{#isContainer}} {{#isListContainer}} {{#isPrimitiveType}} - cJSON *{{{name}}} = cJSON_AddArrayToObject(item, "{{{name}}}"); + cJSON *{{{name}}} = cJSON_AddArrayToObject(item, "{{{baseName}}}"); if({{{name}}} == NULL) { goto fail; //primitive container } @@ -401,7 +401,7 @@ cJSON *{{classname}}_convertToJSON({{classname}}_t *{{classname}}) { } {{/isPrimitiveType}} {{^isPrimitiveType}} - cJSON *{{{name}}} = cJSON_AddArrayToObject(item, "{{{name}}}"); + cJSON *{{{name}}} = cJSON_AddArrayToObject(item, "{{{baseName}}}"); if({{{name}}} == NULL) { goto fail; //nonprimitive container } @@ -419,7 +419,7 @@ cJSON *{{classname}}_convertToJSON({{classname}}_t *{{classname}}) { {{/isPrimitiveType}} {{/isListContainer}} {{#isMapContainer}} - cJSON *{{{name}}} = cJSON_AddObjectToObject(item, "{{{name}}}"); + cJSON *{{{name}}} = cJSON_AddObjectToObject(item, "{{{baseName}}}"); if({{{name}}} == NULL) { goto fail; //primitive map container } @@ -466,7 +466,7 @@ fail: {{#vars}} // {{{classname}}}->{{{name}}} - cJSON *{{{name}}} = cJSON_GetObjectItemCaseSensitive({{classname}}JSON, "{{{name}}}"); + cJSON *{{{name}}} = cJSON_GetObjectItemCaseSensitive({{classname}}JSON, "{{{baseName}}}"); {{#required}} if (!{{{name}}}) { goto end; diff --git a/modules/openapi-generator/src/main/resources/Groovy/build.gradle.mustache b/modules/openapi-generator/src/main/resources/Groovy/build.gradle.mustache index 5fb5911997..915c6ab04b 100644 --- a/modules/openapi-generator/src/main/resources/Groovy/build.gradle.mustache +++ b/modules/openapi-generator/src/main/resources/Groovy/build.gradle.mustache @@ -13,7 +13,8 @@ wrapper { buildscript { repositories { - maven { url 'https://repo.jfrog.org/artifactory/gradle-plugins' } + maven { url "https://repo1.maven.org/maven2" } + maven { url = 'https://repo.jfrog.org/artifactory/gradle-plugins' } } dependencies { classpath(group: 'org.jfrog.buildinfo', name: 'build-info-extractor-gradle', version: '2.0.16') @@ -21,7 +22,7 @@ buildscript { } repositories { - mavenCentral() + maven { url "https://repo1.maven.org/maven2" } mavenLocal() } @@ -40,5 +41,5 @@ dependencies { compile "com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:$jackson_version" compile "com.fasterxml.jackson.datatype:jackson-datatype-joda:$jackson_version" compile 'io.github.http-builder-ng:http-builder-ng-core:1.0.3' - testCompile "junit:junit:4.11" + testCompile "junit:junit:4.13" } diff --git a/modules/openapi-generator/src/main/resources/Java/build.gradle.mustache b/modules/openapi-generator/src/main/resources/Java/build.gradle.mustache index 1aa650293b..69707eadc1 100644 --- a/modules/openapi-generator/src/main/resources/Java/build.gradle.mustache +++ b/modules/openapi-generator/src/main/resources/Java/build.gradle.mustache @@ -6,7 +6,7 @@ version = '{{artifactVersion}}' buildscript { repositories { - mavenCentral() + maven { url "https://repo1.maven.org/maven2" } jcenter() } dependencies { @@ -16,7 +16,7 @@ buildscript { } repositories { - mavenCentral() + maven { url "https://repo1.maven.org/maven2" } jcenter() } @@ -136,12 +136,12 @@ if(hasProperty('target') && target == 'android') { ext { swagger_annotations_version = "1.5.22" - jackson_version = "2.9.10" - jackson_databind_version = "2.9.10.1" + jackson_version = "2.10.1" + jackson_databind_version = "2.10.1" jackson_databind_nullable_version = "0.2.1" jersey_version = "1.19.4" jodatime_version = "2.9.9" - junit_version = "4.12" + junit_version = "4.13" } dependencies { diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/feign/api.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/feign/api.mustache index b446223ba5..238079ca27 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/feign/api.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/feign/api.mustache @@ -42,7 +42,7 @@ public interface {{classname}} extends ApiClient.Api { "{{baseName}}: {{=<% %>=}}{<%paramName%>}<%={{ }}=%>"{{#hasMore}}, {{/hasMore}}{{/headerParams}} }) - {{#returnType}}{{{returnType}}} {{/returnType}}{{^returnType}}void {{/returnType}}{{nickname}}({{#allParams}}{{^isBodyParam}}{{^legacyDates}}@Param("{{paramName}}") {{/legacyDates}}{{#legacyDates}}@Param(value="{{paramName}}", expander=ParamExpander.class) {{/legacyDates}}{{/isBodyParam}}{{{dataType}}} {{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}); + {{#returnType}}{{{returnType}}} {{/returnType}}{{^returnType}}void {{/returnType}}{{nickname}}({{#allParams}}{{^isBodyParam}}{{^legacyDates}}@Param("{{baseName}}") {{/legacyDates}}{{#legacyDates}}@Param(value="{{baseName}}", expander=ParamExpander.class) {{/legacyDates}}{{/isBodyParam}}{{{dataType}}} {{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}); {{#hasQueryParams}} /** @@ -80,7 +80,7 @@ public interface {{classname}} extends ApiClient.Api { "{{baseName}}: {{=<% %>=}}{<%paramName%>}<%={{ }}=%>"{{#hasMore}}, {{/hasMore}}{{/headerParams}} }) - {{#returnType}}{{{returnType}}} {{/returnType}}{{^returnType}}void {{/returnType}}{{nickname}}({{#allParams}}{{^isQueryParam}}{{^isBodyParam}}{{^legacyDates}}@Param("{{paramName}}") {{/legacyDates}}{{#legacyDates}}@Param(value="{{paramName}}", expander=ParamExpander.class) {{/legacyDates}}{{/isBodyParam}}{{{dataType}}} {{paramName}}, {{/isQueryParam}}{{/allParams}}@QueryMap(encoded=true) Map queryParams); + {{#returnType}}{{{returnType}}} {{/returnType}}{{^returnType}}void {{/returnType}}{{nickname}}({{#allParams}}{{^isQueryParam}}{{^isBodyParam}}{{^legacyDates}}@Param("{{baseName}}") {{/legacyDates}}{{#legacyDates}}@Param(value="{{baseName}}", expander=ParamExpander.class) {{/legacyDates}}{{/isBodyParam}}{{{dataType}}} {{paramName}}, {{/isQueryParam}}{{/allParams}}@QueryMap(encoded=true) Map queryParams); /** * A convenience class for generating query parameters for the diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/feign/build.gradle.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/feign/build.gradle.mustache index fcdbf1c4f2..69170a0317 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/feign/build.gradle.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/feign/build.gradle.mustache @@ -6,7 +6,7 @@ version = '{{artifactVersion}}' buildscript { repositories { - mavenCentral() + maven { url "https://repo1.maven.org/maven2" } jcenter() } dependencies { @@ -120,15 +120,15 @@ if(hasProperty('target') && target == 'android') { ext { swagger_annotations_version = "1.5.22" - jackson_version = "2.9.10" - jackson_databind_version = "2.9.10.1" + jackson_version = "2.10.1" + jackson_databind_version = "2.10.1" jackson_databind_nullable_version = "0.2.1" {{#threetenbp}} jackson_threetenbp_version = "2.9.10" {{/threetenbp}} feign_version = "{{#useFeign10}}10.2.3{{/useFeign10}}{{^useFeign10}}9.7.0{{/useFeign10}}" feign_form_version = "2.1.0" - junit_version = "4.12" + junit_version = "4.13" oltu_version = "1.0.1" } diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/feign/build.sbt.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/feign/build.sbt.mustache index 61273efb77..907b7bd4d2 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/feign/build.sbt.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/feign/build.sbt.mustache @@ -14,14 +14,14 @@ lazy val root = (project in file(".")). "io.github.openfeign" % "feign-jackson" % "{{#useFeign10}}10.2.3{{/useFeign10}}{{^useFeign10}}9.7.0{{/useFeign10}}" % "compile", "io.github.openfeign" % "feign-slf4j" % "{{#useFeign10}}10.2.3{{/useFeign10}}{{^useFeign10}}9.7.0{{/useFeign10}}" % "compile", "io.github.openfeign.form" % "feign-form" % "2.1.0" % "compile", - "com.fasterxml.jackson.core" % "jackson-core" % "2.9.10" % "compile", - "com.fasterxml.jackson.core" % "jackson-annotations" % "2.9.10" % "compile", - "com.fasterxml.jackson.core" % "jackson-databind" % "2.9.10.1" % "compile", + "com.fasterxml.jackson.core" % "jackson-core" % "2.10.1" % "compile", + "com.fasterxml.jackson.core" % "jackson-annotations" % "2.10.1" % "compile", + "com.fasterxml.jackson.core" % "jackson-databind" % "2.10.1" % "compile", "com.fasterxml.jackson.datatype" % "jackson-datatype-{{^java8}}joda{{/java8}}{{#java8}}jsr310{{/java8}}" % "2.9.10" % "compile", "com.github.joschi.jackson" % "jackson-datatype-threetenbp" % "2.9.10" % "compile", "org.apache.oltu.oauth2" % "org.apache.oltu.oauth2.client" % "1.0.1" % "compile", "com.brsanthu" % "migbase64" % "2.2" % "compile", - "junit" % "junit" % "4.12" % "test", + "junit" % "junit" % "4.13" % "test", "com.novocode" % "junit-interface" % "0.10" % "test" ) ) diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/feign/pom.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/feign/pom.mustache index fd0315830e..e73e45de1b 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/feign/pom.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/feign/pom.mustache @@ -314,13 +314,13 @@ 1.5.21 {{#useFeign10}}10.2.3{{/useFeign10}}{{^useFeign10}}9.7.0{{/useFeign10}} 2.1.0 - 2.9.10 + 2.10.1 0.2.1 - 2.9.10.1 + 2.10.1 {{#threetenbp}} 2.9.10 {{/threetenbp}} - 4.12 + 4.13 1.0.0 1.0.1 diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/google-api-client/api.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/google-api-client/api.mustache index 7c5669aa2a..2c13f4eb01 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/google-api-client/api.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/google-api-client/api.mustache @@ -58,7 +58,7 @@ public class {{classname}} { **/ public {{#returnType}}{{{returnType}}} {{/returnType}}{{^returnType}}void {{/returnType}}{{operationId}}({{#allParams}}{{{dataType}}} {{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) throws IOException { {{#returnType}}HttpResponse response = {{/returnType}}{{operationId}}ForHttpResponse({{#allParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}});{{#returnType}} - TypeReference typeRef = new TypeReference<{{{returnType}}}>() {}; + TypeReference<{{{returnType}}}> typeRef = new TypeReference<{{{returnType}}}>() {}; return apiClient.getObjectMapper().readValue(response.getContent(), typeRef);{{/returnType}} } @@ -77,7 +77,7 @@ public class {{classname}} { **/ public {{#returnType}}{{{returnType}}} {{/returnType}}{{^returnType}}void {{/returnType}}{{operationId}}({{#bodyParam}}{{^required}}{{{dataType}}} {{paramName}}, {{/required}}{{/bodyParam}}{{#requiredParams}}{{{dataType}}} {{paramName}}{{#hasMore}}, {{/hasMore}}{{/requiredParams}}{{#hasRequiredParams}}, {{/hasRequiredParams}}Map params) throws IOException { {{#returnType}}HttpResponse response = {{/returnType}}{{operationId}}ForHttpResponse({{#bodyParam}}{{^required}}{{paramName}}, {{/required}}{{/bodyParam}}{{#requiredParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/requiredParams}}{{#hasRequiredParams}}, {{/hasRequiredParams}}params);{{#returnType}} - TypeReference typeRef = new TypeReference<{{{returnType}}}>() {}; + TypeReference<{{{returnType}}}> typeRef = new TypeReference<{{{returnType}}}>() {}; return apiClient.getObjectMapper().readValue(response.getContent(), typeRef);{{/returnType}} } diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/google-api-client/build.gradle.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/google-api-client/build.gradle.mustache index aa26930fd9..0089f90de7 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/google-api-client/build.gradle.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/google-api-client/build.gradle.mustache @@ -6,7 +6,7 @@ version = '{{artifactVersion}}' buildscript { repositories { - mavenCentral() + maven { url "https://repo1.maven.org/maven2" } jcenter() } dependencies { @@ -120,13 +120,13 @@ if(hasProperty('target') && target == 'android') { ext { swagger_annotations_version = "1.5.22" - jackson_version = "2.9.10" - jackson_databind_version = "2.9.10.1" + jackson_version = "2.10.1" + jackson_databind_version = "2.10.1" jackson_databind_nullable_version = "0.2.1" google_api_client_version = "1.23.0" jersey_common_version = "2.25.1" jodatime_version = "2.9.9" - junit_version = "4.12" + junit_version = "4.13" {{#threetenbp}} jackson_threeten_version = "2.9.10" {{/threetenbp}} diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/google-api-client/build.sbt.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/google-api-client/build.sbt.mustache index 2af4dd8dfd..7d958dfadf 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/google-api-client/build.sbt.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/google-api-client/build.sbt.mustache @@ -12,9 +12,9 @@ lazy val root = (project in file(".")). "io.swagger" % "swagger-annotations" % "1.5.22", "com.google.api-client" % "google-api-client" % "1.23.0", "org.glassfish.jersey.core" % "jersey-common" % "2.25.1", - "com.fasterxml.jackson.core" % "jackson-core" % "2.9.10" % "compile", - "com.fasterxml.jackson.core" % "jackson-annotations" % "2.9.10" % "compile", - "com.fasterxml.jackson.core" % "jackson-databind" % "2.9.10.1" % "compile", + "com.fasterxml.jackson.core" % "jackson-core" % "2.10.1" % "compile", + "com.fasterxml.jackson.core" % "jackson-annotations" % "2.10.1" % "compile", + "com.fasterxml.jackson.core" % "jackson-databind" % "2.10.1" % "compile", {{#withXml}} "com.fasterxml.jackson.dataformat" % "jackson-dataformat-xml" % "2.9.10" % "compile", {{/withXml}} @@ -27,7 +27,7 @@ lazy val root = (project in file(".")). {{#threetenbp}} "com.github.joschi.jackson" % "jackson-datatype-threetenbp" % "2.9.10" % "compile", {{/threetenbp}} - "junit" % "junit" % "4.12" % "test", + "junit" % "junit" % "4.13" % "test", "com.novocode" % "junit-interface" % "0.10" % "test" ) ) diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/google-api-client/pom.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/google-api-client/pom.mustache index 4e17016acb..5e3c04fe93 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/google-api-client/pom.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/google-api-client/pom.mustache @@ -306,8 +306,8 @@ 1.5.22 1.30.2 2.25.1 - 2.9.10 - 2.9.10.1 + 2.10.1 + 2.10.1 0.2.1 {{#joda}} 2.9.9 @@ -316,6 +316,6 @@ 2.9.10 {{/threetenbp}} 1.0.0 - 4.12 + 4.13 diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/ApiClient.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/ApiClient.mustache index b12740b0f6..0f83a20450 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/ApiClient.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/ApiClient.mustache @@ -694,7 +694,7 @@ public class ApiClient { if (queryParams != null) { for (Pair queryParam : queryParams) { if (queryParam.getValue() != null) { - target = target.queryParam(queryParam.getName(), queryParam.getValue()); + target = target.queryParam(queryParam.getName(), escapeString(queryParam.getValue())); } } } diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/api.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/api.mustache index f3e27a079c..3950d7a2af 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/api.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/api.mustache @@ -38,8 +38,8 @@ public class {{classname}} { public void setApiClient(ApiClient apiClient) { this.apiClient = apiClient; } - {{#operation}} + {{^vendorExtensions.x-group-parameters}} /** * {{summary}} * {{notes}} @@ -53,10 +53,10 @@ public class {{classname}} { {{#responses.0}} * @http.response.details - - {{#responses}} - - {{/responses}} + + {{#responses}} + + {{/responses}}
                                            Status Code Description Response Headers
                                            {{code}} {{message}} {{#headers}} * {{baseName}} - {{description}}
                                            {{/headers}}{{^headers.0}} - {{/headers.0}}
                                            Status Code Description Response Headers
                                            {{code}} {{message}} {{#headers}} * {{baseName}} - {{description}}
                                            {{/headers}}{{^headers.0}} - {{/headers.0}}
                                            {{/responses.0}} {{#isDeprecated}} @@ -71,13 +71,11 @@ public class {{classname}} { @Deprecated {{/isDeprecated}} public {{#returnType}}{{{returnType}}} {{/returnType}}{{^returnType}}void {{/returnType}}{{operationId}}({{#allParams}}{{{dataType}}} {{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) throws ApiException { - {{#returnType}} - return {{operationId}}WithHttpInfo({{#allParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}).getData(); - {{/returnType}}{{^returnType}} - {{operationId}}WithHttpInfo({{#allParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}); - {{/returnType}} + {{#returnType}}return {{/returnType}}{{operationId}}WithHttpInfo({{#allParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}){{#returnType}}.getData(){{/returnType}}; } + {{/vendorExtensions.x-group-parameters}} + {{^vendorExtensions.x-group-parameters}} /** * {{summary}} * {{notes}} @@ -89,10 +87,10 @@ public class {{classname}} { {{#responses.0}} * @http.response.details - - {{#responses}} - - {{/responses}} + + {{#responses}} + + {{/responses}}
                                            Status Code Description Response Headers
                                            {{code}} {{message}} {{#headers}} * {{baseName}} - {{description}}
                                            {{/headers}}{{^headers.0}} - {{/headers.0}}
                                            Status Code Description Response Headers
                                            {{code}} {{message}} {{#headers}} * {{baseName}} - {{description}}
                                            {{/headers}}{{^headers.0}} - {{/headers.0}}
                                            {{/responses.0}} {{#isDeprecated}} @@ -106,7 +104,7 @@ public class {{classname}} { {{#isDeprecated}} @Deprecated {{/isDeprecated}} - public ApiResponse<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}> {{operationId}}WithHttpInfo({{#allParams}}{{{dataType}}} {{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) throws ApiException { + public{{/vendorExtensions.x-group-parameters}}{{#vendorExtensions.x-group-parameters}}private{{/vendorExtensions.x-group-parameters}} ApiResponse<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}> {{operationId}}WithHttpInfo({{#allParams}}{{{dataType}}} {{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) throws ApiException { Object localVarPostBody = {{#bodyParam}}{{paramName}}{{/bodyParam}}{{^bodyParam}}null{{/bodyParam}}; {{#allParams}}{{#required}} // verify the required parameter '{{paramName}}' is set @@ -152,13 +150,90 @@ public class {{classname}} { String[] localVarAuthNames = new String[] { {{#authMethods}}"{{name}}"{{#hasMore}}, {{/hasMore}}{{/authMethods}} }; - {{#returnType}} - GenericType<{{{returnType}}}> localVarReturnType = new GenericType<{{{returnType}}}>() {}; - return apiClient.invokeAPI(localVarPath, "{{httpMethod}}", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); - {{/returnType}}{{^returnType}} - return apiClient.invokeAPI(localVarPath, "{{httpMethod}}", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); - {{/returnType}} + {{#returnType}}GenericType<{{{returnType}}}> localVarReturnType = new GenericType<{{{returnType}}}>() {};{{/returnType}} + return apiClient.invokeAPI(localVarPath, "{{httpMethod}}", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, {{#returnType}}localVarReturnType{{/returnType}}{{^returnType}}null{{/returnType}}); } + {{#vendorExtensions.x-group-parameters}} + + public class API{{operationId}}Request { + {{#allParams}} + private {{#isRequired}}final {{/isRequired}}{{{dataType}}} {{localVariablePrefix}}{{paramName}}; + {{/allParams}} + + private API{{operationId}}Request({{#pathParams}}{{{dataType}}} {{paramName}}{{#hasMore}}, {{/hasMore}}{{/pathParams}}) { + {{#pathParams}} + this.{{localVariablePrefix}}{{paramName}} = {{paramName}}; + {{/pathParams}} + } + {{#allParams}}{{^isPathParam}} + + /** + * Set {{paramName}} + * @param {{paramName}} {{description}} ({{^required}}optional{{^isContainer}}{{#defaultValue}}, default to {{.}}{{/defaultValue}}{{/isContainer}}{{/required}}{{#required}}required{{/required}}) + * @return API{{operationId}}Request + */ + public API{{operationId}}Request {{paramName}}({{{dataType}}} {{paramName}}) { + this.{{localVariablePrefix}}{{paramName}} = {{paramName}}; + return this; + } + {{/isPathParam}}{{/allParams}} + + /** + * Execute {{operationId}} request + {{#returnType}}* @return {{.}}{{/returnType}} + * @throws ApiException if fails to make API call + {{#responses.0}} + * @http.response.details + + + {{#responses}} + + {{/responses}} +
                                            Status Code Description Response Headers
                                            {{code}} {{message}} {{#headers}} * {{baseName}} - {{description}}
                                            {{/headers}}{{^headers.0}} - {{/headers.0}}
                                            + {{/responses.0}} + {{#isDeprecated}}* @deprecated{{/isDeprecated}} + */ + {{#isDeprecated}}@Deprecated{{/isDeprecated}} + public {{#returnType}}{{{.}}}{{/returnType}}{{^returnType}}void{{/returnType}} execute() throws ApiException { + {{#returnType}}return {{/returnType}}this.executeWithHttpInfo().getData(); + } + + /** + * Execute {{operationId}} request with HTTP info returned + * @return ApiResponse<{{#returnType}}{{.}}{{/returnType}}{{^returnType}}Void{{/returnType}}> + * @throws ApiException if fails to make API call + {{#responses.0}} + * @http.response.details + + + {{#responses}} + + {{/responses}} +
                                            Status Code Description Response Headers
                                            {{code}} {{message}} {{#headers}} * {{baseName}} - {{description}}
                                            {{/headers}}{{^headers.0}} - {{/headers.0}}
                                            + {{/responses.0}} + {{#isDeprecated}}* @deprecated{{/isDeprecated}} + */ + {{#isDeprecated}}@Deprecated{{/isDeprecated}} + public ApiResponse<{{#returnType}}{{{.}}}{{/returnType}}{{^returnType}}Void{{/returnType}}> executeWithHttpInfo() throws ApiException { + return {{operationId}}WithHttpInfo({{#allParams}}{{localVariablePrefix}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}); + } + } + + /** + * {{summary}} + * {{notes}}{{#pathParams}} + * @param {{paramName}} {{description}} (required){{/pathParams}} + * @return {{operationId}}Request + * @throws ApiException if fails to make API call + {{#isDeprecated}}* @deprecated{{/isDeprecated}} + {{#externalDocs}}* {{description}} + * @see {{summary}} Documentation{{/externalDocs}} + */ + {{#isDeprecated}}@Deprecated{{/isDeprecated}} + public API{{operationId}}Request {{operationId}}({{#pathParams}}{{{dataType}}} {{paramName}}{{#hasMore}}, {{/hasMore}}{{/pathParams}}) throws ApiException { + return new API{{operationId}}Request({{#pathParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/pathParams}}); + } + {{/vendorExtensions.x-group-parameters}} {{/operation}} } {{/operations}} diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/api_doc.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/api_doc.mustache new file mode 100644 index 0000000000..f162d1cc97 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/api_doc.mustache @@ -0,0 +1,121 @@ +# {{classname}}{{#description}} + +{{description}}{{/description}} + +All URIs are relative to *{{basePath}}* + +Method | HTTP request | Description +------------- | ------------- | ------------- +{{#operations}}{{#operation}}[**{{operationId}}**]({{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{#summary}}{{summary}}{{/summary}} +{{/operation}}{{/operations}} + +{{#operations}} +{{#operation}} + +## {{operationId}} + +{{^vendorExtensions.x-group-parameters}} +> {{#returnType}}{{returnType}} {{/returnType}}{{operationId}}({{#allParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) +{{/vendorExtensions.x-group-parameters}} +{{#vendorExtensions.x-group-parameters}} +> {{#returnType}}{{returnType}} {{/returnType}}{{operationId}}({{#pathParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/pathParams}}){{#allParams}}{{^isPathParam}}.{{paramName}}({{paramName}}){{/isPathParam}}{{/allParams}}.execute(); +{{/vendorExtensions.x-group-parameters}} + +{{summary}}{{#notes}} + +{{{unescapedNotes}}}{{/notes}} + +### Example + +```java +// Import classes: +import {{{invokerPackage}}}.ApiClient; +import {{{invokerPackage}}}.ApiException; +import {{{invokerPackage}}}.Configuration;{{#hasAuthMethods}} +import {{{invokerPackage}}}.auth.*;{{/hasAuthMethods}} +import {{{invokerPackage}}}.models.*; +import {{{package}}}.{{{classname}}}; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("{{{basePath}}}"); + {{#hasAuthMethods}} + {{#authMethods}}{{#isBasic}}{{#isBasicBasic}} + // Configure HTTP basic authorization: {{{name}}} + HttpBasicAuth {{{name}}} = (HttpBasicAuth) defaultClient.getAuthentication("{{{name}}}"); + {{{name}}}.setUsername("YOUR USERNAME"); + {{{name}}}.setPassword("YOUR PASSWORD");{{/isBasicBasic}}{{#isBasicBearer}} + // Configure HTTP bearer authorization: {{{name}}} + HttpBearerAuth {{{name}}} = (HttpBearerAuth) defaultClient.getAuthentication("{{{name}}}"); + {{{name}}}.setBearerToken("BEARER TOKEN");{{/isBasicBearer}}{{/isBasic}}{{#isApiKey}} + // Configure API key authorization: {{{name}}} + ApiKeyAuth {{{name}}} = (ApiKeyAuth) defaultClient.getAuthentication("{{{name}}}"); + {{{name}}}.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //{{{name}}}.setApiKeyPrefix("Token");{{/isApiKey}}{{#isOAuth}} + // Configure OAuth2 access token for authorization: {{{name}}} + OAuth {{{name}}} = (OAuth) defaultClient.getAuthentication("{{{name}}}"); + {{{name}}}.setAccessToken("YOUR ACCESS TOKEN");{{/isOAuth}} + {{/authMethods}} + {{/hasAuthMethods}} + + {{{classname}}} apiInstance = new {{{classname}}}(defaultClient); + {{#allParams}} + {{{dataType}}} {{{paramName}}} = {{{example}}}; // {{{dataType}}} | {{{description}}} + {{/allParams}} + try { + {{^vendorExtensions.x-group-parameters}} + {{#returnType}}{{{returnType}}} result = {{/returnType}}apiInstance.{{{operationId}}}({{#allParams}}{{{paramName}}}{{#hasMore}}, {{/hasMore}}{{/allParams}}); + {{/vendorExtensions.x-group-parameters}} + {{#vendorExtensions.x-group-parameters}} + {{#returnType}}{{{returnType}}} result = {{/returnType}}api.{{operationId}}({{#pathParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/pathParams}}){{#allParams}}{{^isPathParam}} + .{{paramName}}({{paramName}}){{/isPathParam}}{{/allParams}} + .execute(); + {{/vendorExtensions.x-group-parameters}} + {{#returnType}} + System.out.println(result); + {{/returnType}} + } catch (ApiException e) { + System.err.println("Exception when calling {{{classname}}}#{{{operationId}}}"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +{{^allParams}}This endpoint does not need any parameter.{{/allParams}}{{#allParams}}{{#-last}} +Name | Type | Description | Notes +------------- | ------------- | ------------- | -------------{{/-last}}{{/allParams}} +{{#allParams}} **{{paramName}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}{{#isFile}}**{{dataType}}**{{/isFile}}{{^isFile}}[**{{dataType}}**]({{baseType}}.md){{/isFile}}{{/isPrimitiveType}}| {{description}} |{{^required}} [optional]{{/required}}{{^isContainer}}{{#defaultValue}} [default to {{defaultValue}}]{{/defaultValue}}{{/isContainer}}{{#allowableValues}} [enum: {{#values}}{{{.}}}{{^-last}}, {{/-last}}{{/values}}]{{/allowableValues}} +{{/allParams}} + +### Return type + +{{#returnType}}{{#returnTypeIsPrimitive}}**{{returnType}}**{{/returnTypeIsPrimitive}}{{^returnTypeIsPrimitive}}[**{{returnType}}**]({{returnBaseType}}.md){{/returnTypeIsPrimitive}}{{/returnType}}{{^returnType}}null (empty response body){{/returnType}} + +### Authorization + +{{^authMethods}}No authorization required{{/authMethods}}{{#authMethods}}[{{name}}](../README.md#{{name}}){{^-last}}, {{/-last}}{{/authMethods}} + +### HTTP request headers + +- **Content-Type**: {{#consumes}}{{{mediaType}}}{{#hasMore}}, {{/hasMore}}{{/consumes}}{{^consumes}}Not defined{{/consumes}} +- **Accept**: {{#produces}}{{{mediaType}}}{{#hasMore}}, {{/hasMore}}{{/produces}}{{^produces}}Not defined{{/produces}} + +{{#responses.0}} +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +{{#responses}} +| **{{code}}** | {{message}} | {{#headers}} * {{baseName}} - {{description}}
                                            {{/headers}}{{^headers.0}} - {{/headers.0}} | +{{/responses}} +{{/responses.0}} + +{{/operation}} +{{/operations}} diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/api_test.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/api_test.mustache new file mode 100644 index 0000000000..21e0f97d63 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/api_test.mustache @@ -0,0 +1,51 @@ +{{>licenseInfo}} + +package {{package}}; + +import {{invokerPackage}}.ApiException; +{{#imports}}import {{import}}; +{{/imports}} +import org.junit.Test; +import org.junit.Ignore; + +{{^fullJavaUtil}} +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +{{/fullJavaUtil}} + +/** + * API tests for {{classname}} + */ +@Ignore +public class {{classname}}Test { + + private final {{classname}} api = new {{classname}}(); + + {{#operations}}{{#operation}} + /** + * {{summary}} + * + * {{notes}} + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void {{operationId}}Test() throws ApiException { + {{#allParams}} + {{{dataType}}} {{paramName}} = null; + {{/allParams}} + {{^vendorExtensions.x-group-parameters}} + {{#returnType}}{{{returnType}}} response = {{/returnType}}api.{{operationId}}({{#allParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}); + {{/vendorExtensions.x-group-parameters}} + {{#vendorExtensions.x-group-parameters}} + {{#returnType}}{{{returnType}}} response = {{/returnType}}api.{{operationId}}({{#pathParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/pathParams}}){{#allParams}}{{^isPathParam}} + .{{paramName}}({{paramName}}){{/isPathParam}}{{/allParams}} + .execute(); + {{/vendorExtensions.x-group-parameters}} + // TODO: test validations + } + {{/operation}}{{/operations}} +} diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/build.gradle.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/build.gradle.mustache index 56d0e55fcb..30aa47428c 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/build.gradle.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/build.gradle.mustache @@ -6,7 +6,7 @@ version = '{{artifactVersion}}' buildscript { repositories { - mavenCentral() + maven { url "https://repo1.maven.org/maven2" } jcenter() } dependencies { @@ -119,8 +119,8 @@ if(hasProperty('target') && target == 'android') { ext { swagger_annotations_version = "1.5.22" - jackson_version = "2.9.10" - jackson_databind_version = "2.9.10.1" + jackson_version = "2.10.1" + jackson_databind_version = "2.10.1" jackson_databind_nullable_version = "0.2.1" {{#supportJava6}} jersey_version = "2.6" @@ -130,7 +130,7 @@ ext { {{^supportJava6}} jersey_version = "2.27" {{/supportJava6}} - junit_version = "4.12" + junit_version = "4.13" {{#threetenbp}} threetenbp_version = "2.9.10" {{/threetenbp}} diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/build.sbt.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/build.sbt.mustache index 61f8e28378..7e2dc832a2 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/build.sbt.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/build.sbt.mustache @@ -13,9 +13,9 @@ lazy val root = (project in file(".")). "org.glassfish.jersey.core" % "jersey-client" % {{#supportJava6}}"2.6"{{/supportJava6}}{{^supportJava6}}"2.25.1"{{/supportJava6}}, "org.glassfish.jersey.media" % "jersey-media-multipart" % {{#supportJava6}}"2.6"{{/supportJava6}}{{^supportJava6}}"2.25.1"{{/supportJava6}}, "org.glassfish.jersey.media" % "jersey-media-json-jackson" % {{#supportJava6}}"2.6"{{/supportJava6}}{{^supportJava6}}"2.25.1"{{/supportJava6}}, - "com.fasterxml.jackson.core" % "jackson-core" % "2.9.10" % "compile", - "com.fasterxml.jackson.core" % "jackson-annotations" % "2.9.10" % "compile", - "com.fasterxml.jackson.core" % "jackson-databind" % "2.9.10.1" % "compile", + "com.fasterxml.jackson.core" % "jackson-core" % "2.10.1" % "compile", + "com.fasterxml.jackson.core" % "jackson-annotations" % "2.10.1" % "compile", + "com.fasterxml.jackson.core" % "jackson-databind" % "2.10.1" % "compile", {{#joda}} "com.fasterxml.jackson.datatype" % "jackson-datatype-joda" % "2.9.10" % "compile", {{/joda}} @@ -32,7 +32,7 @@ lazy val root = (project in file(".")). "org.apache.commons" % "commons-lang3" % "3.6", "commons-io" % "commons-io" % "2.5", {{/supportJava6}} - "junit" % "junit" % "4.12" % "test", + "junit" % "junit" % "4.13" % "test", "com.novocode" % "junit-interface" % "0.10" % "test" ) ) diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/pom.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/pom.mustache index 21f566f2c4..e9fc8ba394 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/pom.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/pom.mustache @@ -360,13 +360,13 @@ 2.5 3.6 {{/supportJava6}} - 2.9.10 - 2.9.10.1 + 2.10.1 + 2.10.1 0.2.1 {{#threetenbp}} 2.9.10 {{/threetenbp}} 1.0.0 - 4.12 + 4.13 diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/licenseInfo.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/licenseInfo.mustache index 02acad802e..d148ab0a41 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/licenseInfo.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/licenseInfo.mustache @@ -13,7 +13,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/pom.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/pom.mustache index 95ffef0335..ca7d6b7a83 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/pom.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/pom.mustache @@ -160,7 +160,7 @@ ${java.version} 1.5.18 9.2.9.v20150224 - 4.12 + 4.13 1.1.7 2.5 {{#useBeanValidation}} diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/native/build.gradle.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/native/build.gradle.mustache index f81df201eb..cea6681a95 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/native/build.gradle.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/native/build.gradle.mustache @@ -6,13 +6,13 @@ version = '{{artifactVersion}}' buildscript { repositories { - mavenCentral() + maven { url "https://repo1.maven.org/maven2" } jcenter() } } repositories { - mavenCentral() + maven { url "https://repo1.maven.org/maven2" } jcenter() } @@ -52,7 +52,7 @@ artifacts { ext { swagger_annotations_version = "1.5.22" jackson_version = "2.9.9" - junit_version = "4.12" + junit_version = "4.13" } dependencies { diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/native/pom.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/native/pom.mustache index 75f54dab22..7e6ebb2f95 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/native/pom.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/native/pom.mustache @@ -216,6 +216,6 @@ 11 2.9.9 0.2.1 - 4.12 + 4.13 diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/build.gradle.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/build.gradle.mustache index fbf57ba779..304b00a445 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/build.gradle.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/build.gradle.mustache @@ -9,7 +9,7 @@ version = '{{artifactVersion}}' buildscript { repositories { - mavenCentral() + maven { url "https://repo1.maven.org/maven2" } jcenter() } dependencies { @@ -142,7 +142,7 @@ dependencies { {{#threetenbp}} compile 'org.threeten:threetenbp:1.4.0' {{/threetenbp}} - testCompile 'junit:junit:4.12' + testCompile 'junit:junit:4.13' } javadoc { diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/build.sbt.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/build.sbt.mustache index 4d76839326..4390746220 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/build.sbt.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/build.sbt.mustache @@ -25,7 +25,7 @@ lazy val root = (project in file(".")). {{/threetenbp}} "io.gsonfire" % "gson-fire" % "1.8.3" % "compile", "javax.annotation" % "jsr250-api" % "1.0" % "compile", - "junit" % "junit" % "4.12" % "test", + "junit" % "junit" % "4.13" % "test", "com.novocode" % "junit-interface" % "0.10" % "test" ) ) diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/pom.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/pom.mustache index cbcdd78f97..e4c05f4151 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/pom.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/pom.mustache @@ -320,7 +320,7 @@ {{/threetenbp}} 1.0.0 1.0 - 4.12 + 4.13 UTF-8 diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/rest-assured/build.gradle.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/rest-assured/build.gradle.mustache index dd848e0f5e..b04e53f1e9 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/rest-assured/build.gradle.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/rest-assured/build.gradle.mustache @@ -6,7 +6,7 @@ version = '{{artifactVersion}}' buildscript { repositories { - mavenCentral() + maven { url "https://repo1.maven.org/maven2" } jcenter() } dependencies { @@ -97,9 +97,9 @@ if(hasProperty('target') && target == 'android') { ext { swagger_annotations_version = "1.5.21" rest_assured_version = "4.0.0" - junit_version = "4.12" + junit_version = "4.13" {{#jackson}} - jackson_version = "2.9.10" + jackson_version = "2.10.1" jackson_databind_version = "2.9.10" jackson_databind_nullable_version = 0.2.1 {{/jackson}} diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/rest-assured/build.sbt.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/rest-assured/build.sbt.mustache index d8214467ae..71f2eaeeba 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/rest-assured/build.sbt.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/rest-assured/build.sbt.mustache @@ -27,7 +27,7 @@ lazy val root = (project in file(".")). "org.threeten" % "threetenbp" % "1.4.0" % "compile", {{/threetenbp}} "com.squareup.okio" % "okio" % "1.13.0" % "compile", - "junit" % "junit" % "4.12" % "test", + "junit" % "junit" % "4.13" % "test", "com.novocode" % "junit-interface" % "0.10" % "test" ) ) diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/rest-assured/pom.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/rest-assured/pom.mustache index f4eb427c76..9c49fb0777 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/rest-assured/pom.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/rest-assured/pom.mustache @@ -323,7 +323,7 @@ 1.4.0 {{/threetenbp}} {{#jackson}} - 2.9.10 + 2.10.1 2.9.10 0.2.1 {{#threetenbp}} @@ -331,6 +331,6 @@ {{/threetenbp}} {{/jackson}} 1.13.0 - 4.12 + 4.13 diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/resteasy/build.gradle.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/resteasy/build.gradle.mustache index 6579b7c46c..59a0970f35 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/resteasy/build.gradle.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/resteasy/build.gradle.mustache @@ -6,7 +6,7 @@ version = '{{artifactVersion}}' buildscript { repositories { - mavenCentral() + maven { url "https://repo1.maven.org/maven2" } jcenter() } dependencies { @@ -119,8 +119,8 @@ if(hasProperty('target') && target == 'android') { ext { swagger_annotations_version = "1.5.22" - jackson_version = "2.9.10" - jackson_databind_version = "2.9.10.1" + jackson_version = "2.10.1" + jackson_databind_version = "2.10.1" jackson_databind_nullable_version = "0.2.1" threetenbp_version = "2.9.10" resteasy_version = "3.1.3.Final" @@ -131,7 +131,7 @@ ext { commons_io_version=2.5 commons_lang3_version=3.5 {{/supportJava6}} - junit_version = "4.12" + junit_version = "4.13" } dependencies { diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/resteasy/build.sbt.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/resteasy/build.sbt.mustache index 95ab58d1f9..936c4141f8 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/resteasy/build.sbt.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/resteasy/build.sbt.mustache @@ -13,9 +13,9 @@ lazy val root = (project in file(".")). "org.jboss.resteasy" % "resteasy-client" % "3.1.3.Final" % "compile", "org.jboss.resteasy" % "resteasy-multipart-provider" % "3.1.3.Final" % "compile", "org.jboss.resteasy" % "resteasy-jackson2-provider" % "3.1.3.Final" % "compile", - "com.fasterxml.jackson.core" % "jackson-core" % "2.9.10" % "compile", - "com.fasterxml.jackson.core" % "jackson-annotations" % "2.9.10" % "compile", - "com.fasterxml.jackson.core" % "jackson-databind" % "2.9.10.1" % "compile", + "com.fasterxml.jackson.core" % "jackson-core" % "2.10.1" % "compile", + "com.fasterxml.jackson.core" % "jackson-annotations" % "2.10.1" % "compile", + "com.fasterxml.jackson.core" % "jackson-databind" % "2.10.1" % "compile", "com.github.joschi.jackson" % "jackson-datatype-threetenbp" % "2.9.10" % "compile", {{#java8}} "com.fasterxml.jackson.datatype" % "jackson-datatype-jsr310" % "2.9.10" % "compile", @@ -29,7 +29,7 @@ lazy val root = (project in file(".")). "org.apache.commons" % "commons-lang3" % "3.5" % "compile", "commons-io" % "commons-io" % "2.5" % "compile", {{/supportJava6}} - "junit" % "junit" % "4.12" % "test", + "junit" % "junit" % "4.13" % "test", "com.novocode" % "junit-interface" % "0.10" % "test" ) ) diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/resteasy/pom.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/resteasy/pom.mustache index 30a4ba06e6..e3e127020e 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/resteasy/pom.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/resteasy/pom.mustache @@ -294,8 +294,8 @@ UTF-8 1.5.22 3.1.3.Final - 2.9.10 - 2.9.10.1 + 2.10.1 + 2.10.1 0.2.1 2.9.10 {{^java8}} @@ -306,6 +306,6 @@ 3.6 {{/supportJava6}} 1.0.0 - 4.12 + 4.13 diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/build.gradle.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/build.gradle.mustache index 2e2485139f..33d09ae830 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/build.gradle.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/build.gradle.mustache @@ -6,7 +6,7 @@ version = '{{artifactVersion}}' buildscript { repositories { - mavenCentral() + maven { url "https://repo1.maven.org/maven2" } jcenter() } dependencies { @@ -120,12 +120,12 @@ if(hasProperty('target') && target == 'android') { ext { swagger_annotations_version = "1.5.22" - jackson_version = "2.9.10" - jackson_databind_version = "2.9.10.1" + jackson_version = "2.10.1" + jackson_databind_version = "2.10.1" jackson_databind_nullable_version = "0.2.1" spring_web_version = "4.3.9.RELEASE" jodatime_version = "2.9.9" - junit_version = "4.12" + junit_version = "4.13" {{#threetenbp}} jackson_threeten_version = "2.9.10" {{/threetenbp}} diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/pom.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/pom.mustache index e55bc8e7fe..1f5e82d501 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/pom.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/pom.mustache @@ -309,8 +309,8 @@ UTF-8 1.5.22 4.3.9.RELEASE - 2.9.10 - 2.9.10.1 + 2.10.1 + 2.10.1 0.2.1 {{#joda}} 2.9.9 @@ -319,6 +319,6 @@ 2.9.10 {{/threetenbp}} 1.0.0 - 4.12 + 4.13 diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit/build.gradle.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit/build.gradle.mustache index a3c7c226f0..fab2f0d9fe 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit/build.gradle.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit/build.gradle.mustache @@ -6,7 +6,7 @@ version = '{{artifactVersion}}' buildscript { repositories { - mavenCentral() + maven { url "https://repo1.maven.org/maven2" } jcenter() } dependencies { @@ -111,7 +111,7 @@ ext { oltu_version = "1.0.1" retrofit_version = "1.9.0" swagger_annotations_version = "1.5.21" - junit_version = "4.12" + junit_version = "4.13" jodatime_version = "2.9.3" {{#threetenbp}} threetenbp_version = "1.4.0" diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit/build.sbt.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit/build.sbt.mustache index 6afa18db86..360f53d1ae 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit/build.sbt.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit/build.sbt.mustache @@ -17,7 +17,7 @@ lazy val root = (project in file(".")). {{#threetenbp}} "org.threeten" % "threetenbp" % "1.4.0" % "compile", {{/threetenbp}} - "junit" % "junit" % "4.12" % "test", + "junit" % "junit" % "4.13" % "test", "com.novocode" % "junit-interface" % "0.10" % "test" ) ) diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit/pom.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit/pom.mustache index 73d9b4d565..5a40a07979 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit/pom.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit/pom.mustache @@ -280,6 +280,6 @@ {{/threetenbp}} 1.0.1 1.0.0 - 4.12 + 4.13 diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/build.gradle.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/build.gradle.mustache index 362c8a504a..ea96f09416 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/build.gradle.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/build.gradle.mustache @@ -6,7 +6,7 @@ version = '{{artifactVersion}}' buildscript { repositories { - mavenCentral() + maven { url "https://repo1.maven.org/maven2" } jcenter() } dependencies { @@ -127,18 +127,18 @@ ext { play_version = "2.4.11" {{/play24}} {{#play25}} - jackson_version = "2.9.10" + jackson_version = "2.10.1" play_version = "2.5.14" {{/play25}} {{#play26}} - jackson_version = "2.9.10" - jackson_databind_version = "2.9.10.1" + jackson_version = "2.10.1" + jackson_databind_version = "2.10.1" jackson_databind_nullable_version = "0.2.1" play_version = "2.6.7" {{/play26}} {{/usePlayWS}} swagger_annotations_version = "1.5.22" - junit_version = "4.12" + junit_version = "4.13" {{#useRxJava}} rx_java_version = "1.3.0" {{/useRxJava}} diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/build.sbt.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/build.sbt.mustache index ecae66c6a8..be45635e47 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/build.sbt.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/build.sbt.mustache @@ -23,15 +23,15 @@ lazy val root = (project in file(".")). {{/play24}} {{#play25}} "com.typesafe.play" % "play-java-ws_2.11" % "2.5.15" % "compile", - "com.fasterxml.jackson.core" % "jackson-core" % "2.9.10" % "compile", - "com.fasterxml.jackson.core" % "jackson-annotations" % "2.9.10" % "compile", - "com.fasterxml.jackson.core" % "jackson-databind" % "2.9.10.1" % "compile", + "com.fasterxml.jackson.core" % "jackson-core" % "2.10.1" % "compile", + "com.fasterxml.jackson.core" % "jackson-annotations" % "2.10.1" % "compile", + "com.fasterxml.jackson.core" % "jackson-databind" % "2.10.1" % "compile", {{/play25}} {{#play26}} "com.typesafe.play" % "play-ahc-ws_2.12" % "2.6.7" % "compile", "javax.validation" % "validation-api" % "1.1.0.Final" % "compile", - "com.fasterxml.jackson.core" % "jackson-core" % "2.9.10" % "compile", - "com.fasterxml.jackson.core" % "jackson-annotations" % "2.9.10" % "compile", + "com.fasterxml.jackson.core" % "jackson-core" % "2.10.1" % "compile", + "com.fasterxml.jackson.core" % "jackson-annotations" % "2.10.1" % "compile", "com.fasterxml.jackson.core" % "jackson-databind" % "2.9.10" % "compile", {{/play26}} "com.squareup.retrofit2" % "converter-jackson" % "2.3.0" % "compile", @@ -53,7 +53,7 @@ lazy val root = (project in file(".")). "org.threeten" % "threetenbp" % "1.4.0" % "compile", {{/threetenbp}} "io.gsonfire" % "gson-fire" % "1.8.0" % "compile", - "junit" % "junit" % "4.12" % "test", + "junit" % "junit" % "4.13" % "test", "com.novocode" % "junit-interface" % "0.11" % "test" ) ) diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/pom.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/pom.mustache index f041511210..9613f94841 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/pom.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/pom.mustache @@ -375,17 +375,17 @@ 1.8.3 1.5.22 {{#usePlayWS}} - 2.9.10.1 + 2.10.1 {{#play24}} 2.6.6 2.4.11 {{/play24}} {{#play25}} - 2.9.10 + 2.10.1 2.5.15 {{/play25}} {{#play26}} - 2.9.10 + 2.10.1 2.6.7 {{/play26}} 0.2.1 @@ -404,6 +404,6 @@ 1.4.0 {{/threetenbp}} 1.0.1 - 4.12 + 4.13 diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/vertx/build.gradle.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/vertx/build.gradle.mustache index 862aee9f78..53bc7b9a8e 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/vertx/build.gradle.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/vertx/build.gradle.mustache @@ -5,7 +5,7 @@ group = '{{groupId}}' version = '{{artifactVersion}}' repositories { - mavenCentral() + maven { url "https://repo1.maven.org/maven2" } jcenter() } @@ -28,10 +28,10 @@ task execute(type:JavaExec) { ext { swagger_annotations_version = "1.5.21" - jackson_version = "2.9.10" - jackson_databind_version = "2.9.10.1" + jackson_version = "2.10.1" + jackson_databind_version = "2.10.1" vertx_version = "3.4.2" - junit_version = "4.12" + junit_version = "4.13" } dependencies { diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/vertx/pom.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/vertx/pom.mustache index 51125fa48e..3ed8b93b49 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/vertx/pom.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/vertx/pom.mustache @@ -289,9 +289,9 @@ UTF-8 3.4.2 1.5.22 - 2.9.10 - 2.9.10.1 + 2.10.1 + 2.10.1 0.2.1 - 4.12 + 4.13 diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/webclient/pom.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/webclient/pom.mustache index f07bbf5e94..7b57232bc5 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/webclient/pom.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/webclient/pom.mustache @@ -143,10 +143,10 @@ UTF-8 1.5.22 5.0.8.RELEASE - 2.9.10 - 2.9.10.1 + 2.10.1 + 2.10.1 0.2.1 - 4.12 + 4.13 3.1.8.RELEASE 0.7.8.RELEASE {{#joda}} diff --git a/modules/openapi-generator/src/main/resources/Java/pom.mustache b/modules/openapi-generator/src/main/resources/Java/pom.mustache index 7dde4b12d9..b17b2357ba 100644 --- a/modules/openapi-generator/src/main/resources/Java/pom.mustache +++ b/modules/openapi-generator/src/main/resources/Java/pom.mustache @@ -356,6 +356,6 @@ {{/supportJava6}} {{^threetenbp}}2.7.5{{/threetenbp}}{{#threetenbp}}2.6.4{{/threetenbp}} 1.0.0 - 4.12 + 4.13 diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/licenseInfo.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/licenseInfo.mustache index 02acad802e..d148ab0a41 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/licenseInfo.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/licenseInfo.mustache @@ -13,7 +13,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/pom.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/pom.mustache index 315e0d096a..a613b1b204 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/pom.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/pom.mustache @@ -206,7 +206,7 @@ ${java.version} 1.5.22 9.2.9.v20150224 - 4.12 + 4.13 1.1.7 2.5 {{#useBeanValidation}} diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/server/pom.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/server/pom.mustache index 83c7335172..eabc448d6b 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/server/pom.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/server/pom.mustache @@ -337,7 +337,7 @@ {{/generateSpringBootApplication}} {{/generateSpringApplication}} {{^generateSpringBootApplication}} - 4.12 + 4.13 1.1.7 {{/generateSpringBootApplication}} 3.3.0 diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/licenseInfo.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/licenseInfo.mustache index 02acad802e..d148ab0a41 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/licenseInfo.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/licenseInfo.mustache @@ -13,7 +13,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/pom.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/pom.mustache index 62d0e3ebc0..6fdc923594 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/pom.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/pom.mustache @@ -200,7 +200,7 @@ ${java.version} 1.5.18 9.2.9.v20150224 - 4.12 + 4.13 1.1.7 2.5 {{#useBeanValidation}} diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/server/pom.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/server/pom.mustache index 2e75578f59..de2adaff11 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/server/pom.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/server/pom.mustache @@ -251,7 +251,7 @@ ${java.version} 1.5.22 9.2.9.v20150224 - 4.12 + 4.13 1.1.7 2.5 {{#useBeanValidation}} diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/libraries/jersey1/pom.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/libraries/jersey1/pom.mustache index 08e49b7f3c..a2a8cc7103 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/libraries/jersey1/pom.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/libraries/jersey1/pom.mustache @@ -208,7 +208,7 @@ 1.19.1 2.9.9 1.7.21 - 4.12 + 4.13 2.5 UTF-8 diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/pom.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/pom.mustache index 9785f8ac10..5b50f42711 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/pom.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/pom.mustache @@ -217,7 +217,7 @@ 2.5 3.5 {{/supportJava6}} - 4.12 + 4.13 1.1.7 2.5 UTF-8 diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/gradle.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/gradle.mustache index df8a82b461..b1f08021b4 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/gradle.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/gradle.mustache @@ -4,7 +4,7 @@ project.version = "{{artifactVersion}}" project.group = "{{groupId}}" repositories { - mavenCentral() + maven { url "https://repo1.maven.org/maven2" } } dependencies { @@ -25,7 +25,7 @@ dependencies { {{#java8}} compile 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.9.9' {{/java8}} - testCompile 'junit:junit:4.12', + testCompile 'junit:junit:4.13', 'org.hamcrest:hamcrest-core:1.3' } diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/gradle.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/gradle.mustache index 84e2d612aa..6427c11001 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/gradle.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/gradle.mustache @@ -4,7 +4,7 @@ project.version = "{{artifactVersion}}" project.group = "{{groupId}}" repositories { - mavenCentral() + maven { url "https://repo1.maven.org/maven2" } } dependencies { @@ -25,7 +25,7 @@ dependencies { //TODO: swaggerFeature compile 'io.swagger:swagger-jaxrs:1.5.12' - testCompile 'junit:junit:4.12', + testCompile 'junit:junit:4.13', 'org.hamcrest:hamcrest-core:1.3' } diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/libraries/quarkus/Dockerfile.jvm.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/libraries/quarkus/Dockerfile.jvm.mustache index 08c75ecbaa..5c0779580f 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/libraries/quarkus/Dockerfile.jvm.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/libraries/quarkus/Dockerfile.jvm.mustache @@ -14,18 +14,21 @@ # docker run -i --rm -p 8080:8080 quarkus/{{artifactId}}-jvm # ### -FROM fabric8/java-alpine-openjdk8-jre +FROM fabric8/java-alpine-openjdk8-jre:1.6.5 ENV JAVA_OPTIONS="-Dquarkus.http.host=0.0.0.0 -Djava.util.logging.manager=org.jboss.logmanager.LogManager" ENV AB_ENABLED=jmx_exporter -COPY target/lib/* /deployments/lib/ -COPY target/*-runner.jar /deployments/app.jar -EXPOSE 8080 -# run with user 1001 and be prepared for be running in OpenShift too +# Be prepared for running in OpenShift too RUN adduser -G root --no-create-home --disabled-password 1001 \ && chown -R 1001 /deployments \ && chmod -R "g+rwX" /deployments \ && chown -R 1001:root /deployments + +COPY target/lib/* /deployments/lib/ +COPY target/*-runner.jar /deployments/app.jar +EXPOSE 8080 + +# run with user 1001 USER 1001 ENTRYPOINT [ "/deployments/run-java.sh" ] \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/libraries/quarkus/application.properties.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/libraries/quarkus/application.properties.mustache index cef6b51761..959a92cb4b 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/libraries/quarkus/application.properties.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/libraries/quarkus/application.properties.mustache @@ -1,3 +1,4 @@ # Configuration file +# key = value mp.openapi.scan.disable=true \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/libraries/quarkus/pom.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/libraries/quarkus/pom.mustache index df616018ae..e741d85fe9 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/libraries/quarkus/pom.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/libraries/quarkus/pom.mustache @@ -13,10 +13,10 @@ 1.8 UTF-8 UTF-8 - 1.0.1.Final + 1.1.1.Final quarkus-universe-bom io.quarkus - 1.0.1.Final + 1.1.1.Final 2.22.1 diff --git a/modules/openapi-generator/src/main/resources/JavaPlayFramework/LICENSE.mustache b/modules/openapi-generator/src/main/resources/JavaPlayFramework/LICENSE.mustache index 4baedcb95f..19823e1cac 100644 --- a/modules/openapi-generator/src/main/resources/JavaPlayFramework/LICENSE.mustache +++ b/modules/openapi-generator/src/main/resources/JavaPlayFramework/LICENSE.mustache @@ -1,7 +1,7 @@ This software is licensed under the Apache 2 license, quoted below. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this project except in compliance with -the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. +the License. You may obtain a copy of the License at https://www.apache.org/licenses/LICENSE-2.0. Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/enumClass.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/enumClass.mustache index 2e90275477..c1d813aa80 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/enumClass.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/enumClass.mustache @@ -26,8 +26,14 @@ this.value = value; } - @Override + {{#jackson}} @JsonValue + {{/jackson}} + public {{{dataType}}} getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/enumOuterClass.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/enumOuterClass.mustache index 60d13571cb..baa6d54d70 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/enumOuterClass.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/enumOuterClass.mustache @@ -24,8 +24,14 @@ public enum {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum this.value = value; } - @Override + {{#jackson}} @JsonValue + {{/jackson}} + public {{{dataType}}} getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-cloud/apiClient.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-cloud/apiClient.mustache index 2a3e72fb1c..f00a6c3b6f 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-cloud/apiClient.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-cloud/apiClient.mustache @@ -4,7 +4,7 @@ import org.springframework.cloud.openfeign.FeignClient; import {{configPackage}}.ClientConfiguration; {{=<% %>=}} -@FeignClient(name="${<%title%>.name:<%title%>}", url="${<%title%>.url:<%basePath%>}", configuration = ClientConfiguration.class) +@FeignClient(name="${<%classVarName%>.name:<%classVarName%>}", url="${<%classVarName%>.url:<%basePath%>}", configuration = ClientConfiguration.class) <%={{ }}=%> public interface {{classname}}Client extends {{classname}} { -} \ No newline at end of file +} diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-mvc/pom.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-mvc/pom.mustache index 156ba47b04..c0abd27f20 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-mvc/pom.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-mvc/pom.mustache @@ -258,7 +258,7 @@ ${java.version} 9.2.15.v20160210 1.7.21 - 4.12 + 4.13 2.5 2.8.0 2.9.9 diff --git a/modules/openapi-generator/src/main/resources/JavaVertXServer/pom.mustache b/modules/openapi-generator/src/main/resources/JavaVertXServer/pom.mustache index 64aec46faf..782786111b 100644 --- a/modules/openapi-generator/src/main/resources/JavaVertXServer/pom.mustache +++ b/modules/openapi-generator/src/main/resources/JavaVertXServer/pom.mustache @@ -12,7 +12,7 @@ UTF-8 1.8 - 4.12 + 4.13 3.4.1 3.8.1 {{vertxSwaggerRouterVersion}} diff --git a/modules/openapi-generator/src/main/resources/JavaVertXWebServer/supportFiles/pom.mustache b/modules/openapi-generator/src/main/resources/JavaVertXWebServer/supportFiles/pom.mustache index dbe1de7342..458ee2b4dd 100644 --- a/modules/openapi-generator/src/main/resources/JavaVertXWebServer/supportFiles/pom.mustache +++ b/modules/openapi-generator/src/main/resources/JavaVertXWebServer/supportFiles/pom.mustache @@ -12,7 +12,7 @@ 3.6.3 1.7.26 - 4.12 + 4.13 diff --git a/modules/openapi-generator/src/main/resources/Javascript/es6/package.mustache b/modules/openapi-generator/src/main/resources/Javascript/es6/package.mustache index bd87553eb2..15a0a52fec 100644 --- a/modules/openapi-generator/src/main/resources/Javascript/es6/package.mustache +++ b/modules/openapi-generator/src/main/resources/Javascript/es6/package.mustache @@ -12,6 +12,11 @@ "browser": { "fs": false }, +{{#npmRepository}} + "publishConfig":{ + "registry":"{{npmRepository}}" + }, +{{/npmRepository}} "dependencies": { "@babel/cli": "^7.0.0", "superagent": "3.7.0" diff --git a/modules/openapi-generator/src/main/resources/Javascript/package.mustache b/modules/openapi-generator/src/main/resources/Javascript/package.mustache index 23515dd9c2..2fe23d57d7 100644 --- a/modules/openapi-generator/src/main/resources/Javascript/package.mustache +++ b/modules/openapi-generator/src/main/resources/Javascript/package.mustache @@ -10,6 +10,11 @@ "browser": { "fs": false }, +{{#npmRepository}} + "publishConfig":{ + "registry":"{{npmRepository}}" + }, +{{/npmRepository}} "dependencies": { "superagent": "5.1.0" }, diff --git a/modules/openapi-generator/src/main/resources/META-INF/services/org.openapitools.codegen.CodegenConfig b/modules/openapi-generator/src/main/resources/META-INF/services/org.openapitools.codegen.CodegenConfig index 6876bd9899..7fa410881c 100644 --- a/modules/openapi-generator/src/main/resources/META-INF/services/org.openapitools.codegen.CodegenConfig +++ b/modules/openapi-generator/src/main/resources/META-INF/services/org.openapitools.codegen.CodegenConfig @@ -109,6 +109,7 @@ org.openapitools.codegen.languages.StaticHtml2Generator org.openapitools.codegen.languages.SwiftClientCodegen org.openapitools.codegen.languages.Swift3Codegen org.openapitools.codegen.languages.Swift4Codegen +org.openapitools.codegen.languages.Swift5ClientCodegen org.openapitools.codegen.languages.TypeScriptAngularClientCodegen org.openapitools.codegen.languages.TypeScriptAngularJsClientCodegen org.openapitools.codegen.languages.TypeScriptAureliaClientCodegen diff --git a/modules/openapi-generator/src/main/resources/_common/LICENSE b/modules/openapi-generator/src/main/resources/_common/LICENSE index 8dada3edaf..3f4d322ebd 100644 --- a/modules/openapi-generator/src/main/resources/_common/LICENSE +++ b/modules/openapi-generator/src/main/resources/_common/LICENSE @@ -192,7 +192,7 @@ you may not use this file except in compliance with the License. You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + https://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/resources/android/build.mustache b/modules/openapi-generator/src/main/resources/android/build.mustache index ec465e6cb0..c26f9b8967 100644 --- a/modules/openapi-generator/src/main/resources/android/build.mustache +++ b/modules/openapi-generator/src/main/resources/android/build.mustache @@ -5,7 +5,7 @@ project.version = '{{artifactVersion}}' buildscript { repositories { - mavenCentral() + maven { url "https://repo1.maven.org/maven2" } jcenter() } dependencies { @@ -91,7 +91,7 @@ ext { gson_version = "2.3.1" httpclient_version = "4.5.2" httpcore_version = "4.4.4" - junit_version = "4.12" + junit_version = "4.13" } dependencies { diff --git a/modules/openapi-generator/src/main/resources/android/libraries/volley/build.mustache b/modules/openapi-generator/src/main/resources/android/libraries/volley/build.mustache index 728bea6987..7c6cb04c85 100644 --- a/modules/openapi-generator/src/main/resources/android/libraries/volley/build.mustache +++ b/modules/openapi-generator/src/main/resources/android/libraries/volley/build.mustache @@ -5,7 +5,7 @@ project.version = '{{artifactVersion}}' buildscript { repositories { - mavenCentral() + maven { url "https://repo1.maven.org/maven2" } jcenter() } dependencies { @@ -76,7 +76,7 @@ ext { httpcore_version = "4.4.4" httpclient_version = "4.3.3" volley_version = "1.0.0" - junit_version = "4.12" + junit_version = "4.13" robolectric_version = "3.0" concurrent_unit_version = "0.4.2" } diff --git a/modules/openapi-generator/src/main/resources/codegen/kotlin/build_gradle.mustache b/modules/openapi-generator/src/main/resources/codegen/kotlin/build_gradle.mustache index 60ec7dd944..2a61f06ce2 100644 --- a/modules/openapi-generator/src/main/resources/codegen/kotlin/build_gradle.mustache +++ b/modules/openapi-generator/src/main/resources/codegen/kotlin/build_gradle.mustache @@ -11,7 +11,7 @@ version = "1.0-SNAPSHOT" repositories { mavenLocal() - mavenCentral() + maven { url = uri("https://repo1.maven.org/maven2") } } dependencies { diff --git a/modules/openapi-generator/src/main/resources/cpp-restbed-server/api-header.mustache b/modules/openapi-generator/src/main/resources/cpp-restbed-server/api-header.mustache index fe966c1d98..d20d874fea 100644 --- a/modules/openapi-generator/src/main/resources/cpp-restbed-server/api-header.mustache +++ b/modules/openapi-generator/src/main/resources/cpp-restbed-server/api-header.mustache @@ -76,6 +76,10 @@ private: {{#allParams}}{{{dataType}}} const &{{#hasMore}}, {{/hasMore}}{{/allParams}} )> handler_{{httpMethod}}_; {{/vendorExtensions.x-codegen-otherMethods}} + + {{#allParams}} + {{{dataType}}} {{paramName}}{}; + {{/allParams}} }; {{/operation}} diff --git a/modules/openapi-generator/src/main/resources/cpp-restbed-server/api-source.mustache b/modules/openapi-generator/src/main/resources/cpp-restbed-server/api-source.mustache index 9523774984..ef75dd8e36 100644 --- a/modules/openapi-generator/src/main/resources/cpp-restbed-server/api-source.mustache +++ b/modules/openapi-generator/src/main/resources/cpp-restbed-server/api-source.mustache @@ -18,7 +18,7 @@ using namespace {{modelNamespace}}; {{#operation}} std::shared_ptr<{{classname}}{{vendorExtensions.x-codegen-resourceName}}Resource> sp{{classname}}{{vendorExtensions.x-codegen-resourceName}}Resource = std::make_shared<{{classname}}{{vendorExtensions.x-codegen-resourceName}}Resource>(); this->publish(sp{{classname}}{{vendorExtensions.x-codegen-resourceName}}Resource); - + {{/operation}} } diff --git a/modules/openapi-generator/src/main/resources/cpp-restbed-server/model-header.mustache b/modules/openapi-generator/src/main/resources/cpp-restbed-server/model-header.mustache index 657c7c9ab7..090481e0a1 100644 --- a/modules/openapi-generator/src/main/resources/cpp-restbed-server/model-header.mustache +++ b/modules/openapi-generator/src/main/resources/cpp-restbed-server/model-header.mustache @@ -13,6 +13,7 @@ {{#imports}}{{{this}}} {{/imports}} #include +#include {{#modelNamespaceDeclarations}} namespace {{this}} { @@ -21,30 +22,39 @@ namespace {{this}} { /// /// {{description}} /// -class {{declspec}} {{classname}} +{{#circularReferences}} +class {{{this}}}; +{{/circularReferences}} +class {{declspec}} {{classname}} {{#interfaces}}{{#-first}}:{{/-first}}{{^-first}},{{/-first}} public {{{this}}}{{/interfaces}} { public: {{classname}}(); virtual ~{{classname}}(); - std::string toJsonString(); + std::string toJsonString(bool prettyJson = false); void fromJsonString(std::string const& jsonString); + boost::property_tree::ptree toPropertyTree(); + void fromPropertyTree(boost::property_tree::ptree const& pt); ///////////////////////////////////////////// /// {{classname}} members - {{#vars}} + /// /// {{description}} /// {{{dataType}}} {{getter}}() const; void {{setter}}({{{dataType}}} value); {{/vars}} - protected: {{#vars}} {{{dataType}}} m_{{name}}; {{/vars}} + {{#vars}} + {{#isEnum}} + std::vector<{{{dataType}}}> m_{{enumName}}; + {{/isEnum}} + {{/vars}} }; {{#modelNamespaceDeclarations}} diff --git a/modules/openapi-generator/src/main/resources/cpp-restbed-server/model-source.mustache b/modules/openapi-generator/src/main/resources/cpp-restbed-server/model-source.mustache index 748e6fe251..3544da734c 100644 --- a/modules/openapi-generator/src/main/resources/cpp-restbed-server/model-source.mustache +++ b/modules/openapi-generator/src/main/resources/cpp-restbed-server/model-source.mustache @@ -5,6 +5,9 @@ #include #include +{{#hasEnums}} +#include +{{/hasEnums}} #include #include @@ -18,36 +21,37 @@ namespace {{this}} { {{classname}}::{{classname}}() { - {{#vars}}{{^isContainer}}{{#isPrimitiveType}}m_{{name}} = {{{defaultValue}}}; - {{/isPrimitiveType}}{{^isPrimitiveType}}{{#isString}}m_{{name}} = {{{defaultValue}}}; - {{/isString}}{{#isDateTime}}m_{{name}} = {{{defaultValue}}}; - {{/isDateTime}}{{/isPrimitiveType}}{{/isContainer}}{{/vars}} + {{#vars}} + {{^isContainer}} + {{#isPrimitiveType}} + m_{{name}} = {{{defaultValue}}}; + {{/isPrimitiveType}} + {{^isPrimitiveType}} + {{#isString}} + m_{{name}} = {{{defaultValue}}}; + {{/isString}} + {{#isDate}} + m_{{name}} = {{{defaultValue}}}; + {{/isDate}} + {{#isDateTime}} + m_{{name}} = {{{defaultValue}}}; + {{/isDateTime}} + {{#isEnum}} + m_{{enumName}} = { {{#allowableValues}}{{#enumVars}}{{^-first}}, {{/-first}}{{{value}}}{{/enumVars}}{{/allowableValues}} }; + {{/isEnum}} + {{/isPrimitiveType}} + {{/isContainer}} + {{/vars}} } {{classname}}::~{{classname}}() { } -std::string {{classname}}::toJsonString() +std::string {{classname}}::toJsonString(bool prettyJson) { std::stringstream ss; - ptree pt; - {{#vars}} - {{^isContainer}} - {{#isPrimitiveType}} - pt.put("{{baseName}}", m_{{name}}); - {{/isPrimitiveType}} - {{^isPrimitiveType}} - {{#isString}} - pt.put("{{baseName}}", m_{{name}}); - {{/isString}} - {{#isDateTime}} - pt.put("{{baseName}}", m_{{name}}); - {{/isDateTime}} - {{/isPrimitiveType}} - {{/isContainer}} - {{/vars}} - write_json(ss, pt, false); + write_json(ss, this->toPropertyTree(), prettyJson); return ss.str(); } @@ -56,19 +60,116 @@ void {{classname}}::fromJsonString(std::string const& jsonString) std::stringstream ss(jsonString); ptree pt; read_json(ss,pt); + this->fromPropertyTree(pt); +} + +ptree {{classname}}::toPropertyTree() +{ + ptree pt; + ptree tmp_node; {{#vars}} {{^isContainer}} {{#isPrimitiveType}} + pt.put("{{baseName}}", m_{{name}}); + {{/isPrimitiveType}} + {{^isPrimitiveType}} + {{#isString}} + pt.put("{{baseName}}", m_{{name}}); + {{/isString}} + {{#isDate}} + pt.put("{{baseName}}", m_{{name}}); + {{/isDate}} + {{#isDateTime}} + pt.put("{{baseName}}", m_{{name}}); + {{/isDateTime}} + {{#isModel}} + if (m_{{name}} != nullptr) { + pt.add_child("{{baseName}}", m_{{name}}->toPropertyTree()); + } + {{/isModel}} + {{/isPrimitiveType}} + {{/isContainer}} + {{#isContainer}} + {{^isModelContainer}} + // generate tree for {{name}} + if (!m_{{name}}.empty()) { + for (const auto &childEntry : m_{{name}}) { + ptree {{name}}_node; + {{name}}_node.put("", childEntry); + tmp_node.push_back(std::make_pair("", {{name}}_node)); + } + pt.add_child("{{baseName}}", tmp_node); + tmp_node.clear(); + } + {{/isModelContainer}} + {{#isModelContainer}} + // generate tree for vector of pointers of {{name}} + if (!m_{{name}}.empty()) { + for (const auto &childEntry : m_{{name}}) { + tmp_node.push_back(std::make_pair("", childEntry->toPropertyTree())); + } + pt.add_child("{{baseName}}", tmp_node); + tmp_node.clear(); + } + {{/isModelContainer}} + {{/isContainer}} + {{/vars}} + return pt; +} + +void {{classname}}::fromPropertyTree(ptree const &pt) +{ + ptree tmp_node; + {{#vars}} + {{^isContainer}} + {{^isEnum}} + {{#isPrimitiveType}} m_{{name}} = pt.get("{{baseName}}", {{{defaultValue}}}); {{/isPrimitiveType}} {{^isPrimitiveType}} {{#isString}} m_{{name}} = pt.get("{{baseName}}", {{{defaultValue}}}); {{/isString}} + {{#isDate}} + m_{{name}} = pt.get("{{baseName}}", {{{defaultValue}}}); + {{/isDate}} {{#isDateTime}} m_{{name}} = pt.get("{{baseName}}", {{{defaultValue}}}); {{/isDateTime}} {{/isPrimitiveType}} + {{/isEnum}} + {{#isEnum}} + {{setter}}(pt.get("{{baseName}}", {{{defaultValue}}})); + {{/isEnum}} + {{#isModel}} + if (pt.get_child_optional("{{baseName}}")) { + m_{{name}} = {{{defaultValue}}}; + m_{{name}}->fromPropertyTree(pt.get_child("{{baseName}}")); + } + {{/isModel}} + {{/isContainer}} + {{#isContainer}} + {{^isModelContainer}} + // push all items of {{name}} into member vector + if (pt.get_child_optional("{{baseName}}")) { + for (const auto &childTree : pt.get_child("{{baseName}}")) { + {{#mostInnerItems}} + m_{{name}}.emplace_back({{#isNumeric}}{{^isFloat}}{{^isLong}}{{^isInteger}}std::stod{{/isInteger}}{{/isLong}}{{/isFloat}}{{#isDouble}}std::stod{{/isDouble}}{{#isFloat}}std::stof{{/isFloat}}{{#isInteger}}std::stoi{{/isInteger}}{{#isLong}}std::stol{{/isLong}}({{/isNumeric}}childTree.second.data()){{#isNumeric}}){{/isNumeric}}; + {{/mostInnerItems}} + } + } + {{/isModelContainer}} + {{#isModelContainer}} + // generate new {{complexType}} Object for each item and assign it to the current + if (pt.get_child_optional("{{baseName}}")) { + for (const auto &childTree : pt.get_child("{{baseName}}")) { + {{#mostInnerItems}} + m_{{name}}.emplace_back({{{defaultValue}}}); + m_{{name}}.back()->fromPropertyTree(childTree.second); + {{/mostInnerItems}} + } + } + {{/isModelContainer}} {{/isContainer}} {{/vars}} } @@ -80,7 +181,9 @@ void {{classname}}::fromJsonString(std::string const& jsonString) } void {{classname}}::{{setter}}({{{dataType}}} value) { - m_{{name}} = value; + {{#isEnum}}if (std::find(m_{{enumName}}.begin(), m_{{enumName}}.end(), value) != m_{{enumName}}.end()) { + {{/isEnum}}m_{{name}} = value;{{#isEnum}} + }{{/isEnum}} } {{/vars}} diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/README.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/README.mustache index 56f1b07071..4ac0fb9378 100644 --- a/modules/openapi-generator/src/main/resources/csharp-netcore/README.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/README.mustache @@ -93,28 +93,29 @@ namespace Example public static void Main() { {{#apiInfo}}{{#apis}}{{#-first}}{{#operations}}{{#operation}}{{#-first}} - Configuration.Default.BasePath = "{{{basePath}}}"; + Configuration config = new Configuration(); + config.BasePath = "{{{basePath}}}"; {{#hasAuthMethods}} {{#authMethods}} {{#isBasic}} // Configure HTTP basic authorization: {{{name}}} - Configuration.Default.Username = "YOUR_USERNAME"; - Configuration.Default.Password = "YOUR_PASSWORD"; + config.Username = "YOUR_USERNAME"; + config.Password = "YOUR_PASSWORD"; {{/isBasic}} {{#isApiKey}} // Configure API key authorization: {{{name}}} - Configuration.Default.ApiKey.Add("{{{keyParamName}}}", "YOUR_API_KEY"); + config.ApiKey.Add("{{{keyParamName}}}", "YOUR_API_KEY"); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // Configuration.Default.ApiKeyPrefix.Add("{{{keyParamName}}}", "Bearer"); + // config.ApiKeyPrefix.Add("{{{keyParamName}}}", "Bearer"); {{/isApiKey}} {{#isOAuth}} // Configure OAuth2 access token for authorization: {{{name}}} - Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; + config.AccessToken = "YOUR_ACCESS_TOKEN"; {{/isOAuth}} {{/authMethods}} {{/hasAuthMethods}} - var apiInstance = new {{classname}}(Configuration.Default); + var apiInstance = new {{classname}}(config); {{#allParams}} {{#isPrimitiveType}} var {{paramName}} = {{{example}}}; // {{{dataType}}} | {{{description}}}{{^required}} (optional) {{/required}}{{#defaultValue}} (default to {{{.}}}){{/defaultValue}} diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/api_doc.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/api_doc.mustache index 2eb7c9eb34..544411db91 100644 --- a/modules/openapi-generator/src/main/resources/csharp-netcore/api_doc.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/api_doc.mustache @@ -32,28 +32,29 @@ namespace Example { public static void Main() { - Configuration.Default.BasePath = "{{{basePath}}}"; + Configuration config = new Configuration(); + config.BasePath = "{{{basePath}}}"; {{#hasAuthMethods}} {{#authMethods}} {{#isBasic}} // Configure HTTP basic authorization: {{{name}}} - Configuration.Default.Username = "YOUR_USERNAME"; - Configuration.Default.Password = "YOUR_PASSWORD"; + config.Username = "YOUR_USERNAME"; + config.Password = "YOUR_PASSWORD"; {{/isBasic}} {{#isApiKey}} // Configure API key authorization: {{{name}}} - Configuration.Default.AddApiKey("{{{keyParamName}}}", "YOUR_API_KEY"); + config.AddApiKey("{{{keyParamName}}}", "YOUR_API_KEY"); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // Configuration.Default.AddApiKeyPrefix("{{{keyParamName}}}", "Bearer"); + // config.AddApiKeyPrefix("{{{keyParamName}}}", "Bearer"); {{/isApiKey}} {{#isOAuth}} // Configure OAuth2 access token for authorization: {{{name}}} - Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; + config.AccessToken = "YOUR_ACCESS_TOKEN"; {{/isOAuth}} {{/authMethods}} {{/hasAuthMethods}} - var apiInstance = new {{classname}}(Configuration.Default); + var apiInstance = new {{classname}}(config); {{#allParams}} {{#isPrimitiveType}} var {{paramName}} = {{{example}}}; // {{{dataType}}} | {{{description}}}{{^required}} (optional) {{/required}}{{#defaultValue}} (default to {{{.}}}){{/defaultValue}} diff --git a/modules/openapi-generator/src/main/resources/dart-dio/api.mustache b/modules/openapi-generator/src/main/resources/dart-dio/api.mustache index d09a767408..112fd77f99 100644 --- a/modules/openapi-generator/src/main/resources/dart-dio/api.mustache +++ b/modules/openapi-generator/src/main/resources/dart-dio/api.mustache @@ -23,25 +23,41 @@ class {{classname}} { /// {{notes}} Future{{/returnType}}>{{nickname}}({{#allParams}}{{#required}}{{{dataType}}} {{paramName}},{{/required}}{{/allParams}}{ {{#allParams}}{{^required}}{{{dataType}}} {{paramName}},{{/required}}{{/allParams}}CancelToken cancelToken, Map headers,}) async { - String path = "{{{path}}}"{{#pathParams}}.replaceAll("{" + "{{baseName}}" + "}", {{{paramName}}}.toString()){{/pathParams}}; + String _path = "{{{path}}}"{{#pathParams}}.replaceAll("{" r'{{baseName}}' "}", {{{paramName}}}.toString()){{/pathParams}}; - // query params - Map queryParams = {}; - Map headerParams = Map.from(headers ?? {}); - Map formParams = {}; + Map queryParams = {}; + Map headerParams = Map.from(headers ?? {}); + dynamic bodyData; {{#headerParams}} - headerParams["{{baseName}}"] = {{paramName}}; + headerParams[r'{{baseName}}'] = {{paramName}}; {{/headerParams}} {{#queryParams}} - queryParams["{{baseName}}"] = {{paramName}}; + queryParams[r'{{baseName}}'] = {{paramName}}; {{/queryParams}} - queryParams.removeWhere((key, value) => value == null); - headerParams.removeWhere((key, value) => value == null); - formParams.removeWhere((key, value) => value == null); + queryParams.removeWhere((key, value) => value == null); + headerParams.removeWhere((key, value) => value == null); - List contentTypes = [{{#consumes}} - "{{{mediaType}}}"{{#hasMore}},{{/hasMore}}{{/consumes}}]; + List contentTypes = [{{#consumes}}"{{{mediaType}}}"{{#hasMore}},{{/hasMore}}{{/consumes}}]; + + {{#hasFormParams}} + Map formData = {}; + {{#formParams}} + {{#isMultipart}} + {{^isFile}} + if ({{paramName}} != null) { + formData[r'{{baseName}}'] = parameterToString(_serializers, {{paramName}}); + } + {{/isFile}} + {{#isFile}} + if ({{paramName}} != null) { + formData[r'{{baseName}}'] = MultipartFile.fromBytes({{paramName}}, filename: r'{{baseName}}'); + } + {{/isFile}} + {{/isMultipart}} + {{/formParams}} + bodyData = FormData.fromMap(formData); + {{/hasFormParams}} {{#bodyParam}} {{#isListContainer}} @@ -52,14 +68,13 @@ class {{classname}} { var serializedBody = _serializers.serialize({{paramName}}); {{/isListContainer}} var json{{paramName}} = json.encode(serializedBody); + bodyData = json{{paramName}}; {{/bodyParam}} return _dio.request( - path, + _path, queryParameters: queryParams, - {{#bodyParam}} - data: json{{paramName}}, - {{/bodyParam}} + data: bodyData, options: Options( method: '{{httpMethod}}'.toUpperCase(), headers: headerParams, diff --git a/modules/openapi-generator/src/main/resources/dart-dio/api_util.mustache b/modules/openapi-generator/src/main/resources/dart-dio/api_util.mustache new file mode 100644 index 0000000000..e99530f6c3 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/dart-dio/api_util.mustache @@ -0,0 +1,14 @@ +import 'dart:convert'; + +import 'package:built_value/serializer.dart'; + +/// Format the given parameter object into string. +String parameterToString(Serializers serializers, dynamic value) { + if (value == null) { + return ''; + } else if (value is String || value is num) { + return value.toString(); + } else { + return json.encode(serializers.serialize(value)); + } +} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/dart-dio/apilib.mustache b/modules/openapi-generator/src/main/resources/dart-dio/apilib.mustache index 11690b8c28..77029c3994 100644 --- a/modules/openapi-generator/src/main/resources/dart-dio/apilib.mustache +++ b/modules/openapi-generator/src/main/resources/dart-dio/apilib.mustache @@ -1,6 +1,5 @@ library {{pubName}}.api; -import 'package:http/io_client.dart'; import 'package:dio/dio.dart'; import 'package:built_value/serializer.dart'; import 'package:{{pubName}}/serializers.dart'; @@ -11,7 +10,7 @@ class {{clientName}} { Dio dio; Serializers serializers; - String basePath = "http://petstore.swagger.io/v2"; + String basePath = "{{{basePath}}}"; {{clientName}}({this.dio, Serializers serializers}) { if (dio == null) { diff --git a/modules/openapi-generator/src/main/resources/dart-dio/class.mustache b/modules/openapi-generator/src/main/resources/dart-dio/class.mustache index c7e26935d3..f0df6902f7 100644 --- a/modules/openapi-generator/src/main/resources/dart-dio/class.mustache +++ b/modules/openapi-generator/src/main/resources/dart-dio/class.mustache @@ -10,7 +10,7 @@ abstract class {{classname}} implements Built<{{classname}}, {{classname}}Builde {{#isNullable}} @nullable {{/isNullable}} - @BuiltValueField(wireName: '{{baseName}}') + @BuiltValueField(wireName: r'{{baseName}}') {{{dataType}}} get {{name}}; {{#allowableValues}} {{#min}} // range from {{min}} to {{max}}{{/min}}//{{^min}}enum {{name}}Enum { {{#values}} {{.}}, {{/values}} };{{/min}} diff --git a/modules/openapi-generator/src/main/resources/dart-dio/local_date_serializer.mustache b/modules/openapi-generator/src/main/resources/dart-dio/local_date_serializer.mustache index 2fb73ef0aa..86a9eac68c 100644 --- a/modules/openapi-generator/src/main/resources/dart-dio/local_date_serializer.mustache +++ b/modules/openapi-generator/src/main/resources/dart-dio/local_date_serializer.mustache @@ -2,22 +2,44 @@ import 'package:built_collection/built_collection.dart'; import 'package:built_value/serializer.dart'; import 'package:time_machine/time_machine.dart'; -class LocalDateSerializer implements PrimitiveSerializer { +class OffsetDateSerializer implements PrimitiveSerializer { @override - Iterable get types => BuiltList([LocalDate]); + Iterable get types => BuiltList([OffsetDate]); - @override - String get wireName => "LocalDate"; + @override + String get wireName => "OffsetDate"; - @override - LocalDate deserialize(Serializers serializers, Object serialized, - {FullType specifiedType = FullType.unspecified}) { - return LocalDate.dateTime(DateTime.parse(serialized as String)); - } + @override + OffsetDate deserialize(Serializers serializers, Object serialized, + {FullType specifiedType = FullType.unspecified}) { + final local = LocalDate.dateTime(DateTime.parse(serialized as String)); + return OffsetDate(local, Offset(0)); + } - @override - Object serialize(Serializers serializers, LocalDate localDate, - {FullType specifiedType = FullType.unspecified}) { - return localDate.toString('yyyy-MM-dd'); - } + @override + Object serialize(Serializers serializers, OffsetDate offsetDate, + {FullType specifiedType = FullType.unspecified}) { + return offsetDate.toString('yyyy-MM-dd'); + } +} + +class OffsetDateTimeSerializer implements PrimitiveSerializer { + @override + Iterable get types => BuiltList([OffsetDateTime]); + + @override + String get wireName => "OffsetDateTime"; + + @override + OffsetDateTime deserialize(Serializers serializers, Object serialized, + {FullType specifiedType = FullType.unspecified}) { + final local = LocalDateTime.dateTime(DateTime.parse(serialized as String)); + return OffsetDateTime(local, Offset(0)); + } + + @override + Object serialize(Serializers serializers, OffsetDateTime offsetDateTime, + {FullType specifiedType = FullType.unspecified}) { + return offsetDateTime.toString(); + } } diff --git a/modules/openapi-generator/src/main/resources/dart-dio/serializers.mustache b/modules/openapi-generator/src/main/resources/dart-dio/serializers.mustache index 2d850a28c9..76ebd4a0dc 100644 --- a/modules/openapi-generator/src/main/resources/dart-dio/serializers.mustache +++ b/modules/openapi-generator/src/main/resources/dart-dio/serializers.mustache @@ -4,7 +4,8 @@ import 'package:built_value/serializer.dart'; import 'package:built_collection/built_collection.dart'; import 'package:built_value/json_object.dart'; import 'package:built_value/standard_json_plugin.dart'; -{{#timeMachine}}import 'package:{{pubName}}/local_date_serializer.dart';{{/timeMachine}} +{{#timeMachine}}import 'package:time_machine/time_machine.dart'; +import 'package:{{pubName}}/local_date_serializer.dart';{{/timeMachine}} {{#models}}{{#model}}import 'package:{{pubName}}/model/{{classFilename}}.dart'; {{/model}}{{/models}} @@ -25,4 +26,6 @@ const FullType(BuiltList, const [const FullType({{classname}})]), Serializers standardSerializers = (serializers.toBuilder() -{{#timeMachine}}..add(LocalDateSerializer()){{/timeMachine}}..addPlugin(StandardJsonPlugin())).build(); +{{#timeMachine}}..add(OffsetDateSerializer()) +..add(OffsetDateTimeSerializer()) +{{/timeMachine}}..addPlugin(StandardJsonPlugin())).build(); diff --git a/modules/openapi-generator/src/main/resources/go-experimental/api.mustache b/modules/openapi-generator/src/main/resources/go-experimental/api.mustache index 507fdcfc0c..7d9baf079c 100644 --- a/modules/openapi-generator/src/main/resources/go-experimental/api.mustache +++ b/modules/openapi-generator/src/main/resources/go-experimental/api.mustache @@ -18,115 +18,105 @@ var ( // {{classname}}Service {{classname}} service type {{classname}}Service service -{{#operation}} -{{#hasOptionalParams}} -// {{#structPrefix}}{{&classname}}{{/structPrefix}}{{{nickname}}}Opts Optional parameters for the method '{{{nickname}}}' -type {{#structPrefix}}{{&classname}}{{/structPrefix}}{{{nickname}}}Opts struct { -{{#allParams}} -{{^required}} -{{#isPrimitiveType}} -{{^isBinary}} - {{vendorExtensions.x-exportParamName}} optional.{{vendorExtensions.x-optionalDataType}} -{{/isBinary}} -{{#isBinary}} - {{vendorExtensions.x-exportParamName}} optional.Interface -{{/isBinary}} -{{/isPrimitiveType}} -{{^isPrimitiveType}} - {{vendorExtensions.x-exportParamName}} optional.Interface -{{/isPrimitiveType}} -{{/required}} -{{/allParams}} +{{#operation}} +type api{{operationId}}Request struct { + ctx _context.Context + apiService *{{classname}}Service{{#allParams}} + {{paramName}} {{^isPathParam}}*{{/isPathParam}}{{{dataType}}}{{/allParams}} } -{{/hasOptionalParams}} +{{#allParams}}{{^isPathParam}} +func (r api{{operationId}}Request) {{vendorExtensions.x-exportParamName}}({{paramName}} {{{dataType}}}) api{{operationId}}Request { + r.{{paramName}} = &{{paramName}} + return r +} +{{/isPathParam}}{{/allParams}} /* {{operationId}}{{#summary}} {{{.}}}{{/summary}}{{^summary}} Method for {{operationId}}{{/summary}} {{#notes}} -{{notes}} +{{{unescapedNotes}}} {{/notes}} - * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). -{{#allParams}} -{{#required}} - * @param {{paramName}}{{#description}} {{{.}}}{{/description}} -{{/required}} -{{/allParams}} -{{#hasOptionalParams}} - * @param optional nil or *{{#structPrefix}}{{&classname}}{{/structPrefix}}{{{nickname}}}Opts - Optional Parameters: -{{#allParams}} -{{^required}} - * @param "{{vendorExtensions.x-exportParamName}}" ({{#isPrimitiveType}}{{^isBinary}}optional.{{vendorExtensions.x-optionalDataType}}{{/isBinary}}{{#isBinary}}optional.Interface of {{dataType}}{{/isBinary}}{{/isPrimitiveType}}{{^isPrimitiveType}}optional.Interface of {{dataType}}{{/isPrimitiveType}}) - {{#description}} {{{.}}}{{/description}} -{{/required}} -{{/allParams}} -{{/hasOptionalParams}} -{{#returnType}} -@return {{{returnType}}} -{{/returnType}} + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().{{#pathParams}} + * @param {{paramName}}{{#description}} {{{.}}}{{/description}}{{/pathParams}} +@return api{{operationId}}Request */ -func (a *{{{classname}}}Service) {{{nickname}}}(ctx _context.Context{{#hasParams}}, {{/hasParams}}{{#allParams}}{{#required}}{{paramName}} {{{dataType}}}{{#hasMore}}, {{/hasMore}}{{/required}}{{/allParams}}{{#hasOptionalParams}}localVarOptionals *{{#structPrefix}}{{&classname}}{{/structPrefix}}{{{nickname}}}Opts{{/hasOptionalParams}}) ({{#returnType}}{{{returnType}}}, {{/returnType}}*_nethttp.Response, error) { +func (a *{{{classname}}}Service) {{{nickname}}}(ctx _context.Context{{#pathParams}}, {{paramName}} {{{dataType}}}{{/pathParams}}) api{{operationId}}Request { + return api{{operationId}}Request{ + apiService: a, + ctx: ctx,{{#pathParams}} + {{paramName}}: {{paramName}},{{/pathParams}} + } +} + +/* +Execute executes the request +{{#returnType}} @return {{{.}}}{{/returnType}} +*/ +func (r api{{operationId}}Request) Execute() ({{#returnType}}{{{.}}}, {{/returnType}}*_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.Method{{httpMethod}} localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte - {{#returnType}} - localVarReturnValue {{{returnType}}} - {{/returnType}} + {{#returnType}}localVarReturnValue {{{.}}}{{/returnType}} ) - localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "{{{classname}}}Service.{{{nickname}}}") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "{{{classname}}}Service.{{{nickname}}}") if err != nil { return {{#returnType}}localVarReturnValue, {{/returnType}}nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "{{{path}}}"{{#pathParams}} - localVarPath = strings.Replace(localVarPath, "{"+"{{baseName}}"+"}", _neturl.QueryEscape(parameterToString({{paramName}}, "{{#collectionFormat}}{{collectionFormat}}{{/collectionFormat}}")) , -1){{/pathParams}} + localVarPath = strings.Replace(localVarPath, "{"+"{{baseName}}"+"}", _neturl.QueryEscape(parameterToString(r.{{paramName}}, "{{#collectionFormat}}{{collectionFormat}}{{/collectionFormat}}")) , -1){{/pathParams}} localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} {{#allParams}} - {{#required}} + {{#required}}{{^isPathParam}} + if r.{{paramName}} == nil { + return {{#returnType}}localVarReturnValue, {{/returnType}}nil, reportError("{{paramName}} is required and must be specified") + }{{/isPathParam}} {{#minItems}} - if len({{paramName}}) < {{minItems}} { + if len({{^isPathParam}}*{{/isPathParam}}r.{{paramName}}) < {{minItems}} { return {{#returnType}}localVarReturnValue, {{/returnType}}nil, reportError("{{paramName}} must have at least {{minItems}} elements") } {{/minItems}} {{#maxItems}} - if len({{paramName}}) > {{maxItems}} { + if len({{^isPathParam}}*{{/isPathParam}}r.{{paramName}}) > {{maxItems}} { return {{#returnType}}localVarReturnValue, {{/returnType}}nil, reportError("{{paramName}} must have less than {{maxItems}} elements") } {{/maxItems}} {{#minLength}} - if strlen({{paramName}}) < {{minLength}} { + if strlen({{^isPathParam}}*{{/isPathParam}}r.{{paramName}}) < {{minLength}} { return {{#returnType}}localVarReturnValue, {{/returnType}}nil, reportError("{{paramName}} must have at least {{minLength}} elements") } {{/minLength}} {{#maxLength}} - if strlen({{paramName}}) > {{maxLength}} { + if strlen({{^isPathParam}}*{{/isPathParam}}r.{{paramName}}) > {{maxLength}} { return {{#returnType}}localVarReturnValue, {{/returnType}}nil, reportError("{{paramName}} must have less than {{maxLength}} elements") } {{/maxLength}} {{#minimum}} {{#isString}} - {{paramName}}Txt, err := atoi({{paramName}}) + {{paramName}}Txt, err := atoi({{^isPathParam}}*{{/isPathParam}}r.{{paramName}}) if {{paramName}}Txt < {{minimum}} { {{/isString}} {{^isString}} - if {{paramName}} < {{minimum}} { + if {{^isPathParam}}*{{/isPathParam}}r.{{paramName}} < {{minimum}} { {{/isString}} return {{#returnType}}localVarReturnValue, {{/returnType}}nil, reportError("{{paramName}} must be greater than {{minimum}}") } {{/minimum}} {{#maximum}} {{#isString}} - {{paramName}}Txt, err := atoi({{paramName}}) + {{paramName}}Txt, err := atoi({{^isPathParam}}*{{/isPathParam}}r.{{paramName}}) if {{paramName}}Txt > {{maximum}} { {{/isString}} {{^isString}} - if {{paramName}} > {{maximum}} { + if {{^isPathParam}}*{{/isPathParam}}r.{{paramName}} > {{maximum}} { {{/isString}} return {{#returnType}}localVarReturnValue, {{/returnType}}nil, reportError("{{paramName}} must be less than {{maximum}}") } @@ -134,11 +124,10 @@ func (a *{{{classname}}}Service) {{{nickname}}}(ctx _context.Context{{#hasParams {{/required}} {{/allParams}} - {{#hasQueryParams}} {{#queryParams}} {{#required}} {{#isCollectionFormatMulti}} - t:={{paramName}} + t := *r.{{paramName}} if reflect.TypeOf(t).Kind() == reflect.Slice { s := reflect.ValueOf(t) for i := 0; i < s.Len(); i++ { @@ -149,13 +138,13 @@ func (a *{{{classname}}}Service) {{{nickname}}}(ctx _context.Context{{#hasParams } {{/isCollectionFormatMulti}} {{^isCollectionFormatMulti}} - localVarQueryParams.Add("{{baseName}}", parameterToString({{paramName}}, "{{#collectionFormat}}{{collectionFormat}}{{/collectionFormat}}")) + localVarQueryParams.Add("{{baseName}}", parameterToString(*r.{{paramName}}, "{{#collectionFormat}}{{collectionFormat}}{{/collectionFormat}}")) {{/isCollectionFormatMulti}} {{/required}} {{^required}} - if localVarOptionals != nil && localVarOptionals.{{vendorExtensions.x-exportParamName}}.IsSet() { + if r.{{paramName}} != nil { {{#isCollectionFormatMulti}} - t:=localVarOptionals.{{vendorExtensions.x-exportParamName}}.Value() + t := *r.{{paramName}} if reflect.TypeOf(t).Kind() == reflect.Slice { s := reflect.ValueOf(t) for i := 0; i < s.Len(); i++ { @@ -166,12 +155,11 @@ func (a *{{{classname}}}Service) {{{nickname}}}(ctx _context.Context{{#hasParams } {{/isCollectionFormatMulti}} {{^isCollectionFormatMulti}} - localVarQueryParams.Add("{{baseName}}", parameterToString(localVarOptionals.{{vendorExtensions.x-exportParamName}}.Value(), "{{#collectionFormat}}{{collectionFormat}}{{/collectionFormat}}")) + localVarQueryParams.Add("{{baseName}}", parameterToString(*r.{{paramName}}, "{{#collectionFormat}}{{collectionFormat}}{{/collectionFormat}}")) {{/isCollectionFormatMulti}} } {{/required}} {{/queryParams}} - {{/hasQueryParams}} // to determine the Content-Type header {{=<% %>=}} localVarHTTPContentTypes := []string{<%#consumes%>"<%&mediaType%>"<%^-last%>, <%/-last%><%/consumes%>} @@ -193,33 +181,26 @@ func (a *{{{classname}}}Service) {{{nickname}}}(ctx _context.Context{{#hasParams if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } -{{#hasHeaderParams}} {{#headerParams}} {{#required}} - localVarHeaderParams["{{baseName}}"] = parameterToString({{paramName}}, "{{#collectionFormat}}{{collectionFormat}}{{/collectionFormat}}") + localVarHeaderParams["{{baseName}}"] = parameterToString(*r.{{paramName}}, "{{#collectionFormat}}{{collectionFormat}}{{/collectionFormat}}") {{/required}} {{^required}} - if localVarOptionals != nil && localVarOptionals.{{vendorExtensions.x-exportParamName}}.IsSet() { - localVarHeaderParams["{{baseName}}"] = parameterToString(localVarOptionals.{{vendorExtensions.x-exportParamName}}.Value(), "{{#collectionFormat}}{{collectionFormat}}{{/collectionFormat}}") + if r.{{paramName}} != nil { + localVarHeaderParams["{{baseName}}"] = parameterToString(*r.{{paramName}}, "{{#collectionFormat}}{{collectionFormat}}{{/collectionFormat}}") } {{/required}} {{/headerParams}} -{{/hasHeaderParams}} -{{#hasFormParams}} {{#formParams}} {{#isFile}} localVarFormFileName = "{{baseName}}" {{#required}} - localVarFile := {{paramName}} + localVarFile := *r.{{paramName}} {{/required}} {{^required}} var localVarFile {{dataType}} - if localVarOptionals != nil && localVarOptionals.{{vendorExtensions.x-exportParamName}}.IsSet() { - localVarFileOk := false - localVarFile, localVarFileOk = localVarOptionals.{{vendorExtensions.x-exportParamName}}.Value().({{dataType}}) - if !localVarFileOk { - return {{#returnType}}localVarReturnValue, {{/returnType}}nil, reportError("{{paramName}} should be {{dataType}}") - } + if r.{{paramName}} != nil { + localVarFile = *r.{{paramName}} } {{/required}} if localVarFile != nil { @@ -231,12 +212,12 @@ func (a *{{{classname}}}Service) {{{nickname}}}(ctx _context.Context{{#hasParams {{/isFile}} {{^isFile}} {{#required}} - localVarFormParams.Add("{{baseName}}", parameterToString({{paramName}}, "{{#collectionFormat}}{{collectionFormat}}{{/collectionFormat}}")) + localVarFormParams.Add("{{baseName}}", parameterToString(*r.{{paramName}}, "{{#collectionFormat}}{{collectionFormat}}{{/collectionFormat}}")) {{/required}} {{^required}} {{#isModel}} - if localVarOptionals != nil && localVarOptionals.{{vendorExtensions.x-exportParamName}}.IsSet() { - paramJson, err := parameterToJson(localVarOptionals.{{vendorExtensions.x-exportParamName}}.Value()) + if r.{{paramName}} != nil { + paramJson, err := parameterToJson(*r.{{paramName}}) if err != nil { return {{#returnType}}localVarReturnValue, {{/returnType}}nil, err } @@ -244,43 +225,23 @@ func (a *{{{classname}}}Service) {{{nickname}}}(ctx _context.Context{{#hasParams } {{/isModel}} {{^isModel}} - if localVarOptionals != nil && localVarOptionals.{{vendorExtensions.x-exportParamName}}.IsSet() { - localVarFormParams.Add("{{baseName}}", parameterToString(localVarOptionals.{{vendorExtensions.x-exportParamName}}.Value(), "{{#collectionFormat}}{{collectionFormat}}{{/collectionFormat}}")) + if r.{{paramName}} != nil { + localVarFormParams.Add("{{baseName}}", parameterToString(*r.{{paramName}}, "{{#collectionFormat}}{{collectionFormat}}{{/collectionFormat}}")) } {{/isModel}} {{/required}} {{/isFile}} {{/formParams}} -{{/hasFormParams}} -{{#hasBodyParam}} {{#bodyParams}} // body params -{{#required}} - localVarPostBody = &{{paramName}} -{{/required}} -{{^required}} - if localVarOptionals != nil && localVarOptionals.{{vendorExtensions.x-exportParamName}}.IsSet() { - {{#isPrimitiveType}} - localVarPostBody = localVarOptionals.{{vendorExtensions.x-exportParamName}}.Value() - {{/isPrimitiveType}} - {{^isPrimitiveType}} - localVarOptional{{vendorExtensions.x-exportParamName}}, localVarOptional{{vendorExtensions.x-exportParamName}}ok := localVarOptionals.{{vendorExtensions.x-exportParamName}}.Value().({{{dataType}}}) - if !localVarOptional{{vendorExtensions.x-exportParamName}}ok { - return {{#returnType}}localVarReturnValue, {{/returnType}}nil, reportError("{{paramName}} should be {{dataType}}") - } - localVarPostBody = &localVarOptional{{vendorExtensions.x-exportParamName}} - {{/isPrimitiveType}} - } - -{{/required}} + localVarPostBody = r.{{paramName}} {{/bodyParams}} -{{/hasBodyParam}} {{#authMethods}} {{#isApiKey}} {{^isKeyInCookie}} - if ctx != nil { + if r.ctx != nil { // API Key Authentication - if auth, ok := ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if auth, ok := auth["{{keyParamName}}"]; ok { var key string if auth.Prefix != "" { @@ -300,12 +261,12 @@ func (a *{{{classname}}}Service) {{{nickname}}}(ctx _context.Context{{#hasParams {{/isKeyInCookie}} {{/isApiKey}} {{/authMethods}} - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return {{#returnType}}localVarReturnValue, {{/returnType}}nil, err } - localVarHTTPResponse, err := a.client.callAPI(r) + localVarHTTPResponse, err := r.apiService.client.callAPI(req) if err != nil || localVarHTTPResponse == nil { return {{#returnType}}localVarReturnValue, {{/returnType}}localVarHTTPResponse, err } @@ -327,7 +288,7 @@ func (a *{{{classname}}}Service) {{{nickname}}}(ctx _context.Context{{#hasParams if localVarHTTPResponse.StatusCode == {{{code}}} { {{/wildcard}} var v {{{dataType}}} - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() return {{#returnType}}localVarReturnValue, {{/returnType}}localVarHTTPResponse, newErr @@ -345,7 +306,7 @@ func (a *{{{classname}}}Service) {{{nickname}}}(ctx _context.Context{{#hasParams } {{#returnType}} - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + err = r.apiService.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ body: localVarBody, diff --git a/modules/openapi-generator/src/main/resources/go-experimental/api_doc.mustache b/modules/openapi-generator/src/main/resources/go-experimental/api_doc.mustache index d7eda37d71..6b5c236d39 100644 --- a/modules/openapi-generator/src/main/resources/go-experimental/api_doc.mustache +++ b/modules/openapi-generator/src/main/resources/go-experimental/api_doc.mustache @@ -14,29 +14,28 @@ Method | HTTP request | Description ## {{{operationId}}} -> {{#returnType}}{{{returnType}}} {{/returnType}}{{{operationId}}}(ctx, {{#allParams}}{{#required}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/required}}{{/allParams}}{{#hasOptionalParams}}optional{{/hasOptionalParams}}) +> {{#returnType}}{{{.}}} {{/returnType}}{{{operationId}}}(ctx{{#pathParams}}, {{paramName}}{{/pathParams}}){{#allParams}}{{^isPathParam}}.{{vendorExtensions.x-exportParamName}}({{paramName}}){{/isPathParam}}{{/allParams}}.Execute() {{{summary}}}{{#notes}} -{{{notes}}}{{/notes}} +{{{unespacedNotes}}}{{/notes}} -### Required Parameters +### Path Parameters -{{^allParams}}This endpoint does not need any parameter.{{/allParams}}{{#allParams}}{{#-last}} +{{^allParams}}This endpoint does not need any parameter.{{/allParams}}{{#pathParams}}{{#-last}} Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.{{/-last}}{{/allParams}}{{#allParams}}{{#required}} -**{{paramName}}** | {{#isFile}}**{{dataType}}**{{/isFile}}{{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}{{^isFile}}[**{{dataType}}**]({{baseType}}.md){{/isFile}}{{/isPrimitiveType}}| {{description}} | {{#defaultValue}}[default to {{defaultValue}}]{{/defaultValue}}{{/required}}{{/allParams}}{{#hasOptionalParams}} - **optional** | ***{{{nickname}}}Opts** | optional parameters | nil if no parameters +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.{{/-last}}{{/pathParams}}{{#pathParams}} +**{{paramName}}** | {{^isPrimitiveType}}{{^isFile}}[{{/isFile}}{{/isPrimitiveType}}**{{dataType}}**{{^isPrimitiveType}}{{^isFile}}]({{baseType}}.md){{/isFile}}{{/isPrimitiveType}} | {{description}} | {{#defaultValue}}[default to {{defaultValue}}]{{/defaultValue}}{{/pathParams}} -### Optional Parameters +### Other Parameters -Optional parameters are passed through a pointer to a {{{nickname}}}Opts struct +Other parameters are passed through a pointer to a api{{{nickname}}}Request struct via the builder pattern {{#allParams}}{{#-last}} Name | Type | Description | Notes ------------- | ------------- | ------------- | -------------{{/-last}}{{/allParams}}{{#allParams}} -{{^required}} **{{paramName}}** | {{#isFile}}**optional.Interface of {{dataType}}**{{/isFile}}{{#isPrimitiveType}}**optional.{{vendorExtensions.x-optionalDataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}{{^isFile}}[**optional.Interface of {{dataType}}**]({{baseType}}.md){{/isFile}}{{/isPrimitiveType}}| {{description}} | {{#defaultValue}}[default to {{defaultValue}}]{{/defaultValue}}{{/required}}{{/allParams}}{{/hasOptionalParams}} +{{^isPathParam}} **{{paramName}}** | {{^isPrimitiveType}}{{^isFile}}[{{/isFile}}{{/isPrimitiveType}}**{{dataType}}**{{^isPrimitiveType}}{{^isFile}}]({{baseType}}.md){{/isFile}}{{/isPrimitiveType}} | {{description}} | {{#defaultValue}}[default to {{defaultValue}}]{{/defaultValue}}{{/isPathParam}}{{/allParams}} ### Return type diff --git a/modules/openapi-generator/src/main/resources/go-experimental/configuration.mustache b/modules/openapi-generator/src/main/resources/go-experimental/configuration.mustache index 28f235e694..d7b93eac06 100644 --- a/modules/openapi-generator/src/main/resources/go-experimental/configuration.mustache +++ b/modules/openapi-generator/src/main/resources/go-experimental/configuration.mustache @@ -95,31 +95,31 @@ func NewConfiguration() *Configuration { {{#-first}} Servers: ServerConfigurations{ {{/-first}} - { - URL: "{{{url}}}", - Description: "{{{description}}}{{^description}}No description provided{{/description}}", - {{#variables}} - {{#-first}} - Variables: map[string]ServerVariable{ - {{/-first}} - "{{{name}}}": ServerVariable{ - Description: "{{{description}}}{{^description}}No description provided{{/description}}", - DefaultValue: "{{{defaultValue}}}", - {{#enumValues}} - {{#-first}} - EnumValues: []string{ - {{/-first}} - "{{{.}}}", - {{#-last}} + { + URL: "{{{url}}}", + Description: "{{{description}}}{{^description}}No description provided{{/description}}", + {{#variables}} + {{#-first}} + Variables: map[string]ServerVariable{ + {{/-first}} + "{{{name}}}": ServerVariable{ + Description: "{{{description}}}{{^description}}No description provided{{/description}}", + DefaultValue: "{{{defaultValue}}}", + {{#enumValues}} + {{#-first}} + EnumValues: []string{ + {{/-first}} + "{{{.}}}", + {{#-last}} + }, + {{/-last}} + {{/enumValues}} }, - {{/-last}} - {{/enumValues}} + {{#-last}} }, - {{#-last}} + {{/-last}} + {{/variables}} }, - {{/-last}} - {{/variables}} - }, {{#-last}} }, {{/-last}} diff --git a/modules/openapi-generator/src/main/resources/go/configuration.mustache b/modules/openapi-generator/src/main/resources/go/configuration.mustache index ec28dd024c..b21d2a13a2 100644 --- a/modules/openapi-generator/src/main/resources/go/configuration.mustache +++ b/modules/openapi-generator/src/main/resources/go/configuration.mustache @@ -92,32 +92,33 @@ func NewConfiguration() *Configuration { Debug: false, {{#servers}} {{#-first}} - Servers: []ServerConfiguration{{ + Servers: []ServerConfiguration{ {{/-first}} - Url: "{{{url}}}", - Description: "{{{description}}}{{^description}}No description provided{{/description}}", - {{#variables}} - {{#-first}} - Variables: map[string]ServerVariable{ - {{/-first}} - "{{{name}}}": ServerVariable{ - Description: "{{{description}}}{{^description}}No description provided{{/description}}", - DefaultValue: "{{{defaultValue}}}", - {{#enumValues}} - {{#-first}} - EnumValues: []string{ - {{/-first}} - "{{{.}}}", - {{#-last}} + { + Url: "{{{url}}}", + Description: "{{{description}}}{{^description}}No description provided{{/description}}", + {{#variables}} + {{#-first}} + Variables: map[string]ServerVariable{ + {{/-first}} + "{{{name}}}": ServerVariable{ + Description: "{{{description}}}{{^description}}No description provided{{/description}}", + DefaultValue: "{{{defaultValue}}}", + {{#enumValues}} + {{#-first}} + EnumValues: []string{ + {{/-first}} + "{{{.}}}", + {{#-last}} + }, + {{/-last}} + {{/enumValues}} }, - {{/-last}} - {{/enumValues}} + {{#-last}} }, - {{#-last}} + {{/-last}} + {{/variables}} }, - {{/-last}} - {{/variables}} - }, {{#-last}} }, {{/-last}} diff --git a/modules/openapi-generator/src/main/resources/htmlDocs2/css_bootstrap.mustache b/modules/openapi-generator/src/main/resources/htmlDocs2/css_bootstrap.mustache index f84ec4773f..626b68fa61 100644 --- a/modules/openapi-generator/src/main/resources/htmlDocs2/css_bootstrap.mustache +++ b/modules/openapi-generator/src/main/resources/htmlDocs2/css_bootstrap.mustache @@ -4,7 +4,7 @@ * * Copyright 2013 Twitter, Inc * Licensed under the Apache License v2.0 - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Designed and built with all the love in the world by @mdo and @fat. */.clearfix{*zoom:1}.clearfix:before,.clearfix:after{display:table;line-height:0;content:""}.clearfix:after{clear:both}.hide-text{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.input-block-level{display:block;width:100%;min-height:30px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{display:block}audio,canvas,video{display:inline-block;*display:inline;*zoom:1}audio:not([controls]){display:none}html{font-size:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}a:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}a:hover,a:active{outline:0}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sup{top:-0.5em}sub{bottom:-0.25em}img{width:auto\9;height:auto;max-width:100%;vertical-align:middle;border:0;-ms-interpolation-mode:bicubic}#map_canvas img,.google-maps img{max-width:none}button,input,select,textarea{margin:0;font-size:100%;vertical-align:middle}button,input{*overflow:visible;line-height:normal}button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0}button,html input[type="button"],input[type="reset"],input[type="submit"]{cursor:pointer;-webkit-appearance:button}label,select,button,input[type="button"],input[type="reset"],input[type="submit"],input[type="radio"],input[type="checkbox"]{cursor:pointer}input[type="search"]{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;-webkit-appearance:textfield}input[type="search"]::-webkit-search-decoration,input[type="search"]::-webkit-search-cancel-button{-webkit-appearance:none}textarea{overflow:auto;vertical-align:top}@media print{*{color:#000!important;text-shadow:none!important;background:transparent!important;box-shadow:none!important}a,a:visited{text-decoration:underline}a[href]:after{content:" (" attr(href) ")"}abbr[title]:after{content:" (" attr(title) ")"}.ir a:after,a[href^="javascript:"]:after,a[href^="#"]:after{content:""}pre,blockquote{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}tr,img{page-break-inside:avoid}img{max-width:100%!important}@page{margin:.5cm}p,h2,h3{orphans:3;widows:3}h2,h3{page-break-after:avoid}}body{margin:0;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;line-height:20px;color:#333;background-color:#fff}a{color:#08c;text-decoration:none}a:hover,a:focus{color:#005580;text-decoration:underline}.img-rounded{-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px}.img-polaroid{padding:4px;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,0.2);-webkit-box-shadow:0 1px 3px rgba(0,0,0,0.1);-moz-box-shadow:0 1px 3px rgba(0,0,0,0.1);box-shadow:0 1px 3px rgba(0,0,0,0.1)}.img-circle{-webkit-border-radius:500px;-moz-border-radius:500px;border-radius:500px}.row{margin-left:-20px;*zoom:1}.row:before,.row:after{display:table;line-height:0;content:""}.row:after{clear:both}[class*="span"]{float:left;min-height:1px;margin-left:20px}.container,.navbar-static-top .container,.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:940px}.span12{width:940px}.span11{width:860px}.span10{width:780px}.span9{width:700px}.span8{width:620px}.span7{width:540px}.span6{width:460px}.span5{width:380px}.span4{width:300px}.span3{width:220px}.span2{width:140px}.span1{width:60px}.offset12{margin-left:980px}.offset11{margin-left:900px}.offset10{margin-left:820px}.offset9{margin-left:740px}.offset8{margin-left:660px}.offset7{margin-left:580px}.offset6{margin-left:500px}.offset5{margin-left:420px}.offset4{margin-left:340px}.offset3{margin-left:260px}.offset2{margin-left:180px}.offset1{margin-left:100px}.row-fluid{width:100%;*zoom:1}.row-fluid:before,.row-fluid:after{display:table;line-height:0;content:""}.row-fluid:after{clear:both}.row-fluid [class*="span"]{display:block;float:left;width:100%;min-height:30px;margin-left:2.127659574468085%;*margin-left:2.074468085106383%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.row-fluid [class*="span"]:first-child{margin-left:0}.row-fluid .controls-row [class*="span"]+[class*="span"]{margin-left:2.127659574468085%}.row-fluid .span12{width:100%;*width:99.94680851063829%}.row-fluid .span11{width:91.48936170212765%;*width:91.43617021276594%}.row-fluid .span10{width:82.97872340425532%;*width:82.92553191489361%}.row-fluid .span9{width:74.46808510638297%;*width:74.41489361702126%}.row-fluid .span8{width:65.95744680851064%;*width:65.90425531914893%}.row-fluid .span7{width:57.44680851063829%;*width:57.39361702127659%}.row-fluid .span6{width:48.93617021276595%;*width:48.88297872340425%}.row-fluid .span5{width:40.42553191489362%;*width:40.37234042553192%}.row-fluid .span4{width:31.914893617021278%;*width:31.861702127659576%}.row-fluid .span3{width:23.404255319148934%;*width:23.351063829787233%}.row-fluid .span2{width:14.893617021276595%;*width:14.840425531914894%}.row-fluid .span1{width:6.382978723404255%;*width:6.329787234042553%}.row-fluid .offset12{margin-left:104.25531914893617%;*margin-left:104.14893617021275%}.row-fluid .offset12:first-child{margin-left:102.12765957446808%;*margin-left:102.02127659574467%}.row-fluid .offset11{margin-left:95.74468085106382%;*margin-left:95.6382978723404%}.row-fluid .offset11:first-child{margin-left:93.61702127659574%;*margin-left:93.51063829787232%}.row-fluid .offset10{margin-left:87.23404255319149%;*margin-left:87.12765957446807%}.row-fluid .offset10:first-child{margin-left:85.1063829787234%;*margin-left:84.99999999999999%}.row-fluid .offset9{margin-left:78.72340425531914%;*margin-left:78.61702127659572%}.row-fluid .offset9:first-child{margin-left:76.59574468085106%;*margin-left:76.48936170212764%}.row-fluid .offset8{margin-left:70.2127659574468%;*margin-left:70.10638297872339%}.row-fluid .offset8:first-child{margin-left:68.08510638297872%;*margin-left:67.9787234042553%}.row-fluid .offset7{margin-left:61.70212765957446%;*margin-left:61.59574468085106%}.row-fluid .offset7:first-child{margin-left:59.574468085106375%;*margin-left:59.46808510638297%}.row-fluid .offset6{margin-left:53.191489361702125%;*margin-left:53.085106382978715%}.row-fluid .offset6:first-child{margin-left:51.063829787234035%;*margin-left:50.95744680851063%}.row-fluid .offset5{margin-left:44.68085106382979%;*margin-left:44.57446808510638%}.row-fluid .offset5:first-child{margin-left:42.5531914893617%;*margin-left:42.4468085106383%}.row-fluid .offset4{margin-left:36.170212765957444%;*margin-left:36.06382978723405%}.row-fluid .offset4:first-child{margin-left:34.04255319148936%;*margin-left:33.93617021276596%}.row-fluid .offset3{margin-left:27.659574468085104%;*margin-left:27.5531914893617%}.row-fluid .offset3:first-child{margin-left:25.53191489361702%;*margin-left:25.425531914893618%}.row-fluid .offset2{margin-left:19.148936170212764%;*margin-left:19.04255319148936%}.row-fluid .offset2:first-child{margin-left:17.02127659574468%;*margin-left:16.914893617021278%}.row-fluid .offset1{margin-left:10.638297872340425%;*margin-left:10.53191489361702%}.row-fluid .offset1:first-child{margin-left:8.51063829787234%;*margin-left:8.404255319148938%}[class*="span"].hide,.row-fluid [class*="span"].hide{display:none}[class*="span"].pull-right,.row-fluid [class*="span"].pull-right{float:right}.container{margin-right:auto;margin-left:auto;*zoom:1}.container:before,.container:after{display:table;line-height:0;content:""}.container:after{clear:both}.container-fluid{padding-right:20px;padding-left:20px;*zoom:1}.container-fluid:before,.container-fluid:after{display:table;line-height:0;content:""}.container-fluid:after{clear:both}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:21px;font-weight:200;line-height:30px}small{font-size:85%}strong{font-weight:bold}em{font-style:italic}cite{font-style:normal}.muted{color:#999}a.muted:hover,a.muted:focus{color:#808080}.text-warning{color:#c09853}a.text-warning:hover,a.text-warning:focus{color:#a47e3c}.text-error{color:#b94a48}a.text-error:hover,a.text-error:focus{color:#953b39}.text-info{color:#3a87ad}a.text-info:hover,a.text-info:focus{color:#2d6987}.text-success{color:#468847}a.text-success:hover,a.text-success:focus{color:#356635}.text-left{text-align:left}.text-right{text-align:right}.text-center{text-align:center}h1,h2,h3,h4,h5,h6{margin:10px 0;font-family:inherit;font-weight:bold;line-height:20px;color:inherit;text-rendering:optimizelegibility}h1 small,h2 small,h3 small,h4 small,h5 small,h6 small{font-weight:normal;line-height:1;color:#999}h1,h2,h3{line-height:40px}h1{font-size:38.5px}h2{font-size:31.5px}h3{font-size:24.5px}h4{font-size:17.5px}h5{font-size:14px}h6{font-size:11.9px}h1 small{font-size:24.5px}h2 small{font-size:17.5px}h3 small{font-size:14px}h4 small{font-size:14px}.page-header{padding-bottom:9px;margin:20px 0 30px;border-bottom:1px solid #eee}ul,ol{padding:0;margin:0 0 10px 25px}ul ul,ul ol,ol ol,ol ul{margin-bottom:0}li{line-height:20px}ul.unstyled,ol.unstyled{margin-left:0;list-style:none}ul.inline,ol.inline{margin-left:0;list-style:none}ul.inline>li,ol.inline>li{display:inline-block;*display:inline;padding-right:5px;padding-left:5px;*zoom:1}dl{margin-bottom:20px}dt,dd{line-height:20px}dt{font-weight:bold}dd{margin-left:10px}.dl-horizontal{*zoom:1}.dl-horizontal:before,.dl-horizontal:after{display:table;line-height:0;content:""}.dl-horizontal:after{clear:both}.dl-horizontal dt{float:left;width:160px;overflow:hidden;clear:left;text-align:right;text-overflow:ellipsis;white-space:nowrap}.dl-horizontal dd{margin-left:180px}hr{margin:20px 0;border:0;border-top:1px solid #eee;border-bottom:1px solid #fff}abbr[title],abbr[data-original-title]{cursor:help;border-bottom:1px dotted #999}abbr.initialism{font-size:90%;text-transform:uppercase}blockquote{padding:0 0 0 15px;margin:0 0 20px;border-left:5px solid #eee}blockquote p{margin-bottom:0;font-size:17.5px;font-weight:300;line-height:1.25}blockquote small{display:block;line-height:20px;color:#999}blockquote small:before{content:'\2014 \00A0'}blockquote.pull-right{float:right;padding-right:15px;padding-left:0;border-right:5px solid #eee;border-left:0}blockquote.pull-right p,blockquote.pull-right small{text-align:right}blockquote.pull-right small:before{content:''}blockquote.pull-right small:after{content:'\00A0 \2014'}q:before,q:after,blockquote:before,blockquote:after{content:""}address{display:block;margin-bottom:20px;font-style:normal;line-height:20px}code,pre{padding:0 3px 2px;font-family:Monaco,Menlo,Consolas,"Courier New",monospace;font-size:12px;color:#333;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}code{padding:2px 4px;color:#d14;white-space:nowrap;background-color:#f7f7f9;border:1px solid #e1e1e8}pre{display:block;padding:9.5px;margin:0 0 10px;font-size:13px;line-height:20px;word-break:break-all;word-wrap:break-word;white-space:pre;white-space:pre-wrap;background-color:#f5f5f5;border:1px solid #ccc;border:1px solid rgba(0,0,0,0.15);-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}pre.prettyprint{margin-bottom:20px}pre code{padding:0;color:inherit;white-space:pre;white-space:pre-wrap;background-color:transparent;border:0}.pre-scrollable{max-height:340px;overflow-y:scroll}form{margin:0 0 20px}fieldset{padding:0;margin:0;border:0}legend{display:block;width:100%;padding:0;margin-bottom:20px;font-size:21px;line-height:40px;color:#333;border:0;border-bottom:1px solid #e5e5e5}legend small{font-size:15px;color:#999}label,input,button,select,textarea{font-size:14px;font-weight:normal;line-height:20px}input,button,select,textarea{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif}label{display:block;margin-bottom:5px}select,textarea,input[type="text"],input[type="password"],input[type="datetime"],input[type="datetime-local"],input[type="date"],input[type="month"],input[type="time"],input[type="week"],input[type="number"],input[type="email"],input[type="url"],input[type="search"],input[type="tel"],input[type="color"],.uneditable-input{display:inline-block;height:20px;padding:4px 6px;margin-bottom:10px;font-size:14px;line-height:20px;color:#555;vertical-align:middle;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}input,textarea,.uneditable-input{width:206px}textarea{height:auto}textarea,input[type="text"],input[type="password"],input[type="datetime"],input[type="datetime-local"],input[type="date"],input[type="month"],input[type="time"],input[type="week"],input[type="number"],input[type="email"],input[type="url"],input[type="search"],input[type="tel"],input[type="color"],.uneditable-input{background-color:#fff;border:1px solid #ccc;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-webkit-transition:border linear .2s,box-shadow linear .2s;-moz-transition:border linear .2s,box-shadow linear .2s;-o-transition:border linear .2s,box-shadow linear .2s;transition:border linear .2s,box-shadow linear .2s}textarea:focus,input[type="text"]:focus,input[type="password"]:focus,input[type="datetime"]:focus,input[type="datetime-local"]:focus,input[type="date"]:focus,input[type="month"]:focus,input[type="time"]:focus,input[type="week"]:focus,input[type="number"]:focus,input[type="email"]:focus,input[type="url"]:focus,input[type="search"]:focus,input[type="tel"]:focus,input[type="color"]:focus,.uneditable-input:focus{border-color:rgba(82,168,236,0.8);outline:0;outline:thin dotted \9;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(82,168,236,0.6);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(82,168,236,0.6);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(82,168,236,0.6)}input[type="radio"],input[type="checkbox"]{margin:4px 0 0;margin-top:1px \9;*margin-top:0;line-height:normal}input[type="file"],input[type="image"],input[type="submit"],input[type="reset"],input[type="button"],input[type="radio"],input[type="checkbox"]{width:auto}select,input[type="file"]{height:30px;*margin-top:4px;line-height:30px}select{width:220px;background-color:#fff;border:1px solid #ccc}select[multiple],select[size]{height:auto}select:focus,input[type="file"]:focus,input[type="radio"]:focus,input[type="checkbox"]:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.uneditable-input,.uneditable-textarea{color:#999;cursor:not-allowed;background-color:#fcfcfc;border-color:#ccc;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,0.025);-moz-box-shadow:inset 0 1px 2px rgba(0,0,0,0.025);box-shadow:inset 0 1px 2px rgba(0,0,0,0.025)}.uneditable-input{overflow:hidden;white-space:nowrap}.uneditable-textarea{width:auto;height:auto}input:-moz-placeholder,textarea:-moz-placeholder{color:#999}input:-ms-input-placeholder,textarea:-ms-input-placeholder{color:#999}input::-webkit-input-placeholder,textarea::-webkit-input-placeholder{color:#999}.radio,.checkbox{min-height:20px;padding-left:20px}.radio input[type="radio"],.checkbox input[type="checkbox"]{float:left;margin-left:-20px}.controls>.radio:first-child,.controls>.checkbox:first-child{padding-top:5px}.radio.inline,.checkbox.inline{display:inline-block;padding-top:5px;margin-bottom:0;vertical-align:middle}.radio.inline+.radio.inline,.checkbox.inline+.checkbox.inline{margin-left:10px}.input-mini{width:60px}.input-small{width:90px}.input-medium{width:150px}.input-large{width:210px}.input-xlarge{width:270px}.input-xxlarge{width:530px}input[class*="span"],select[class*="span"],textarea[class*="span"],.uneditable-input[class*="span"],.row-fluid input[class*="span"],.row-fluid select[class*="span"],.row-fluid textarea[class*="span"],.row-fluid .uneditable-input[class*="span"]{float:none;margin-left:0}.input-append input[class*="span"],.input-append .uneditable-input[class*="span"],.input-prepend input[class*="span"],.input-prepend .uneditable-input[class*="span"],.row-fluid input[class*="span"],.row-fluid select[class*="span"],.row-fluid textarea[class*="span"],.row-fluid .uneditable-input[class*="span"],.row-fluid .input-prepend [class*="span"],.row-fluid .input-append [class*="span"]{display:inline-block}input,textarea,.uneditable-input{margin-left:0}.controls-row [class*="span"]+[class*="span"]{margin-left:20px}input.span12,textarea.span12,.uneditable-input.span12{width:926px}input.span11,textarea.span11,.uneditable-input.span11{width:846px}input.span10,textarea.span10,.uneditable-input.span10{width:766px}input.span9,textarea.span9,.uneditable-input.span9{width:686px}input.span8,textarea.span8,.uneditable-input.span8{width:606px}input.span7,textarea.span7,.uneditable-input.span7{width:526px}input.span6,textarea.span6,.uneditable-input.span6{width:446px}input.span5,textarea.span5,.uneditable-input.span5{width:366px}input.span4,textarea.span4,.uneditable-input.span4{width:286px}input.span3,textarea.span3,.uneditable-input.span3{width:206px}input.span2,textarea.span2,.uneditable-input.span2{width:126px}input.span1,textarea.span1,.uneditable-input.span1{width:46px}.controls-row{*zoom:1}.controls-row:before,.controls-row:after{display:table;line-height:0;content:""}.controls-row:after{clear:both}.controls-row [class*="span"],.row-fluid .controls-row [class*="span"]{float:left}.controls-row .checkbox[class*="span"],.controls-row .radio[class*="span"]{padding-top:5px}input[disabled],select[disabled],textarea[disabled],input[readonly],select[readonly],textarea[readonly]{cursor:not-allowed;background-color:#eee}input[type="radio"][disabled],input[type="checkbox"][disabled],input[type="radio"][readonly],input[type="checkbox"][readonly]{background-color:transparent}.control-group.warning .control-label,.control-group.warning .help-block,.control-group.warning .help-inline{color:#c09853}.control-group.warning .checkbox,.control-group.warning .radio,.control-group.warning input,.control-group.warning select,.control-group.warning textarea{color:#c09853}.control-group.warning input,.control-group.warning select,.control-group.warning textarea{border-color:#c09853;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.control-group.warning input:focus,.control-group.warning select:focus,.control-group.warning textarea:focus{border-color:#a47e3c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #dbc59e;-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #dbc59e;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #dbc59e}.control-group.warning .input-prepend .add-on,.control-group.warning .input-append .add-on{color:#c09853;background-color:#fcf8e3;border-color:#c09853}.control-group.error .control-label,.control-group.error .help-block,.control-group.error .help-inline{color:#b94a48}.control-group.error .checkbox,.control-group.error .radio,.control-group.error input,.control-group.error select,.control-group.error textarea{color:#b94a48}.control-group.error input,.control-group.error select,.control-group.error textarea{border-color:#b94a48;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.control-group.error input:focus,.control-group.error select:focus,.control-group.error textarea:focus{border-color:#953b39;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #d59392;-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #d59392;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #d59392}.control-group.error .input-prepend .add-on,.control-group.error .input-append .add-on{color:#b94a48;background-color:#f2dede;border-color:#b94a48}.control-group.success .control-label,.control-group.success .help-block,.control-group.success .help-inline{color:#468847}.control-group.success .checkbox,.control-group.success .radio,.control-group.success input,.control-group.success select,.control-group.success textarea{color:#468847}.control-group.success input,.control-group.success select,.control-group.success textarea{border-color:#468847;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.control-group.success input:focus,.control-group.success select:focus,.control-group.success textarea:focus{border-color:#356635;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #7aba7b;-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #7aba7b;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #7aba7b}.control-group.success .input-prepend .add-on,.control-group.success .input-append .add-on{color:#468847;background-color:#dff0d8;border-color:#468847}.control-group.info .control-label,.control-group.info .help-block,.control-group.info .help-inline{color:#3a87ad}.control-group.info .checkbox,.control-group.info .radio,.control-group.info input,.control-group.info select,.control-group.info textarea{color:#3a87ad}.control-group.info input,.control-group.info select,.control-group.info textarea{border-color:#3a87ad;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.control-group.info input:focus,.control-group.info select:focus,.control-group.info textarea:focus{border-color:#2d6987;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #7ab5d3;-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #7ab5d3;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #7ab5d3}.control-group.info .input-prepend .add-on,.control-group.info .input-append .add-on{color:#3a87ad;background-color:#d9edf7;border-color:#3a87ad}input:focus:invalid,textarea:focus:invalid,select:focus:invalid{color:#b94a48;border-color:#ee5f5b}input:focus:invalid:focus,textarea:focus:invalid:focus,select:focus:invalid:focus{border-color:#e9322d;-webkit-box-shadow:0 0 6px #f8b9b7;-moz-box-shadow:0 0 6px #f8b9b7;box-shadow:0 0 6px #f8b9b7}.form-actions{padding:19px 20px 20px;margin-top:20px;margin-bottom:20px;background-color:#f5f5f5;border-top:1px solid #e5e5e5;*zoom:1}.form-actions:before,.form-actions:after{display:table;line-height:0;content:""}.form-actions:after{clear:both}.help-block,.help-inline{color:#595959}.help-block{display:block;margin-bottom:10px}.help-inline{display:inline-block;*display:inline;padding-left:5px;vertical-align:middle;*zoom:1}.input-append,.input-prepend{display:inline-block;margin-bottom:10px;font-size:0;white-space:nowrap;vertical-align:middle}.input-append input,.input-prepend input,.input-append select,.input-prepend select,.input-append .uneditable-input,.input-prepend .uneditable-input,.input-append .dropdown-menu,.input-prepend .dropdown-menu,.input-append .popover,.input-prepend .popover{font-size:14px}.input-append input,.input-prepend input,.input-append select,.input-prepend select,.input-append .uneditable-input,.input-prepend .uneditable-input{position:relative;margin-bottom:0;*margin-left:0;vertical-align:top;-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0}.input-append input:focus,.input-prepend input:focus,.input-append select:focus,.input-prepend select:focus,.input-append .uneditable-input:focus,.input-prepend .uneditable-input:focus{z-index:2}.input-append .add-on,.input-prepend .add-on{display:inline-block;width:auto;height:20px;min-width:16px;padding:4px 5px;font-size:14px;font-weight:normal;line-height:20px;text-align:center;text-shadow:0 1px 0 #fff;background-color:#eee;border:1px solid #ccc}.input-append .add-on,.input-prepend .add-on,.input-append .btn,.input-prepend .btn,.input-append .btn-group>.dropdown-toggle,.input-prepend .btn-group>.dropdown-toggle{vertical-align:top;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.input-append .active,.input-prepend .active{background-color:#a9dba9;border-color:#46a546}.input-prepend .add-on,.input-prepend .btn{margin-right:-1px}.input-prepend .add-on:first-child,.input-prepend .btn:first-child{-webkit-border-radius:4px 0 0 4px;-moz-border-radius:4px 0 0 4px;border-radius:4px 0 0 4px}.input-append input,.input-append select,.input-append .uneditable-input{-webkit-border-radius:4px 0 0 4px;-moz-border-radius:4px 0 0 4px;border-radius:4px 0 0 4px}.input-append input+.btn-group .btn:last-child,.input-append select+.btn-group .btn:last-child,.input-append .uneditable-input+.btn-group .btn:last-child{-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0}.input-append .add-on,.input-append .btn,.input-append .btn-group{margin-left:-1px}.input-append .add-on:last-child,.input-append .btn:last-child,.input-append .btn-group:last-child>.dropdown-toggle{-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0}.input-prepend.input-append input,.input-prepend.input-append select,.input-prepend.input-append .uneditable-input{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.input-prepend.input-append input+.btn-group .btn,.input-prepend.input-append select+.btn-group .btn,.input-prepend.input-append .uneditable-input+.btn-group .btn{-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0}.input-prepend.input-append .add-on:first-child,.input-prepend.input-append .btn:first-child{margin-right:-1px;-webkit-border-radius:4px 0 0 4px;-moz-border-radius:4px 0 0 4px;border-radius:4px 0 0 4px}.input-prepend.input-append .add-on:last-child,.input-prepend.input-append .btn:last-child{margin-left:-1px;-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0}.input-prepend.input-append .btn-group:first-child{margin-left:0}input.search-query{padding-right:14px;padding-right:4px \9;padding-left:14px;padding-left:4px \9;margin-bottom:0;-webkit-border-radius:15px;-moz-border-radius:15px;border-radius:15px}.form-search .input-append .search-query,.form-search .input-prepend .search-query{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.form-search .input-append .search-query{-webkit-border-radius:14px 0 0 14px;-moz-border-radius:14px 0 0 14px;border-radius:14px 0 0 14px}.form-search .input-append .btn{-webkit-border-radius:0 14px 14px 0;-moz-border-radius:0 14px 14px 0;border-radius:0 14px 14px 0}.form-search .input-prepend .search-query{-webkit-border-radius:0 14px 14px 0;-moz-border-radius:0 14px 14px 0;border-radius:0 14px 14px 0}.form-search .input-prepend .btn{-webkit-border-radius:14px 0 0 14px;-moz-border-radius:14px 0 0 14px;border-radius:14px 0 0 14px}.form-search input,.form-inline input,.form-horizontal input,.form-search textarea,.form-inline textarea,.form-horizontal textarea,.form-search select,.form-inline select,.form-horizontal select,.form-search .help-inline,.form-inline .help-inline,.form-horizontal .help-inline,.form-search .uneditable-input,.form-inline .uneditable-input,.form-horizontal .uneditable-input,.form-search .input-prepend,.form-inline .input-prepend,.form-horizontal .input-prepend,.form-search .input-append,.form-inline .input-append,.form-horizontal .input-append{display:inline-block;*display:inline;margin-bottom:0;vertical-align:middle;*zoom:1}.form-search .hide,.form-inline .hide,.form-horizontal .hide{display:none}.form-search label,.form-inline label,.form-search .btn-group,.form-inline .btn-group{display:inline-block}.form-search .input-append,.form-inline .input-append,.form-search .input-prepend,.form-inline .input-prepend{margin-bottom:0}.form-search .radio,.form-search .checkbox,.form-inline .radio,.form-inline .checkbox{padding-left:0;margin-bottom:0;vertical-align:middle}.form-search .radio input[type="radio"],.form-search .checkbox input[type="checkbox"],.form-inline .radio input[type="radio"],.form-inline .checkbox input[type="checkbox"]{float:left;margin-right:3px;margin-left:0}.control-group{margin-bottom:10px}legend+.control-group{margin-top:20px;-webkit-margin-top-collapse:separate}.form-horizontal .control-group{margin-bottom:20px;*zoom:1}.form-horizontal .control-group:before,.form-horizontal .control-group:after{display:table;line-height:0;content:""}.form-horizontal .control-group:after{clear:both}.form-horizontal .control-label{float:left;width:160px;padding-top:5px;text-align:right}.form-horizontal .controls{*display:inline-block;*padding-left:20px;margin-left:180px;*margin-left:0}.form-horizontal .controls:first-child{*padding-left:180px}.form-horizontal .help-block{margin-bottom:0}.form-horizontal input+.help-block,.form-horizontal select+.help-block,.form-horizontal textarea+.help-block,.form-horizontal .uneditable-input+.help-block,.form-horizontal .input-prepend+.help-block,.form-horizontal .input-append+.help-block{margin-top:10px}.form-horizontal .form-actions{padding-left:180px}table{max-width:100%;background-color:transparent;border-collapse:collapse;border-spacing:0}.table{width:100%;margin-bottom:20px}.table th,.table td{padding:8px;line-height:20px;text-align:left;vertical-align:top;border-top:1px solid #ddd}.table th{font-weight:bold}.table thead th{vertical-align:bottom}.table caption+thead tr:first-child th,.table caption+thead tr:first-child td,.table colgroup+thead tr:first-child th,.table colgroup+thead tr:first-child td,.table thead:first-child tr:first-child th,.table thead:first-child tr:first-child td{border-top:0}.table tbody+tbody{border-top:2px solid #ddd}.table .table{background-color:#fff}.table-condensed th,.table-condensed td{padding:4px 5px}.table-bordered{border:1px solid #ddd;border-collapse:separate;*border-collapse:collapse;border-left:0;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.table-bordered th,.table-bordered td{border-left:1px solid #ddd}.table-bordered caption+thead tr:first-child th,.table-bordered caption+tbody tr:first-child th,.table-bordered caption+tbody tr:first-child td,.table-bordered colgroup+thead tr:first-child th,.table-bordered colgroup+tbody tr:first-child th,.table-bordered colgroup+tbody tr:first-child td,.table-bordered thead:first-child tr:first-child th,.table-bordered tbody:first-child tr:first-child th,.table-bordered tbody:first-child tr:first-child td{border-top:0}.table-bordered thead:first-child tr:first-child>th:first-child,.table-bordered tbody:first-child tr:first-child>td:first-child,.table-bordered tbody:first-child tr:first-child>th:first-child{-webkit-border-top-left-radius:4px;border-top-left-radius:4px;-moz-border-radius-topleft:4px}.table-bordered thead:first-child tr:first-child>th:last-child,.table-bordered tbody:first-child tr:first-child>td:last-child,.table-bordered tbody:first-child tr:first-child>th:last-child{-webkit-border-top-right-radius:4px;border-top-right-radius:4px;-moz-border-radius-topright:4px}.table-bordered thead:last-child tr:last-child>th:first-child,.table-bordered tbody:last-child tr:last-child>td:first-child,.table-bordered tbody:last-child tr:last-child>th:first-child,.table-bordered tfoot:last-child tr:last-child>td:first-child,.table-bordered tfoot:last-child tr:last-child>th:first-child{-webkit-border-bottom-left-radius:4px;border-bottom-left-radius:4px;-moz-border-radius-bottomleft:4px}.table-bordered thead:last-child tr:last-child>th:last-child,.table-bordered tbody:last-child tr:last-child>td:last-child,.table-bordered tbody:last-child tr:last-child>th:last-child,.table-bordered tfoot:last-child tr:last-child>td:last-child,.table-bordered tfoot:last-child tr:last-child>th:last-child{-webkit-border-bottom-right-radius:4px;border-bottom-right-radius:4px;-moz-border-radius-bottomright:4px}.table-bordered tfoot+tbody:last-child tr:last-child td:first-child{-webkit-border-bottom-left-radius:0;border-bottom-left-radius:0;-moz-border-radius-bottomleft:0}.table-bordered tfoot+tbody:last-child tr:last-child td:last-child{-webkit-border-bottom-right-radius:0;border-bottom-right-radius:0;-moz-border-radius-bottomright:0}.table-bordered caption+thead tr:first-child th:first-child,.table-bordered caption+tbody tr:first-child td:first-child,.table-bordered colgroup+thead tr:first-child th:first-child,.table-bordered colgroup+tbody tr:first-child td:first-child{-webkit-border-top-left-radius:4px;border-top-left-radius:4px;-moz-border-radius-topleft:4px}.table-bordered caption+thead tr:first-child th:last-child,.table-bordered caption+tbody tr:first-child td:last-child,.table-bordered colgroup+thead tr:first-child th:last-child,.table-bordered colgroup+tbody tr:first-child td:last-child{-webkit-border-top-right-radius:4px;border-top-right-radius:4px;-moz-border-radius-topright:4px}.table-striped tbody>tr:nth-child(odd)>td,.table-striped tbody>tr:nth-child(odd)>th{background-color:#f9f9f9}.table-hover tbody tr:hover>td,.table-hover tbody tr:hover>th{background-color:#f5f5f5}table td[class*="span"],table th[class*="span"],.row-fluid table td[class*="span"],.row-fluid table th[class*="span"]{display:table-cell;float:none;margin-left:0}.table td.span1,.table th.span1{float:none;width:44px;margin-left:0}.table td.span2,.table th.span2{float:none;width:124px;margin-left:0}.table td.span3,.table th.span3{float:none;width:204px;margin-left:0}.table td.span4,.table th.span4{float:none;width:284px;margin-left:0}.table td.span5,.table th.span5{float:none;width:364px;margin-left:0}.table td.span6,.table th.span6{float:none;width:444px;margin-left:0}.table td.span7,.table th.span7{float:none;width:524px;margin-left:0}.table td.span8,.table th.span8{float:none;width:604px;margin-left:0}.table td.span9,.table th.span9{float:none;width:684px;margin-left:0}.table td.span10,.table th.span10{float:none;width:764px;margin-left:0}.table td.span11,.table th.span11{float:none;width:844px;margin-left:0}.table td.span12,.table th.span12{float:none;width:924px;margin-left:0}.table tbody tr.success>td{background-color:#dff0d8}.table tbody tr.error>td{background-color:#f2dede}.table tbody tr.warning>td{background-color:#fcf8e3}.table tbody tr.info>td{background-color:#d9edf7}.table-hover tbody tr.success:hover>td{background-color:#d0e9c6}.table-hover tbody tr.error:hover>td{background-color:#ebcccc}.table-hover tbody tr.warning:hover>td{background-color:#faf2cc}.table-hover tbody tr.info:hover>td{background-color:#c4e3f3}[class^="icon-"],[class*=" icon-"]{display:inline-block;width:14px;height:14px;margin-top:1px;*margin-right:.3em;line-height:14px;vertical-align:text-top;background-image:url("../img/glyphicons-halflings.png");background-position:14px 14px;background-repeat:no-repeat}.icon-white,.nav-pills>.active>a>[class^="icon-"],.nav-pills>.active>a>[class*=" icon-"],.nav-list>.active>a>[class^="icon-"],.nav-list>.active>a>[class*=" icon-"],.navbar-inverse .nav>.active>a>[class^="icon-"],.navbar-inverse .nav>.active>a>[class*=" icon-"],.dropdown-menu>li>a:hover>[class^="icon-"],.dropdown-menu>li>a:focus>[class^="icon-"],.dropdown-menu>li>a:hover>[class*=" icon-"],.dropdown-menu>li>a:focus>[class*=" icon-"],.dropdown-menu>.active>a>[class^="icon-"],.dropdown-menu>.active>a>[class*=" icon-"],.dropdown-submenu:hover>a>[class^="icon-"],.dropdown-submenu:focus>a>[class^="icon-"],.dropdown-submenu:hover>a>[class*=" icon-"],.dropdown-submenu:focus>a>[class*=" icon-"]{background-image:url("../img/glyphicons-halflings-white.png")}.icon-glass{background-position:0 0}.icon-music{background-position:-24px 0}.icon-search{background-position:-48px 0}.icon-envelope{background-position:-72px 0}.icon-heart{background-position:-96px 0}.icon-star{background-position:-120px 0}.icon-star-empty{background-position:-144px 0}.icon-user{background-position:-168px 0}.icon-film{background-position:-192px 0}.icon-th-large{background-position:-216px 0}.icon-th{background-position:-240px 0}.icon-th-list{background-position:-264px 0}.icon-ok{background-position:-288px 0}.icon-remove{background-position:-312px 0}.icon-zoom-in{background-position:-336px 0}.icon-zoom-out{background-position:-360px 0}.icon-off{background-position:-384px 0}.icon-signal{background-position:-408px 0}.icon-cog{background-position:-432px 0}.icon-trash{background-position:-456px 0}.icon-home{background-position:0 -24px}.icon-file{background-position:-24px -24px}.icon-time{background-position:-48px -24px}.icon-road{background-position:-72px -24px}.icon-download-alt{background-position:-96px -24px}.icon-download{background-position:-120px -24px}.icon-upload{background-position:-144px -24px}.icon-inbox{background-position:-168px -24px}.icon-play-circle{background-position:-192px -24px}.icon-repeat{background-position:-216px -24px}.icon-refresh{background-position:-240px -24px}.icon-list-alt{background-position:-264px -24px}.icon-lock{background-position:-287px -24px}.icon-flag{background-position:-312px -24px}.icon-headphones{background-position:-336px -24px}.icon-volume-off{background-position:-360px -24px}.icon-volume-down{background-position:-384px -24px}.icon-volume-up{background-position:-408px -24px}.icon-qrcode{background-position:-432px -24px}.icon-barcode{background-position:-456px -24px}.icon-tag{background-position:0 -48px}.icon-tags{background-position:-25px -48px}.icon-book{background-position:-48px -48px}.icon-bookmark{background-position:-72px -48px}.icon-print{background-position:-96px -48px}.icon-camera{background-position:-120px -48px}.icon-font{background-position:-144px -48px}.icon-bold{background-position:-167px -48px}.icon-italic{background-position:-192px -48px}.icon-text-height{background-position:-216px -48px}.icon-text-width{background-position:-240px -48px}.icon-align-left{background-position:-264px -48px}.icon-align-center{background-position:-288px -48px}.icon-align-right{background-position:-312px -48px}.icon-align-justify{background-position:-336px -48px}.icon-list{background-position:-360px -48px}.icon-indent-left{background-position:-384px -48px}.icon-indent-right{background-position:-408px -48px}.icon-facetime-video{background-position:-432px -48px}.icon-picture{background-position:-456px -48px}.icon-pencil{background-position:0 -72px}.icon-map-marker{background-position:-24px -72px}.icon-adjust{background-position:-48px -72px}.icon-tint{background-position:-72px -72px}.icon-edit{background-position:-96px -72px}.icon-share{background-position:-120px -72px}.icon-check{background-position:-144px -72px}.icon-move{background-position:-168px -72px}.icon-step-backward{background-position:-192px -72px}.icon-fast-backward{background-position:-216px -72px}.icon-backward{background-position:-240px -72px}.icon-play{background-position:-264px -72px}.icon-pause{background-position:-288px -72px}.icon-stop{background-position:-312px -72px}.icon-forward{background-position:-336px -72px}.icon-fast-forward{background-position:-360px -72px}.icon-step-forward{background-position:-384px -72px}.icon-eject{background-position:-408px -72px}.icon-chevron-left{background-position:-432px -72px}.icon-chevron-right{background-position:-456px -72px}.icon-plus-sign{background-position:0 -96px}.icon-minus-sign{background-position:-24px -96px}.icon-remove-sign{background-position:-48px -96px}.icon-ok-sign{background-position:-72px -96px}.icon-question-sign{background-position:-96px -96px}.icon-info-sign{background-position:-120px -96px}.icon-screenshot{background-position:-144px -96px}.icon-remove-circle{background-position:-168px -96px}.icon-ok-circle{background-position:-192px -96px}.icon-ban-circle{background-position:-216px -96px}.icon-arrow-left{background-position:-240px -96px}.icon-arrow-right{background-position:-264px -96px}.icon-arrow-up{background-position:-289px -96px}.icon-arrow-down{background-position:-312px -96px}.icon-share-alt{background-position:-336px -96px}.icon-resize-full{background-position:-360px -96px}.icon-resize-small{background-position:-384px -96px}.icon-plus{background-position:-408px -96px}.icon-minus{background-position:-433px -96px}.icon-asterisk{background-position:-456px -96px}.icon-exclamation-sign{background-position:0 -120px}.icon-gift{background-position:-24px -120px}.icon-leaf{background-position:-48px -120px}.icon-fire{background-position:-72px -120px}.icon-eye-open{background-position:-96px -120px}.icon-eye-close{background-position:-120px -120px}.icon-warning-sign{background-position:-144px -120px}.icon-plane{background-position:-168px -120px}.icon-calendar{background-position:-192px -120px}.icon-random{width:16px;background-position:-216px -120px}.icon-comment{background-position:-240px -120px}.icon-magnet{background-position:-264px -120px}.icon-chevron-up{background-position:-288px -120px}.icon-chevron-down{background-position:-313px -119px}.icon-retweet{background-position:-336px -120px}.icon-shopping-cart{background-position:-360px -120px}.icon-folder-close{width:16px;background-position:-384px -120px}.icon-folder-open{width:16px;background-position:-408px -120px}.icon-resize-vertical{background-position:-432px -119px}.icon-resize-horizontal{background-position:-456px -118px}.icon-hdd{background-position:0 -144px}.icon-bullhorn{background-position:-24px -144px}.icon-bell{background-position:-48px -144px}.icon-certificate{background-position:-72px -144px}.icon-thumbs-up{background-position:-96px -144px}.icon-thumbs-down{background-position:-120px -144px}.icon-hand-right{background-position:-144px -144px}.icon-hand-left{background-position:-168px -144px}.icon-hand-up{background-position:-192px -144px}.icon-hand-down{background-position:-216px -144px}.icon-circle-arrow-right{background-position:-240px -144px}.icon-circle-arrow-left{background-position:-264px -144px}.icon-circle-arrow-up{background-position:-288px -144px}.icon-circle-arrow-down{background-position:-312px -144px}.icon-globe{background-position:-336px -144px}.icon-wrench{background-position:-360px -144px}.icon-tasks{background-position:-384px -144px}.icon-filter{background-position:-408px -144px}.icon-briefcase{background-position:-432px -144px}.icon-fullscreen{background-position:-456px -144px}.dropup,.dropdown{position:relative}.dropdown-toggle{*margin-bottom:-3px}.dropdown-toggle:active,.open .dropdown-toggle{outline:0}.caret{display:inline-block;width:0;height:0;vertical-align:top;border-top:4px solid #000;border-right:4px solid transparent;border-left:4px solid transparent;content:""}.dropdown .caret{margin-top:8px;margin-left:2px}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;list-style:none;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,0.2);*border-right-width:2px;*border-bottom-width:2px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,0.2);-moz-box-shadow:0 5px 10px rgba(0,0,0,0.2);box-shadow:0 5px 10px rgba(0,0,0,0.2);-webkit-background-clip:padding-box;-moz-background-clip:padding;background-clip:padding-box}.dropdown-menu.pull-right{right:0;left:auto}.dropdown-menu .divider{*width:100%;height:1px;margin:9px 1px;*margin:-5px 0 5px;overflow:hidden;background-color:#e5e5e5;border-bottom:1px solid #fff}.dropdown-menu>li>a{display:block;padding:3px 20px;clear:both;font-weight:normal;line-height:20px;color:#333;white-space:nowrap}.dropdown-menu>li>a:hover,.dropdown-menu>li>a:focus,.dropdown-submenu:hover>a,.dropdown-submenu:focus>a{color:#fff;text-decoration:none;background-color:#0081c2;background-image:-moz-linear-gradient(top,#08c,#0077b3);background-image:-webkit-gradient(linear,0 0,0 100%,from(#08c),to(#0077b3));background-image:-webkit-linear-gradient(top,#08c,#0077b3);background-image:-o-linear-gradient(top,#08c,#0077b3);background-image:linear-gradient(to bottom,#08c,#0077b3);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc',endColorstr='#ff0077b3',GradientType=0)}.dropdown-menu>.active>a,.dropdown-menu>.active>a:hover,.dropdown-menu>.active>a:focus{color:#fff;text-decoration:none;background-color:#0081c2;background-image:-moz-linear-gradient(top,#08c,#0077b3);background-image:-webkit-gradient(linear,0 0,0 100%,from(#08c),to(#0077b3));background-image:-webkit-linear-gradient(top,#08c,#0077b3);background-image:-o-linear-gradient(top,#08c,#0077b3);background-image:linear-gradient(to bottom,#08c,#0077b3);background-repeat:repeat-x;outline:0;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc',endColorstr='#ff0077b3',GradientType=0)}.dropdown-menu>.disabled>a,.dropdown-menu>.disabled>a:hover,.dropdown-menu>.disabled>a:focus{color:#999}.dropdown-menu>.disabled>a:hover,.dropdown-menu>.disabled>a:focus{text-decoration:none;cursor:default;background-color:transparent;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.open{*z-index:1000}.open>.dropdown-menu{display:block}.dropdown-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:990}.pull-right>.dropdown-menu{right:0;left:auto}.dropup .caret,.navbar-fixed-bottom .dropdown .caret{border-top:0;border-bottom:4px solid #000;content:""}.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:1px}.dropdown-submenu{position:relative}.dropdown-submenu>.dropdown-menu{top:0;left:100%;margin-top:-6px;margin-left:-1px;-webkit-border-radius:0 6px 6px 6px;-moz-border-radius:0 6px 6px 6px;border-radius:0 6px 6px 6px}.dropdown-submenu:hover>.dropdown-menu{display:block}.dropup .dropdown-submenu>.dropdown-menu{top:auto;bottom:0;margin-top:0;margin-bottom:-2px;-webkit-border-radius:5px 5px 5px 0;-moz-border-radius:5px 5px 5px 0;border-radius:5px 5px 5px 0}.dropdown-submenu>a:after{display:block;float:right;width:0;height:0;margin-top:5px;margin-right:-10px;border-color:transparent;border-left-color:#ccc;border-style:solid;border-width:5px 0 5px 5px;content:" "}.dropdown-submenu:hover>a:after{border-left-color:#fff}.dropdown-submenu.pull-left{float:none}.dropdown-submenu.pull-left>.dropdown-menu{left:-100%;margin-left:10px;-webkit-border-radius:6px 0 6px 6px;-moz-border-radius:6px 0 6px 6px;border-radius:6px 0 6px 6px}.dropdown .dropdown-menu .nav-header{padding-right:20px;padding-left:20px}.typeahead{z-index:1051;margin-top:2px;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #e3e3e3;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.05);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.05);box-shadow:inset 0 1px 1px rgba(0,0,0,0.05)}.well blockquote{border-color:#ddd;border-color:rgba(0,0,0,0.15)}.well-large{padding:24px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px}.well-small{padding:9px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.fade{opacity:0;-webkit-transition:opacity .15s linear;-moz-transition:opacity .15s linear;-o-transition:opacity .15s linear;transition:opacity .15s linear}.fade.in{opacity:1}.collapse{position:relative;height:0;overflow:hidden;-webkit-transition:height .35s ease;-moz-transition:height .35s ease;-o-transition:height .35s ease;transition:height .35s ease}.collapse.in{height:auto}.close{float:right;font-size:20px;font-weight:bold;line-height:20px;color:#000;text-shadow:0 1px 0 #fff;opacity:.2;filter:alpha(opacity=20)}.close:hover,.close:focus{color:#000;text-decoration:none;cursor:pointer;opacity:.4;filter:alpha(opacity=40)}button.close{padding:0;cursor:pointer;background:transparent;border:0;-webkit-appearance:none}.btn{display:inline-block;*display:inline;padding:4px 12px;margin-bottom:0;*margin-left:.3em;font-size:14px;line-height:20px;color:#333;text-align:center;text-shadow:0 1px 1px rgba(255,255,255,0.75);vertical-align:middle;cursor:pointer;background-color:#f5f5f5;*background-color:#e6e6e6;background-image:-moz-linear-gradient(top,#fff,#e6e6e6);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fff),to(#e6e6e6));background-image:-webkit-linear-gradient(top,#fff,#e6e6e6);background-image:-o-linear-gradient(top,#fff,#e6e6e6);background-image:linear-gradient(to bottom,#fff,#e6e6e6);background-repeat:repeat-x;border:1px solid #ccc;*border:0;border-color:#e6e6e6 #e6e6e6 #bfbfbf;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);border-bottom-color:#b3b3b3;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff',endColorstr='#ffe6e6e6',GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);*zoom:1;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);box-shadow:inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05)}.btn:hover,.btn:focus,.btn:active,.btn.active,.btn.disabled,.btn[disabled]{color:#333;background-color:#e6e6e6;*background-color:#d9d9d9}.btn:active,.btn.active{background-color:#ccc \9}.btn:first-child{*margin-left:0}.btn:hover,.btn:focus{color:#333;text-decoration:none;background-position:0 -15px;-webkit-transition:background-position .1s linear;-moz-transition:background-position .1s linear;-o-transition:background-position .1s linear;transition:background-position .1s linear}.btn:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.btn.active,.btn:active{background-image:none;outline:0;-webkit-box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05);-moz-box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05);box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05)}.btn.disabled,.btn[disabled]{cursor:default;background-image:none;opacity:.65;filter:alpha(opacity=65);-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.btn-large{padding:11px 19px;font-size:17.5px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px}.btn-large [class^="icon-"],.btn-large [class*=" icon-"]{margin-top:4px}.btn-small{padding:2px 10px;font-size:11.9px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.btn-small [class^="icon-"],.btn-small [class*=" icon-"]{margin-top:0}.btn-mini [class^="icon-"],.btn-mini [class*=" icon-"]{margin-top:-1px}.btn-mini{padding:0 6px;font-size:10.5px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.btn-block{display:block;width:100%;padding-right:0;padding-left:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.btn-block+.btn-block{margin-top:5px}input[type="submit"].btn-block,input[type="reset"].btn-block,input[type="button"].btn-block{width:100%}.btn-primary.active,.btn-warning.active,.btn-danger.active,.btn-success.active,.btn-info.active,.btn-inverse.active{color:rgba(255,255,255,0.75)}.btn-primary{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#006dcc;*background-color:#04c;background-image:-moz-linear-gradient(top,#08c,#04c);background-image:-webkit-gradient(linear,0 0,0 100%,from(#08c),to(#04c));background-image:-webkit-linear-gradient(top,#08c,#04c);background-image:-o-linear-gradient(top,#08c,#04c);background-image:linear-gradient(to bottom,#08c,#04c);background-repeat:repeat-x;border-color:#04c #04c #002a80;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc',endColorstr='#ff0044cc',GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-primary:hover,.btn-primary:focus,.btn-primary:active,.btn-primary.active,.btn-primary.disabled,.btn-primary[disabled]{color:#fff;background-color:#04c;*background-color:#003bb3}.btn-primary:active,.btn-primary.active{background-color:#039 \9}.btn-warning{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#faa732;*background-color:#f89406;background-image:-moz-linear-gradient(top,#fbb450,#f89406);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fbb450),to(#f89406));background-image:-webkit-linear-gradient(top,#fbb450,#f89406);background-image:-o-linear-gradient(top,#fbb450,#f89406);background-image:linear-gradient(to bottom,#fbb450,#f89406);background-repeat:repeat-x;border-color:#f89406 #f89406 #ad6704;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffbb450',endColorstr='#fff89406',GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-warning:hover,.btn-warning:focus,.btn-warning:active,.btn-warning.active,.btn-warning.disabled,.btn-warning[disabled]{color:#fff;background-color:#f89406;*background-color:#df8505}.btn-warning:active,.btn-warning.active{background-color:#c67605 \9}.btn-danger{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#da4f49;*background-color:#bd362f;background-image:-moz-linear-gradient(top,#ee5f5b,#bd362f);background-image:-webkit-gradient(linear,0 0,0 100%,from(#ee5f5b),to(#bd362f));background-image:-webkit-linear-gradient(top,#ee5f5b,#bd362f);background-image:-o-linear-gradient(top,#ee5f5b,#bd362f);background-image:linear-gradient(to bottom,#ee5f5b,#bd362f);background-repeat:repeat-x;border-color:#bd362f #bd362f #802420;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffee5f5b',endColorstr='#ffbd362f',GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-danger:hover,.btn-danger:focus,.btn-danger:active,.btn-danger.active,.btn-danger.disabled,.btn-danger[disabled]{color:#fff;background-color:#bd362f;*background-color:#a9302a}.btn-danger:active,.btn-danger.active{background-color:#942a25 \9}.btn-success{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#5bb75b;*background-color:#51a351;background-image:-moz-linear-gradient(top,#62c462,#51a351);background-image:-webkit-gradient(linear,0 0,0 100%,from(#62c462),to(#51a351));background-image:-webkit-linear-gradient(top,#62c462,#51a351);background-image:-o-linear-gradient(top,#62c462,#51a351);background-image:linear-gradient(to bottom,#62c462,#51a351);background-repeat:repeat-x;border-color:#51a351 #51a351 #387038;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff62c462',endColorstr='#ff51a351',GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-success:hover,.btn-success:focus,.btn-success:active,.btn-success.active,.btn-success.disabled,.btn-success[disabled]{color:#fff;background-color:#51a351;*background-color:#499249}.btn-success:active,.btn-success.active{background-color:#408140 \9}.btn-info{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#49afcd;*background-color:#2f96b4;background-image:-moz-linear-gradient(top,#5bc0de,#2f96b4);background-image:-webkit-gradient(linear,0 0,0 100%,from(#5bc0de),to(#2f96b4));background-image:-webkit-linear-gradient(top,#5bc0de,#2f96b4);background-image:-o-linear-gradient(top,#5bc0de,#2f96b4);background-image:linear-gradient(to bottom,#5bc0de,#2f96b4);background-repeat:repeat-x;border-color:#2f96b4 #2f96b4 #1f6377;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de',endColorstr='#ff2f96b4',GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-info:hover,.btn-info:focus,.btn-info:active,.btn-info.active,.btn-info.disabled,.btn-info[disabled]{color:#fff;background-color:#2f96b4;*background-color:#2a85a0}.btn-info:active,.btn-info.active{background-color:#24748c \9}.btn-inverse{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#363636;*background-color:#222;background-image:-moz-linear-gradient(top,#444,#222);background-image:-webkit-gradient(linear,0 0,0 100%,from(#444),to(#222));background-image:-webkit-linear-gradient(top,#444,#222);background-image:-o-linear-gradient(top,#444,#222);background-image:linear-gradient(to bottom,#444,#222);background-repeat:repeat-x;border-color:#222 #222 #000;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff444444',endColorstr='#ff222222',GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-inverse:hover,.btn-inverse:focus,.btn-inverse:active,.btn-inverse.active,.btn-inverse.disabled,.btn-inverse[disabled]{color:#fff;background-color:#222;*background-color:#151515}.btn-inverse:active,.btn-inverse.active{background-color:#080808 \9}button.btn,input[type="submit"].btn{*padding-top:3px;*padding-bottom:3px}button.btn::-moz-focus-inner,input[type="submit"].btn::-moz-focus-inner{padding:0;border:0}button.btn.btn-large,input[type="submit"].btn.btn-large{*padding-top:7px;*padding-bottom:7px}button.btn.btn-small,input[type="submit"].btn.btn-small{*padding-top:3px;*padding-bottom:3px}button.btn.btn-mini,input[type="submit"].btn.btn-mini{*padding-top:1px;*padding-bottom:1px}.btn-link,.btn-link:active,.btn-link[disabled]{background-color:transparent;background-image:none;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.btn-link{color:#08c;cursor:pointer;border-color:transparent;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.btn-link:hover,.btn-link:focus{color:#005580;text-decoration:underline;background-color:transparent}.btn-link[disabled]:hover,.btn-link[disabled]:focus{color:#333;text-decoration:none}.btn-group{position:relative;display:inline-block;*display:inline;*margin-left:.3em;font-size:0;white-space:nowrap;vertical-align:middle;*zoom:1}.btn-group:first-child{*margin-left:0}.btn-group+.btn-group{margin-left:5px}.btn-toolbar{margin-top:10px;margin-bottom:10px;font-size:0}.btn-toolbar>.btn+.btn,.btn-toolbar>.btn-group+.btn,.btn-toolbar>.btn+.btn-group{margin-left:5px}.btn-group>.btn{position:relative;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.btn-group>.btn+.btn{margin-left:-1px}.btn-group>.btn,.btn-group>.dropdown-menu,.btn-group>.popover{font-size:14px}.btn-group>.btn-mini{font-size:10.5px}.btn-group>.btn-small{font-size:11.9px}.btn-group>.btn-large{font-size:17.5px}.btn-group>.btn:first-child{margin-left:0;-webkit-border-bottom-left-radius:4px;border-bottom-left-radius:4px;-webkit-border-top-left-radius:4px;border-top-left-radius:4px;-moz-border-radius-bottomleft:4px;-moz-border-radius-topleft:4px}.btn-group>.btn:last-child,.btn-group>.dropdown-toggle{-webkit-border-top-right-radius:4px;border-top-right-radius:4px;-webkit-border-bottom-right-radius:4px;border-bottom-right-radius:4px;-moz-border-radius-topright:4px;-moz-border-radius-bottomright:4px}.btn-group>.btn.large:first-child{margin-left:0;-webkit-border-bottom-left-radius:6px;border-bottom-left-radius:6px;-webkit-border-top-left-radius:6px;border-top-left-radius:6px;-moz-border-radius-bottomleft:6px;-moz-border-radius-topleft:6px}.btn-group>.btn.large:last-child,.btn-group>.large.dropdown-toggle{-webkit-border-top-right-radius:6px;border-top-right-radius:6px;-webkit-border-bottom-right-radius:6px;border-bottom-right-radius:6px;-moz-border-radius-topright:6px;-moz-border-radius-bottomright:6px}.btn-group>.btn:hover,.btn-group>.btn:focus,.btn-group>.btn:active,.btn-group>.btn.active{z-index:2}.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0}.btn-group>.btn+.dropdown-toggle{*padding-top:5px;padding-right:8px;*padding-bottom:5px;padding-left:8px;-webkit-box-shadow:inset 1px 0 0 rgba(255,255,255,0.125),inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);-moz-box-shadow:inset 1px 0 0 rgba(255,255,255,0.125),inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);box-shadow:inset 1px 0 0 rgba(255,255,255,0.125),inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05)}.btn-group>.btn-mini+.dropdown-toggle{*padding-top:2px;padding-right:5px;*padding-bottom:2px;padding-left:5px}.btn-group>.btn-small+.dropdown-toggle{*padding-top:5px;*padding-bottom:4px}.btn-group>.btn-large+.dropdown-toggle{*padding-top:7px;padding-right:12px;*padding-bottom:7px;padding-left:12px}.btn-group.open .dropdown-toggle{background-image:none;-webkit-box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05);-moz-box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05);box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05)}.btn-group.open .btn.dropdown-toggle{background-color:#e6e6e6}.btn-group.open .btn-primary.dropdown-toggle{background-color:#04c}.btn-group.open .btn-warning.dropdown-toggle{background-color:#f89406}.btn-group.open .btn-danger.dropdown-toggle{background-color:#bd362f}.btn-group.open .btn-success.dropdown-toggle{background-color:#51a351}.btn-group.open .btn-info.dropdown-toggle{background-color:#2f96b4}.btn-group.open .btn-inverse.dropdown-toggle{background-color:#222}.btn .caret{margin-top:8px;margin-left:0}.btn-large .caret{margin-top:6px}.btn-large .caret{border-top-width:5px;border-right-width:5px;border-left-width:5px}.btn-mini .caret,.btn-small .caret{margin-top:8px}.dropup .btn-large .caret{border-bottom-width:5px}.btn-primary .caret,.btn-warning .caret,.btn-danger .caret,.btn-info .caret,.btn-success .caret,.btn-inverse .caret{border-top-color:#fff;border-bottom-color:#fff}.btn-group-vertical{display:inline-block;*display:inline;*zoom:1}.btn-group-vertical>.btn{display:block;float:none;max-width:100%;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.btn-group-vertical>.btn+.btn{margin-top:-1px;margin-left:0}.btn-group-vertical>.btn:first-child{-webkit-border-radius:4px 4px 0 0;-moz-border-radius:4px 4px 0 0;border-radius:4px 4px 0 0}.btn-group-vertical>.btn:last-child{-webkit-border-radius:0 0 4px 4px;-moz-border-radius:0 0 4px 4px;border-radius:0 0 4px 4px}.btn-group-vertical>.btn-large:first-child{-webkit-border-radius:6px 6px 0 0;-moz-border-radius:6px 6px 0 0;border-radius:6px 6px 0 0}.btn-group-vertical>.btn-large:last-child{-webkit-border-radius:0 0 6px 6px;-moz-border-radius:0 0 6px 6px;border-radius:0 0 6px 6px}.alert{padding:8px 35px 8px 14px;margin-bottom:20px;text-shadow:0 1px 0 rgba(255,255,255,0.5);background-color:#fcf8e3;border:1px solid #fbeed5;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.alert,.alert h4{color:#c09853}.alert h4{margin:0}.alert .close{position:relative;top:-2px;right:-21px;line-height:20px}.alert-success{color:#468847;background-color:#dff0d8;border-color:#d6e9c6}.alert-success h4{color:#468847}.alert-danger,.alert-error{color:#b94a48;background-color:#f2dede;border-color:#eed3d7}.alert-danger h4,.alert-error h4{color:#b94a48}.alert-info{color:#3a87ad;background-color:#d9edf7;border-color:#bce8f1}.alert-info h4{color:#3a87ad}.alert-block{padding-top:14px;padding-bottom:14px}.alert-block>p,.alert-block>ul{margin-bottom:0}.alert-block p+p{margin-top:5px}.nav{margin-bottom:20px;margin-left:0;list-style:none}.nav>li>a{display:block}.nav>li>a:hover,.nav>li>a:focus{text-decoration:none;background-color:#eee}.nav>li>a>img{max-width:none}.nav>.pull-right{float:right}.nav-header{display:block;padding:3px 15px;font-size:11px;font-weight:bold;line-height:20px;color:#999;text-shadow:0 1px 0 rgba(255,255,255,0.5);text-transform:uppercase}.nav li+.nav-header{margin-top:9px}.nav-list{padding-right:15px;padding-left:15px;margin-bottom:0}.nav-list>li>a,.nav-list .nav-header{margin-right:-15px;margin-left:-15px;text-shadow:0 1px 0 rgba(255,255,255,0.5)}.nav-list>li>a{padding:3px 15px}.nav-list>.active>a,.nav-list>.active>a:hover,.nav-list>.active>a:focus{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.2);background-color:#08c}.nav-list [class^="icon-"],.nav-list [class*=" icon-"]{margin-right:2px}.nav-list .divider{*width:100%;height:1px;margin:9px 1px;*margin:-5px 0 5px;overflow:hidden;background-color:#e5e5e5;border-bottom:1px solid #fff}.nav-tabs,.nav-pills{*zoom:1}.nav-tabs:before,.nav-pills:before,.nav-tabs:after,.nav-pills:after{display:table;line-height:0;content:""}.nav-tabs:after,.nav-pills:after{clear:both}.nav-tabs>li,.nav-pills>li{float:left}.nav-tabs>li>a,.nav-pills>li>a{padding-right:12px;padding-left:12px;margin-right:2px;line-height:14px}.nav-tabs{border-bottom:1px solid #ddd}.nav-tabs>li{margin-bottom:-1px}.nav-tabs>li>a{padding-top:8px;padding-bottom:8px;line-height:20px;border:1px solid transparent;-webkit-border-radius:4px 4px 0 0;-moz-border-radius:4px 4px 0 0;border-radius:4px 4px 0 0}.nav-tabs>li>a:hover,.nav-tabs>li>a:focus{border-color:#eee #eee #ddd}.nav-tabs>.active>a,.nav-tabs>.active>a:hover,.nav-tabs>.active>a:focus{color:#555;cursor:default;background-color:#fff;border:1px solid #ddd;border-bottom-color:transparent}.nav-pills>li>a{padding-top:8px;padding-bottom:8px;margin-top:2px;margin-bottom:2px;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px}.nav-pills>.active>a,.nav-pills>.active>a:hover,.nav-pills>.active>a:focus{color:#fff;background-color:#08c}.nav-stacked>li{float:none}.nav-stacked>li>a{margin-right:0}.nav-tabs.nav-stacked{border-bottom:0}.nav-tabs.nav-stacked>li>a{border:1px solid #ddd;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.nav-tabs.nav-stacked>li:first-child>a{-webkit-border-top-right-radius:4px;border-top-right-radius:4px;-webkit-border-top-left-radius:4px;border-top-left-radius:4px;-moz-border-radius-topright:4px;-moz-border-radius-topleft:4px}.nav-tabs.nav-stacked>li:last-child>a{-webkit-border-bottom-right-radius:4px;border-bottom-right-radius:4px;-webkit-border-bottom-left-radius:4px;border-bottom-left-radius:4px;-moz-border-radius-bottomright:4px;-moz-border-radius-bottomleft:4px}.nav-tabs.nav-stacked>li>a:hover,.nav-tabs.nav-stacked>li>a:focus{z-index:2;border-color:#ddd}.nav-pills.nav-stacked>li>a{margin-bottom:3px}.nav-pills.nav-stacked>li:last-child>a{margin-bottom:1px}.nav-tabs .dropdown-menu{-webkit-border-radius:0 0 6px 6px;-moz-border-radius:0 0 6px 6px;border-radius:0 0 6px 6px}.nav-pills .dropdown-menu{-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px}.nav .dropdown-toggle .caret{margin-top:6px;border-top-color:#08c;border-bottom-color:#08c}.nav .dropdown-toggle:hover .caret,.nav .dropdown-toggle:focus .caret{border-top-color:#005580;border-bottom-color:#005580}.nav-tabs .dropdown-toggle .caret{margin-top:8px}.nav .active .dropdown-toggle .caret{border-top-color:#fff;border-bottom-color:#fff}.nav-tabs .active .dropdown-toggle .caret{border-top-color:#555;border-bottom-color:#555}.nav>.dropdown.active>a:hover,.nav>.dropdown.active>a:focus{cursor:pointer}.nav-tabs .open .dropdown-toggle,.nav-pills .open .dropdown-toggle,.nav>li.dropdown.open.active>a:hover,.nav>li.dropdown.open.active>a:focus{color:#fff;background-color:#999;border-color:#999}.nav li.dropdown.open .caret,.nav li.dropdown.open.active .caret,.nav li.dropdown.open a:hover .caret,.nav li.dropdown.open a:focus .caret{border-top-color:#fff;border-bottom-color:#fff;opacity:1;filter:alpha(opacity=100)}.tabs-stacked .open>a:hover,.tabs-stacked .open>a:focus{border-color:#999}.tabbable{*zoom:1}.tabbable:before,.tabbable:after{display:table;line-height:0;content:""}.tabbable:after{clear:both}.tab-content{overflow:auto}.tabs-below>.nav-tabs,.tabs-right>.nav-tabs,.tabs-left>.nav-tabs{border-bottom:0}.tab-content>.tab-pane,.pill-content>.pill-pane{display:none}.tab-content>.active,.pill-content>.active{display:block}.tabs-below>.nav-tabs{border-top:1px solid #ddd}.tabs-below>.nav-tabs>li{margin-top:-1px;margin-bottom:0}.tabs-below>.nav-tabs>li>a{-webkit-border-radius:0 0 4px 4px;-moz-border-radius:0 0 4px 4px;border-radius:0 0 4px 4px}.tabs-below>.nav-tabs>li>a:hover,.tabs-below>.nav-tabs>li>a:focus{border-top-color:#ddd;border-bottom-color:transparent}.tabs-below>.nav-tabs>.active>a,.tabs-below>.nav-tabs>.active>a:hover,.tabs-below>.nav-tabs>.active>a:focus{border-color:transparent #ddd #ddd #ddd}.tabs-left>.nav-tabs>li,.tabs-right>.nav-tabs>li{float:none}.tabs-left>.nav-tabs>li>a,.tabs-right>.nav-tabs>li>a{min-width:74px;margin-right:0;margin-bottom:3px}.tabs-left>.nav-tabs{float:left;margin-right:19px;border-right:1px solid #ddd}.tabs-left>.nav-tabs>li>a{margin-right:-1px;-webkit-border-radius:4px 0 0 4px;-moz-border-radius:4px 0 0 4px;border-radius:4px 0 0 4px}.tabs-left>.nav-tabs>li>a:hover,.tabs-left>.nav-tabs>li>a:focus{border-color:#eee #ddd #eee #eee}.tabs-left>.nav-tabs .active>a,.tabs-left>.nav-tabs .active>a:hover,.tabs-left>.nav-tabs .active>a:focus{border-color:#ddd transparent #ddd #ddd;*border-right-color:#fff}.tabs-right>.nav-tabs{float:right;margin-left:19px;border-left:1px solid #ddd}.tabs-right>.nav-tabs>li>a{margin-left:-1px;-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0}.tabs-right>.nav-tabs>li>a:hover,.tabs-right>.nav-tabs>li>a:focus{border-color:#eee #eee #eee #ddd}.tabs-right>.nav-tabs .active>a,.tabs-right>.nav-tabs .active>a:hover,.tabs-right>.nav-tabs .active>a:focus{border-color:#ddd #ddd #ddd transparent;*border-left-color:#fff}.nav>.disabled>a{color:#999}.nav>.disabled>a:hover,.nav>.disabled>a:focus{text-decoration:none;cursor:default;background-color:transparent}.navbar{*position:relative;*z-index:2;margin-bottom:20px;overflow:visible}.navbar-inner{min-height:40px;padding-right:20px;padding-left:20px;background-color:#fafafa;background-image:-moz-linear-gradient(top,#fff,#f2f2f2);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fff),to(#f2f2f2));background-image:-webkit-linear-gradient(top,#fff,#f2f2f2);background-image:-o-linear-gradient(top,#fff,#f2f2f2);background-image:linear-gradient(to bottom,#fff,#f2f2f2);background-repeat:repeat-x;border:1px solid #d4d4d4;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff',endColorstr='#fff2f2f2',GradientType=0);*zoom:1;-webkit-box-shadow:0 1px 4px rgba(0,0,0,0.065);-moz-box-shadow:0 1px 4px rgba(0,0,0,0.065);box-shadow:0 1px 4px rgba(0,0,0,0.065)}.navbar-inner:before,.navbar-inner:after{display:table;line-height:0;content:""}.navbar-inner:after{clear:both}.navbar .container{width:auto}.nav-collapse.collapse{height:auto;overflow:visible}.navbar .brand{display:block;float:left;padding:10px 20px 10px;margin-left:-20px;font-size:20px;font-weight:200;color:#777;text-shadow:0 1px 0 #fff}.navbar .brand:hover,.navbar .brand:focus{text-decoration:none}.navbar-text{margin-bottom:0;line-height:40px;color:#777}.navbar-link{color:#777}.navbar-link:hover,.navbar-link:focus{color:#333}.navbar .divider-vertical{height:40px;margin:0 9px;border-right:1px solid #fff;border-left:1px solid #f2f2f2}.navbar .btn,.navbar .btn-group{margin-top:5px}.navbar .btn-group .btn,.navbar .input-prepend .btn,.navbar .input-append .btn,.navbar .input-prepend .btn-group,.navbar .input-append .btn-group{margin-top:0}.navbar-form{margin-bottom:0;*zoom:1}.navbar-form:before,.navbar-form:after{display:table;line-height:0;content:""}.navbar-form:after{clear:both}.navbar-form input,.navbar-form select,.navbar-form .radio,.navbar-form .checkbox{margin-top:5px}.navbar-form input,.navbar-form select,.navbar-form .btn{display:inline-block;margin-bottom:0}.navbar-form input[type="image"],.navbar-form input[type="checkbox"],.navbar-form input[type="radio"]{margin-top:3px}.navbar-form .input-append,.navbar-form .input-prepend{margin-top:5px;white-space:nowrap}.navbar-form .input-append input,.navbar-form .input-prepend input{margin-top:0}.navbar-search{position:relative;float:left;margin-top:5px;margin-bottom:0}.navbar-search .search-query{padding:4px 14px;margin-bottom:0;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px;font-weight:normal;line-height:1;-webkit-border-radius:15px;-moz-border-radius:15px;border-radius:15px}.navbar-static-top{position:static;margin-bottom:0}.navbar-static-top .navbar-inner{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.navbar-fixed-top,.navbar-fixed-bottom{position:fixed;right:0;left:0;z-index:1030;margin-bottom:0}.navbar-fixed-top .navbar-inner,.navbar-static-top .navbar-inner{border-width:0 0 1px}.navbar-fixed-bottom .navbar-inner{border-width:1px 0 0}.navbar-fixed-top .navbar-inner,.navbar-fixed-bottom .navbar-inner{padding-right:0;padding-left:0;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.navbar-static-top .container,.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:940px}.navbar-fixed-top{top:0}.navbar-fixed-top .navbar-inner,.navbar-static-top .navbar-inner{-webkit-box-shadow:0 1px 10px rgba(0,0,0,0.1);-moz-box-shadow:0 1px 10px rgba(0,0,0,0.1);box-shadow:0 1px 10px rgba(0,0,0,0.1)}.navbar-fixed-bottom{bottom:0}.navbar-fixed-bottom .navbar-inner{-webkit-box-shadow:0 -1px 10px rgba(0,0,0,0.1);-moz-box-shadow:0 -1px 10px rgba(0,0,0,0.1);box-shadow:0 -1px 10px rgba(0,0,0,0.1)}.navbar .nav{position:relative;left:0;display:block;float:left;margin:0 10px 0 0}.navbar .nav.pull-right{float:right;margin-right:0}.navbar .nav>li{float:left}.navbar .nav>li>a{float:none;padding:10px 15px 10px;color:#777;text-decoration:none;text-shadow:0 1px 0 #fff}.navbar .nav .dropdown-toggle .caret{margin-top:8px}.navbar .nav>li>a:focus,.navbar .nav>li>a:hover{color:#333;text-decoration:none;background-color:transparent}.navbar .nav>.active>a,.navbar .nav>.active>a:hover,.navbar .nav>.active>a:focus{color:#555;text-decoration:none;background-color:#e5e5e5;-webkit-box-shadow:inset 0 3px 8px rgba(0,0,0,0.125);-moz-box-shadow:inset 0 3px 8px rgba(0,0,0,0.125);box-shadow:inset 0 3px 8px rgba(0,0,0,0.125)}.navbar .btn-navbar{display:none;float:right;padding:7px 10px;margin-right:5px;margin-left:5px;color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#ededed;*background-color:#e5e5e5;background-image:-moz-linear-gradient(top,#f2f2f2,#e5e5e5);background-image:-webkit-gradient(linear,0 0,0 100%,from(#f2f2f2),to(#e5e5e5));background-image:-webkit-linear-gradient(top,#f2f2f2,#e5e5e5);background-image:-o-linear-gradient(top,#f2f2f2,#e5e5e5);background-image:linear-gradient(to bottom,#f2f2f2,#e5e5e5);background-repeat:repeat-x;border-color:#e5e5e5 #e5e5e5 #bfbfbf;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2f2f2',endColorstr='#ffe5e5e5',GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.075);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.075);box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.075)}.navbar .btn-navbar:hover,.navbar .btn-navbar:focus,.navbar .btn-navbar:active,.navbar .btn-navbar.active,.navbar .btn-navbar.disabled,.navbar .btn-navbar[disabled]{color:#fff;background-color:#e5e5e5;*background-color:#d9d9d9}.navbar .btn-navbar:active,.navbar .btn-navbar.active{background-color:#ccc \9}.navbar .btn-navbar .icon-bar{display:block;width:18px;height:2px;background-color:#f5f5f5;-webkit-border-radius:1px;-moz-border-radius:1px;border-radius:1px;-webkit-box-shadow:0 1px 0 rgba(0,0,0,0.25);-moz-box-shadow:0 1px 0 rgba(0,0,0,0.25);box-shadow:0 1px 0 rgba(0,0,0,0.25)}.btn-navbar .icon-bar+.icon-bar{margin-top:3px}.navbar .nav>li>.dropdown-menu:before{position:absolute;top:-7px;left:9px;display:inline-block;border-right:7px solid transparent;border-bottom:7px solid #ccc;border-left:7px solid transparent;border-bottom-color:rgba(0,0,0,0.2);content:''}.navbar .nav>li>.dropdown-menu:after{position:absolute;top:-6px;left:10px;display:inline-block;border-right:6px solid transparent;border-bottom:6px solid #fff;border-left:6px solid transparent;content:''}.navbar-fixed-bottom .nav>li>.dropdown-menu:before{top:auto;bottom:-7px;border-top:7px solid #ccc;border-bottom:0;border-top-color:rgba(0,0,0,0.2)}.navbar-fixed-bottom .nav>li>.dropdown-menu:after{top:auto;bottom:-6px;border-top:6px solid #fff;border-bottom:0}.navbar .nav li.dropdown>a:hover .caret,.navbar .nav li.dropdown>a:focus .caret{border-top-color:#333;border-bottom-color:#333}.navbar .nav li.dropdown.open>.dropdown-toggle,.navbar .nav li.dropdown.active>.dropdown-toggle,.navbar .nav li.dropdown.open.active>.dropdown-toggle{color:#555;background-color:#e5e5e5}.navbar .nav li.dropdown>.dropdown-toggle .caret{border-top-color:#777;border-bottom-color:#777}.navbar .nav li.dropdown.open>.dropdown-toggle .caret,.navbar .nav li.dropdown.active>.dropdown-toggle .caret,.navbar .nav li.dropdown.open.active>.dropdown-toggle .caret{border-top-color:#555;border-bottom-color:#555}.navbar .pull-right>li>.dropdown-menu,.navbar .nav>li>.dropdown-menu.pull-right{right:0;left:auto}.navbar .pull-right>li>.dropdown-menu:before,.navbar .nav>li>.dropdown-menu.pull-right:before{right:12px;left:auto}.navbar .pull-right>li>.dropdown-menu:after,.navbar .nav>li>.dropdown-menu.pull-right:after{right:13px;left:auto}.navbar .pull-right>li>.dropdown-menu .dropdown-menu,.navbar .nav>li>.dropdown-menu.pull-right .dropdown-menu{right:100%;left:auto;margin-right:-1px;margin-left:0;-webkit-border-radius:6px 0 6px 6px;-moz-border-radius:6px 0 6px 6px;border-radius:6px 0 6px 6px}.navbar-inverse .navbar-inner{background-color:#1b1b1b;background-image:-moz-linear-gradient(top,#222,#111);background-image:-webkit-gradient(linear,0 0,0 100%,from(#222),to(#111));background-image:-webkit-linear-gradient(top,#222,#111);background-image:-o-linear-gradient(top,#222,#111);background-image:linear-gradient(to bottom,#222,#111);background-repeat:repeat-x;border-color:#252525;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff222222',endColorstr='#ff111111',GradientType=0)}.navbar-inverse .brand,.navbar-inverse .nav>li>a{color:#999;text-shadow:0 -1px 0 rgba(0,0,0,0.25)}.navbar-inverse .brand:hover,.navbar-inverse .nav>li>a:hover,.navbar-inverse .brand:focus,.navbar-inverse .nav>li>a:focus{color:#fff}.navbar-inverse .brand{color:#999}.navbar-inverse .navbar-text{color:#999}.navbar-inverse .nav>li>a:focus,.navbar-inverse .nav>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .nav .active>a,.navbar-inverse .nav .active>a:hover,.navbar-inverse .nav .active>a:focus{color:#fff;background-color:#111}.navbar-inverse .navbar-link{color:#999}.navbar-inverse .navbar-link:hover,.navbar-inverse .navbar-link:focus{color:#fff}.navbar-inverse .divider-vertical{border-right-color:#222;border-left-color:#111}.navbar-inverse .nav li.dropdown.open>.dropdown-toggle,.navbar-inverse .nav li.dropdown.active>.dropdown-toggle,.navbar-inverse .nav li.dropdown.open.active>.dropdown-toggle{color:#fff;background-color:#111}.navbar-inverse .nav li.dropdown>a:hover .caret,.navbar-inverse .nav li.dropdown>a:focus .caret{border-top-color:#fff;border-bottom-color:#fff}.navbar-inverse .nav li.dropdown>.dropdown-toggle .caret{border-top-color:#999;border-bottom-color:#999}.navbar-inverse .nav li.dropdown.open>.dropdown-toggle .caret,.navbar-inverse .nav li.dropdown.active>.dropdown-toggle .caret,.navbar-inverse .nav li.dropdown.open.active>.dropdown-toggle .caret{border-top-color:#fff;border-bottom-color:#fff}.navbar-inverse .navbar-search .search-query{color:#fff;background-color:#515151;border-color:#111;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,0.1),0 1px 0 rgba(255,255,255,0.15);-moz-box-shadow:inset 0 1px 2px rgba(0,0,0,0.1),0 1px 0 rgba(255,255,255,0.15);box-shadow:inset 0 1px 2px rgba(0,0,0,0.1),0 1px 0 rgba(255,255,255,0.15);-webkit-transition:none;-moz-transition:none;-o-transition:none;transition:none}.navbar-inverse .navbar-search .search-query:-moz-placeholder{color:#ccc}.navbar-inverse .navbar-search .search-query:-ms-input-placeholder{color:#ccc}.navbar-inverse .navbar-search .search-query::-webkit-input-placeholder{color:#ccc}.navbar-inverse .navbar-search .search-query:focus,.navbar-inverse .navbar-search .search-query.focused{padding:5px 15px;color:#333;text-shadow:0 1px 0 #fff;background-color:#fff;border:0;outline:0;-webkit-box-shadow:0 0 3px rgba(0,0,0,0.15);-moz-box-shadow:0 0 3px rgba(0,0,0,0.15);box-shadow:0 0 3px rgba(0,0,0,0.15)}.navbar-inverse .btn-navbar{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#0e0e0e;*background-color:#040404;background-image:-moz-linear-gradient(top,#151515,#040404);background-image:-webkit-gradient(linear,0 0,0 100%,from(#151515),to(#040404));background-image:-webkit-linear-gradient(top,#151515,#040404);background-image:-o-linear-gradient(top,#151515,#040404);background-image:linear-gradient(to bottom,#151515,#040404);background-repeat:repeat-x;border-color:#040404 #040404 #000;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff151515',endColorstr='#ff040404',GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.navbar-inverse .btn-navbar:hover,.navbar-inverse .btn-navbar:focus,.navbar-inverse .btn-navbar:active,.navbar-inverse .btn-navbar.active,.navbar-inverse .btn-navbar.disabled,.navbar-inverse .btn-navbar[disabled]{color:#fff;background-color:#040404;*background-color:#000}.navbar-inverse .btn-navbar:active,.navbar-inverse .btn-navbar.active{background-color:#000 \9}.breadcrumb{padding:8px 15px;margin:0 0 20px;list-style:none;background-color:#f5f5f5;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.breadcrumb>li{display:inline-block;*display:inline;text-shadow:0 1px 0 #fff;*zoom:1}.breadcrumb>li>.divider{padding:0 5px;color:#ccc}.breadcrumb>.active{color:#999}.pagination{margin:20px 0}.pagination ul{display:inline-block;*display:inline;margin-bottom:0;margin-left:0;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;*zoom:1;-webkit-box-shadow:0 1px 2px rgba(0,0,0,0.05);-moz-box-shadow:0 1px 2px rgba(0,0,0,0.05);box-shadow:0 1px 2px rgba(0,0,0,0.05)}.pagination ul>li{display:inline}.pagination ul>li>a,.pagination ul>li>span{float:left;padding:4px 12px;line-height:20px;text-decoration:none;background-color:#fff;border:1px solid #ddd;border-left-width:0}.pagination ul>li>a:hover,.pagination ul>li>a:focus,.pagination ul>.active>a,.pagination ul>.active>span{background-color:#f5f5f5}.pagination ul>.active>a,.pagination ul>.active>span{color:#999;cursor:default}.pagination ul>.disabled>span,.pagination ul>.disabled>a,.pagination ul>.disabled>a:hover,.pagination ul>.disabled>a:focus{color:#999;cursor:default;background-color:transparent}.pagination ul>li:first-child>a,.pagination ul>li:first-child>span{border-left-width:1px;-webkit-border-bottom-left-radius:4px;border-bottom-left-radius:4px;-webkit-border-top-left-radius:4px;border-top-left-radius:4px;-moz-border-radius-bottomleft:4px;-moz-border-radius-topleft:4px}.pagination ul>li:last-child>a,.pagination ul>li:last-child>span{-webkit-border-top-right-radius:4px;border-top-right-radius:4px;-webkit-border-bottom-right-radius:4px;border-bottom-right-radius:4px;-moz-border-radius-topright:4px;-moz-border-radius-bottomright:4px}.pagination-centered{text-align:center}.pagination-right{text-align:right}.pagination-large ul>li>a,.pagination-large ul>li>span{padding:11px 19px;font-size:17.5px}.pagination-large ul>li:first-child>a,.pagination-large ul>li:first-child>span{-webkit-border-bottom-left-radius:6px;border-bottom-left-radius:6px;-webkit-border-top-left-radius:6px;border-top-left-radius:6px;-moz-border-radius-bottomleft:6px;-moz-border-radius-topleft:6px}.pagination-large ul>li:last-child>a,.pagination-large ul>li:last-child>span{-webkit-border-top-right-radius:6px;border-top-right-radius:6px;-webkit-border-bottom-right-radius:6px;border-bottom-right-radius:6px;-moz-border-radius-topright:6px;-moz-border-radius-bottomright:6px}.pagination-mini ul>li:first-child>a,.pagination-small ul>li:first-child>a,.pagination-mini ul>li:first-child>span,.pagination-small ul>li:first-child>span{-webkit-border-bottom-left-radius:3px;border-bottom-left-radius:3px;-webkit-border-top-left-radius:3px;border-top-left-radius:3px;-moz-border-radius-bottomleft:3px;-moz-border-radius-topleft:3px}.pagination-mini ul>li:last-child>a,.pagination-small ul>li:last-child>a,.pagination-mini ul>li:last-child>span,.pagination-small ul>li:last-child>span{-webkit-border-top-right-radius:3px;border-top-right-radius:3px;-webkit-border-bottom-right-radius:3px;border-bottom-right-radius:3px;-moz-border-radius-topright:3px;-moz-border-radius-bottomright:3px}.pagination-small ul>li>a,.pagination-small ul>li>span{padding:2px 10px;font-size:11.9px}.pagination-mini ul>li>a,.pagination-mini ul>li>span{padding:0 6px;font-size:10.5px}.pager{margin:20px 0;text-align:center;list-style:none;*zoom:1}.pager:before,.pager:after{display:table;line-height:0;content:""}.pager:after{clear:both}.pager li{display:inline}.pager li>a,.pager li>span{display:inline-block;padding:5px 14px;background-color:#fff;border:1px solid #ddd;-webkit-border-radius:15px;-moz-border-radius:15px;border-radius:15px}.pager li>a:hover,.pager li>a:focus{text-decoration:none;background-color:#f5f5f5}.pager .next>a,.pager .next>span{float:right}.pager .previous>a,.pager .previous>span{float:left}.pager .disabled>a,.pager .disabled>a:hover,.pager .disabled>a:focus,.pager .disabled>span{color:#999;cursor:default;background-color:#fff}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;background-color:#000}.modal-backdrop.fade{opacity:0}.modal-backdrop,.modal-backdrop.fade.in{opacity:.8;filter:alpha(opacity=80)}.modal{position:fixed;top:10%;left:50%;z-index:1050;width:560px;margin-left:-280px;background-color:#fff;border:1px solid #999;border:1px solid rgba(0,0,0,0.3);*border:1px solid #999;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;outline:0;-webkit-box-shadow:0 3px 7px rgba(0,0,0,0.3);-moz-box-shadow:0 3px 7px rgba(0,0,0,0.3);box-shadow:0 3px 7px rgba(0,0,0,0.3);-webkit-background-clip:padding-box;-moz-background-clip:padding-box;background-clip:padding-box}.modal.fade{top:-25%;-webkit-transition:opacity .3s linear,top .3s ease-out;-moz-transition:opacity .3s linear,top .3s ease-out;-o-transition:opacity .3s linear,top .3s ease-out;transition:opacity .3s linear,top .3s ease-out}.modal.fade.in{top:10%}.modal-header{padding:9px 15px;border-bottom:1px solid #eee}.modal-header .close{margin-top:2px}.modal-header h3{margin:0;line-height:30px}.modal-body{position:relative;max-height:400px;padding:15px;overflow-y:auto}.modal-form{margin-bottom:0}.modal-footer{padding:14px 15px 15px;margin-bottom:0;text-align:right;background-color:#f5f5f5;border-top:1px solid #ddd;-webkit-border-radius:0 0 6px 6px;-moz-border-radius:0 0 6px 6px;border-radius:0 0 6px 6px;*zoom:1;-webkit-box-shadow:inset 0 1px 0 #fff;-moz-box-shadow:inset 0 1px 0 #fff;box-shadow:inset 0 1px 0 #fff}.modal-footer:before,.modal-footer:after{display:table;line-height:0;content:""}.modal-footer:after{clear:both}.modal-footer .btn+.btn{margin-bottom:0;margin-left:5px}.modal-footer .btn-group .btn+.btn{margin-left:-1px}.modal-footer .btn-block+.btn-block{margin-left:0}.tooltip{position:absolute;z-index:1030;display:block;font-size:11px;line-height:1.4;opacity:0;filter:alpha(opacity=0);visibility:visible}.tooltip.in{opacity:.8;filter:alpha(opacity=80)}.tooltip.top{padding:5px 0;margin-top:-3px}.tooltip.right{padding:0 5px;margin-left:3px}.tooltip.bottom{padding:5px 0;margin-top:3px}.tooltip.left{padding:0 5px;margin-left:-3px}.tooltip-inner{max-width:200px;padding:8px;color:#fff;text-align:center;text-decoration:none;background-color:#000;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.tooltip-arrow{position:absolute;width:0;height:0;border-color:transparent;border-style:solid}.tooltip.top .tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-top-color:#000;border-width:5px 5px 0}.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-right-color:#000;border-width:5px 5px 5px 0}.tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-left-color:#000;border-width:5px 0 5px 5px}.tooltip.bottom .tooltip-arrow{top:0;left:50%;margin-left:-5px;border-bottom-color:#000;border-width:0 5px 5px}.popover{position:absolute;top:0;left:0;z-index:1010;display:none;max-width:276px;padding:1px;text-align:left;white-space:normal;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,0.2);-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,0.2);-moz-box-shadow:0 5px 10px rgba(0,0,0,0.2);box-shadow:0 5px 10px rgba(0,0,0,0.2);-webkit-background-clip:padding-box;-moz-background-clip:padding;background-clip:padding-box}.popover.top{margin-top:-10px}.popover.right{margin-left:10px}.popover.bottom{margin-top:10px}.popover.left{margin-left:-10px}.popover-title{padding:8px 14px;margin:0;font-size:14px;font-weight:normal;line-height:18px;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;-webkit-border-radius:5px 5px 0 0;-moz-border-radius:5px 5px 0 0;border-radius:5px 5px 0 0}.popover-title:empty{display:none}.popover-content{padding:9px 14px}.popover .arrow,.popover .arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.popover .arrow{border-width:11px}.popover .arrow:after{border-width:10px;content:""}.popover.top .arrow{bottom:-11px;left:50%;margin-left:-11px;border-top-color:#999;border-top-color:rgba(0,0,0,0.25);border-bottom-width:0}.popover.top .arrow:after{bottom:1px;margin-left:-10px;border-top-color:#fff;border-bottom-width:0}.popover.right .arrow{top:50%;left:-11px;margin-top:-11px;border-right-color:#999;border-right-color:rgba(0,0,0,0.25);border-left-width:0}.popover.right .arrow:after{bottom:-10px;left:1px;border-right-color:#fff;border-left-width:0}.popover.bottom .arrow{top:-11px;left:50%;margin-left:-11px;border-bottom-color:#999;border-bottom-color:rgba(0,0,0,0.25);border-top-width:0}.popover.bottom .arrow:after{top:1px;margin-left:-10px;border-bottom-color:#fff;border-top-width:0}.popover.left .arrow{top:50%;right:-11px;margin-top:-11px;border-left-color:#999;border-left-color:rgba(0,0,0,0.25);border-right-width:0}.popover.left .arrow:after{right:1px;bottom:-10px;border-left-color:#fff;border-right-width:0}.thumbnails{margin-left:-20px;list-style:none;*zoom:1}.thumbnails:before,.thumbnails:after{display:table;line-height:0;content:""}.thumbnails:after{clear:both}.row-fluid .thumbnails{margin-left:0}.thumbnails>li{float:left;margin-bottom:20px;margin-left:20px}.thumbnail{display:block;padding:4px;line-height:20px;border:1px solid #ddd;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:0 1px 3px rgba(0,0,0,0.055);-moz-box-shadow:0 1px 3px rgba(0,0,0,0.055);box-shadow:0 1px 3px rgba(0,0,0,0.055);-webkit-transition:all .2s ease-in-out;-moz-transition:all .2s ease-in-out;-o-transition:all .2s ease-in-out;transition:all .2s ease-in-out}a.thumbnail:hover,a.thumbnail:focus{border-color:#08c;-webkit-box-shadow:0 1px 4px rgba(0,105,214,0.25);-moz-box-shadow:0 1px 4px rgba(0,105,214,0.25);box-shadow:0 1px 4px rgba(0,105,214,0.25)}.thumbnail>img{display:block;max-width:100%;margin-right:auto;margin-left:auto}.thumbnail .caption{padding:9px;color:#555}.media,.media-body{overflow:hidden;*overflow:visible;zoom:1}.media,.media .media{margin-top:15px}.media:first-child{margin-top:0}.media-object{display:block}.media-heading{margin:0 0 5px}.media>.pull-left{margin-right:10px}.media>.pull-right{margin-left:10px}.media-list{margin-left:0;list-style:none}.label,.badge{display:inline-block;padding:2px 4px;font-size:11.844px;font-weight:bold;line-height:14px;color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);white-space:nowrap;vertical-align:baseline;background-color:#999}.label{-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.badge{padding-right:9px;padding-left:9px;-webkit-border-radius:9px;-moz-border-radius:9px;border-radius:9px}.label:empty,.badge:empty{display:none}a.label:hover,a.label:focus,a.badge:hover,a.badge:focus{color:#fff;text-decoration:none;cursor:pointer}.label-important,.badge-important{background-color:#b94a48}.label-important[href],.badge-important[href]{background-color:#953b39}.label-warning,.badge-warning{background-color:#f89406}.label-warning[href],.badge-warning[href]{background-color:#c67605}.label-success,.badge-success{background-color:#468847}.label-success[href],.badge-success[href]{background-color:#356635}.label-info,.badge-info{background-color:#3a87ad}.label-info[href],.badge-info[href]{background-color:#2d6987}.label-inverse,.badge-inverse{background-color:#333}.label-inverse[href],.badge-inverse[href]{background-color:#1a1a1a}.btn .label,.btn .badge{position:relative;top:-1px}.btn-mini .label,.btn-mini .badge{top:0}@-webkit-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@-moz-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@-ms-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@-o-keyframes progress-bar-stripes{from{background-position:0 0}to{background-position:40px 0}}@keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}.progress{height:20px;margin-bottom:20px;overflow:hidden;background-color:#f7f7f7;background-image:-moz-linear-gradient(top,#f5f5f5,#f9f9f9);background-image:-webkit-gradient(linear,0 0,0 100%,from(#f5f5f5),to(#f9f9f9));background-image:-webkit-linear-gradient(top,#f5f5f5,#f9f9f9);background-image:-o-linear-gradient(top,#f5f5f5,#f9f9f9);background-image:linear-gradient(to bottom,#f5f5f5,#f9f9f9);background-repeat:repeat-x;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5',endColorstr='#fff9f9f9',GradientType=0);-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,0.1);-moz-box-shadow:inset 0 1px 2px rgba(0,0,0,0.1);box-shadow:inset 0 1px 2px rgba(0,0,0,0.1)}.progress .bar{float:left;width:0;height:100%;font-size:12px;color:#fff;text-align:center;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#0e90d2;background-image:-moz-linear-gradient(top,#149bdf,#0480be);background-image:-webkit-gradient(linear,0 0,0 100%,from(#149bdf),to(#0480be));background-image:-webkit-linear-gradient(top,#149bdf,#0480be);background-image:-o-linear-gradient(top,#149bdf,#0480be);background-image:linear-gradient(to bottom,#149bdf,#0480be);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff149bdf',endColorstr='#ff0480be',GradientType=0);-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,0.15);-moz-box-shadow:inset 0 -1px 0 rgba(0,0,0,0.15);box-shadow:inset 0 -1px 0 rgba(0,0,0,0.15);-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-transition:width .6s ease;-moz-transition:width .6s ease;-o-transition:width .6s ease;transition:width .6s ease}.progress .bar+.bar{-webkit-box-shadow:inset 1px 0 0 rgba(0,0,0,0.15),inset 0 -1px 0 rgba(0,0,0,0.15);-moz-box-shadow:inset 1px 0 0 rgba(0,0,0,0.15),inset 0 -1px 0 rgba(0,0,0,0.15);box-shadow:inset 1px 0 0 rgba(0,0,0,0.15),inset 0 -1px 0 rgba(0,0,0,0.15)}.progress-striped .bar{background-color:#149bdf;background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(0.25,rgba(255,255,255,0.15)),color-stop(0.25,transparent),color-stop(0.5,transparent),color-stop(0.5,rgba(255,255,255,0.15)),color-stop(0.75,rgba(255,255,255,0.15)),color-stop(0.75,transparent),to(transparent));background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-moz-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);-webkit-background-size:40px 40px;-moz-background-size:40px 40px;-o-background-size:40px 40px;background-size:40px 40px}.progress.active .bar{-webkit-animation:progress-bar-stripes 2s linear infinite;-moz-animation:progress-bar-stripes 2s linear infinite;-ms-animation:progress-bar-stripes 2s linear infinite;-o-animation:progress-bar-stripes 2s linear infinite;animation:progress-bar-stripes 2s linear infinite}.progress-danger .bar,.progress .bar-danger{background-color:#dd514c;background-image:-moz-linear-gradient(top,#ee5f5b,#c43c35);background-image:-webkit-gradient(linear,0 0,0 100%,from(#ee5f5b),to(#c43c35));background-image:-webkit-linear-gradient(top,#ee5f5b,#c43c35);background-image:-o-linear-gradient(top,#ee5f5b,#c43c35);background-image:linear-gradient(to bottom,#ee5f5b,#c43c35);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffee5f5b',endColorstr='#ffc43c35',GradientType=0)}.progress-danger.progress-striped .bar,.progress-striped .bar-danger{background-color:#ee5f5b;background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(0.25,rgba(255,255,255,0.15)),color-stop(0.25,transparent),color-stop(0.5,transparent),color-stop(0.5,rgba(255,255,255,0.15)),color-stop(0.75,rgba(255,255,255,0.15)),color-stop(0.75,transparent),to(transparent));background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-moz-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent)}.progress-success .bar,.progress .bar-success{background-color:#5eb95e;background-image:-moz-linear-gradient(top,#62c462,#57a957);background-image:-webkit-gradient(linear,0 0,0 100%,from(#62c462),to(#57a957));background-image:-webkit-linear-gradient(top,#62c462,#57a957);background-image:-o-linear-gradient(top,#62c462,#57a957);background-image:linear-gradient(to bottom,#62c462,#57a957);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff62c462',endColorstr='#ff57a957',GradientType=0)}.progress-success.progress-striped .bar,.progress-striped .bar-success{background-color:#62c462;background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(0.25,rgba(255,255,255,0.15)),color-stop(0.25,transparent),color-stop(0.5,transparent),color-stop(0.5,rgba(255,255,255,0.15)),color-stop(0.75,rgba(255,255,255,0.15)),color-stop(0.75,transparent),to(transparent));background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-moz-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent)}.progress-info .bar,.progress .bar-info{background-color:#4bb1cf;background-image:-moz-linear-gradient(top,#5bc0de,#339bb9);background-image:-webkit-gradient(linear,0 0,0 100%,from(#5bc0de),to(#339bb9));background-image:-webkit-linear-gradient(top,#5bc0de,#339bb9);background-image:-o-linear-gradient(top,#5bc0de,#339bb9);background-image:linear-gradient(to bottom,#5bc0de,#339bb9);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de',endColorstr='#ff339bb9',GradientType=0)}.progress-info.progress-striped .bar,.progress-striped .bar-info{background-color:#5bc0de;background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(0.25,rgba(255,255,255,0.15)),color-stop(0.25,transparent),color-stop(0.5,transparent),color-stop(0.5,rgba(255,255,255,0.15)),color-stop(0.75,rgba(255,255,255,0.15)),color-stop(0.75,transparent),to(transparent));background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-moz-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent)}.progress-warning .bar,.progress .bar-warning{background-color:#faa732;background-image:-moz-linear-gradient(top,#fbb450,#f89406);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fbb450),to(#f89406));background-image:-webkit-linear-gradient(top,#fbb450,#f89406);background-image:-o-linear-gradient(top,#fbb450,#f89406);background-image:linear-gradient(to bottom,#fbb450,#f89406);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffbb450',endColorstr='#fff89406',GradientType=0)}.progress-warning.progress-striped .bar,.progress-striped .bar-warning{background-color:#fbb450;background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(0.25,rgba(255,255,255,0.15)),color-stop(0.25,transparent),color-stop(0.5,transparent),color-stop(0.5,rgba(255,255,255,0.15)),color-stop(0.75,rgba(255,255,255,0.15)),color-stop(0.75,transparent),to(transparent));background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-moz-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent)}.accordion{margin-bottom:20px}.accordion-group{margin-bottom:2px;border:1px solid #e5e5e5;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.accordion-heading{border-bottom:0}.accordion-heading .accordion-toggle{display:block;padding:8px 15px}.accordion-toggle{cursor:pointer}.accordion-inner{padding:9px 15px;border-top:1px solid #e5e5e5}.carousel{position:relative;margin-bottom:20px;line-height:1}.carousel-inner{position:relative;width:100%;overflow:hidden}.carousel-inner>.item{position:relative;display:none;-webkit-transition:.6s ease-in-out left;-moz-transition:.6s ease-in-out left;-o-transition:.6s ease-in-out left;transition:.6s ease-in-out left}.carousel-inner>.item>img,.carousel-inner>.item>a>img{display:block;line-height:1}.carousel-inner>.active,.carousel-inner>.next,.carousel-inner>.prev{display:block}.carousel-inner>.active{left:0}.carousel-inner>.next,.carousel-inner>.prev{position:absolute;top:0;width:100%}.carousel-inner>.next{left:100%}.carousel-inner>.prev{left:-100%}.carousel-inner>.next.left,.carousel-inner>.prev.right{left:0}.carousel-inner>.active.left{left:-100%}.carousel-inner>.active.right{left:100%}.carousel-control{position:absolute;top:40%;left:15px;width:40px;height:40px;margin-top:-20px;font-size:60px;font-weight:100;line-height:30px;color:#fff;text-align:center;background:#222;border:3px solid #fff;-webkit-border-radius:23px;-moz-border-radius:23px;border-radius:23px;opacity:.5;filter:alpha(opacity=50)}.carousel-control.right{right:15px;left:auto}.carousel-control:hover,.carousel-control:focus{color:#fff;text-decoration:none;opacity:.9;filter:alpha(opacity=90)}.carousel-indicators{position:absolute;top:15px;right:15px;z-index:5;margin:0;list-style:none}.carousel-indicators li{display:block;float:left;width:10px;height:10px;margin-left:5px;text-indent:-999px;background-color:#ccc;background-color:rgba(255,255,255,0.25);border-radius:5px}.carousel-indicators .active{background-color:#fff}.carousel-caption{position:absolute;right:0;bottom:0;left:0;padding:15px;background:#333;background:rgba(0,0,0,0.75)}.carousel-caption h4,.carousel-caption p{line-height:20px;color:#fff}.carousel-caption h4{margin:0 0 5px}.carousel-caption p{margin-bottom:0}.hero-unit{padding:60px;margin-bottom:30px;font-size:18px;font-weight:200;line-height:30px;color:inherit;background-color:#eee;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px}.hero-unit h1{margin-bottom:0;font-size:60px;line-height:1;letter-spacing:-1px;color:inherit}.hero-unit li{line-height:30px}.pull-right{float:right}.pull-left{float:left}.hide{display:none}.show{display:block}.invisible{visibility:hidden}.affix{position:fixed} diff --git a/modules/openapi-generator/src/main/resources/htmlDocs2/js_bootstrap.mustache b/modules/openapi-generator/src/main/resources/htmlDocs2/js_bootstrap.mustache index 66770d8b78..e8fd9045fb 100644 --- a/modules/openapi-generator/src/main/resources/htmlDocs2/js_bootstrap.mustache +++ b/modules/openapi-generator/src/main/resources/htmlDocs2/js_bootstrap.mustache @@ -2,7 +2,7 @@ /*! * Bootstrap.js by @fat & @mdo * Copyright 2013 Twitter, Inc. -* http://www.apache.org/licenses/LICENSE-2.0.txt +* https://www.apache.org/licenses/LICENSE-2.0.txt */ !function(e){"use strict";e(function(){e.support.transition=function(){var e=function(){var e=document.createElement("bootstrap"),t={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"},n;for(n in t)if(e.style[n]!==undefined)return t[n]}();return e&&{end:e}}()})}(window.jQuery),!function(e){"use strict";var t='[data-dismiss="alert"]',n=function(n){e(n).on("click",t,this.close)};n.prototype.close=function(t){function s(){i.trigger("closed").remove()}var n=e(this),r=n.attr("data-target"),i;r||(r=n.attr("href"),r=r&&r.replace(/.*(?=#[^\s]*$)/,"")),i=e(r),t&&t.preventDefault(),i.length||(i=n.hasClass("alert")?n:n.parent()),i.trigger(t=e.Event("close"));if(t.isDefaultPrevented())return;i.removeClass("in"),e.support.transition&&i.hasClass("fade")?i.on(e.support.transition.end,s):s()};var r=e.fn.alert;e.fn.alert=function(t){return this.each(function(){var r=e(this),i=r.data("alert");i||r.data("alert",i=new n(this)),typeof t=="string"&&i[t].call(r)})},e.fn.alert.Constructor=n,e.fn.alert.noConflict=function(){return e.fn.alert=r,this},e(document).on("click.alert.data-api",t,n.prototype.close)}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.$element=e(t),this.options=e.extend({},e.fn.button.defaults,n)};t.prototype.setState=function(e){var t="disabled",n=this.$element,r=n.data(),i=n.is("input")?"val":"html";e+="Text",r.resetText||n.data("resetText",n[i]()),n[i](r[e]||this.options[e]),setTimeout(function(){e=="loadingText"?n.addClass(t).attr(t,t):n.removeClass(t).removeAttr(t)},0)},t.prototype.toggle=function(){var e=this.$element.closest('[data-toggle="buttons-radio"]');e&&e.find(".active").removeClass("active"),this.$element.toggleClass("active")};var n=e.fn.button;e.fn.button=function(n){return this.each(function(){var r=e(this),i=r.data("button"),s=typeof n=="object"&&n;i||r.data("button",i=new t(this,s)),n=="toggle"?i.toggle():n&&i.setState(n)})},e.fn.button.defaults={loadingText:"loading..."},e.fn.button.Constructor=t,e.fn.button.noConflict=function(){return e.fn.button=n,this},e(document).on("click.button.data-api","[data-toggle^=button]",function(t){var n=e(t.target);n.hasClass("btn")||(n=n.closest(".btn")),n.button("toggle")})}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.$element=e(t),this.$indicators=this.$element.find(".carousel-indicators"),this.options=n,this.options.pause=="hover"&&this.$element.on("mouseenter",e.proxy(this.pause,this)).on("mouseleave",e.proxy(this.cycle,this))};t.prototype={cycle:function(t){return t||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(e.proxy(this.next,this),this.options.interval)),this},getActiveIndex:function(){return this.$active=this.$element.find(".item.active"),this.$items=this.$active.parent().children(),this.$items.index(this.$active)},to:function(t){var n=this.getActiveIndex(),r=this;if(t>this.$items.length-1||t<0)return;return this.sliding?this.$element.one("slid",function(){r.to(t)}):n==t?this.pause().cycle():this.slide(t>n?"next":"prev",e(this.$items[t]))},pause:function(t){return t||(this.paused=!0),this.$element.find(".next, .prev").length&&e.support.transition.end&&(this.$element.trigger(e.support.transition.end),this.cycle(!0)),clearInterval(this.interval),this.interval=null,this},next:function(){if(this.sliding)return;return this.slide("next")},prev:function(){if(this.sliding)return;return this.slide("prev")},slide:function(t,n){var r=this.$element.find(".item.active"),i=n||r[t](),s=this.interval,o=t=="next"?"left":"right",u=t=="next"?"first":"last",a=this,f;this.sliding=!0,s&&this.pause(),i=i.length?i:this.$element.find(".item")[u](),f=e.Event("slide",{relatedTarget:i[0],direction:o});if(i.hasClass("active"))return;this.$indicators.length&&(this.$indicators.find(".active").removeClass("active"),this.$element.one("slid",function(){var t=e(a.$indicators.children()[a.getActiveIndex()]);t&&t.addClass("active")}));if(e.support.transition&&this.$element.hasClass("slide")){this.$element.trigger(f);if(f.isDefaultPrevented())return;i.addClass(t),i[0].offsetWidth,r.addClass(o),i.addClass(o),this.$element.one(e.support.transition.end,function(){i.removeClass([t,o].join(" ")).addClass("active"),r.removeClass(["active",o].join(" ")),a.sliding=!1,setTimeout(function(){a.$element.trigger("slid")},0)})}else{this.$element.trigger(f);if(f.isDefaultPrevented())return;r.removeClass("active"),i.addClass("active"),this.sliding=!1,this.$element.trigger("slid")}return s&&this.cycle(),this}};var n=e.fn.carousel;e.fn.carousel=function(n){return this.each(function(){var r=e(this),i=r.data("carousel"),s=e.extend({},e.fn.carousel.defaults,typeof n=="object"&&n),o=typeof n=="string"?n:s.slide;i||r.data("carousel",i=new t(this,s)),typeof n=="number"?i.to(n):o?i[o]():s.interval&&i.pause().cycle()})},e.fn.carousel.defaults={interval:5e3,pause:"hover"},e.fn.carousel.Constructor=t,e.fn.carousel.noConflict=function(){return e.fn.carousel=n,this},e(document).on("click.carousel.data-api","[data-slide], [data-slide-to]",function(t){var n=e(this),r,i=e(n.attr("data-target")||(r=n.attr("href"))&&r.replace(/.*(?=#[^\s]+$)/,"")),s=e.extend({},i.data(),n.data()),o;i.carousel(s),(o=n.attr("data-slide-to"))&&i.data("carousel").pause().to(o).cycle(),t.preventDefault()})}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.$element=e(t),this.options=e.extend({},e.fn.collapse.defaults,n),this.options.parent&&(this.$parent=e(this.options.parent)),this.options.toggle&&this.toggle()};t.prototype={constructor:t,dimension:function(){var e=this.$element.hasClass("width");return e?"width":"height"},show:function(){var t,n,r,i;if(this.transitioning||this.$element.hasClass("in"))return;t=this.dimension(),n=e.camelCase(["scroll",t].join("-")),r=this.$parent&&this.$parent.find("> .accordion-group > .in");if(r&&r.length){i=r.data("collapse");if(i&&i.transitioning)return;r.collapse("hide"),i||r.data("collapse",null)}this.$element[t](0),this.transition("addClass",e.Event("show"),"shown"),e.support.transition&&this.$element[t](this.$element[0][n])},hide:function(){var t;if(this.transitioning||!this.$element.hasClass("in"))return;t=this.dimension(),this.reset(this.$element[t]()),this.transition("removeClass",e.Event("hide"),"hidden"),this.$element[t](0)},reset:function(e){var t=this.dimension();return this.$element.removeClass("collapse")[t](e||"auto")[0].offsetWidth,this.$element[e!==null?"addClass":"removeClass"]("collapse"),this},transition:function(t,n,r){var i=this,s=function(){n.type=="show"&&i.reset(),i.transitioning=0,i.$element.trigger(r)};this.$element.trigger(n);if(n.isDefaultPrevented())return;this.transitioning=1,this.$element[t]("in"),e.support.transition&&this.$element.hasClass("collapse")?this.$element.one(e.support.transition.end,s):s()},toggle:function(){this[this.$element.hasClass("in")?"hide":"show"]()}};var n=e.fn.collapse;e.fn.collapse=function(n){return this.each(function(){var r=e(this),i=r.data("collapse"),s=e.extend({},e.fn.collapse.defaults,r.data(),typeof n=="object"&&n);i||r.data("collapse",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.collapse.defaults={toggle:!0},e.fn.collapse.Constructor=t,e.fn.collapse.noConflict=function(){return e.fn.collapse=n,this},e(document).on("click.collapse.data-api","[data-toggle=collapse]",function(t){var n=e(this),r,i=n.attr("data-target")||t.preventDefault()||(r=n.attr("href"))&&r.replace(/.*(?=#[^\s]+$)/,""),s=e(i).data("collapse")?"toggle":n.data();n[e(i).hasClass("in")?"addClass":"removeClass"]("collapsed"),e(i).collapse(s)})}(window.jQuery),!function(e){"use strict";function r(){e(".dropdown-backdrop").remove(),e(t).each(function(){i(e(this)).removeClass("open")})}function i(t){var n=t.attr("data-target"),r;n||(n=t.attr("href"),n=n&&/#/.test(n)&&n.replace(/.*(?=#[^\s]*$)/,"")),r=n&&e(n);if(!r||!r.length)r=t.parent();return r}var t="[data-toggle=dropdown]",n=function(t){var n=e(t).on("click.dropdown.data-api",this.toggle);e("html").on("click.dropdown.data-api",function(){n.parent().removeClass("open")})};n.prototype={constructor:n,toggle:function(t){var n=e(this),s,o;if(n.is(".disabled, :disabled"))return;return s=i(n),o=s.hasClass("open"),r(),o||("ontouchstart"in document.documentElement&&e('