From 9d6fdfe1210bcc5ca587fb27c906ec93d5e47bd5 Mon Sep 17 00:00:00 2001 From: Jim Schubert Date: Fri, 18 Jan 2019 04:39:33 -0500 Subject: [PATCH] [feat][docs][website] Initial docusaurus based site (#1770) * Iniital docusaurus based site * Remove error about default local being used by String.format * Change pinned users to represent global presence rather than alphabetical order pinning * Include generator indexes in ensure-up-to-date (docusaurus site and /generators/README) * Add Font Awesome attribution footer * Remove feature callout until it is completed * Include NPM try it out section * Improve "Getting Started" type docs * Include new custom template documentation * Updating templating and customization docs * Add vendor extension docs * Cleanup templating page(s). * Move users to yaml file for easy edit. * travis configuration, and baseUrl mods to image URLs * [docs] Migrate FAQ, release summary from wiki FAQ has been split into multiple smaller documents to better categorize and allow users to find what they're looking for (in docs folder or in new website). Release summary information (versioning strategy and cadence) has been migrated from the Wiki and clarified a bit. Also adds copy button for all code snippets in website. * Copy current contributing/code of conduct to website * [docs] Creating a new generator --- .travis.yml | 12 +- README.md | 2 +- bin/utils/copy-to-website.sh | 34 + bin/utils/ensure-up-to-date | 3 + bin/utils/export_generator.sh | 4 +- .../export_generators_docusaurus_index.sh | 20 + bin/utils/export_generators_readme.sh | 14 +- docker-compose.yml | 18 + docs/3.0.0-release-note.md | 723 +- docs/building.md | 76 + docs/conduct.md | 49 + docs/contributing.md | 107 + docs/core-team.md | 12 + docs/customization.md | 39 +- docs/debugging.md | 64 + docs/faq-contributing.md | 66 + docs/faq-extending.md | 40 + docs/faq-generators.md | 115 + docs/faq.md | 18 + docs/generators.md | 126 + docs/generators/README.md | 9 +- docs/generators/ada-server.md | 31 +- docs/generators/ada.md | 31 +- docs/generators/android.md | 81 +- docs/generators/apache2.md | 31 +- docs/generators/apex.md | 43 +- docs/generators/aspnetcore.md | 51 +- docs/generators/bash.md | 59 +- docs/generators/c.md | 31 +- docs/generators/clojure.md | 55 +- docs/generators/cpp-pistache-server.md | 19 +- docs/generators/cpp-qt5-client.md | 39 +- docs/generators/cpp-qt5-qhttpengine-server.md | 35 +- docs/generators/cpp-qt5.md | 22 - docs/generators/cpp-restbed-server.md | 31 +- docs/generators/cpp-restsdk.md | 35 +- docs/generators/cpp-tizen.md | 27 +- docs/generators/csharp-dotnet2.md | 23 +- docs/generators/csharp-nancyfx.md | 67 +- docs/generators/csharp-refactor.md | 30 + docs/generators/csharp.md | 104 +- docs/generators/cwiki.md | 67 +- docs/generators/dart-jaguar.md | 59 +- docs/generators/dart.md | 55 +- docs/generators/dynamic-html.md | 43 +- docs/generators/eiffel.md | 23 +- docs/generators/elixir.md | 39 +- docs/generators/elm.md | 29 +- docs/generators/erlang-client.md | 19 +- docs/generators/erlang-proper.md | 19 +- docs/generators/erlang-server.md | 19 +- docs/generators/flash.md | 27 +- docs/generators/go-gin-server.md | 19 +- docs/generators/go-server.md | 19 +- docs/generators/go.md | 35 +- docs/generators/graphql-schema.md | 23 +- docs/generators/graphql-server.md | 23 +- docs/generators/groovy.md | 162 +- docs/generators/haskell-http-client.md | 103 +- docs/generators/haskell.md | 35 +- docs/generators/html.md | 67 +- docs/generators/html2.md | 83 +- docs/generators/java-inflector.md | 158 +- docs/generators/java-msf4j.md | 180 +- docs/generators/java-pkmst.md | 198 +- docs/generators/java-play-framework.md | 194 +- docs/generators/java-undertow-server.md | 158 +- docs/generators/java-vertx.md | 166 +- docs/generators/java.md | 222 +- docs/generators/javascript-closure-angular.md | 35 +- docs/generators/javascript-flowtyped.md | 51 +- docs/generators/javascript.md | 95 +- docs/generators/jaxrs-cxf-cdi.md | 199 +- docs/generators/jaxrs-cxf-client.md | 174 +- docs/generators/jaxrs-cxf.md | 242 +- docs/generators/jaxrs-jersey.md | 188 +- docs/generators/jaxrs-resteasy-eap.md | 186 +- docs/generators/jaxrs-resteasy.md | 178 +- docs/generators/jaxrs-spec.md | 195 +- docs/generators/jmeter.md | 27 +- docs/generators/kotlin-server.md | 64 +- docs/generators/kotlin-spring.md | 88 +- docs/generators/kotlin.md | 52 +- docs/generators/lua.md | 23 +- docs/generators/mysql-schema.md | 19 +- docs/generators/nodejs-server.md | 39 +- docs/generators/objc.md | 43 +- docs/generators/openapi-yaml.md | 31 +- docs/generators/openapi.md | 27 +- docs/generators/perl.md | 35 +- docs/generators/php-laravel.md | 63 +- docs/generators/php-lumen.md | 63 +- docs/generators/php-silex.md | 27 +- docs/generators/php-slim.md | 63 +- docs/generators/php-symfony.md | 83 +- docs/generators/php-ze-ph.md | 63 +- docs/generators/php.md | 75 +- docs/generators/powershell.md | 23 +- docs/generators/python-flask.md | 51 +- docs/generators/python.md | 43 +- docs/generators/r.md | 23 +- docs/generators/ruby-on-rails.md | 13 +- docs/generators/ruby-sinatra.md | 9 +- docs/generators/ruby.md | 71 +- docs/generators/rust-server.md | 19 +- docs/generators/rust.md | 29 +- docs/generators/scala-akka.md | 43 +- docs/generators/scala-finch.md | 23 +- docs/generators/scala-gatling.md | 39 +- docs/generators/scala-httpclient.md | 43 +- docs/generators/scala-lagom-server.md | 43 +- docs/generators/scalatra.md | 39 +- docs/generators/scalaz.md | 43 +- docs/generators/spring.md | 245 +- docs/generators/swift2-deprecated.md | 91 +- docs/generators/swift3-deprecated.md | 31 + docs/generators/swift3.md | 70 - docs/generators/swift4.md | 99 +- docs/generators/typescript-angular.md | 87 +- docs/generators/typescript-angularjs.md | 35 +- docs/generators/typescript-aurelia.md | 43 +- docs/generators/typescript-axios.md | 55 +- docs/generators/typescript-fetch.md | 55 +- docs/generators/typescript-inversify.md | 63 +- docs/generators/typescript-jquery.md | 55 +- docs/generators/typescript-node.md | 51 +- docs/installation.md | 148 + docs/integration.md | 10 +- docs/migration-from-swagger-codegen.md | 44 +- docs/new-generator.md | 403 ++ docs/online-openapi-generator.md | 88 - docs/online.md | 144 + docs/plugins.md | 99 + docs/qna.md | 44 +- docs/release-summary.md | 24 + docs/roadmap.md | 85 + docs/specification-info.md | 17 + docs/templating.md | 743 +++ docs/usage.md | 502 ++ .../openapitools/codegen/cmd/ConfigHelp.java | 82 +- .../codegen/cmd/ListGenerators.java | 27 +- .../org/openapitools/codegen/CodegenType.java | 1 + new.sh | 21 +- website/README.md | 106 + website/blog/2018-12-24-new-website.md | 13 + website/core/EditThisPage.js | 40 + website/core/Footer.js | 115 + website/dynamic/team.yml | 23 + website/dynamic/users.yml | 95 + website/i18n/en.json | 418 ++ website/package.json | 17 + website/pages/en/help.js | 54 + website/pages/en/index.js | 344 + website/pages/en/team.js | 97 + website/pages/en/users.js | 50 + website/sidebars.json | 46 + website/siteConfig.js | 106 + website/static/css/code-block-buttons.css | 41 + website/static/css/custom.css | 89 + website/static/img/color-logo.svg | 14 + .../static/img/companies/angular-schule.svg | 89 + website/static/img/companies/b-com.png | Bin 0 -> 7511 bytes website/static/img/companies/bithost.svg | 38 + website/static/img/companies/boxever.svg | 1 + website/static/img/companies/infotec.png | Bin 0 -> 5185 bytes website/static/img/companies/juststar.png | Bin 0 -> 3061 bytes website/static/img/companies/klarna.svg | 11 + .../static/img/companies/logo-askul-01.gif | Bin 0 -> 4053 bytes website/static/img/companies/metaswitch.svg | 22 + website/static/img/companies/myworkout.png | Bin 0 -> 4643 bytes website/static/img/companies/pepabo.png | Bin 0 -> 4795 bytes website/static/img/companies/raiffeisen.png | Bin 0 -> 3945 bytes website/static/img/companies/reprezen.png | Bin 0 -> 3065 bytes website/static/img/companies/rest-united.png | Bin 0 -> 5875 bytes website/static/img/companies/stingray.png | Bin 0 -> 12636 bytes website/static/img/companies/suva.svg | 8 + website/static/img/companies/telstra.svg | 6 + website/static/img/companies/unblu.svg | 6 + website/static/img/companies/zalando.jpg | Bin 0 -> 6356 bytes website/static/img/docusaurus.svg | 1 + website/static/img/fa-logo.svg | 1 + website/static/img/favicon.png | Bin 0 -> 984 bytes website/static/img/favicon/favicon.ico | Bin 0 -> 9662 bytes website/static/img/icons/exchange.svg | 2 + website/static/img/icons/github.svg | 1 + website/static/img/icons/gitter.svg | 1 + website/static/img/icons/newspaper-o.svg | 2 + website/static/img/icons/pencil.svg | 2 + website/static/img/icons/plug.svg | 2 + website/static/img/icons/twitter.svg | 1 + website/static/img/mono-logo.svg | 1 + website/static/img/oss_logo.png | Bin 0 -> 4370 bytes website/static/img/tools/docker.png | Bin 0 -> 4205 bytes website/static/img/tools/homebrew-256x256.png | Bin 0 -> 19350 bytes website/static/img/tools/npm.svg | 1 + website/static/js/code-block-buttons.js | 48 + website/yarn.lock | 5881 +++++++++++++++++ 197 files changed, 13543 insertions(+), 5334 deletions(-) create mode 100755 bin/utils/copy-to-website.sh create mode 100755 bin/utils/export_generators_docusaurus_index.sh create mode 100755 docker-compose.yml create mode 100644 docs/building.md create mode 100644 docs/conduct.md create mode 100644 docs/contributing.md create mode 100644 docs/core-team.md create mode 100644 docs/debugging.md create mode 100644 docs/faq-contributing.md create mode 100644 docs/faq-extending.md create mode 100644 docs/faq-generators.md create mode 100644 docs/faq.md create mode 100644 docs/generators.md delete mode 100644 docs/generators/cpp-qt5.md create mode 100644 docs/generators/csharp-refactor.md create mode 100644 docs/generators/swift3-deprecated.md delete mode 100644 docs/generators/swift3.md create mode 100644 docs/installation.md create mode 100644 docs/new-generator.md delete mode 100644 docs/online-openapi-generator.md create mode 100644 docs/online.md create mode 100644 docs/plugins.md create mode 100644 docs/release-summary.md create mode 100644 docs/roadmap.md create mode 100644 docs/specification-info.md create mode 100644 docs/templating.md create mode 100644 docs/usage.md create mode 100755 website/README.md create mode 100644 website/blog/2018-12-24-new-website.md create mode 100644 website/core/EditThisPage.js create mode 100755 website/core/Footer.js create mode 100644 website/dynamic/team.yml create mode 100644 website/dynamic/users.yml create mode 100644 website/i18n/en.json create mode 100644 website/package.json create mode 100755 website/pages/en/help.js create mode 100755 website/pages/en/index.js create mode 100644 website/pages/en/team.js create mode 100755 website/pages/en/users.js create mode 100755 website/sidebars.json create mode 100755 website/siteConfig.js create mode 100644 website/static/css/code-block-buttons.css create mode 100755 website/static/css/custom.css create mode 100644 website/static/img/color-logo.svg create mode 100644 website/static/img/companies/angular-schule.svg create mode 100644 website/static/img/companies/b-com.png create mode 100644 website/static/img/companies/bithost.svg create mode 100644 website/static/img/companies/boxever.svg create mode 100644 website/static/img/companies/infotec.png create mode 100644 website/static/img/companies/juststar.png create mode 100644 website/static/img/companies/klarna.svg create mode 100644 website/static/img/companies/logo-askul-01.gif create mode 100644 website/static/img/companies/metaswitch.svg create mode 100644 website/static/img/companies/myworkout.png create mode 100644 website/static/img/companies/pepabo.png create mode 100644 website/static/img/companies/raiffeisen.png create mode 100644 website/static/img/companies/reprezen.png create mode 100644 website/static/img/companies/rest-united.png create mode 100644 website/static/img/companies/stingray.png create mode 100644 website/static/img/companies/suva.svg create mode 100644 website/static/img/companies/telstra.svg create mode 100644 website/static/img/companies/unblu.svg create mode 100644 website/static/img/companies/zalando.jpg create mode 100755 website/static/img/docusaurus.svg create mode 100644 website/static/img/fa-logo.svg create mode 100755 website/static/img/favicon.png create mode 100755 website/static/img/favicon/favicon.ico create mode 100644 website/static/img/icons/exchange.svg create mode 100644 website/static/img/icons/github.svg create mode 100644 website/static/img/icons/gitter.svg create mode 100644 website/static/img/icons/newspaper-o.svg create mode 100644 website/static/img/icons/pencil.svg create mode 100644 website/static/img/icons/plug.svg create mode 100644 website/static/img/icons/twitter.svg create mode 100644 website/static/img/mono-logo.svg create mode 100755 website/static/img/oss_logo.png create mode 100644 website/static/img/tools/docker.png create mode 100644 website/static/img/tools/homebrew-256x256.png create mode 100644 website/static/img/tools/npm.svg create mode 100644 website/static/js/code-block-buttons.js create mode 100644 website/yarn.lock diff --git a/.travis.yml b/.travis.yml index 336ab8e97949..cc7729a12e9b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,7 +3,6 @@ language: java jdk: - openjdk8 - cache: directories: - $HOME/.m2 @@ -34,6 +33,7 @@ cache: - $HOME/samples/server/petstore/cpp-pistache/pistache - $HOME/.npm - $HOME/.rvm/gems/ruby-2.4.1 + - $HOME/website/node_modules/ services: - docker @@ -102,6 +102,7 @@ before_install: gpg --keyserver keyserver.ubuntu.com --recv-key $SIGNING_KEY ; gpg --check-trustdb ; fi; + - pushd .; cd website; npm install; popd install: # Add Godeps dependencies to GOPATH and PATH @@ -152,6 +153,15 @@ after_success: - if [ $DOCKER_HUB_USERNAME ]; then echo "$DOCKER_HUB_PASSWORD" | docker login --username=$DOCKER_HUB_USERNAME --password-stdin && docker build -t $DOCKER_GENERATOR_IMAGE_NAME ./modules/openapi-generator-online && if [ ! -z "$TRAVIS_TAG" ]; then docker tag $DOCKER_GENERATOR_IMAGE_NAME:latest $DOCKER_GENERATOR_IMAGE_NAME:$TRAVIS_TAG; fi && if [ ! -z "$TRAVIS_TAG" ] || [ "$TRAVIS_BRANCH" = "master" ]; then docker push $DOCKER_GENERATOR_IMAGE_NAME && echo "Pushed to $DOCKER_GENERATOR_IMAGE_NAME"; fi; fi ## docker: build cli image and push to Docker Hub - if [ $DOCKER_HUB_USERNAME ]; then echo "$DOCKER_HUB_PASSWORD" | docker login --username=$DOCKER_HUB_USERNAME --password-stdin && cp docker-entrypoint.sh ./modules/openapi-generator-cli && docker build -t $DOCKER_CODEGEN_CLI_IMAGE_NAME ./modules/openapi-generator-cli && if [ ! -z "$TRAVIS_TAG" ]; then docker tag $DOCKER_CODEGEN_CLI_IMAGE_NAME:latest $DOCKER_CODEGEN_CLI_IMAGE_NAME:$TRAVIS_TAG; fi && if [ ! -z "$TRAVIS_TAG" ] || [ "$TRAVIS_BRANCH" = "master" ]; then docker push $DOCKER_CODEGEN_CLI_IMAGE_NAME && echo "Pushed to $DOCKER_CODEGEN_CLI_IMAGE_NAME"; fi; fi + ## publish latest website, variables below are secure environment variables which are unavailable to PRs from forks. + - if [ "$TRAVIS_BRANCH" = "master" ] && [ -z $TRAVIS_TAG ] && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then + cd website; + git config --global user.name "${GH_NAME}"; + git config --global user.email "${GH_EMAIL}"; + echo "machine github.com login ${GH_NAME} password ${GH_TOKEN}" > ~/.netrc; + npm install; + GIT_USER="${GH_NAME}" npm run-script publish-gh-pages; + fi; env: - DOCKER_GENERATOR_IMAGE_NAME=openapitools/openapi-generator-online DOCKER_CODEGEN_CLI_IMAGE_NAME=openapitools/openapi-generator-cli NODE_ENV=test CC=gcc-5 CXX=g++-5 diff --git a/README.md b/README.md index e93776ddc6af..d937c03f7c4d 100644 --- a/README.md +++ b/README.md @@ -88,7 +88,7 @@ For old releases, please refer to the [**Release**](https://github.com/OpenAPITo ## [1.2 - Artifacts on Maven Central](#table-of-contents) -You can find our released artefacts on maven central: +You can find our released artifacts on maven central: **Core:** ```xml diff --git a/bin/utils/copy-to-website.sh b/bin/utils/copy-to-website.sh new file mode 100755 index 000000000000..d5c0d376570d --- /dev/null +++ b/bin/utils/copy-to-website.sh @@ -0,0 +1,34 @@ +#!/bin/sh + +SCRIPT="$0" +echo "# START SCRIPT: $SCRIPT" + +conduct_in=CODE_OF_CONDUCT.md +contrib_in=CONTRIBUTING.md +conduct_out=docs/conduct.md +contrib_out=docs/contributing.md + + +\rm -rf "${conduct_out}" +\rm -rf "${contrib_out}" + +cat > "${conduct_out}" << EOF +--- +id: code-of-conduct +title: Code of Conduct +--- + +$(tail -n +3 "${conduct_in}") +EOF +echo "Wrote $(pwd)/${conduct_out}" + +cat > "${contrib_out}" << EOF +--- +id: contributing +title: Guidelines For Contributing +sidebar_label: Guidelines +--- + +$(tail -n +3 "${contrib_in}") +EOF +echo "Wrote $(pwd)/${contrib_out}" \ No newline at end of file diff --git a/bin/utils/ensure-up-to-date b/bin/utils/ensure-up-to-date index 5f91c3986a50..3302a6483cb8 100755 --- a/bin/utils/ensure-up-to-date +++ b/bin/utils/ensure-up-to-date @@ -37,6 +37,9 @@ declare -a scripts=("./bin/openapi3/ruby-client-petstore.sh" "./bin/csharp-petstore.sh" "./bin/meta-codegen.sh" "./bin/utils/export_docs_generators.sh" +"./bin/utils/export_generators_docusaurus_index.sh" +"./bin/utils/copy-to-website.sh" +"./bin/utils/export_generators_readme.sh" "./bin/go-petstore.sh" "./bin/go-gin-petstore-server.sh") diff --git a/bin/utils/export_generator.sh b/bin/utils/export_generator.sh index 918ae306eb34..d3836715df49 100755 --- a/bin/utils/export_generator.sh +++ b/bin/utils/export_generator.sh @@ -14,6 +14,4 @@ fi executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" -java -jar ${executable} config-help -g ${NAME} --named-header -o docs/generators/${NAME}.md - -echo "Back to the [generators list](README.md)" >> docs/generators/${NAME}.md +java -jar ${executable} config-help -g ${NAME} --named-header --format markdown --markdown-header -o docs/generators/${NAME}.md diff --git a/bin/utils/export_generators_docusaurus_index.sh b/bin/utils/export_generators_docusaurus_index.sh new file mode 100755 index 000000000000..769e0a98db5c --- /dev/null +++ b/bin/utils/export_generators_docusaurus_index.sh @@ -0,0 +1,20 @@ +#!/bin/sh + +SCRIPT="$0" +echo "# START SCRIPT: $SCRIPT" + +executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" + +\rm -rf docs/generators.md + +cat > docs/generators.md << EOF +--- +id: generators +title: Generators List +--- + +EOF + +java -jar $executable list --docsite >> docs/generators.md + +echo "Wrote $(pwd)/docs/generators.md" diff --git a/bin/utils/export_generators_readme.sh b/bin/utils/export_generators_readme.sh index 716528d16685..ba1d043432b9 100755 --- a/bin/utils/export_generators_readme.sh +++ b/bin/utils/export_generators_readme.sh @@ -5,4 +5,16 @@ echo "# START SCRIPT: $SCRIPT" executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" -java -jar $executable list | sed -e 's/\([A-Z]*\) generators:/* \1 generators:/g' -e 's/- \([a-z0-9\-]*\)/- [\1]\(\1.md\)/g' > docs/generators/README.md +\rm -rf docs/generators.md + +cat > docs/generators.md << EOF +--- +id: generators +title: Generators List +--- + +EOF + +java -jar $executable list | sed -e 's/\([A-Z]*\) generators:/* \1 generators:/g' -e 's/- \([a-z0-9\-]*\)/- [\1]\(generators\/\1.md\)/g' >> docs/generators.md + +echo "Wrote $(pwd)/docs/generators.md" diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100755 index 000000000000..6711192ae1e7 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,18 @@ +version: "3" + +services: + docusaurus: + build: . + ports: + - 3000:3000 + - 35729:35729 + volumes: + - ./docs:/app/docs + - ./website/blog:/app/website/blog + - ./website/core:/app/website/core + - ./website/i18n:/app/website/i18n + - ./website/pages:/app/website/pages + - ./website/static:/app/website/static + - ./website/sidebars.json:/app/website/sidebars.json + - ./website/siteConfig.js:/app/website/siteConfig.js + working_dir: /app/website diff --git a/docs/3.0.0-release-note.md b/docs/3.0.0-release-note.md index 12a20c149e56..4929c3ae1ef3 100644 --- a/docs/3.0.0-release-note.md +++ b/docs/3.0.0-release-note.md @@ -1,361 +1,362 @@ -## Docker -7dfd94002 Docker: use correct MAVEN_CONFIG (#182) -b5a0d173d Revise the usage of OpenAPI Generator online (docker image) (#73) -e58dc2c77 Fix COPY in Dockerfile (#64) -9d7feaaeb Fix online generator (docker push) (#58) -9247cd01e Changes for Docker -64037ee59 update docker-related files to ues jdk8 - -## Plug-ins -b6b8c0db8 [gradle-plugin] Initial implementation (#162) -0a28aad73 [MAVEN PLUGIN] Checking for null configOptions before looking for property -9c79297d6 [MAVEN PLUGIN] Use latest version in dependencies snippet -9e1bbe0c1 Add maven wrapper - -## API Clients -### Ada -edf6be8c0 [Ada] bug fix by defining x-is-model-type when property is local to the YML file -9ba74f484 [Ada] Fix GNAT project and server skeleton to avoid sending a response when an error is returned -ea27924f5 [Ada] changed default project/package name, to solve circular dependencies -6b9d38d40 remove trailing spaces in ada template -0de7f972f Fix the Ada server skeleton to check the authsMethods in the Shared_Instance generic package -4bd8fc6e8 Fix 7511: [Ada] Client call is not correct with multiple parameters and application/x-www-urlencoded -3035bc629 [Ada] Hotfix/ada model sort -43f0e8692 Ada code generator corrected: "=>" instead of "->". -7d2b49085 [Ada] wrong order for generated structures in models.ads files -2b2b85eec [Ada] wrong JSON in POST operations - -### C# -0e34bcf4e [csharp] ctor params should always be camelCase -872471996 [csharp] Support arrays of arrays for properties and models -1c4e6b7d4 [csharp] Fix ToJson to work with composition and polymorphism -ed7af73f6 [csharp] Reference this.Configuration in client API template - -### C++ -e796e4c36 [C++] Add linux as a reserve keyword -36f69a034 remove trailing spaces in qt5 c++ templates -f192613f1 fix string type in c++ generator -409015461 fix file type in qt5cpp -a4bcb3bc7 fix datetime and map type for qt5cpp -23b31aba8 [qt5cpp] Fix crash when API return a map container -3b031ed2b [qt5cpp] delete callback data allocated before signal emission -1bb1e44d1 [qt5cpp] Remove qt5 pro.user file -194722015 Qt5cpp plug memleaks part2 -12f3661d6 Qt5cpp plug memleaks -ea4b94842 [qt5cpp] Add nullptr guard to prevent crash when empty model is being serialized -0bf430a80 Qt5cpp Add support for nested containers -0b3ec6b1f fix NPE with cpp qt5, add logic to avoid NPE with composed schema -7c734445b fix file parameter in header file (cpprest) -070b5c00b fix object type declaration in cpprest -bad1885b4 [cpprest] add parameterToString for number type with unspecified format (double) -73bd24db7 [cpprest] Add support for nested vectors -ee2eb74f7 [qt] update Qt client -d82499944 Adding qt project generation fix -9bd94b4db [qt] Fix warning message - -### Clojure -d7e374504 [Clojure] Add util method to set the api-context globally (#93) - -### Dart -f1638a659 [Dart] Allow setting an accessToken for OAuth -a5e26a44f [Dart] - Rework Dart client generator to be flutter-compatible - -### Elixir -f9b2839a3 [Elixir] Check date value before calling to_iso8601 - -### Elm -5a87fe695 [elm] Fix operations with empty responses (#171) -a5cf27b60 Fix Petstore example for Elm (#96) -c522927d5 Fix Elm generator for polymorphism (#78) -7d9fb9f51 Add CI test for Elm in travis (#40) -769a65c95 [Elm] Add support for array schemas -56a0268e3 [elm] missing '->' in Main elm template - -### Erlang -c73118524 [erlang-client] Erlang request utils -049eef9c5 Test erlang client, server petstore -bcc7b788e fix erlang client compilation error - -### Go -acb63fd5e Fix go readme, remove resty install -5d8362d85 Update go client, fix double body read -47614bb76 Properly capitalize exported go types -ee561fcd6 Add withXml option for Go language -0f6696089 [Go] Use consistent indentation in readme -72abb20f2 [Go] Fix operation files clobbering model files. [2.4.0] - -### Haskell -34db79b9b [haskell-http-client] update dependency versions + readme (#81) -e45b3784f Fix NPE with Haskell client generator with OAS3 spec -d3401396f [haskell-http-client] remove duplicates in produces/consumes; fix pathParam paramName issue -4bc99b9da minor fixes to haskell http client generator -2d0bafb6b [haskell-http-client] default InlineMimeTypes=true -9fba9c325 [haskell-http-client] add config options: cabalPackage, cabalVersion, baseModule, requestType, configType - -### Kotlin -a3322fbf7 [kotlin] Add OkHttpClient.Builder to ApiClient. -3c5fb1d80 [kotlin] Add json annotation to each enum value. -39fa375e3 [kotlin] Fix NPE for POST/PUT/PATCH with empty request models. -c599906f1 Kotlin: Correct data_class.mustache to use proper property for inner enum data type -c69925b53 [Kotlin] Fix issues with threetenbp -a811a48c3 minor fix to kotlin client genrator due to merge conflict -914275fe7 [kotlin] support selection of datelibrary -a61d23265 Fixed incorrect renaming of header and query param to camel cases for Kotlin Client template - -### Lua -dbe78e23e [Lua] Improve auto-generated test files -6c79052ac Add auto-generated Lua spec files for APIs, models -38a2c1dde [Lua] Fix Rockpec -a2410b210 Add auto-generated rockspec file to Lua API client -df10c725a Add lua test script, minor fix to Lua API files - -### Java -2e69e6c03 build.gradle should not have commas -1a4e5a4e5 Java client: Add constants for libraries (#163) -7db0201a8 Fix NPEs in Java generator (#154) -4d7ff8cfb JavaDoc fixes for Java/RESTEasy client (#151) -072ce070b resteasy: fix outer enum case (#139) -ccd002966 [Java] rest-assured: fix javadoc in templates -e7410d4c8 Allow $ in java var name -03490e923 Fix Java binary mapping -70b4b55fa Fix performance linting problem with maps in Java ApiClient template -cddcda0fe [Java][Jersey2] Make generated client code thread safe -298ca8d35 use correct jackson date library when using Java 8 -53eeb0c04 [Java] fix connection leak on retrofit OAuth token renewal -61c25e711 [Java] Fixes for retrofit -f02332755 [JAVA] 4709: codegen with parcelableMode fails to build if using arrays in swagger. -4eeb974cb [Java][google-api-client] Fix bug with empty POST request not sending content-type -d4543a99e [Java][retrofit2] file upload sets filename as baseName instead of a dynamic filename -62a930223 [JAVA][Rest-assured] reqSpec() method has been added into api.mustache for requests custom… -fec0363f7 [Java] Add back byte array enhancement -59ff4c198 [Java][library: vertx] Add default value and required parameter support to vertx server temp… -3bd2da9a8 [Java] Fix build warnings -429b96ae7 [JAVA] equals and hashCode for models with byte[] and binary strings -495971c2c [Java] use html entities in javadoc of generated code (#106) -82ee8656f [java] Enum in array of array (#66) -bf7e4e7df Java gson: add @SerializedName value as constant (#22) -30c1448d7 Fix build.gradle for Java RESTEasy client -642c0566d [Java] Use Rx2 Completalbe for Void Retrofit2 responses -72221b1cf Adding @Deprecated to retrofit2 client interfaces. -47111b324 [Java] fix gson deserialize format byte -9e06f7063 [Java] Fix assignment of new object instance to variable -006f084b5 [Java] Allow to set values with setApiPackage(..) and setModelPackage(..) - -### JavaScript/NodeJS -d80e29585 Fix JS test using baseName in default value (#5) -fe15f4690 fix toDefaultValueWithParam in JS -90859575e Fixing variable name typo (instane -> instance) - -### Objective-C -9fb2c29a4 7644 objc deprecated afnetworking datataskwithrequest -5d1874028 add class as a keyword in objc generator -1b8df5c20 Update ObjcClientCodegen.java -246ed5754 restore objc reserved word: property - -### PHP -3beeb4e77 [PHP] Not-required properties now shows as nullable (#129) -37df59d6f [PHP] Adjust the names (script, sample folder, generator) to lang option (#159) -4a5d16b23 [PHP] Fix string length validation -d58835e57 [PHP] Improve: Make validation strict -cf8d8d56f [PHP] Fix code example from README. Variable name was missing when using Basic auth. -0adbf7e51 [PHP] Improve: update sample tests automatically -32cf2f16f [PHP] Non required enum property -3bcf0ff76 [PHP] Add path & file separator (/) to return the correct path when deserializing a file -14e1e1980 [PHP] Improve validation on empty arrays -809e1f4c9 [PHP] Cleanup tests -76907cacd [PHP] declare property headerSelector - -### Python -7184f1ec6 [python] asyncio supports _preload_content; remove unused imports (#107) -d74d2ba03 fix: python clients -8e0a0ebd6 Fix python / tornado body handling -b39c35c76 Fix inconsistency between model name and file name in python client -dfbef4374 Fixed unicode error and supported allow_nonstandard_methods in tornado based python client -f6e0e297e [python-asyncio] tests and fixes - -### R -61e58d649 Add R namespace file - -### Ruby -a08164592 fix ruby parameters in documentation, fix reuqiredParams, optionalParams -8e34f9a98 update to newer version of ruby -aa6b217bb [Ruby] Add auto-generated rubocop config file - -### Rust -b44357394 [Rust] Implement minimal auth support -0b845a57e [Rust] Changes hard coded body to dynamic parameter name - -a3c97753f [Rust] Handles UUID as string -027df610b [Rust] Handle error response statuses -66be7a791 [Rust] Add user agent handling for rust template (master) -3029b7b0f [Rust] Format example with rustfmt - -### Scala -197b4481e normalize akka-scala and Java README -612cfb7af [Akka-scala] Clean unused dependencies such swagger-core -86697fedb [Scala][Gatling] correct body params filename -832919b84 [Scala][Akka] Remove unused dep when model package is empty - - -### Swift -40d5d0990 [Swift4] accept empty content with default client -3b7230b17 [Swift 4] Fix APIHelper to accept array parameter -e22faf4cd [Swift] Add public initializer for modelObject. -b184fb1d9 [Swift3] escape URL parameters -52f606b8d Fix Swift3 test cases and add pom.xml, travis config for iOS test -a3d0f1d4b Swift4: make generated models structs instead of classes - -### TypeScript -f615d823f update ts node dependencies -9ac9bc0dc [TypeScript] enhance ts import -009dcf009 Mark `not required` swagger properties as optional typescript properties -bdd2c2a4e Misc typescript Angular code generation improvements -260375c9e Fix typescript-node generation of array type models -d1933b5fc Fix a problem in the generation of typescript-jquery when we have enum in a query param -20305139b [Feature][TypeScript] request param enum as literal unions -524f162e6 Use supportsES6 flag in ts compilation for language typescript-angular -9b8602311 [TypeScript] Make OpenAPI Generator serialize subclasses properly (#102) -4bc5ffe86 [typescript-angular] add provided in support (#120) -ef832e715 [Feature][TS Angular] improve docs angular import -fc7e08346 [TS][Fetch] Add interfaces option -157e6b7fa [angular] Add option to generate tagged unions -7faaa091c Fix generated module imports in Aurelia APIs -b5f0b24ba [TS] fix object declaration in model - - -## API Servers -### C++ -6fef0a7ff fix string issue with restbed generator -a339422bd move get type declaration method to c++ restbed - -### C# -d9d653016 [aspnetcore] Make the use of Swashbuckle optional (#110) -9a8183ab0 [aspnetcore] Fix openapi.json location rename (#56) -12abfb968 [aspnetcore] Update Dockerfile -866817587 [aspnetcore] Fix string enum generation - -### Java -bd50d368e [JAVA - jaxrs-reasteasy-eap] Add import to models (#179) -7efda597c Fix issue with useBeanValidation option in Java server generators (#160) -71b5de3ed Do not set contextPath for spring-boot (#104) -b73ab0260 jaxrs-cxf-cdi: fix outer enum (#131) -4d7fc046f [JaxRS] Add "validation-api" dependency in jetty (#30) -ce930e7a6 [Jaxrs-cxf] Add bean-level cascaded beanvalidation for pojos (@Valid) -386b9f432 Modify "postProcessOperations" for "jaxrs-cxf-client" -5d92717dc update jaxrs to listent at port 10080 -7c2031675 update artifict id for jaxrs datelib j8 -88c5112f2 Adds support for returning response in jaxrs-spec interfaces -6bf84d5fa [JAXRS-SPEC] Fix lowercase enums sent as uppercase -3a1922bc9 Fix version for "spring-boot-maven-plugin" (#85) -161948657 Add reactive option for Spring Boot (webflux) -ff1178ad7 [Java][Spring] fix missing optional query params -2103fadab Fix package declaration for play-framework -2c6380c84 fix inner item (list, map) for play framework -e33b350c8 Fix an issue in Play Framework generator where a CSV is empty and transferred to the controllerImp with an empty item. -99fc27246 [JAX-RS][Spec] Removes throws Exception. -fe2a44339 Fixes issue (SpringCodeGen dateLibrary "java8-localdatetime" option is ignored). -d890d733f [JaxRS][Java] issue with implFolder on windows, and required fields generation for containers (#88) -c91ce17ae Feature/javaPlayWithAsynchronousControllers -f00a1ef52 [JAVA] Correct consumes/produces attributes for Spring Controllers -d14318cf2 [JAVA][Spring] Optional params with delegate -3f81378d7 [java resteasy] fix string comparison (#134) -5ea3d3bb1 [JAX-RS][SPEC] Bug fix that prevents generating interfaces when interfaceOnly is false. - -### Kotlin -7cad47dd3 [kotlin-server] --library=ktor (barebones implementation) -752b36e66 [Kotlin] Sanitize enumeration name to add underscore when it starts with digits (#77) - -### NodeJS -6d88d073c [NodeJS] make serverPort configurable via CLI option -e7f4fb3c4 Fix nodejs-server path issue in windows platform - -### PHP -d30fcbabb Fixes for php-ze-ph generator -60e3339aa [Feature][PHP] Update for ze-ph generator - -### Python -62b93fc5c [Python][Flask] Handles UUID format - -9999eac52 fix python flask parameter naming - -### Scala -d5c355a59 [Scalatra] Updated the version of Scalatra to the latest (2.6.2) -52322c47c [finch] Allow finch server to compile for CI checks (#7) - -### Ruby -dcad9ae80 [Rails5] make version of the generated Rails stub server to strict Rails 5.0 - -### Rust -37faaf926 [rust-server] API version constant and composite version support -6c7813e79 [rust-server] asynchronous support via hyper v0.11 - -## Documentation -25a6a9d44 html: fix typo in class name - - -## Miscellaneous -f04213285 Cli error message improvements (#172) -0ece706a4 Remove CodegenConfig.fromModel(String, Schema) method (#90) -64f2bea37 Fix getReferenced...() methods in ModelUtils (#157) -16ff5174e Update swagger-parser to 2.0.1 (#123) -76b7307a6 DefaultGenerator: ignore only form param schemas (#74) -a3aabd390 Create a default implementation of delegate if none could be autowired (#92) -ca89af808 Switch to Java 8 -27426f7b5 Cli generator name option, replaces 'language' options in CLI and Maven Plugin (#57) -a1ff50241 Rename datatype to dataType in CodegenProperty (#69) -3b9a2a7c3 CaseFormatLambda has been added, params for Rest-assured client has been refactored (#91) -488910362 Set parameters allowableValues dynamically (#65) -2821f18b9 Meta: set version for "build-helper-maven-plugin" (#89) -82d9e935e Add CORS configuration to openapi-generator-online (#71) -e3814f51d Improvements to online codegen (#55) -6b8079808 Consider minLength, maxLength and pattern in referenced schema (#45) -7c5dfbfa0 Minor improvements to OpenAPI Generator Online (#54) -8dd46a3fb Move online gen from jersey to spring boot (#44) -803821e21 Fix an issue with example generator when array is too large (#46) -673f2bc46 Add CodegenProperty.nameInSnakeCase (#42) -67ebe17dd Fix isPrimitiveType flag for array of form parameters (#38) -10ac4024d Code clean-up: remove field declaration hiding existing fields (#35) -ab9c4b5a6 Code clean-up: Add own private static final LOGGER in each class (#26) -41b0ff351 Code clean-up: remove DefaultCodegen#getSimpleRef(String) (#19) -13f084e7b Fix dataTypeWithEnum for array of form parameters -fd3b883e8 [DefaultCodegen] Fill CodegenOperation::produces with unique media types -db9a899a0 update getSchemaType variable, remove unused import -d74b4cdf8 fix map type and collection format for form parameter (array) -d99f46cff Revise how to obtain the example value -b1eac05b2 Fix form datatype (array of string) -3c666a6d4 Fix array of form parameters -1492df6ce Override server port for Jetty configuration -622a75b2c Fix data type shadowing -861d11d01 use vendor extension in operation to set the body parameter name -80c8b92cb add postProcessParamter for body, form parameter -7fe555a51 Set collectionFormat default only for array -16589de97 default collection format to csv according to the spec -edbe4902a Consider '$ref' for consumes and produces in CodegenOperation -e24238a35 Improve getter name handling for boolean properties -6e2ca294b update discriminator to discriminatorName -74075c087 Primitive datatype in Schema components -d8abd4a14 support map in body parameter -186594115 Update swagger-core to 2.0.1 -2034f61e5 Add HideGenerationTimestamp getter and setter in the CodegenConfig interface -d0e2d7684 Getter and Setter for hideGenerationTimestamp -adbde2fb6 replace fromOperation with postProcessOperations -9d1ae0dd2 fix bigdecimal in default codegen -ffa0e115d fix default value and type declaration -0e744adb8 Apply collection format to SIMPLE enum style -36ed29852 Tweak tests according to the parameter order changes -17b082793 Move 'enum_query_double' to parameters section -28fcf48f4 Add a method returns discriminator name -7daa2ec5d Fix broken discriminator -faa901640 Replace with the helper function: `getTypeDeclaration` -c8650d0e3 Make optional properties in models optional parameters -40c30dd2f Fix inputSpec for multi module builds -5326152cc add option to reorder form/body parameter -d1850091a Improve JMeter Template -fedfb0cda Factorize addOption/addSwitch method -e73eeb4fd fix for stripping prefix on single enums -13e3db59e Add operationIdOriginal to store the original operationId -0b2d80569 Expose getter/setter for serverPort to facilitate testing -8e270f465 add vendorExtensions field in CodegenSecurity class -1ee85de94 Added Intelli J ignore -7b8e409cf Added gitignore generation function - - - +--- +id: release-3-0-0 +title: Release Notes: 3.0.0 +sidebar_label: Release Notes: 3.0.0 +--- + +* ## Docker +* 7dfd94002 Docker: use correct MAVEN_CONFIG (#182) +* b5a0d173d Revise the usage of OpenAPI Generator online (docker image) (#73) +* e58dc2c77 Fix COPY in Dockerfile (#64) +* 9d7feaaeb Fix online generator (docker push) (#58) +* 9247cd01e Changes for Docker +* 64037ee59 update docker-related files to ues jdk8 + +* ## Plug-ins +* b6b8c0db8 \[gradle-plugin] Initial implementation (#162) +* 0a28aad73 \[MAVEN PLUGIN] Checking for null configOptions before looking for property +* 9c79297d6 \[MAVEN PLUGIN] Use latest version in dependencies snippet +* 9e1bbe0c1 Add maven wrapper + +* ## API Clients +* ### Ada +* edf6be8c0 \[Ada] bug fix by defining x-is-model-type when property is local to the YML file +* 9ba74f484 \[Ada] Fix GNAT project and server skeleton to avoid sending a response when an error is returned +* ea27924f5 \[Ada] changed default project/package name, to solve circular dependencies +* 6b9d38d40 remove trailing spaces in ada template +* 0de7f972f Fix the Ada server skeleton to check the authsMethods in the Shared_Instance generic package +* 4bd8fc6e8 Fix 7511: \[Ada] Client call is not correct with multiple parameters and application/x-www-urlencoded +* 3035bc629 \[Ada] Hotfix/ada model sort +* 43f0e8692 Ada code generator corrected: "=>" instead of "->". +* 7d2b49085 \[Ada] wrong order for generated structures in models.ads files +* 2b2b85eec \[Ada] wrong JSON in POST operations + +* ### C# +* 0e34bcf4e \[csharp] ctor params should always be camelCase +* 872471996 \[csharp] Support arrays of arrays for properties and models +* 1c4e6b7d4 \[csharp] Fix ToJson to work with composition and polymorphism +* ed7af73f6 \[csharp] Reference this.Configuration in client API template + +* ### C++ +* e796e4c36 \[C++] Add linux as a reserve keyword +* 36f69a034 remove trailing spaces in qt5 c++ templates +* f192613f1 fix string type in c++ generator +* 409015461 fix file type in qt5cpp +* a4bcb3bc7 fix datetime and map type for qt5cpp +* 23b31aba8 \[qt5cpp] Fix crash when API return a map container +* 3b031ed2b \[qt5cpp] delete callback data allocated before signal emission +* 1bb1e44d1 \[qt5cpp] Remove qt5 pro.user file +* 194722015 Qt5cpp plug memleaks part2 +* 12f3661d6 Qt5cpp plug memleaks +* ea4b94842 \[qt5cpp] Add nullptr guard to prevent crash when empty model is being serialized +* 0bf430a80 Qt5cpp Add support for nested containers +* 0b3ec6b1f fix NPE with cpp qt5, add logic to avoid NPE with composed schema +* 7c734445b fix file parameter in header file (cpprest) +* 070b5c00b fix object type declaration in cpprest +* bad1885b4 \[cpprest] add parameterToString for number type with unspecified format (double) +* 73bd24db7 \[cpprest] Add support for nested vectors +* ee2eb74f7 \[qt] update Qt client +* d82499944 Adding qt project generation fix +* 9bd94b4db \[qt] Fix warning message + +* ### Clojure +* d7e374504 \[Clojure] Add util method to set the api-context globally (#93) + +* ### Dart +* f1638a659 \[Dart] Allow setting an accessToken for OAuth +* a5e26a44f \[Dart] - Rework Dart client generator to be flutter-compatible + +* ### Elixir +* f9b2839a3 \[Elixir] Check date value before calling to_iso8601 + +* ### Elm +* 5a87fe695 \[elm] Fix operations with empty responses (#171) +* a5cf27b60 Fix Petstore example for Elm (#96) +* c522927d5 Fix Elm generator for polymorphism (#78) +* 7d9fb9f51 Add CI test for Elm in travis (#40) +* 769a65c95 \[Elm] Add support for array schemas +* 56a0268e3 \[elm] missing '->' in Main elm template + +* ### Erlang +* c73118524 \[erlang-client] Erlang request utils +* 049eef9c5 Test erlang client, server petstore +* bcc7b788e fix erlang client compilation error + +* ### Go +* acb63fd5e Fix go readme, remove resty install +* 5d8362d85 Update go client, fix double body read +* 47614bb76 Properly capitalize exported go types +* ee561fcd6 Add withXml option for Go language +* 0f6696089 \[Go] Use consistent indentation in readme +* 72abb20f2 \[Go] Fix operation files clobbering model files. \[2.4.0] + +* ### Haskell +* 34db79b9b \[haskell-http-client] update dependency versions + readme (#81) +* e45b3784f Fix NPE with Haskell client generator with OAS3 spec +* d3401396f \[haskell-http-client] remove duplicates in produces/consumes; fix pathParam paramName issue +* 4bc99b9da minor fixes to haskell http client generator +* 2d0bafb6b \[haskell-http-client] default InlineMimeTypes=true +* 9fba9c325 \[haskell-http-client] add config options: cabalPackage, cabalVersion, baseModule, requestType, configType + +* ### Kotlin +* a3322fbf7 \[kotlin] Add OkHttpClient.Builder to ApiClient. +* 3c5fb1d80 \[kotlin] Add json annotation to each enum value. +* 39fa375e3 \[kotlin] Fix NPE for POST/PUT/PATCH with empty request models. +* c599906f1 Kotlin: Correct data_class.mustache to use proper property for inner enum data type +* c69925b53 \[Kotlin] Fix issues with threetenbp +* a811a48c3 minor fix to kotlin client genrator due to merge conflict +* 914275fe7 \[kotlin] support selection of datelibrary +* a61d23265 Fixed incorrect renaming of header and query param to camel cases for Kotlin Client template + +* ### Lua +* dbe78e23e \[Lua] Improve auto-generated test files +* 6c79052ac Add auto-generated Lua spec files for APIs, models +* 38a2c1dde \[Lua] Fix Rockpec +* a2410b210 Add auto-generated rockspec file to Lua API client +* df10c725a Add lua test script, minor fix to Lua API files + +* ### Java +* 2e69e6c03 build.gradle should not have commas +* 1a4e5a4e5 Java client: Add constants for libraries (#163) +* 7db0201a8 Fix NPEs in Java generator (#154) +* 4d7ff8cfb JavaDoc fixes for Java/RESTEasy client (#151) +* 072ce070b resteasy: fix outer enum case (#139) +* ccd002966 \[Java] rest-assured: fix javadoc in templates +* e7410d4c8 Allow $ in java var name +* 03490e923 Fix Java binary mapping +* 70b4b55fa Fix performance linting problem with maps in Java ApiClient template +* cddcda0fe \[Java][Jersey2] Make generated client code thread safe +* 298ca8d35 use correct jackson date library when using Java 8 +* 53eeb0c04 \[Java] fix connection leak on retrofit OAuth token renewal +* 61c25e711 \[Java] Fixes for retrofit +* f02332755 \[JAVA] 4709: codegen with parcelableMode fails to build if using arrays in swagger. +* 4eeb974cb \[Java][google-api-client] Fix bug with empty POST request not sending content-type +* d4543a99e \[Java][retrofit2] file upload sets filename as baseName instead of a dynamic filename +* 62a930223 \[JAVA][Rest-assured] reqSpec() method has been added into api.mustache for requests custom… +* fec0363f7 \[Java] Add back byte array enhancement +* 59ff4c198 \[Java][library: vertx] Add default value and required parameter support to vertx server temp… +* 3bd2da9a8 \[Java] Fix build warnings +* 429b96ae7 \[JAVA] equals and hashCode for models with byte[] and binary strings +* 495971c2c \[Java] use html entities in javadoc of generated code (#106) +* 82ee8656f \[java] Enum in array of array (#66) +* bf7e4e7df Java gson: add @SerializedName value as constant (#22) +* 30c1448d7 Fix build.gradle for Java RESTEasy client +* 642c0566d \[Java] Use Rx2 Completalbe for Void Retrofit2 responses +* 72221b1cf Adding @Deprecated to retrofit2 client interfaces. +* 47111b324 \[Java] fix gson deserialize format byte +* 9e06f7063 \[Java] Fix assignment of new object instance to variable +* 006f084b5 \[Java] Allow to set values with setApiPackage(..) and setModelPackage(..) + +* ### JavaScript/NodeJS +* d80e29585 Fix JS test using baseName in default value (#5) +* fe15f4690 fix toDefaultValueWithParam in JS +* 90859575e Fixing variable name typo (instane -> instance) + +* ### Objective-C +* 9fb2c29a4 7644 objc deprecated afnetworking datataskwithrequest +* 5d1874028 add class as a keyword in objc generator +* 1b8df5c20 Update ObjcClientCodegen.java +* 246ed5754 restore objc reserved word: property + +* ### PHP +* 3beeb4e77 \[PHP] Not-required properties now shows as nullable (#129) +* 37df59d6f \[PHP] Adjust the names (script, sample folder, generator) to lang option (#159) +* 4a5d16b23 \[PHP] Fix string length validation +* d58835e57 \[PHP] Improve: Make validation strict +* cf8d8d56f \[PHP] Fix code example from README. Variable name was missing when using Basic auth. +* 0adbf7e51 \[PHP] Improve: update sample tests automatically +* 32cf2f16f \[PHP] Non required enum property +* 3bcf0ff76 \[PHP] Add path & file separator (/) to return the correct path when deserializing a file +* 14e1e1980 \[PHP] Improve validation on empty arrays +* 809e1f4c9 \[PHP] Cleanup tests +* 76907cacd \[PHP] declare property headerSelector + +* ### Python +* 7184f1ec6 \[python] asyncio supports _preload_content; remove unused imports (#107) +* d74d2ba03 fix: python clients +* 8e0a0ebd6 Fix python / tornado body handling +* b39c35c76 Fix inconsistency between model name and file name in python client +* dfbef4374 Fixed unicode error and supported allow_nonstandard_methods in tornado based python client +* f6e0e297e \[python-asyncio] tests and fixes + +* ### R +* 61e58d649 Add R namespace file + +* ### Ruby +* a08164592 fix ruby parameters in documentation, fix reuqiredParams, optionalParams +* 8e34f9a98 update to newer version of ruby +* aa6b217bb \[Ruby] Add auto-generated rubocop config file + +* ### Rust +* b44357394 \[Rust] Implement minimal auth support +* 0b845a57e \[Rust] Changes hard coded body to dynamic parameter name - +* a3c97753f \[Rust] Handles UUID as string +* 027df610b \[Rust] Handle error response statuses +* 66be7a791 \[Rust] Add user agent handling for rust template (master) +* 3029b7b0f \[Rust] Format example with rustfmt + +* ### Scala +* 197b4481e normalize akka-scala and Java README +* 612cfb7af \[Akka-scala] Clean unused dependencies such swagger-core +* 86697fedb \[Scala][Gatling] correct body params filename +* 832919b84 \[Scala][Akka] Remove unused dep when model package is empty + +* ### Swift +* 40d5d0990 \[Swift4] accept empty content with default client +* 3b7230b17 \[Swift 4] Fix APIHelper to accept array parameter +* e22faf4cd \[Swift] Add public initializer for modelObject. +* b184fb1d9 \[Swift3] escape URL parameters +* 52f606b8d Fix Swift3 test cases and add pom.xml, travis config for iOS test +* a3d0f1d4b Swift4: make generated models structs instead of classes + +* ### TypeScript +* f615d823f update ts node dependencies +* 9ac9bc0dc \[TypeScript] enhance ts import +* 009dcf009 Mark `not required` swagger properties as optional typescript properties +* bdd2c2a4e Misc typescript Angular code generation improvements +* 260375c9e Fix typescript-node generation of array type models +* d1933b5fc Fix a problem in the generation of typescript-jquery when we have enum in a query param +* 20305139b \[Feature][TypeScript] request param enum as literal unions +* 524f162e6 Use supportsES6 flag in ts compilation for language typescript-angular +* 9b8602311 \[TypeScript] Make OpenAPI Generator serialize subclasses properly (#102) +* 4bc5ffe86 \[typescript-angular] add provided in support (#120) +* ef832e715 \[Feature][TS Angular] improve docs angular import +* fc7e08346 \[TS][Fetch] Add interfaces option +* 157e6b7fa \[angular] Add option to generate tagged unions +* 7faaa091c Fix generated module imports in Aurelia APIs +* b5f0b24ba \[TS] fix object declaration in model + +* ## API Servers +* ### C++ +* 6fef0a7ff fix string issue with restbed generator +* a339422bd move get type declaration method to c++ restbed + +* ### C# +* d9d653016 \[aspnetcore] Make the use of Swashbuckle optional (#110) +* 9a8183ab0 \[aspnetcore] Fix openapi.json location rename (#56) +* 12abfb968 \[aspnetcore] Update Dockerfile +* 866817587 \[aspnetcore] Fix string enum generation + +* ### Java +* bd50d368e \[JAVA - jaxrs-reasteasy-eap] Add import to models (#179) +* 7efda597c Fix issue with useBeanValidation option in Java server generators (#160) +* 71b5de3ed Do not set contextPath for spring-boot (#104) +* b73ab0260 jaxrs-cxf-cdi: fix outer enum (#131) +* 4d7fc046f \[JaxRS] Add "validation-api" dependency in jetty (#30) +* ce930e7a6 \[Jaxrs-cxf] Add bean-level cascaded beanvalidation for pojos (@Valid) +* 386b9f432 Modify "postProcessOperations" for "jaxrs-cxf-client" +* 5d92717dc update jaxrs to listent at port 10080 +* 7c2031675 update artifict id for jaxrs datelib j8 +* 88c5112f2 Adds support for returning response in jaxrs-spec interfaces +* 6bf84d5fa \[JAXRS-SPEC] Fix lowercase enums sent as uppercase +* 3a1922bc9 Fix version for "spring-boot-maven-plugin" (#85) +* 161948657 Add reactive option for Spring Boot (webflux) +* ff1178ad7 \[Java][Spring] fix missing optional query params +* 2103fadab Fix package declaration for play-framework +* 2c6380c84 fix inner item (list, map) for play framework +* e33b350c8 Fix an issue in Play Framework generator where a CSV is empty and transferred to the controllerImp with an empty item. +* 99fc27246 \[JAX-RS][Spec] Removes throws Exception. +* fe2a44339 Fixes issue (SpringCodeGen dateLibrary "java8-localdatetime" option is ignored). +* d890d733f \[JaxRS][Java] issue with implFolder on windows, and required fields generation for containers (#88) +* c91ce17ae Feature/javaPlayWithAsynchronousControllers +* f00a1ef52 \[JAVA] Correct consumes/produces attributes for Spring Controllers +* d14318cf2 \[JAVA][Spring] Optional params with delegate +* 3f81378d7 \[java resteasy] fix string comparison (#134) +* 5ea3d3bb1 \[JAX-RS][SPEC] Bug fix that prevents generating interfaces when interfaceOnly is false. + +* ### Kotlin +* 7cad47dd3 \[kotlin-server] --library=ktor (barebones implementation) +* 752b36e66 \[Kotlin] Sanitize enumeration name to add underscore when it starts with digits (#77) + +* ### NodeJS +* 6d88d073c \[NodeJS] make serverPort configurable via CLI option +* e7f4fb3c4 Fix nodejs-server path issue in windows platform + +* ### PHP +* d30fcbabb Fixes for php-ze-ph generator +* 60e3339aa \[Feature][PHP] Update for ze-ph generator + +* ### Python +* 62b93fc5c \[Python][Flask] Handles UUID format - +* 9999eac52 fix python flask parameter naming + +* ### Scala +* d5c355a59 \[Scalatra] Updated the version of Scalatra to the latest (2.6.2) +* 52322c47c \[finch] Allow finch server to compile for CI checks (#7) + +* ### Ruby +* dcad9ae80 \[Rails5] make version of the generated Rails stub server to strict Rails 5.0 + +* ### Rust +* 37faaf926 \[rust-server] API version constant and composite version support +* 6c7813e79 \[rust-server] asynchronous support via hyper v0.11 + +* ## Documentation +* 25a6a9d44 html: fix typo in class name + + +* ## Miscellaneous +* f04213285 Cli error message improvements (#172) +* 0ece706a4 Remove CodegenConfig.fromModel(String, Schema) method (#90) +* 64f2bea37 Fix getReferenced...() methods in ModelUtils (#157) +* 16ff5174e Update swagger-parser to 2.0.1 (#123) +* 76b7307a6 DefaultGenerator: ignore only form param schemas (#74) +* a3aabd390 Create a default implementation of delegate if none could be autowired (#92) +* ca89af808 Switch to Java 8 +* 27426f7b5 Cli generator name option, replaces 'language' options in CLI and Maven Plugin (#57) +* a1ff50241 Rename datatype to dataType in CodegenProperty (#69) +* 3b9a2a7c3 CaseFormatLambda has been added, params for Rest-assured client has been refactored (#91) +* 488910362 Set parameters allowableValues dynamically (#65) +* 2821f18b9 Meta: set version for "build-helper-maven-plugin" (#89) +* 82d9e935e Add CORS configuration to openapi-generator-online (#71) +* e3814f51d Improvements to online codegen (#55) +* 6b8079808 Consider minLength, maxLength and pattern in referenced schema (#45) +* 7c5dfbfa0 Minor improvements to OpenAPI Generator Online (#54) +* 8dd46a3fb Move online gen from jersey to spring boot (#44) +* 803821e21 Fix an issue with example generator when array is too large (#46) +* 673f2bc46 Add CodegenProperty.nameInSnakeCase (#42) +* 67ebe17dd Fix isPrimitiveType flag for array of form parameters (#38) +* 10ac4024d Code clean-up: remove field declaration hiding existing fields (#35) +* ab9c4b5a6 Code clean-up: Add own private static final LOGGER in each class (#26) +* 41b0ff351 Code clean-up: remove DefaultCodegen#getSimpleRef(String) (#19) +* 13f084e7b Fix dataTypeWithEnum for array of form parameters +* fd3b883e8 \[DefaultCodegen] Fill CodegenOperation::produces with unique media types +* db9a899a0 update getSchemaType variable, remove unused import +* d74b4cdf8 fix map type and collection format for form parameter (array) +* d99f46cff Revise how to obtain the example value +* b1eac05b2 Fix form datatype (array of string) +* 3c666a6d4 Fix array of form parameters +* 1492df6ce Override server port for Jetty configuration +* 622a75b2c Fix data type shadowing +* 861d11d01 use vendor extension in operation to set the body parameter name +* 80c8b92cb add postProcessParamter for body, form parameter +* 7fe555a51 Set collectionFormat default only for array +* 16589de97 default collection format to csv according to the spec +* edbe4902a Consider '$ref' for consumes and produces in CodegenOperation +* e24238a35 Improve getter name handling for boolean properties +* 6e2ca294b update discriminator to discriminatorName +* 74075c087 Primitive datatype in Schema components +* d8abd4a14 support map in body parameter +* 186594115 Update swagger-core to 2.0.1 +* 2034f61e5 Add HideGenerationTimestamp getter and setter in the CodegenConfig interface +* d0e2d7684 Getter and Setter for hideGenerationTimestamp +* adbde2fb6 replace fromOperation with postProcessOperations +* 9d1ae0dd2 fix bigdecimal in default codegen +* ffa0e115d fix default value and type declaration +* 0e744adb8 Apply collection format to SIMPLE enum style +* 36ed29852 Tweak tests according to the parameter order changes +* 17b082793 Move 'enum_query_double' to parameters section +* 28fcf48f4 Add a method returns discriminator name +* 7daa2ec5d Fix broken discriminator +* faa901640 Replace with the helper function: `getTypeDeclaration` +* c8650d0e3 Make optional properties in models optional parameters +* 40c30dd2f Fix inputSpec for multi module builds +* 5326152cc add option to reorder form/body parameter +* d1850091a Improve JMeter Template +* fedfb0cda Factorize addOption/addSwitch method +* e73eeb4fd fix for stripping prefix on single enums +* 13e3db59e Add operationIdOriginal to store the original operationId +* 0b2d80569 Expose getter/setter for serverPort to facilitate testing +* 8e270f465 add vendorExtensions field in CodegenSecurity class +* 1ee85de94 Added Intelli J ignore +* 7b8e409cf Added gitignore generation function diff --git a/docs/building.md b/docs/building.md new file mode 100644 index 000000000000..aa029b4cb664 --- /dev/null +++ b/docs/building.md @@ -0,0 +1,76 @@ +--- +id: contribute-building +title: Building the code +--- + +## Using Maven + +To build from source, you need the following installed and available in your `$PATH:` + +* [Java 8](http://java.oracle.com) + +* [Apache maven 3.3.4 or greater](http://maven.apache.org/) + +After cloning the project, you can build it from source with this command: + +```bash +mvn clean install +``` + +If you don't have maven installed, you may directly use the included [maven wrapper](https://github.com/takari/maven-wrapper), and build with the command: + +```bash +./mvnw clean install +``` + +## Using Docker + +You can use `run-in-docker.sh` to do all development. This script maps your local repository to `/gen` +in the docker container. It also maps `~/.m2/repository` to the appropriate container location. + +To execute `mvn package`: + +```bash +git clone https://github.com/openapitools/openapi-generator +cd openapi-generator +./run-in-docker.sh mvn package +``` + +Build artifacts are now accessible in your working directory. + +Once built, `run-in-docker.sh` will act as an executable for openapi-generator-cli. To generate code, you'll need to output to a directory under `/gen` (e.g. `/gen/out`). For example: + +```bash +./run-in-docker.sh help # Executes 'help' command for openapi-generator-cli +./run-in-docker.sh list # Executes 'list' command for openapi-generator-cli +./run-in-docker.sh /gen/bin/go-petstore.sh # Builds the Go client +./run-in-docker.sh generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml \ + -g go -o /gen/out/go-petstore -DpackageName=petstore # generates go client, outputs locally to ./out/go-petstore +``` + +### Docker in Vagrant + +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 +cd openapi-generator +vagrant up +vagrant ssh +cd /vagrant +./run-in-docker.sh mvn package +``` + +### Troubleshooting + +If an error like this occurs, just execute the **mvn clean install -U** command: + +> org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.19.1:test (default-test) on project openapi-generator: A type incompatibility occurred while executing org.apache.maven.plugins:maven-surefire-plugin:2.19.1:test: java.lang.ExceptionInInitializerError cannot be cast to java.io.IOException + +```bash +./run-in-docker.sh mvn clean install -U +``` + +> Failed to execute goal org.fortasoft:gradle-maven-plugin:1.0.8:invoke (default) on project openapi-generator-gradle-plugin-mvn-wrapper: org.gradle.tooling.BuildException: Could not execute build using Gradle distribution 'https://services.gradle.org/distributions/gradle-4.7-bin.zip' + +Right now: no solution for this one :| diff --git a/docs/conduct.md b/docs/conduct.md new file mode 100644 index 000000000000..dfaf2b72b7dc --- /dev/null +++ b/docs/conduct.md @@ -0,0 +1,49 @@ +--- +id: code-of-conduct +title: Code of Conduct +--- + +## Our Pledge + +In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. + +## Our Standards + +Examples of behavior that contributes to creating a positive environment include: + +* Using welcoming and inclusive language +* Being respectful of differing viewpoints and experiences +* Gracefully accepting constructive criticism +* Focusing on what is best for the community +* Showing empathy towards other community members + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery and unwelcome sexual attention or advances +* Trolling, insulting/derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or electronic address, without explicit permission +* Other conduct which could reasonably be considered inappropriate in a professional setting + +## Our Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. + +Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. + +## Scope + +This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at team@openapitools.org. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. + +Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version] + +[homepage]: http://contributor-covenant.org +[version]: http://contributor-covenant.org/version/1/4/ diff --git a/docs/contributing.md b/docs/contributing.md new file mode 100644 index 000000000000..a23ab1b7cb6b --- /dev/null +++ b/docs/contributing.md @@ -0,0 +1,107 @@ +--- +id: contributing +title: Guidelines For Contributing +sidebar_label: Guidelines +--- + +## Before submitting an issue + + - If you're not using the latest master to generate API clients or server stubs, please give it another try by pulling the latest master as the issue may have already been addressed. Ref: [Getting Started](https://github.com/openapitools/openapi-generator#getting-started) + - Search the [open issue](https://github.com/openapitools/openapi-generator/issues) and [closed issue](https://github.com/openapitools/openapi-generator/issues?q=is%3Aissue+is%3Aclosed) to ensure no one else has reported something similar before. + - File an [issue ticket](https://github.com/openapitools/openapi-generator/issues/new) by providing all the required information. + - Test with the latest master by building the JAR locally to see if the issue has already been addressed. + - You can also make a suggestion or ask a question by opening an "issue". + +## Before submitting a PR + + - Search the [open issue](https://github.com/openapitools/openapi-generator/issues) to ensure no one else has reported something similar and no one is actively working on similar proposed change. + - If no one has suggested something similar, open an ["issue"](https://github.com/openapitools/openapi-generator/issues) with your suggestion to gather feedback from the community. + - If you're adding a new option to a generator, please consider using the `-t` option with customized templates instead or start a discussion first by opening an issue as we want to avoid adding too many options to the generator. + - It's recommended to **create a new git branch** for the change so that the merge commit message looks nicer in the commit history. + +## How to contribute + +### git + +If you're new to git, you may find the following FAQs useful: + +https://github.com/openapitools/openapi-generator/wiki/FAQ#git + +### Branches + +Please file the pull request against the correct branch, e.g. `master` for non-breaking changes. See the [Git Branches](https://github.com/OpenAPITools/openapi-generator/wiki/Git-Branches) page for more information. + +### Code generators + +All the code generators can be found in [modules/openapi-generator/src/main/java/org/openapitools/codegen/languages](https://github.com/openapitools/openapi-generator/tree/master/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages) + +### Templates + +All the templates ([mustache](https://mustache.github.io/)) can be found in [modules/openapi-generator/src/main/resources](https://github.com/openapitools/openapi-generator/tree/master/modules/openapi-generator/src/main/resources). + +For a list of variables available in the template, please refer to this [page](https://github.com/openapitools/openapi-generator/wiki/Mustache-Template-Variables) + + +### Style guide +Code change should conform to the programming style guide of the respective languages: +- Ada: https://en.wikibooks.org/wiki/Ada_Style_Guide/Source_Code_Presentation +- Android: https://source.android.com/source/code-style.html +- Bash: https://github.com/bahamas10/bash-style-guide +- C#: https://msdn.microsoft.com/en-us/library/vstudio/ff926074.aspx +- C++: https://google.github.io/styleguide/cppguide.html +- C++ (Tizen): https://wiki.tizen.org/Native_Platform_Coding_Idiom_and_Style_Guide#C.2B.2B_Coding_Style +- Clojure: https://github.com/bbatsov/clojure-style-guide +- Dart: https://www.dartlang.org/guides/language/effective-dart/style +- Elixir: https://github.com/christopheradams/elixir_style_guide +- Eiffel: https://www.eiffel.org/doc/eiffel/Coding%20Standards +- Erlang: https://github.com/inaka/erlang_guidelines +- Haskell: https://github.com/tibbe/haskell-style-guide/blob/master/haskell-style.md +- Java: https://google.github.io/styleguide/javaguide.html +- JavaScript: https://github.com/airbnb/javascript/ +- Kotlin: https://kotlinlang.org/docs/reference/coding-conventions.html +- Groovy: http://groovy-lang.org/style-guide.html +- Go: https://github.com/golang/go/wiki/CodeReviewComments +- ObjC: https://github.com/NYTimes/objective-c-style-guide +- Perl: http://perldoc.perl.org/perlstyle.html +- PHP: https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md +- PowerShell: https://msdn.microsoft.com/en-us/library/dd878270(v=vs.85).aspx +- Python: https://www.python.org/dev/peps/pep-0008/ +- R: https://google.github.io/styleguide/Rguide.xml +- Ruby: https://github.com/bbatsov/ruby-style-guide +- Rust: https://github.com/rust-lang-nursery/fmt-rfcs/blob/master/guide/guide.md (the default [rustfmt](https://github.com/rust-lang-nursery/rustfmt) configuration) +- Scala: http://docs.scala-lang.org/style/ +- Swift: [Apple Developer](https://developer.apple.com/library/prerelease/ios/documentation/Swift/Conceptual/Swift_Programming_Language/TheBasics.html) +- TypeScript: https://github.com/Microsoft/TypeScript/wiki/Coding-guidelines + +For other languages, feel free to suggest. + +You may find the current code base not 100% conform to the coding style and we welcome contributions to fix those. + +For [Vendor Extensions](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#vendorExtensions), please follow the naming convention below: +- For general vendor extension, use lower case and hyphen. e.g. `x-is-unique`, `x-content-type` +- For language-specified vendor extension, put it in the form of `x-{lang}-{extension-name}`. e.g. `x-objc-operation-id`, `x-java-feign-retry-limit` +- For a list of existing vendor extensions in use, please refer to https://github.com/openapitools/openapi-generator/wiki/Vendor-Extensions. If you've added new vendor extensions as part of your PR, please update the wiki page. + +### Testing + +To add test cases (optional) covering the change in the code generator, please refer to [modules/openapi-generator/src/test/java/org/openapitools/codegen](https://github.com/openapitools/openapi-generator/tree/master/modules/openapi-generator/src/test/java/org/openapitools/codegen) + +To test the templates, please perform the following: +- Update the Petstore sample by running the shell script under `bin` folder. For example, run `./bin/ruby-petstore.sh` to update the Ruby PetStore API client under [`samples/client/petstore/ruby`](https://github.com/openapitools/openapi-generator/tree/master/samples/client/petstore/ruby) For Windows, the batch files can be found under `bin\windows` folder. (If you find that there are new files generated or unexpected changes as a result of the update, that's not unusual as the test cases are added to the OpenAPI spec from time to time. If you've questions or concerns, please open a ticket to start a discussion) +- Run the tests in the sample folder, e.g. in `samples/client/petstore/ruby`, run `mvn integration-test -rf :RubyPetstoreClientTests`. (some languages may not contain unit testing for Petstore and we're looking for contribution from the community to implement those tests) +- Finally, git commit the updated samples files: `git commit -a` + (`git add -A` if added files with new test cases) +- For new test cases, please add to the [Fake Petstore spec](https://github.com/OpenAPITools/openapi-generator/blob/master/modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml) + +To start the CI tests, you can run `mvn verify -Psamples` (assuming you've all the required tools installed to run tests for different languages) or you can leverage http://travis-ci.org to run the CI tests by adding your own openapi-generator repository. + +### Tips +- Smaller changes are easier to review +- [Optional] For bug fixes, provide a OpenAPI Spec to repeat the issue so that the reviewer can use it to confirm the fix +- Add test case(s) to cover the change +- Document the fix in the code to make the code more readable +- 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 +- 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/core-team.md b/docs/core-team.md new file mode 100644 index 000000000000..e782b2d03f52 --- /dev/null +++ b/docs/core-team.md @@ -0,0 +1,12 @@ +--- +id: core-team +title: Core Team Members +--- + +* [@wing328](https://github.com/wing328) (2015/07) +* [@jimschubert](https://github.com/jimschubert) (2016/05) +* [@cbornet](https://github.com/cbornet) (2016/05) +* [@jaz-ah](https://github.com/jaz-ah) (2016/05) +* [@ackintosh](https://github.com/ackintosh) (2018/02) +* [@JFCote](https://github.com/JFCote) (2018/03) +* [@jmini](https://github.com/jmini) (2018/04) \ No newline at end of file diff --git a/docs/customization.md b/docs/customization.md index 32b784d7f6bc..c696f4a04423 100644 --- a/docs/customization.md +++ b/docs/customization.md @@ -1,26 +1,9 @@ -## Customization +--- +id: customization +title: Customization +--- -### Modifying a template - -Clone OpenAPI Generator and navigate to `modules/openapi-generator/src/main/resources/${template}`, where `${template}` is the name of the generator you wish to modify. For example, if you are looking for the C# template, it's named `csharp`. This directory contains all the templates used to generate your target client/server/doc output. - -Templates consist of multiple mustache files. [Mustache](https://mustache.github.io/) is used as the templating language for these templates, and the specific engine used is [jmustache](https://github.com/samskivert/jmustache). - -If you wish to modify one of these templates, copy and paste the template you're interested in to a templates directory you control. To let OpenAPI Generator know where this templates directory is, use the `-t` option (e.g: `-t ./templates/`). - -To tie that all together (example for modifying ruby templates): - -```sh -mkdir templates -export template=ruby -cp -r modules/openapi-generator/src/main/resources/${template} templates/${template} -java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar generate \ - -t ./templates/${template} -g ruby -i ./foo.yml -o ./out/ruby -``` - -_**Note:** You cannot use this approach to create new templates, only override existing ones. If you'd like to create a new generator within the project, see `new.sh` in the repository root._ - -### Creating a new template +## Creating a new template If none of the templates suit your needs, you can create a brand new template. OpenAPI Generator can help with this, using the `meta` command: @@ -35,7 +18,7 @@ These names can be anything you like. If you are building a client for the white **NOTE** Convention is to use kebab casing for names passed to `-n`. Example, `scala-finatra` would become `ScalaFinatraGenerator`. -#### Use your new generator with the CLI +### Use your new generator with the CLI To compile your library, enter the `out/generators/my-codegen` directory, run `mvn package` and execute the generator: @@ -65,7 +48,7 @@ java -cp out/codegens/customCodegen/target/my-codegen-openapi-generator-1.0.0.ja -o ./out/myClient ``` -#### Use your new generator with the maven plugin +### Use your new generator with the maven plugin Install your library to your local maven repository by running: @@ -106,7 +89,7 @@ You can use this as additional dependency of the `openapi-generator-maven-plugin If you publish your artifact to a distant maven repository, do not forget to add this repository as `pluginRepository` for your project. -### Selective generation +## Selective generation You may not want to generate *all* models in your project. Likewise you may want just one or two apis to be written. If that's the case, you can use system properties to control the output: The default is generate *everything* supported by the specific library. Once you enable a feature, it will restrict the contents generated: @@ -164,7 +147,7 @@ java -DskipFormModel=true This option will be helpful to skip model generation due to the form parameter, which is defined differently in OAS3 as there's no form parameter in OAS3 -### Ignore file format +## Ignore file format OpenAPI Generator supports a `.openapi-generator-ignore` file, similar to `.gitignore` or `.dockerignore` you're probably already familiar with. @@ -206,7 +189,7 @@ Upon first code generation, you may also pass the CLI option `--ignore-file-over Editor support for `.openapi-generator-ignore` files is available in IntelliJ via the [.ignore plugin](https://plugins.jetbrains.com/plugin/7495--ignore). -### Customizing the generator +## Customizing the generator There are different aspects of customizing the code generator beyond just creating or modifying templates. Each language has a supporting configuration file to handle different type mappings, etc: @@ -300,7 +283,7 @@ and specify the `classname` when running the generator: Your subclass will now be loaded and overrides the `PREFIX` value in the superclass. -### Bringing your own models +## Bringing your own models Sometimes you don't want a model generated. In this case, you can simply specify an import mapping to tell the codegen what _not_ to create. When doing this, every location that references a specific model will diff --git a/docs/debugging.md b/docs/debugging.md new file mode 100644 index 000000000000..99c47c658ea0 --- /dev/null +++ b/docs/debugging.md @@ -0,0 +1,64 @@ +--- +id: debugging +title: Debugging +--- + +## Templates + +Sometimes, you may have issues with variables in your templates. As discussed in the [templating](./templating.md) docs, we offer a variety of system properties for inspecting the models bound to templates. + +
+
-DdebugOpenAPI
+
Prints out the JSON model of the OpenAPI Document, as seen by OpenAPI Generator
+
-DdebugModels
+
Prints out the JSON model passed to model templates
+
-DdebugOperations
+
Prints out the JSON model passed to operation (api) templates
+
-DdebugSupportingFiles
+
Prints out the JSON model passed to supporting files
+
+ +One or more of these properties can be passed alongside other command line options: + +```bash +openapi-generator generate -g go \ + -o out \ + -i petstore-minimal.yaml \ + -DdebugModels \ + -DdebugOperations +``` + +Or you can add these to your `JAVA_OPTS` environment variable (this applies to every invocation of the tool): + +```bash +export JAVA_OPTS="${JAVA_OPTS} -DdebugModels -DdebugOperations" +``` + +> NOTE: Globally available system options like these will apply to all invocations of the generator (CLI and plugins) + +## Runtime + +When you're working with a custom generator, a new generator, or otherwise trying to understand the behavior of the toolset, you may need to attach a remote debugger in order to step through the code. + +The steps are shown here for a specific version of the generator, but apply the same if you're working off master or a feature branch. + +* Determine the version of `openapi-generator` you're using. For the CLI, this is: + ``` + openapi-generator version + ``` +* Navigate to the `openapi-generator` source directory (see [building](./building.md) docs for obtaining source code and brief introduction). +* Checkout the branch/tag for the target version. Branches are not prefixed, but tags are prefixed with a `v`. For instance if you're using version `3.3.0`, you will execute: + ``` + git checkout v3.3.0 + ``` +* Open the project in your IDE. +* Setup your IDE for remote debugging. You'll want to define a port used for connecting the remote debugger. For this example, we'll use `5005`. See external tutorials for [IntelliJ](https://www.jetbrains.com/help/idea/run-debug-configuration-remote-debug.html) and [Eclipse](https://www.ibm.com/developerworks/library/os-eclipse-javadebug/index.html) +* Export the debug configuration, specifying `suspend=y` so you have time to attach a remote debugger. These are passed as Java system properties, either on command line or as part of the `JAVA_OPTS` environment variable. This will look like: + ``` + export JAVA_OPTS="${JAVA_OPTS} -agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=5005" + ``` +* Execute the generator with your desired options. You should see the application output _only_ + ``` + Listening for transport dt_socket at address: 5005 + ``` +* Set breakpoints in code, and then attach your remote debugger from your IDE (see above). The generator will automatically unblock once the remote debugger is attached. You can now step through the code. diff --git a/docs/faq-contributing.md b/docs/faq-contributing.md new file mode 100644 index 000000000000..19fe39ee0e8f --- /dev/null +++ b/docs/faq-contributing.md @@ -0,0 +1,66 @@ +--- +id: faq-contributing +title: FAQ: Contributing +--- + +## Automated checks on my PR have failed. Do you know what's wrong? + +Please do the following: + +* Click on the failed tests and check the log to see what's causing the errors. +* If it's related to connection timeout in downloading dependencies, please restart the CI jobs (which can be done by closing and reopening the PR) +* If it's some other reason, please tag someone on the [core team](./core-team.md) for assistance. + +## The public petstore server returns status 500, can I run it locally? + +Yes, please run the following commands (assuming you've docker installed): + +``` +docker pull swaggerapi/petstore +docker run -d -e SWAGGER_HOST=http://petstore.swagger.io -e SWAGGER_BASE_PATH=/v2 -p 80:8080 swaggerapi/petstore +docker ps -a +``` + +Then add the following to your local [hosts](https://en.wikipedia.org/wiki/Hosts_%28file%29) table: + +``` +127.0.0.1 petstore.swagger.io +``` + +## Who should I report a security vulnerability to? + +Please contact team@openapitools.org with the details and we'll follow up with you. + + +## How can I rebase my PR on the latest master? + +Please refer to http://rypress.com/tutorials/git/rebasing, or follow the steps below (assuming the branch for the PR is "fix_issue_9999"): + +1. git checkout master +2. git pull upstream master (assuming `upstream` is pointing to the official repo) +3. git checkout fix_issue_9999 +4. git rebase master +5. Resolve merge conflicts, if any, and run "git commit -a" +6. Rebase done (you may need to add --force when doing `git push`) + +(To setup `upstream` pointing to the official repo, please run `git remote add upstream https://github.com/openapitools/openapi-generator.git`) + +## How can I update commits that are not linked to my Github account? + +Please refer to https://stackoverflow.com/questions/3042437/how-to-change-the-commit-author-for-one-specific-commit or you can simply add the email address in the commit as your secondary email address in your Github account. + +## Any useful git tips to share? + +Yes, http://www.alexkras.com/19-git-tips-for-everyday-use/ + +## How can I submit a PR to fix bugs or make enhancements? + +Visit https://github.com/openapitools/openapi-generator and then click on the "Fork" button in the upper right corner. Then in your local machine, run the following (assuming your github ID is "your_user_id") + +1) git clone https://github.com/your_user_id/openapi-generator.git +2) cd openapi-generator +3) git checkout -b fix_issue9999 +4) make changes +5) git commit -a (you may need to use `git add filename` to add new files) +6) git push origin fix_issue9999 +7) Visit https://github.com/openapitools/openapi-generator in your browser and click on the button to file a new PR based on fix_issue9999 diff --git a/docs/faq-extending.md b/docs/faq-extending.md new file mode 100644 index 000000000000..d75469f94bc3 --- /dev/null +++ b/docs/faq-extending.md @@ -0,0 +1,40 @@ +--- +id: faq-extending +title: FAQ: Extending +--- + +## How do I use my own Java models? + +See [Bringing your own Models](./customization.md#bringing-your-own-models). + +## How do I disable certificate verification? + +Please add `-Dio.swagger.v3.parser.util.RemoteUrl.trustAll=true` when generating the code. + +## How do I skip files during code generation? + +OpenAPI Generator has a built-in ignore file processor. + +For example, to skip `git_push.sh`, one can create a file named `.openapi-generator-ignore` in the root of the output directory with the contents: + +``` +# Prevent generator from creating these files: +git_push.sh +``` + +The ignore file works just like .gitignore, and it is auto-generated by default. + +If you need this functionality on initial generation, you can provide the option `--ignore-file-override` (CLI) or `ignoreFileOverride` (Maven and Gradle plugins) with a value targeting any existing file. The contents of that file will be evaluated relative to the output directory. + + +## How can I customize the auto-generated code? + +Variants: + +* "How can I add a header/footer to generated code?" +* "How can I add my own logging to generated code?" +* "How can I add my license to the top of files?" + +OpenAPI Generator supports user-defined templates without need to recompile the artifact. We also support custom generators (templates and logic) if those generators are accessible on the classpath. + +See [templating: Modifying Templates](./templating.md#modifying-templates) and [customization](./customization.md) docs for more details. diff --git a/docs/faq-generators.md b/docs/faq-generators.md new file mode 100644 index 000000000000..66fd5b08967c --- /dev/null +++ b/docs/faq-generators.md @@ -0,0 +1,115 @@ +--- +id: faq-generators +title: FAQ: Generators +--- + +### What are some server generator use cases? + +We have around 40+ server generators, with more added regularly. Some of these include Spring in your choice of Java or Kotlin, the Finch and Scalatra frameworks using Scala, and C# generators for NancyFX and WebAPI (to name only a few). + +Besides generating the server code as a starting point to implement the API backend, here are some use cases of the server generators: + +* **prototyping** - one can generate the server code and have a functional API backend very quickly to try different things or features. +* **mocking** - easily provide an API backend for mocking based on the examples field defined in the response object. +* **migration** - let's say one wants to migrate an API backend from Ruby on Rails to Java Spring. The server generator can save a lot of time in implementing and verify each endpoint in the new API backend. +* **evaluating** - when you want to try a new language or framework, and a typical "Hello, World" is too trivial. + +## Java + +### The API client has SSL errors due to an invalid certificate. Is there a way to bypass that? + +Yes, please refer to http://stackoverflow.com/a/6055903/677735 + +### How can I customize the Feign client templates? + +You will need to provide customized files in `Java/libraries/feign` under the resources folder and pass the location via the `-t` option. + +In your Gradle build script, please add the following (example): +``` +config.templateDir = 'src/openapi-generator-templates/Java/libraries/feign +``` + +## Android + +### How can I generate an Android SDK? + +**The Java SDK is also compatible with Android.** + +[RECOMMENDED] To generate the Java SDK with `okhttp` and `gson` libraries, run the following: +``` +mvn clean package +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.json \ + -l java --library=okhttp-gson \ + -D hideGenerationTimestamp=true \ + -o /var/tmp/java/okhttp-gson/ +``` + +You can also generate the Java SDK with other HTTP libraries by replacing `okhttp-gson` with `retrofit` for example. For a list of support libraries, please run + +``` +java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar config-help -l java +``` + +To generate the Android SDK with [`volley`](https://github.com/mcxiaoke/android-volley), please run +``` +mvn clean package +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.json \ + -l android --library=volley \ + -o /var/tmp/android/volley/ +``` +We do **not** recommend using the default HTTP library (Apache HttpClient) with `android` as it's not actively maintained. + +## C-Sharp + +### How do I fix `CSC: warning CS2002` in Xamarin? + +The full warning might look like this: `CSC: warning CS2002: Source file 'Api/FakeApi.cs' specified multiple times` + +The warning has no impact on the build process so you should be able to build the solution without issue. The warning should be addressed in the upcoming stable release of Xamarin. + +## Objective-C + +### How do I run integration test with Petstore ObjC API client? + +Here are the steps: +``` +git clone https://github.com/openapitools/openapi-generator.git +cd openapi-generator/samples/client/petstore/objc/default/OpenAPIClientTests +mvn integration-test +``` + +Besides `default` (folder) ObjC API client, there's also `core-data` for another ObjC API client with [Core Data support](https://en.wikipedia.org/wiki/Core_Data). + +## Swift + +### How do I run integration test with Petstore Swift API client? + +Here are the steps: +``` +git clone https://github.com/openapitools/openapi-generator.git +cd openapi-generator/samples/client/petstore/swift/default/OpenAPIClientTests +mvn integration-test +``` +Besides `default` (folder), there's another folder `promisekit` for Swift API client with [PromiseKit support](https://github.com/mxcl/PromiseKit) +``` +git clone https://github.com/openapitools/openapi-generator.git +cd openapi-generator/samples/client/petstore/swift/promisekit/OpenAPIClientTests +mvn integration-test +``` + +### Is Swift (2.x) generator still actively maintained? + +No, please use `swift3` or `swift4` generator instead as we want to focus on Swift 3.x, 4.x. + +## TypeScript + +### The JSON response fails to deserialize due to change in variable naming (snake_case to camelCase). Is there any way to keep the original naming? + +Yes, please use the following option when generating TypeScript clients: + +``` + modelPropertyNaming + Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name (Default: camelCase) +``` diff --git a/docs/faq.md b/docs/faq.md new file mode 100644 index 000000000000..3e6ce24e19bc --- /dev/null +++ b/docs/faq.md @@ -0,0 +1,18 @@ +--- +id: faq +title: FAQ: General +--- + +## Do you have a chat room? + +[![Gitter](https://img.shields.io/gitter/room/:user/:repo.svg?style=for-the-badge)](https://gitter.im/OpenAPITools/openapi-generator) + +## What is the governance structure of the OpenAPI Generator project? + +OpenAPI generator (openapi-generator) is managed by the members of the [core team](./core-team.md). + +## What is the difference between Swagger Codegen and OpenAPI Generator? + +Swagger Codegen is driven by SmartBear while OpenAPI Generator is driven by the community. More than 40 top contributors and template creators of Swagger Codegen have joined OpenAPI Generator as the founding team members. For more details, see the [Fork Q&A](./qna.md). + +Swagger is a trademark owned by SmartBear and the use of the term "Swagger" in this project is for demo (reference) purposes only. diff --git a/docs/generators.md b/docs/generators.md new file mode 100644 index 000000000000..0f15cc8c6e05 --- /dev/null +++ b/docs/generators.md @@ -0,0 +1,126 @@ +--- +id: generators +title: Generators List +--- + +The following generators are available: + +* CLIENT generators: + - [ada](generators/ada.md) + - [android](generators/android.md) + - [apex](generators/apex.md) + - [bash](generators/bash.md) + - [c](generators/c.md) + - [clojure](generators/clojure.md) + - [cpp-qt5-client](generators/cpp-qt5-client.md) + - [cpp-restsdk](generators/cpp-restsdk.md) + - [cpp-tizen](generators/cpp-tizen.md) + - [csharp](generators/csharp.md) + - [csharp-dotnet2](generators/csharp-dotnet2.md) + - [csharp-refactor](generators/csharp-refactor.md) + - [dart](generators/dart.md) + - [dart-jaguar](generators/dart-jaguar.md) + - [eiffel](generators/eiffel.md) + - [elixir](generators/elixir.md) + - [elm](generators/elm.md) + - [erlang-client](generators/erlang-client.md) + - [erlang-proper](generators/erlang-proper.md) + - [flash](generators/flash.md) + - [go](generators/go.md) + - [groovy](generators/groovy.md) + - [haskell-http-client](generators/haskell-http-client.md) + - [java](generators/java.md) + - [javascript](generators/javascript.md) + - [javascript-closure-angular](generators/javascript-closure-angular.md) + - [javascript-flowtyped](generators/javascript-flowtyped.md) + - [jaxrs-cxf-client](generators/jaxrs-cxf-client.md) + - [jmeter](generators/jmeter.md) + - [kotlin](generators/kotlin.md) + - [lua](generators/lua.md) + - [objc](generators/objc.md) + - [perl](generators/perl.md) + - [php](generators/php.md) + - [powershell](generators/powershell.md) + - [python](generators/python.md) + - [r](generators/r.md) + - [ruby](generators/ruby.md) + - [rust](generators/rust.md) + - [scala-akka](generators/scala-akka.md) + - [scala-gatling](generators/scala-gatling.md) + - [scala-httpclient](generators/scala-httpclient.md) + - [scalaz](generators/scalaz.md) + - [swift2-deprecated](generators/swift2-deprecated.md) + - [swift3-deprecated](generators/swift3-deprecated.md) + - [swift4](generators/swift4.md) + - [typescript-angular](generators/typescript-angular.md) + - [typescript-angularjs](generators/typescript-angularjs.md) + - [typescript-aurelia](generators/typescript-aurelia.md) + - [typescript-axios](generators/typescript-axios.md) + - [typescript-fetch](generators/typescript-fetch.md) + - [typescript-inversify](generators/typescript-inversify.md) + - [typescript-jquery](generators/typescript-jquery.md) + - [typescript-node](generators/typescript-node.md) + + +* SERVER generators: + - [ada-server](generators/ada-server.md) + - [aspnetcore](generators/aspnetcore.md) + - [cpp-pistache-server](generators/cpp-pistache-server.md) + - [cpp-qt5-qhttpengine-server](generators/cpp-qt5-qhttpengine-server.md) + - [cpp-restbed-server](generators/cpp-restbed-server.md) + - [csharp-nancyfx](generators/csharp-nancyfx.md) + - [erlang-server](generators/erlang-server.md) + - [go-gin-server](generators/go-gin-server.md) + - [go-server](generators/go-server.md) + - [graphql-server](generators/graphql-server.md) + - [haskell](generators/haskell.md) + - [java-inflector](generators/java-inflector.md) + - [java-msf4j](generators/java-msf4j.md) + - [java-pkmst](generators/java-pkmst.md) + - [java-play-framework](generators/java-play-framework.md) + - [java-undertow-server](generators/java-undertow-server.md) + - [java-vertx](generators/java-vertx.md) + - [jaxrs-cxf](generators/jaxrs-cxf.md) + - [jaxrs-cxf-cdi](generators/jaxrs-cxf-cdi.md) + - [jaxrs-jersey](generators/jaxrs-jersey.md) + - [jaxrs-resteasy](generators/jaxrs-resteasy.md) + - [jaxrs-resteasy-eap](generators/jaxrs-resteasy-eap.md) + - [jaxrs-spec](generators/jaxrs-spec.md) + - [kotlin-server](generators/kotlin-server.md) + - [kotlin-spring](generators/kotlin-spring.md) + - [nodejs-server](generators/nodejs-server.md) + - [php-laravel](generators/php-laravel.md) + - [php-lumen](generators/php-lumen.md) + - [php-silex](generators/php-silex.md) + - [php-slim](generators/php-slim.md) + - [php-symfony](generators/php-symfony.md) + - [php-ze-ph](generators/php-ze-ph.md) + - [python-flask](generators/python-flask.md) + - [ruby-on-rails](generators/ruby-on-rails.md) + - [ruby-sinatra](generators/ruby-sinatra.md) + - [rust-server](generators/rust-server.md) + - [scala-finch](generators/scala-finch.md) + - [scala-lagom-server](generators/scala-lagom-server.md) + - [scalatra](generators/scalatra.md) + - [spring](generators/spring.md) + + +* DOCUMENTATION generators: + - [cwiki](generators/cwiki.md) + - [dynamic-html](generators/dynamic-html.md) + - [html](generators/html.md) + - [html2](generators/html2.md) + - [openapi](generators/openapi.md) + - [openapi-yaml](generators/openapi-yaml.md) + + +* SCHEMA generators: + - [mysql-schema](generators/mysql-schema.md) + + +* CONFIG generators: + - [apache2](generators/apache2.md) + - [graphql-schema](generators/graphql-schema.md) + + + diff --git a/docs/generators/README.md b/docs/generators/README.md index 73a2d132d65d..79dff0e6defd 100644 --- a/docs/generators/README.md +++ b/docs/generators/README.md @@ -5,18 +5,21 @@ The following generators are available: - [android](android.md) - [apex](apex.md) - [bash](bash.md) + - [c](c.md) - [clojure](clojure.md) - - [cpp-qt5](cpp-qt5.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-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) @@ -42,7 +45,7 @@ The following generators are available: - [scala-httpclient](scala-httpclient.md) - [scalaz](scalaz.md) - [swift2-deprecated](swift2-deprecated.md) - - [swift3](swift3.md) + - [swift3-deprecated](swift3-deprecated.md) - [swift4](swift4.md) - [typescript-angular](typescript-angular.md) - [typescript-angularjs](typescript-angularjs.md) @@ -64,6 +67,7 @@ The following generators are available: - [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) @@ -111,6 +115,7 @@ The following generators are available: * CONFIG generators: - [apache2](apache2.md) + - [graphql-schema](graphql-schema.md) diff --git a/docs/generators/ada-server.md b/docs/generators/ada-server.md index 0cc253557025..a49975a36f40 100644 --- a/docs/generators/ada-server.md +++ b/docs/generators/ada-server.md @@ -1,19 +1,14 @@ -CONFIG OPTIONS for ada-server - - sortParamsByRequiredFlag - Sort method arguments to place required parameters before optional parameters. (Default: true) - - ensureUniqueParams - Whether to ensure parameter names are unique in an operation (rename parameters that are not). (Default: true) - - allowUnicodeIdentifiers - boolean, toggles whether unicode identifiers are allowed in names or not, default is false (Default: false) - - prependFormOrBodyParameters - Add form or body parameters to the beginning of the parameter list. (Default: false) - - projectName - GNAT project name (Default: defaultProject) - -Back to the [generators list](README.md) +--- +id: generator-opts-server-ada-server +title: Config Options for ada-server +sidebar_label: ada-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| +|projectName|GNAT project name| |defaultProject| diff --git a/docs/generators/ada.md b/docs/generators/ada.md index d26a2a3a4920..ae6eb354c5be 100644 --- a/docs/generators/ada.md +++ b/docs/generators/ada.md @@ -1,19 +1,14 @@ -CONFIG OPTIONS for ada - - sortParamsByRequiredFlag - Sort method arguments to place required parameters before optional parameters. (Default: true) - - ensureUniqueParams - Whether to ensure parameter names are unique in an operation (rename parameters that are not). (Default: true) - - allowUnicodeIdentifiers - boolean, toggles whether unicode identifiers are allowed in names or not, default is false (Default: false) - - prependFormOrBodyParameters - Add form or body parameters to the beginning of the parameter list. (Default: false) - - projectName - GNAT project name (Default: defaultProject) - -Back to the [generators list](README.md) +--- +id: generator-opts-client-ada +title: Config Options for ada +sidebar_label: ada +--- + +| 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| +|projectName|GNAT project name| |defaultProject| diff --git a/docs/generators/android.md b/docs/generators/android.md index 591cf0159dcc..e35957538f46 100644 --- a/docs/generators/android.md +++ b/docs/generators/android.md @@ -1,57 +1,26 @@ -CONFIG OPTIONS for android - - sortParamsByRequiredFlag - Sort method arguments to place required parameters before optional parameters. (Default: true) - - ensureUniqueParams - Whether to ensure parameter names are unique in an operation (rename parameters that are not). (Default: true) - - allowUnicodeIdentifiers - boolean, toggles whether unicode identifiers are allowed in names or not, default is false (Default: false) - - prependFormOrBodyParameters - Add form or body parameters to the beginning of the parameter list. (Default: false) - - modelPackage - package for generated models - - apiPackage - package for generated api classes - - invokerPackage - root package for generated code - - groupId - groupId for use in the generated build.gradle and pom.xml - - artifactId - artifactId for use in the generated build.gradle and pom.xml - - artifactVersion - artifact version for use in the generated build.gradle and pom.xml - - sourceFolder - source folder for generated code - - useAndroidMavenGradlePlugin - A flag to toggle android-maven gradle plugin. (Default: true) - - androidGradleVersion - gradleVersion version for use in the generated build.gradle - - androidSdkVersion - compileSdkVersion version for use in the generated build.gradle - - androidBuildToolsVersion - buildToolsVersion version for use in the generated build.gradle - - serializableModel - boolean - toggle "implements Serializable" for generated models (Default: false) - - 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. - -Back to the [generators list](README.md) +--- +id: generator-opts-client-android +title: Config Options for android +sidebar_label: android +--- + +| 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| +|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| +|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| +|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| diff --git a/docs/generators/apache2.md b/docs/generators/apache2.md index da09b39bdda4..d85036b228bc 100644 --- a/docs/generators/apache2.md +++ b/docs/generators/apache2.md @@ -1,19 +1,14 @@ -CONFIG OPTIONS for apache2 - - sortParamsByRequiredFlag - Sort method arguments to place required parameters before optional parameters. (Default: true) - - ensureUniqueParams - Whether to ensure parameter names are unique in an operation (rename parameters that are not). (Default: true) - - allowUnicodeIdentifiers - boolean, toggles whether unicode identifiers are allowed in names or not, default is false (Default: false) - - prependFormOrBodyParameters - Add form or body parameters to the beginning of the parameter list. (Default: false) - - userInfoPath - Path to the user and group files - -Back to the [generators list](README.md) +--- +id: generator-opts-config-apache2 +title: Config Options for apache2 +sidebar_label: apache2 +--- + +| 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| +|userInfoPath|Path to the user and group files| |null| diff --git a/docs/generators/apex.md b/docs/generators/apex.md index f9b7dd5b9bba..f90183b34a91 100644 --- a/docs/generators/apex.md +++ b/docs/generators/apex.md @@ -1,28 +1,17 @@ -CONFIG OPTIONS for apex - - sortParamsByRequiredFlag - Sort method arguments to place required parameters before optional parameters. (Default: true) - - ensureUniqueParams - Whether to ensure parameter names are unique in an operation (rename parameters that are not). (Default: true) - - allowUnicodeIdentifiers - boolean, toggles whether unicode identifiers are allowed in names or not, default is false (Default: false) - - prependFormOrBodyParameters - Add form or body parameters to the beginning of the parameter list. (Default: false) - - classPrefix - Prefix for generated classes. Set this to avoid overwriting existing classes in your org. - - apiVersion - The Metadata API version number to use for components in this package. - - buildMethod - The build method for this package. - - namedCredential - The named credential name for the HTTP callouts - -Back to the [generators list](README.md) +--- +id: generator-opts-client-apex +title: Config Options for apex +sidebar_label: apex +--- + +| 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| +|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| +|namedCredential|The named credential name for the HTTP callouts| |null| diff --git a/docs/generators/aspnetcore.md b/docs/generators/aspnetcore.md index 1db6c0b3137b..07a55944c0f1 100644 --- a/docs/generators/aspnetcore.md +++ b/docs/generators/aspnetcore.md @@ -1,34 +1,19 @@ -CONFIG OPTIONS for aspnetcore - - packageName - C# package name (convention: Title.Case). (Default: Org.OpenAPITools) - - packageVersion - C# package version. (Default: 1.0.0) - - packageGuid - The GUID that will be associated with the C# project - - sourceFolder - source folder for generated code (Default: src) - - aspnetCoreVersion - ASP.NET Core version: 2.1 (default), 2.0 (deprecated) (Default: 2.1) - - sortParamsByRequiredFlag - Sort method arguments to place required parameters before optional parameters. (Default: true) - - useDateTimeOffset - Use DateTimeOffset to model date-time properties (Default: false) - - useCollection - Deserialize array types to Collection instead of List. (Default: false) - - returnICollection - Return ICollection instead of the concrete type. (Default: false) - - useSwashbuckle - Uses the Swashbuckle.AspNetCore NuGet package for documentation. (Default: true) - -Back to the [generators list](README.md) +--- +id: generator-opts-server-aspnetcore +title: Config Options for aspnetcore +sidebar_label: aspnetcore +--- + +| Option | Description | Values | Default | +| ------ | ----------- | ------ | ------- | +|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| +|aspnetCoreVersion|ASP.NET Core version: 2.1 (default), 2.0 (deprecated)| |2.1| +|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| diff --git a/docs/generators/bash.md b/docs/generators/bash.md index 853512c85e03..4f8635935485 100644 --- a/docs/generators/bash.md +++ b/docs/generators/bash.md @@ -1,40 +1,21 @@ -CONFIG OPTIONS for bash - - sortParamsByRequiredFlag - Sort method arguments to place required parameters before optional parameters. (Default: true) - - ensureUniqueParams - Whether to ensure parameter names are unique in an operation (rename parameters that are not). (Default: true) - - allowUnicodeIdentifiers - boolean, toggles whether unicode identifiers are allowed in names or not, default is false (Default: false) - - prependFormOrBodyParameters - Add form or body parameters to the beginning of the parameter list. (Default: false) - - curlOptions - Default cURL options - - processMarkdown - Convert all Markdown Markup into terminal formatting (Default: false) - - scriptName - The name of the script that will be generated (e.g. petstore-cli) - - generateBashCompletion - Whether to generate the Bash completion script (Default: false) - - generateZshCompletion - Whether to generate the Zsh completion script (Default: false) - - hostEnvironmentVariable - Name of environment variable where host can be defined (e.g. PETSTORE_HOST='http://api.openapitools.org:8080') - - basicAuthEnvironmentVariable - Name of environment variable where username and password can be defined (e.g. PETSTORE_CREDS='username:password') - - apiKeyAuthEnvironmentVariable - Name of environment variable where API key can be defined (e.g. PETSTORE_APIKEY='kjhasdGASDa5asdASD') (Default: false) - -Back to the [generators list](README.md) +--- +id: generator-opts-client-bash +title: Config Options for bash +sidebar_label: bash +--- + +| 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| +|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| +|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| diff --git a/docs/generators/c.md b/docs/generators/c.md index dfad43b4ffc2..0a910b40d2a3 100644 --- a/docs/generators/c.md +++ b/docs/generators/c.md @@ -1,19 +1,14 @@ -CONFIG OPTIONS for c - - sortParamsByRequiredFlag - Sort method arguments to place required parameters before optional parameters. (Default: true) - - ensureUniqueParams - Whether to ensure parameter names are unique in an operation (rename parameters that are not). (Default: true) - - allowUnicodeIdentifiers - boolean, toggles whether unicode identifiers are allowed in names or not, default is false (Default: false) - - prependFormOrBodyParameters - Add form or body parameters to the beginning of the parameter list. (Default: false) - - hideGenerationTimestamp - Hides the generation timestamp when files are generated. (Default: true) - -Back to the [generators list](README.md) +--- +id: generator-opts-client-c +title: Config Options for c +sidebar_label: c +--- + +| 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| +|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true| diff --git a/docs/generators/clojure.md b/docs/generators/clojure.md index 55bc7facb49f..239b3b441418 100644 --- a/docs/generators/clojure.md +++ b/docs/generators/clojure.md @@ -1,37 +1,20 @@ -CONFIG OPTIONS for clojure - - sortParamsByRequiredFlag - Sort method arguments to place required parameters before optional parameters. (Default: true) - - ensureUniqueParams - Whether to ensure parameter names are unique in an operation (rename parameters that are not). (Default: true) - - allowUnicodeIdentifiers - boolean, toggles whether unicode identifiers are allowed in names or not, default is false (Default: false) - - prependFormOrBodyParameters - Add form or body parameters to the beginning of the parameter list. (Default: false) - - projectName - name of the project (Default: generated from info.title or "openapi-clj-client") - - projectDescription - description of the project (Default: using info.description or "Client library of ") - - projectVersion - version of the project (Default: using info.version or "1.0.0") - - projectUrl - URL of the project (Default: using info.contact.url or not included in project.clj) - - projectLicenseName - name of the license the project uses (Default: using info.license.name or not included in project.clj) - - projectLicenseUrl - URL of the license the project uses (Default: using info.license.url or not included in project.clj) - - baseNamespace - the base/top namespace (Default: generated from projectName) - -Back to the [generators list](README.md) +--- +id: generator-opts-client-clojure +title: Config Options for clojure +sidebar_label: clojure +--- + +| 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| +|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| diff --git a/docs/generators/cpp-pistache-server.md b/docs/generators/cpp-pistache-server.md index 52f9ed18c178..ac4abee691e6 100644 --- a/docs/generators/cpp-pistache-server.md +++ b/docs/generators/cpp-pistache-server.md @@ -1,10 +1,11 @@ -CONFIG OPTIONS for cpp-pistache-server - - addExternalLibs - Add the Possibility to fetch and compile external Libraries needed by this Framework. (Default: true) - - helpersPackage - Specify the package name to be used for the helpers (e.g. org.openapitools.server.helpers). (Default: org.openapitools.server.helpers) - -Back to the [generators list](README.md) +--- +id: generator-opts-server-cpp-pistache-server +title: Config Options for cpp-pistache-server +sidebar_label: cpp-pistache-server +--- + +| Option | Description | Values | Default | +| ------ | ----------- | ------ | ------- | +|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| diff --git a/docs/generators/cpp-qt5-client.md b/docs/generators/cpp-qt5-client.md index 142d5fc04af1..8c72f0bedd60 100644 --- a/docs/generators/cpp-qt5-client.md +++ b/docs/generators/cpp-qt5-client.md @@ -1,25 +1,16 @@ -CONFIG OPTIONS for cpp-qt5-client - - sortParamsByRequiredFlag - Sort method arguments to place required parameters before optional parameters. (Default: true) - - ensureUniqueParams - Whether to ensure parameter names are unique in an operation (rename parameters that are not). (Default: true) - - allowUnicodeIdentifiers - boolean, toggles whether unicode identifiers are allowed in names or not, default is false (Default: false) - - prependFormOrBodyParameters - Add form or body parameters to the beginning of the parameter list. (Default: false) - - cppNamespace - C++ namespace (convention: name::space::for::api). (Default: OpenAPI) - - cppNamespace - C++ namespace (convention: name::space::for::api). (Default: OpenAPI) - - optionalProjectFile - Generate client.pri. (Default: true) - -Back to the [generators list](README.md) +--- +id: generator-opts-client-cpp-qt5-client +title: Config Options for cpp-qt5-client +sidebar_label: cpp-qt5-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| +|cppNamespace|C++ namespace (convention: name::space::for::api).| |OpenAPI| +|cppNamespace|C++ namespace (convention: name::space::for::api).| |OpenAPI| +|optionalProjectFile|Generate client.pri.| |true| diff --git a/docs/generators/cpp-qt5-qhttpengine-server.md b/docs/generators/cpp-qt5-qhttpengine-server.md index 27f369c81fff..364066a0d82c 100644 --- a/docs/generators/cpp-qt5-qhttpengine-server.md +++ b/docs/generators/cpp-qt5-qhttpengine-server.md @@ -1,22 +1,15 @@ -CONFIG OPTIONS for cpp-qt5-qhttpengine-server - - sortParamsByRequiredFlag - Sort method arguments to place required parameters before optional parameters. (Default: true) - - ensureUniqueParams - Whether to ensure parameter names are unique in an operation (rename parameters that are not). (Default: true) - - allowUnicodeIdentifiers - boolean, toggles whether unicode identifiers are allowed in names or not, default is false (Default: false) - - prependFormOrBodyParameters - Add form or body parameters to the beginning of the parameter list. (Default: false) - - cppNamespace - C++ namespace (convention: name::space::for::api). (Default: OpenAPI) - - cppNamespace - C++ namespace (convention: name::space::for::api). (Default: OpenAPI) - -Back to the [generators list](README.md) +--- +id: generator-opts-server-cpp-qt5-qhttpengine-server +title: Config Options for cpp-qt5-qhttpengine-server +sidebar_label: cpp-qt5-qhttpengine-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| +|cppNamespace|C++ namespace (convention: name::space::for::api).| |OpenAPI| +|cppNamespace|C++ namespace (convention: name::space::for::api).| |OpenAPI| diff --git a/docs/generators/cpp-qt5.md b/docs/generators/cpp-qt5.md deleted file mode 100644 index 924187fc8e4e..000000000000 --- a/docs/generators/cpp-qt5.md +++ /dev/null @@ -1,22 +0,0 @@ - -CONFIG OPTIONS for cpp-qt5 - - sortParamsByRequiredFlag - Sort method arguments to place required parameters before optional parameters. (Default: true) - - ensureUniqueParams - Whether to ensure parameter names are unique in an operation (rename parameters that are not). (Default: true) - - allowUnicodeIdentifiers - boolean, toggles whether unicode identifiers are allowed in names or not, default is false (Default: false) - - prependFormOrBodyParameters - Add form or body parameters to the beginning of the parameter list. (Default: false) - - cppNamespace - C++ namespace (convention: name::space::for::api). (Default: OpenAPI) - - optionalProjectFile - Generate client.pri. (Default: true) - -Back to the [generators list](README.md) diff --git a/docs/generators/cpp-restbed-server.md b/docs/generators/cpp-restbed-server.md index 0ef5dfddf051..d5afa990cfb7 100644 --- a/docs/generators/cpp-restbed-server.md +++ b/docs/generators/cpp-restbed-server.md @@ -1,19 +1,14 @@ -CONFIG OPTIONS for cpp-restbed-server - - modelPackage - C++ namespace for models (convention: name.space.model). (Default: org.openapitools.server.model) - - apiPackage - C++ namespace for apis (convention: name.space.api). (Default: org.openapitools.server.api) - - packageVersion - C++ package version. (Default: 1.0.0) - - declspec - C++ preprocessor to place before the class name for handling dllexport/dllimport. (Default: ) - - defaultInclude - The default include statement that should be placed in all headers for including things like the declspec (convention: #include "Commons.h" (Default: ) - -Back to the [generators list](README.md) +--- +id: generator-opts-server-cpp-restbed-server +title: Config Options for cpp-restbed-server +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" | || diff --git a/docs/generators/cpp-restsdk.md b/docs/generators/cpp-restsdk.md index 9ada7842d0d1..1ff8eeafce07 100644 --- a/docs/generators/cpp-restsdk.md +++ b/docs/generators/cpp-restsdk.md @@ -1,22 +1,15 @@ -CONFIG OPTIONS for cpp-restsdk - - modelPackage - C++ namespace for models (convention: name.space.model). (Default: org.openapitools.client.model) - - apiPackage - C++ namespace for apis (convention: name.space.api). (Default: org.openapitools.client.api) - - packageVersion - C++ package version. (Default: 1.0.0) - - declspec - C++ preprocessor to place before the class name for handling dllexport/dllimport. (Default: ) - - defaultInclude - The default include statement that should be placed in all headers for including things like the declspec (convention: #include "Commons.h" (Default: ) - - generateGMocksForApis - Generate Google Mock classes for APIs. - -Back to the [generators list](README.md) +--- +id: generator-opts-client-cpp-restsdk +title: Config Options for cpp-restsdk +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| diff --git a/docs/generators/cpp-tizen.md b/docs/generators/cpp-tizen.md index a9f5e3db24fb..aaf57194b8a5 100644 --- a/docs/generators/cpp-tizen.md +++ b/docs/generators/cpp-tizen.md @@ -1,16 +1,13 @@ -CONFIG OPTIONS for cpp-tizen - - sortParamsByRequiredFlag - Sort method arguments to place required parameters before optional parameters. (Default: true) - - ensureUniqueParams - Whether to ensure parameter names are unique in an operation (rename parameters that are not). (Default: true) - - allowUnicodeIdentifiers - boolean, toggles whether unicode identifiers are allowed in names or not, default is false (Default: false) - - prependFormOrBodyParameters - Add form or body parameters to the beginning of the parameter list. (Default: false) - -Back to the [generators list](README.md) +--- +id: generator-opts-client-cpp-tizen +title: Config Options for cpp-tizen +sidebar_label: cpp-tizen +--- + +| 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/csharp-dotnet2.md b/docs/generators/csharp-dotnet2.md index 79ce829f9c2d..319b2b190f59 100644 --- a/docs/generators/csharp-dotnet2.md +++ b/docs/generators/csharp-dotnet2.md @@ -1,13 +1,12 @@ -CONFIG OPTIONS for csharp-dotnet2 - - packageName - C# package name (convention: Camel.Case). (Default: Org.OpenAPITools) - - packageVersion - C# package version. (Default: 1.0.0) - - clientPackage - C# client package name (convention: Camel.Case). (Default: Org.OpenAPITools.Client) - -Back to the [generators list](README.md) +--- +id: generator-opts-client-csharp-dotnet2 +title: Config Options for csharp-dotnet2 +sidebar_label: csharp-dotnet2 +--- + +| Option | Description | Values | Default | +| ------ | ----------- | ------ | ------- | +|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| diff --git a/docs/generators/csharp-nancyfx.md b/docs/generators/csharp-nancyfx.md index 209951d9f2df..69d0504926e2 100644 --- a/docs/generators/csharp-nancyfx.md +++ b/docs/generators/csharp-nancyfx.md @@ -1,46 +1,23 @@ -CONFIG OPTIONS for csharp-nancyfx - - packageName - C# package name (convention: Title.Case). (Default: Org.OpenAPITools) - - packageVersion - C# package version. (Default: 1.0.0) - - sourceFolder - source folder for generated code (Default: src) - - interfacePrefix - Prefix interfaces with a community standard or widely accepted prefix. (Default: ) - - packageGuid - The GUID that will be associated with the C# project - - packageContext - Optionally overrides the PackageContext which determines the namespace (namespace=packageName.packageContext). If not set, packageContext will default to basePath. - - sortParamsByRequiredFlag - Sort method arguments to place required parameters before optional parameters. (Default: true) - - optionalProjectFile - Generate {PackageName}.csproj. (Default: true) - - useDateTimeOffset - Use DateTimeOffset to model date-time properties (Default: false) - - useCollection - Deserialize array types to Collection instead of List. (Default: false) - - returnICollection - Return ICollection instead of the concrete type. (Default: false) - - immutable - Enabled by default. If disabled generates model classes with setters (Default: true) - - writeModulePath - Enabled by default. If disabled, module paths will not mirror api base path (Default: true) - - asyncServer - Set to true to enable the generation of async routes/endpoints. (Default: false) - -Back to the [generators list](README.md) +--- +id: generator-opts-server-csharp-nancyfx +title: Config Options for csharp-nancyfx +sidebar_label: csharp-nancyfx +--- + +| 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| +|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| +|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| diff --git a/docs/generators/csharp-refactor.md b/docs/generators/csharp-refactor.md new file mode 100644 index 000000000000..34c55c16390c --- /dev/null +++ b/docs/generators/csharp-refactor.md @@ -0,0 +1,30 @@ + +--- +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.|
**v3.5**
.NET Framework 3.5 compatible
**v4.0**
.NET Framework 4.0 compatible
**v4.5.2**
.NET Framework 4.5.2+ compatible
**v5.0**
.NET Standard 1.3 compatible
**uwp**
Universal Windows Platform (IMPORTANT: this will be decommissioned and replaced by v5.0)
|v4.5.2| +|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| +|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| diff --git a/docs/generators/csharp.md b/docs/generators/csharp.md index ce06d6eff4e1..ac3f13977a18 100644 --- a/docs/generators/csharp.md +++ b/docs/generators/csharp.md @@ -1,75 +1,31 @@ -CONFIG OPTIONS for csharp - - packageName - C# package name (convention: Title.Case). (Default: Org.OpenAPITools) - - packageVersion - C# package version. (Default: 1.0.0) - - sourceFolder - source folder for generated code (Default: src) - - packageGuid - The GUID that will be associated with the C# project - - interfacePrefix - Prefix interfaces with a community standard or widely accepted prefix. (Default: I) - - targetFramework - The target .NET framework version. (Default: v4.5) - 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 - uwp - Universal Windows Platform (IMPORTANT: this will be decommissioned and replaced by v5.0) - - modelPropertyNaming - Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name (Default: PascalCase) - - hideGenerationTimestamp - Hides the generation timestamp when files are generated. (Default: true) - - sortParamsByRequiredFlag - Sort method arguments to place required parameters before optional parameters. (Default: true) - - useDateTimeOffset - Use DateTimeOffset to model date-time properties (Default: false) - - useCollection - Deserialize array types to Collection instead of List. (Default: false) - - returnICollection - Return ICollection instead of the concrete type. (Default: false) - - optionalMethodArgument - C# Optional method argument, e.g. void square(int x=10) (.net 4.0+ only). (Default: true) - - optionalAssemblyInfo - Generate AssemblyInfo.cs. (Default: true) - - optionalProjectFile - Generate {PackageName}.csproj. (Default: true) - - optionalEmitDefaultValues - Set DataMember's EmitDefaultValue. (Default: false) - - generatePropertyChanged - Specifies a AssemblyDescription for the .NET Framework global assembly attributes stored in the AssemblyInfo file. (Default: false) - - nonPublicApi - Generates code with reduced access modifiers; allows embedding elsewhere without exposing non-public API calls to consumers. (Default: false) - - allowUnicodeIdentifiers - boolean, toggles whether unicode identifiers are allowed in names or not, default is false (Default: false) - - netCoreProjectFile - Use the new format (.NET Core) for .NET project files (.csproj). (Default: false) - - validatable - Generates self-validatable models. (Default: true) - - useCompareNetObjects - Use KellermanSoftware.CompareNetObjects for deep recursive object comparison. WARNING: this option incurs potential performance impact. (Default: false) - -Back to the [generators list](README.md) +--- +id: generator-opts-client-csharp +title: Config Options for csharp +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
**uwp**
Universal Windows Platform (IMPORTANT: this will be decommissioned and replaced by v5.0)
|v4.5| +|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| +|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| +|useCompareNetObjects|Use KellermanSoftware.CompareNetObjects for deep recursive object comparison. WARNING: this option incurs potential performance impact.| |false| diff --git a/docs/generators/cwiki.md b/docs/generators/cwiki.md index 3af892ada70e..e809a2161c92 100644 --- a/docs/generators/cwiki.md +++ b/docs/generators/cwiki.md @@ -1,46 +1,23 @@ -CONFIG OPTIONS for cwiki - - sortParamsByRequiredFlag - Sort method arguments to place required parameters before optional parameters. (Default: true) - - ensureUniqueParams - Whether to ensure parameter names are unique in an operation (rename parameters that are not). (Default: true) - - allowUnicodeIdentifiers - boolean, toggles whether unicode identifiers are allowed in names or not, default is false (Default: false) - - prependFormOrBodyParameters - Add form or body parameters to the beginning of the parameter list. (Default: false) - - appName - short name of the application - - appDescription - description of the application - - infoUrl - a URL where users can get more information about the application - - infoEmail - an email address to contact for inquiries about the application - - licenseInfo - a short description of the license - - licenseUrl - a URL pointing to the full license - - invokerPackage - root package for generated code - - groupId - groupId in generated pom.xml - - artifactId - artifactId in generated pom.xml - - artifactVersion - artifact version in generated pom.xml - -Back to the [generators list](README.md) +--- +id: generator-opts-documentation-cwiki +title: Config Options for cwiki +sidebar_label: cwiki +--- + +| 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| +|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| +|artifactId|artifactId in generated pom.xml| |null| +|artifactVersion|artifact version in generated pom.xml| |null| diff --git a/docs/generators/dart-jaguar.md b/docs/generators/dart-jaguar.md index 5d9eb6304cf8..eb6fe782989b 100644 --- a/docs/generators/dart-jaguar.md +++ b/docs/generators/dart-jaguar.md @@ -1,40 +1,21 @@ -CONFIG OPTIONS for dart-jaguar - - sortParamsByRequiredFlag - Sort method arguments to place required parameters before optional parameters. (Default: true) - - ensureUniqueParams - Whether to ensure parameter names are unique in an operation (rename parameters that are not). (Default: true) - - allowUnicodeIdentifiers - boolean, toggles whether unicode identifiers are allowed in names or not, default is false (Default: false) - - prependFormOrBodyParameters - Add form or body parameters to the beginning of the parameter list. (Default: false) - - browserClient - Is the client browser based - - pubName - Name in generated pubspec - - pubVersion - Version in generated pubspec - - pubDescription - Description in generated pubspec - - useEnumExtension - Allow the 'x-enum-values' extension for enums - - sourceFolder - source folder for generated code - - supportDart2 - support dart2 (Default: true) - - nullableFields - Is the null fields should be in the JSON payload - -Back to the [generators list](README.md) +--- +id: generator-opts-client-dart-jaguar +title: Config Options for dart-jaguar +sidebar_label: dart-jaguar +--- + +| 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| +|browserClient|Is the client browser based| |null| +|pubName|Name in generated pubspec| |null| +|pubVersion|Version in generated pubspec| |null| +|pubDescription|Description in generated pubspec| |null| +|useEnumExtension|Allow the 'x-enum-values' extension for enums| |null| +|sourceFolder|source folder for generated code| |null| +|supportDart2|support dart2| |true| +|nullableFields|Is the null fields should be in the JSON payload| |null| diff --git a/docs/generators/dart.md b/docs/generators/dart.md index 3e552468305a..52e6bd7e73b0 100644 --- a/docs/generators/dart.md +++ b/docs/generators/dart.md @@ -1,37 +1,20 @@ -CONFIG OPTIONS for dart - - sortParamsByRequiredFlag - Sort method arguments to place required parameters before optional parameters. (Default: true) - - ensureUniqueParams - Whether to ensure parameter names are unique in an operation (rename parameters that are not). (Default: true) - - allowUnicodeIdentifiers - boolean, toggles whether unicode identifiers are allowed in names or not, default is false (Default: false) - - prependFormOrBodyParameters - Add form or body parameters to the beginning of the parameter list. (Default: false) - - browserClient - Is the client browser based - - pubName - Name in generated pubspec - - pubVersion - Version in generated pubspec - - pubDescription - Description in generated pubspec - - useEnumExtension - Allow the 'x-enum-values' extension for enums - - sourceFolder - source folder for generated code - - supportDart2 - support dart2 (Default: true) - -Back to the [generators list](README.md) +--- +id: generator-opts-client-dart +title: Config Options for dart +sidebar_label: dart +--- + +| 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| +|browserClient|Is the client browser based| |null| +|pubName|Name in generated pubspec| |null| +|pubVersion|Version in generated pubspec| |null| +|pubDescription|Description in generated pubspec| |null| +|useEnumExtension|Allow the 'x-enum-values' extension for enums| |null| +|sourceFolder|source folder for generated code| |null| +|supportDart2|support dart2| |true| diff --git a/docs/generators/dynamic-html.md b/docs/generators/dynamic-html.md index e6f20ff0247b..1c62db6e2312 100644 --- a/docs/generators/dynamic-html.md +++ b/docs/generators/dynamic-html.md @@ -1,28 +1,17 @@ -CONFIG OPTIONS for dynamic-html - - sortParamsByRequiredFlag - Sort method arguments to place required parameters before optional parameters. (Default: true) - - ensureUniqueParams - Whether to ensure parameter names are unique in an operation (rename parameters that are not). (Default: true) - - allowUnicodeIdentifiers - boolean, toggles whether unicode identifiers are allowed in names or not, default is false (Default: false) - - prependFormOrBodyParameters - Add form or body parameters to the beginning of the parameter list. (Default: false) - - invokerPackage - root package for generated code - - groupId - groupId in generated pom.xml - - artifactId - artifactId in generated pom.xml - - artifactVersion - artifact version in generated pom.xml - -Back to the [generators list](README.md) +--- +id: generator-opts-documentation-dynamic-html +title: Config Options for dynamic-html +sidebar_label: dynamic-html +--- + +| 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| +|invokerPackage|root package for generated code| |null| +|groupId|groupId in generated pom.xml| |null| +|artifactId|artifactId in generated pom.xml| |null| +|artifactVersion|artifact version in generated pom.xml| |null| diff --git a/docs/generators/eiffel.md b/docs/generators/eiffel.md index 5c806df6adcd..9f3a27dca16b 100644 --- a/docs/generators/eiffel.md +++ b/docs/generators/eiffel.md @@ -1,13 +1,12 @@ -CONFIG OPTIONS for eiffel - - packageName - Eiffel Cluster name (convention: lowercase). (Default: openapi) - - packageVersion - Eiffel package version. (Default: 1.0.0) - - hideGenerationTimestamp - Hides the generation timestamp when files are generated. (Default: true) - -Back to the [generators list](README.md) +--- +id: generator-opts-client-eiffel +title: Config Options for eiffel +sidebar_label: eiffel +--- + +| Option | Description | Values | Default | +| ------ | ----------- | ------ | ------- | +|packageName|Eiffel Cluster name (convention: lowercase).| |openapi| +|packageVersion|Eiffel package version.| |1.0.0| +|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true| diff --git a/docs/generators/elixir.md b/docs/generators/elixir.md index 92dad5e3c0e3..bcf7e8ccf2de 100644 --- a/docs/generators/elixir.md +++ b/docs/generators/elixir.md @@ -1,25 +1,16 @@ -CONFIG OPTIONS for elixir - - sortParamsByRequiredFlag - Sort method arguments to place required parameters before optional parameters. (Default: true) - - ensureUniqueParams - Whether to ensure parameter names are unique in an operation (rename parameters that are not). (Default: true) - - allowUnicodeIdentifiers - boolean, toggles whether unicode identifiers are allowed in names or not, default is false (Default: false) - - prependFormOrBodyParameters - Add form or body parameters to the beginning of the parameter list. (Default: false) - - invokerPackage - The main namespace to use for all classes. e.g. Yay.Pets - - licenseHeader - The license header to prepend to the top of all source files. - - packageName - Elixir package name (convention: lowercase). - -Back to the [generators list](README.md) +--- +id: generator-opts-client-elixir +title: Config Options for elixir +sidebar_label: elixir +--- + +| 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| +|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| diff --git a/docs/generators/elm.md b/docs/generators/elm.md index 65044602159f..2782d13e9ff9 100644 --- a/docs/generators/elm.md +++ b/docs/generators/elm.md @@ -1,18 +1,13 @@ -CONFIG OPTIONS for elm - - elmVersion - Elm version: 0.18, 0.19 (Default: 0.19) - 0.19 - Elm 0.19 - 0.18 - Elm 0.18 - - elmPrefixCustomTypeVariants - Prefix custom type variants (Default: false) - - elmEnableCustomBasePaths - Enable setting the base path for each request (Default: false) - - elmEnableHttpRequestTrackers - Enable adding a tracker to each http request (Default: false) - -Back to the [generators list](README.md) +--- +id: generator-opts-client-elm +title: Config Options for elm +sidebar_label: elm +--- + +| Option | Description | Values | Default | +| ------ | ----------- | ------ | ------- | +|elmVersion|Elm version: 0.18, 0.19|
**0.19**
Elm 0.19
**0.18**
Elm 0.18
|0.19| +|elmPrefixCustomTypeVariants|Prefix custom type variants| |false| +|elmEnableCustomBasePaths|Enable setting the base path for each request| |false| +|elmEnableHttpRequestTrackers|Enable adding a tracker to each http request| |false| diff --git a/docs/generators/erlang-client.md b/docs/generators/erlang-client.md index e3a2aa7ce693..7ff4cd412842 100644 --- a/docs/generators/erlang-client.md +++ b/docs/generators/erlang-client.md @@ -1,10 +1,11 @@ -CONFIG OPTIONS for erlang-client - - packageName - Erlang application name (convention: lowercase). (Default: openapi) - - packageName - Erlang application version (Default: 1.0.0) - -Back to the [generators list](README.md) +--- +id: generator-opts-client-erlang-client +title: Config Options for erlang-client +sidebar_label: erlang-client +--- + +| Option | Description | Values | Default | +| ------ | ----------- | ------ | ------- | +|packageName|Erlang application name (convention: lowercase).| |openapi| +|packageName|Erlang application version| |1.0.0| diff --git a/docs/generators/erlang-proper.md b/docs/generators/erlang-proper.md index 4c3330678a58..1038343f8e8a 100644 --- a/docs/generators/erlang-proper.md +++ b/docs/generators/erlang-proper.md @@ -1,10 +1,11 @@ -CONFIG OPTIONS for erlang-proper - - packageName - Erlang application name (convention: lowercase). (Default: openapi) - - packageName - Erlang application version (Default: 1.0.0) - -Back to the [generators list](README.md) +--- +id: generator-opts-client-erlang-proper +title: Config Options for erlang-proper +sidebar_label: erlang-proper +--- + +| Option | Description | Values | Default | +| ------ | ----------- | ------ | ------- | +|packageName|Erlang application name (convention: lowercase).| |openapi| +|packageName|Erlang application version| |1.0.0| diff --git a/docs/generators/erlang-server.md b/docs/generators/erlang-server.md index 51fc0c2d9719..f469fc445e00 100644 --- a/docs/generators/erlang-server.md +++ b/docs/generators/erlang-server.md @@ -1,10 +1,11 @@ -CONFIG OPTIONS for erlang-server - - packageName - Erlang package name (convention: lowercase). (Default: openapi) - - openAPISpecName - Openapi Spec Name. (Default: openapi) - -Back to the [generators list](README.md) +--- +id: generator-opts-server-erlang-server +title: Config Options for erlang-server +sidebar_label: erlang-server +--- + +| Option | Description | Values | Default | +| ------ | ----------- | ------ | ------- | +|packageName|Erlang package name (convention: lowercase).| |openapi| +|openAPISpecName|Openapi Spec Name.| |openapi| diff --git a/docs/generators/flash.md b/docs/generators/flash.md index 4c84604c40a9..b91ea54475c0 100644 --- a/docs/generators/flash.md +++ b/docs/generators/flash.md @@ -1,16 +1,13 @@ -CONFIG OPTIONS for flash - - packageName - flash package name (convention: package.name) (Default: org.openapitools) - - packageVersion - flash package version (Default: 1.0.0) - - invokerPackage - root package for generated code - - sourceFolder - source folder for generated code. e.g. flash - -Back to the [generators list](README.md) +--- +id: generator-opts-client-flash +title: Config Options for flash +sidebar_label: flash +--- + +| Option | Description | Values | Default | +| ------ | ----------- | ------ | ------- | +|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| diff --git a/docs/generators/go-gin-server.md b/docs/generators/go-gin-server.md index 1589b7f42a6f..9371bf027fde 100644 --- a/docs/generators/go-gin-server.md +++ b/docs/generators/go-gin-server.md @@ -1,10 +1,11 @@ -CONFIG OPTIONS for go-gin-server - - packageName - Go package name (convention: lowercase). (Default: openapi) - - hideGenerationTimestamp - Hides the generation timestamp when files are generated. (Default: true) - -Back to the [generators list](README.md) +--- +id: generator-opts-server-go-gin-server +title: Config Options for go-gin-server +sidebar_label: go-gin-server +--- + +| Option | Description | Values | Default | +| ------ | ----------- | ------ | ------- | +|packageName|Go package name (convention: lowercase).| |openapi| +|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true| diff --git a/docs/generators/go-server.md b/docs/generators/go-server.md index 462aed9db17e..5ba67d6b3e60 100644 --- a/docs/generators/go-server.md +++ b/docs/generators/go-server.md @@ -1,10 +1,11 @@ -CONFIG OPTIONS for go-server - - packageName - Go package name (convention: lowercase). (Default: openapi) - - hideGenerationTimestamp - Hides the generation timestamp when files are generated. (Default: true) - -Back to the [generators list](README.md) +--- +id: generator-opts-server-go-server +title: Config Options for go-server +sidebar_label: go-server +--- + +| Option | Description | Values | Default | +| ------ | ----------- | ------ | ------- | +|packageName|Go package name (convention: lowercase).| |openapi| +|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true| diff --git a/docs/generators/go.md b/docs/generators/go.md index f5b1c1ae9a99..d336f871529b 100644 --- a/docs/generators/go.md +++ b/docs/generators/go.md @@ -1,22 +1,15 @@ -CONFIG OPTIONS for go - - packageName - Go package name (convention: lowercase). (Default: openapi) - - hideGenerationTimestamp - Hides the generation timestamp when files are generated. (Default: true) - - packageVersion - Go package version. (Default: 1.0.0) - - withGoCodegenComment - whether to include Go codegen comment to disable Go Lint and collapse by default GitHub in PRs and diffs (Default: 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) (Default: false) - - prependFormOrBodyParameters - Add form or body parameters to the beginning of the parameter list. (Default: false) - -Back to the [generators list](README.md) +--- +id: generator-opts-client-go +title: Config Options for go +sidebar_label: go +--- + +| Option | Description | Values | Default | +| ------ | ----------- | ------ | ------- | +|packageName|Go package name (convention: lowercase).| |openapi| +|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true| +|packageVersion|Go package version.| |1.0.0| +|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| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| diff --git a/docs/generators/graphql-schema.md b/docs/generators/graphql-schema.md index 8a1e2f0b82ac..a6d39fd6243a 100644 --- a/docs/generators/graphql-schema.md +++ b/docs/generators/graphql-schema.md @@ -1,13 +1,12 @@ -CONFIG OPTIONS for graphql-schema - - packageName - GraphQL package name (convention: lowercase). (Default: openapi2graphql) - - packageVersion - GraphQL package version. (Default: 1.0.0) - - hideGenerationTimestamp - Hides the generation timestamp when files are generated. (Default: true) - -Back to the [generators list](README.md) +--- +id: generator-opts-config-graphql-schema +title: Config Options for graphql-schema +sidebar_label: graphql-schema +--- + +| Option | Description | Values | Default | +| ------ | ----------- | ------ | ------- | +|packageName|GraphQL package name (convention: lowercase).| |openapi2graphql| +|packageVersion|GraphQL package version.| |1.0.0| +|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true| diff --git a/docs/generators/graphql-server.md b/docs/generators/graphql-server.md index b79cb52cc1d0..97fb578008ab 100644 --- a/docs/generators/graphql-server.md +++ b/docs/generators/graphql-server.md @@ -1,13 +1,12 @@ -CONFIG OPTIONS for graphql-server - - packageName - GraphQL express server package name (convention: lowercase). (Default: openapi3graphql-server) - - packageVersion - GraphQL express server package version. (Default: 1.0.0) - - hideGenerationTimestamp - Hides the generation timestamp when files are generated. (Default: true) - -Back to the [generators list](README.md) +--- +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 9a6ff34c6cf7..fa5e542697fb 100644 --- a/docs/generators/groovy.md +++ b/docs/generators/groovy.md @@ -1,119 +1,45 @@ -CONFIG OPTIONS for groovy - - sortParamsByRequiredFlag - Sort method arguments to place required parameters before optional parameters. (Default: true) - - ensureUniqueParams - Whether to ensure parameter names are unique in an operation (rename parameters that are not). (Default: true) - - allowUnicodeIdentifiers - boolean, toggles whether unicode identifiers are allowed in names or not, default is false (Default: false) - - prependFormOrBodyParameters - Add form or body parameters to the beginning of the parameter list. (Default: false) - - modelPackage - package for generated models - - apiPackage - package for generated api classes - - invokerPackage - root package for generated code - - groupId - groupId in generated pom.xml - - artifactId - artifactId in generated pom.xml - - artifactVersion - artifact version in generated pom.xml - - artifactUrl - artifact URL in generated pom.xml - - artifactDescription - artifact description in generated pom.xml - - scmConnection - SCM connection in generated pom.xml - - scmDeveloperConnection - SCM developer connection in generated pom.xml - - scmUrl - SCM URL in generated pom.xml - - developerName - developer name in generated pom.xml - - developerEmail - developer email in generated pom.xml - - developerOrganization - developer organization in generated pom.xml - - developerOrganizationUrl - developer organization URL in generated pom.xml - - licenseName - The name of the license - - licenseUrl - The URL of the license - - sourceFolder - source folder for generated code - - localVariablePrefix - prefix for generated code members and local variables - - serializableModel - boolean - toggle "implements Serializable" for generated models (Default: false) - - bigDecimalAsString - Treat BigDecimal values as Strings to avoid precision loss. (Default: false) - - fullJavaUtil - whether to use fully qualified name for classes under java.util. This option only works for Java API client (Default: false) - - hideGenerationTimestamp - hides the timestamp when files were generated - - 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) (Default: 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 - Option. Use Java8 classes instead of third party equivalents - true - Use Java 8 classes such as Base64 - false - Various third party libraries as needed - - disableHtmlEscaping - Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields) (Default: false) - - booleanGetterPrefix - Set booleanGetterPrefix (default value 'get') - - parentGroupId - parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect - - parentArtifactId - parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect - - parentVersion - parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect - - configPackage - configuration package for generated code - -Back to the [generators list](README.md) +--- +id: generator-opts-client-groovy +title: Config Options for groovy +sidebar_label: groovy +--- + +| 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| +|invokerPackage|root package for generated code| |null| +|groupId|groupId in generated pom.xml| |null| +|artifactId|artifactId in generated pom.xml| |null| +|artifactVersion|artifact version in generated pom.xml| |null| +|artifactUrl|artifact URL in generated pom.xml| |null| +|artifactDescription|artifact description in generated pom.xml| |null| +|scmConnection|SCM connection in generated pom.xml| |null| +|scmDeveloperConnection|SCM developer connection in generated pom.xml| |null| +|scmUrl|SCM URL in generated pom.xml| |null| +|developerName|developer name in generated pom.xml| |null| +|developerEmail|developer email in generated pom.xml| |null| +|developerOrganization|developer organization in generated pom.xml| |null| +|developerOrganizationUrl|developer organization URL in generated pom.xml| |null| +|licenseName|The name of the license| |null| +|licenseUrl|The URL of the license| |null| +|sourceFolder|source folder for generated code| |null| +|localVariablePrefix|prefix for generated code members and local variables| |null| +|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 timestamp when files were generated| |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| +|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)
|null| +|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
|null| +|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false| +|booleanGetterPrefix|Set booleanGetterPrefix (default value 'get')| |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| +|configPackage|configuration package for generated code| |null| diff --git a/docs/generators/haskell-http-client.md b/docs/generators/haskell-http-client.md index af303d7cd44f..a39a6707addc 100644 --- a/docs/generators/haskell-http-client.md +++ b/docs/generators/haskell-http-client.md @@ -1,73 +1,32 @@ -CONFIG OPTIONS for haskell-http-client - - sortParamsByRequiredFlag - Sort method arguments to place required parameters before optional parameters. (Default: true) - - ensureUniqueParams - Whether to ensure parameter names are unique in an operation (rename parameters that are not). (Default: true) - - allowUnicodeIdentifiers - boolean, toggles whether unicode identifiers are allowed in names or not, default is false (Default: false) - - prependFormOrBodyParameters - Add form or body parameters to the beginning of the parameter list. (Default: false) - - cabalPackage - Set the cabal package name, which consists of one or more alphanumeric words separated by hyphens - - cabalVersion - Set the cabal version number, consisting of a sequence of one or more integers separated by dots - - baseModule - Set the base module namespace - - requestType - Set the name of the type used to generate requests - - configType - Set the name of the type used for configuration - - allowFromJsonNulls - allow JSON Null during model decoding from JSON (Default: true) - - allowToJsonNulls - allow emitting JSON Null during model encoding to JSON (Default: false) - - allowNonUniqueOperationIds - allow different API modules to contain the same operationId. Each API must be imported qualified (Default: false) - - generateLenses - Generate Lens optics for Models (Default: true) - - generateModelConstructors - Generate smart constructors (only supply required fields) for models (Default: true) - - generateEnums - Generate specific datatypes for OpenAPI enums (Default: true) - - generateFormUrlEncodedInstances - Generate FromForm/ToForm instances for models that are used by operations that produce or consume application/x-www-form-urlencoded (Default: true) - - inlineMimeTypes - Inline (hardcode) the content-type and accept parameters on operations, when there is only 1 option (Default: true) - - modelDeriving - Additional classes to include in the deriving() clause of Models - - strictFields - Add strictness annotations to all model fields (Default: true) - - useMonadLogger - Use the monad-logger package to provide logging (if false, use the katip logging package) (Default: false) - - dateTimeFormat - format string used to parse/render a datetime - - dateFormat - format string used to parse/render a date (Default: %Y-%m-%d) - - hideGenerationTimestamp - Hides the generation timestamp when files are generated. (Default: true) - -Back to the [generators list](README.md) +--- +id: generator-opts-client-haskell-http-client +title: Config Options for haskell-http-client +sidebar_label: haskell-http-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| +|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| +|useMonadLogger|Use the monad-logger package to provide logging (if false, use the katip logging package)| |false| +|dateTimeFormat|format string used to parse/render a datetime| |null| +|dateFormat|format string used to parse/render a date| |%Y-%m-%d| +|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true| diff --git a/docs/generators/haskell.md b/docs/generators/haskell.md index 3fbbb3f5aee4..3692c19bb3fb 100644 --- a/docs/generators/haskell.md +++ b/docs/generators/haskell.md @@ -1,22 +1,15 @@ -CONFIG OPTIONS for haskell - - sortParamsByRequiredFlag - Sort method arguments to place required parameters before optional parameters. (Default: true) - - ensureUniqueParams - Whether to ensure parameter names are unique in an operation (rename parameters that are not). (Default: true) - - allowUnicodeIdentifiers - boolean, toggles whether unicode identifiers are allowed in names or not, default is false (Default: false) - - prependFormOrBodyParameters - Add form or body parameters to the beginning of the parameter list. (Default: false) - - modelPackage - package for generated models - - apiPackage - package for generated api classes - -Back to the [generators list](README.md) +--- +id: generator-opts-server-haskell +title: Config Options for haskell +sidebar_label: haskell +--- + +| 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| diff --git a/docs/generators/html.md b/docs/generators/html.md index 61384bb6c209..53e8dd7d65a2 100644 --- a/docs/generators/html.md +++ b/docs/generators/html.md @@ -1,46 +1,23 @@ -CONFIG OPTIONS for html - - sortParamsByRequiredFlag - Sort method arguments to place required parameters before optional parameters. (Default: true) - - ensureUniqueParams - Whether to ensure parameter names are unique in an operation (rename parameters that are not). (Default: true) - - allowUnicodeIdentifiers - boolean, toggles whether unicode identifiers are allowed in names or not, default is false (Default: false) - - prependFormOrBodyParameters - Add form or body parameters to the beginning of the parameter list. (Default: false) - - appName - short name of the application - - appDescription - description of the application - - infoUrl - a URL where users can get more information about the application - - infoEmail - an email address to contact for inquiries about the application - - licenseInfo - a short description of the license - - licenseUrl - a URL pointing to the full license - - invokerPackage - root package for generated code - - groupId - groupId in generated pom.xml - - artifactId - artifactId in generated pom.xml - - artifactVersion - artifact version in generated pom.xml - -Back to the [generators list](README.md) +--- +id: generator-opts-documentation-html +title: Config Options for html +sidebar_label: html +--- + +| 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| +|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| +|artifactId|artifactId in generated pom.xml| |null| +|artifactVersion|artifact version in generated pom.xml| |null| diff --git a/docs/generators/html2.md b/docs/generators/html2.md index 3e17d6931222..ac52e90608b3 100644 --- a/docs/generators/html2.md +++ b/docs/generators/html2.md @@ -1,58 +1,27 @@ -CONFIG OPTIONS for html2 - - sortParamsByRequiredFlag - Sort method arguments to place required parameters before optional parameters. (Default: true) - - ensureUniqueParams - Whether to ensure parameter names are unique in an operation (rename parameters that are not). (Default: true) - - allowUnicodeIdentifiers - boolean, toggles whether unicode identifiers are allowed in names or not, default is false (Default: false) - - prependFormOrBodyParameters - Add form or body parameters to the beginning of the parameter list. (Default: false) - - appName - short name of the application - - appDescription - description of the application - - infoUrl - a URL where users can get more information about the application - - infoEmail - an email address to contact for inquiries about the application - - licenseInfo - a short description of the license - - licenseUrl - a URL pointing to the full license - - invokerPackage - root package for generated code - - phpInvokerPackage - root package for generated php code - - perlModuleName - root module name for generated perl code - - pythonPackageName - package name for generated python code - - packageName - C# package name - - groupId - groupId in generated pom.xml - - artifactId - artifactId in generated pom.xml - - artifactVersion - artifact version in generated pom.xml - -Back to the [generators list](README.md) +--- +id: generator-opts-documentation-html2 +title: Config Options for html2 +sidebar_label: html2 +--- + +| 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| +|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| +|artifactId|artifactId in generated pom.xml| |null| +|artifactVersion|artifact version in generated pom.xml| |null| diff --git a/docs/generators/java-inflector.md b/docs/generators/java-inflector.md index f142ee247bd9..e2b2fc439f29 100644 --- a/docs/generators/java-inflector.md +++ b/docs/generators/java-inflector.md @@ -1,116 +1,44 @@ -CONFIG OPTIONS for java-inflector - - sortParamsByRequiredFlag - Sort method arguments to place required parameters before optional parameters. (Default: true) - - ensureUniqueParams - Whether to ensure parameter names are unique in an operation (rename parameters that are not). (Default: true) - - allowUnicodeIdentifiers - boolean, toggles whether unicode identifiers are allowed in names or not, default is false (Default: false) - - prependFormOrBodyParameters - Add form or body parameters to the beginning of the parameter list. (Default: false) - - modelPackage - package for generated models - - apiPackage - package for generated api classes - - invokerPackage - root package for generated code - - groupId - groupId in generated pom.xml - - artifactId - artifactId in generated pom.xml - - artifactVersion - artifact version in generated pom.xml - - artifactUrl - artifact URL in generated pom.xml - - artifactDescription - artifact description in generated pom.xml - - scmConnection - SCM connection in generated pom.xml - - scmDeveloperConnection - SCM developer connection in generated pom.xml - - scmUrl - SCM URL in generated pom.xml - - developerName - developer name in generated pom.xml - - developerEmail - developer email in generated pom.xml - - developerOrganization - developer organization in generated pom.xml - - developerOrganizationUrl - developer organization URL in generated pom.xml - - licenseName - The name of the license - - licenseUrl - The URL of the license - - sourceFolder - source folder for generated code - - localVariablePrefix - prefix for generated code members and local variables - - serializableModel - boolean - toggle "implements Serializable" for generated models (Default: false) - - bigDecimalAsString - Treat BigDecimal values as Strings to avoid precision loss. (Default: false) - - fullJavaUtil - whether to use fully qualified name for classes under java.util. This option only works for Java API client (Default: false) - - hideGenerationTimestamp - hides the timestamp when files were generated - - 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) (Default: 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 - Option. Use Java8 classes instead of third party equivalents - true - Use Java 8 classes such as Base64 - false - Various third party libraries as needed - - disableHtmlEscaping - Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields) (Default: false) - - booleanGetterPrefix - Set booleanGetterPrefix (default value 'get') - - parentGroupId - parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect - - parentArtifactId - parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect - - parentVersion - parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect - -Back to the [generators list](README.md) +--- +id: generator-opts-server-java-inflector +title: Config Options for java-inflector +sidebar_label: java-inflector +--- + +| 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| +|invokerPackage|root package for generated code| |null| +|groupId|groupId in generated pom.xml| |null| +|artifactId|artifactId in generated pom.xml| |null| +|artifactVersion|artifact version in generated pom.xml| |null| +|artifactUrl|artifact URL in generated pom.xml| |null| +|artifactDescription|artifact description in generated pom.xml| |null| +|scmConnection|SCM connection in generated pom.xml| |null| +|scmDeveloperConnection|SCM developer connection in generated pom.xml| |null| +|scmUrl|SCM URL in generated pom.xml| |null| +|developerName|developer name in generated pom.xml| |null| +|developerEmail|developer email in generated pom.xml| |null| +|developerOrganization|developer organization in generated pom.xml| |null| +|developerOrganizationUrl|developer organization URL in generated pom.xml| |null| +|licenseName|The name of the license| |null| +|licenseUrl|The URL of the license| |null| +|sourceFolder|source folder for generated code| |null| +|localVariablePrefix|prefix for generated code members and local variables| |null| +|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 timestamp when files were generated| |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| +|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)
|null| +|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
|null| +|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false| +|booleanGetterPrefix|Set booleanGetterPrefix (default value 'get')| |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| diff --git a/docs/generators/java-msf4j.md b/docs/generators/java-msf4j.md index b2817e0b7c19..899e7c7e7e7a 100644 --- a/docs/generators/java-msf4j.md +++ b/docs/generators/java-msf4j.md @@ -1,133 +1,49 @@ -CONFIG OPTIONS for java-msf4j - - sortParamsByRequiredFlag - Sort method arguments to place required parameters before optional parameters. (Default: true) - - ensureUniqueParams - Whether to ensure parameter names are unique in an operation (rename parameters that are not). (Default: true) - - allowUnicodeIdentifiers - boolean, toggles whether unicode identifiers are allowed in names or not, default is false (Default: false) - - prependFormOrBodyParameters - Add form or body parameters to the beginning of the parameter list. (Default: false) - - modelPackage - package for generated models - - apiPackage - package for generated api classes - - invokerPackage - root package for generated code - - groupId - groupId in generated pom.xml - - artifactId - artifactId in generated pom.xml - - artifactVersion - artifact version in generated pom.xml - - artifactUrl - artifact URL in generated pom.xml - - artifactDescription - artifact description in generated pom.xml - - scmConnection - SCM connection in generated pom.xml - - scmDeveloperConnection - SCM developer connection in generated pom.xml - - scmUrl - SCM URL in generated pom.xml - - developerName - developer name in generated pom.xml - - developerEmail - developer email in generated pom.xml - - developerOrganization - developer organization in generated pom.xml - - developerOrganizationUrl - developer organization URL in generated pom.xml - - licenseName - The name of the license - - licenseUrl - The URL of the license - - sourceFolder - source folder for generated code - - localVariablePrefix - prefix for generated code members and local variables - - serializableModel - boolean - toggle "implements Serializable" for generated models (Default: false) - - bigDecimalAsString - Treat BigDecimal values as Strings to avoid precision loss. (Default: false) - - fullJavaUtil - whether to use fully qualified name for classes under java.util. This option only works for Java API client (Default: false) - - hideGenerationTimestamp - hides the timestamp when files were generated - - 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) (Default: 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 - Option. Use Java8 classes instead of third party equivalents - true - Use Java 8 classes such as Base64 - false - Various third party libraries as needed - - disableHtmlEscaping - Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields) (Default: false) - - booleanGetterPrefix - Set booleanGetterPrefix (default value 'get') - - parentGroupId - parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect - - parentArtifactId - parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect - - parentVersion - parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect - - implFolder - folder for generated implementation code - - title - a title describing the application - - useBeanValidation - Use BeanValidation API annotations (Default: true) - - serverPort - The port on which the server should be started - - library - library template (sub-template) to use (Default: jersey2) - jersey1 - Jersey core 1.x - jersey2 - Jersey core 2.x - -Back to the [generators list](README.md) +--- +id: generator-opts-server-java-msf4j +title: Config Options for java-msf4j +sidebar_label: java-msf4j +--- + +| 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| +|invokerPackage|root package for generated code| |null| +|groupId|groupId in generated pom.xml| |null| +|artifactId|artifactId in generated pom.xml| |null| +|artifactVersion|artifact version in generated pom.xml| |null| +|artifactUrl|artifact URL in generated pom.xml| |null| +|artifactDescription|artifact description in generated pom.xml| |null| +|scmConnection|SCM connection in generated pom.xml| |null| +|scmDeveloperConnection|SCM developer connection in generated pom.xml| |null| +|scmUrl|SCM URL in generated pom.xml| |null| +|developerName|developer name in generated pom.xml| |null| +|developerEmail|developer email in generated pom.xml| |null| +|developerOrganization|developer organization in generated pom.xml| |null| +|developerOrganizationUrl|developer organization URL in generated pom.xml| |null| +|licenseName|The name of the license| |null| +|licenseUrl|The URL of the license| |null| +|sourceFolder|source folder for generated code| |null| +|localVariablePrefix|prefix for generated code members and local variables| |null| +|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 timestamp when files were generated| |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| +|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)
|null| +|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
|null| +|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false| +|booleanGetterPrefix|Set booleanGetterPrefix (default value 'get')| |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| +|implFolder|folder for generated implementation code| |null| +|title|a title describing the application| |null| +|useBeanValidation|Use BeanValidation API annotations| |true| +|serverPort|The port on which the server should be started| |null| +|library|library template (sub-template) to use|
**jersey1**
Jersey core 1.x
**jersey2**
Jersey core 2.x
|jersey2| diff --git a/docs/generators/java-pkmst.md b/docs/generators/java-pkmst.md index 1cab3be93baf..baefba28819c 100644 --- a/docs/generators/java-pkmst.md +++ b/docs/generators/java-pkmst.md @@ -1,146 +1,54 @@ -CONFIG OPTIONS for java-pkmst - - sortParamsByRequiredFlag - Sort method arguments to place required parameters before optional parameters. (Default: true) - - ensureUniqueParams - Whether to ensure parameter names are unique in an operation (rename parameters that are not). (Default: true) - - allowUnicodeIdentifiers - boolean, toggles whether unicode identifiers are allowed in names or not, default is false (Default: false) - - prependFormOrBodyParameters - Add form or body parameters to the beginning of the parameter list. (Default: false) - - modelPackage - package for generated models - - apiPackage - package for generated api classes - - invokerPackage - root package for generated code - - groupId - groupId in generated pom.xml - - artifactId - artifactId in generated pom.xml - - artifactVersion - artifact version in generated pom.xml - - artifactUrl - artifact URL in generated pom.xml - - artifactDescription - artifact description in generated pom.xml - - scmConnection - SCM connection in generated pom.xml - - scmDeveloperConnection - SCM developer connection in generated pom.xml - - scmUrl - SCM URL in generated pom.xml - - developerName - developer name in generated pom.xml - - developerEmail - developer email in generated pom.xml - - developerOrganization - developer organization in generated pom.xml - - developerOrganizationUrl - developer organization URL in generated pom.xml - - licenseName - The name of the license - - licenseUrl - The URL of the license - - sourceFolder - source folder for generated code - - localVariablePrefix - prefix for generated code members and local variables - - serializableModel - boolean - toggle "implements Serializable" for generated models (Default: false) - - bigDecimalAsString - Treat BigDecimal values as Strings to avoid precision loss. (Default: false) - - fullJavaUtil - whether to use fully qualified name for classes under java.util. This option only works for Java API client (Default: false) - - hideGenerationTimestamp - hides the timestamp when files were generated - - 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) (Default: 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 - Option. Use Java8 classes instead of third party equivalents - true - Use Java 8 classes such as Base64 - false - Various third party libraries as needed - - disableHtmlEscaping - Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields) (Default: false) - - booleanGetterPrefix - Set booleanGetterPrefix (default value 'get') - - parentGroupId - parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect - - parentArtifactId - parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect - - parentVersion - parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect - - groupId - groupId in generated pom.xml - - artifactId - artifactId in generated pom.xml - - artifactVersion - artifact version in generated pom.xml - - basePackage - base package for java source code - - serviceName - Service Name - - title - server title name or client service name - - eurekaUri - Eureka URI - - zipkinUri - Zipkin URI - - springBootAdminUri - Spring-Boot URI - - pkmstInterceptor - PKMST Interceptor - -Back to the [generators list](README.md) +--- +id: generator-opts-server-java-pkmst +title: Config Options for java-pkmst +sidebar_label: java-pkmst +--- + +| 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| +|invokerPackage|root package for generated code| |null| +|groupId|groupId in generated pom.xml| |null| +|artifactId|artifactId in generated pom.xml| |null| +|artifactVersion|artifact version in generated pom.xml| |null| +|artifactUrl|artifact URL in generated pom.xml| |null| +|artifactDescription|artifact description in generated pom.xml| |null| +|scmConnection|SCM connection in generated pom.xml| |null| +|scmDeveloperConnection|SCM developer connection in generated pom.xml| |null| +|scmUrl|SCM URL in generated pom.xml| |null| +|developerName|developer name in generated pom.xml| |null| +|developerEmail|developer email in generated pom.xml| |null| +|developerOrganization|developer organization in generated pom.xml| |null| +|developerOrganizationUrl|developer organization URL in generated pom.xml| |null| +|licenseName|The name of the license| |null| +|licenseUrl|The URL of the license| |null| +|sourceFolder|source folder for generated code| |null| +|localVariablePrefix|prefix for generated code members and local variables| |null| +|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 timestamp when files were generated| |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| +|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)
|null| +|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
|null| +|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false| +|booleanGetterPrefix|Set booleanGetterPrefix (default value 'get')| |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| +|groupId|groupId in generated pom.xml| |null| +|artifactId|artifactId in generated pom.xml| |null| +|artifactVersion|artifact version in generated pom.xml| |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| +|springBootAdminUri|Spring-Boot URI| |null| +|pkmstInterceptor|PKMST Interceptor| |null| diff --git a/docs/generators/java-play-framework.md b/docs/generators/java-play-framework.md index 801c965df75c..444c85a52a35 100644 --- a/docs/generators/java-play-framework.md +++ b/docs/generators/java-play-framework.md @@ -1,143 +1,53 @@ -CONFIG OPTIONS for java-play-framework - - sortParamsByRequiredFlag - Sort method arguments to place required parameters before optional parameters. (Default: true) - - ensureUniqueParams - Whether to ensure parameter names are unique in an operation (rename parameters that are not). (Default: true) - - allowUnicodeIdentifiers - boolean, toggles whether unicode identifiers are allowed in names or not, default is false (Default: false) - - prependFormOrBodyParameters - Add form or body parameters to the beginning of the parameter list. (Default: false) - - modelPackage - package for generated models - - apiPackage - package for generated api classes - - invokerPackage - root package for generated code - - groupId - groupId in generated pom.xml - - artifactId - artifactId in generated pom.xml - - artifactVersion - artifact version in generated pom.xml - - artifactUrl - artifact URL in generated pom.xml - - artifactDescription - artifact description in generated pom.xml - - scmConnection - SCM connection in generated pom.xml - - scmDeveloperConnection - SCM developer connection in generated pom.xml - - scmUrl - SCM URL in generated pom.xml - - developerName - developer name in generated pom.xml - - developerEmail - developer email in generated pom.xml - - developerOrganization - developer organization in generated pom.xml - - developerOrganizationUrl - developer organization URL in generated pom.xml - - licenseName - The name of the license - - licenseUrl - The URL of the license - - sourceFolder - source folder for generated code - - localVariablePrefix - prefix for generated code members and local variables - - serializableModel - boolean - toggle "implements Serializable" for generated models (Default: false) - - bigDecimalAsString - Treat BigDecimal values as Strings to avoid precision loss. (Default: false) - - fullJavaUtil - whether to use fully qualified name for classes under java.util. This option only works for Java API client (Default: false) - - hideGenerationTimestamp - hides the timestamp when files were generated - - 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) (Default: 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 - Option. Use Java8 classes instead of third party equivalents - true - Use Java 8 classes such as Base64 - false - Various third party libraries as needed - - disableHtmlEscaping - Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields) (Default: false) - - booleanGetterPrefix - Set booleanGetterPrefix (default value 'get') - - parentGroupId - parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect - - parentArtifactId - parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect - - parentVersion - parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect - - title - server title name or client service name - - configPackage - configuration package for generated code - - basePackage - base package for generated code - - controllerOnly - Whether to generate only API interface stubs without the server files. (Default: false) - - useBeanValidation - Use BeanValidation API annotations (Default: true) - - useInterfaces - Makes the controllerImp implements an interface to facilitate automatic completion when updating from version x to y of your spec (Default: true) - - handleExceptions - Add a 'throw exception' to each controller function. Add also a custom error handler where you can put your custom logic (Default: true) - - wrapCalls - Add a wrapper to each controller function to handle things like metrics, response modification, etc.. (Default: true) - - useSwaggerUI - Add a route to /api which show your documentation in swagger-ui. Will also import needed dependencies (Default: true) - -Back to the [generators list](README.md) +--- +id: generator-opts-server-java-play-framework +title: Config Options for java-play-framework +sidebar_label: java-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| +|invokerPackage|root package for generated code| |null| +|groupId|groupId in generated pom.xml| |null| +|artifactId|artifactId in generated pom.xml| |null| +|artifactVersion|artifact version in generated pom.xml| |null| +|artifactUrl|artifact URL in generated pom.xml| |null| +|artifactDescription|artifact description in generated pom.xml| |null| +|scmConnection|SCM connection in generated pom.xml| |null| +|scmDeveloperConnection|SCM developer connection in generated pom.xml| |null| +|scmUrl|SCM URL in generated pom.xml| |null| +|developerName|developer name in generated pom.xml| |null| +|developerEmail|developer email in generated pom.xml| |null| +|developerOrganization|developer organization in generated pom.xml| |null| +|developerOrganizationUrl|developer organization URL in generated pom.xml| |null| +|licenseName|The name of the license| |null| +|licenseUrl|The URL of the license| |null| +|sourceFolder|source folder for generated code| |null| +|localVariablePrefix|prefix for generated code members and local variables| |null| +|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 timestamp when files were generated| |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| +|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)
|null| +|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
|null| +|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false| +|booleanGetterPrefix|Set booleanGetterPrefix (default value 'get')| |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| +|title|server title name or client service name| |null| +|configPackage|configuration package for generated code| |null| +|basePackage|base package for generated code| |null| +|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| diff --git a/docs/generators/java-undertow-server.md b/docs/generators/java-undertow-server.md index facaf3aa8314..0f9ce1d77724 100644 --- a/docs/generators/java-undertow-server.md +++ b/docs/generators/java-undertow-server.md @@ -1,116 +1,44 @@ -CONFIG OPTIONS for java-undertow-server - - sortParamsByRequiredFlag - Sort method arguments to place required parameters before optional parameters. (Default: true) - - ensureUniqueParams - Whether to ensure parameter names are unique in an operation (rename parameters that are not). (Default: true) - - allowUnicodeIdentifiers - boolean, toggles whether unicode identifiers are allowed in names or not, default is false (Default: false) - - prependFormOrBodyParameters - Add form or body parameters to the beginning of the parameter list. (Default: false) - - modelPackage - package for generated models - - apiPackage - package for generated api classes - - invokerPackage - root package for generated code - - groupId - groupId in generated pom.xml - - artifactId - artifactId in generated pom.xml - - artifactVersion - artifact version in generated pom.xml - - artifactUrl - artifact URL in generated pom.xml - - artifactDescription - artifact description in generated pom.xml - - scmConnection - SCM connection in generated pom.xml - - scmDeveloperConnection - SCM developer connection in generated pom.xml - - scmUrl - SCM URL in generated pom.xml - - developerName - developer name in generated pom.xml - - developerEmail - developer email in generated pom.xml - - developerOrganization - developer organization in generated pom.xml - - developerOrganizationUrl - developer organization URL in generated pom.xml - - licenseName - The name of the license - - licenseUrl - The URL of the license - - sourceFolder - source folder for generated code - - localVariablePrefix - prefix for generated code members and local variables - - serializableModel - boolean - toggle "implements Serializable" for generated models (Default: false) - - bigDecimalAsString - Treat BigDecimal values as Strings to avoid precision loss. (Default: false) - - fullJavaUtil - whether to use fully qualified name for classes under java.util. This option only works for Java API client (Default: false) - - hideGenerationTimestamp - hides the timestamp when files were generated - - 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) (Default: 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 - Option. Use Java8 classes instead of third party equivalents - true - Use Java 8 classes such as Base64 - false - Various third party libraries as needed - - disableHtmlEscaping - Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields) (Default: false) - - booleanGetterPrefix - Set booleanGetterPrefix (default value 'get') - - parentGroupId - parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect - - parentArtifactId - parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect - - parentVersion - parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect - -Back to the [generators list](README.md) +--- +id: generator-opts-server-java-undertow-server +title: Config Options for java-undertow-server +sidebar_label: java-undertow-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| +|modelPackage|package for generated models| |null| +|apiPackage|package for generated api classes| |null| +|invokerPackage|root package for generated code| |null| +|groupId|groupId in generated pom.xml| |null| +|artifactId|artifactId in generated pom.xml| |null| +|artifactVersion|artifact version in generated pom.xml| |null| +|artifactUrl|artifact URL in generated pom.xml| |null| +|artifactDescription|artifact description in generated pom.xml| |null| +|scmConnection|SCM connection in generated pom.xml| |null| +|scmDeveloperConnection|SCM developer connection in generated pom.xml| |null| +|scmUrl|SCM URL in generated pom.xml| |null| +|developerName|developer name in generated pom.xml| |null| +|developerEmail|developer email in generated pom.xml| |null| +|developerOrganization|developer organization in generated pom.xml| |null| +|developerOrganizationUrl|developer organization URL in generated pom.xml| |null| +|licenseName|The name of the license| |null| +|licenseUrl|The URL of the license| |null| +|sourceFolder|source folder for generated code| |null| +|localVariablePrefix|prefix for generated code members and local variables| |null| +|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 timestamp when files were generated| |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| +|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)
|null| +|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
|null| +|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false| +|booleanGetterPrefix|Set booleanGetterPrefix (default value 'get')| |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| diff --git a/docs/generators/java-vertx.md b/docs/generators/java-vertx.md index 7a2099f101cb..a2e567030182 100644 --- a/docs/generators/java-vertx.md +++ b/docs/generators/java-vertx.md @@ -1,122 +1,46 @@ -CONFIG OPTIONS for java-vertx - - sortParamsByRequiredFlag - Sort method arguments to place required parameters before optional parameters. (Default: true) - - ensureUniqueParams - Whether to ensure parameter names are unique in an operation (rename parameters that are not). (Default: true) - - allowUnicodeIdentifiers - boolean, toggles whether unicode identifiers are allowed in names or not, default is false (Default: false) - - prependFormOrBodyParameters - Add form or body parameters to the beginning of the parameter list. (Default: false) - - modelPackage - package for generated models - - apiPackage - package for generated api classes - - invokerPackage - root package for generated code - - groupId - groupId in generated pom.xml - - artifactId - artifactId in generated pom.xml - - artifactVersion - artifact version in generated pom.xml - - artifactUrl - artifact URL in generated pom.xml - - artifactDescription - artifact description in generated pom.xml - - scmConnection - SCM connection in generated pom.xml - - scmDeveloperConnection - SCM developer connection in generated pom.xml - - scmUrl - SCM URL in generated pom.xml - - developerName - developer name in generated pom.xml - - developerEmail - developer email in generated pom.xml - - developerOrganization - developer organization in generated pom.xml - - developerOrganizationUrl - developer organization URL in generated pom.xml - - licenseName - The name of the license - - licenseUrl - The URL of the license - - sourceFolder - source folder for generated code - - localVariablePrefix - prefix for generated code members and local variables - - serializableModel - boolean - toggle "implements Serializable" for generated models (Default: false) - - bigDecimalAsString - Treat BigDecimal values as Strings to avoid precision loss. (Default: false) - - fullJavaUtil - whether to use fully qualified name for classes under java.util. This option only works for Java API client (Default: false) - - hideGenerationTimestamp - hides the timestamp when files were generated - - 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) (Default: 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 - Option. Use Java8 classes instead of third party equivalents - true - Use Java 8 classes such as Base64 - false - Various third party libraries as needed - - disableHtmlEscaping - Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields) (Default: false) - - booleanGetterPrefix - Set booleanGetterPrefix (default value 'get') - - parentGroupId - parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect - - parentArtifactId - parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect - - parentVersion - parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect - - rxInterface - When specified, API interfaces are generated with RX and methods return Single<> and Comparable. (Default: false) - - vertxSwaggerRouterVersion - Specify the version of the swagger router library - -Back to the [generators list](README.md) +--- +id: generator-opts-server-java-vertx +title: Config Options for java-vertx +sidebar_label: java-vertx +--- + +| 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| +|invokerPackage|root package for generated code| |null| +|groupId|groupId in generated pom.xml| |null| +|artifactId|artifactId in generated pom.xml| |null| +|artifactVersion|artifact version in generated pom.xml| |null| +|artifactUrl|artifact URL in generated pom.xml| |null| +|artifactDescription|artifact description in generated pom.xml| |null| +|scmConnection|SCM connection in generated pom.xml| |null| +|scmDeveloperConnection|SCM developer connection in generated pom.xml| |null| +|scmUrl|SCM URL in generated pom.xml| |null| +|developerName|developer name in generated pom.xml| |null| +|developerEmail|developer email in generated pom.xml| |null| +|developerOrganization|developer organization in generated pom.xml| |null| +|developerOrganizationUrl|developer organization URL in generated pom.xml| |null| +|licenseName|The name of the license| |null| +|licenseUrl|The URL of the license| |null| +|sourceFolder|source folder for generated code| |null| +|localVariablePrefix|prefix for generated code members and local variables| |null| +|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 timestamp when files were generated| |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| +|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)
|null| +|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
|null| +|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false| +|booleanGetterPrefix|Set booleanGetterPrefix (default value 'get')| |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| +|rxInterface|When specified, API interfaces are generated with RX and methods return Single<> and Comparable.| |false| +|vertxSwaggerRouterVersion|Specify the version of the swagger router library| |null| diff --git a/docs/generators/java.md b/docs/generators/java.md index 1eb9ed3e666c..34f3f29b363b 100644 --- a/docs/generators/java.md +++ b/docs/generators/java.md @@ -1,167 +1,57 @@ -CONFIG OPTIONS for java - - sortParamsByRequiredFlag - Sort method arguments to place required parameters before optional parameters. (Default: true) - - ensureUniqueParams - Whether to ensure parameter names are unique in an operation (rename parameters that are not). (Default: true) - - allowUnicodeIdentifiers - boolean, toggles whether unicode identifiers are allowed in names or not, default is false (Default: false) - - prependFormOrBodyParameters - Add form or body parameters to the beginning of the parameter list. (Default: false) - - modelPackage - package for generated models - - apiPackage - package for generated api classes - - invokerPackage - root package for generated code - - groupId - groupId in generated pom.xml - - artifactId - artifactId in generated pom.xml - - artifactVersion - artifact version in generated pom.xml - - artifactUrl - artifact URL in generated pom.xml - - artifactDescription - artifact description in generated pom.xml - - scmConnection - SCM connection in generated pom.xml - - scmDeveloperConnection - SCM developer connection in generated pom.xml - - scmUrl - SCM URL in generated pom.xml - - developerName - developer name in generated pom.xml - - developerEmail - developer email in generated pom.xml - - developerOrganization - developer organization in generated pom.xml - - developerOrganizationUrl - developer organization URL in generated pom.xml - - licenseName - The name of the license - - licenseUrl - The URL of the license - - sourceFolder - source folder for generated code - - localVariablePrefix - prefix for generated code members and local variables - - serializableModel - boolean - toggle "implements Serializable" for generated models (Default: false) - - bigDecimalAsString - Treat BigDecimal values as Strings to avoid precision loss. (Default: false) - - fullJavaUtil - whether to use fully qualified name for classes under java.util. This option only works for Java API client (Default: false) - - hideGenerationTimestamp - hides the timestamp when files were generated - - 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) (Default: 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 - Option. Use Java8 classes instead of third party equivalents - true - Use Java 8 classes such as Base64 - false - Various third party libraries as needed - - disableHtmlEscaping - Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields) (Default: false) - - booleanGetterPrefix - Set booleanGetterPrefix (default value 'get') - - parentGroupId - parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect - - parentArtifactId - parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect - - parentVersion - parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect - - useRxJava - Whether to use the RxJava adapter with the retrofit2 library. (Default: false) - - useRxJava2 - Whether to use the RxJava2 adapter with the retrofit2 library. (Default: false) - - parcelableModel - Whether to generate models for Android that implement Parcelable with the okhttp-gson library. (Default: false) - - usePlayWS - Use Play! Async HTTP client (Play WS API) (Default: false) - - playVersion - Version of Play! Framework (possible values "play24", "play25" (default), "play26") - - supportJava6 - Whether to support Java6 with the Jersey1 library. (Default: false) - - useBeanValidation - Use BeanValidation API annotations (Default: false) - - performBeanValidation - Perform BeanValidation (Default: false) - - useGzipFeature - Send gzip-encoded requests (Default: false) - - useRuntimeException - Use RuntimeException instead of Exception (Default: false) - - feignVersion - Version of OpenFeign: '10.x', '9.x' (default) (Default: 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. (Default: false) - - library - library template (sub-template) to use (Default: okhttp-gson) - jersey1 - HTTP client: Jersey client 1.19.4. JSON processing: Jackson 2.8.9. Enable Java6 support using '-DsupportJava6=true'. Enable gzip request encoding using '-DuseGzipFeature=true'. - feign - HTTP client: OpenFeign 9.4.0. JSON processing: Jackson 2.8.9. To enable OpenFeign 10.x, set the 'feignVersion' option to '10.x' - jersey2 - HTTP client: Jersey client 2.25.1. JSON processing: Jackson 2.8.9 - okhttp-gson - HTTP client: OkHttp 2.7.5. JSON processing: Gson 2.8.1. Enable Parcelable models on Android using '-DparcelableModel=true'. Enable gzip request encoding using '-DuseGzipFeature=true'. - retrofit - HTTP client: OkHttp 2.7.5. JSON processing: Gson 2.3.1 (Retrofit 1.9.0). IMPORTANT NOTE: retrofit1.x is no longer actively maintained so please upgrade to 'retrofit2' instead. - retrofit2 - HTTP client: OkHttp 3.8.0. JSON processing: Gson 2.6.1 (Retrofit 2.3.0). Enable the RxJava adapter using '-DuseRxJava[2]=true'. (RxJava 1.x or 2.x) - resttemplate - HTTP client: Spring RestTemplate 4.3.9-RELEASE. JSON processing: Jackson 2.8.9 - webclient - HTTP client: Spring WebClient 5.0.7-RELEASE. JSON processing: Jackson 2.9.5 - resteasy - HTTP client: Resteasy client 3.1.3.Final. JSON processing: Jackson 2.8.9 - vertx - HTTP client: VertX client 3.2.4. JSON processing: Jackson 2.8.9 - google-api-client - HTTP client: Google API client 1.23.0. JSON processing: Jackson 2.8.9 - rest-assured - HTTP client: rest-assured : 3.1.0. JSON processing: Gson 2.6.1. Only for Java8 - -Back to the [generators list](README.md) +--- +id: generator-opts-client-java +title: Config Options for java +sidebar_label: java +--- + +| 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| +|invokerPackage|root package for generated code| |null| +|groupId|groupId in generated pom.xml| |null| +|artifactId|artifactId in generated pom.xml| |null| +|artifactVersion|artifact version in generated pom.xml| |null| +|artifactUrl|artifact URL in generated pom.xml| |null| +|artifactDescription|artifact description in generated pom.xml| |null| +|scmConnection|SCM connection in generated pom.xml| |null| +|scmDeveloperConnection|SCM developer connection in generated pom.xml| |null| +|scmUrl|SCM URL in generated pom.xml| |null| +|developerName|developer name in generated pom.xml| |null| +|developerEmail|developer email in generated pom.xml| |null| +|developerOrganization|developer organization in generated pom.xml| |null| +|developerOrganizationUrl|developer organization URL in generated pom.xml| |null| +|licenseName|The name of the license| |null| +|licenseUrl|The URL of the license| |null| +|sourceFolder|source folder for generated code| |null| +|localVariablePrefix|prefix for generated code members and local variables| |null| +|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 timestamp when files were generated| |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| +|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)
|null| +|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
|null| +|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false| +|booleanGetterPrefix|Set booleanGetterPrefix (default value 'get')| |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| +|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| +|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| +|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| +|library|library template (sub-template) to use|
**jersey1**
HTTP client: Jersey client 1.19.4. JSON processing: Jackson 2.8.9. Enable Java6 support using '-DsupportJava6=true'. Enable gzip request encoding using '-DuseGzipFeature=true'.
**feign**
HTTP client: OpenFeign 9.4.0. JSON processing: Jackson 2.8.9. To enable OpenFeign 10.x, set the 'feignVersion' option to '10.x'
**jersey2**
HTTP client: Jersey client 2.25.1. JSON processing: Jackson 2.8.9
**okhttp-gson**
HTTP client: OkHttp 2.7.5. JSON processing: Gson 2.8.1. Enable Parcelable models on Android using '-DparcelableModel=true'. Enable gzip request encoding using '-DuseGzipFeature=true'.
**retrofit**
HTTP client: OkHttp 2.7.5. JSON processing: Gson 2.3.1 (Retrofit 1.9.0). IMPORTANT NOTE: retrofit1.x is no longer actively maintained so please upgrade to 'retrofit2' instead.
**retrofit2**
HTTP client: OkHttp 3.8.0. JSON processing: Gson 2.6.1 (Retrofit 2.3.0). Enable the RxJava adapter using '-DuseRxJava[2]=true'. (RxJava 1.x or 2.x)
**resttemplate**
HTTP client: Spring RestTemplate 4.3.9-RELEASE. JSON processing: Jackson 2.8.9
**webclient**
HTTP client: Spring WebClient 5.0.7-RELEASE. JSON processing: Jackson 2.9.5
**resteasy**
HTTP client: Resteasy client 3.1.3.Final. JSON processing: Jackson 2.8.9
**vertx**
HTTP client: VertX client 3.2.4. JSON processing: Jackson 2.8.9
**google-api-client**
HTTP client: Google API client 1.23.0. JSON processing: Jackson 2.8.9
**rest-assured**
HTTP client: rest-assured : 3.1.0. JSON processing: Gson 2.6.1. Only for Java8
|okhttp-gson| diff --git a/docs/generators/javascript-closure-angular.md b/docs/generators/javascript-closure-angular.md index 69f68a358409..eef6edb7c79e 100644 --- a/docs/generators/javascript-closure-angular.md +++ b/docs/generators/javascript-closure-angular.md @@ -1,22 +1,15 @@ -CONFIG OPTIONS for javascript-closure-angular - - sortParamsByRequiredFlag - Sort method arguments to place required parameters before optional parameters. (Default: true) - - ensureUniqueParams - Whether to ensure parameter names are unique in an operation (rename parameters that are not). (Default: true) - - allowUnicodeIdentifiers - boolean, toggles whether unicode identifiers are allowed in names or not, default is false (Default: false) - - prependFormOrBodyParameters - Add form or body parameters to the beginning of the parameter list. (Default: false) - - hideGenerationTimestamp - Hides the generation timestamp when files are generated. (Default: true) - - useEs6 - use ES6 templates (Default: false) - -Back to the [generators list](README.md) +--- +id: generator-opts-client-javascript-closure-angular +title: Config Options for javascript-closure-angular +sidebar_label: javascript-closure-angular +--- + +| 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| +|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true| +|useEs6|use ES6 templates| |false| diff --git a/docs/generators/javascript-flowtyped.md b/docs/generators/javascript-flowtyped.md index 242bde622388..831f5c1586bd 100644 --- a/docs/generators/javascript-flowtyped.md +++ b/docs/generators/javascript-flowtyped.md @@ -1,34 +1,19 @@ -CONFIG OPTIONS for javascript-flowtyped - - sortParamsByRequiredFlag - Sort method arguments to place required parameters before optional parameters. (Default: true) - - ensureUniqueParams - Whether to ensure parameter names are unique in an operation (rename parameters that are not). (Default: true) - - allowUnicodeIdentifiers - boolean, toggles whether unicode identifiers are allowed in names or not, default is false (Default: false) - - prependFormOrBodyParameters - Add form or body parameters to the beginning of the parameter list. (Default: false) - - modelPropertyNaming - Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name (Default: camelCase) - - supportsES6 - Generate code that conforms to ES6. (Default: false) - - npmName - The name under which you want to publish generated npm package - - npmVersion - The version of your npm package - - npmRepository - Use this property to set an url your private npmRepo in the package.json - - snapshot - When setting this property to true the version will be suffixed with -SNAPSHOT.yyyyMMddHHmm (Default: false) - -Back to the [generators list](README.md) +--- +id: generator-opts-client-javascript-flowtyped +title: Config Options for javascript-flowtyped +sidebar_label: javascript-flowtyped +--- + +| 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| +|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| |null| +|npmVersion|The version of your npm package| |null| +|npmRepository|Use this property to set an url your private npmRepo in the package.json| |null| +|snapshot|When setting this property to true the version will be suffixed with -SNAPSHOT.yyyyMMddHHmm| |false| diff --git a/docs/generators/javascript.md b/docs/generators/javascript.md index 1af6a7f918d0..02ce6963f16b 100644 --- a/docs/generators/javascript.md +++ b/docs/generators/javascript.md @@ -1,67 +1,30 @@ -CONFIG OPTIONS for javascript - - sortParamsByRequiredFlag - Sort method arguments to place required parameters before optional parameters. (Default: true) - - ensureUniqueParams - Whether to ensure parameter names are unique in an operation (rename parameters that are not). (Default: true) - - allowUnicodeIdentifiers - boolean, toggles whether unicode identifiers are allowed in names or not, default is false (Default: false) - - prependFormOrBodyParameters - Add form or body parameters to the beginning of the parameter list. (Default: false) - - sourceFolder - source folder for generated code (Default: src) - - localVariablePrefix - prefix for generated code members and local variables - - invokerPackage - root package for generated code - - apiPackage - package for generated api classes - - modelPackage - package for generated models - - projectName - name of the project (Default: generated from info.title or "openapi-js-client") - - moduleName - module name for AMD, Node or globals (Default: generated from ) - - projectDescription - description of the project (Default: using info.description or "Client library of ") - - projectVersion - version of the project (Default: using info.version or "1.0.0") - - licenseName - name of the license the project uses (Default: using info.license.name) - - usePromises - use Promises as return values from the client API, instead of superagent callbacks (Default: false) - - emitModelMethods - generate getters and setters for model properties (Default: false) - - emitJSDoc - generate JSDoc comments (Default: true) - - useInheritance - use JavaScript prototype chains & delegation for inheritance (Default: true) - - hideGenerationTimestamp - Hides the generation timestamp when files are generated. (Default: true) - - useES6 - use JavaScript ES6 (ECMAScript 6) (beta). Default is ES6. (Default: true) - - modelPropertyNaming - Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name (Default: camelCase) - -Back to the [generators list](README.md) +--- +id: generator-opts-client-javascript +title: Config Options for javascript +sidebar_label: javascript +--- + +| 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| +|sourceFolder|source folder for generated code| |src| +|localVariablePrefix|prefix for generated code members and local variables| |null| +|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| +|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true| +|useES6|use JavaScript ES6 (ECMAScript 6) (beta). Default is ES6.| |true| +|modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name| |camelCase| diff --git a/docs/generators/jaxrs-cxf-cdi.md b/docs/generators/jaxrs-cxf-cdi.md index 6f29fc108684..aaab6233b0fc 100644 --- a/docs/generators/jaxrs-cxf-cdi.md +++ b/docs/generators/jaxrs-cxf-cdi.md @@ -1,147 +1,54 @@ -CONFIG OPTIONS for jaxrs-cxf-cdi - - sortParamsByRequiredFlag - Sort method arguments to place required parameters before optional parameters. (Default: true) - - ensureUniqueParams - Whether to ensure parameter names are unique in an operation (rename parameters that are not). (Default: true) - - allowUnicodeIdentifiers - boolean, toggles whether unicode identifiers are allowed in names or not, default is false (Default: false) - - prependFormOrBodyParameters - Add form or body parameters to the beginning of the parameter list. (Default: false) - - modelPackage - package for generated models - - apiPackage - package for generated api classes - - invokerPackage - root package for generated code - - groupId - groupId in generated pom.xml - - artifactId - artifactId in generated pom.xml - - artifactVersion - artifact version in generated pom.xml - - artifactUrl - artifact URL in generated pom.xml - - artifactDescription - artifact description in generated pom.xml - - scmConnection - SCM connection in generated pom.xml - - scmDeveloperConnection - SCM developer connection in generated pom.xml - - scmUrl - SCM URL in generated pom.xml - - developerName - developer name in generated pom.xml - - developerEmail - developer email in generated pom.xml - - developerOrganization - developer organization in generated pom.xml - - developerOrganizationUrl - developer organization URL in generated pom.xml - - licenseName - The name of the license - - licenseUrl - The URL of the license - - sourceFolder - source folder for generated code - - localVariablePrefix - prefix for generated code members and local variables - - serializableModel - boolean - toggle "implements Serializable" for generated models (Default: false) - - bigDecimalAsString - Treat BigDecimal values as Strings to avoid precision loss. (Default: false) - - fullJavaUtil - whether to use fully qualified name for classes under java.util. This option only works for Java API client (Default: false) - - hideGenerationTimestamp - hides the timestamp when files were generated - - 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) (Default: 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 - Option. Use Java8 classes instead of third party equivalents - true - Use Java 8 classes such as Base64 - false - Various third party libraries as needed - - disableHtmlEscaping - Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields) (Default: false) - - booleanGetterPrefix - Set booleanGetterPrefix (default value 'get') - - parentGroupId - parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect - - parentArtifactId - parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect - - parentVersion - parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect - - implFolder - folder for generated implementation code - - title - a title describing the application - - useBeanValidation - Use BeanValidation API annotations (Default: true) - - serverPort - The port on which the server should be started - - library - library template (sub-template) to use (Default: ) - - JAXRS - - generatePom - Whether to generate pom.xml if the file does not already exist. (Default: true) - - interfaceOnly - Whether to generate only API interface stubs without the server files. (Default: false) - - returnResponse - Whether generate API interface should return javax.ws.rs.core.Response instead of a deserialized entity. Only useful if interfaceOnly is true. (Default: false) - - useSwaggerAnnotations - Whether to generate Swagger annotations. (Default: true) - - useBeanValidation - Use BeanValidation API annotations (Default: true) - -Back to the [generators list](README.md) +--- +id: generator-opts-server-jaxrs-cxf-cdi +title: Config Options for jaxrs-cxf-cdi +sidebar_label: jaxrs-cxf-cdi +--- + +| 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| +|invokerPackage|root package for generated code| |null| +|groupId|groupId in generated pom.xml| |null| +|artifactId|artifactId in generated pom.xml| |null| +|artifactVersion|artifact version in generated pom.xml| |null| +|artifactUrl|artifact URL in generated pom.xml| |null| +|artifactDescription|artifact description in generated pom.xml| |null| +|scmConnection|SCM connection in generated pom.xml| |null| +|scmDeveloperConnection|SCM developer connection in generated pom.xml| |null| +|scmUrl|SCM URL in generated pom.xml| |null| +|developerName|developer name in generated pom.xml| |null| +|developerEmail|developer email in generated pom.xml| |null| +|developerOrganization|developer organization in generated pom.xml| |null| +|developerOrganizationUrl|developer organization URL in generated pom.xml| |null| +|licenseName|The name of the license| |null| +|licenseUrl|The URL of the license| |null| +|sourceFolder|source folder for generated code| |null| +|localVariablePrefix|prefix for generated code members and local variables| |null| +|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 timestamp when files were generated| |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| +|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)
|null| +|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
|null| +|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false| +|booleanGetterPrefix|Set booleanGetterPrefix (default value 'get')| |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| +|implFolder|folder for generated implementation code| |null| +|title|a title describing the application| |null| +|useBeanValidation|Use BeanValidation API annotations| |true| +|serverPort|The port on which the server should be started| |null| +|library|library template (sub-template) to use|
**<default>**
JAXRS
|<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| +|useBeanValidation|Use BeanValidation API annotations| |true| diff --git a/docs/generators/jaxrs-cxf-client.md b/docs/generators/jaxrs-cxf-client.md index df9f1d2b8af0..53309c560f89 100644 --- a/docs/generators/jaxrs-cxf-client.md +++ b/docs/generators/jaxrs-cxf-client.md @@ -1,128 +1,48 @@ -CONFIG OPTIONS for jaxrs-cxf-client - - sortParamsByRequiredFlag - Sort method arguments to place required parameters before optional parameters. (Default: true) - - ensureUniqueParams - Whether to ensure parameter names are unique in an operation (rename parameters that are not). (Default: true) - - allowUnicodeIdentifiers - boolean, toggles whether unicode identifiers are allowed in names or not, default is false (Default: false) - - prependFormOrBodyParameters - Add form or body parameters to the beginning of the parameter list. (Default: false) - - modelPackage - package for generated models - - apiPackage - package for generated api classes - - invokerPackage - root package for generated code - - groupId - groupId in generated pom.xml - - artifactId - artifactId in generated pom.xml - - artifactVersion - artifact version in generated pom.xml - - artifactUrl - artifact URL in generated pom.xml - - artifactDescription - artifact description in generated pom.xml - - scmConnection - SCM connection in generated pom.xml - - scmDeveloperConnection - SCM developer connection in generated pom.xml - - scmUrl - SCM URL in generated pom.xml - - developerName - developer name in generated pom.xml - - developerEmail - developer email in generated pom.xml - - developerOrganization - developer organization in generated pom.xml - - developerOrganizationUrl - developer organization URL in generated pom.xml - - licenseName - The name of the license - - licenseUrl - The URL of the license - - sourceFolder - source folder for generated code - - localVariablePrefix - prefix for generated code members and local variables - - serializableModel - boolean - toggle "implements Serializable" for generated models (Default: false) - - bigDecimalAsString - Treat BigDecimal values as Strings to avoid precision loss. (Default: false) - - fullJavaUtil - whether to use fully qualified name for classes under java.util. This option only works for Java API client (Default: false) - - hideGenerationTimestamp - hides the timestamp when files were generated - - 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) (Default: 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 - Option. Use Java8 classes instead of third party equivalents - true - Use Java 8 classes such as Base64 - false - Various third party libraries as needed - - disableHtmlEscaping - Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields) (Default: false) - - booleanGetterPrefix - Set booleanGetterPrefix (default value 'get') - - parentGroupId - parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect - - parentArtifactId - parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect - - parentVersion - parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect - - useBeanValidation - Use BeanValidation API annotations (Default: false) - - useGzipFeatureForTests - Use Gzip Feature for tests (Default: false) - - useLoggingFeatureForTests - Use Logging Feature for tests (Default: false) - - useGenericResponse - Use generic response (Default: false) - -Back to the [generators list](README.md) +--- +id: generator-opts-client-jaxrs-cxf-client +title: Config Options for jaxrs-cxf-client +sidebar_label: jaxrs-cxf-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| +|modelPackage|package for generated models| |null| +|apiPackage|package for generated api classes| |null| +|invokerPackage|root package for generated code| |null| +|groupId|groupId in generated pom.xml| |null| +|artifactId|artifactId in generated pom.xml| |null| +|artifactVersion|artifact version in generated pom.xml| |null| +|artifactUrl|artifact URL in generated pom.xml| |null| +|artifactDescription|artifact description in generated pom.xml| |null| +|scmConnection|SCM connection in generated pom.xml| |null| +|scmDeveloperConnection|SCM developer connection in generated pom.xml| |null| +|scmUrl|SCM URL in generated pom.xml| |null| +|developerName|developer name in generated pom.xml| |null| +|developerEmail|developer email in generated pom.xml| |null| +|developerOrganization|developer organization in generated pom.xml| |null| +|developerOrganizationUrl|developer organization URL in generated pom.xml| |null| +|licenseName|The name of the license| |null| +|licenseUrl|The URL of the license| |null| +|sourceFolder|source folder for generated code| |null| +|localVariablePrefix|prefix for generated code members and local variables| |null| +|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 timestamp when files were generated| |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| +|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)
|null| +|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
|null| +|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false| +|booleanGetterPrefix|Set booleanGetterPrefix (default value 'get')| |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| +|useBeanValidation|Use BeanValidation API annotations| |false| +|useGzipFeatureForTests|Use Gzip Feature for tests| |false| +|useLoggingFeatureForTests|Use Logging Feature for tests| |false| +|useGenericResponse|Use generic response| |false| diff --git a/docs/generators/jaxrs-cxf.md b/docs/generators/jaxrs-cxf.md index 4fce66ff8dc8..93ce3dfb310f 100644 --- a/docs/generators/jaxrs-cxf.md +++ b/docs/generators/jaxrs-cxf.md @@ -1,179 +1,65 @@ -CONFIG OPTIONS for jaxrs-cxf - - sortParamsByRequiredFlag - Sort method arguments to place required parameters before optional parameters. (Default: true) - - ensureUniqueParams - Whether to ensure parameter names are unique in an operation (rename parameters that are not). (Default: true) - - allowUnicodeIdentifiers - boolean, toggles whether unicode identifiers are allowed in names or not, default is false (Default: false) - - prependFormOrBodyParameters - Add form or body parameters to the beginning of the parameter list. (Default: false) - - modelPackage - package for generated models - - apiPackage - package for generated api classes - - invokerPackage - root package for generated code - - groupId - groupId in generated pom.xml - - artifactId - artifactId in generated pom.xml - - artifactVersion - artifact version in generated pom.xml - - artifactUrl - artifact URL in generated pom.xml - - artifactDescription - artifact description in generated pom.xml - - scmConnection - SCM connection in generated pom.xml - - scmDeveloperConnection - SCM developer connection in generated pom.xml - - scmUrl - SCM URL in generated pom.xml - - developerName - developer name in generated pom.xml - - developerEmail - developer email in generated pom.xml - - developerOrganization - developer organization in generated pom.xml - - developerOrganizationUrl - developer organization URL in generated pom.xml - - licenseName - The name of the license - - licenseUrl - The URL of the license - - sourceFolder - source folder for generated code - - localVariablePrefix - prefix for generated code members and local variables - - serializableModel - boolean - toggle "implements Serializable" for generated models (Default: false) - - bigDecimalAsString - Treat BigDecimal values as Strings to avoid precision loss. (Default: false) - - fullJavaUtil - whether to use fully qualified name for classes under java.util. This option only works for Java API client (Default: false) - - hideGenerationTimestamp - hides the timestamp when files were generated - - 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) (Default: 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 - Option. Use Java8 classes instead of third party equivalents - true - Use Java 8 classes such as Base64 - false - Various third party libraries as needed - - disableHtmlEscaping - Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields) (Default: false) - - booleanGetterPrefix - Set booleanGetterPrefix (default value 'get') - - parentGroupId - parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect - - parentArtifactId - parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect - - parentVersion - parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect - - implFolder - folder for generated implementation code - - title - a title describing the application - - useBeanValidation - Use BeanValidation API annotations (Default: true) - - serverPort - The port on which the server should be started - - generateSpringApplication - Generate Spring application (Default: false) - - useSpringAnnotationConfig - Use Spring Annotation Config (Default: false) - - useSwaggerFeature - Use Swagger Feature (Default: false) - - useSwaggerUI - Use Swagger UI (Default: false) - - useWadlFeature - Use WADL Feature (Default: false) - - useMultipartFeature - Use Multipart Feature (Default: false) - - useGzipFeature - Use Gzip Feature (Default: false) - - useGzipFeatureForTests - Use Gzip Feature for tests (Default: false) - - useBeanValidationFeature - Use BeanValidation Feature (Default: false) - - useLoggingFeature - Use Logging Feature (Default: false) - - useLoggingFeatureForTests - Use Logging Feature for tests (Default: false) - - generateSpringBootApplication - Generate Spring Boot application (Default: false) - - generateJbossDeploymentDescriptor - Generate Jboss Deployment Descriptor (Default: false) - - addConsumesProducesJson - Add @Consumes/@Produces Json to API interface (Default: false) - - useAnnotatedBasePath - Use @Path annotations for basePath (Default: false) - - generateNonSpringApplication - Generate non-Spring application (Default: false) - - useGenericResponse - Use generic response (Default: false) - -Back to the [generators list](README.md) +--- +id: generator-opts-server-jaxrs-cxf +title: Config Options for jaxrs-cxf +sidebar_label: jaxrs-cxf +--- + +| 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| +|invokerPackage|root package for generated code| |null| +|groupId|groupId in generated pom.xml| |null| +|artifactId|artifactId in generated pom.xml| |null| +|artifactVersion|artifact version in generated pom.xml| |null| +|artifactUrl|artifact URL in generated pom.xml| |null| +|artifactDescription|artifact description in generated pom.xml| |null| +|scmConnection|SCM connection in generated pom.xml| |null| +|scmDeveloperConnection|SCM developer connection in generated pom.xml| |null| +|scmUrl|SCM URL in generated pom.xml| |null| +|developerName|developer name in generated pom.xml| |null| +|developerEmail|developer email in generated pom.xml| |null| +|developerOrganization|developer organization in generated pom.xml| |null| +|developerOrganizationUrl|developer organization URL in generated pom.xml| |null| +|licenseName|The name of the license| |null| +|licenseUrl|The URL of the license| |null| +|sourceFolder|source folder for generated code| |null| +|localVariablePrefix|prefix for generated code members and local variables| |null| +|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 timestamp when files were generated| |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| +|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)
|null| +|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
|null| +|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false| +|booleanGetterPrefix|Set booleanGetterPrefix (default value 'get')| |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| +|implFolder|folder for generated implementation code| |null| +|title|a title describing the application| |null| +|useBeanValidation|Use BeanValidation API annotations| |true| +|serverPort|The port on which the server should be started| |null| +|generateSpringApplication|Generate Spring application| |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| diff --git a/docs/generators/jaxrs-jersey.md b/docs/generators/jaxrs-jersey.md index b4b0d29c76f4..b9a44df0ecc9 100644 --- a/docs/generators/jaxrs-jersey.md +++ b/docs/generators/jaxrs-jersey.md @@ -1,139 +1,51 @@ -CONFIG OPTIONS for jaxrs-jersey - - sortParamsByRequiredFlag - Sort method arguments to place required parameters before optional parameters. (Default: true) - - ensureUniqueParams - Whether to ensure parameter names are unique in an operation (rename parameters that are not). (Default: true) - - allowUnicodeIdentifiers - boolean, toggles whether unicode identifiers are allowed in names or not, default is false (Default: false) - - prependFormOrBodyParameters - Add form or body parameters to the beginning of the parameter list. (Default: false) - - modelPackage - package for generated models - - apiPackage - package for generated api classes - - invokerPackage - root package for generated code - - groupId - groupId in generated pom.xml - - artifactId - artifactId in generated pom.xml - - artifactVersion - artifact version in generated pom.xml - - artifactUrl - artifact URL in generated pom.xml - - artifactDescription - artifact description in generated pom.xml - - scmConnection - SCM connection in generated pom.xml - - scmDeveloperConnection - SCM developer connection in generated pom.xml - - scmUrl - SCM URL in generated pom.xml - - developerName - developer name in generated pom.xml - - developerEmail - developer email in generated pom.xml - - developerOrganization - developer organization in generated pom.xml - - developerOrganizationUrl - developer organization URL in generated pom.xml - - licenseName - The name of the license - - licenseUrl - The URL of the license - - sourceFolder - source folder for generated code - - localVariablePrefix - prefix for generated code members and local variables - - serializableModel - boolean - toggle "implements Serializable" for generated models (Default: false) - - bigDecimalAsString - Treat BigDecimal values as Strings to avoid precision loss. (Default: false) - - fullJavaUtil - whether to use fully qualified name for classes under java.util. This option only works for Java API client (Default: false) - - hideGenerationTimestamp - hides the timestamp when files were generated - - 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) (Default: 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 - Option. Use Java8 classes instead of third party equivalents - true - Use Java 8 classes such as Base64 - false - Various third party libraries as needed - - disableHtmlEscaping - Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields) (Default: false) - - booleanGetterPrefix - Set booleanGetterPrefix (default value 'get') - - parentGroupId - parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect - - parentArtifactId - parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect - - parentVersion - parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect - - implFolder - folder for generated implementation code - - title - a title describing the application - - useBeanValidation - Use BeanValidation API annotations (Default: true) - - serverPort - The port on which the server should be started - - library - library template (sub-template) to use (Default: jersey2) - jersey1 - Jersey core 1.x - jersey2 - Jersey core 2.x - - supportJava6 - Whether to support Java6 with the Jersey1/2 library. (Default: false) - - useTags - use tags for creating interface and controller classnames (Default: false) - -Back to the [generators list](README.md) +--- +id: generator-opts-server-jaxrs-jersey +title: Config Options for jaxrs-jersey +sidebar_label: jaxrs-jersey +--- + +| 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| +|invokerPackage|root package for generated code| |null| +|groupId|groupId in generated pom.xml| |null| +|artifactId|artifactId in generated pom.xml| |null| +|artifactVersion|artifact version in generated pom.xml| |null| +|artifactUrl|artifact URL in generated pom.xml| |null| +|artifactDescription|artifact description in generated pom.xml| |null| +|scmConnection|SCM connection in generated pom.xml| |null| +|scmDeveloperConnection|SCM developer connection in generated pom.xml| |null| +|scmUrl|SCM URL in generated pom.xml| |null| +|developerName|developer name in generated pom.xml| |null| +|developerEmail|developer email in generated pom.xml| |null| +|developerOrganization|developer organization in generated pom.xml| |null| +|developerOrganizationUrl|developer organization URL in generated pom.xml| |null| +|licenseName|The name of the license| |null| +|licenseUrl|The URL of the license| |null| +|sourceFolder|source folder for generated code| |null| +|localVariablePrefix|prefix for generated code members and local variables| |null| +|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 timestamp when files were generated| |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| +|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)
|null| +|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
|null| +|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false| +|booleanGetterPrefix|Set booleanGetterPrefix (default value 'get')| |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| +|implFolder|folder for generated implementation code| |null| +|title|a title describing the application| |null| +|useBeanValidation|Use BeanValidation API annotations| |true| +|serverPort|The port on which the server should be started| |null| +|library|library template (sub-template) to use|
**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| diff --git a/docs/generators/jaxrs-resteasy-eap.md b/docs/generators/jaxrs-resteasy-eap.md index d031162a1fc7..03275a94975e 100644 --- a/docs/generators/jaxrs-resteasy-eap.md +++ b/docs/generators/jaxrs-resteasy-eap.md @@ -1,137 +1,51 @@ -CONFIG OPTIONS for jaxrs-resteasy-eap - - sortParamsByRequiredFlag - Sort method arguments to place required parameters before optional parameters. (Default: true) - - ensureUniqueParams - Whether to ensure parameter names are unique in an operation (rename parameters that are not). (Default: true) - - allowUnicodeIdentifiers - boolean, toggles whether unicode identifiers are allowed in names or not, default is false (Default: false) - - prependFormOrBodyParameters - Add form or body parameters to the beginning of the parameter list. (Default: false) - - modelPackage - package for generated models - - apiPackage - package for generated api classes - - invokerPackage - root package for generated code - - groupId - groupId in generated pom.xml - - artifactId - artifactId in generated pom.xml - - artifactVersion - artifact version in generated pom.xml - - artifactUrl - artifact URL in generated pom.xml - - artifactDescription - artifact description in generated pom.xml - - scmConnection - SCM connection in generated pom.xml - - scmDeveloperConnection - SCM developer connection in generated pom.xml - - scmUrl - SCM URL in generated pom.xml - - developerName - developer name in generated pom.xml - - developerEmail - developer email in generated pom.xml - - developerOrganization - developer organization in generated pom.xml - - developerOrganizationUrl - developer organization URL in generated pom.xml - - licenseName - The name of the license - - licenseUrl - The URL of the license - - sourceFolder - source folder for generated code - - localVariablePrefix - prefix for generated code members and local variables - - serializableModel - boolean - toggle "implements Serializable" for generated models (Default: false) - - bigDecimalAsString - Treat BigDecimal values as Strings to avoid precision loss. (Default: false) - - fullJavaUtil - whether to use fully qualified name for classes under java.util. This option only works for Java API client (Default: false) - - hideGenerationTimestamp - hides the timestamp when files were generated - - 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) (Default: 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 - Option. Use Java8 classes instead of third party equivalents - true - Use Java 8 classes such as Base64 - false - Various third party libraries as needed - - disableHtmlEscaping - Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields) (Default: false) - - booleanGetterPrefix - Set booleanGetterPrefix (default value 'get') - - parentGroupId - parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect - - parentArtifactId - parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect - - parentVersion - parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect - - implFolder - folder for generated implementation code - - title - a title describing the application - - useBeanValidation - Use BeanValidation API annotations (Default: true) - - serverPort - The port on which the server should be started - - useBeanValidation - Use BeanValidation API annotations (Default: true) - - generateJbossDeploymentDescriptor - Generate Jboss Deployment Descriptor (Default: true) - - useSwaggerFeature - Use dynamic Swagger generator (Default: false) - -Back to the [generators list](README.md) +--- +id: generator-opts-server-jaxrs-resteasy-eap +title: Config Options for jaxrs-resteasy-eap +sidebar_label: jaxrs-resteasy-eap +--- + +| 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| +|invokerPackage|root package for generated code| |null| +|groupId|groupId in generated pom.xml| |null| +|artifactId|artifactId in generated pom.xml| |null| +|artifactVersion|artifact version in generated pom.xml| |null| +|artifactUrl|artifact URL in generated pom.xml| |null| +|artifactDescription|artifact description in generated pom.xml| |null| +|scmConnection|SCM connection in generated pom.xml| |null| +|scmDeveloperConnection|SCM developer connection in generated pom.xml| |null| +|scmUrl|SCM URL in generated pom.xml| |null| +|developerName|developer name in generated pom.xml| |null| +|developerEmail|developer email in generated pom.xml| |null| +|developerOrganization|developer organization in generated pom.xml| |null| +|developerOrganizationUrl|developer organization URL in generated pom.xml| |null| +|licenseName|The name of the license| |null| +|licenseUrl|The URL of the license| |null| +|sourceFolder|source folder for generated code| |null| +|localVariablePrefix|prefix for generated code members and local variables| |null| +|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 timestamp when files were generated| |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| +|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)
|null| +|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
|null| +|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false| +|booleanGetterPrefix|Set booleanGetterPrefix (default value 'get')| |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| +|implFolder|folder for generated implementation code| |null| +|title|a title describing the application| |null| +|useBeanValidation|Use BeanValidation API annotations| |true| +|serverPort|The port on which the server should be started| |null| +|useBeanValidation|Use BeanValidation API annotations| |true| +|generateJbossDeploymentDescriptor|Generate Jboss Deployment Descriptor| |true| +|useSwaggerFeature|Use dynamic Swagger generator| |false| diff --git a/docs/generators/jaxrs-resteasy.md b/docs/generators/jaxrs-resteasy.md index 56db591b479a..ae148d03a22e 100644 --- a/docs/generators/jaxrs-resteasy.md +++ b/docs/generators/jaxrs-resteasy.md @@ -1,131 +1,49 @@ -CONFIG OPTIONS for jaxrs-resteasy - - sortParamsByRequiredFlag - Sort method arguments to place required parameters before optional parameters. (Default: true) - - ensureUniqueParams - Whether to ensure parameter names are unique in an operation (rename parameters that are not). (Default: true) - - allowUnicodeIdentifiers - boolean, toggles whether unicode identifiers are allowed in names or not, default is false (Default: false) - - prependFormOrBodyParameters - Add form or body parameters to the beginning of the parameter list. (Default: false) - - modelPackage - package for generated models - - apiPackage - package for generated api classes - - invokerPackage - root package for generated code - - groupId - groupId in generated pom.xml - - artifactId - artifactId in generated pom.xml - - artifactVersion - artifact version in generated pom.xml - - artifactUrl - artifact URL in generated pom.xml - - artifactDescription - artifact description in generated pom.xml - - scmConnection - SCM connection in generated pom.xml - - scmDeveloperConnection - SCM developer connection in generated pom.xml - - scmUrl - SCM URL in generated pom.xml - - developerName - developer name in generated pom.xml - - developerEmail - developer email in generated pom.xml - - developerOrganization - developer organization in generated pom.xml - - developerOrganizationUrl - developer organization URL in generated pom.xml - - licenseName - The name of the license - - licenseUrl - The URL of the license - - sourceFolder - source folder for generated code - - localVariablePrefix - prefix for generated code members and local variables - - serializableModel - boolean - toggle "implements Serializable" for generated models (Default: false) - - bigDecimalAsString - Treat BigDecimal values as Strings to avoid precision loss. (Default: false) - - fullJavaUtil - whether to use fully qualified name for classes under java.util. This option only works for Java API client (Default: false) - - hideGenerationTimestamp - hides the timestamp when files were generated - - 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) (Default: 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 - Option. Use Java8 classes instead of third party equivalents - true - Use Java 8 classes such as Base64 - false - Various third party libraries as needed - - disableHtmlEscaping - Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields) (Default: false) - - booleanGetterPrefix - Set booleanGetterPrefix (default value 'get') - - parentGroupId - parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect - - parentArtifactId - parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect - - parentVersion - parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect - - implFolder - folder for generated implementation code - - title - a title describing the application - - useBeanValidation - Use BeanValidation API annotations (Default: true) - - serverPort - The port on which the server should be started - - generateJbossDeploymentDescriptor - Generate Jboss Deployment Descriptor (Default: false) - -Back to the [generators list](README.md) +--- +id: generator-opts-server-jaxrs-resteasy +title: Config Options for jaxrs-resteasy +sidebar_label: jaxrs-resteasy +--- + +| 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| +|invokerPackage|root package for generated code| |null| +|groupId|groupId in generated pom.xml| |null| +|artifactId|artifactId in generated pom.xml| |null| +|artifactVersion|artifact version in generated pom.xml| |null| +|artifactUrl|artifact URL in generated pom.xml| |null| +|artifactDescription|artifact description in generated pom.xml| |null| +|scmConnection|SCM connection in generated pom.xml| |null| +|scmDeveloperConnection|SCM developer connection in generated pom.xml| |null| +|scmUrl|SCM URL in generated pom.xml| |null| +|developerName|developer name in generated pom.xml| |null| +|developerEmail|developer email in generated pom.xml| |null| +|developerOrganization|developer organization in generated pom.xml| |null| +|developerOrganizationUrl|developer organization URL in generated pom.xml| |null| +|licenseName|The name of the license| |null| +|licenseUrl|The URL of the license| |null| +|sourceFolder|source folder for generated code| |null| +|localVariablePrefix|prefix for generated code members and local variables| |null| +|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 timestamp when files were generated| |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| +|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)
|null| +|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
|null| +|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false| +|booleanGetterPrefix|Set booleanGetterPrefix (default value 'get')| |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| +|implFolder|folder for generated implementation code| |null| +|title|a title describing the application| |null| +|useBeanValidation|Use BeanValidation API annotations| |true| +|serverPort|The port on which the server should be started| |null| +|generateJbossDeploymentDescriptor|Generate Jboss Deployment Descriptor| |false| diff --git a/docs/generators/jaxrs-spec.md b/docs/generators/jaxrs-spec.md index 1c9a9cf12d31..e421039fc8e0 100644 --- a/docs/generators/jaxrs-spec.md +++ b/docs/generators/jaxrs-spec.md @@ -1,144 +1,53 @@ -CONFIG OPTIONS for jaxrs-spec - - sortParamsByRequiredFlag - Sort method arguments to place required parameters before optional parameters. (Default: true) - - ensureUniqueParams - Whether to ensure parameter names are unique in an operation (rename parameters that are not). (Default: true) - - allowUnicodeIdentifiers - boolean, toggles whether unicode identifiers are allowed in names or not, default is false (Default: false) - - prependFormOrBodyParameters - Add form or body parameters to the beginning of the parameter list. (Default: false) - - modelPackage - package for generated models - - apiPackage - package for generated api classes - - invokerPackage - root package for generated code - - groupId - groupId in generated pom.xml - - artifactId - artifactId in generated pom.xml - - artifactVersion - artifact version in generated pom.xml - - artifactUrl - artifact URL in generated pom.xml - - artifactDescription - artifact description in generated pom.xml - - scmConnection - SCM connection in generated pom.xml - - scmDeveloperConnection - SCM developer connection in generated pom.xml - - scmUrl - SCM URL in generated pom.xml - - developerName - developer name in generated pom.xml - - developerEmail - developer email in generated pom.xml - - developerOrganization - developer organization in generated pom.xml - - developerOrganizationUrl - developer organization URL in generated pom.xml - - licenseName - The name of the license - - licenseUrl - The URL of the license - - sourceFolder - source folder for generated code - - localVariablePrefix - prefix for generated code members and local variables - - serializableModel - boolean - toggle "implements Serializable" for generated models (Default: false) - - bigDecimalAsString - Treat BigDecimal values as Strings to avoid precision loss. (Default: false) - - fullJavaUtil - whether to use fully qualified name for classes under java.util. This option only works for Java API client (Default: false) - - hideGenerationTimestamp - hides the timestamp when files were generated - - 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) (Default: 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 - Option. Use Java8 classes instead of third party equivalents - true - Use Java 8 classes such as Base64 - false - Various third party libraries as needed - - disableHtmlEscaping - Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields) (Default: false) - - booleanGetterPrefix - Set booleanGetterPrefix (default value 'get') - - parentGroupId - parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect - - parentArtifactId - parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect - - parentVersion - parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect - - implFolder - folder for generated implementation code - - title - a title describing the application - - useBeanValidation - Use BeanValidation API annotations (Default: true) - - serverPort - The port on which the server should be started - - library - library template (sub-template) to use (Default: ) - - JAXRS - - generatePom - Whether to generate pom.xml if the file does not already exist. (Default: true) - - interfaceOnly - Whether to generate only API interface stubs without the server files. (Default: false) - - returnResponse - Whether generate API interface should return javax.ws.rs.core.Response instead of a deserialized entity. Only useful if interfaceOnly is true. (Default: false) - - useSwaggerAnnotations - Whether to generate Swagger annotations. (Default: true) - -Back to the [generators list](README.md) +--- +id: generator-opts-server-jaxrs-spec +title: Config Options for jaxrs-spec +sidebar_label: jaxrs-spec +--- + +| 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| +|invokerPackage|root package for generated code| |null| +|groupId|groupId in generated pom.xml| |null| +|artifactId|artifactId in generated pom.xml| |null| +|artifactVersion|artifact version in generated pom.xml| |null| +|artifactUrl|artifact URL in generated pom.xml| |null| +|artifactDescription|artifact description in generated pom.xml| |null| +|scmConnection|SCM connection in generated pom.xml| |null| +|scmDeveloperConnection|SCM developer connection in generated pom.xml| |null| +|scmUrl|SCM URL in generated pom.xml| |null| +|developerName|developer name in generated pom.xml| |null| +|developerEmail|developer email in generated pom.xml| |null| +|developerOrganization|developer organization in generated pom.xml| |null| +|developerOrganizationUrl|developer organization URL in generated pom.xml| |null| +|licenseName|The name of the license| |null| +|licenseUrl|The URL of the license| |null| +|sourceFolder|source folder for generated code| |null| +|localVariablePrefix|prefix for generated code members and local variables| |null| +|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 timestamp when files were generated| |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| +|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)
|null| +|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
|null| +|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false| +|booleanGetterPrefix|Set booleanGetterPrefix (default value 'get')| |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| +|implFolder|folder for generated implementation code| |null| +|title|a title describing the application| |null| +|useBeanValidation|Use BeanValidation API annotations| |true| +|serverPort|The port on which the server should be started| |null| +|library|library template (sub-template) to use|
**<default>**
JAXRS
|<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| diff --git a/docs/generators/jmeter.md b/docs/generators/jmeter.md index c9a8d2a0e9f4..6771efad160c 100644 --- a/docs/generators/jmeter.md +++ b/docs/generators/jmeter.md @@ -1,16 +1,13 @@ -CONFIG OPTIONS for jmeter - - sortParamsByRequiredFlag - Sort method arguments to place required parameters before optional parameters. (Default: true) - - ensureUniqueParams - Whether to ensure parameter names are unique in an operation (rename parameters that are not). (Default: true) - - allowUnicodeIdentifiers - boolean, toggles whether unicode identifiers are allowed in names or not, default is false (Default: false) - - prependFormOrBodyParameters - Add form or body parameters to the beginning of the parameter list. (Default: false) - -Back to the [generators list](README.md) +--- +id: generator-opts-client-jmeter +title: Config Options for jmeter +sidebar_label: jmeter +--- + +| 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/kotlin-server.md b/docs/generators/kotlin-server.md index 3ff4b6151717..07be315a0dca 100644 --- a/docs/generators/kotlin-server.md +++ b/docs/generators/kotlin-server.md @@ -1,44 +1,22 @@ -CONFIG OPTIONS for kotlin-server - - sourceFolder - source folder for generated code (Default: src/main/kotlin) - - packageName - Generated artifact package name. (Default: org.openapitools) - - groupId - Generated artifact package's organization (i.e. maven groupId). (Default: org.openapitools) - - artifactId - Generated artifact id (name of jar). - - artifactVersion - Generated artifact's package version. (Default: 1.0.0) - - enumPropertyNaming - Naming convention for enum properties: 'camelCase', 'PascalCase', 'snake_case', 'UPPERCASE', and 'original' (Default: camelCase) - - parcelizeModels - toggle "@Parcelize" for generated models - - library - library template (sub-template) to use (Default: ktor) - ktor - ktor framework - - featureAutoHead - Automatically provide responses to HEAD requests for existing routes that have the GET verb defined. (Default: true) - - featureConditionalHeaders - Avoid sending content if client already has same content, by checking ETag or LastModified properties. (Default: false) - - featureHSTS - Avoid sending content if client already has same content, by checking ETag or LastModified properties. (Default: true) - - featureCORS - Ktor by default provides an interceptor for implementing proper support for Cross-Origin Resource Sharing (CORS). See enable-cors.org. (Default: false) - - featureCompression - Adds ability to compress outgoing content using gzip, deflate or custom encoder and thus reduce size of the response. (Default: true) - -Back to the [generators list](README.md) +--- +id: generator-opts-server-kotlin-server +title: Config Options for kotlin-server +sidebar_label: kotlin-server +--- + +| Option | Description | Values | Default | +| ------ | ----------- | ------ | ------- | +|sourceFolder|source folder for generated code| |src/main/kotlin| +|packageName|Generated artifact package name.| |org.openapitools| +|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| +|parcelizeModels|toggle "@Parcelize" for generated models| |null| +|library|library template (sub-template) to use|
**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| diff --git a/docs/generators/kotlin-spring.md b/docs/generators/kotlin-spring.md index 568c3967eec9..89ec5f81e793 100644 --- a/docs/generators/kotlin-spring.md +++ b/docs/generators/kotlin-spring.md @@ -1,62 +1,28 @@ -CONFIG OPTIONS for kotlin-spring - - sourceFolder - source folder for generated code (Default: src/main/kotlin) - - packageName - Generated artifact package name. (Default: org.openapitools) - - groupId - Generated artifact package's organization (i.e. maven groupId). (Default: org.openapitools) - - artifactId - Generated artifact id (name of jar). - - artifactVersion - Generated artifact's package version. (Default: 1.0.0) - - enumPropertyNaming - Naming convention for enum properties: 'camelCase', 'PascalCase', 'snake_case', 'UPPERCASE', and 'original' (Default: camelCase) - - parcelizeModels - toggle "@Parcelize" for generated models - - title - server title name or client service name (Default: OpenAPI Kotlin Spring) - - basePackage - base package (invokerPackage) for generated code (Default: org.openapitools) - - serverPort - configuration the port in which the sever is to run on (Default: 8080) - - modelPackage - model package for generated code (Default: org.openapitools.model) - - apiPackage - api package for generated code (Default: org.openapitools.api) - - exceptionHandler - generate default global exception handlers (Default: true) - - gradleBuildFile - generate a gradle build file using the Kotlin DSL (Default: true) - - swaggerAnnotations - generate swagger annotations to go alongside controllers and models (Default: 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 (Default: false) - - serviceImplementation - generate stub service implementations that extends service interfaces. If this is set to true service interfaces will also be generated (Default: false) - - useBeanValidation - Use BeanValidation API annotations to validate data types (Default: true) - - library - library template (sub-template) to use (Default: spring-boot) - spring-boot - Spring-boot Server application. - -Back to the [generators list](README.md) +--- +id: generator-opts-server-kotlin-spring +title: Config Options for kotlin-spring +sidebar_label: kotlin-spring +--- + +| Option | Description | Values | Default | +| ------ | ----------- | ------ | ------- | +|sourceFolder|source folder for generated code| |src/main/kotlin| +|packageName|Generated artifact package name.| |org.openapitools| +|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| +|parcelizeModels|toggle "@Parcelize" for generated models| |null| +|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| +|exceptionHandler|generate default global exception handlers| |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| +|library|library template (sub-template) to use|
**spring-boot**
Spring-boot Server application.
|spring-boot| diff --git a/docs/generators/kotlin.md b/docs/generators/kotlin.md index 0aee9282c642..55ae9f22bce8 100644 --- a/docs/generators/kotlin.md +++ b/docs/generators/kotlin.md @@ -1,36 +1,18 @@ -CONFIG OPTIONS for kotlin - - sourceFolder - source folder for generated code (Default: src/main/kotlin) - - packageName - Generated artifact package name. (Default: org.openapitools) - - groupId - Generated artifact package's organization (i.e. maven groupId). (Default: org.openapitools) - - artifactId - Generated artifact id (name of jar). - - artifactVersion - Generated artifact's package version. (Default: 1.0.0) - - enumPropertyNaming - Naming convention for enum properties: 'camelCase', 'PascalCase', 'snake_case', 'UPPERCASE', and 'original' (Default: camelCase) - - parcelizeModels - toggle "@Parcelize" for generated models - - dateLibrary - Option. Date library to use - string - String - java8 - Java 8 native JSR310 - threetenbp - Threetenbp - - collectionType - Option. Collection type to use - array - kotlin.Array - list - kotlin.collections.List - -Back to the [generators list](README.md) +--- +id: generator-opts-client-kotlin +title: Config Options for kotlin +sidebar_label: kotlin +--- + +| Option | Description | Values | Default | +| ------ | ----------- | ------ | ------- | +|sourceFolder|source folder for generated code| |src/main/kotlin| +|packageName|Generated artifact package name.| |org.openapitools| +|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| +|parcelizeModels|toggle "@Parcelize" for generated models| |null| +|dateLibrary|Option. Date library to use|
**string**
String
**java8**
Java 8 native JSR310
**threetenbp**
Threetenbp
|null| +|collectionType|Option. Collection type to use|
**array**
kotlin.Array
**list**
kotlin.collections.List
|null| diff --git a/docs/generators/lua.md b/docs/generators/lua.md index baf2a6d55440..6e9a4ce3f846 100644 --- a/docs/generators/lua.md +++ b/docs/generators/lua.md @@ -1,13 +1,12 @@ -CONFIG OPTIONS for lua - - packageName - Lua package name (convention: single word). (Default: openapiclient) - - packageVersion - Lua package version. (Default: 1.0.0-1) - - hideGenerationTimestamp - Hides the generation timestamp when files are generated. (Default: true) - -Back to the [generators list](README.md) +--- +id: generator-opts-client-lua +title: Config Options for lua +sidebar_label: lua +--- + +| Option | Description | Values | Default | +| ------ | ----------- | ------ | ------- | +|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| diff --git a/docs/generators/mysql-schema.md b/docs/generators/mysql-schema.md index ae70f7db075b..987e18c1cc3f 100644 --- a/docs/generators/mysql-schema.md +++ b/docs/generators/mysql-schema.md @@ -1,10 +1,11 @@ -CONFIG OPTIONS for mysql-schema - - defaultDatabaseName - Default database name for all MySQL queries (Default: ) - - jsonDataTypeEnabled - Use special JSON MySQL data type for complex model properties. Requires MySQL version 5.7.8. Generates TEXT data type when disabled (Default: true) - -Back to the [generators list](README.md) +--- +id: generator-opts-schema-mysql-schema +title: Config Options for mysql-schema +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| diff --git a/docs/generators/nodejs-server.md b/docs/generators/nodejs-server.md index c7a2ce24d446..d66e4e4f0131 100644 --- a/docs/generators/nodejs-server.md +++ b/docs/generators/nodejs-server.md @@ -1,25 +1,16 @@ -CONFIG OPTIONS for nodejs-server - - sortParamsByRequiredFlag - Sort method arguments to place required parameters before optional parameters. (Default: true) - - ensureUniqueParams - Whether to ensure parameter names are unique in an operation (rename parameters that are not). (Default: true) - - allowUnicodeIdentifiers - boolean, toggles whether unicode identifiers are allowed in names or not, default is false (Default: false) - - prependFormOrBodyParameters - Add form or body parameters to the beginning of the parameter list. (Default: 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. (Default: 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. - - serverPort - TCP port to listen on. - -Back to the [generators list](README.md) +--- +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 4ef100c93cb2..46d3244a130b 100644 --- a/docs/generators/objc.md +++ b/docs/generators/objc.md @@ -1,28 +1,17 @@ -CONFIG OPTIONS for objc - - coreData - Should generate core data models (Default: false) - - classPrefix - prefix for generated classes (convention: Abbreviation of pod name e.g. `HN` for `HackerNews`).` (Default: OAI) - - podName - cocoapods package name (convention: CameCase). (Default: OpenAPIClient) - - podVersion - cocoapods package version. (Default: 1.0.0) - - authorName - Name to use in the podspec file. (Default: OpenAPI) - - authorEmail - Email to use in the podspec file. (Default: team@openapitools.org) - - gitRepoURL - URL for the git repo where this podspec should point to. (Default: https://github.com/openapitools/openapi-generator) - - hideGenerationTimestamp - Hides the generation timestamp when files are generated. (Default: true) - -Back to the [generators list](README.md) +--- +id: generator-opts-client-objc +title: Config Options for objc +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| +|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| diff --git a/docs/generators/openapi-yaml.md b/docs/generators/openapi-yaml.md index 1bdbb8771f8b..1dfe1b9f4810 100644 --- a/docs/generators/openapi-yaml.md +++ b/docs/generators/openapi-yaml.md @@ -1,19 +1,14 @@ -CONFIG OPTIONS for openapi-yaml - - sortParamsByRequiredFlag - Sort method arguments to place required parameters before optional parameters. (Default: true) - - ensureUniqueParams - Whether to ensure parameter names are unique in an operation (rename parameters that are not). (Default: true) - - allowUnicodeIdentifiers - boolean, toggles whether unicode identifiers are allowed in names or not, default is false (Default: false) - - prependFormOrBodyParameters - Add form or body parameters to the beginning of the parameter list. (Default: false) - - outputFile - output filename - -Back to the [generators list](README.md) +--- +id: generator-opts-documentation-openapi-yaml +title: Config Options for openapi-yaml +sidebar_label: openapi-yaml +--- + +| 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| +|outputFile|output filename| |null| diff --git a/docs/generators/openapi.md b/docs/generators/openapi.md index 8e8bb15a425f..0846d577084c 100644 --- a/docs/generators/openapi.md +++ b/docs/generators/openapi.md @@ -1,16 +1,13 @@ -CONFIG OPTIONS for openapi - - sortParamsByRequiredFlag - Sort method arguments to place required parameters before optional parameters. (Default: true) - - ensureUniqueParams - Whether to ensure parameter names are unique in an operation (rename parameters that are not). (Default: true) - - allowUnicodeIdentifiers - boolean, toggles whether unicode identifiers are allowed in names or not, default is false (Default: false) - - prependFormOrBodyParameters - Add form or body parameters to the beginning of the parameter list. (Default: false) - -Back to the [generators list](README.md) +--- +id: generator-opts-documentation-openapi +title: Config Options for openapi +sidebar_label: openapi +--- + +| 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/perl.md b/docs/generators/perl.md index 75beaed1d1fe..b4ef17875f5e 100644 --- a/docs/generators/perl.md +++ b/docs/generators/perl.md @@ -1,22 +1,15 @@ -CONFIG OPTIONS for perl - - moduleName - Perl module name (convention: CamelCase or Long::Module). (Default: OpenAPIClient) - - moduleVersion - Perl module version. (Default: 1.0.0) - - sortParamsByRequiredFlag - Sort method arguments to place required parameters before optional parameters. (Default: true) - - ensureUniqueParams - Whether to ensure parameter names are unique in an operation (rename parameters that are not). (Default: true) - - hideGenerationTimestamp - Hides the generation timestamp when files are generated. (Default: true) - - prependFormOrBodyParameters - Add form or body parameters to the beginning of the parameter list. (Default: false) - -Back to the [generators list](README.md) +--- +id: generator-opts-client-perl +title: Config Options for perl +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| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| diff --git a/docs/generators/php-laravel.md b/docs/generators/php-laravel.md index 7a4ae180b583..24f1ea9e8ebc 100644 --- a/docs/generators/php-laravel.md +++ b/docs/generators/php-laravel.md @@ -1,43 +1,22 @@ -CONFIG OPTIONS for php-laravel - - sortParamsByRequiredFlag - Sort method arguments to place required parameters before optional parameters. (Default: true) - - ensureUniqueParams - Whether to ensure parameter names are unique in an operation (rename parameters that are not). (Default: true) - - allowUnicodeIdentifiers - boolean, toggles whether unicode identifiers are allowed in names or not, default is false (Default: false) - - prependFormOrBodyParameters - Add form or body parameters to the beginning of the parameter list. (Default: false) - - modelPackage - package for generated models - - apiPackage - package for generated api classes - - variableNamingConvention - naming convention of variable name, e.g. camelCase. (Default: snake_case) - - invokerPackage - The main namespace to use for all classes. e.g. Yay\Pets - - packageName - The main package name for classes. e.g. GeneratedPetstore - - srcBasePath - The directory to serve as source root. - - gitUserId - Git user ID, e.g. openapitools. - - gitRepoId - Git repo ID, e.g. openapi-generator. - - artifactVersion - The version to use in the composer package version field. e.g. 1.2.3 - -Back to the [generators list](README.md) +--- +id: generator-opts-server-php-laravel +title: Config Options for php-laravel +sidebar_label: php-laravel +--- + +| 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.| |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| +|gitUserId|Git user ID, e.g. openapitools.| |null| +|gitRepoId|Git repo ID, e.g. openapi-generator.| |null| +|artifactVersion|The version to use in the composer package version field. e.g. 1.2.3| |null| diff --git a/docs/generators/php-lumen.md b/docs/generators/php-lumen.md index 10d0a3af2092..50590014ceb0 100644 --- a/docs/generators/php-lumen.md +++ b/docs/generators/php-lumen.md @@ -1,43 +1,22 @@ -CONFIG OPTIONS for php-lumen - - sortParamsByRequiredFlag - Sort method arguments to place required parameters before optional parameters. (Default: true) - - ensureUniqueParams - Whether to ensure parameter names are unique in an operation (rename parameters that are not). (Default: true) - - allowUnicodeIdentifiers - boolean, toggles whether unicode identifiers are allowed in names or not, default is false (Default: false) - - prependFormOrBodyParameters - Add form or body parameters to the beginning of the parameter list. (Default: false) - - modelPackage - package for generated models - - apiPackage - package for generated api classes - - variableNamingConvention - naming convention of variable name, e.g. camelCase. (Default: snake_case) - - invokerPackage - The main namespace to use for all classes. e.g. Yay\Pets - - packageName - The main package name for classes. e.g. GeneratedPetstore - - srcBasePath - The directory to serve as source root. - - gitUserId - Git user ID, e.g. openapitools. - - gitRepoId - Git repo ID, e.g. openapi-generator. - - artifactVersion - The version to use in the composer package version field. e.g. 1.2.3 - -Back to the [generators list](README.md) +--- +id: generator-opts-server-php-lumen +title: Config Options for php-lumen +sidebar_label: php-lumen +--- + +| 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.| |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| +|gitUserId|Git user ID, e.g. openapitools.| |null| +|gitRepoId|Git repo ID, e.g. openapi-generator.| |null| +|artifactVersion|The version to use in the composer package version field. e.g. 1.2.3| |null| diff --git a/docs/generators/php-silex.md b/docs/generators/php-silex.md index c7c8705b294c..e417df414b02 100644 --- a/docs/generators/php-silex.md +++ b/docs/generators/php-silex.md @@ -1,16 +1,13 @@ -CONFIG OPTIONS for php-silex - - sortParamsByRequiredFlag - Sort method arguments to place required parameters before optional parameters. (Default: true) - - ensureUniqueParams - Whether to ensure parameter names are unique in an operation (rename parameters that are not). (Default: true) - - allowUnicodeIdentifiers - boolean, toggles whether unicode identifiers are allowed in names or not, default is false (Default: false) - - prependFormOrBodyParameters - Add form or body parameters to the beginning of the parameter list. (Default: false) - -Back to the [generators list](README.md) +--- +id: generator-opts-server-php-silex +title: Config Options for php-silex +sidebar_label: php-silex +--- + +| 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/php-slim.md b/docs/generators/php-slim.md index ee452b57fa20..1d9b073efca0 100644 --- a/docs/generators/php-slim.md +++ b/docs/generators/php-slim.md @@ -1,43 +1,22 @@ -CONFIG OPTIONS for php-slim - - sortParamsByRequiredFlag - Sort method arguments to place required parameters before optional parameters. (Default: true) - - ensureUniqueParams - Whether to ensure parameter names are unique in an operation (rename parameters that are not). (Default: true) - - allowUnicodeIdentifiers - boolean, toggles whether unicode identifiers are allowed in names or not, default is false (Default: false) - - prependFormOrBodyParameters - Add form or body parameters to the beginning of the parameter list. (Default: false) - - modelPackage - package for generated models - - apiPackage - package for generated api classes - - variableNamingConvention - naming convention of variable name, e.g. camelCase. (Default: camelCase) - - invokerPackage - The main namespace to use for all classes. e.g. Yay\Pets - - packageName - The main package name for classes. e.g. GeneratedPetstore - - srcBasePath - The directory to serve as source root. - - gitUserId - Git user ID, e.g. openapitools. - - gitRepoId - Git repo ID, e.g. openapi-generator. - - artifactVersion - The version to use in the composer package version field. e.g. 1.2.3 - -Back to the [generators list](README.md) +--- +id: generator-opts-server-php-slim +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| +|gitUserId|Git user ID, e.g. openapitools.| |null| +|gitRepoId|Git repo ID, e.g. openapi-generator.| |null| +|artifactVersion|The version to use in the composer package version field. e.g. 1.2.3| |null| diff --git a/docs/generators/php-symfony.md b/docs/generators/php-symfony.md index f85157e9c15e..be48e605b5eb 100644 --- a/docs/generators/php-symfony.md +++ b/docs/generators/php-symfony.md @@ -1,58 +1,27 @@ -CONFIG OPTIONS for php-symfony - - sortParamsByRequiredFlag - Sort method arguments to place required parameters before optional parameters. (Default: true) - - ensureUniqueParams - Whether to ensure parameter names are unique in an operation (rename parameters that are not). (Default: true) - - allowUnicodeIdentifiers - boolean, toggles whether unicode identifiers are allowed in names or not, default is false (Default: false) - - prependFormOrBodyParameters - Add form or body parameters to the beginning of the parameter list. (Default: false) - - modelPackage - package for generated models - - apiPackage - package for generated api classes - - variableNamingConvention - naming convention of variable name, e.g. camelCase. (Default: snake_case) - - invokerPackage - The main namespace to use for all classes. e.g. Yay\Pets - - packageName - The main package name for classes. e.g. GeneratedPetstore - - srcBasePath - The directory to serve as source root. - - gitUserId - Git user ID, e.g. openapitools. - - gitRepoId - Git repo ID, e.g. openapi-generator. - - artifactVersion - The version to use in the composer package version field. e.g. 1.2.3 - - composerVendorName - The vendor name used in the composer package name. The template uses {{composerVendorName}}/{{composerProjectName}} for the composer package name. e.g. yaypets - - bundleName - The name of the Symfony bundle. The template uses {{bundleName}} - - composerProjectName - The project name used in the composer package name. The template uses {{composerVendorName}}/{{composerProjectName}} for the composer package name. e.g. petstore-client - - hideGenerationTimestamp - Hides the generation timestamp when files are generated. (Default: true) - - phpLegacySupport - Should the generated code be compatible with PHP 5.x? (Default: true) - -Back to the [generators list](README.md) +--- +id: generator-opts-server-php-symfony +title: Config Options for php-symfony +sidebar_label: php-symfony +--- + +| 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.| |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| +|gitUserId|Git user ID, e.g. openapitools.| |null| +|gitRepoId|Git repo ID, e.g. openapi-generator.| |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| +|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| +|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true| +|phpLegacySupport|Should the generated code be compatible with PHP 5.x?| |true| diff --git a/docs/generators/php-ze-ph.md b/docs/generators/php-ze-ph.md index c920817d2aa2..14ae8554ace7 100644 --- a/docs/generators/php-ze-ph.md +++ b/docs/generators/php-ze-ph.md @@ -1,43 +1,22 @@ -CONFIG OPTIONS for php-ze-ph - - sortParamsByRequiredFlag - Sort method arguments to place required parameters before optional parameters. (Default: true) - - ensureUniqueParams - Whether to ensure parameter names are unique in an operation (rename parameters that are not). (Default: true) - - allowUnicodeIdentifiers - boolean, toggles whether unicode identifiers are allowed in names or not, default is false (Default: false) - - prependFormOrBodyParameters - Add form or body parameters to the beginning of the parameter list. (Default: false) - - modelPackage - package for generated models - - apiPackage - package for generated api classes - - variableNamingConvention - naming convention of variable name, e.g. camelCase. (Default: snake_case) - - invokerPackage - The main namespace to use for all classes. e.g. Yay\Pets - - packageName - The main package name for classes. e.g. GeneratedPetstore - - srcBasePath - The directory to serve as source root. - - gitUserId - Git user ID, e.g. openapitools. - - gitRepoId - Git repo ID, e.g. openapi-generator. - - artifactVersion - The version to use in the composer package version field. e.g. 1.2.3 - -Back to the [generators list](README.md) +--- +id: generator-opts-server-php-ze-ph +title: Config Options for php-ze-ph +sidebar_label: php-ze-ph +--- + +| 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.| |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| +|gitUserId|Git user ID, e.g. openapitools.| |null| +|gitRepoId|Git repo ID, e.g. openapi-generator.| |null| +|artifactVersion|The version to use in the composer package version field. e.g. 1.2.3| |null| diff --git a/docs/generators/php.md b/docs/generators/php.md index 8604127fd832..0172100d360a 100644 --- a/docs/generators/php.md +++ b/docs/generators/php.md @@ -1,52 +1,25 @@ -CONFIG OPTIONS for php - - sortParamsByRequiredFlag - Sort method arguments to place required parameters before optional parameters. (Default: true) - - ensureUniqueParams - Whether to ensure parameter names are unique in an operation (rename parameters that are not). (Default: true) - - allowUnicodeIdentifiers - boolean, toggles whether unicode identifiers are allowed in names or not, default is false (Default: false) - - prependFormOrBodyParameters - Add form or body parameters to the beginning of the parameter list. (Default: false) - - modelPackage - package for generated models - - apiPackage - package for generated api classes - - variableNamingConvention - naming convention of variable name, e.g. camelCase. (Default: snake_case) - - invokerPackage - The main namespace to use for all classes. e.g. Yay\Pets - - packageName - The main package name for classes. e.g. GeneratedPetstore - - srcBasePath - The directory to serve as source root. - - gitUserId - Git user ID, e.g. openapitools. - - gitRepoId - Git repo ID, e.g. openapi-generator. - - artifactVersion - The version to use in the composer package version field. e.g. 1.2.3 - - composerVendorName - The vendor name used in the composer package name. The template uses {{composerVendorName}}/{{composerProjectName}} for the composer package name. e.g. yaypets. IMPORTANT NOTE (2016/03): composerVendorName will be deprecated and replaced by gitUserId in the next openapi-generator release - - composerProjectName - The project name used in the composer package name. The template uses {{composerVendorName}}/{{composerProjectName}} for the composer package name. e.g. petstore-client. IMPORTANT NOTE (2016/03): composerProjectName will be deprecated and replaced by gitRepoId in the next openapi-generator release - - hideGenerationTimestamp - boolean, toggles whether unicode identifiers are allowed in names or not, default is false (Default: true) - -Back to the [generators list](README.md) +--- +id: generator-opts-client-php +title: Config Options for php +sidebar_label: php +--- + +| 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.| |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| +|gitUserId|Git user ID, e.g. openapitools.| |null| +|gitRepoId|Git repo ID, e.g. openapi-generator.| |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. IMPORTANT NOTE (2016/03): composerVendorName will be deprecated and replaced by gitUserId in the next openapi-generator release| |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. IMPORTANT NOTE (2016/03): composerProjectName will be deprecated and replaced by gitRepoId in the next openapi-generator release| |null| +|hideGenerationTimestamp|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |true| diff --git a/docs/generators/powershell.md b/docs/generators/powershell.md index 8fdc4171cc6b..2468c0a0853c 100644 --- a/docs/generators/powershell.md +++ b/docs/generators/powershell.md @@ -1,13 +1,12 @@ -CONFIG OPTIONS for powershell - - packageName - Client package name (e.g. org.openapitools.client). (Default: Org.OpenAPITools) - - packageGuid - GUID for PowerShell module (e.g. a27b908d-2a20-467f-bc32-af6f3a654ac5). A random GUID will be generated by default. - - 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. (Default: $ScriptDir\csharp\OpenAPIClient) - -Back to the [generators list](README.md) +--- +id: generator-opts-client-powershell +title: Config Options for powershell +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| diff --git a/docs/generators/python-flask.md b/docs/generators/python-flask.md index 113916f815ea..32d1d913be99 100644 --- a/docs/generators/python-flask.md +++ b/docs/generators/python-flask.md @@ -1,34 +1,19 @@ -CONFIG OPTIONS for python-flask - - sortParamsByRequiredFlag - Sort method arguments to place required parameters before optional parameters. (Default: true) - - ensureUniqueParams - Whether to ensure parameter names are unique in an operation (rename parameters that are not). (Default: true) - - allowUnicodeIdentifiers - boolean, toggles whether unicode identifiers are allowed in names or not, default is false (Default: false) - - prependFormOrBodyParameters - Add form or body parameters to the beginning of the parameter list. (Default: false) - - packageName - python package name (convention: snake_case). (Default: openapi_server) - - packageVersion - python package version. (Default: 1.0.0) - - controllerPackage - controller package (Default: controllers) - - defaultController - default controller (Default: default_controller) - - supportPython2 - support python2 (Default: false) - - serverPort - TCP port to listen to in app.run (Default: 8080) - -Back to the [generators list](README.md) +--- +id: generator-opts-server-python-flask +title: Config Options for python-flask +sidebar_label: python-flask +--- + +| 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| +|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| +|serverPort|TCP port to listen to in app.run| |8080| diff --git a/docs/generators/python.md b/docs/generators/python.md index 7eebca2137d1..ea43f3be0c26 100644 --- a/docs/generators/python.md +++ b/docs/generators/python.md @@ -1,28 +1,17 @@ -CONFIG OPTIONS for python - - packageName - python package name (convention: snake_case). (Default: openapi_client) - - projectName - python project name in setup.py (e.g. petstore-api). - - packageVersion - python package version. (Default: 1.0.0) - - packageUrl - python package URL. - - sortParamsByRequiredFlag - Sort method arguments to place required parameters before optional parameters. (Default: true) - - hideGenerationTimestamp - Hides the generation timestamp when files are generated. (Default: true) - - generateSourceCodeOnly - Specifies that only a library source code is to be generated. (Default: false) - - library - library template (sub-template) to use: asyncio, tornado, urllib3 (Default: urllib3) - -Back to the [generators list](README.md) +--- +id: generator-opts-client-python +title: Config Options for python +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| +|library|library template (sub-template) to use: asyncio, tornado, urllib3| |urllib3| diff --git a/docs/generators/r.md b/docs/generators/r.md index 8253566f41f0..3265db5cafdd 100644 --- a/docs/generators/r.md +++ b/docs/generators/r.md @@ -1,13 +1,12 @@ -CONFIG OPTIONS for r - - packageName - R package name (convention: lowercase). (Default: openapi) - - packageVersion - R package version. (Default: 1.0.0) - - hideGenerationTimestamp - Hides the generation timestamp when files are generated. (Default: true) - -Back to the [generators list](README.md) +--- +id: generator-opts-client-r +title: Config Options for r +sidebar_label: r +--- + +| Option | Description | Values | Default | +| ------ | ----------- | ------ | ------- | +|packageName|R package name (convention: lowercase).| |openapi| +|packageVersion|R package version.| |1.0.0| +|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true| diff --git a/docs/generators/ruby-on-rails.md b/docs/generators/ruby-on-rails.md index b32fc0a017e0..8f7425fb0f77 100644 --- a/docs/generators/ruby-on-rails.md +++ b/docs/generators/ruby-on-rails.md @@ -1,7 +1,10 @@ -CONFIG OPTIONS for ruby-on-rails +--- +id: generator-opts-server-ruby-on-rails +title: Config Options for ruby-on-rails +sidebar_label: ruby-on-rails +--- - databaseAdapter - The adapter for database (e.g. mysql, sqlite). Default: sqlite (Default: sqlite) - -Back to the [generators list](README.md) +| Option | Description | Values | Default | +| ------ | ----------- | ------ | ------- | +|databaseAdapter|The adapter for database (e.g. mysql, sqlite). Default: sqlite| |sqlite| diff --git a/docs/generators/ruby-sinatra.md b/docs/generators/ruby-sinatra.md index 9603ad756185..c14f4e4c182d 100644 --- a/docs/generators/ruby-sinatra.md +++ b/docs/generators/ruby-sinatra.md @@ -1,4 +1,9 @@ -CONFIG OPTIONS for ruby-sinatra +--- +id: generator-opts-server-ruby-sinatra +title: Config Options for ruby-sinatra +sidebar_label: ruby-sinatra +--- -Back to the [generators list](README.md) +| Option | Description | Values | Default | +| ------ | ----------- | ------ | ------- | diff --git a/docs/generators/ruby.md b/docs/generators/ruby.md index 97719919a72c..356285065d48 100644 --- a/docs/generators/ruby.md +++ b/docs/generators/ruby.md @@ -1,49 +1,24 @@ -CONFIG OPTIONS for ruby - - sortParamsByRequiredFlag - Sort method arguments to place required parameters before optional parameters. (Default: true) - - ensureUniqueParams - Whether to ensure parameter names are unique in an operation (rename parameters that are not). (Default: true) - - allowUnicodeIdentifiers - boolean, toggles whether unicode identifiers are allowed in names or not, default is false (Default: false) - - prependFormOrBodyParameters - Add form or body parameters to the beginning of the parameter list. (Default: false) - - gemName - gem name (convention: underscore_case). (Default: openapi_client) - - moduleName - top module name (convention: CamelCase, usually corresponding to gem name). (Default: OpenAPIClient) - - gemVersion - gem version. (Default: 1.0.0) - - gemLicense - gem license. (Default: proprietary) - - gemRequiredRubyVersion - gem required Ruby version. (Default: >= 1.9) - - gemHomepage - gem homepage. (Default: http://org.openapitools) - - gemSummary - gem summary. (Default: A ruby wrapper for the REST APIs) - - gemDescription - gem description. (Default: This gem maps to a REST API) - - gemAuthor - gem author (only one is supported). - - gemAuthorEmail - gem author email (only one is supported). - - hideGenerationTimestamp - Hides the generation timestamp when files are generated. (Default: true) - -Back to the [generators list](README.md) +--- +id: generator-opts-client-ruby +title: Config Options for ruby +sidebar_label: ruby +--- + +| 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| +|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. | |proprietary| +|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| +|gemAuthor|gem author (only one is supported).| |null| +|gemAuthorEmail|gem author email (only one is supported).| |null| +|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true| diff --git a/docs/generators/rust-server.md b/docs/generators/rust-server.md index 8be0e99e1ceb..ebffe75be40e 100644 --- a/docs/generators/rust-server.md +++ b/docs/generators/rust-server.md @@ -1,10 +1,11 @@ -CONFIG OPTIONS for rust-server - - packageName - Rust crate name (convention: snake_case). (Default: openapi_client) - - packageVersion - Rust crate version. - -Back to the [generators list](README.md) +--- +id: generator-opts-server-rust-server +title: Config Options for rust-server +sidebar_label: rust-server +--- + +| Option | Description | Values | Default | +| ------ | ----------- | ------ | ------- | +|packageName|Rust crate name (convention: snake_case).| |openapi_client| +|packageVersion|Rust crate version.| |null| diff --git a/docs/generators/rust.md b/docs/generators/rust.md index c126505e9816..8841b9012381 100644 --- a/docs/generators/rust.md +++ b/docs/generators/rust.md @@ -1,18 +1,13 @@ -CONFIG OPTIONS for rust - - packageName - Rust package name (convention: lowercase). (Default: openapi) - - packageVersion - Rust package version. (Default: 1.0.0) - - hideGenerationTimestamp - Hides the generation timestamp when files are generated. (Default: true) - - library - library template (sub-template) to use. (Default: hyper) - hyper - HTTP client: Hyper. - reqwest - HTTP client: Reqwest. - -Back to the [generators list](README.md) +--- +id: generator-opts-client-rust +title: Config Options for rust +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| diff --git a/docs/generators/scala-akka.md b/docs/generators/scala-akka.md index 4c53a0dbcb77..28229859c83a 100644 --- a/docs/generators/scala-akka.md +++ b/docs/generators/scala-akka.md @@ -1,28 +1,17 @@ -CONFIG OPTIONS for scala-akka - - sortParamsByRequiredFlag - Sort method arguments to place required parameters before optional parameters. (Default: true) - - ensureUniqueParams - Whether to ensure parameter names are unique in an operation (rename parameters that are not). (Default: true) - - allowUnicodeIdentifiers - boolean, toggles whether unicode identifiers are allowed in names or not, default is false (Default: false) - - prependFormOrBodyParameters - Add form or body parameters to the beginning of the parameter list. (Default: false) - - modelPackage - package for generated models - - apiPackage - package for generated api classes - - sourceFolder - source folder for generated code - - mainPackage - Top-level package name, which defines 'apiPackage', 'modelPackage', 'invokerPackage' (Default: org.openapitools.client) - -Back to the [generators list](README.md) +--- +id: generator-opts-client-scala-akka +title: Config Options for scala-akka +sidebar_label: scala-akka +--- + +| 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| +|mainPackage|Top-level package name, which defines 'apiPackage', 'modelPackage', 'invokerPackage'| |org.openapitools.client| diff --git a/docs/generators/scala-finch.md b/docs/generators/scala-finch.md index a6f40be09f39..7680f37b1108 100644 --- a/docs/generators/scala-finch.md +++ b/docs/generators/scala-finch.md @@ -1,13 +1,12 @@ -CONFIG OPTIONS for scala-finch - - packageName - Finch package name (e.g. org.openapitools). (Default: org.openapitools) - - modelPackage - package for generated models - - apiPackage - package for generated api classes - -Back to the [generators list](README.md) +--- +id: generator-opts-server-scala-finch +title: Config Options for scala-finch +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| diff --git a/docs/generators/scala-gatling.md b/docs/generators/scala-gatling.md index e12674ccd2cb..aa2fda8f9cd3 100644 --- a/docs/generators/scala-gatling.md +++ b/docs/generators/scala-gatling.md @@ -1,25 +1,16 @@ -CONFIG OPTIONS for scala-gatling - - sortParamsByRequiredFlag - Sort method arguments to place required parameters before optional parameters. (Default: true) - - ensureUniqueParams - Whether to ensure parameter names are unique in an operation (rename parameters that are not). (Default: true) - - allowUnicodeIdentifiers - boolean, toggles whether unicode identifiers are allowed in names or not, default is false (Default: false) - - prependFormOrBodyParameters - Add form or body parameters to the beginning of the parameter list. (Default: false) - - modelPackage - package for generated models - - apiPackage - package for generated api classes - - sourceFolder - source folder for generated code - -Back to the [generators list](README.md) +--- +id: generator-opts-client-scala-gatling +title: Config Options for scala-gatling +sidebar_label: scala-gatling +--- + +| 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| diff --git a/docs/generators/scala-httpclient.md b/docs/generators/scala-httpclient.md index a21cee7caa3b..6b85507bc29d 100644 --- a/docs/generators/scala-httpclient.md +++ b/docs/generators/scala-httpclient.md @@ -1,28 +1,17 @@ -CONFIG OPTIONS for scala-httpclient - - sortParamsByRequiredFlag - Sort method arguments to place required parameters before optional parameters. (Default: true) - - ensureUniqueParams - Whether to ensure parameter names are unique in an operation (rename parameters that are not). (Default: true) - - allowUnicodeIdentifiers - boolean, toggles whether unicode identifiers are allowed in names or not, default is false (Default: false) - - prependFormOrBodyParameters - Add form or body parameters to the beginning of the parameter list. (Default: false) - - modelPackage - package for generated models - - apiPackage - package for generated api classes - - sourceFolder - source folder for generated code - - modelPropertyNaming - Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name (Default: camelCase) - -Back to the [generators list](README.md) +--- +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 3c9beeb49612..f6b6a51df529 100644 --- a/docs/generators/scala-lagom-server.md +++ b/docs/generators/scala-lagom-server.md @@ -1,28 +1,17 @@ -CONFIG OPTIONS for scala-lagom-server - - sortParamsByRequiredFlag - Sort method arguments to place required parameters before optional parameters. (Default: true) - - ensureUniqueParams - Whether to ensure parameter names are unique in an operation (rename parameters that are not). (Default: true) - - allowUnicodeIdentifiers - boolean, toggles whether unicode identifiers are allowed in names or not, default is false (Default: false) - - prependFormOrBodyParameters - Add form or body parameters to the beginning of the parameter list. (Default: false) - - modelPackage - package for generated models - - apiPackage - package for generated api classes - - sourceFolder - source folder for generated code - - modelPropertyNaming - Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name (Default: camelCase) - -Back to the [generators list](README.md) +--- +id: generator-opts-server-scala-lagom-server +title: Config Options for scala-lagom-server +sidebar_label: scala-lagom-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| +|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/scalatra.md b/docs/generators/scalatra.md index b512627bfceb..64d8e2ca9871 100644 --- a/docs/generators/scalatra.md +++ b/docs/generators/scalatra.md @@ -1,25 +1,16 @@ -CONFIG OPTIONS for scalatra - - sortParamsByRequiredFlag - Sort method arguments to place required parameters before optional parameters. (Default: true) - - ensureUniqueParams - Whether to ensure parameter names are unique in an operation (rename parameters that are not). (Default: true) - - allowUnicodeIdentifiers - boolean, toggles whether unicode identifiers are allowed in names or not, default is false (Default: false) - - prependFormOrBodyParameters - Add form or body parameters to the beginning of the parameter list. (Default: false) - - modelPackage - package for generated models - - apiPackage - package for generated api classes - - sourceFolder - source folder for generated code - -Back to the [generators list](README.md) +--- +id: generator-opts-server-scalatra +title: Config Options for scalatra +sidebar_label: scalatra +--- + +| 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| diff --git a/docs/generators/scalaz.md b/docs/generators/scalaz.md index eec98a7a7c53..5ced2bc64d59 100644 --- a/docs/generators/scalaz.md +++ b/docs/generators/scalaz.md @@ -1,28 +1,17 @@ -CONFIG OPTIONS for scalaz - - sortParamsByRequiredFlag - Sort method arguments to place required parameters before optional parameters. (Default: true) - - ensureUniqueParams - Whether to ensure parameter names are unique in an operation (rename parameters that are not). (Default: true) - - allowUnicodeIdentifiers - boolean, toggles whether unicode identifiers are allowed in names or not, default is false (Default: false) - - prependFormOrBodyParameters - Add form or body parameters to the beginning of the parameter list. (Default: false) - - modelPackage - package for generated models - - apiPackage - package for generated api classes - - sourceFolder - source folder for generated code - - modelPropertyNaming - Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name (Default: camelCase) - -Back to the [generators list](README.md) +--- +id: generator-opts-client-scalaz +title: Config Options for scalaz +sidebar_label: scalaz +--- + +| 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/spring.md b/docs/generators/spring.md index 648064fd8202..f7a3fe37a300 100644 --- a/docs/generators/spring.md +++ b/docs/generators/spring.md @@ -1,182 +1,65 @@ -CONFIG OPTIONS for spring - - sortParamsByRequiredFlag - Sort method arguments to place required parameters before optional parameters. (Default: true) - - ensureUniqueParams - Whether to ensure parameter names are unique in an operation (rename parameters that are not). (Default: true) - - allowUnicodeIdentifiers - boolean, toggles whether unicode identifiers are allowed in names or not, default is false (Default: false) - - prependFormOrBodyParameters - Add form or body parameters to the beginning of the parameter list. (Default: false) - - modelPackage - package for generated models - - apiPackage - package for generated api classes - - invokerPackage - root package for generated code - - groupId - groupId in generated pom.xml - - artifactId - artifactId in generated pom.xml - - artifactVersion - artifact version in generated pom.xml - - artifactUrl - artifact URL in generated pom.xml - - artifactDescription - artifact description in generated pom.xml - - scmConnection - SCM connection in generated pom.xml - - scmDeveloperConnection - SCM developer connection in generated pom.xml - - scmUrl - SCM URL in generated pom.xml - - developerName - developer name in generated pom.xml - - developerEmail - developer email in generated pom.xml - - developerOrganization - developer organization in generated pom.xml - - developerOrganizationUrl - developer organization URL in generated pom.xml - - licenseName - The name of the license - - licenseUrl - The URL of the license - - sourceFolder - source folder for generated code - - localVariablePrefix - prefix for generated code members and local variables - - serializableModel - boolean - toggle "implements Serializable" for generated models (Default: false) - - bigDecimalAsString - Treat BigDecimal values as Strings to avoid precision loss. (Default: false) - - fullJavaUtil - whether to use fully qualified name for classes under java.util. This option only works for Java API client (Default: false) - - hideGenerationTimestamp - hides the timestamp when files were generated - - 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) (Default: 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 - Option. Use Java8 classes instead of third party equivalents - true - Use Java 8 classes such as Base64 - false - Various third party libraries as needed - - disableHtmlEscaping - Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields) (Default: false) - - booleanGetterPrefix - Set booleanGetterPrefix (default value 'get') - - parentGroupId - parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect - - parentArtifactId - parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect - - parentVersion - parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect - - title - server title name or client service name - - configPackage - configuration package for generated code - - basePackage - base package (invokerPackage) for generated code - - interfaceOnly - Whether to generate only API interface stubs without the server files. (Default: false) - - delegatePattern - Whether to generate the server files using the delegate pattern (Default: false) - - singleContentTypes - Whether to select only one produces/consumes content-type by operation. (Default: false) - - java8 - use java8 default interface (Default: true) - - async - use async Callable controllers (Default: false) - - reactive - wrap responses in Mono/Flux Reactor types (spring-boot only) (Default: false) - - responseWrapper - wrap the responses in given type (Future,Callable,CompletableFuture,ListenableFuture,DeferredResult,HystrixCommand,RxObservable,RxSingle or fully qualified type) - - virtualService - Generates the virtual service. For more details refer - https://github.com/elan-venture/virtualan/wiki (Default: false) - - useTags - use tags for creating interface and controller classnames (Default: false) - - useBeanValidation - Use BeanValidation API annotations (Default: true) - - performBeanValidation - Use Bean Validation Impl. to perform BeanValidation (Default: false) - - implicitHeaders - Use of @ApiImplicitParams for headers. (Default: false) - - swaggerDocketConfig - Generate Spring OpenAPI Docket configuration class. (Default: false) - - apiFirst - Generate the API from the OAI spec at server compile time (API first approach) (Default: false) - - useOptional - Use Optional container for optional parameters (Default: false) - - hateoas - Use Spring HATEOAS library to allow adding HATEOAS links (Default: false) - - returnSuccessCode - Generated server returns 2xx code (Default: false) - - library - library template (sub-template) to use (Default: spring-boot) - 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. - -Back to the [generators list](README.md) +--- +id: generator-opts-server-spring +title: Config Options for spring +sidebar_label: spring +--- + +| 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| +|invokerPackage|root package for generated code| |null| +|groupId|groupId in generated pom.xml| |null| +|artifactId|artifactId in generated pom.xml| |null| +|artifactVersion|artifact version in generated pom.xml| |null| +|artifactUrl|artifact URL in generated pom.xml| |null| +|artifactDescription|artifact description in generated pom.xml| |null| +|scmConnection|SCM connection in generated pom.xml| |null| +|scmDeveloperConnection|SCM developer connection in generated pom.xml| |null| +|scmUrl|SCM URL in generated pom.xml| |null| +|developerName|developer name in generated pom.xml| |null| +|developerEmail|developer email in generated pom.xml| |null| +|developerOrganization|developer organization in generated pom.xml| |null| +|developerOrganizationUrl|developer organization URL in generated pom.xml| |null| +|licenseName|The name of the license| |null| +|licenseUrl|The URL of the license| |null| +|sourceFolder|source folder for generated code| |null| +|localVariablePrefix|prefix for generated code members and local variables| |null| +|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 timestamp when files were generated| |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| +|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)
|null| +|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
|null| +|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false| +|booleanGetterPrefix|Set booleanGetterPrefix (default value 'get')| |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| +|title|server title name or client service name| |null| +|configPackage|configuration package for generated code| |null| +|basePackage|base package (invokerPackage) for generated code| |null| +|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| +|java8|use java8 default interface| |true| +|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|Use of @ApiImplicitParams for headers.| |false| +|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| +|library|library template (sub-template) to use|
**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| diff --git a/docs/generators/swift2-deprecated.md b/docs/generators/swift2-deprecated.md index 630a0e1a2e08..51e222c2cd0d 100644 --- a/docs/generators/swift2-deprecated.md +++ b/docs/generators/swift2-deprecated.md @@ -1,64 +1,29 @@ -CONFIG OPTIONS for swift2-deprecated - - sortParamsByRequiredFlag - Sort method arguments to place required parameters before optional parameters. (Default: true) - - ensureUniqueParams - Whether to ensure parameter names are unique in an operation (rename parameters that are not). (Default: true) - - allowUnicodeIdentifiers - boolean, toggles whether unicode identifiers are allowed in names or not, default is false (Default: false) - - prependFormOrBodyParameters - Add form or body parameters to the beginning of the parameter list. (Default: false) - - projectName - Project name in Xcode - - responseAs - Optionally use libraries to manage response. Currently PromiseKit, RxSwift are available. - - 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 - - podSource - Source information used for Podspec - - podVersion - Version used for Podspec - - podAuthors - Authors used for Podspec - - podSocialMediaURL - Social Media URL used for Podspec - - podDocsetURL - Docset URL used for Podspec - - podLicense - License used for Podspec - - podHomepage - Homepage used for Podspec - - podSummary - Summary used for Podspec - - podDescription - Description used for Podspec - - podScreenshots - Screenshots used for Podspec - - podDocumentationURL - Documentation URL used for Podspec - - swiftUseApiNamespace - Flag to make all the API classes inner-class of {{projectName}}API - - hideGenerationTimestamp - Hides the generation timestamp when files are generated. (Default: true) - -Back to the [generators list](README.md) +--- +id: generator-opts-client-swift2-deprecated +title: Config Options for swift2-deprecated +sidebar_label: swift2-deprecated +--- + +| 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| +|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| +|swiftUseApiNamespace|Flag to make all the API classes inner-class of {{projectName}}API| |null| +|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true| diff --git a/docs/generators/swift3-deprecated.md b/docs/generators/swift3-deprecated.md new file mode 100644 index 000000000000..1041bf635945 --- /dev/null +++ b/docs/generators/swift3-deprecated.md @@ -0,0 +1,31 @@ + +--- +id: generator-opts-client-swift3-deprecated +title: Config Options for swift3-deprecated +sidebar_label: swift3-deprecated +--- + +| 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| +|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| +|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| diff --git a/docs/generators/swift3.md b/docs/generators/swift3.md deleted file mode 100644 index 42674fdb2626..000000000000 --- a/docs/generators/swift3.md +++ /dev/null @@ -1,70 +0,0 @@ - -CONFIG OPTIONS for swift3 - - sortParamsByRequiredFlag - Sort method arguments to place required parameters before optional parameters. (Default: true) - - ensureUniqueParams - Whether to ensure parameter names are unique in an operation (rename parameters that are not). (Default: true) - - allowUnicodeIdentifiers - boolean, toggles whether unicode identifiers are allowed in names or not, default is false (Default: false) - - prependFormOrBodyParameters - Add form or body parameters to the beginning of the parameter list. (Default: false) - - projectName - Project name in Xcode - - responseAs - Optionally use libraries to manage response. Currently PromiseKit, RxSwift are available. - - 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 - - objcCompatible - Add additional properties and methods for Objective-C compatibility (default: false) - - podSource - Source information used for Podspec - - podVersion - Version used for Podspec - - podAuthors - Authors used for Podspec - - podSocialMediaURL - Social Media URL used for Podspec - - podDocsetURL - Docset URL used for Podspec - - podLicense - License used for Podspec - - podHomepage - Homepage used for Podspec - - podSummary - Summary used for Podspec - - podDescription - Description used for Podspec - - podScreenshots - Screenshots used for Podspec - - podDocumentationURL - Documentation URL used for Podspec - - swiftUseApiNamespace - Flag to make all the API classes inner-class of {{projectName}}API - - hideGenerationTimestamp - Hides the generation timestamp when files are generated. (Default: true) - - lenientTypeCast - Accept and cast values for simple types (string->bool, string->int, int->string) (Default: false) - -Back to the [generators list](README.md) diff --git a/docs/generators/swift4.md b/docs/generators/swift4.md index 6e824970759c..f1035b6db24e 100644 --- a/docs/generators/swift4.md +++ b/docs/generators/swift4.md @@ -1,70 +1,31 @@ -CONFIG OPTIONS for swift4 - - sortParamsByRequiredFlag - Sort method arguments to place required parameters before optional parameters. (Default: true) - - ensureUniqueParams - Whether to ensure parameter names are unique in an operation (rename parameters that are not). (Default: true) - - allowUnicodeIdentifiers - boolean, toggles whether unicode identifiers are allowed in names or not, default is false (Default: false) - - prependFormOrBodyParameters - Add form or body parameters to the beginning of the parameter list. (Default: false) - - projectName - Project name in Xcode - - responseAs - Optionally use libraries to manage response. Currently PromiseKit, RxSwift are available. - - 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 - - objcCompatible - Add additional properties and methods for Objective-C compatibility (default: false) - - podSource - Source information used for Podspec - - podVersion - Version used for Podspec - - podAuthors - Authors used for Podspec - - podSocialMediaURL - Social Media URL used for Podspec - - podDocsetURL - Docset URL used for Podspec - - podLicense - License used for Podspec - - podHomepage - Homepage used for Podspec - - podSummary - Summary used for Podspec - - podDescription - Description used for Podspec - - podScreenshots - Screenshots used for Podspec - - podDocumentationURL - Documentation URL used for Podspec - - swiftUseApiNamespace - Flag to make all the API classes inner-class of {{projectName}}API - - hideGenerationTimestamp - Hides the generation timestamp when files are generated. (Default: true) - - lenientTypeCast - Accept and cast values for simple types (string->bool, string->int, int->string) (Default: false) - -Back to the [generators list](README.md) +--- +id: generator-opts-client-swift4 +title: Config Options for swift4 +sidebar_label: swift4 +--- + +| 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| +|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| +|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| diff --git a/docs/generators/typescript-angular.md b/docs/generators/typescript-angular.md index e459084760d2..c3f561752f89 100644 --- a/docs/generators/typescript-angular.md +++ b/docs/generators/typescript-angular.md @@ -1,61 +1,28 @@ -CONFIG OPTIONS for typescript-angular - - sortParamsByRequiredFlag - Sort method arguments to place required parameters before optional parameters. (Default: true) - - ensureUniqueParams - Whether to ensure parameter names are unique in an operation (rename parameters that are not). (Default: true) - - allowUnicodeIdentifiers - boolean, toggles whether unicode identifiers are allowed in names or not, default is false (Default: false) - - prependFormOrBodyParameters - Add form or body parameters to the beginning of the parameter list. (Default: false) - - modelPropertyNaming - Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name (Default: camelCase) - - supportsES6 - Generate code that conforms to ES6. (Default: false) - - npmName - The name under which you want to publish generated npm package. Required to generate a full angular package - - npmVersion - The version of your npm package. Default is '1.0.0' - - npmRepository - Use this property to set an url your private npmRepo in the package.json - - snapshot - When setting this property to true the version will be suffixed with -SNAPSHOT.yyyyMMddHHmm (Default: false) - - withInterfaces - Setting this property to true will generate interfaces next to the default class implementations. (Default: false) - - taggedUnions - Use discriminators to create tagged unions instead of extending interfaces. (Default: false) - - providedInRoot - Use this property to provide Injectables in root (it is only valid in angular version greater or equal to 6.0.0). (Default: false) - - ngVersion - The version of Angular. Default is '4.3' - - serviceSuffix - The suffix of the generated service. Default is 'Service'. - - serviceFileSuffix - The suffix of the file of the generated service (service.ts). Default is '.service'. - - modelSuffix - The suffix of the generated model. Default is ''. - - modelFileSuffix - The suffix of the file of the generated model (model.ts). Default is ''. - - fileNaming - Naming convention for the output files: 'camelCase', 'kebab-case'. Default is 'camelCase'. - -Back to the [generators list](README.md) +--- +id: generator-opts-client-typescript-angular +title: Config Options for typescript-angular +sidebar_label: typescript-angular +--- + +| 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| +|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 angular package| |null| +|npmVersion|The version of your npm package. Default is '1.0.0'| |null| +|npmRepository|Use this property to set an url your private npmRepo in the package.json| |null| +|snapshot|When setting this property to true the version will be suffixed with -SNAPSHOT.yyyyMMddHHmm| |false| +|withInterfaces|Setting this property to true will generate interfaces next to the default class implementations.| |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. Default is '4.3'| |null| +|serviceSuffix|The suffix of the generated service. Default is 'Service'.| |null| +|serviceFileSuffix|The suffix of the file of the generated service (service<suffix>.ts). Default is '.service'.| |null| +|modelSuffix|The suffix of the generated model. Default is ''.| |null| +|modelFileSuffix|The suffix of the file of the generated model (model<suffix>.ts). Default is ''.| |null| +|fileNaming|Naming convention for the output files: 'camelCase', 'kebab-case'. Default is 'camelCase'.| |null| diff --git a/docs/generators/typescript-angularjs.md b/docs/generators/typescript-angularjs.md index 7f8fd7720c0d..da03265443dc 100644 --- a/docs/generators/typescript-angularjs.md +++ b/docs/generators/typescript-angularjs.md @@ -1,22 +1,15 @@ -CONFIG OPTIONS for typescript-angularjs - - sortParamsByRequiredFlag - Sort method arguments to place required parameters before optional parameters. (Default: true) - - ensureUniqueParams - Whether to ensure parameter names are unique in an operation (rename parameters that are not). (Default: true) - - allowUnicodeIdentifiers - boolean, toggles whether unicode identifiers are allowed in names or not, default is false (Default: false) - - prependFormOrBodyParameters - Add form or body parameters to the beginning of the parameter list. (Default: false) - - modelPropertyNaming - Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name (Default: camelCase) - - supportsES6 - Generate code that conforms to ES6. (Default: false) - -Back to the [generators list](README.md) +--- +id: generator-opts-client-typescript-angularjs +title: Config Options for typescript-angularjs +sidebar_label: typescript-angularjs +--- + +| 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| +|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| diff --git a/docs/generators/typescript-aurelia.md b/docs/generators/typescript-aurelia.md index dd9c7f14e2f0..1313df5d5eef 100644 --- a/docs/generators/typescript-aurelia.md +++ b/docs/generators/typescript-aurelia.md @@ -1,28 +1,17 @@ -CONFIG OPTIONS for typescript-aurelia - - sortParamsByRequiredFlag - Sort method arguments to place required parameters before optional parameters. (Default: true) - - ensureUniqueParams - Whether to ensure parameter names are unique in an operation (rename parameters that are not). (Default: true) - - allowUnicodeIdentifiers - boolean, toggles whether unicode identifiers are allowed in names or not, default is false (Default: false) - - prependFormOrBodyParameters - Add form or body parameters to the beginning of the parameter list. (Default: false) - - modelPropertyNaming - Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name (Default: camelCase) - - supportsES6 - Generate code that conforms to ES6. (Default: false) - - npmName - The name under which you want to publish generated npm package - - npmVersion - The version of your npm package - -Back to the [generators list](README.md) +--- +id: generator-opts-client-typescript-aurelia +title: Config Options for typescript-aurelia +sidebar_label: typescript-aurelia +--- + +| 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| +|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| |null| +|npmVersion|The version of your npm package| |null| diff --git a/docs/generators/typescript-axios.md b/docs/generators/typescript-axios.md index 654858710c45..29ff5edec1a9 100644 --- a/docs/generators/typescript-axios.md +++ b/docs/generators/typescript-axios.md @@ -1,37 +1,20 @@ -CONFIG OPTIONS for typescript-axios - - sortParamsByRequiredFlag - Sort method arguments to place required parameters before optional parameters. (Default: true) - - ensureUniqueParams - Whether to ensure parameter names are unique in an operation (rename parameters that are not). (Default: true) - - allowUnicodeIdentifiers - boolean, toggles whether unicode identifiers are allowed in names or not, default is false (Default: false) - - prependFormOrBodyParameters - Add form or body parameters to the beginning of the parameter list. (Default: false) - - modelPropertyNaming - Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name (Default: camelCase) - - supportsES6 - Generate code that conforms to ES6. (Default: false) - - npmName - The name under which you want to publish generated npm package - - npmVersion - The version of your npm package - - npmRepository - Use this property to set an url your private npmRepo in the package.json - - snapshot - When setting this property to true the version will be suffixed with -SNAPSHOT.yyyyMMddHHmm (Default: false) - - withInterfaces - Setting this property to true will generate interfaces next to the default class implementations. (Default: false) - -Back to the [generators list](README.md) +--- +id: generator-opts-client-typescript-axios +title: Config Options for typescript-axios +sidebar_label: typescript-axios +--- + +| 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| +|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| |null| +|npmVersion|The version of your npm package| |null| +|npmRepository|Use this property to set an url your private npmRepo in the package.json| |null| +|snapshot|When setting this property to true the version will be suffixed with -SNAPSHOT.yyyyMMddHHmm| |false| +|withInterfaces|Setting this property to true will generate interfaces next to the default class implementations.| |false| diff --git a/docs/generators/typescript-fetch.md b/docs/generators/typescript-fetch.md index 97633d03ebfe..71742b582f98 100644 --- a/docs/generators/typescript-fetch.md +++ b/docs/generators/typescript-fetch.md @@ -1,37 +1,20 @@ -CONFIG OPTIONS for typescript-fetch - - sortParamsByRequiredFlag - Sort method arguments to place required parameters before optional parameters. (Default: true) - - ensureUniqueParams - Whether to ensure parameter names are unique in an operation (rename parameters that are not). (Default: true) - - allowUnicodeIdentifiers - boolean, toggles whether unicode identifiers are allowed in names or not, default is false (Default: false) - - prependFormOrBodyParameters - Add form or body parameters to the beginning of the parameter list. (Default: false) - - modelPropertyNaming - Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name (Default: camelCase) - - supportsES6 - Generate code that conforms to ES6. (Default: false) - - npmName - The name under which you want to publish generated npm package - - npmVersion - The version of your npm package - - npmRepository - Use this property to set an url your private npmRepo in the package.json - - snapshot - When setting this property to true the version will be suffixed with -SNAPSHOT.yyyyMMddHHmm (Default: false) - - withInterfaces - Setting this property to true will generate interfaces next to the default class implementations. (Default: false) - -Back to the [generators list](README.md) +--- +id: generator-opts-client-typescript-fetch +title: Config Options for typescript-fetch +sidebar_label: typescript-fetch +--- + +| 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| +|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| |null| +|npmVersion|The version of your npm package| |null| +|npmRepository|Use this property to set an url your private npmRepo in the package.json| |null| +|snapshot|When setting this property to true the version will be suffixed with -SNAPSHOT.yyyyMMddHHmm| |false| +|withInterfaces|Setting this property to true will generate interfaces next to the default class implementations.| |false| diff --git a/docs/generators/typescript-inversify.md b/docs/generators/typescript-inversify.md index 9354cd8b4a69..c521c73f4b79 100644 --- a/docs/generators/typescript-inversify.md +++ b/docs/generators/typescript-inversify.md @@ -1,43 +1,22 @@ -CONFIG OPTIONS for typescript-inversify - - sortParamsByRequiredFlag - Sort method arguments to place required parameters before optional parameters. (Default: true) - - ensureUniqueParams - Whether to ensure parameter names are unique in an operation (rename parameters that are not). (Default: true) - - allowUnicodeIdentifiers - boolean, toggles whether unicode identifiers are allowed in names or not, default is false (Default: false) - - prependFormOrBodyParameters - Add form or body parameters to the beginning of the parameter list. (Default: false) - - modelPropertyNaming - Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name (Default: camelCase) - - supportsES6 - Generate code that conforms to ES6. (Default: false) - - npmName - The name under which you want to publish generated npm package - - npmVersion - The version of your npm package - - npmRepository - Use this property to set an url your private npmRepo in the package.json - - snapshot - When setting this property to true the version will be suffixed with -SNAPSHOT.yyyyMMddHHmm (Default: false) - - withInterfaces - Setting this property to true will generate interfaces next to the default class implementations. (Default: false) - - usePromise - Setting this property to use promise instead of observable inside every service. (Default: false) - - taggedUnions - Use discriminators to create tagged unions instead of extending interfaces. (Default: false) - -Back to the [generators list](README.md) +--- +id: generator-opts-client-typescript-inversify +title: Config Options for typescript-inversify +sidebar_label: typescript-inversify +--- + +| 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| +|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| |null| +|npmVersion|The version of your npm package| |null| +|npmRepository|Use this property to set an url your private npmRepo in the package.json| |null| +|snapshot|When setting this property to true the version will be suffixed with -SNAPSHOT.yyyyMMddHHmm| |false| +|withInterfaces|Setting this property to true will generate interfaces next to the default class implementations.| |false| +|usePromise|Setting this property to use promise instead of observable inside every service.| |false| +|taggedUnions|Use discriminators to create tagged unions instead of extending interfaces.| |false| diff --git a/docs/generators/typescript-jquery.md b/docs/generators/typescript-jquery.md index eeef27289c06..b40fd66c3b26 100644 --- a/docs/generators/typescript-jquery.md +++ b/docs/generators/typescript-jquery.md @@ -1,37 +1,20 @@ -CONFIG OPTIONS for typescript-jquery - - sortParamsByRequiredFlag - Sort method arguments to place required parameters before optional parameters. (Default: true) - - ensureUniqueParams - Whether to ensure parameter names are unique in an operation (rename parameters that are not). (Default: true) - - allowUnicodeIdentifiers - boolean, toggles whether unicode identifiers are allowed in names or not, default is false (Default: false) - - prependFormOrBodyParameters - Add form or body parameters to the beginning of the parameter list. (Default: false) - - modelPropertyNaming - Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name (Default: camelCase) - - supportsES6 - Generate code that conforms to ES6. (Default: false) - - npmName - The name under which you want to publish generated npm package - - npmVersion - The version of your npm package - - npmRepository - Use this property to set an url your private npmRepo in the package.json - - snapshot - When setting this property to true the version will be suffixed with -SNAPSHOT.yyyyMMddHHmm (Default: false) - - jqueryAlreadyImported - When using this in legacy app using mix of typescript and javascript, this will only declare jquery and not import it (Default: false) - -Back to the [generators list](README.md) +--- +id: generator-opts-client-typescript-jquery +title: Config Options for typescript-jquery +sidebar_label: typescript-jquery +--- + +| 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| +|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| |null| +|npmVersion|The version of your npm package| |null| +|npmRepository|Use this property to set an url your private npmRepo in the package.json| |null| +|snapshot|When setting this property to true the version will be suffixed with -SNAPSHOT.yyyyMMddHHmm| |false| +|jqueryAlreadyImported|When using this in legacy app using mix of typescript and javascript, this will only declare jquery and not import it| |false| diff --git a/docs/generators/typescript-node.md b/docs/generators/typescript-node.md index 008dae08c092..76fb2925277e 100644 --- a/docs/generators/typescript-node.md +++ b/docs/generators/typescript-node.md @@ -1,34 +1,19 @@ -CONFIG OPTIONS for typescript-node - - sortParamsByRequiredFlag - Sort method arguments to place required parameters before optional parameters. (Default: true) - - ensureUniqueParams - Whether to ensure parameter names are unique in an operation (rename parameters that are not). (Default: true) - - allowUnicodeIdentifiers - boolean, toggles whether unicode identifiers are allowed in names or not, default is false (Default: false) - - prependFormOrBodyParameters - Add form or body parameters to the beginning of the parameter list. (Default: false) - - modelPropertyNaming - Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name (Default: camelCase) - - supportsES6 - Generate code that conforms to ES6. (Default: false) - - npmName - The name under which you want to publish generated npm package - - npmVersion - The version of your npm package - - npmRepository - Use this property to set an url your private npmRepo in the package.json - - snapshot - When setting this property to true the version will be suffixed with -SNAPSHOT.yyyyMMddHHmm (Default: false) - -Back to the [generators list](README.md) +--- +id: generator-opts-client-typescript-node +title: Config Options for typescript-node +sidebar_label: typescript-node +--- + +| 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| +|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| |null| +|npmVersion|The version of your npm package| |null| +|npmRepository|Use this property to set an url your private npmRepo in the package.json| |null| +|snapshot|When setting this property to true the version will be suffixed with -SNAPSHOT.yyyyMMddHHmm| |false| diff --git a/docs/installation.md b/docs/installation.md new file mode 100644 index 000000000000..64335db08f83 --- /dev/null +++ b/docs/installation.md @@ -0,0 +1,148 @@ +--- +id: installation +title: CLI Installation +--- + +There are a number of ways to use OpenAPI Generator. This page documents how to install the CLI artifact. +Installing OpenAPI Generator's CLI tool allows users to generate all available generators from the command line. + +Some of the following are cross-platform options and some are not, these are called out where possible. + +## NPM + +> **Platform(s)**: Linux, macOS, Windows + +The [NPM package wrapper](https://github.com/openapitools/openapi-generator-cli) is cross-platform wrapper around the .jar artifact. It works by providing a CLI wrapper atop the JAR's command line options. This gives a simple interface layer which normalizes usage of the command line across operating systems, removing some differences in how options or switches are passed to the tool (depending on OS). +**Install** the latest version of the tool globally, exposing the CLI on the command line: + +```bash +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 +``` + +To install the tool as a dev dependency in your current project: + +```bash +npm install @openapitools/openapi-generator-cli -D +``` +Then, **generate** a ruby client from a valid [petstore.yaml](https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/2_0/petstore.yaml) doc: + +```bash +npx openapi-generator generate -i petstore.yaml -g ruby -o /tmp/test/ +``` + +> `npx` will execute a globally available `openapi-generator`, and if not found it will fall back to project-local commands. The result is that the above command will work regardless of which installation method you've chosen. + +## Homebrew + +> **Platform(s)**: macOS + +**Install** via [homebrew](https://brew.sh/): + +```bash +brew install openapi-generator +``` + +Then, **generate** a ruby client from a valid [petstore.yaml](https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/2_0/petstore.yaml) doc: + +```bash +openapi-generator generate -i petstore.yaml -g ruby -o /tmp/test/ +``` + +## Docker + +> **Platform(s)**: Linux, macOS, Windows + +The OpenAPI Generator Docker image acts as a standalone executable. It can be used as an alternative to installing via homebrew, or for developers who are unable to install Java or upgrade the installed version. + +To generate code from a valid [petstore.yaml](https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/2_0/petstore.yaml) doc with this image, you'll need to mount a local location as a volume. +You'll then need to output the generated code to this mapped volume. Everything else works the same as if you ran the command on your host machine. + +Here's an example generating a Go client: + +```bash +docker run --rm \ + -v ${PWD}:/local openapitools/openapi-generator-cli generate \ + -i petstore.yaml \ + -g go \ + -o /local/out/go +``` + +## JAR + +> **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` + +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 +``` + +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 +``` + +After downloading the JAR, run `java -jar openapi-generator-cli.jar help` to show the usage. + +For Mac users, please make sure Java 8 is installed (Tips: run `java -version` to check the version), and export `JAVA_HOME` in order to use the supported Java version: + +```bash +export JAVA_HOME=`/usr/libexec/java_home -v 1.8` +export PATH=${JAVA_HOME}/bin:$PATH +``` + +## Bash Launcher Script + +> **Platform(s)**: Linux, macOS, Windows (variable) + +One downside to manual JAR downloads is that you don't keep up-to-date with the latest released version. We have a Bash launcher script at [bin/utils/openapi-generator.cli.sh](https://raw.githubusercontent.com/OpenAPITools/openapi-generator/master/bin/utils/openapi-generator-cli.sh) which solves this problem. + +To install the launcher script, copy the contents of the script to a location on your path and make the script executable. + +An example of setting this up (NOTE: Always evaluate scripts curled from external systems before executing them). + +```bash +mkdir -p ~/bin/openapitools +curl https://raw.githubusercontent.com/OpenAPITools/openapi-generator/master/bin/utils/openapi-generator-cli.sh > ~/bin/openapitools/openapi-generator-cli +chmod u+x ~/bin/openapitools/openapi-generator-cli +export PATH=$PATH:~/bin/openapitools/ +``` + +Now, `openapi-generator-cli` is "installed". On invocation, it will query the GitHub repository for the most recently released version. If this matches the last downloaded jar, +it will execute as normal. If a newer version is found, the script will download the latest release and execute it. + +If you need to invoke an older version of the generator, you can define the variable `OPENAPI_GENERATOR_VERSION` either ad hoc or globally. You can export this variable if you'd like to persist a specific release version. + +Examples: + +```bash +# Execute latest released openapi-generator-cli +openapi-generator-cli version + +# Execute version 3.1.0 for the current invocation, regardless of the latest released version +OPENAPI_GENERATOR_VERSION=3.1.0 openapi-generator-cli version + +# Execute version 3.1.0-SNAPSHOT for the current invocation +OPENAPI_GENERATOR_VERSION=3.1.0-SNAPSHOT openapi-generator-cli version + +# Execute version 3.0.2 for every invocation in the current shell session +export OPENAPI_GENERATOR_VERSION=3.0.2 +openapi-generator-cli version # is 3.0.2 +openapi-generator-cli version # is also 3.0.2 + +# To "install" a specific version, set the variable in .bashrc/.bash_profile +echo "export OPENAPI_GENERATOR_VERSION=3.0.2" >> ~/.bashrc +source ~/.bashrc +openapi-generator-cli version # is always 3.0.2, unless any of the above overrides are done ad hoc +``` diff --git a/docs/integration.md b/docs/integration.md index 99c76b25f928..0ab59c547b4b 100644 --- a/docs/integration.md +++ b/docs/integration.md @@ -1,8 +1,12 @@ +--- +id: integrations +title: Workflow Integrations +--- ## Workflow Integration (Maven, Github, CI/CD) ### Gradle Integration -See the [openapi-generator-gradle-plugin README](../modules/openapi-generator-gradle-plugin/README.adoc) for details related to configuring and using the Gradle Plugin. +See the [openapi-generator-gradle-plugin README](https://github.com/OpenAPITools/openapi-generator/blob/master/modules/openapi-generator-gradle-plugin/README.adoc) for details related to configuring and using the Gradle Plugin. Supported tasks include: @@ -13,7 +17,7 @@ Supported tasks include: ### Maven Integration -See the [openapi-generator-maven-plugin README](../modules/openapi-generator-maven-plugin/README.md) for details related to configuring and using the Maven Plugin. +See the [openapi-generator-maven-plugin README](https://github.com/OpenAPITools/openapi-generator/blob/master/modules/openapi-generator-maven-plugin/README.md) for details related to configuring and using the Maven Plugin. ### GitHub Integration @@ -40,5 +44,3 @@ cd /var/tmp/perl/petstore Some generators also generate CI/CD configuration files (.travis.yml) so that the output will be ready to be tested by the CI (e.g. Travis) If you're looking for the configuration files of a particular CI that is not yet supported, please open an [issue](https://github.com/openapitools/openapi-generator/issues/new) to let us know. - -[Back to OpenAPI-Generator's README page](../README.md) diff --git a/docs/migration-from-swagger-codegen.md b/docs/migration-from-swagger-codegen.md index 5dba503d422c..1979d6fbfe4b 100644 --- a/docs/migration-from-swagger-codegen.md +++ b/docs/migration-from-swagger-codegen.md @@ -1,4 +1,7 @@ -## Migration guide: from Swagger Codegen to OpenAPI Generator +--- +id: swagger-codegen-migration +title: Migrating from Swagger Codegen +--- OpenAPI Generator is a fork of `swagger-codegen` between version `2.3.1` and `2.4.0`. This community-driven version called "OpenAPI Generator" provides similar functionalities and can be used as drop-in replacement. @@ -20,13 +23,13 @@ This guide explains the major differences in order to help you with the migratio - [Body parameter name](#body-parameter-name) - [Generators not yet fully migrated](#generators-not-yet-fully-migrated) -### New docker images +## New docker images The docker images are available on DockerHub: https://hub.docker.com/u/openapitools/ **CLI for OpenAPI Generator** -Image to run OpenAPI Generator in the command line (see [OpenAPI Generator CLI Docker Image](../README.md#openapi-generator-cli-docker-image)) +Image to run OpenAPI Generator in the command line (see [OpenAPI Generator CLI Docker Image](https://github.com/OpenAPITools/openapi-generator/blob/master/README.md#openapi-generator-cli-docker-image)) Old: `swaggerapi/swagger-codegen-cli` @@ -34,14 +37,14 @@ New: `openapitools/openapi-generator-cli` **OpenAPI Generator as web service** -Image to run OpenAPI Generator as a web service (see [OpenAPI Generator Online Docker Image](../README.md#openapi-generator-online-docker-image)) +Image to run OpenAPI Generator as a web service (see [OpenAPI Generator Online Docker Image](https://github.com/OpenAPITools/openapi-generator/blob/master/README.md#openapi-generator-online-docker-image)) Old: `swaggerapi/swagger-generator` New: `openapitools/openapi-generator-online` -### New maven coordinates +## New maven coordinates You can find our released artefact on maven central: @@ -101,14 +104,14 @@ New: ``` -### Changes in Maven Plugin +## Changes in Maven Plugin OpenAPI Generator 3.0.0 has introduced `` and deprecated ``, because this refers to generator names which embed more than just "language". If both options are present, you'll be presented with an error. If only `` is provided, you'll be presented instructions for updating to the new config. -### New generators names +## New generators names When you run OpenAPI Generator, you need to select a target generator (`-g` option in the cli). All languages of `swagger-codegen` have been migrated to `openapi-generator`, but some names were changed, in order to be more consistent. @@ -130,7 +133,7 @@ All languages of `swagger-codegen` have been migrated to `openapi-generator`, bu We provide a temporary mapping in code for these old values. You'll receive a warning with instructions to migrate to the new names. -### New parameters name +## New parameters name Some parameters were renamed. Often you need to replace "Swagger", with "OpenAPI". @@ -144,14 +147,14 @@ Some examples: | `swagger.codegen.undertow.modelpackage` | `openapi.codegen.undertow.modelpackage` | -### Renamed Mustache Template Variables +## Renamed Mustache Template Variables The template variable `{{datatype}}` was renamed to `{{dataType}}` for consistency reason. Corresponding java code: `CodegenProperty.datatype` is renamed to `CodegenProperty.dataType`. (If you're **not** using customized templates with the `-t` option, you can ignore the mustache variable renaming above.) -### Ignore file +## Ignore file `.swagger-codegen-ignore` is replaced by `.openapi-generator-ignore`. The syntax inside the file stays the same. @@ -160,13 +163,13 @@ You don't need to rename the file manually, OpenAPI Generator will do it when yo (When there is no `.openapi-generator-ignore` in a folder, if a `.swagger-codegen-ignore` file is present it will be considered and renamed to `.openapi-generator-ignore`). -### Metadata folder +## Metadata folder The metatata folder (to store the `VERSION` file for example) is now called `.openapi-generator/` instead of `.swagger-codegen/`. -### New default values for the generated code +## New default values for the generated code If you use a generator without specifying each parameter, you might see some differences in the generated code. As example the default package name used in the generated code has changed. @@ -176,13 +179,13 @@ Concretely if you did not specify anything when you are generating java code, a If this is a problem for you, you need to explicitly set the the parameter value in order to match with the `swagger-codgen` default value (`apiPackage` == `io.swagger` in the previous example with the java generator). -### New fully qualified name for the classes +## New fully qualified name for the classes If you have extended some generators in your project, and you are looking for a specific class, replace the `io.swagger.codegen` package (old name) with `org.openapitools.codegen` package (new name). Example: `org.openapitools.codegen.DefaultGenerator` -### Body parameter name +## Body parameter name In OpenAPI spec v3, there's no body parameter, which is replaced by [Request Body Object](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.1.md#request-body-object). The parameter name for Request Body is named automatically based on the model name (e.g. User). To control how the "Request Body" parameter is named, please add the vendor extension `x-codegen-request-body-name` to the operation: @@ -241,16 +244,3 @@ paths: - 'read:pets' ``` If your API client is using named parameters in the function call (e.g. Perl required & optional parameters, Ruby optional parameters), you will need to add `x-codegen-request-body-name` to the spec to restore the original body parameter name. - -# Generators not yet fully migrated - -The following gnereators are not yet fully migrated and tested - -- ~~rust-server~~ (migrated) -- ~~`apex`~~ (migrated) - -and we welcome contributions from the community to help with the migration. - -UPDATE: all generators have been successfullly migrated. - -[Back to OpenAPI-Generator's README page](../README.md) diff --git a/docs/new-generator.md b/docs/new-generator.md new file mode 100644 index 000000000000..8265e3fe0b82 --- /dev/null +++ b/docs/new-generator.md @@ -0,0 +1,403 @@ +--- +id: new-generator +title: Create a New Generator +--- + +Creating a new generator which will become a part of the officially supported generators in OpenAPI Generator is pretty simple. We've created a helper script to bootstrap the operation. Let's look at the files necessary to create a new generator, then an example of bootstrapping a generator using the `new.sh` script in the root of the repository. + +## Required Files + +The minimum set of files required to create a new generator are: + +* A "Codegen" file + - exists under `modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/` + - defines language options + - defines framework options + - determines OpenAPI feature set + - extends the generation workflow +* SPI registration + - Above class must be referenced in `modules/openapi-generator/src/main/resources/META-INF/services/org.openapitools.codegen.CodegenConfig` + - Tells the generator that this class exists + - Allows for classpath extension (addition) of generators +* A minimal template + - Should include a README explaining usage + - Must include an `api.mustache` + - Exists under `modules/openapi-generator/src/main/resources/` (plus `embeddedTemplate` dir value, see below) +* Sample scripts under `./bin` and `./bin/windows` + - Gives users a "real life" example of generated output + - Samples are used by CI to verify generators and test for regressions in some cases + +Now, let's generate an example generator and then walk through the pieces. At the end, we'll touch on some known sticking points for new generator authors and provide some suggestions. + +## new.sh + +The `new.sh` script in the root of the project is meant to simplify this process. Run `./new.sh --help`. + +```text +Stubs out files for new generators + +Usage: +./new.sh [options] + Options: + -n Required. Specify generator name, should be kebab-cased. + -c Create a client generator + -s Create a server generator + -d Create a documentation generator + -t When specified, creates test file(s) for the generator. + -h Display help. + +Examples: + Create a server generator for ktor: + ./new.sh -n kotlin -s + + Creates: + modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinServerCodegen.java + modules/openapi-generator/src/main/resources/kotlin-server/README.mustache + modules/openapi-generator/src/main/resources/kotlin-server/model.mustache + modules/openapi-generator/src/main/resources/kotlin-server/api.mustache + bin/windows/kotlin-server-petstore.bat + bin/kotlin-server-petstore.sh + + Create a generic C# server generator: + ./new.sh -n csharp -s -t + Creates: + modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CsharpServerCodegen.java + modules/openapi-generator/src/main/resources/csharp-server/README.mustache + modules/openapi-generator/src/main/resources/csharp-server/model.mustache + modules/openapi-generator/src/main/resources/csharp-server/api.mustache + bin/windows/csharp-server-petstore.bat + bin/csharp-server-petstore.sh + modules/openapi-generator/src/test/java/org/openapitools/codegen/csharp/CsharpServerCodegenTest.java + modules/openapi-generator/src/test/java/org/openapitools/codegen/csharp/CsharpServerCodegenModelTest.java + modules/openapi-generator/src/test/java/org/openapitools/codegen/csharp/CsharpServerCodegenOptionsTest.java + modules/openapi-generator/src/test/java/org/openapitools/codegen/options/CsharpServerCodegenOptionsProvider.java +``` + +This script allows us to define a client, server, schema, or documentation generator. We'll focus on the simplest generator (documentation). The other generator types may require heavy extension of the "Config" base class, and these docs could very quickly become outdated. When creating a new generator, please review existing generators as a guideline for implementation. + +Create a new Markdown generator: + +```bash +./new.sh -n markdown -d +``` + +You should see output similar to the following: + +```bash +Creating modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/MarkdownDocumentationCodegen.java +Creating modules/openapi-generator/src/main/resources/markdown-documentation/README.mustache +Creating modules/openapi-generator/src/main/resources/markdown-documentation/model.mustache +Creating modules/openapi-generator/src/main/resources/markdown-documentation/api.mustache +Creating bin/windows/markdown-documentation-petstore.bat +Creating bin/markdown-documentation-petstore.sh +Finished. +``` + +### Review Generated Config + +Beginning with the "Codegen" file (`MarkdownDocumentationCodegen.java`), the constructor was created: + +```java + public MarkdownDocumentationCodegen() { + super(); + + outputFolder = "generated-code" + File.separator + "markdown"; + modelTemplateFiles.put("model.mustache", ".zz"); + apiTemplateFiles.put("api.mustache", ".zz"); + embeddedTemplateDir = templateDir = "markdown-documentation"; + apiPackage = File.separator + "Apis"; + modelPackage = File.separator + "Models"; + // TODO: Fill this out. + } +``` + +These options are some defaults which may require updating. Let's look line-by-line at the config. + +```java +outputFolder = "generated-code" + File.separator + "markdown"; +``` + +This is the default output location. This will be `generated-code/markdown` on non-Windows machines and `generated-code\markdown` on Windows. You may change this to any value you'd like, but a user will almost always provide an output directory. + +> When joining paths, always use `File.seperator` + +```java + modelTemplateFiles.put("model.mustache", ".zz"); +``` + +The `model.mustache` file is registered as the template for model generation. The `new.sh` script doesn't have a way to know your intended file extension, so we default to a `.zz` extension. This _must_ be changed (unless your generator's target extension is `.zz`). For this example, you'd change `.zz` to `.md` or `.markdown`, depending on your preference. + +This model template registration will use `model.mustache` to generate a new file for every model defined in your API's specification document. + +The path is considered relative to `embeddedTemplateDir`, `templateDir`, or a library subdirectory (refer to the Java client generator implementation for a prime example). + +```java +apiTemplateFiles.put("api.mustache", ".zz"); +``` + +This is the template used for generating API related files. Similar to the above model template, you'll want to change `.zz` to `.md` or `.markdown`. + +The path is considered relative to `embeddedTemplateDir`, `templateDir`, or a library subdirectory (refer to the Java client generator implementation for a prime example). + +```java +embeddedTemplateDir = templateDir = "markdown-documentation"; +``` + +This line sets the embedded and template directories to `markdown-documentation`. The `embeddedTemplateDir` refers to the directory which will exist under `modules/openapi-generator/src/main/resources` and will be published with every release in which your new generator is present. + +The `templateDir` variable refers to the "current" template directory setting, as defined by the user. That is, the user may invoke with `-t` or `--template-directory` (or plugin option variants), and override this directory. + +Both of these variables exist because the generator will fallback to files under `embeddedTemplateDir` if they are not defined in the user's custom template directory. + +```java +apiPackage = File.separator + "Apis"; +``` + +This sets the "package" location for anything considered an API document. You might want to change this setting if, for instance, your language doesn't support uppercase letters in the path. We don't need to worry about that here. + +Every templated output from `api.mustache` (registered via `apiTemplateFiles` above) will end up in the directory defined by `apiPackage` here. + +```java +modelPackage = File.separator + "Models"; +``` + +Similarly, this sets the packasge for `Models`. + +Every templated output from `model.mustache` (registered via `modelTemplateFiles` above) will end up in the directory defined by `modelPackage` here. + +```java +supportingFiles.add(new SupportingFile("README.mustache", "", "README.md")); +``` + +A "supporting file" is an extra file which isn't created once for every operation or model defined in your specification document. It is a single file which may or may not be templated (determined by the extension of the filename). + +A supporting file only passes through the Markdown template processor if the filename ends in `.mustache`. + +The path is considered relative to `embeddedTemplateDir`, `templateDir`, or a library subdirectory (refer to the Java client generator implementation for a prime example). + +> If you want your readme to be generic (not templated), just rename the file to README.md and change `README.mustache` to `README.md` above. + +### Create templates + +The `new.sh` created our three required files. Let's start filling out each of these files. + +#### README.mustache + +```mustache +# Documentation for {{appName}} + +{{#generateApiDocs}} + +## Documentation for API Endpoints + +All URIs are relative to *{{{basePath}}}* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +{{#apiInfo}}{{#apis}}{{#operations}}{{#operation}}*{{classname}}* | [**{{operationId}}**](Apis/{{apiDocPath}}{{classname}}.md#{{operationIdLowerCase}}) | **{{httpMethod}}** {{path}} | {{#summary}}{{{summary}}}{{/summary}} +{{/operation}}{{/operations}}{{/apis}}{{/apiInfo}} +{{/generateApiDocs}} + +{{#generateModelDocs}} + +## Documentation for Models + +{{#modelPackage}} +{{#models}}{{#model}} - [{{{modelPackage}}}.{{{classname}}}](Models/{{modelDocPath}}{{{classname}}}.md) +{{/model}}{{/models}} +{{/modelPackage}} +{{^modelPackage}} +No model defined in this package +{{/modelPackage}} +{{/generateModelDocs}} + +{{! TODO: optional documentation for authorization? }} +## Documentation for Authorization + +{{^authMethods}} +All endpoints do not require authorization. +{{/authMethods}} +{{#authMethods}} +{{#last}} +Authentication schemes defined for the API: +{{/last}} +{{/authMethods}} +{{#authMethods}} + +### {{name}} + +{{#isApiKey}}- **Type**: API key +- **API key parameter name**: {{keyParamName}} +- **Location**: {{#isKeyInQuery}}URL query string{{/isKeyInQuery}}{{#isKeyInHeader}}HTTP header{{/isKeyInHeader}} +{{/isApiKey}} +{{#isBasic}}- **Type**: HTTP basic authentication +{{/isBasic}} +{{#isOAuth}}- **Type**: OAuth +- **Flow**: {{flow}} +- **Authorization URL**: {{authorizationUrl}} +- **Scopes**: {{^scopes}}N/A{{/scopes}} +{{#scopes}} - {{scope}}: {{description}} +{{/scopes}} +{{/isOAuth}} + +{{/authMethods}} +``` + +Let's not focus too much on the contents of this file. You may refer to [templating](./templating.md) for more details on the variables bound to these files and to [debugging](./debugging.md) how to debug the structures. Of note here is that we're generating structures in markdown as defined by the objects constructed by our new "Config" class. + +#### api.mustache + +The API documentation might look like this: + +```mustache +# {{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}}** +> {{#returnType}}{{returnType}} {{/returnType}}{{operationId}}({{#allParams}}{{{paramName}}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) + +{{summary}}{{#notes}} + +{{notes}}{{/notes}} + +### 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}}{{#generateModelDocs}}[**{{dataType}}**]({{baseType}}.md){{/generateModelDocs}}{{^generateModelDocs}}**{{dataType}}**{{/generateModelDocs}}{{/isFile}}{{/isPrimitiveType}}| {{description}} |{{^required}} [optional]{{/required}}{{#defaultValue}} [default to {{defaultValue}}]{{/defaultValue}}{{#allowableValues}} [enum: {{#values}}{{{.}}}{{^-last}}, {{/-last}}{{/values}}]{{/allowableValues}} +{{/allParams}} + +### Return type + +{{#returnType}}{{#returnTypeIsPrimitive}}**{{returnType}}**{{/returnTypeIsPrimitive}}{{^returnTypeIsPrimitive}}{{#generateModelDocs}}[**{{returnType}}**]({{returnBaseType}}.md){{/generateModelDocs}}{{^generateModelDocs}}**{{returnType}}**{{/generateModelDocs}}{{/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}} + +{{/operation}} +{{/operations}} + +``` + +#### model.mustache + +The models file could resemble the following. + +```mustache +{{#models}} +{{#model}} +# {{{packageName}}}.{{modelPackage}}.{{{classname}}} +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +{{#parent}} +{{#parentVars}} +**{{name}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#readOnly}}[readonly] {{/readOnly}}{{#defaultValue}}[default to {{{.}}}]{{/defaultValue}} +{{/parentVars}} +{{/parent}} +{{#vars}}**{{name}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#readOnly}}[readonly] {{/readOnly}}{{#defaultValue}}[default to {{{.}}}]{{/defaultValue}} +{{/vars}} + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + +{{/model}} +{{/models}} +``` + +### Build it + +To compile quickly to test this out, you can run `mvn clean package -DskipTests`. + +> When implementing a more robust generator, you'll want to run all tests as well: `mvn clean package` + +### Compile Sample + +The `new.sh` script created `bin/markdown-documentation-petstore.sh`: + +```bash +#!/bin/sh + +SCRIPT="$0" + +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 clean package +fi + +# if you've executed sbt assembly previously it will use that instead. +export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties" +ags="$@ generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g markdown -o samples/documentation/petstore/markdown" + +java ${JAVA_OPTS} -jar ${executable} ${ags} +``` + +This script is often used to apply default options for generation. A common option in most of these script is to define the template directory as the generator's directory under `resources`. This allows template maintainers to modify and test out template changes which don't require recompilation of the entire project. You'd still need to recompile the project in full if you add or modify behaviors to the generator (such as adding a `CliOption`). + +Add `-t modules/openapi-generator/src/main/resources/markdown-documentation` to `ags` line to simplify the evaluation of template-only modifications: + +```diff +diff --git a/bin/markdown-documentation-petstore.sh b/bin/markdown-documentation-petstore.sh +index d816771478..94b4ce6d12 100644 +--- a/bin/markdown-documentation-petstore.sh ++++ b/bin/markdown-documentation-petstore.sh +@@ -26,6 +26,6 @@ fi + + # if you've executed sbt assembly previously it will use that instead. + export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties" +-ags="$@ generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g markdown -o samples/documentation/petstore/markdown" ++ags="$@ generate -t modules/openapi-generator/src/main/resources/markdown-documentation -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g markdown -o samples/documentation/petstore/markdown" + + java ${JAVA_OPTS} -jar ${executable} ${ags} +``` + +### Verify output + +Creating a new generator will be an iterative task. Once you've generated the sample, you'll want to try it out. For compiled client/server outputs, this would mean running the code or creating a small sample project to consume your artifact just to make sure it works. + +For markdown, you can open in Visual Studio Code or any other editor with a markdown preview. Not all editors support relative links to other markdown documents. To test the output in this guide, install `markserv`: + +```bash +npm install --global markserv +``` + +Now, you can serve the output directory directly and test your links: + +```bash +markserv samples/documentation/petstore/markdown +``` + +That's it! You've created your first generator! diff --git a/docs/online-openapi-generator.md b/docs/online-openapi-generator.md deleted file mode 100644 index f41b6419a1a2..000000000000 --- a/docs/online-openapi-generator.md +++ /dev/null @@ -1,88 +0,0 @@ -## Online OpenAPI generator - -One can also generate API clients or server stubs using the online openapi-generator. - -Here are the public online services: - -- latest stable version: http://api.openapi-generator.tech -- latest master: http://api-latest-master.openapi-generator.tech (updated with latest master every hour) - -The server is sponsored by [Linode](https://www.linode.com/) [![Linode Logo](https://www.linode.com/media/images/logos/standard/light/linode-logo_standard_light_small.png)](https://www.linode.com/) - -(These services are beta and do not have any guarantee on service level) - -If you prefer to run the service locally, here are the steps: -``` -mvn clean install -cd modules/openapi-generator-online -mvn spring-boot:run -``` - -:bulb: The online openapi-generator can be run via [Docker](https://github.com/OpenAPITools/openapi-generator#16---docker) as well. - -For example, to generate Ruby API client, simply send the following HTTP request using curl: -```sh -curl -X POST -H "content-type:application/json" -d '{"openAPIUrl":"https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/2_0/petstore.yaml"}' http://localhost:8080/api/gen/clients/ruby -``` -Then you will receieve a JSON response with the URL to download the zipped code. - -To customize the SDK, you can `POST` to `http://localhost:8080/gen/clients/{language}` with the following HTTP body: -```json -{ - "options": {}, - "openAPIUrl": "https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/2_0/petstore.yaml" -} -``` -in which the `options` for a language can be obtained by submitting a `GET` request to `http://locahost:8080/api/gen/clients/{language}`: - -For example, `curl http://localhost:8080/api/gen/clients/python` returns -```json - "packageName":{ - "opt":"packageName", - "description":"python package name (convention: snake_case).", - "type":"string", - "default":"openapi_client" - }, - "packageVersion":{ - "opt":"packageVersion", - "description":"python package version.", - "type":"string", - "default":"1.0.0" - }, - "sortParamsByRequiredFlag":{ - "opt":"sortParamsByRequiredFlag", - "description":"Sort method arguments to place required parameters before optional parameters.", - "type":"boolean", - "default":"true" - } - -{} -``` -To set package name to `pet_store`, the HTTP body of the request is as follows: -```json -{ - "options": { - "packageName": "pet_store" - }, - "openAPIUrl": "https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/2_0/petstore.yaml" -} -``` -and here is the curl command: -```sh -curl -H "Content-type: application/json" -X POST -d '{"options": {"packageName": "pet_store"},"openAPIUrl": "https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/2_0/petstore.yaml"}' http://localhost:8080/api/gen/clients/python -``` - -Instead of using `openAPIUrl` with an URL to the OpenAPI spec, one can include the spec in the JSON payload with `spec`, e.g. -```json -{ - "options": {}, - "spec": { - "swagger": "2.0", - "info": { - "version": "1.0.0", - "title": "Test API" - }, - ... - } -} -``` diff --git a/docs/online.md b/docs/online.md new file mode 100644 index 000000000000..417b4099f7d6 --- /dev/null +++ b/docs/online.md @@ -0,0 +1,144 @@ +--- +id: online +title: Online +--- + +## Hosted + +We offer online services, publicly and free of charge: + +- latest stable version: http://api.openapi-generator.tech +- latest master: http://api-latest-master.openapi-generator.tech (updated with latest master every hour) + +> **Hosting Sponsor** +> [![Linode Logo](https://www.linode.com/media/images/logos/standard/light/linode-logo_standard_light_small.png)](https://www.linode.com/) + +These services are beta and do not have any guarantee on service level + +## Docker Image + +The openapi-generator-online Docker image can act as a self-hosted web application and API for generating code. This container can be incorporated into a CI pipeline, and requires at least two HTTP requests and some docker orchestration to access generated code. + +Example usage: + +```bash +# Start container at port 8888 and save the container id +CID=$(docker run -d -p 8888:8080 \ + -e GENERATOR_HOST=http://localhost:8888 \ + openapitools/openapi-generator-online) + +# allow for startup +sleep 10 + +# Get the IP of the running container (optional) +GEN_IP=$(docker inspect --format '{{.NetworkSettings.IPAddress}}' ${CID}) + +# Execute an HTTP request to generate a Ruby client +curl -X POST --header 'Content-Type: application/json' \ + --header 'Accept: application/json' \ + -d '{"openAPIUrl": "https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/2_0/petstore.yaml"}' \ + 'http://localhost:8888/api/gen/clients/ruby' + +# Example output: +# {"code":"c2d483.3.4672-40e9-91df-b9ffd18d22b8","link":"http://localhost:8888/api/gen/download/c2d483.3.4672-40e9-91df-b9ffd18d22b8"} + +# Download the generated zip file (using "code" provided from your output) +wget http://localhost:8888/api/gen/download/c2d483.3.4672-40e9-91df-b9ffd18d22b8 + +# Unzip the file +unzip c2d483.3.4672-40e9-91df-b9ffd18d22b8 + +# Shutdown the openapi generator image +docker stop ${CID} && docker rm ${CID} +``` + +## Local/Self-hosting + +If you prefer to run the service locally, here are the steps: + +```bash +mvn clean install +cd modules/openapi-generator-online +mvn spring-boot:run +``` + +> The online openapi-generator can be run via [Docker](#docker-image) as well. + +For example, to generate Ruby API client, simply send the following HTTP request using curl: + +```bash +curl -X POST -H "content-type:application/json" -d '{"openAPIUrl":"https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/2_0/petstore.yaml"}' \ + http://localhost:8080/api/gen/clients/ruby +``` +Then you will receive a JSON response with the URL to download the zipped code. + +To customize the SDK, you can `POST` to `http://localhost:8080/gen/clients/{generator}` with the following HTTP body: + +```json +{ + "options": {}, + "openAPIUrl": "https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/2_0/petstore.yaml" +} +``` + +Here, the `options` for a language can be obtained by submitting a `GET` request to `http://locahost:8080/api/gen/clients/{generator}`: + +For example, `curl http://localhost:8080/api/gen/clients/python` returns + +```json + "packageName":{ + "opt":"packageName", + "description":"python package name (convention: snake_case).", + "type":"string", + "default":"openapi_client" + }, + "packageVersion":{ + "opt":"packageVersion", + "description":"python package version.", + "type":"string", + "default":"1.0.0" + }, + "sortParamsByRequiredFlag":{ + "opt":"sortParamsByRequiredFlag", + "description":"Sort method arguments to place required parameters before optional parameters.", + "type":"boolean", + "default":"true" + } + +{} +``` + +To set package name to `pet_store`, the HTTP body of the request is as follows: + +```json +{ + "options": { + "packageName": "pet_store" + }, + "openAPIUrl": "https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/2_0/petstore.yaml" +} +``` + +and here is the curl command: +```bash +curl -H "Content-type: application/json" \ + -X POST \ + -d '{"options": {"packageName": "pet_store"},"openAPIUrl": "https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/2_0/petstore.yaml"}' \ + http://localhost:8080/api/gen/clients/python +``` + +Instead of using `openAPIUrl` with an URL to the OpenAPI spec, one can include the spec in the JSON payload with `spec`: + +```json +{ + "options": {}, + "spec": { + "swagger": "2.0", + "info": { + "version": "1.0.0", + "title": "Test API" + }, + ... + } +} +``` diff --git a/docs/plugins.md b/docs/plugins.md new file mode 100644 index 000000000000..923d1ea24ef1 --- /dev/null +++ b/docs/plugins.md @@ -0,0 +1,99 @@ +--- +id: plugins +title: Plugins +--- + +## Maven + +A Maven plugin to support the OpenAPI generator project + +### Example + +Add to your `build->plugins` section (default phase is `generate-sources` phase) + +```xml + + org.openapitools + openapi-generator-maven-plugin + 3.3.4 + + + + generate + + + ${project.basedir}/src/main/resources/api.yaml + java + + src/gen/java/main + + + + + +``` + +Followed by: + +```bash +mvn clean compile +``` + +For full details of all options, see the [plugin README](https://github.com/OpenAPITools/openapi-generator/tree/master/modules/openapi-generator-maven-plugin). + +## Gradle + +This gradle plugin offers a declarative DSL via extensions (these are Gradle project extensions). These map almost fully 1:1 with the options you’d pass to the CLI or Maven plugin. The plugin maps the extensions to a task of the same name to provide a clean API. If you’re interested in the extension/task mapping concept from a high-level, you can check out [Gradle’s docs](https://docs.gradle.org/current/userguide/custom_plugins.html#sec:mapping_extension_properties_to_task_properties). + +To include in your project, add the following to `build.gradle`: + +```groovy +buildscript { + repositories { + mavenLocal() + mavenCentral() + } + dependencies { + classpath "org.openapitools:openapi-generator-gradle-plugin:3.3.4" + } +} + +apply plugin: 'org.openapi.generator' +``` + +This gives access to the following tasks: + +| Task | Description | +| ---- | ----------- | +| openApiGenerate | Generate code via Open API Tools Generator for Open API 2.0 or 3.x specification documents. | +| openApiGenerators | Lists generators available via Open API Generators. | +| openApiMeta | Generates a new generator to be consumed via Open API Generator. | +| openApiValidate | Validates an Open API 2.0 or 3.x specification document. | + +> The plugin implements the above tasks as project extensions of the same name. If you’d like to declare these tasks as dependencies to other tasks (using `dependsOn`), you’ll need a task reference. e.g.: +> ```groovy +> compileJava.dependsOn tasks.openApiGenerate +> ``` + +For full details of all options, see the [plugin README](https://github.com/OpenAPITools/openapi-generator/tree/master/modules/openapi-generator-gradle-plugin). + +### Example + +An example task for generating a kotlin client: + +```groovy +openApiGenerate { + generatorName = "kotlin" + inputSpec = "$rootDir/specs/petstore-v3.0.yaml".toString() + outputDir = "$buildDir/generated".toString() + apiPackage = "org.openapi.example.api" + invokerPackage = "org.openapi.example.invoker" + modelPackage = "org.openapi.example.model" + modelFilesConstrainedTo = [ + "Error" + ] + configOptions = [ + dateLibrary: "java8" + ] +} +``` \ No newline at end of file diff --git a/docs/qna.md b/docs/qna.md index d8681f8cde2c..7c3d732ca64c 100644 --- a/docs/qna.md +++ b/docs/qna.md @@ -1,41 +1,27 @@ -## Question and Answer +--- +id: fork-qna +title: Swagger Codegen Fork: Q&A +--- -#### What is the governance structure of the OpenAPI Generator project? +This document aims to answer some questions about the fork for historical reference, where these questions don't fit into other documents related to the project itself. -OpenAPI generator (openapi-generator) is managed by the members of the [core team](../README.md#openapi-generator-core-team). - - -#### What is the difference between Swagger Codegen and OpenAPI Generator? - -Swagger Codegen is driven by SmartBear while OpenAPI Generator is driven by the community. More than 40 top contributors and template creators of Swagger Codegen have joined OpenAPI Generator as the founding team members. - -Swagger is a trademark owned by SmartBear and the use of the term "Swagger" in this project is for demo (reference) purposes only. - - -#### Why was it decided to fork Swagger Codegen and to maintain a community-driven version? +## Why was it decided to fork Swagger Codegen? There are several reasons: -1. The founding members came to the conclusion that Swagger Codegen 3.0.0 beta contains too many breaking changes. They also strongly believe the 3.0.0 release should only focus on one thing: OpenAPI 3.0 support. -1. The founding members had concerns about the development practices, which seemed to be contributing to an unstable and insufficiently tested codebase. -1. There was a disagreement on the evolutionary strategy for Swagger Codegen. The founding members felt it was important to move forward with OpenAPI 3.0 support, while maintaining backward compatibility with OpenAPI 2.0 in the same codebase. -1. The founding members found that the enhancements and bug fixes submitted for Swagger Codegen 2.x need to be submitted again for Swagger Codegen 3.0.0 branch (otherwise, these changes would not appear in the 3.0.0 branch. Having to do the pull request twice is not the best use of community resources). -1. The community-driven version has a more rapid [release cycle](https://github.com/OpenAPITools/openapi-generator/releases/) (weekly patch release, monthly minor release) so users do not need to wait for several months to get a stable release. -1. Having a community-driven version _can_ bring the project to the next level with reliable releases and a clear [roadmap](https://github.com/OpenAPITools/openapi-generator/blob/master/docs/roadmap.adoc). - -#### Was anything done to attempt to address the issues before deciding to fork Swagger Codegen and maintain a community-driven version? - -There were several conversations with the project owners of Swagger Codegen via emails, Gitter, Skype call and GitHub issues to discuss the state of Swagger Codegen 3.0.0. -But there was no consensus on the next steps and on the direction for Swagger Codegen 3.0.0. +1. The founding members felt that Swagger Codegen 3.0.0 was diverging too much from the philosophy of Swagger Codegen 2.x. +1. The founding members were concerned that the maintenance overhead of two separate branches (2.x, 3.x) would result in issues similar to those felt in the Python community. +1. The founding members wanted a more rapid [release cycle](https://github.com/OpenAPITools/openapi-generator/releases/) (weekly patch release, monthly minor release) so users do not need to wait for several months to get a stable release. +1. Having a community-driven version allows for innovation, reliability, and a [roadmap](https://github.com/OpenAPITools/openapi-generator/blob/master/docs/roadmap.md) owned by the community. -#### Are there any changes to the project license? +## Are there any changes to the project license? No, OpenAPI Generator is still using the [Apache license (version 2)](https://www.apache.org/licenses/LICENSE-2.0). -#### I am currently using Swagger Codegen 2.x. How can I upgrade the generator to OpenAPI Generator? +## I am currently using Swagger Codegen 2.x. How can I upgrade the generator to OpenAPI Generator? -OpenAPI Generator is based on Swagger Codegen `2.4.0-SNAPSHOT` version so the migration should be relatively straightforward. Refer to the [migration guide](migration-from-swagger-codegen.md) for more information. +OpenAPI Generator is based on Swagger Codegen `2.4.0-SNAPSHOT` version so the migration should be relatively straightforward. Refer to the [migration guide](./migration-from-swagger-codegen.md) for more information. -#### Who maintains this Q&A page? +## Who maintains this Q&A page? -This Q&A page is maintained by the [core team members](../README.md#openapi-generator-core-team). It is not maintained by a single person nor do these Q&As represent the views of any individual or person. +This Q&A page is maintained by the [core team members](./core-team.md). It is not maintained by any single person, nor do these Q&As represent the views of any individual or person. diff --git a/docs/release-summary.md b/docs/release-summary.md new file mode 100644 index 000000000000..5dac0aacc25b --- /dev/null +++ b/docs/release-summary.md @@ -0,0 +1,24 @@ +--- +id: release-summary +title: Release Summary +--- + +## Versioning + +We version artifacts in the common `major.minor.patch` strategy. + +We decided versions should be incremented according to the following rules. The examples provided below are not exhaustive. + +| Part | Breaking Changes? | Rule | Examples | +| ----: | :-----------------: | :---- | :------- | +| major | YES | breaking changes without fallback |
  • New Features
  • Large refactors
  • Removal of deprecated code
  • Changes to coding interfaces
  • Large changes to template bound variables
| +| minor | ALLOWED | breaking changes with fallback |
  • Adding new generator behavior which doesn't affect custom templates (or does, with config option for old behavior)
  • Changing generator templates in a way in which switching to custom templates results in old behavior
  • Introducing deprecated methods in generators or other shared code
| +| patch | NO | new features without breaking changes |
  • New generators
  • Bug fixes in template or generators
| + +## Cadence + +For patch release (e.g. 3.0.5 to 3.0.6), we plan to do it on a _weekly basis_. + +For minor release (e.g. 3.1.6 to 3.2.0), we plan to do it on a _monthly basis_. + +For major releases (e.g. 3.3.6 to 4.0.0), we plan to do it on a _quarterly basis_. diff --git a/docs/roadmap.md b/docs/roadmap.md new file mode 100644 index 000000000000..c56e7dbe6414 --- /dev/null +++ b/docs/roadmap.md @@ -0,0 +1,85 @@ +--- +id: roadmap +title: Roadmap +--- + +This document lists short-term, medium-term, and long-term goals for the project. + +--- + +**NOTE** + +These are goals, not necessarily commitments. The sections are not intended to represent exclusive focus during these terms. For example, when you start at a college or university you may have a long-term goal to graduate and a short-term goal to find a job for supplemental income. We will similarly work toward many of our medium-term and long-term goals in the near future as we move toward meeting our short-term goals. + +--- + +## Short-term + +> Usability, stability, and marketing. + +Short term are focused on improving contributor and user productivity (part of this is getting the word out). + +* CLI improvements + * Search functionality (e.g. what generators support retrofit, what generators are available for kotlin) +* Build automation improvements +* Discuss consolidating current third-party build systems +* Investigate custom docker containerization for prepared build environments +* Automated release stability +* General +* OAS3.0 features support: anyOf, oneOf, callbacks, etc +* Consider opt-in telemetry about generators being used, limited to a counter of invocations by generator name). This would allow us to make prioritization decisions based on statistics. +* Code clean up + * centralize build scripts + * organize samples/bin scripts according to new generator names + * consolidate typescript generators + * jaxrs => use Swagger core v3 (see https://github.com/OpenAPITools/openapi-generator/issues/27[#27]) +* Documentation +* Static pages, preferably on gh-pages, devoted to each generator +* Explain generator options +* Centralized docs on generated code usage/examples/configuration + +## Medium-term + +> Feature set, well-defined API (code and templates), and extensibility improvements. + +### API +* Typed representation of the model bound to our templates. As it is, everything is treated an an Object, and this can lead to changes in the interface which might be unexpected from the template perspective. +* Feature set (potential generators to add; not an exhaustive list) + * Azure functions (node.js, server) + * Finagle HTTP Client (Scala, client) + * Finagle Http Server (Scala, server) + * Finatra (Scala, server) + * Kotlin Spring MVC/Springboot (server) + * C++ Server, any framework (server) + +### General +* Migrate from Maven to Gradle +* Java 9+ support +* Feature set (other options to investigate) +* SPI plugins + * Templating engine + * Language extensions + * Custom extensions (e.g. allowing users to load support for https://github.com/Azure/azure-rest-api-specs[azure-rest-api-specs]) +* Customizable templating engines (handlebars support) +* Unit-testing templates (to previously mentioned explicit type as an interface to the template) +* Reduce coupling +* Make types extending `CodegenConfig` become the generation entrypoint +* Allow current `CodegenConfig` types to define templating engine +* Allow current `CodegenConfig` types to modify workflow (currently encapsulated in `DefaultGenerator` and tightly coupled to the template engine +* Clearer reuse of "language" features, outside of "generator" types. That is, rather than enforcing polymorphic sharing of "language" which currently allows the super type to redefine framework-specific mapping functionality, generators could compose one or more language support types. +* Define template deprecation/removal process + +## Long-term + +> Expanding tooling offered, integrations, potentially SaaS offering to partially fund efforts. + +* Generator UI wrappers + * Move jimschubert/intellij-swagger-codegen plugin under the org, and rename + * Look into an Eclipse UI wrapper around the generator + * Look at Visual Studio Code (and/or Atom, sublime text) integration +* Provide a native GUI for viewing/editing specs. Most tools are currently geared toward developers, but often times it may be non-technical business users who are interested in an API. +* A paid service (SaaS) for generation may be enticing for some users. Such a service would allow for statistics (mentioned earlier in telemetry) +* Additional tools +* node.js build system(s) integration (grunt/gulp/webpack/etc) +* ruby gem +* others (which may require previously mentioned SaaS API) diff --git a/docs/specification-info.md b/docs/specification-info.md new file mode 100644 index 000000000000..ec4a5724055f --- /dev/null +++ b/docs/specification-info.md @@ -0,0 +1,17 @@ +--- +id: spec-info +title: Spec Info +--- + +## OpenAPI + +### 2.0 + +### 3.x + +### Tags + +Tags basically group endpoints into the same API class file. For example, an endpoint with the `store` tag will be generated in the StoreApi class file in most generators. + +Ref: https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#tagObject + diff --git a/docs/templating.md b/docs/templating.md new file mode 100644 index 000000000000..4246bdc327f7 --- /dev/null +++ b/docs/templating.md @@ -0,0 +1,743 @@ +--- +id: templating +title: Using Templates +--- + +It's easy to work with templates for codegen! + +The generator workflow has [transforming logic](https://github.com/openapitools/openapi-generator/tree/master/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages) as well as templates for each generation of code. + +Each generator will create a data structure from the OpenAPI document; OpenAPI 2.0 and OpenAPI 3.x documents are normalized into the same API model within the generator. This model is then applied to the templates. While generators do not need to perform transformations, it's often necessary in order to add more advanced support for your language or framework. You may need to refer to the generator implementation to understand some of the logic while creating or customizing templates (see [FinchServerCodegen.java](https://github.com/OpenAPITools/openapi-generator/blob/master/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/FinchServerCodegen.java) for an advanced example). + +The transform logic needs to implement [CodegenConfig.java](https://github.com/openapitools/openapi-generator/blob/master/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenConfig.java) and is most easily done by extending [DefaultCodegen.java](https://github.com/openapitools/openapi-generator/blob/master/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java). Take a look at the various implementations as a guideline while the instructions get more complete. + +## Modifying Templates + +> OpenAPI Generator applies user-defined templates via options: +> * CLI: `-t/--template` CLI options +> * Maven Plugin: `templateDirectory` +> * Gradle Plugin: `templateDir` + +Built-in templates are written in Mustache and processed by [jmustache](https://github.com/samskivert/jmustache). We plan to eventually support Handlebars and user-defined template engines via plugins. + +OpenAPI Generator supports user-defined templates. This approach is often the easiest when creating a custom template. Our generators implement a combination of language and framework features, and it's fully possible to use an existing generator to implement a custom template for a different framework. Suppose you have internal utilities which you'd like to incorporate into generated code (e.g. logging, monitoring, fault-handling)... this is easy to add via custom templates. + +> **Note:** You cannot use this approach to create new templates, only override existing ones. If you'd like to create a new generator to contribute back to the project, see `new.sh` in the repository root. If you'd like to create a private generator for more templating control, see the [customization](./customization.md) docs. + +### Custom Logic + +For this example, let's modify a Java client to use AOP via [jcabi/jcabi-aspects](https://github.com/jcabi/jcabi-aspects). We'll log API method execution at the `INFO` level. The jcabi-aspects project could also be used to implement method retries on failures; this would be a great exercise to further play around with templating. + +The Java generator supports a `library` option. This option works by defining base templates, then applying library-specific template overrides. This allows for template reuse for libraries sharing the same programming language. Templates defined as a library need only modify or extend the templates concerning the library, and generation falls back to the root templates (the "defaults") when not extended by the library. Generators which support the `library` option will only support the libraries known by the generator at compile time, and will throw a runtime error if you try to provide a custom library name. + +To get started, we will need to copy our target generator's directory in full. The directory will be located under `modules/opeanpi-generator/src/main/resources/{generator}`. In general, the generator directory matches the generator name (what you would pass to the `generator` option), but this is not a requirement-- if you are having a hard time finding the template directory, look at the `embeddedTemplateDir` option in your target generator's implementation. + +If you've already cloned openapi-generator, find and copy the `modules/opeanpi-generator/src/main/resources/Java` directory. If you have the [Refined GitHub](https://github.com/sindresorhus/refined-github) Chrome or Firefox Extension, you can navigate to this directory on GitHub and click the "Download" button. Or, to pull the directory from latest master: + +```bash +mkdir -p ~/.openapi-generator/templates/ && cd $_ +curl -L https://api.github.com/repos/OpenAPITools/openapi-generator/tarball | tar xz +mv `ls`/modules/openapi-generator/src/main/resources/Java ./Java +\rm -rf OpenAPITools-openapi-generator-* +cd Java +``` + +**Optional**: Before modifying your templates, you may want to `git init && git add . && git commit -am 'initial'` so you can easily revert to the base templates. + +At this point, you have _every_ Java library's template locally. Let's delete all libraries except the `resteasy` library we'll be extending: + +```bash +ls -d libraries/* | grep -v resteasy | xargs rm -rf +``` + +Execute `tree` in this Java directory and inspect the mustache files and directory structure. You'll notice there are quite a few templates in the directory root, but extending this root to support resteasy only requires modifying a handful of files: + +```bash +tree libraries/resteasy/ +libraries/resteasy/ +├── ApiClient.mustache +├── JSON.mustache +├── api.mustache +├── build.gradle.mustache +├── build.sbt.mustache +└── pom.mustache + +0 directories, 6 files +``` + +> NOTE: Some generators may be sensitive to _which_ files exist. If you're concerned with redundant files like `pom.mustache` and `build.sbt.mustache`, you can try deleting them. If the generator you're customizing fails at runtime, just `touch` these files to create an empty file. + + +First, let's add our new dependency to `libraries/resteasy/build.gradle.mustache`: + +```diff +diff --git a/libraries/resteasy/build.gradle.mustache b/libraries/resteasy/build.gradle.mustache +index 3b40702..a6d12e0 100644 +--- a/libraries/resteasy/build.gradle.mustache ++++ b/libraries/resteasy/build.gradle.mustache +@@ -134,6 +134,7 @@ ext { + } + + dependencies { ++ compile "com.jcabi:jcabi-aspects:0.22.6" + compile "io.swagger:swagger-annotations:$swagger_annotations_version" + compile "org.jboss.resteasy:resteasy-client:$resteasy_version" + compile "org.jboss.resteasy:resteasy-multipart-provider:$resteasy_version" + +``` + +Then, we'll add the necessary import to `api.mustache`. This file is the template which becomes the API invoking class (e.g. `PetApi` or `StoreApi`). + +```diff +diff --git a/libraries/resteasy/api.mustache b/libraries/resteasy/api.mustache +index a4d0f9f..49b17c7 100644 +--- a/libraries/resteasy/api.mustache ++++ b/libraries/resteasy/api.mustache +@@ -1,5 +1,6 @@ + package {{package}}; + ++import com.jcabi.aspects.Loggable; + import {{invokerPackage}}.ApiException; + import {{invokerPackage}}.ApiClient; + import {{invokerPackage}}.Configuration; + +``` + +Next, we'll find the code which generates API methods. You'll see `{{#operations}}{{#operation}}` which is a mustache "loop" which executes the template logic if the model applied to the template has an `operations` array, and a non-null `operation` instance in that array. You can pass `-DdebugOpenAPI` when generating via CLI to inspect the full object model. + +Further down in `api.mustache`, find implementation of the method call, and add the `@Loggable` annotation. This template is easy because it has a single method implementation. + +```diff +diff --git a/libraries/resteasy/api.mustache b/libraries/resteasy/api.mustache +index 49b17c7..16ee191 100644 +--- a/libraries/resteasy/api.mustache ++++ b/libraries/resteasy/api.mustache +@@ -57,6 +57,7 @@ public class {{classname}} { + {{#isDeprecated}} + @Deprecated + {{/isDeprecated}} ++ @Loggable(Loggable.INFO) + public {{#returnType}}{{{returnType}}} {{/returnType}}{{^returnType}}void {{/returnType}}{{operationId}}({{#allParams}}{{{dataType}}} {{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) throws ApiException { + Object {{localVariablePrefix}}localVarPostBody = {{#bodyParam}}{{paramName}}{{/bodyParam}}{{^bodyParam}}new Object(){{/bodyParam}}; + {{#allParams}}{{#required}} + +``` + +Finally, because our new dependency relies on AspectJ and code weaving, let's modify the `build.gradle.mustache` again to set this up. + +```diff +diff --git a/build.gradle.mustache b/build.gradle.mustache +index 04a9d55..7a93c50 100644 +--- a/build.gradle.mustache ++++ b/build.gradle.mustache +@@ -1,5 +1,6 @@ + apply plugin: 'idea' + apply plugin: 'eclipse' ++apply plugin: 'aspectj' + + group = '{{groupId}}' + version = '{{artifactVersion}}' +@@ -12,6 +13,7 @@ buildscript { + dependencies { + classpath 'com.android.tools.build:gradle:2.3.+' + classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5' ++ classpath "net.uberfoo.gradle:gradle-aspectj:2.2" + } + } + +@@ -140,9 +142,18 @@ ext { + jersey_version = "1.19.4" + jodatime_version = "2.9.9" + junit_version = "4.12" ++ aspectjVersion = '1.9.0' + } + ++sourceCompatibility = '1.8' ++targetCompatibility = '1.8' ++ + dependencies { ++ compile "com.jcabi:jcabi-aspects:0.22.6" ++ aspectpath "com.jcabi:jcabi-aspects:0.22.6" ++ // usually, client code leaves logging implementation to the consumer code ++ compile "org.apache.logging.log4j:log4j-slf4j-impl:2.8.2" ++ compile "org.apache.logging.log4j:log4j-core:2.8.2" + compile "io.swagger:swagger-annotations:$swagger_annotations_version" + compile "com.sun.jersey:jersey-client:$jersey_version" + compile "com.sun.jersey.contribs:jersey-multipart:$jersey_version" + +``` + +> NOTE: This example includes log4j-slf4j-impl to demonstrate that our new code is working. Generally you'll want to leave logging implementations up to your consumers. + +And because the java client generates with an outdated Gradle 2.6, let's update the gradle version in the default template (`Java/gradle-wrapper.properties.mustache`): + +```diff +diff --git a/gradle-wrapper.properties.mustache b/gradle-wrapper.properties.mustache +index b7a3647..3d9d088 100644 +--- a/gradle-wrapper.properties.mustache ++++ b/gradle-wrapper.properties.mustache +@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME + distributionPath=wrapper/dists + zipStoreBase=GRADLE_USER_HOME + zipStorePath=wrapper/dists +-distributionUrl=https\://services.gradle.org/distributions/gradle-2.6-bin.zip ++distributionUrl=https\://services.gradle.org/distributions/gradle-4.8-bin.zip + +``` + +Now we're ready to generate the client with our simple changes. When we pass the template directory option to our toolset, we _must_ pass the generator's root directory and _not_ the library-only directory. + +```bash +openapi-generator generate -g java --library resteasy \ + -t ~/.openapi-generator/templates/Java \ + -o ~/.openapi-generator/example \ + -i https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/2_0/petstore.yaml +``` + +Make sure your custom template compiles: + +```bash +cd ~/.openapi-generator/example +gradle assemble +# or, regenerate the wrapper +gradle wrapper --gradle-version 4.8 --distribution-type all +./gradlew assemble +``` + +You should see a log message showing our added dependency being downloaded: + +```text +… +Download https://jcenter.bintray.com/com/jcabi/jcabi-aspects/0.22.6/jcabi-aspects-0.22.6.pom +… +``` + +And for the sake of verifying our AOP modifications work, let's create a `src/main/resources/log4j2.properties` file in our new client code: + +```properties +status = error +dest = err +name = PropertiesConfig + +property.filename = target/rolling/rollingtest.log + +filter.threshold.type = ThresholdFilter +filter.threshold.level = debug + +appender.console.type = Console +appender.console.name = STDOUT +appender.console.layout.type = PatternLayout +appender.console.layout.pattern = %m%n +appender.console.filter.threshold.type = ThresholdFilter +appender.console.filter.threshold.level = error + +appender.rolling.type = RollingFile +appender.rolling.name = RollingFile +appender.rolling.fileName = ${filename} +appender.rolling.filePattern = target/rolling2/test1-%d{MM-dd-yy-HH-mm-ss}-%i.log.gz +appender.rolling.layout.type = PatternLayout +appender.rolling.layout.pattern = %d %p %C{1.} [%t] %m%n +appender.rolling.policies.type = Policies +appender.rolling.policies.time.type = TimeBasedTriggeringPolicy +appender.rolling.policies.time.interval = 2 +appender.rolling.policies.time.modulate = true +appender.rolling.policies.size.type = SizeBasedTriggeringPolicy +appender.rolling.policies.size.size=100MB +appender.rolling.strategy.type = DefaultRolloverStrategy +appender.rolling.strategy.max = 5 + +logger.rolling.name = org.openapitools.client.api.PetApi +logger.rolling.level = debug +logger.rolling.additivity = false +logger.rolling.appenderRef.rolling.ref = RollingFile + +rootLogger.level = info +rootLogger.appenderRef.stdout.ref = STDOUT +``` + +Execute `./gradlew build` and then `cat target/rolling/rollingtest.log`. You should see messages logged for every call in PetApi with a stubbed unit test. + +Congratulations! You've now modified one of the built-in templates to meet your client code's needs. + +Adding/modifying template logic simply requires a little bit of [mustache](https://mustache.github.io/), for which you can use existing templates as a guide. + +## Structures + +Aside from transforming an API document, the implementing class gets to decide how to apply the data structure to templates. We can decide which data structure to apply to which template files. You have the following structures at your disposal. + +Examples for the following structures will be presented using the following spec document: + +```yaml + swagger: "2.0" + info: + version: "1.0.0" + title: "Swagger Petstore" + description: "A sample API that uses a petstore as an example to demonstrate features in the swagger-2.0 specification" + termsOfService: "http://swagger.io/terms/" + contact: + name: "Swagger API Team" + license: + name: "MIT" + host: "petstore.swagger.io" + basePath: "/api" + schemes: + - "http" + consumes: + - "application/json" + produces: + - "application/json" + paths: + /pets: + get: + description: "Returns all pets from the system that the user has access to" + produces: + - "application/json" + responses: + "200": + description: "A list of pets." + schema: + type: "array" + items: + $ref: "#/definitions/Pet" + definitions: + Pet: + type: "object" + required: + - "id" + - "name" + properties: + id: + type: "integer" + format: "int64" + name: + type: "string" + tag: + type: "string" + +``` + +### Operations + +> Inspect operation structures passed to templates with system property `-DdebugOpenAPI` +> +> Example: +> +> ```bash +> openapi-generator generate -g go \ +> -o out \ +> -i petstore-minimal.yaml \ +> -DdebugOpenAPI +> ``` +> + +There is a data structure which represents all the operations that are defined in the OpenAPI specification. A single API file is created for each `OperationGroup`, which is essentially a grouping of different operations. See the `addOperationToGroup` in `DefaultCodegen.java` for details on this operation. + +You can have many files created for each `OperationGroup` by processing multiple templates and assigning a different file naming pattern to them. So for a single file per operation: + +```java +// process the `api.mustache` template and output a single file with suffix `.java`: +apiTemplateFiles.put("api.mustache", ".java"); +``` + +For C-like languages which also require header files, you may create two files per operation. + +```objc +// create a header and implementation for each operation group: +apiTemplateFiles.put("api-header.mustache", ".h"); +apiTemplateFiles.put("api-body.mustache", ".m"); +``` +Here, an Operation with tag `Pet` will generate two files: `SWGPetApi.h` and `SWGPetApi.m`. The `SWG` prefix and `Api` suffix are options specific to the Objective-C geneator. + +### Models + +> Inspect models passed to templates with system property `-DdebugModels` +> +> Execute: +> +> ```bash +> openapi-generator generate -g go \ +> -o out \ +> -i petstore-minimal.yaml \ +> -DdebugModels +> ``` +> + +Each model identified inside the generator will be passed into the `Models` data structure and will generate a new model file (or files) for each model. + +A `Pet` model with three properties will provide a _lot_ of information about the type and properties. The output from `-DdebugModels` is presented in truncated format here. + +```json +[ { + "importPath" : "openapi.Pet", + "model" : { + "name" : "Pet", + "classname" : "Pet", + "classVarName" : "Pet", + "modelJson" : "{\n \"required\" : [ \"id\", \"name\" ],\n \"type\" : \"object\",\n \"properties\" : {\n \"id\" : {\n \"type\" : \"integer\",\n \"format\" : \"int64\"\n },\n \"name\" : {\n \"type\" : \"string\"\n },\n \"tag\" : {\n \"type\" : \"string\"\n }\n }\n}", + "dataType" : "map[string]interface{}", + "classFilename" : "model_pet", + "isAlias" : false, + "isString" : false, + "isInteger" : false, + "vars" : [ { + "baseName" : "id", + "getter" : "getId", + "setter" : "setId", + "dataType" : "int64", + "datatypeWithEnum" : "int64", + "dataFormat" : "int64", + "name" : "Id", + "defaultValueWithParam" : " = data.id;", + "baseType" : "int64", + "example" : "null", + "jsonSchema" : "{\n \"type\" : \"integer\",\n \"format\" : \"int64\"\n}", + "exclusiveMinimum" : false, + "exclusiveMaximum" : false, + "hasMore" : true, + "required" : true, + "secondaryParam" : false, + "hasMoreNonReadOnly" : true, + "isPrimitiveType" : true, + "isModel" : false, + "isContainer" : false, + "isNotContainer" : true, + "isString" : false, + "isNumeric" : true, + "isInteger" : false, + "isLong" : true, + "isNumber" : false, + "isFloat" : false, + "isDouble" : false, + "isByteArray" : false, + "isBinary" : false, + "isFile" : false, + "isBoolean" : false, + "isDate" : false, + "isDateTime" : false, + "isUuid" : false, + "isEmail" : false, + "isFreeFormObject" : false, + "isListContainer" : false, + "isMapContainer" : false, + "isEnum" : false, + "isReadOnly" : false, + "isWriteOnly" : false, + "isNullable" : false, + "vendorExtensions" : { }, + "hasValidation" : false, + "isInherited" : false, + "nameInCamelCase" : "Id", + "nameInSnakeCase" : "ID", + "isXmlAttribute" : false, + "isXmlWrapped" : false, + "datatype" : "int64", + "iexclusiveMaximum" : false + }, { + "baseName" : "name", + "getter" : "getName", + "setter" : "setName", + "dataType" : "string", + "datatypeWithEnum" : "string", + "name" : "Name", + "defaultValueWithParam" : " = data.name;", + "baseType" : "string", + "example" : "null", + "jsonSchema" : "{\n \"type\" : \"string\"\n}", + "exclusiveMinimum" : false, + "exclusiveMaximum" : false, + "hasMore" : true, + "required" : true, + "secondaryParam" : false, + "hasMoreNonReadOnly" : true, + "isPrimitiveType" : true, + "isModel" : false, + "isContainer" : false, + "isNotContainer" : true, + "isString" : true, + "isNumeric" : false, + "isInteger" : false, + "isLong" : false, + "isNumber" : false, + "isFloat" : false, + "isDouble" : false, + "isByteArray" : false, + "isBinary" : false, + "isFile" : false, + "isBoolean" : false, + "isDate" : false, + "isDateTime" : false, + "isUuid" : false, + "isEmail" : false, + "isFreeFormObject" : false, + "isListContainer" : false, + "isMapContainer" : false, + "isEnum" : false, + "isReadOnly" : false, + "isWriteOnly" : false, + "isNullable" : false, + "vendorExtensions" : { }, + "hasValidation" : false, + "isInherited" : false, + "nameInCamelCase" : "Name", + "nameInSnakeCase" : "NAME", + "isXmlAttribute" : false, + "isXmlWrapped" : false, + "datatype" : "string", + "iexclusiveMaximum" : false + }, { + "baseName" : "tag", + "getter" : "getTag", + "setter" : "setTag", + "dataType" : "string", + "datatypeWithEnum" : "string", + "name" : "Tag", + "defaultValueWithParam" : " = data.tag;", + "baseType" : "string", + "example" : "null", + "jsonSchema" : "{\n \"type\" : \"string\"\n}", + "exclusiveMinimum" : false, + "exclusiveMaximum" : false, + "hasMore" : false, + "required" : false, + "secondaryParam" : false, + "hasMoreNonReadOnly" : false, + "isPrimitiveType" : true, + "isModel" : false, + "isContainer" : false, + "isNotContainer" : true, + "isString" : true, + "isNumeric" : false, + "isInteger" : false, + "isLong" : false, + "isNumber" : false, + "isFloat" : false, + "isDouble" : false, + "isByteArray" : false, + "isBinary" : false, + "isFile" : false, + "isBoolean" : false, + "isDate" : false, + "isDateTime" : false, + "isUuid" : false, + "isEmail" : false, + "isFreeFormObject" : false, + "isListContainer" : false, + "isMapContainer" : false, + "isEnum" : false, + "isReadOnly" : false, + "isWriteOnly" : false, + "isNullable" : false, + "vendorExtensions" : { }, + "hasValidation" : false, + "isInherited" : false, + "nameInCamelCase" : "Tag", + "nameInSnakeCase" : "TAG", + "isXmlAttribute" : false, + "isXmlWrapped" : false, + "datatype" : "string", + "iexclusiveMaximum" : false + } ], + "requiredVars" : [ /* id, name */ ], + "optionalVars" : [ /* tag */ ], + "readOnlyVars" : [ ], + "readWriteVars" : [ /* lists metadata for all three properties */ ], + "allVars" : [ /* lists all properties */], + "parentVars" : [ ], + "mandatory" : [ "id", "name" ], + "allMandatory" : [ "id", "name" ], + "imports" : [ ], + "hasVars" : true, + "emptyVars" : false, + "hasMoreModels" : false, + "hasEnums" : false, + "isEnum" : false, + "hasRequired" : true, + "hasOptional" : true, + "isArrayModel" : false, + "hasChildren" : false, + "isMapModel" : false, + "hasOnlyReadOnly" : false, + "vendorExtensions" : { } + } +} ] +``` + +Templates are passed redundant properties, depending on the semantics of the array. For example: + +* `vars` lists all defined model properties +* `requiredVars` lists all model properties marked with `required` in the spec document +* `optionalVars` lists all model properties _not_ marked with `required` in the spec document +* `readWriteVars` lists all model properties _not_ marked with `readonly` in the spec document +* `readOnlyVars` lists all model properties marked with `readonly` in the spec document +* `allVars` lists all model properties. This may include the same set as `vars`, but may also include generator-defined properties + +We expose the same properties in multiple sets because this allows us to conditionally iterate over properties based on some condition ("is it required" or "is it readonly"). This is driven by the use of the logic-less Mustache templates. It is possible that models passed to the templating engine may be cleaned up as we support more template engines, but such an effort will go through a deprecation phase and would be communicated at runtime through log messages. + +### supportingFiles + +> Inspect supportingFiles passed to templates with system property `-DdebugSupportingFiles` +> +> Execute: +> +> ```bash +> openapi-generator generate -g go \ +> -o out \ +> -i petstore-minimal.yaml \ +> -DdebugSupportingFiles +> ``` +> + + +This is a "catch-all" which gives you the entire structure--operations, model, etc--so you can create "single-file" code from them. + +Supporting files can either be processed through the templating engine or copied as-is. When creating your own templates, you're limited to the files and extensions expected by the generator implementation. For more control over the supporting files produced by a generator, see our [customization](./customization.md) documentation. + +## Variables + +> This is a very limited list of variable name explanations. Feel free to [open a pull request](https://github.com/OpenAPITools/openapi-generator/pull/new/master) to add to this documentation! + +- **complexType**: stores the name of the model (e.g. Pet) +- **isContainer**: true if the parameter or property is an array or a map. +- **isPrimitiveType**: true if the parameter or property type is a primitive type (e.g. string, integer, etc) as defined in the spec. + +## Extensions + +OpenAPI supports a concept called "Extensions". These are called "Specification Extensions" [in 3.x](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#specificationExtensions) and "Vendor Extensions" [in 2.0](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#vendorExtensions). +You'll see them referred to as "Vendor Extensions" in most places in this project. + +Vendor extensions allow you to provide vendor-specific configurations to your specification document. + +For example, suppose you use your specification document for code generation with a (hypothetical) C# OpenAPI generator supporting a desired operationId prefix where the extension is `x-csharp-operationid`, you can define this property alongside the object you'd like to extend (which would be a Path Object in this case). You could then apply additional extensions alongside this property, whether they're for another language or other tooling. + +> Well-defined vendor extensions don't cause conflicts with other tooling. + + + +The following are vendor extensions supported by OpenAPI Generator. The list may not be up-to-date, the best way is to look for "x-" in the built-in mustache templates. + +### ObjC +#### x-objc-operationId + +To customize the method name, you can provide a different name in x-objc-operationId, e.g. +```yaml +summary: Add a new pet to the store +description: '' +operationId: addPet +x-objc-operationId: CreateNewPet +``` + +### Java (Feign) +#### x-accepts + +A single `Accepts` value as the Feign API client needs a single value for `Accepts` header, e.g. +```yaml +consumes: + - application/json + - application/xml +x-accepts: application/json +``` + +### x-content-type + +A single "Content-Type" value as the Feign API client needs a single value for `Content-Type` header, e.g. +```yaml +produces: + - application/xml + - application/json +x-content-type: application/json +``` + +### Rust-server + +#### x-responseId + +Each response may specify a unique `x-responseId`. `rust-server` will use this to name the corresponding enum variant in the code. e.g. + +```yaml +paths: + /ping: + get: + responses: + 200: + description: OK + x-responseId: Pong +``` + +### MySQL Schema + +#### x-mysqlSchema + +MySQL schema generator creates vendor extensions based on openapi `dataType` and `dataFormat`. When user defined extensions with same key already exists codegen accepts those as is. It means it won't validate properties or correct it for you. Every model in `definitions` can contain table related and column related extensions like in example below: + +```yaml +definitions: + Order: + description: This should be most common InnoDB table + type: object + properties: + id: + description: >- + This column should be unsigned BIGINT with AUTO_INCREMENT + type: integer + format: int64 + x-mysqlSchema: + columnDefinition: + colName: id + colDataType: DECIMAL + colDataTypeArguments: + - argumentValue: 16 + isString: false + hasMore: true + - argumentValue: 4 + isString: false + hasMore: false + colUnsigned: true + colNotNull: true + colDefault: + defaultValue: AUTO_INCREMENT + isString: false + isNumeric: false + isKeyword: true + colComment: >- + Column comment. This column should be unsigned BIGINT with AUTO_INCREMENT + x-mysqlSchema: + tableDefinition: + tblName: orders + tblStorageEngine: InnoDB + tblComment: >- + Table comment. This should be most common InnoDB table +``` +> There are properties that are not implemented by now(`tblStorageEngine`), but you can see how generator can be enhanced in future. + + +## Mustache Tips + +Here are a few tips we've found useful for new template authors. +For more details on Mustache see [mustache.5](https://mustache.github.io/mustache.5.html). See also [samskivert/jmustache](https://github.com/samskivert/jmustache) for implementation-specific details. + +### First/Last + +To access the first or last element in a list using Mustache: + +```mustache +{{#vars}}{{#-first}} this is the first element {{.}} {{/-first}}{{/vars}} +{{#vars}}{{#-last}} this is the last element {{.}} {{/-last}}{{/vars}} +``` + +### This + +Mustache evaluates template variables contextually. If the variable isn't found in the immediate object, mustache will search the parent. This is similar to JavaScript's prototype object (if you're familiar with the concept). + +You can inspect this entire context by outputting `{{this}}`. For example: + +```mustache +{{#operations}}{{this}}{{/operations}} +``` + +### Index + +If you'd like a 1-based index in your array traversal, you can use `{{-index}}`: + +```mustache +{{#enums}}{{-index}} {{enum}}{{/enums}} +``` diff --git a/docs/usage.md b/docs/usage.md new file mode 100644 index 000000000000..284ba9e9f344 --- /dev/null +++ b/docs/usage.md @@ -0,0 +1,502 @@ +--- +id: usage +title: Usage +--- + +Options for OpenAPI Generator are the same whether you're using the CLI, Maven/Gradle Plugins, or Online generation options. +This page demonstrates navigating the options via CLI. Commands are presented here in a logical progression as a tutorial, but you're welcome to skip directly to the [generate](#generate) command. + +## help + +The `help` option lists all commands available to the CLI. + +```bash +openapi-generator help +usage: openapi-generator-cli [] + +The most commonly used openapi-generator-cli commands are: + config-help Config help for chosen lang + generate Generate code with the specified generator. + help Display help information + list Lists the available generators + meta MetaGenerator. Generator for creating a new template set and configuration for Codegen. The output will be based on the language you specify, and includes default templates to include. + validate Validate specification + version Show version information + +See 'openapi-generator-cli help ' for more information on a specific +command. + +``` + +## list + +The `list` command outputs a formatted list of every available generator. Pass the `-s/--short` option if you would like a CSV output for easy parsing. + +```bash +openapi-generator help list +NAME + openapi-generator-cli list - Lists the available generators + +SYNOPSIS + openapi-generator-cli list [(-s | --short)] + +OPTIONS + -s, --short + shortened output (suitable for scripting) + +``` + +Example: + +```bash +openapi-generator list -s | tr ',' '\n' +``` + +For the full list of generators, refer to the [Generators List](./generators.md). + +## config-help + +The `config-help` option provides details about + +```bash +openapi-generator help config-help +NAME + openapi-generator-cli config-help - Config help for chosen lang + +SYNOPSIS + openapi-generator-cli config-help + [(-f | --format )] + [(-g | --generator-name )] + [--markdown-header] [--named-header] + [(-o | --output )] + +OPTIONS + -f , --format + Write output files in the desired format. Options are 'text' and + 'markdown'. Default is 'text'. + + -g , --generator-name + generator to get config help for + + --markdown-header + When format=markdown, include this option to write out markdown + headers (e.g. for docusaurus). + + --named-header + Header includes the generator name, for clarity in output + + -o , --output + Optionally write help to this location, otherwise default is + standard output + +``` + +The option of note is `-g/--generator-name` (other options are exposed for tooling). + +You may pass any generator name (see [list](#list) command) to `-g`, and options specific to that generator will be displayed. Some generators have _many_ options, while others may have only a few. + +Example: + +```bash +openapi-generator config-help -g go +``` + +Outputs: + +```text +CONFIG OPTIONS + packageName + Go package name (convention: lowercase). (Default: openapi) + + hideGenerationTimestamp + Hides the generation timestamp when files are generated. (Default: true) + + packageVersion + Go package version. (Default: 1.0.0) + + withGoCodegenComment + whether to include Go codegen comment to disable Go Lint and collapse by default GitHub in PRs and diffs (Default: 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) (Default: false) + + prependFormOrBodyParameters + Add form or body parameters to the beginning of the parameter list. (Default: false) +``` + +To pass these go client generator-specific options to the `generate` command for a go client, use the `--additional-properties` option. See the [generate](#generate) command section for an example. + +## meta + +The `meta` command creates a new Java class and template files, used for creating your own custom templates. + +```bash +openapi-generator help meta +NAME + openapi-generator-cli meta - MetaGenerator. Generator for creating a new + template set and configuration for Codegen. The output will be based on + the language you specify, and includes default templates to include. + +SYNOPSIS + openapi-generator-cli meta [(-n | --name )] + [(-o | --output )] + [(-p | --package )] [(-t | --type )] + +OPTIONS + -n , --name + the human-readable name of the generator + + -o , --output + where to write the generated files (current dir by default) + + -p , --package + the package to put the main class into (defaults to + org.openapitools.codegen) + + -t , --type + the type of generator that is created +``` + +For an in-depth example of using the `meta` command, see [Customization](./customization.md). + +## validate + +The `validate` command allows you to validate an input specification, optionally providing recommendations for error fixes or other improvements (if available). + +```bash +openapi-generator help validate +NAME + openapi-generator-cli validate - Validate specification + +SYNOPSIS + openapi-generator-cli validate + (-i | --input-spec ) [--recommend] + +OPTIONS + -i , --input-spec + location of the OpenAPI spec, as URL or file (required) + + --recommend + +``` + +Valid Spec Example (using [petstore-v3.0.yaml](https://raw.githubusercontent.com/OpenAPITools/openapi-generator/master/modules/openapi-generator-gradle-plugin/samples/local-spec/petstore-v3.0.yaml)) +```bash +openapi-generator validate -i petstore-v3.0.yaml +``` +```text +Validating spec (petstore-v3.0.yaml) +No validation issues detected. +``` + +Invalid Spec Example (using [petstore-v3.0-invalid.yaml](https://raw.githubusercontent.com/OpenAPITools/openapi-generator/master/modules/openapi-generator-gradle-plugin/samples/local-spec/petstore-v3.0-invalid.yaml)): + +```bash +openapi-generator validate -i petstore-v3.0-invalid.yaml +``` +```text +Validating spec (petstore-v3.0-invalid.yaml) +Errors: + -attribute info is missing + +[error] Spec has 1 errors. +``` + +## completion + +Although not documented in the `help` output, the CLI offers a `completion` command, which can be used for auto-completion. + +This command takes one or more parameters representing the args list you would otherwise pass to `openapi-generator`. For example: + +```bash +openapi-generator completion config-help +--named-header +-o +--output +-g +--generator-name +-l +--lang +``` + +An example bash completion script can be found in the repo at [scripts/openapi-generator-cli-completion.bash](https://github.com/OpenAPITools/openapi-generator/blob/master/scripts/openapi-generator-cli-completion.bash). + +## generate + +The `generate` command is the workhorse of the generator toolset. As such, it has _many_ more options and the previous commands. The options are abbreviated below, but you may expand the full descriptions. + + +```bash +openapi-generator help generate +NAME + openapi-generator-cli generate - Generate code with the specified + generator. + +SYNOPSIS + openapi-generator-cli generate + [(-a | --auth )] + [--additional-properties ...] + [--api-package ] [--artifact-id ] + [--artifact-version ] + [(-c | --config )] + [-D ...] [--enable-post-process-file] + [(-g | --generator-name )] + [--git-repo-id ] [--git-user-id ] + [--group-id ] [--http-user-agent ] + (-i | --input-spec ) + [--ignore-file-override ] + [--import-mappings ...] + [--instantiation-types ...] + [--invoker-package ] + [--language-specific-primitives ...] + [--library ] [--log-to-stderr] + [--model-name-prefix ] + [--model-name-suffix ] + [--model-package ] + [(-o | --output )] + [--release-note ] [--remove-operation-id-prefix] + [--reserved-words-mappings ...] + [(-s | --skip-overwrite)] [--skip-validate-spec] + [(-t