mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-12-09 16:56:09 +00:00
Compare commits
64 Commits
remove-dot
...
v4.0.0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3744273312 | ||
|
|
dc0c24b955 | ||
|
|
25392b9fd9 | ||
|
|
305f78c52b | ||
|
|
9d3c1f2262 | ||
|
|
001854171e | ||
|
|
92b994496c | ||
|
|
0994ec3909 | ||
|
|
a91130d6b4 | ||
|
|
ef26ce68d4 | ||
|
|
9323cad06b | ||
|
|
98afbe062b | ||
|
|
48314905da | ||
|
|
757fcfeac6 | ||
|
|
8e91b8c62a | ||
|
|
70108b753e | ||
|
|
0ef579363d | ||
|
|
99e352af46 | ||
|
|
6d1a91e3c1 | ||
|
|
21b8160d00 | ||
|
|
f2b1f770f8 | ||
|
|
ee43cc1520 | ||
|
|
7eb2be9c99 | ||
|
|
f0346aeeb2 | ||
|
|
a4f2e15bb7 | ||
|
|
31734c2717 | ||
|
|
16f94e7e62 | ||
|
|
97e4270c0b | ||
|
|
4fa284ed5d | ||
|
|
909d454f9d | ||
|
|
5e92ec1b4c | ||
|
|
6283625478 | ||
|
|
632364e290 | ||
|
|
e34e85427b | ||
|
|
b186883217 | ||
|
|
6e1c8976fc | ||
|
|
26d0487a2f | ||
|
|
e8a83dfe1f | ||
|
|
3c8d820e3a | ||
|
|
9009538944 | ||
|
|
d0f537c0e7 | ||
|
|
a02cb19d31 | ||
|
|
c33547e0f1 | ||
|
|
f2f12b9e04 | ||
|
|
92eacdfda9 | ||
|
|
9c89e6af25 | ||
|
|
250e5284cd | ||
|
|
9dcab9de6b | ||
|
|
6b94aba8a1 | ||
|
|
73d9d2d641 | ||
|
|
561c1e0646 | ||
|
|
a2fb88c1c1 | ||
|
|
e71eb3020c | ||
|
|
814d5b3cc2 | ||
|
|
bd0d6af968 | ||
|
|
d373cde1df | ||
|
|
d112eea088 | ||
|
|
1c16d9a9e8 | ||
|
|
bd775a992c | ||
|
|
4b414d81d4 | ||
|
|
006cfa35e6 | ||
|
|
f9d04c9c23 | ||
|
|
1fddb69960 | ||
|
|
05053f5b8a |
2
.github/PULL_REQUEST_TEMPLATE.md
vendored
2
.github/PULL_REQUEST_TEMPLATE.md
vendored
@@ -1,7 +1,7 @@
|
||||
### PR checklist
|
||||
|
||||
- [ ] Read the [contribution guidelines](https://github.com/openapitools/openapi-generator/blob/master/CONTRIBUTING.md).
|
||||
- [ ] Ran the shell script under `./bin/` to update Petstore sample so that CIs can verify the change. (For instance, only need to run `./bin/{LANG}-petstore.sh`, `./bin/openapi3/{LANG}-petstore.sh` if updating the {LANG} (e.g. php, ruby, python, etc) code generator or {LANG} client's mustache templates). Windows batch files can be found in `.\bin\windows\`.
|
||||
- [ ] Ran the shell script under `./bin/` to update Petstore sample so that CIs can verify the change. (For instance, only need to run `./bin/{LANG}-petstore.sh`, `./bin/openapi3/{LANG}-petstore.sh` if updating the {LANG} (e.g. php, ruby, python, etc) code generator or {LANG} client's mustache templates). Windows batch files can be found in `.\bin\windows\`. If contributing template-only or documentation-only changes which will change sample output, be sure to [build the project](https://github.com/OpenAPITools/openapi-generator#14---build-projects) first.
|
||||
- [ ] Filed the PR against the [correct branch](https://github.com/OpenAPITools/openapi-generator/wiki/Git-Branches): `master`~~, `3.4.x`, `4.0.x`~~. Default: `master`.
|
||||
- [ ] Copied the [technical committee](https://github.com/openapitools/openapi-generator/#62---openapi-generator-technical-committee) to review the pull request if your PR is targeting a particular programming language.
|
||||
|
||||
|
||||
6
.gitignore
vendored
6
.gitignore
vendored
@@ -39,7 +39,9 @@ packages/
|
||||
|
||||
/target
|
||||
/generated-files
|
||||
test-output/
|
||||
nbactions.xml
|
||||
test-output/
|
||||
|
||||
# website
|
||||
website/build/
|
||||
@@ -173,12 +175,14 @@ samples/client/petstore/typescript-angular/tsd-debug.log
|
||||
# aspnetcore
|
||||
samples/server/petstore/aspnetcore/.vs/
|
||||
effective.pom
|
||||
|
||||
# kotlin
|
||||
samples/client/petstore/kotlin/src/main/kotlin/test/
|
||||
samples/client/petstore/kotlin-threetenbp/build
|
||||
samples/client/petstore/kotlin-string/build
|
||||
samples/server/petstore/kotlin-server/ktor/build
|
||||
samples/openapi3/client/petstore/kotlin/build
|
||||
samples/server/petstore/kotlin-server/ktor/build
|
||||
samples/server/petstore/kotlin-springboot/build
|
||||
\?
|
||||
|
||||
# haskell
|
||||
|
||||
10
.travis.yml
10
.travis.yml
@@ -3,6 +3,10 @@ language: java
|
||||
jdk:
|
||||
- openjdk8
|
||||
|
||||
# See https://docs.travis-ci.com/user/languages/java/#caching
|
||||
before_cache:
|
||||
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
|
||||
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/
|
||||
cache:
|
||||
directories:
|
||||
- $HOME/.m2
|
||||
@@ -121,8 +125,9 @@ script:
|
||||
# fail if generators contain tab '\t'
|
||||
- /bin/bash ./bin/utils/detect_tab_in_java_class.sh
|
||||
# run integration tests defined in maven pom.xml
|
||||
- ./run-in-docker.sh mvn --quiet --batch-mode clean install
|
||||
- mvn --quiet --batch-mode verify -Psamples
|
||||
# WARN: Travis will timeout after 10 minutes of no stdout/stderr activity, which is problematic with mvn --quiet.
|
||||
- mvn --quiet --batch-mode --show-version clean install
|
||||
- mvn --quiet --batch-mode --show-version verify -Psamples
|
||||
after_success:
|
||||
# push to maven repo
|
||||
- if [ $SONATYPE_USERNAME ] && [ -z $TRAVIS_TAG ] && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
|
||||
@@ -162,3 +167,4 @@ after_success:
|
||||
|
||||
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
|
||||
|
||||
|
||||
@@ -18,6 +18,13 @@ elif [ "$NODE_INDEX" = "2" ]; then
|
||||
if [[ $project_version == *"-SNAPSHOT" ]]; then
|
||||
echo "Running node $NODE_INDEX to test ensure-up-to-date"
|
||||
java -version
|
||||
|
||||
# install elm-format for formatting elm code
|
||||
npm install -g elm-format
|
||||
|
||||
# symlink elm-format
|
||||
sudo ln -s /opt/circleci/.nvm/versions/node/v12.1.0/bin/elm-format /usr/local/bin/elm-format
|
||||
|
||||
./bin/utils/ensure-up-to-date
|
||||
fi
|
||||
#elif [ "$NODE_INDEX" = "3" ]; then
|
||||
|
||||
7
CI/run-in-docker-settings.xml
Normal file
7
CI/run-in-docker-settings.xml
Normal file
@@ -0,0 +1,7 @@
|
||||
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
|
||||
https://maven.apache.org/xsd/settings-1.0.0.xsd">
|
||||
<!-- This directory matches what is defined in run-in-docker.sh -->
|
||||
<localRepository>/var/maven/.m2/repository</localRepository>
|
||||
</settings>
|
||||
29
README.md
29
README.md
@@ -40,15 +40,15 @@ If you find OpenAPI Generator useful for work, please consider asking your compa
|
||||
#### Thank you to our bronze sponsors!
|
||||
|
||||
[](https://www.namsor.com/?utm_source=openapi_generator&utm_medium=github_webpage&utm_campaign=sponsor)
|
||||
|
||||
[](https://www.lightbow.net/?utm_source=openapi_generator&utm_medium=github_webpage&utm_campaign=sponsor)
|
||||
|
||||
## Overview
|
||||
OpenAPI Generator allows generation of API client libraries (SDK generation), server stubs, documentation and configuration automatically given an [OpenAPI Spec](https://github.com/OAI/OpenAPI-Specification) (both 2.0 and 3.0 are supported). Currently, the following languages/frameworks are supported:
|
||||
|
||||
| | Languages/Frameworks |
|
||||
|-|-|
|
||||
**API clients** | **ActionScript**, **Ada**, **Apex**, **Bash**, **C**, **C#** (.net 2.0, 3.5 or later), **C++** (cpprest, Qt5, Tizen), **Clojure**, **Dart (1.x, 2.x)**, **Elixir**, **Elm**, **Eiffel**, **Erlang**, **Go**, **Groovy**, **Haskell** (http-client, Servant), **Java** (Jersey1.x, Jersey2.x, OkHttp, Retrofit1.x, Retrofit2.x, Feign, RestTemplate, RESTEasy, Vertx, Google API Client Library for Java, Rest-assured, Spring 5 Web Client), **Kotlin**, **Lua**, **Node.js** (ES5, ES6, AngularJS with Google Closure Compiler annotations, Flow types) **Objective-C**, **Perl**, **PHP**, **PowerShell**, **Python**, **R**, **Ruby**, **Rust** (rust, rust-server), **Scala** (akka, http4s, scalaz, swagger-async-httpclient), **Swift** (2.x, 3.x, 4.x), **Typescript** (AngularJS, Angular (2.x - 7.x), Aurelia, Axios, Fetch, Inversify, jQuery, Node, Rxjs)
|
||||
**Server stubs** | **Ada**, **C#** (ASP.NET Core, NancyFx), **C++** (Pistache, Restbed), **Erlang**, **Go** (net/http, Gin), **Haskell** (Servant), **Java** (MSF4J, Spring, Undertow, JAX-RS: CDI, CXF, Inflector, RestEasy, Play Framework, [PKMST](https://github.com/ProKarma-Inc/pkmst-getting-started-examples)), **Kotlin** (Spring Boot, Ktor), **PHP** (Laravel, Lumen, Slim, Silex, [Symfony](https://symfony.com/), [Zend Expressive](https://github.com/zendframework/zend-expressive)), **Python** (Flask), **NodeJS**, **Ruby** (Sinatra, Rails5), **Rust** (rust-server), **Scala** ([Finch](https://github.com/finagle/finch), [Lagom](https://github.com/lagom/lagom), [Play](https://www.playframework.com/), Scalatra)
|
||||
**API clients** | **ActionScript**, **Ada**, **Apex**, **Bash**, **C**, **C#** (.net 2.0, 3.5 or later), **C++** (cpp-restsdk, Qt5, Tizen), **Clojure**, **Dart (1.x, 2.x)**, **Elixir**, **Elm**, **Eiffel**, **Erlang**, **Go**, **Groovy**, **Haskell** (http-client, Servant), **Java** (Jersey1.x, Jersey2.x, OkHttp, Retrofit1.x, Retrofit2.x, Feign, RestTemplate, RESTEasy, Vertx, Google API Client Library for Java, Rest-assured, Spring 5 Web Client), **Kotlin**, **Lua**, **Node.js** (ES5, ES6, AngularJS with Google Closure Compiler annotations, Flow types) **Objective-C**, **Perl**, **PHP**, **PowerShell**, **Python**, **R**, **Ruby**, **Rust** (rust, rust-server), **Scala** (akka, http4s, scalaz, swagger-async-httpclient), **Swift** (2.x, 3.x, 4.x), **Typescript** (AngularJS, Angular (2.x - 7.x), Aurelia, Axios, Fetch, Inversify, jQuery, Node, Rxjs)
|
||||
**Server stubs** | **Ada**, **C#** (ASP.NET Core, NancyFx), **C++** (Pistache, Restbed, Qt5 QHTTPEngine), **Erlang**, **F#** (Giraffe), **Go** (net/http, Gin), **Haskell** (Servant), **Java** (MSF4J, Spring, Undertow, JAX-RS: CDI, CXF, Inflector, RestEasy, Play Framework, [PKMST](https://github.com/ProKarma-Inc/pkmst-getting-started-examples)), **Kotlin** (Spring Boot, Ktor), **PHP** (Laravel, Lumen, Slim, Silex, [Symfony](https://symfony.com/), [Zend Expressive](https://github.com/zendframework/zend-expressive)), **Python** (Flask), **NodeJS**, **Ruby** (Sinatra, Rails5), **Rust** (rust-server), **Scala** ([Finch](https://github.com/finagle/finch), [Lagom](https://github.com/lagom/lagom), [Play](https://www.playframework.com/), Scalatra)
|
||||
**API documentation generators** | **HTML**, **Confluence Wiki**
|
||||
**Configuration files** | [**Apache2**](https://httpd.apache.org/)
|
||||
**Others** | **GraphQL**, **JMeter**, **MySQL Schema**
|
||||
@@ -88,8 +88,7 @@ The OpenAPI Specification has undergone 3 revisions since initial creation in 20
|
||||
|
||||
OpenAPI Generator Version | Release Date | Notes
|
||||
---------------------------- | ------------ | -----
|
||||
4.0.0 (upcoming release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/4.0.0-SNAPSHOT/)| 20.12.2018 | Major release with breaking changes (with or without fallback)
|
||||
[3.3.4](https://github.com/OpenAPITools/openapi-generator/releases/tag/v3.3.4) (latest stable release) | 30.11.2018 | Bugfix release
|
||||
[4.0.0](https://github.com/OpenAPITools/openapi-generator/releases/tag/v4.0.0) (latest stable release) | 13.05.2019 | Major release with breaking changes (with or without fallback)
|
||||
|
||||
OpenAPI Spec compatibility: 1.0, 1.1, 1.2, 2.0, 3.0
|
||||
|
||||
@@ -145,16 +144,16 @@ See the different versions of the [openapi-generator-cli](https://mvnrepository.
|
||||
|
||||
If you're looking for the latest stable version, you can grab it directly from Maven.org (Java 8 runtime at a minimum):
|
||||
|
||||
JAR location: `http://central.maven.org/maven2/org/openapitools/openapi-generator-cli/3.3.4/openapi-generator-cli-3.3.4.jar`
|
||||
JAR location: `http://central.maven.org/maven2/org/openapitools/openapi-generator-cli/4.0.0/openapi-generator-cli-4.0.0.jar`
|
||||
|
||||
For **Mac/Linux** users:
|
||||
```sh
|
||||
wget http://central.maven.org/maven2/org/openapitools/openapi-generator-cli/3.3.4/openapi-generator-cli-3.3.4.jar -O openapi-generator-cli.jar
|
||||
wget http://central.maven.org/maven2/org/openapitools/openapi-generator-cli/4.0.0/openapi-generator-cli-4.0.0.jar -O openapi-generator-cli.jar
|
||||
```
|
||||
|
||||
For **Windows** users, you will need to install [wget](http://gnuwin32.sourceforge.net/packages/wget.htm) or you can use Invoke-WebRequest in PowerShell (3.0+), e.g.
|
||||
```
|
||||
Invoke-WebRequest -OutFile openapi-generator-cli.jar http://central.maven.org/maven2/org/openapitools/openapi-generator-cli/3.3.4/openapi-generator-cli-3.3.4.jar
|
||||
Invoke-WebRequest -OutFile openapi-generator-cli.jar http://central.maven.org/maven2/org/openapitools/openapi-generator-cli/4.0.0/openapi-generator-cli-4.0.0.jar
|
||||
```
|
||||
|
||||
After downloading the JAR, run `java -jar openapi-generator-cli.jar help` to show the usage.
|
||||
@@ -214,7 +213,7 @@ To build from source, you need the following installed and available in your `$P
|
||||
|
||||
* [Java 8](http://java.oracle.com)
|
||||
|
||||
* [Apache maven 3.3.4 or greater](http://maven.apache.org/)
|
||||
* [Apache Maven 3.3.4 or greater](http://maven.apache.org/)
|
||||
|
||||
After cloning the project, you can build it from source with this command:
|
||||
```sh
|
||||
@@ -357,10 +356,10 @@ npm install @openapitools/openapi-generator-cli -g
|
||||
openapi-generator version
|
||||
```
|
||||
|
||||
Or install a particualar OpenAPI Generator version (e.g. v3.3.4):
|
||||
Or install a particualar OpenAPI Generator version (e.g. v4.0.0):
|
||||
|
||||
```sh
|
||||
npm install @openapitools/openapi-generator-cli@cli-3.3.4 -g
|
||||
npm install @openapitools/openapi-generator-cli@cli-4.0.0 -g
|
||||
```
|
||||
|
||||
Or install it as dev-dependency:
|
||||
@@ -383,7 +382,7 @@ java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar generat
|
||||
```
|
||||
(if you're on Windows, replace the last command with `java -jar modules\openapi-generator-cli\target\openapi-generator-cli.jar generate -i https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g php -o c:\temp\php_api_client`)
|
||||
|
||||
You can also download the JAR (latest release) directly from [maven.org](http://central.maven.org/maven2/org/openapitools/openapi-generator-cli/3.3.4/openapi-generator-cli-3.3.4.jar)
|
||||
You can also download the JAR (latest release) directly from [maven.org](http://central.maven.org/maven2/org/openapitools/openapi-generator-cli/4.0.0/openapi-generator-cli-4.0.0.jar)
|
||||
|
||||
To get a list of **general** options available, please run `java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar help generate`
|
||||
|
||||
@@ -447,6 +446,7 @@ SYNOPSIS
|
||||
[--remove-operation-id-prefix]
|
||||
[--reserved-words-mappings <reserved word mappings>...]
|
||||
[(-s | --skip-overwrite)] [--skip-validate-spec]
|
||||
[--strict-spec <true/false strict behavior>]
|
||||
[(-t <template directory> | --template-dir <template directory>)]
|
||||
[--type-mappings <type mappings>...] [(-v | --verbose)]
|
||||
|
||||
@@ -519,6 +519,7 @@ Here are some companies/projects (alphabetical order) using OpenAPI Generator in
|
||||
- [BIMData.io](https://bimdata.io)
|
||||
- [Bithost GmbH](https://www.bithost.ch)
|
||||
- [Boxever](https://www.boxever.com/)
|
||||
- [CAM](https://www.cam-inc.co.jp/)
|
||||
- [Camptocamp](https://www.camptocamp.com/en)
|
||||
- [codecentric AG](https://www.codecentric.de/)
|
||||
- [Cupix](https://www.cupix.com/)
|
||||
@@ -596,7 +597,6 @@ OpenAPI Generator core team members are contributors who have been making signif
|
||||
Here is a list of template creators:
|
||||
* API Clients:
|
||||
* Ada: @stcarrez
|
||||
* Akka-Scala: @cchafer
|
||||
* Apex: @asnelling
|
||||
* Bash: @bkryza
|
||||
* C: @PowerOfCreation @zhemant [:heart:](https://www.patreon.com/zhemant)
|
||||
@@ -642,6 +642,7 @@ Here is a list of template creators:
|
||||
* Rust: @farcaller
|
||||
* Rust (rust-server): @metaswitch
|
||||
* Scala (scalaz & http4s): @tbrown1979
|
||||
* Scala (Akka): @cchafer
|
||||
* Swift: @tkqubo
|
||||
* Swift 3: @hexelon
|
||||
* Swift 4: @ehyche
|
||||
@@ -662,6 +663,7 @@ Here is a list of template creators:
|
||||
* C++ Pistache: @sebymiano
|
||||
* C++ Restbed: @stkrwork
|
||||
* Erlang Server: @galaxie
|
||||
* F# (Giraffe) Server: @nmfisher
|
||||
* Go Server: @guohuang
|
||||
* Go (Gin) Server: @kemokemo
|
||||
* GraphQL Express Server: @renepardon
|
||||
@@ -744,6 +746,7 @@ If you want to join the committee, please kindly apply by sending an email to te
|
||||
| Elixir | @mrmstn (2018/12) |
|
||||
| Elm | @eriktim (2018/09) |
|
||||
| Erlang | @tsloughter (2017/11) @jfacorro (2018/10) @robertoaloi (2018/10) |
|
||||
| F# | @nmfisher (2019/05) |
|
||||
| Go | @antihax (2017/11) @bvwells (2017/12) @grokify (2018/07) @kemokemo (2018/09 |
|
||||
| GraphQL | @renepardon (2018/12) |
|
||||
| Groovy | |
|
||||
|
||||
@@ -27,6 +27,6 @@ fi
|
||||
|
||||
# if you've executed sbt assembly previously it will use that instead.
|
||||
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
|
||||
ags="generate -g aspnetcore -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -o samples/server/petstore/aspnetcore --additional-properties packageGuid={3C799344-F285-4669-8FD5-7ED9B795D5C5} $@"
|
||||
ags="generate -g aspnetcore -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -t modules/openapi-generator/src/main/resources/aspnetcore/2.1/ -o samples/server/petstore/aspnetcore --additional-properties packageGuid={3C799344-F285-4669-8FD5-7ED9B795D5C5} $@"
|
||||
|
||||
java $JAVA_OPTS -jar $executable $ags
|
||||
|
||||
@@ -25,8 +25,11 @@ then
|
||||
mvn -B clean package
|
||||
fi
|
||||
|
||||
# auto format elm code using elm-format
|
||||
export ELM_POST_PROCESS_FILE="/usr/local/bin/elm-format --elm-version=0.18 --yes"
|
||||
|
||||
# if you've executed sbt assembly previously it will use that instead.
|
||||
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
|
||||
ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g elm -t modules/openapi-generator/src/main/resources/elm -o samples/client/petstore/elm-0.18 --additional-properties elmVersion=0.18 $@"
|
||||
ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g elm -t modules/openapi-generator/src/main/resources/elm -o samples/client/petstore/elm-0.18 --additional-properties elmVersion=0.18 --enable-post-process-file $@"
|
||||
|
||||
java $JAVA_OPTS -jar $executable $ags
|
||||
|
||||
@@ -25,8 +25,11 @@ then
|
||||
mvn -B clean package
|
||||
fi
|
||||
|
||||
# auto format elm code using elm-format
|
||||
export ELM_POST_PROCESS_FILE="/usr/local/bin/elm-format --elm-version=0.19 --yes"
|
||||
|
||||
# if you've executed sbt assembly previously it will use that instead.
|
||||
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
|
||||
ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g elm -t modules/openapi-generator/src/main/resources/elm -o samples/client/petstore/elm $@"
|
||||
ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g elm -t modules/openapi-generator/src/main/resources/elm -o samples/client/petstore/elm --enable-post-process-file $@"
|
||||
|
||||
java $JAVA_OPTS -jar $executable $ags
|
||||
|
||||
32
bin/fsharp-giraffe-server-petstore.sh
Executable file
32
bin/fsharp-giraffe-server-petstore.sh
Executable file
@@ -0,0 +1,32 @@
|
||||
#!/bin/sh
|
||||
|
||||
SCRIPT="$0"
|
||||
echo "# START SCRIPT: $SCRIPT"
|
||||
|
||||
while [ -h "$SCRIPT" ] ; do
|
||||
ls=`ls -ld "$SCRIPT"`
|
||||
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||
if expr "$link" : '/.*' > /dev/null; then
|
||||
SCRIPT="$link"
|
||||
else
|
||||
SCRIPT=`dirname "$SCRIPT"`/"$link"
|
||||
fi
|
||||
done
|
||||
|
||||
if [ ! -d "${APP_DIR}" ]; then
|
||||
APP_DIR=`dirname "$SCRIPT"`/..
|
||||
APP_DIR=`cd "${APP_DIR}"; pwd`
|
||||
fi
|
||||
|
||||
executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar"
|
||||
|
||||
if [ ! -f "$executable" ]
|
||||
then
|
||||
mvn clean package
|
||||
fi
|
||||
|
||||
# if you've executed sbt assembly previously it will use that instead.
|
||||
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
|
||||
ags="generate -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -t modules/openapi-generator/src/main/resources/fsharp-giraffe-server -g fsharp-giraffe-server -o samples/server/petstore/fsharp-giraffe $@"
|
||||
|
||||
java ${JAVA_OPTS} -jar ${executable} ${ags}
|
||||
@@ -27,5 +27,5 @@ fi
|
||||
|
||||
# if you've executed sbt assembly previously it will use that instead.
|
||||
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
|
||||
ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g groovy -o samples/client/petstore/groovy -DhideGenerationTimestamp=true $@"
|
||||
ags="generate -t modules/openapi-generator/src/main/resources/Groovy/ -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g groovy -o samples/client/petstore/groovy -DhideGenerationTimestamp=true $@"
|
||||
java $JAVA_OPTS -jar $executable $ags
|
||||
|
||||
@@ -27,6 +27,6 @@ fi
|
||||
|
||||
# if you've executed sbt assembly previously it will use that instead.
|
||||
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
|
||||
ags="generate --artifact-id "scala-akka-petstore-client" -t modules/openapi-generator/src/main/resources/scala-akka-client -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g akka-scala -o samples/client/petstore/scala-akka $@"
|
||||
ags="generate --artifact-id "scala-akka-petstore-client" -t modules/openapi-generator/src/main/resources/scala-akka-client -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g scala-akka -o samples/client/petstore/scala-akka $@"
|
||||
|
||||
java $JAVA_OPTS -jar $executable $ags
|
||||
|
||||
@@ -27,6 +27,6 @@ fi
|
||||
|
||||
# if you've executed sbt assembly previously it will use that instead.
|
||||
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
|
||||
ags="generate -t modules/openapi-generator/src/main/resources/scala-httpclient -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g scala -o samples/client/petstore/scala-httpclient $@"
|
||||
ags="generate -t modules/openapi-generator/src/main/resources/scala-httpclient -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g scala-httpclient-deprecated -o samples/client/petstore/scala-httpclient $@"
|
||||
|
||||
java $JAVA_OPTS -jar $executable $ags
|
||||
|
||||
@@ -52,6 +52,8 @@ declare -a scripts=(
|
||||
"./bin/elixir-petstore.sh"
|
||||
"./bin/go-petstore.sh"
|
||||
"./bin/go-gin-petstore-server.sh"
|
||||
"./bin/groovy-petstore.sh"
|
||||
#"./bin/elm-petstore-all.sh"
|
||||
"./bin/meta-codegen.sh"
|
||||
# OTHERS
|
||||
"./bin/utils/export_docs_generators.sh"
|
||||
|
||||
10
bin/windows/fsharp-giraffe-server-petstore.bat
Normal file
10
bin/windows/fsharp-giraffe-server-petstore.bat
Normal file
@@ -0,0 +1,10 @@
|
||||
set executable=.\modules\openapi-generator-cli\target\openapi-generator-cli.jar
|
||||
|
||||
If Not Exist %executable% (
|
||||
mvn clean package
|
||||
)
|
||||
|
||||
REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -DloggerPath=conf/log4j.properties
|
||||
set ags=generate --artifact-id "fsharp-giraffe-petstore-server" -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g fsharp-giraffe-server -o samples\server\petstore\fsharp-giraffe
|
||||
|
||||
java %JAVA_OPTS% -jar %executable% %ags%
|
||||
@@ -16,7 +16,7 @@ The following generators are available:
|
||||
- [cpp-restsdk](generators/cpp-restsdk.md)
|
||||
- [cpp-tizen](generators/cpp-tizen.md)
|
||||
- [csharp](generators/csharp.md)
|
||||
- [csharp-dotnet2](generators/csharp-dotnet2.md)
|
||||
- [csharp-dotnet2](generators/csharp-dotnet2.md) (deprecated)
|
||||
- [csharp-netcore](generators/csharp-netcore.md)
|
||||
- [dart](generators/dart.md)
|
||||
- [dart-jaguar](generators/dart-jaguar.md)
|
||||
@@ -47,10 +47,10 @@ The following generators are available:
|
||||
- [rust](generators/rust.md)
|
||||
- [scala-akka](generators/scala-akka.md)
|
||||
- [scala-gatling](generators/scala-gatling.md)
|
||||
- [scala-httpclient-deprecated](generators/scala-httpclient-deprecated.md)
|
||||
- [scala-httpclient-deprecated](generators/scala-httpclient-deprecated.md) (deprecated)
|
||||
- [scalaz](generators/scalaz.md)
|
||||
- [swift2-deprecated](generators/swift2-deprecated.md)
|
||||
- [swift3-deprecated](generators/swift3-deprecated.md)
|
||||
- [swift2-deprecated](generators/swift2-deprecated.md) (deprecated)
|
||||
- [swift3-deprecated](generators/swift3-deprecated.md) (deprecated)
|
||||
- [swift4](generators/swift4.md)
|
||||
- [typescript-angular](generators/typescript-angular.md)
|
||||
- [typescript-angularjs](generators/typescript-angularjs.md)
|
||||
@@ -71,6 +71,7 @@ The following generators are available:
|
||||
- [cpp-restbed-server](generators/cpp-restbed-server.md)
|
||||
- [csharp-nancyfx](generators/csharp-nancyfx.md)
|
||||
- [erlang-server](generators/erlang-server.md)
|
||||
- [fsharp-giraffe-server](generators/fsharp-giraffe-server.md)
|
||||
- [go-gin-server](generators/go-gin-server.md)
|
||||
- [go-server](generators/go-server.md)
|
||||
- [graphql-nodejs-express-server](generators/graphql-nodejs-express-server.md)
|
||||
|
||||
@@ -28,6 +28,6 @@ sidebar_label: aspnetcore
|
||||
|operationModifier|Operation Modifier can be virtual, abstract or partial| |virtual|
|
||||
|buildTarget|Target to build an application or library| |program|
|
||||
|generateBody|Generates method body.| |true|
|
||||
|operationIsAsync|Set methods to async or sync.| |false|
|
||||
|operationIsAsync|Set methods to async or sync (default).| |false|
|
||||
|operationResultTask|Set methods result to Task<>.| |false|
|
||||
|modelClassModifier|Model Class Modifier can be nothing or partial| |partial|
|
||||
|
||||
@@ -19,5 +19,5 @@ sidebar_label: cwiki
|
||||
|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|
|
||||
|artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |null|
|
||||
|artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |null|
|
||||
|
||||
@@ -13,5 +13,5 @@ sidebar_label: dynamic-html
|
||||
|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|
|
||||
|artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |null|
|
||||
|artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |null|
|
||||
|
||||
25
docs/generators/fsharp-giraffe-server.md
Normal file
25
docs/generators/fsharp-giraffe-server.md
Normal file
@@ -0,0 +1,25 @@
|
||||
|
||||
---
|
||||
id: generator-opts-server-fsharp-giraffe-server
|
||||
title: Config Options for fsharp-giraffe-server
|
||||
sidebar_label: fsharp-giraffe-server
|
||||
---
|
||||
|
||||
| Option | Description | Values | Default |
|
||||
| ------ | ----------- | ------ | ------- |
|
||||
|licenseUrl|The URL of the license| |http://localhost|
|
||||
|licenseName|The name of the license| |NoLicense|
|
||||
|packageCopyright|Specifies an AssemblyCopyright for the .NET Framework global assembly attributes stored in the AssemblyInfo file.| |No Copyright|
|
||||
|packageAuthors|Specifies Authors property in the .NET Core project file.| |OpenAPI|
|
||||
|packageTitle|Specifies an AssemblyTitle for the .NET Framework global assembly attributes stored in the AssemblyInfo file.| |OpenAPI Library|
|
||||
|packageName|F# module name (convention: Title.Case).| |OpenAPI|
|
||||
|packageVersion|F# package version.| |1.0.0|
|
||||
|packageGuid|The GUID that will be associated with the C# project| |null|
|
||||
|sourceFolder|source folder for generated code| |OpenAPI/src|
|
||||
|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true|
|
||||
|useDateTimeOffset|Use DateTimeOffset to model date-time properties| |false|
|
||||
|useCollection|Deserialize array types to Collection<T> instead of List<T>.| |false|
|
||||
|returnICollection|Return ICollection<T> instead of the concrete type.| |false|
|
||||
|useSwashbuckle|Uses the Swashbuckle.AspNetCore NuGet package for documentation.| |false|
|
||||
|generateBody|Generates method body.| |true|
|
||||
|buildTarget|Target the build for a program or library.| |program|
|
||||
25
docs/generators/fsharp-giraffe.md
Normal file
25
docs/generators/fsharp-giraffe.md
Normal file
@@ -0,0 +1,25 @@
|
||||
|
||||
---
|
||||
id: generator-opts-server-fsharp-giraffe
|
||||
title: Config Options for fsharp-giraffe
|
||||
sidebar_label: fsharp-giraffe
|
||||
---
|
||||
|
||||
| Option | Description | Values | Default |
|
||||
| ------ | ----------- | ------ | ------- |
|
||||
|licenseUrl|The URL of the license| |http://localhost|
|
||||
|licenseName|The name of the license| |NoLicense|
|
||||
|packageCopyright|Specifies an AssemblyCopyright for the .NET Framework global assembly attributes stored in the AssemblyInfo file.| |No Copyright|
|
||||
|packageAuthors|Specifies Authors property in the .NET Core project file.| |OpenAPI|
|
||||
|packageTitle|Specifies an AssemblyTitle for the .NET Framework global assembly attributes stored in the AssemblyInfo file.| |OpenAPI Library|
|
||||
|packageName|F# module name (convention: Title.Case).| |OpenAPI|
|
||||
|packageVersion|F# package version.| |1.0.0|
|
||||
|packageGuid|The GUID that will be associated with the C# project| |null|
|
||||
|sourceFolder|source folder for generated code| |OpenAPI/src|
|
||||
|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true|
|
||||
|useDateTimeOffset|Use DateTimeOffset to model date-time properties| |false|
|
||||
|useCollection|Deserialize array types to Collection<T> instead of List<T>.| |false|
|
||||
|returnICollection|Return ICollection<T> instead of the concrete type.| |false|
|
||||
|useSwashbuckle|Uses the Swashbuckle.AspNetCore NuGet package for documentation.| |false|
|
||||
|generateBody|Generates method body.| |true|
|
||||
|buildTarget|Target the build for a program or library.| |program|
|
||||
@@ -11,35 +11,34 @@ sidebar_label: groovy
|
||||
|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|
|
||||
|modelPackage|package for generated models| |org.openapitools.model|
|
||||
|apiPackage|package for generated api classes| |org.openapitools.api|
|
||||
|invokerPackage|root package for generated code| |org.openapitools.api|
|
||||
|groupId|groupId in generated pom.xml| |org.openapitools|
|
||||
|artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |openapi-groovy|
|
||||
|artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |1.0.0|
|
||||
|artifactUrl|artifact URL in generated pom.xml| |https://github.com/openapitools/openapi-generator|
|
||||
|artifactDescription|artifact description in generated pom.xml| |OpenAPI Java|
|
||||
|scmConnection|SCM connection in generated pom.xml| |scm:git:git@github.com:openapitools/openapi-generator.git|
|
||||
|scmDeveloperConnection|SCM developer connection in generated pom.xml| |scm:git:git@github.com:openapitools/openapi-generator.git|
|
||||
|scmUrl|SCM URL in generated pom.xml| |https://github.com/openapitools/openapi-generator|
|
||||
|developerName|developer name in generated pom.xml| |OpenAPI-Generator Contributors|
|
||||
|developerEmail|developer email in generated pom.xml| |team@openapitools.org|
|
||||
|developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org|
|
||||
|developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org|
|
||||
|licenseName|The name of the license| |Unlicense|
|
||||
|licenseUrl|The URL of the license| |http://unlicense.org|
|
||||
|sourceFolder|source folder for generated code| |src/main/groovy|
|
||||
|serializableModel|boolean - toggle "implements Serializable" for generated models| |false|
|
||||
|bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false|
|
||||
|fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false|
|
||||
|hideGenerationTimestamp|hides the timestamp when files were generated| |null|
|
||||
|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false|
|
||||
|withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false|
|
||||
|dateLibrary|Option. Date library to use|<dl><dt>**joda**</dt><dd>Joda (for legacy app only)</dd><dt>**legacy**</dt><dd>Legacy java.util.Date (if you really have a good reason not to use threetenbp</dd><dt>**java8-localdatetime**</dt><dd>Java 8 using LocalDateTime (for legacy app only)</dd><dt>**java8**</dt><dd>Java 8 native JSR310 (preferred for jdk 1.8+) - note: this also sets "java8" to true</dd><dt>**threetenbp**</dt><dd>Backport of JSR310 (preferred for jdk < 1.8)</dd><dl>|null|
|
||||
|java8|Option. Use Java8 classes instead of third party equivalents|<dl><dt>**true**</dt><dd>Use Java 8 classes such as Base64</dd><dt>**false**</dt><dd>Various third party libraries as needed</dd><dl>|null|
|
||||
|dateLibrary|Option. Date library to use|<dl><dt>**joda**</dt><dd>Joda (for legacy app only)</dd><dt>**legacy**</dt><dd>Legacy java.util.Date (if you really have a good reason not to use threetenbp</dd><dt>**java8-localdatetime**</dt><dd>Java 8 using LocalDateTime (for legacy app only)</dd><dt>**java8**</dt><dd>Java 8 native JSR310 (preferred for jdk 1.8+) - note: this also sets "java8" to true</dd><dt>**threetenbp**</dt><dd>Backport of JSR310 (preferred for jdk < 1.8)</dd><dl>|legacy|
|
||||
|java8|Option. Use Java8 classes instead of third party equivalents|<dl><dt>**true**</dt><dd>Use Java 8 classes such as Base64</dd><dt>**false**</dt><dd>Various third party libraries as needed</dd><dl>|false|
|
||||
|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|
|
||||
|booleanGetterPrefix|Set booleanGetterPrefix| |get|
|
||||
|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|
||||
|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|
||||
|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|
||||
|snapshotVersion|Uses a SNAPSHOT version.| |null|
|
||||
|configPackage|configuration package for generated code| |null|
|
||||
|snapshotVersion|Uses a SNAPSHOT version.|<dl><dt>**true**</dt><dd>Use a SnapShot Version</dd><dt>**false**</dt><dd>Use a Release Version</dd><dl>|null|
|
||||
|
||||
@@ -19,5 +19,5 @@ sidebar_label: html
|
||||
|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|
|
||||
|artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |null|
|
||||
|artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |null|
|
||||
|
||||
@@ -23,5 +23,5 @@ sidebar_label: html2
|
||||
|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|
|
||||
|artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |null|
|
||||
|artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |null|
|
||||
|
||||
@@ -11,34 +11,34 @@ sidebar_label: java-inflector
|
||||
|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|
|
||||
|modelPackage|package for generated models| |org.openapitools.model|
|
||||
|apiPackage|package for generated api classes| |org.openapitools.controllers|
|
||||
|invokerPackage|root package for generated code| |org.openapitools.controllers|
|
||||
|groupId|groupId in generated pom.xml| |org.openapitools|
|
||||
|artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |openapi-inflector-server|
|
||||
|artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |1.0.0|
|
||||
|artifactUrl|artifact URL in generated pom.xml| |https://github.com/openapitools/openapi-generator|
|
||||
|artifactDescription|artifact description in generated pom.xml| |OpenAPI Java|
|
||||
|scmConnection|SCM connection in generated pom.xml| |scm:git:git@github.com:openapitools/openapi-generator.git|
|
||||
|scmDeveloperConnection|SCM developer connection in generated pom.xml| |scm:git:git@github.com:openapitools/openapi-generator.git|
|
||||
|scmUrl|SCM URL in generated pom.xml| |https://github.com/openapitools/openapi-generator|
|
||||
|developerName|developer name in generated pom.xml| |OpenAPI-Generator Contributors|
|
||||
|developerEmail|developer email in generated pom.xml| |team@openapitools.org|
|
||||
|developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org|
|
||||
|developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org|
|
||||
|licenseName|The name of the license| |Unlicense|
|
||||
|licenseUrl|The URL of the license| |http://unlicense.org|
|
||||
|sourceFolder|source folder for generated code| |src/gen/java|
|
||||
|serializableModel|boolean - toggle "implements Serializable" for generated models| |false|
|
||||
|bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false|
|
||||
|fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false|
|
||||
|hideGenerationTimestamp|hides the timestamp when files were generated| |null|
|
||||
|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false|
|
||||
|withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false|
|
||||
|dateLibrary|Option. Date library to use|<dl><dt>**joda**</dt><dd>Joda (for legacy app only)</dd><dt>**legacy**</dt><dd>Legacy java.util.Date (if you really have a good reason not to use threetenbp</dd><dt>**java8-localdatetime**</dt><dd>Java 8 using LocalDateTime (for legacy app only)</dd><dt>**java8**</dt><dd>Java 8 native JSR310 (preferred for jdk 1.8+) - note: this also sets "java8" to true</dd><dt>**threetenbp**</dt><dd>Backport of JSR310 (preferred for jdk < 1.8)</dd><dl>|null|
|
||||
|java8|Option. Use Java8 classes instead of third party equivalents|<dl><dt>**true**</dt><dd>Use Java 8 classes such as Base64</dd><dt>**false**</dt><dd>Various third party libraries as needed</dd><dl>|null|
|
||||
|dateLibrary|Option. Date library to use|<dl><dt>**joda**</dt><dd>Joda (for legacy app only)</dd><dt>**legacy**</dt><dd>Legacy java.util.Date (if you really have a good reason not to use threetenbp</dd><dt>**java8-localdatetime**</dt><dd>Java 8 using LocalDateTime (for legacy app only)</dd><dt>**java8**</dt><dd>Java 8 native JSR310 (preferred for jdk 1.8+) - note: this also sets "java8" to true</dd><dt>**threetenbp**</dt><dd>Backport of JSR310 (preferred for jdk < 1.8)</dd><dl>|legacy|
|
||||
|java8|Option. Use Java8 classes instead of third party equivalents|<dl><dt>**true**</dt><dd>Use Java 8 classes such as Base64</dd><dt>**false**</dt><dd>Various third party libraries as needed</dd><dl>|false|
|
||||
|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|
|
||||
|booleanGetterPrefix|Set booleanGetterPrefix| |get|
|
||||
|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|
||||
|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|
||||
|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|
||||
|snapshotVersion|Uses a SNAPSHOT version.| |null|
|
||||
|snapshotVersion|Uses a SNAPSHOT version.|<dl><dt>**true**</dt><dd>Use a SnapShot Version</dd><dt>**false**</dt><dd>Use a Release Version</dd><dl>|null|
|
||||
|
||||
@@ -11,39 +11,39 @@ sidebar_label: java-msf4j
|
||||
|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|
|
||||
|modelPackage|package for generated models| |org.openapitools.model|
|
||||
|apiPackage|package for generated api classes| |org.openapitools.api|
|
||||
|invokerPackage|root package for generated code| |org.openapitools.api|
|
||||
|groupId|groupId in generated pom.xml| |org.openapitools|
|
||||
|artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |openapi-jaxrs-server|
|
||||
|artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |1.0.0|
|
||||
|artifactUrl|artifact URL in generated pom.xml| |https://github.com/openapitools/openapi-generator|
|
||||
|artifactDescription|artifact description in generated pom.xml| |OpenAPI Java|
|
||||
|scmConnection|SCM connection in generated pom.xml| |scm:git:git@github.com:openapitools/openapi-generator.git|
|
||||
|scmDeveloperConnection|SCM developer connection in generated pom.xml| |scm:git:git@github.com:openapitools/openapi-generator.git|
|
||||
|scmUrl|SCM URL in generated pom.xml| |https://github.com/openapitools/openapi-generator|
|
||||
|developerName|developer name in generated pom.xml| |OpenAPI-Generator Contributors|
|
||||
|developerEmail|developer email in generated pom.xml| |team@openapitools.org|
|
||||
|developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org|
|
||||
|developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org|
|
||||
|licenseName|The name of the license| |Unlicense|
|
||||
|licenseUrl|The URL of the license| |http://unlicense.org|
|
||||
|sourceFolder|source folder for generated code| |src/main/java|
|
||||
|serializableModel|boolean - toggle "implements Serializable" for generated models| |false|
|
||||
|bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false|
|
||||
|fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false|
|
||||
|hideGenerationTimestamp|hides the timestamp when files were generated| |null|
|
||||
|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false|
|
||||
|withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false|
|
||||
|dateLibrary|Option. Date library to use|<dl><dt>**joda**</dt><dd>Joda (for legacy app only)</dd><dt>**legacy**</dt><dd>Legacy java.util.Date (if you really have a good reason not to use threetenbp</dd><dt>**java8-localdatetime**</dt><dd>Java 8 using LocalDateTime (for legacy app only)</dd><dt>**java8**</dt><dd>Java 8 native JSR310 (preferred for jdk 1.8+) - note: this also sets "java8" to true</dd><dt>**threetenbp**</dt><dd>Backport of JSR310 (preferred for jdk < 1.8)</dd><dl>|null|
|
||||
|java8|Option. Use Java8 classes instead of third party equivalents|<dl><dt>**true**</dt><dd>Use Java 8 classes such as Base64</dd><dt>**false**</dt><dd>Various third party libraries as needed</dd><dl>|null|
|
||||
|dateLibrary|Option. Date library to use|<dl><dt>**joda**</dt><dd>Joda (for legacy app only)</dd><dt>**legacy**</dt><dd>Legacy java.util.Date (if you really have a good reason not to use threetenbp</dd><dt>**java8-localdatetime**</dt><dd>Java 8 using LocalDateTime (for legacy app only)</dd><dt>**java8**</dt><dd>Java 8 native JSR310 (preferred for jdk 1.8+) - note: this also sets "java8" to true</dd><dt>**threetenbp**</dt><dd>Backport of JSR310 (preferred for jdk < 1.8)</dd><dl>|legacy|
|
||||
|java8|Option. Use Java8 classes instead of third party equivalents|<dl><dt>**true**</dt><dd>Use Java 8 classes such as Base64</dd><dt>**false**</dt><dd>Various third party libraries as needed</dd><dl>|false|
|
||||
|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|
|
||||
|booleanGetterPrefix|Set booleanGetterPrefix| |get|
|
||||
|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|
||||
|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|
||||
|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|
||||
|snapshotVersion|Uses a SNAPSHOT version.| |null|
|
||||
|implFolder|folder for generated implementation code| |null|
|
||||
|title|a title describing the application| |null|
|
||||
|snapshotVersion|Uses a SNAPSHOT version.|<dl><dt>**true**</dt><dd>Use a SnapShot Version</dd><dt>**false**</dt><dd>Use a Release Version</dd><dl>|null|
|
||||
|implFolder|folder for generated implementation code| |src/main/java|
|
||||
|title|a title describing the application| |OpenAPI Server|
|
||||
|useBeanValidation|Use BeanValidation API annotations| |true|
|
||||
|serverPort|The port on which the server should be started| |null|
|
||||
|library|library template (sub-template) to use|<dl><dt>**jersey1**</dt><dd>Jersey core 1.x</dd><dt>**jersey2**</dt><dd>Jersey core 2.x</dd><dl>|jersey2|
|
||||
|serverPort|The port on which the server should be started| |8080|
|
||||
|library|library template (sub-template)|<dl><dt>**jersey1**</dt><dd>Jersey core 1.x</dd><dt>**jersey2**</dt><dd>Jersey core 2.x</dd><dl>|jersey2|
|
||||
|
||||
@@ -11,40 +11,37 @@ sidebar_label: java-pkmst
|
||||
|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|
|
||||
|modelPackage|package for generated models| |com.prokarma.pkmst.model|
|
||||
|apiPackage|package for generated api classes| |com.prokarma.pkmst.controller|
|
||||
|invokerPackage|root package for generated code| |com.prokarma.pkmst.controller|
|
||||
|groupId|groupId in generated pom.xml| |com.prokarma|
|
||||
|artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |pkmst-microservice|
|
||||
|artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |1.0.0|
|
||||
|artifactUrl|artifact URL in generated pom.xml| |https://github.com/openapitools/openapi-generator|
|
||||
|artifactDescription|artifact description in generated pom.xml| |OpenAPI Java|
|
||||
|scmConnection|SCM connection in generated pom.xml| |scm:git:git@github.com:openapitools/openapi-generator.git|
|
||||
|scmDeveloperConnection|SCM developer connection in generated pom.xml| |scm:git:git@github.com:openapitools/openapi-generator.git|
|
||||
|scmUrl|SCM URL in generated pom.xml| |https://github.com/openapitools/openapi-generator|
|
||||
|developerName|developer name in generated pom.xml| |OpenAPI-Generator Contributors|
|
||||
|developerEmail|developer email in generated pom.xml| |team@openapitools.org|
|
||||
|developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org|
|
||||
|developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org|
|
||||
|licenseName|The name of the license| |Unlicense|
|
||||
|licenseUrl|The URL of the license| |http://unlicense.org|
|
||||
|sourceFolder|source folder for generated code| |src/main/java|
|
||||
|serializableModel|boolean - toggle "implements Serializable" for generated models| |false|
|
||||
|bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false|
|
||||
|fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false|
|
||||
|hideGenerationTimestamp|hides the timestamp when files were generated| |null|
|
||||
|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false|
|
||||
|withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false|
|
||||
|dateLibrary|Option. Date library to use|<dl><dt>**joda**</dt><dd>Joda (for legacy app only)</dd><dt>**legacy**</dt><dd>Legacy java.util.Date (if you really have a good reason not to use threetenbp</dd><dt>**java8-localdatetime**</dt><dd>Java 8 using LocalDateTime (for legacy app only)</dd><dt>**java8**</dt><dd>Java 8 native JSR310 (preferred for jdk 1.8+) - note: this also sets "java8" to true</dd><dt>**threetenbp**</dt><dd>Backport of JSR310 (preferred for jdk < 1.8)</dd><dl>|null|
|
||||
|java8|Option. Use Java8 classes instead of third party equivalents|<dl><dt>**true**</dt><dd>Use Java 8 classes such as Base64</dd><dt>**false**</dt><dd>Various third party libraries as needed</dd><dl>|null|
|
||||
|dateLibrary|Option. Date library to use|<dl><dt>**joda**</dt><dd>Joda (for legacy app only)</dd><dt>**legacy**</dt><dd>Legacy java.util.Date (if you really have a good reason not to use threetenbp</dd><dt>**java8-localdatetime**</dt><dd>Java 8 using LocalDateTime (for legacy app only)</dd><dt>**java8**</dt><dd>Java 8 native JSR310 (preferred for jdk 1.8+) - note: this also sets "java8" to true</dd><dt>**threetenbp**</dt><dd>Backport of JSR310 (preferred for jdk < 1.8)</dd><dl>|threetenbp|
|
||||
|java8|Option. Use Java8 classes instead of third party equivalents|<dl><dt>**true**</dt><dd>Use Java 8 classes such as Base64</dd><dt>**false**</dt><dd>Various third party libraries as needed</dd><dl>|false|
|
||||
|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|
|
||||
|booleanGetterPrefix|Set booleanGetterPrefix| |get|
|
||||
|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|
||||
|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|
||||
|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|
||||
|snapshotVersion|Uses a SNAPSHOT version.| |null|
|
||||
|groupId|groupId in generated pom.xml| |null|
|
||||
|artifactId|artifactId in generated pom.xml| |null|
|
||||
|artifactVersion|artifact version in generated pom.xml| |null|
|
||||
|snapshotVersion|Uses a SNAPSHOT version.|<dl><dt>**true**</dt><dd>Use a SnapShot Version</dd><dt>**false**</dt><dd>Use a Release Version</dd><dl>|null|
|
||||
|basePackage|base package for java source code| |null|
|
||||
|serviceName|Service Name| |null|
|
||||
|title|server title name or client service name| |null|
|
||||
|
||||
@@ -11,40 +11,40 @@ sidebar_label: java-play-framework
|
||||
|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|
|
||||
|modelPackage|package for generated models| |apimodels|
|
||||
|apiPackage|package for generated api classes| |controllers|
|
||||
|invokerPackage|root package for generated code| |org.openapitools.api|
|
||||
|groupId|groupId in generated pom.xml| |org.openapitools|
|
||||
|artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |openapi-java-playframework|
|
||||
|artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |1.0.0|
|
||||
|artifactUrl|artifact URL in generated pom.xml| |https://github.com/openapitools/openapi-generator|
|
||||
|artifactDescription|artifact description in generated pom.xml| |OpenAPI Java|
|
||||
|scmConnection|SCM connection in generated pom.xml| |scm:git:git@github.com:openapitools/openapi-generator.git|
|
||||
|scmDeveloperConnection|SCM developer connection in generated pom.xml| |scm:git:git@github.com:openapitools/openapi-generator.git|
|
||||
|scmUrl|SCM URL in generated pom.xml| |https://github.com/openapitools/openapi-generator|
|
||||
|developerName|developer name in generated pom.xml| |OpenAPI-Generator Contributors|
|
||||
|developerEmail|developer email in generated pom.xml| |team@openapitools.org|
|
||||
|developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org|
|
||||
|developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org|
|
||||
|licenseName|The name of the license| |Unlicense|
|
||||
|licenseUrl|The URL of the license| |http://unlicense.org|
|
||||
|sourceFolder|source folder for generated code| |/app|
|
||||
|serializableModel|boolean - toggle "implements Serializable" for generated models| |false|
|
||||
|bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false|
|
||||
|fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false|
|
||||
|hideGenerationTimestamp|hides the timestamp when files were generated| |null|
|
||||
|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false|
|
||||
|withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false|
|
||||
|dateLibrary|Option. Date library to use|<dl><dt>**joda**</dt><dd>Joda (for legacy app only)</dd><dt>**legacy**</dt><dd>Legacy java.util.Date (if you really have a good reason not to use threetenbp</dd><dt>**java8-localdatetime**</dt><dd>Java 8 using LocalDateTime (for legacy app only)</dd><dt>**java8**</dt><dd>Java 8 native JSR310 (preferred for jdk 1.8+) - note: this also sets "java8" to true</dd><dt>**threetenbp**</dt><dd>Backport of JSR310 (preferred for jdk < 1.8)</dd><dl>|null|
|
||||
|java8|Option. Use Java8 classes instead of third party equivalents|<dl><dt>**true**</dt><dd>Use Java 8 classes such as Base64</dd><dt>**false**</dt><dd>Various third party libraries as needed</dd><dl>|null|
|
||||
|dateLibrary|Option. Date library to use|<dl><dt>**joda**</dt><dd>Joda (for legacy app only)</dd><dt>**legacy**</dt><dd>Legacy java.util.Date (if you really have a good reason not to use threetenbp</dd><dt>**java8-localdatetime**</dt><dd>Java 8 using LocalDateTime (for legacy app only)</dd><dt>**java8**</dt><dd>Java 8 native JSR310 (preferred for jdk 1.8+) - note: this also sets "java8" to true</dd><dt>**threetenbp**</dt><dd>Backport of JSR310 (preferred for jdk < 1.8)</dd><dl>|threetenbp|
|
||||
|java8|Option. Use Java8 classes instead of third party equivalents|<dl><dt>**true**</dt><dd>Use Java 8 classes such as Base64</dd><dt>**false**</dt><dd>Various third party libraries as needed</dd><dl>|false|
|
||||
|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|
|
||||
|booleanGetterPrefix|Set booleanGetterPrefix| |get|
|
||||
|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|
||||
|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|
||||
|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|
||||
|snapshotVersion|Uses a SNAPSHOT version.| |null|
|
||||
|title|server title name or client service name| |null|
|
||||
|configPackage|configuration package for generated code| |null|
|
||||
|basePackage|base package for generated code| |null|
|
||||
|snapshotVersion|Uses a SNAPSHOT version.|<dl><dt>**true**</dt><dd>Use a SnapShot Version</dd><dt>**false**</dt><dd>Use a Release Version</dd><dl>|null|
|
||||
|title|server title name or client service name| |openapi-java-playframework|
|
||||
|configPackage|configuration package for generated code| |org.openapitools.configuration|
|
||||
|basePackage|base package for generated code| |org.openapitools|
|
||||
|controllerOnly|Whether to generate only API interface stubs without the server files.| |false|
|
||||
|useBeanValidation|Use BeanValidation API annotations| |true|
|
||||
|useInterfaces|Makes the controllerImp implements an interface to facilitate automatic completion when updating from version x to y of your spec| |true|
|
||||
|
||||
@@ -13,32 +13,32 @@ sidebar_label: java-undertow-server
|
||||
|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|
|
||||
|invokerPackage|root package for generated code| |org.openapitools.handler|
|
||||
|groupId|groupId in generated pom.xml| |org.openapitools|
|
||||
|artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |openapi-undertow-server|
|
||||
|artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |1.0.0|
|
||||
|artifactUrl|artifact URL in generated pom.xml| |https://github.com/openapitools/openapi-generator|
|
||||
|artifactDescription|artifact description in generated pom.xml| |OpenAPI Java|
|
||||
|scmConnection|SCM connection in generated pom.xml| |scm:git:git@github.com:openapitools/openapi-generator.git|
|
||||
|scmDeveloperConnection|SCM developer connection in generated pom.xml| |scm:git:git@github.com:openapitools/openapi-generator.git|
|
||||
|scmUrl|SCM URL in generated pom.xml| |https://github.com/openapitools/openapi-generator|
|
||||
|developerName|developer name in generated pom.xml| |OpenAPI-Generator Contributors|
|
||||
|developerEmail|developer email in generated pom.xml| |team@openapitools.org|
|
||||
|developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org|
|
||||
|developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org|
|
||||
|licenseName|The name of the license| |Unlicense|
|
||||
|licenseUrl|The URL of the license| |http://unlicense.org|
|
||||
|sourceFolder|source folder for generated code| |src/main/java|
|
||||
|serializableModel|boolean - toggle "implements Serializable" for generated models| |false|
|
||||
|bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false|
|
||||
|fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false|
|
||||
|hideGenerationTimestamp|hides the timestamp when files were generated| |null|
|
||||
|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false|
|
||||
|withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false|
|
||||
|dateLibrary|Option. Date library to use|<dl><dt>**joda**</dt><dd>Joda (for legacy app only)</dd><dt>**legacy**</dt><dd>Legacy java.util.Date (if you really have a good reason not to use threetenbp</dd><dt>**java8-localdatetime**</dt><dd>Java 8 using LocalDateTime (for legacy app only)</dd><dt>**java8**</dt><dd>Java 8 native JSR310 (preferred for jdk 1.8+) - note: this also sets "java8" to true</dd><dt>**threetenbp**</dt><dd>Backport of JSR310 (preferred for jdk < 1.8)</dd><dl>|null|
|
||||
|java8|Option. Use Java8 classes instead of third party equivalents|<dl><dt>**true**</dt><dd>Use Java 8 classes such as Base64</dd><dt>**false**</dt><dd>Various third party libraries as needed</dd><dl>|null|
|
||||
|dateLibrary|Option. Date library to use|<dl><dt>**joda**</dt><dd>Joda (for legacy app only)</dd><dt>**legacy**</dt><dd>Legacy java.util.Date (if you really have a good reason not to use threetenbp</dd><dt>**java8-localdatetime**</dt><dd>Java 8 using LocalDateTime (for legacy app only)</dd><dt>**java8**</dt><dd>Java 8 native JSR310 (preferred for jdk 1.8+) - note: this also sets "java8" to true</dd><dt>**threetenbp**</dt><dd>Backport of JSR310 (preferred for jdk < 1.8)</dd><dl>|legacy|
|
||||
|java8|Option. Use Java8 classes instead of third party equivalents|<dl><dt>**true**</dt><dd>Use Java 8 classes such as Base64</dd><dt>**false**</dt><dd>Various third party libraries as needed</dd><dl>|false|
|
||||
|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|
|
||||
|booleanGetterPrefix|Set booleanGetterPrefix| |get|
|
||||
|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|
||||
|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|
||||
|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|
||||
|snapshotVersion|Uses a SNAPSHOT version.| |null|
|
||||
|snapshotVersion|Uses a SNAPSHOT version.|<dl><dt>**true**</dt><dd>Use a SnapShot Version</dd><dt>**false**</dt><dd>Use a Release Version</dd><dl>|null|
|
||||
|
||||
@@ -11,36 +11,36 @@ sidebar_label: java-vertx
|
||||
|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|
|
||||
|modelPackage|package for generated models| |org.openapitools.server.api.model|
|
||||
|apiPackage|package for generated api classes| |org.openapitools.server.api.verticle|
|
||||
|invokerPackage|root package for generated code| |org.openapitools|
|
||||
|groupId|groupId in generated pom.xml| |org.openapitools|
|
||||
|artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |openapi-java-vertx-server|
|
||||
|artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |1.0.0-SNAPSHOT|
|
||||
|artifactUrl|artifact URL in generated pom.xml| |https://github.com/openapitools/openapi-generator|
|
||||
|artifactDescription|artifact description in generated pom.xml| |OpenAPI Java|
|
||||
|scmConnection|SCM connection in generated pom.xml| |scm:git:git@github.com:openapitools/openapi-generator.git|
|
||||
|scmDeveloperConnection|SCM developer connection in generated pom.xml| |scm:git:git@github.com:openapitools/openapi-generator.git|
|
||||
|scmUrl|SCM URL in generated pom.xml| |https://github.com/openapitools/openapi-generator|
|
||||
|developerName|developer name in generated pom.xml| |OpenAPI-Generator Contributors|
|
||||
|developerEmail|developer email in generated pom.xml| |team@openapitools.org|
|
||||
|developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org|
|
||||
|developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org|
|
||||
|licenseName|The name of the license| |Unlicense|
|
||||
|licenseUrl|The URL of the license| |http://unlicense.org|
|
||||
|sourceFolder|source folder for generated code| |src/main/java|
|
||||
|serializableModel|boolean - toggle "implements Serializable" for generated models| |false|
|
||||
|bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false|
|
||||
|fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false|
|
||||
|hideGenerationTimestamp|hides the timestamp when files were generated| |null|
|
||||
|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false|
|
||||
|withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false|
|
||||
|dateLibrary|Option. Date library to use|<dl><dt>**joda**</dt><dd>Joda (for legacy app only)</dd><dt>**legacy**</dt><dd>Legacy java.util.Date (if you really have a good reason not to use threetenbp</dd><dt>**java8-localdatetime**</dt><dd>Java 8 using LocalDateTime (for legacy app only)</dd><dt>**java8**</dt><dd>Java 8 native JSR310 (preferred for jdk 1.8+) - note: this also sets "java8" to true</dd><dt>**threetenbp**</dt><dd>Backport of JSR310 (preferred for jdk < 1.8)</dd><dl>|null|
|
||||
|java8|Option. Use Java8 classes instead of third party equivalents|<dl><dt>**true**</dt><dd>Use Java 8 classes such as Base64</dd><dt>**false**</dt><dd>Various third party libraries as needed</dd><dl>|null|
|
||||
|dateLibrary|Option. Date library to use|<dl><dt>**joda**</dt><dd>Joda (for legacy app only)</dd><dt>**legacy**</dt><dd>Legacy java.util.Date (if you really have a good reason not to use threetenbp</dd><dt>**java8-localdatetime**</dt><dd>Java 8 using LocalDateTime (for legacy app only)</dd><dt>**java8**</dt><dd>Java 8 native JSR310 (preferred for jdk 1.8+) - note: this also sets "java8" to true</dd><dt>**threetenbp**</dt><dd>Backport of JSR310 (preferred for jdk < 1.8)</dd><dl>|java8|
|
||||
|java8|Option. Use Java8 classes instead of third party equivalents|<dl><dt>**true**</dt><dd>Use Java 8 classes such as Base64</dd><dt>**false**</dt><dd>Various third party libraries as needed</dd><dl>|false|
|
||||
|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|
|
||||
|booleanGetterPrefix|Set booleanGetterPrefix| |get|
|
||||
|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|
||||
|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|
||||
|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|
||||
|snapshotVersion|Uses a SNAPSHOT version.| |null|
|
||||
|snapshotVersion|Uses a SNAPSHOT version.|<dl><dt>**true**</dt><dd>Use a SnapShot Version</dd><dt>**false**</dt><dd>Use a Release Version</dd><dl>|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|
|
||||
|
||||
@@ -11,37 +11,37 @@ sidebar_label: java
|
||||
|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|
|
||||
|modelPackage|package for generated models| |org.openapitools.client.model|
|
||||
|apiPackage|package for generated api classes| |org.openapitools.client.api|
|
||||
|invokerPackage|root package for generated code| |org.openapitools.client|
|
||||
|groupId|groupId in generated pom.xml| |org.openapitools|
|
||||
|artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |openapi-java-client|
|
||||
|artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |1.0.0|
|
||||
|artifactUrl|artifact URL in generated pom.xml| |https://github.com/openapitools/openapi-generator|
|
||||
|artifactDescription|artifact description in generated pom.xml| |OpenAPI Java|
|
||||
|scmConnection|SCM connection in generated pom.xml| |scm:git:git@github.com:openapitools/openapi-generator.git|
|
||||
|scmDeveloperConnection|SCM developer connection in generated pom.xml| |scm:git:git@github.com:openapitools/openapi-generator.git|
|
||||
|scmUrl|SCM URL in generated pom.xml| |https://github.com/openapitools/openapi-generator|
|
||||
|developerName|developer name in generated pom.xml| |OpenAPI-Generator Contributors|
|
||||
|developerEmail|developer email in generated pom.xml| |team@openapitools.org|
|
||||
|developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org|
|
||||
|developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org|
|
||||
|licenseName|The name of the license| |Unlicense|
|
||||
|licenseUrl|The URL of the license| |http://unlicense.org|
|
||||
|sourceFolder|source folder for generated code| |src/main/java|
|
||||
|serializableModel|boolean - toggle "implements Serializable" for generated models| |false|
|
||||
|bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false|
|
||||
|fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false|
|
||||
|hideGenerationTimestamp|hides the timestamp when files were generated| |null|
|
||||
|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false|
|
||||
|withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false|
|
||||
|dateLibrary|Option. Date library to use|<dl><dt>**joda**</dt><dd>Joda (for legacy app only)</dd><dt>**legacy**</dt><dd>Legacy java.util.Date (if you really have a good reason not to use threetenbp</dd><dt>**java8-localdatetime**</dt><dd>Java 8 using LocalDateTime (for legacy app only)</dd><dt>**java8**</dt><dd>Java 8 native JSR310 (preferred for jdk 1.8+) - note: this also sets "java8" to true</dd><dt>**threetenbp**</dt><dd>Backport of JSR310 (preferred for jdk < 1.8)</dd><dl>|null|
|
||||
|java8|Option. Use Java8 classes instead of third party equivalents|<dl><dt>**true**</dt><dd>Use Java 8 classes such as Base64</dd><dt>**false**</dt><dd>Various third party libraries as needed</dd><dl>|null|
|
||||
|dateLibrary|Option. Date library to use|<dl><dt>**joda**</dt><dd>Joda (for legacy app only)</dd><dt>**legacy**</dt><dd>Legacy java.util.Date (if you really have a good reason not to use threetenbp</dd><dt>**java8-localdatetime**</dt><dd>Java 8 using LocalDateTime (for legacy app only)</dd><dt>**java8**</dt><dd>Java 8 native JSR310 (preferred for jdk 1.8+) - note: this also sets "java8" to true</dd><dt>**threetenbp**</dt><dd>Backport of JSR310 (preferred for jdk < 1.8)</dd><dl>|threetenbp|
|
||||
|java8|Option. Use Java8 classes instead of third party equivalents|<dl><dt>**true**</dt><dd>Use Java 8 classes such as Base64</dd><dt>**false**</dt><dd>Various third party libraries as needed</dd><dl>|false|
|
||||
|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|
|
||||
|booleanGetterPrefix|Set booleanGetterPrefix| |get|
|
||||
|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|
||||
|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|
||||
|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|
||||
|snapshotVersion|Uses a SNAPSHOT version.| |null|
|
||||
|snapshotVersion|Uses a SNAPSHOT version.|<dl><dt>**true**</dt><dd>Use a SnapShot Version</dd><dt>**false**</dt><dd>Use a Release Version</dd><dl>|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|
|
||||
|
||||
@@ -11,42 +11,42 @@ sidebar_label: jaxrs-cxf-cdi
|
||||
|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|
|
||||
|modelPackage|package for generated models| |org.openapitools.model|
|
||||
|apiPackage|package for generated api classes| |org.openapitools.api|
|
||||
|invokerPackage|root package for generated code| |org.openapitools.api|
|
||||
|groupId|groupId in generated pom.xml| |org.openapitools|
|
||||
|artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |openapi-jaxrs-cxf-cdi-server|
|
||||
|artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |1.0.0|
|
||||
|artifactUrl|artifact URL in generated pom.xml| |https://github.com/openapitools/openapi-generator|
|
||||
|artifactDescription|artifact description in generated pom.xml| |OpenAPI Java|
|
||||
|scmConnection|SCM connection in generated pom.xml| |scm:git:git@github.com:openapitools/openapi-generator.git|
|
||||
|scmDeveloperConnection|SCM developer connection in generated pom.xml| |scm:git:git@github.com:openapitools/openapi-generator.git|
|
||||
|scmUrl|SCM URL in generated pom.xml| |https://github.com/openapitools/openapi-generator|
|
||||
|developerName|developer name in generated pom.xml| |OpenAPI-Generator Contributors|
|
||||
|developerEmail|developer email in generated pom.xml| |team@openapitools.org|
|
||||
|developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org|
|
||||
|developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org|
|
||||
|licenseName|The name of the license| |Unlicense|
|
||||
|licenseUrl|The URL of the license| |http://unlicense.org|
|
||||
|sourceFolder|source folder for generated code| |src/gen/java|
|
||||
|serializableModel|boolean - toggle "implements Serializable" for generated models| |false|
|
||||
|bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false|
|
||||
|fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false|
|
||||
|hideGenerationTimestamp|hides the timestamp when files were generated| |null|
|
||||
|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false|
|
||||
|withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false|
|
||||
|dateLibrary|Option. Date library to use|<dl><dt>**joda**</dt><dd>Joda (for legacy app only)</dd><dt>**legacy**</dt><dd>Legacy java.util.Date (if you really have a good reason not to use threetenbp</dd><dt>**java8-localdatetime**</dt><dd>Java 8 using LocalDateTime (for legacy app only)</dd><dt>**java8**</dt><dd>Java 8 native JSR310 (preferred for jdk 1.8+) - note: this also sets "java8" to true</dd><dt>**threetenbp**</dt><dd>Backport of JSR310 (preferred for jdk < 1.8)</dd><dl>|null|
|
||||
|java8|Option. Use Java8 classes instead of third party equivalents|<dl><dt>**true**</dt><dd>Use Java 8 classes such as Base64</dd><dt>**false**</dt><dd>Various third party libraries as needed</dd><dl>|null|
|
||||
|dateLibrary|Option. Date library to use|<dl><dt>**joda**</dt><dd>Joda (for legacy app only)</dd><dt>**legacy**</dt><dd>Legacy java.util.Date (if you really have a good reason not to use threetenbp</dd><dt>**java8-localdatetime**</dt><dd>Java 8 using LocalDateTime (for legacy app only)</dd><dt>**java8**</dt><dd>Java 8 native JSR310 (preferred for jdk 1.8+) - note: this also sets "java8" to true</dd><dt>**threetenbp**</dt><dd>Backport of JSR310 (preferred for jdk < 1.8)</dd><dl>|legacy|
|
||||
|java8|Option. Use Java8 classes instead of third party equivalents|<dl><dt>**true**</dt><dd>Use Java 8 classes such as Base64</dd><dt>**false**</dt><dd>Various third party libraries as needed</dd><dl>|false|
|
||||
|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|
|
||||
|booleanGetterPrefix|Set booleanGetterPrefix| |get|
|
||||
|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|
||||
|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|
||||
|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|
||||
|snapshotVersion|Uses a SNAPSHOT version.| |null|
|
||||
|implFolder|folder for generated implementation code| |null|
|
||||
|title|a title describing the application| |null|
|
||||
|snapshotVersion|Uses a SNAPSHOT version.|<dl><dt>**true**</dt><dd>Use a SnapShot Version</dd><dt>**false**</dt><dd>Use a Release Version</dd><dl>|null|
|
||||
|implFolder|folder for generated implementation code| |src/main/java|
|
||||
|title|a title describing the application| |OpenAPI Server|
|
||||
|useBeanValidation|Use BeanValidation API annotations| |true|
|
||||
|serverPort|The port on which the server should be started| |null|
|
||||
|library|library template (sub-template) to use|<dl><dt>**<default>**</dt><dd>JAXRS</dd><dl>|<default>|
|
||||
|serverPort|The port on which the server should be started| |8080|
|
||||
|library|library template (sub-template)|<dl><dt>**<default>**</dt><dd>JAXRS</dd><dl>|<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|
|
||||
|
||||
@@ -11,37 +11,37 @@ sidebar_label: jaxrs-cxf-client
|
||||
|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|
|
||||
|modelPackage|package for generated models| |org.openapitools.model|
|
||||
|apiPackage|package for generated api classes| |org.openapitools.api|
|
||||
|invokerPackage|root package for generated code| |org.openapitools.api|
|
||||
|groupId|groupId in generated pom.xml| |org.openapitools|
|
||||
|artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |openapi-jaxrs-client|
|
||||
|artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |1.0.0|
|
||||
|artifactUrl|artifact URL in generated pom.xml| |https://github.com/openapitools/openapi-generator|
|
||||
|artifactDescription|artifact description in generated pom.xml| |OpenAPI Java|
|
||||
|scmConnection|SCM connection in generated pom.xml| |scm:git:git@github.com:openapitools/openapi-generator.git|
|
||||
|scmDeveloperConnection|SCM developer connection in generated pom.xml| |scm:git:git@github.com:openapitools/openapi-generator.git|
|
||||
|scmUrl|SCM URL in generated pom.xml| |https://github.com/openapitools/openapi-generator|
|
||||
|developerName|developer name in generated pom.xml| |OpenAPI-Generator Contributors|
|
||||
|developerEmail|developer email in generated pom.xml| |team@openapitools.org|
|
||||
|developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org|
|
||||
|developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org|
|
||||
|licenseName|The name of the license| |Unlicense|
|
||||
|licenseUrl|The URL of the license| |http://unlicense.org|
|
||||
|sourceFolder|source folder for generated code| |src/gen/java|
|
||||
|serializableModel|boolean - toggle "implements Serializable" for generated models| |false|
|
||||
|bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false|
|
||||
|fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false|
|
||||
|hideGenerationTimestamp|hides the timestamp when files were generated| |null|
|
||||
|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false|
|
||||
|withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false|
|
||||
|dateLibrary|Option. Date library to use|<dl><dt>**joda**</dt><dd>Joda (for legacy app only)</dd><dt>**legacy**</dt><dd>Legacy java.util.Date (if you really have a good reason not to use threetenbp</dd><dt>**java8-localdatetime**</dt><dd>Java 8 using LocalDateTime (for legacy app only)</dd><dt>**java8**</dt><dd>Java 8 native JSR310 (preferred for jdk 1.8+) - note: this also sets "java8" to true</dd><dt>**threetenbp**</dt><dd>Backport of JSR310 (preferred for jdk < 1.8)</dd><dl>|null|
|
||||
|java8|Option. Use Java8 classes instead of third party equivalents|<dl><dt>**true**</dt><dd>Use Java 8 classes such as Base64</dd><dt>**false**</dt><dd>Various third party libraries as needed</dd><dl>|null|
|
||||
|dateLibrary|Option. Date library to use|<dl><dt>**joda**</dt><dd>Joda (for legacy app only)</dd><dt>**legacy**</dt><dd>Legacy java.util.Date (if you really have a good reason not to use threetenbp</dd><dt>**java8-localdatetime**</dt><dd>Java 8 using LocalDateTime (for legacy app only)</dd><dt>**java8**</dt><dd>Java 8 native JSR310 (preferred for jdk 1.8+) - note: this also sets "java8" to true</dd><dt>**threetenbp**</dt><dd>Backport of JSR310 (preferred for jdk < 1.8)</dd><dl>|legacy|
|
||||
|java8|Option. Use Java8 classes instead of third party equivalents|<dl><dt>**true**</dt><dd>Use Java 8 classes such as Base64</dd><dt>**false**</dt><dd>Various third party libraries as needed</dd><dl>|false|
|
||||
|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|
|
||||
|booleanGetterPrefix|Set booleanGetterPrefix| |get|
|
||||
|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|
||||
|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|
||||
|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|
||||
|snapshotVersion|Uses a SNAPSHOT version.| |null|
|
||||
|snapshotVersion|Uses a SNAPSHOT version.|<dl><dt>**true**</dt><dd>Use a SnapShot Version</dd><dt>**false**</dt><dd>Use a Release Version</dd><dl>|null|
|
||||
|useBeanValidation|Use BeanValidation API annotations| |false|
|
||||
|useGzipFeatureForTests|Use Gzip Feature for tests| |false|
|
||||
|useLoggingFeatureForTests|Use Logging Feature for tests| |false|
|
||||
|
||||
@@ -11,41 +11,41 @@ sidebar_label: jaxrs-cxf-extended
|
||||
|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|
|
||||
|modelPackage|package for generated models| |org.openapitools.model|
|
||||
|apiPackage|package for generated api classes| |org.openapitools.api|
|
||||
|invokerPackage|root package for generated code| |org.openapitools.api|
|
||||
|groupId|groupId in generated pom.xml| |org.openapitools|
|
||||
|artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |openapi-cxf-server|
|
||||
|artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |1.0.0|
|
||||
|artifactUrl|artifact URL in generated pom.xml| |https://github.com/openapitools/openapi-generator|
|
||||
|artifactDescription|artifact description in generated pom.xml| |OpenAPI Java|
|
||||
|scmConnection|SCM connection in generated pom.xml| |scm:git:git@github.com:openapitools/openapi-generator.git|
|
||||
|scmDeveloperConnection|SCM developer connection in generated pom.xml| |scm:git:git@github.com:openapitools/openapi-generator.git|
|
||||
|scmUrl|SCM URL in generated pom.xml| |https://github.com/openapitools/openapi-generator|
|
||||
|developerName|developer name in generated pom.xml| |OpenAPI-Generator Contributors|
|
||||
|developerEmail|developer email in generated pom.xml| |team@openapitools.org|
|
||||
|developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org|
|
||||
|developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org|
|
||||
|licenseName|The name of the license| |Unlicense|
|
||||
|licenseUrl|The URL of the license| |http://unlicense.org|
|
||||
|sourceFolder|source folder for generated code| |src/main/java|
|
||||
|serializableModel|boolean - toggle "implements Serializable" for generated models| |false|
|
||||
|bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false|
|
||||
|fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false|
|
||||
|hideGenerationTimestamp|hides the timestamp when files were generated| |null|
|
||||
|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false|
|
||||
|withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false|
|
||||
|dateLibrary|Option. Date library to use|<dl><dt>**joda**</dt><dd>Joda (for legacy app only)</dd><dt>**legacy**</dt><dd>Legacy java.util.Date (if you really have a good reason not to use threetenbp</dd><dt>**java8-localdatetime**</dt><dd>Java 8 using LocalDateTime (for legacy app only)</dd><dt>**java8**</dt><dd>Java 8 native JSR310 (preferred for jdk 1.8+) - note: this also sets "java8" to true</dd><dt>**threetenbp**</dt><dd>Backport of JSR310 (preferred for jdk < 1.8)</dd><dl>|null|
|
||||
|java8|Option. Use Java8 classes instead of third party equivalents|<dl><dt>**true**</dt><dd>Use Java 8 classes such as Base64</dd><dt>**false**</dt><dd>Various third party libraries as needed</dd><dl>|null|
|
||||
|dateLibrary|Option. Date library to use|<dl><dt>**joda**</dt><dd>Joda (for legacy app only)</dd><dt>**legacy**</dt><dd>Legacy java.util.Date (if you really have a good reason not to use threetenbp</dd><dt>**java8-localdatetime**</dt><dd>Java 8 using LocalDateTime (for legacy app only)</dd><dt>**java8**</dt><dd>Java 8 native JSR310 (preferred for jdk 1.8+) - note: this also sets "java8" to true</dd><dt>**threetenbp**</dt><dd>Backport of JSR310 (preferred for jdk < 1.8)</dd><dl>|legacy|
|
||||
|java8|Option. Use Java8 classes instead of third party equivalents|<dl><dt>**true**</dt><dd>Use Java 8 classes such as Base64</dd><dt>**false**</dt><dd>Various third party libraries as needed</dd><dl>|false|
|
||||
|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|
|
||||
|booleanGetterPrefix|Set booleanGetterPrefix| |get|
|
||||
|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|
||||
|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|
||||
|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|
||||
|snapshotVersion|Uses a SNAPSHOT version.| |null|
|
||||
|implFolder|folder for generated implementation code| |null|
|
||||
|title|a title describing the application| |null|
|
||||
|snapshotVersion|Uses a SNAPSHOT version.|<dl><dt>**true**</dt><dd>Use a SnapShot Version</dd><dt>**false**</dt><dd>Use a Release Version</dd><dl>|null|
|
||||
|implFolder|folder for generated implementation code| |src/main/java|
|
||||
|title|a title describing the application| |OpenAPI Server|
|
||||
|useBeanValidation|Use BeanValidation API annotations| |true|
|
||||
|serverPort|The port on which the server should be started| |null|
|
||||
|serverPort|The port on which the server should be started| |8080|
|
||||
|generateSpringApplication|Generate Spring application| |false|
|
||||
|useSpringAnnotationConfig|Use Spring Annotation Config| |false|
|
||||
|useSwaggerFeature|Use Swagger Feature| |false|
|
||||
|
||||
@@ -11,41 +11,41 @@ sidebar_label: jaxrs-cxf
|
||||
|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|
|
||||
|modelPackage|package for generated models| |org.openapitools.model|
|
||||
|apiPackage|package for generated api classes| |org.openapitools.api|
|
||||
|invokerPackage|root package for generated code| |org.openapitools.api|
|
||||
|groupId|groupId in generated pom.xml| |org.openapitools|
|
||||
|artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |openapi-cxf-server|
|
||||
|artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |1.0.0|
|
||||
|artifactUrl|artifact URL in generated pom.xml| |https://github.com/openapitools/openapi-generator|
|
||||
|artifactDescription|artifact description in generated pom.xml| |OpenAPI Java|
|
||||
|scmConnection|SCM connection in generated pom.xml| |scm:git:git@github.com:openapitools/openapi-generator.git|
|
||||
|scmDeveloperConnection|SCM developer connection in generated pom.xml| |scm:git:git@github.com:openapitools/openapi-generator.git|
|
||||
|scmUrl|SCM URL in generated pom.xml| |https://github.com/openapitools/openapi-generator|
|
||||
|developerName|developer name in generated pom.xml| |OpenAPI-Generator Contributors|
|
||||
|developerEmail|developer email in generated pom.xml| |team@openapitools.org|
|
||||
|developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org|
|
||||
|developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org|
|
||||
|licenseName|The name of the license| |Unlicense|
|
||||
|licenseUrl|The URL of the license| |http://unlicense.org|
|
||||
|sourceFolder|source folder for generated code| |src/main/java|
|
||||
|serializableModel|boolean - toggle "implements Serializable" for generated models| |false|
|
||||
|bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false|
|
||||
|fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false|
|
||||
|hideGenerationTimestamp|hides the timestamp when files were generated| |null|
|
||||
|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false|
|
||||
|withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false|
|
||||
|dateLibrary|Option. Date library to use|<dl><dt>**joda**</dt><dd>Joda (for legacy app only)</dd><dt>**legacy**</dt><dd>Legacy java.util.Date (if you really have a good reason not to use threetenbp</dd><dt>**java8-localdatetime**</dt><dd>Java 8 using LocalDateTime (for legacy app only)</dd><dt>**java8**</dt><dd>Java 8 native JSR310 (preferred for jdk 1.8+) - note: this also sets "java8" to true</dd><dt>**threetenbp**</dt><dd>Backport of JSR310 (preferred for jdk < 1.8)</dd><dl>|null|
|
||||
|java8|Option. Use Java8 classes instead of third party equivalents|<dl><dt>**true**</dt><dd>Use Java 8 classes such as Base64</dd><dt>**false**</dt><dd>Various third party libraries as needed</dd><dl>|null|
|
||||
|dateLibrary|Option. Date library to use|<dl><dt>**joda**</dt><dd>Joda (for legacy app only)</dd><dt>**legacy**</dt><dd>Legacy java.util.Date (if you really have a good reason not to use threetenbp</dd><dt>**java8-localdatetime**</dt><dd>Java 8 using LocalDateTime (for legacy app only)</dd><dt>**java8**</dt><dd>Java 8 native JSR310 (preferred for jdk 1.8+) - note: this also sets "java8" to true</dd><dt>**threetenbp**</dt><dd>Backport of JSR310 (preferred for jdk < 1.8)</dd><dl>|legacy|
|
||||
|java8|Option. Use Java8 classes instead of third party equivalents|<dl><dt>**true**</dt><dd>Use Java 8 classes such as Base64</dd><dt>**false**</dt><dd>Various third party libraries as needed</dd><dl>|false|
|
||||
|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|
|
||||
|booleanGetterPrefix|Set booleanGetterPrefix| |get|
|
||||
|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|
||||
|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|
||||
|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|
||||
|snapshotVersion|Uses a SNAPSHOT version.| |null|
|
||||
|implFolder|folder for generated implementation code| |null|
|
||||
|title|a title describing the application| |null|
|
||||
|snapshotVersion|Uses a SNAPSHOT version.|<dl><dt>**true**</dt><dd>Use a SnapShot Version</dd><dt>**false**</dt><dd>Use a Release Version</dd><dl>|null|
|
||||
|implFolder|folder for generated implementation code| |src/main/java|
|
||||
|title|a title describing the application| |OpenAPI Server|
|
||||
|useBeanValidation|Use BeanValidation API annotations| |true|
|
||||
|serverPort|The port on which the server should be started| |null|
|
||||
|serverPort|The port on which the server should be started| |8080|
|
||||
|generateSpringApplication|Generate Spring application| |false|
|
||||
|useSpringAnnotationConfig|Use Spring Annotation Config| |false|
|
||||
|useSwaggerFeature|Use Swagger Feature| |false|
|
||||
|
||||
@@ -11,41 +11,41 @@ sidebar_label: jaxrs-jersey
|
||||
|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|
|
||||
|modelPackage|package for generated models| |org.openapitools.model|
|
||||
|apiPackage|package for generated api classes| |org.openapitools.api|
|
||||
|invokerPackage|root package for generated code| |org.openapitools.api|
|
||||
|groupId|groupId in generated pom.xml| |org.openapitools|
|
||||
|artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |openapi-jaxrs-server|
|
||||
|artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |1.0.0|
|
||||
|artifactUrl|artifact URL in generated pom.xml| |https://github.com/openapitools/openapi-generator|
|
||||
|artifactDescription|artifact description in generated pom.xml| |OpenAPI Java|
|
||||
|scmConnection|SCM connection in generated pom.xml| |scm:git:git@github.com:openapitools/openapi-generator.git|
|
||||
|scmDeveloperConnection|SCM developer connection in generated pom.xml| |scm:git:git@github.com:openapitools/openapi-generator.git|
|
||||
|scmUrl|SCM URL in generated pom.xml| |https://github.com/openapitools/openapi-generator|
|
||||
|developerName|developer name in generated pom.xml| |OpenAPI-Generator Contributors|
|
||||
|developerEmail|developer email in generated pom.xml| |team@openapitools.org|
|
||||
|developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org|
|
||||
|developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org|
|
||||
|licenseName|The name of the license| |Unlicense|
|
||||
|licenseUrl|The URL of the license| |http://unlicense.org|
|
||||
|sourceFolder|source folder for generated code| |src/main/java|
|
||||
|serializableModel|boolean - toggle "implements Serializable" for generated models| |false|
|
||||
|bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false|
|
||||
|fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false|
|
||||
|hideGenerationTimestamp|hides the timestamp when files were generated| |null|
|
||||
|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false|
|
||||
|withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false|
|
||||
|dateLibrary|Option. Date library to use|<dl><dt>**joda**</dt><dd>Joda (for legacy app only)</dd><dt>**legacy**</dt><dd>Legacy java.util.Date (if you really have a good reason not to use threetenbp</dd><dt>**java8-localdatetime**</dt><dd>Java 8 using LocalDateTime (for legacy app only)</dd><dt>**java8**</dt><dd>Java 8 native JSR310 (preferred for jdk 1.8+) - note: this also sets "java8" to true</dd><dt>**threetenbp**</dt><dd>Backport of JSR310 (preferred for jdk < 1.8)</dd><dl>|null|
|
||||
|java8|Option. Use Java8 classes instead of third party equivalents|<dl><dt>**true**</dt><dd>Use Java 8 classes such as Base64</dd><dt>**false**</dt><dd>Various third party libraries as needed</dd><dl>|null|
|
||||
|dateLibrary|Option. Date library to use|<dl><dt>**joda**</dt><dd>Joda (for legacy app only)</dd><dt>**legacy**</dt><dd>Legacy java.util.Date (if you really have a good reason not to use threetenbp</dd><dt>**java8-localdatetime**</dt><dd>Java 8 using LocalDateTime (for legacy app only)</dd><dt>**java8**</dt><dd>Java 8 native JSR310 (preferred for jdk 1.8+) - note: this also sets "java8" to true</dd><dt>**threetenbp**</dt><dd>Backport of JSR310 (preferred for jdk < 1.8)</dd><dl>|legacy|
|
||||
|java8|Option. Use Java8 classes instead of third party equivalents|<dl><dt>**true**</dt><dd>Use Java 8 classes such as Base64</dd><dt>**false**</dt><dd>Various third party libraries as needed</dd><dl>|false|
|
||||
|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|
|
||||
|booleanGetterPrefix|Set booleanGetterPrefix| |get|
|
||||
|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|
||||
|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|
||||
|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|
||||
|snapshotVersion|Uses a SNAPSHOT version.| |null|
|
||||
|implFolder|folder for generated implementation code| |null|
|
||||
|title|a title describing the application| |null|
|
||||
|snapshotVersion|Uses a SNAPSHOT version.|<dl><dt>**true**</dt><dd>Use a SnapShot Version</dd><dt>**false**</dt><dd>Use a Release Version</dd><dl>|null|
|
||||
|implFolder|folder for generated implementation code| |src/main/java|
|
||||
|title|a title describing the application| |OpenAPI Server|
|
||||
|useBeanValidation|Use BeanValidation API annotations| |true|
|
||||
|serverPort|The port on which the server should be started| |null|
|
||||
|library|library template (sub-template) to use|<dl><dt>**jersey1**</dt><dd>Jersey core 1.x</dd><dt>**jersey2**</dt><dd>Jersey core 2.x</dd><dl>|jersey2|
|
||||
|serverPort|The port on which the server should be started| |8080|
|
||||
|library|library template (sub-template)|<dl><dt>**jersey1**</dt><dd>Jersey core 1.x</dd><dt>**jersey2**</dt><dd>Jersey core 2.x</dd><dl>|jersey2|
|
||||
|supportJava6|Whether to support Java6 with the Jersey1/2 library.| |false|
|
||||
|useTags|use tags for creating interface and controller classnames| |false|
|
||||
|
||||
@@ -11,41 +11,41 @@ sidebar_label: jaxrs-resteasy-eap
|
||||
|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|
|
||||
|modelPackage|package for generated models| |org.openapitools.model|
|
||||
|apiPackage|package for generated api classes| |org.openapitools.api|
|
||||
|invokerPackage|root package for generated code| |org.openapitools.api|
|
||||
|groupId|groupId in generated pom.xml| |org.openapitools|
|
||||
|artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |openapi-jaxrs-resteasy-eap-server|
|
||||
|artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |1.0.0|
|
||||
|artifactUrl|artifact URL in generated pom.xml| |https://github.com/openapitools/openapi-generator|
|
||||
|artifactDescription|artifact description in generated pom.xml| |OpenAPI Java|
|
||||
|scmConnection|SCM connection in generated pom.xml| |scm:git:git@github.com:openapitools/openapi-generator.git|
|
||||
|scmDeveloperConnection|SCM developer connection in generated pom.xml| |scm:git:git@github.com:openapitools/openapi-generator.git|
|
||||
|scmUrl|SCM URL in generated pom.xml| |https://github.com/openapitools/openapi-generator|
|
||||
|developerName|developer name in generated pom.xml| |OpenAPI-Generator Contributors|
|
||||
|developerEmail|developer email in generated pom.xml| |team@openapitools.org|
|
||||
|developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org|
|
||||
|developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org|
|
||||
|licenseName|The name of the license| |Unlicense|
|
||||
|licenseUrl|The URL of the license| |http://unlicense.org|
|
||||
|sourceFolder|source folder for generated code| |src/main/java|
|
||||
|serializableModel|boolean - toggle "implements Serializable" for generated models| |false|
|
||||
|bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false|
|
||||
|fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false|
|
||||
|hideGenerationTimestamp|hides the timestamp when files were generated| |null|
|
||||
|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false|
|
||||
|withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false|
|
||||
|dateLibrary|Option. Date library to use|<dl><dt>**joda**</dt><dd>Joda (for legacy app only)</dd><dt>**legacy**</dt><dd>Legacy java.util.Date (if you really have a good reason not to use threetenbp</dd><dt>**java8-localdatetime**</dt><dd>Java 8 using LocalDateTime (for legacy app only)</dd><dt>**java8**</dt><dd>Java 8 native JSR310 (preferred for jdk 1.8+) - note: this also sets "java8" to true</dd><dt>**threetenbp**</dt><dd>Backport of JSR310 (preferred for jdk < 1.8)</dd><dl>|null|
|
||||
|java8|Option. Use Java8 classes instead of third party equivalents|<dl><dt>**true**</dt><dd>Use Java 8 classes such as Base64</dd><dt>**false**</dt><dd>Various third party libraries as needed</dd><dl>|null|
|
||||
|dateLibrary|Option. Date library to use|<dl><dt>**joda**</dt><dd>Joda (for legacy app only)</dd><dt>**legacy**</dt><dd>Legacy java.util.Date (if you really have a good reason not to use threetenbp</dd><dt>**java8-localdatetime**</dt><dd>Java 8 using LocalDateTime (for legacy app only)</dd><dt>**java8**</dt><dd>Java 8 native JSR310 (preferred for jdk 1.8+) - note: this also sets "java8" to true</dd><dt>**threetenbp**</dt><dd>Backport of JSR310 (preferred for jdk < 1.8)</dd><dl>|legacy|
|
||||
|java8|Option. Use Java8 classes instead of third party equivalents|<dl><dt>**true**</dt><dd>Use Java 8 classes such as Base64</dd><dt>**false**</dt><dd>Various third party libraries as needed</dd><dl>|false|
|
||||
|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|
|
||||
|booleanGetterPrefix|Set booleanGetterPrefix| |get|
|
||||
|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|
||||
|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|
||||
|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|
||||
|snapshotVersion|Uses a SNAPSHOT version.| |null|
|
||||
|implFolder|folder for generated implementation code| |null|
|
||||
|title|a title describing the application| |null|
|
||||
|snapshotVersion|Uses a SNAPSHOT version.|<dl><dt>**true**</dt><dd>Use a SnapShot Version</dd><dt>**false**</dt><dd>Use a Release Version</dd><dl>|null|
|
||||
|implFolder|folder for generated implementation code| |src/main/java|
|
||||
|title|a title describing the application| |OpenAPI Server|
|
||||
|useBeanValidation|Use BeanValidation API annotations| |true|
|
||||
|serverPort|The port on which the server should be started| |null|
|
||||
|serverPort|The port on which the server should be started| |8080|
|
||||
|useBeanValidation|Use BeanValidation API annotations| |true|
|
||||
|generateJbossDeploymentDescriptor|Generate Jboss Deployment Descriptor| |true|
|
||||
|useSwaggerFeature|Use dynamic Swagger generator| |false|
|
||||
|
||||
@@ -11,39 +11,39 @@ sidebar_label: jaxrs-resteasy
|
||||
|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|
|
||||
|modelPackage|package for generated models| |org.openapitools.model|
|
||||
|apiPackage|package for generated api classes| |org.openapitools.api|
|
||||
|invokerPackage|root package for generated code| |org.openapitools.api|
|
||||
|groupId|groupId in generated pom.xml| |org.openapitools|
|
||||
|artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |openapi-jaxrs-resteasy-server|
|
||||
|artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |1.0.0|
|
||||
|artifactUrl|artifact URL in generated pom.xml| |https://github.com/openapitools/openapi-generator|
|
||||
|artifactDescription|artifact description in generated pom.xml| |OpenAPI Java|
|
||||
|scmConnection|SCM connection in generated pom.xml| |scm:git:git@github.com:openapitools/openapi-generator.git|
|
||||
|scmDeveloperConnection|SCM developer connection in generated pom.xml| |scm:git:git@github.com:openapitools/openapi-generator.git|
|
||||
|scmUrl|SCM URL in generated pom.xml| |https://github.com/openapitools/openapi-generator|
|
||||
|developerName|developer name in generated pom.xml| |OpenAPI-Generator Contributors|
|
||||
|developerEmail|developer email in generated pom.xml| |team@openapitools.org|
|
||||
|developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org|
|
||||
|developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org|
|
||||
|licenseName|The name of the license| |Unlicense|
|
||||
|licenseUrl|The URL of the license| |http://unlicense.org|
|
||||
|sourceFolder|source folder for generated code| |src/main/java|
|
||||
|serializableModel|boolean - toggle "implements Serializable" for generated models| |false|
|
||||
|bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false|
|
||||
|fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false|
|
||||
|hideGenerationTimestamp|hides the timestamp when files were generated| |null|
|
||||
|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false|
|
||||
|withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false|
|
||||
|dateLibrary|Option. Date library to use|<dl><dt>**joda**</dt><dd>Joda (for legacy app only)</dd><dt>**legacy**</dt><dd>Legacy java.util.Date (if you really have a good reason not to use threetenbp</dd><dt>**java8-localdatetime**</dt><dd>Java 8 using LocalDateTime (for legacy app only)</dd><dt>**java8**</dt><dd>Java 8 native JSR310 (preferred for jdk 1.8+) - note: this also sets "java8" to true</dd><dt>**threetenbp**</dt><dd>Backport of JSR310 (preferred for jdk < 1.8)</dd><dl>|null|
|
||||
|java8|Option. Use Java8 classes instead of third party equivalents|<dl><dt>**true**</dt><dd>Use Java 8 classes such as Base64</dd><dt>**false**</dt><dd>Various third party libraries as needed</dd><dl>|null|
|
||||
|dateLibrary|Option. Date library to use|<dl><dt>**joda**</dt><dd>Joda (for legacy app only)</dd><dt>**legacy**</dt><dd>Legacy java.util.Date (if you really have a good reason not to use threetenbp</dd><dt>**java8-localdatetime**</dt><dd>Java 8 using LocalDateTime (for legacy app only)</dd><dt>**java8**</dt><dd>Java 8 native JSR310 (preferred for jdk 1.8+) - note: this also sets "java8" to true</dd><dt>**threetenbp**</dt><dd>Backport of JSR310 (preferred for jdk < 1.8)</dd><dl>|legacy|
|
||||
|java8|Option. Use Java8 classes instead of third party equivalents|<dl><dt>**true**</dt><dd>Use Java 8 classes such as Base64</dd><dt>**false**</dt><dd>Various third party libraries as needed</dd><dl>|false|
|
||||
|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|
|
||||
|booleanGetterPrefix|Set booleanGetterPrefix| |get|
|
||||
|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|
||||
|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|
||||
|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|
||||
|snapshotVersion|Uses a SNAPSHOT version.| |null|
|
||||
|implFolder|folder for generated implementation code| |null|
|
||||
|title|a title describing the application| |null|
|
||||
|snapshotVersion|Uses a SNAPSHOT version.|<dl><dt>**true**</dt><dd>Use a SnapShot Version</dd><dt>**false**</dt><dd>Use a Release Version</dd><dl>|null|
|
||||
|implFolder|folder for generated implementation code| |src/main/java|
|
||||
|title|a title describing the application| |OpenAPI Server|
|
||||
|useBeanValidation|Use BeanValidation API annotations| |true|
|
||||
|serverPort|The port on which the server should be started| |null|
|
||||
|serverPort|The port on which the server should be started| |8080|
|
||||
|generateJbossDeploymentDescriptor|Generate Jboss Deployment Descriptor| |false|
|
||||
|
||||
@@ -11,42 +11,42 @@ sidebar_label: jaxrs-spec
|
||||
|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|
|
||||
|modelPackage|package for generated models| |org.openapitools.model|
|
||||
|apiPackage|package for generated api classes| |org.openapitools.api|
|
||||
|invokerPackage|root package for generated code| |org.openapitools.api|
|
||||
|groupId|groupId in generated pom.xml| |org.openapitools|
|
||||
|artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |openapi-jaxrs-server|
|
||||
|artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |1.0.0|
|
||||
|artifactUrl|artifact URL in generated pom.xml| |https://github.com/openapitools/openapi-generator|
|
||||
|artifactDescription|artifact description in generated pom.xml| |OpenAPI Java|
|
||||
|scmConnection|SCM connection in generated pom.xml| |scm:git:git@github.com:openapitools/openapi-generator.git|
|
||||
|scmDeveloperConnection|SCM developer connection in generated pom.xml| |scm:git:git@github.com:openapitools/openapi-generator.git|
|
||||
|scmUrl|SCM URL in generated pom.xml| |https://github.com/openapitools/openapi-generator|
|
||||
|developerName|developer name in generated pom.xml| |OpenAPI-Generator Contributors|
|
||||
|developerEmail|developer email in generated pom.xml| |team@openapitools.org|
|
||||
|developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org|
|
||||
|developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org|
|
||||
|licenseName|The name of the license| |Unlicense|
|
||||
|licenseUrl|The URL of the license| |http://unlicense.org|
|
||||
|sourceFolder|source folder for generated code| |src/main/java|
|
||||
|serializableModel|boolean - toggle "implements Serializable" for generated models| |false|
|
||||
|bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false|
|
||||
|fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false|
|
||||
|hideGenerationTimestamp|hides the timestamp when files were generated| |null|
|
||||
|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false|
|
||||
|withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false|
|
||||
|dateLibrary|Option. Date library to use|<dl><dt>**joda**</dt><dd>Joda (for legacy app only)</dd><dt>**legacy**</dt><dd>Legacy java.util.Date (if you really have a good reason not to use threetenbp</dd><dt>**java8-localdatetime**</dt><dd>Java 8 using LocalDateTime (for legacy app only)</dd><dt>**java8**</dt><dd>Java 8 native JSR310 (preferred for jdk 1.8+) - note: this also sets "java8" to true</dd><dt>**threetenbp**</dt><dd>Backport of JSR310 (preferred for jdk < 1.8)</dd><dl>|null|
|
||||
|java8|Option. Use Java8 classes instead of third party equivalents|<dl><dt>**true**</dt><dd>Use Java 8 classes such as Base64</dd><dt>**false**</dt><dd>Various third party libraries as needed</dd><dl>|null|
|
||||
|dateLibrary|Option. Date library to use|<dl><dt>**joda**</dt><dd>Joda (for legacy app only)</dd><dt>**legacy**</dt><dd>Legacy java.util.Date (if you really have a good reason not to use threetenbp</dd><dt>**java8-localdatetime**</dt><dd>Java 8 using LocalDateTime (for legacy app only)</dd><dt>**java8**</dt><dd>Java 8 native JSR310 (preferred for jdk 1.8+) - note: this also sets "java8" to true</dd><dt>**threetenbp**</dt><dd>Backport of JSR310 (preferred for jdk < 1.8)</dd><dl>|legacy|
|
||||
|java8|Option. Use Java8 classes instead of third party equivalents|<dl><dt>**true**</dt><dd>Use Java 8 classes such as Base64</dd><dt>**false**</dt><dd>Various third party libraries as needed</dd><dl>|false|
|
||||
|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|
|
||||
|booleanGetterPrefix|Set booleanGetterPrefix| |get|
|
||||
|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|
||||
|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|
||||
|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|
||||
|snapshotVersion|Uses a SNAPSHOT version.| |null|
|
||||
|implFolder|folder for generated implementation code| |null|
|
||||
|title|a title describing the application| |null|
|
||||
|snapshotVersion|Uses a SNAPSHOT version.|<dl><dt>**true**</dt><dd>Use a SnapShot Version</dd><dt>**false**</dt><dd>Use a Release Version</dd><dl>|null|
|
||||
|implFolder|folder for generated implementation code| |src/main/java|
|
||||
|title|a title describing the application| |OpenAPI Server|
|
||||
|useBeanValidation|Use BeanValidation API annotations| |true|
|
||||
|serverPort|The port on which the server should be started| |null|
|
||||
|library|library template (sub-template) to use|<dl><dt>**<default>**</dt><dd>JAXRS</dd><dl>|<default>|
|
||||
|serverPort|The port on which the server should be started| |8080|
|
||||
|library|library template (sub-template)|<dl><dt>**<default>**</dt><dd>JAXRS</dd><dl>|<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|
|
||||
|
||||
@@ -8,13 +8,14 @@ sidebar_label: kotlin-server
|
||||
| Option | Description | Values | Default |
|
||||
| ------ | ----------- | ------ | ------- |
|
||||
|sourceFolder|source folder for generated code| |src/main/kotlin|
|
||||
|packageName|Generated artifact package name.| |org.openapitools|
|
||||
|packageName|Generated artifact package name.| |org.openapitools.server|
|
||||
|apiSuffix|suffix for api classes| |Api|
|
||||
|groupId|Generated artifact package's organization (i.e. maven groupId).| |org.openapitools|
|
||||
|artifactId|Generated artifact id (name of jar).| |null|
|
||||
|artifactId|Generated artifact id (name of jar).| |kotlin-server|
|
||||
|artifactVersion|Generated artifact's package version.| |1.0.0|
|
||||
|enumPropertyNaming|Naming convention for enum properties: 'camelCase', 'PascalCase', 'snake_case', 'UPPERCASE', and 'original'| |camelCase|
|
||||
|parcelizeModels|toggle "@Parcelize" for generated models| |null|
|
||||
|library|library template (sub-template) to use|<dl><dt>**ktor**</dt><dd>ktor framework</dd><dl>|ktor|
|
||||
|library|library template (sub-template)|<dl><dt>**ktor**</dt><dd>ktor framework</dd><dl>|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|
|
||||
|
||||
@@ -9,8 +9,9 @@ sidebar_label: kotlin-spring
|
||||
| ------ | ----------- | ------ | ------- |
|
||||
|sourceFolder|source folder for generated code| |src/main/kotlin|
|
||||
|packageName|Generated artifact package name.| |org.openapitools|
|
||||
|apiSuffix|suffix for api classes| |Api|
|
||||
|groupId|Generated artifact package's organization (i.e. maven groupId).| |org.openapitools|
|
||||
|artifactId|Generated artifact id (name of jar).| |null|
|
||||
|artifactId|Generated artifact id (name of jar).| |openapi-spring|
|
||||
|artifactVersion|Generated artifact's package version.| |1.0.0|
|
||||
|enumPropertyNaming|Naming convention for enum properties: 'camelCase', 'PascalCase', 'snake_case', 'UPPERCASE', and 'original'| |camelCase|
|
||||
|parcelizeModels|toggle "@Parcelize" for generated models| |null|
|
||||
@@ -25,4 +26,4 @@ sidebar_label: kotlin-spring
|
||||
|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|<dl><dt>**spring-boot**</dt><dd>Spring-boot Server application.</dd><dl>|spring-boot|
|
||||
|library|library template (sub-template)|<dl><dt>**spring-boot**</dt><dd>Spring-boot Server application.</dd><dl>|spring-boot|
|
||||
|
||||
@@ -8,11 +8,12 @@ sidebar_label: kotlin
|
||||
| Option | Description | Values | Default |
|
||||
| ------ | ----------- | ------ | ------- |
|
||||
|sourceFolder|source folder for generated code| |src/main/kotlin|
|
||||
|packageName|Generated artifact package name.| |org.openapitools|
|
||||
|packageName|Generated artifact package name.| |org.openapitools.client|
|
||||
|apiSuffix|suffix for api classes| |Api|
|
||||
|groupId|Generated artifact package's organization (i.e. maven groupId).| |org.openapitools|
|
||||
|artifactId|Generated artifact id (name of jar).| |null|
|
||||
|artifactId|Generated artifact id (name of jar).| |kotlin-client|
|
||||
|artifactVersion|Generated artifact's package version.| |1.0.0|
|
||||
|enumPropertyNaming|Naming convention for enum properties: 'camelCase', 'PascalCase', 'snake_case', 'UPPERCASE', and 'original'| |camelCase|
|
||||
|parcelizeModels|toggle "@Parcelize" for generated models| |null|
|
||||
|dateLibrary|Option. Date library to use|<dl><dt>**string**</dt><dd>String</dd><dt>**java8**</dt><dd>Java 8 native JSR310</dd><dt>**threetenbp**</dt><dd>Threetenbp</dd><dl>|null|
|
||||
|collectionType|Option. Collection type to use|<dl><dt>**array**</dt><dd>kotlin.Array</dd><dt>**list**</dt><dd>kotlin.collections.List</dd><dl>|null|
|
||||
|dateLibrary|Option. Date library to use|<dl><dt>**string**</dt><dd>String</dd><dt>**java8**</dt><dd>Java 8 native JSR310</dd><dt>**threetenbp**</dt><dd>Threetenbp</dd><dl>|java8|
|
||||
|collectionType|Option. Collection type to use|<dl><dt>**array**</dt><dd>kotlin.Array</dd><dt>**list**</dt><dd>kotlin.collections.List</dd><dl>|array|
|
||||
|
||||
@@ -11,40 +11,40 @@ sidebar_label: spring
|
||||
|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|
|
||||
|modelPackage|package for generated models| |org.openapitools.model|
|
||||
|apiPackage|package for generated api classes| |org.openapitools.api|
|
||||
|invokerPackage|root package for generated code| |org.openapitools.api|
|
||||
|groupId|groupId in generated pom.xml| |org.openapitools|
|
||||
|artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |openapi-spring|
|
||||
|artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |1.0.0|
|
||||
|artifactUrl|artifact URL in generated pom.xml| |https://github.com/openapitools/openapi-generator|
|
||||
|artifactDescription|artifact description in generated pom.xml| |OpenAPI Java|
|
||||
|scmConnection|SCM connection in generated pom.xml| |scm:git:git@github.com:openapitools/openapi-generator.git|
|
||||
|scmDeveloperConnection|SCM developer connection in generated pom.xml| |scm:git:git@github.com:openapitools/openapi-generator.git|
|
||||
|scmUrl|SCM URL in generated pom.xml| |https://github.com/openapitools/openapi-generator|
|
||||
|developerName|developer name in generated pom.xml| |OpenAPI-Generator Contributors|
|
||||
|developerEmail|developer email in generated pom.xml| |team@openapitools.org|
|
||||
|developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org|
|
||||
|developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org|
|
||||
|licenseName|The name of the license| |Unlicense|
|
||||
|licenseUrl|The URL of the license| |http://unlicense.org|
|
||||
|sourceFolder|source folder for generated code| |src/main/java|
|
||||
|serializableModel|boolean - toggle "implements Serializable" for generated models| |false|
|
||||
|bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false|
|
||||
|fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false|
|
||||
|hideGenerationTimestamp|hides the timestamp when files were generated| |null|
|
||||
|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false|
|
||||
|withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false|
|
||||
|dateLibrary|Option. Date library to use|<dl><dt>**joda**</dt><dd>Joda (for legacy app only)</dd><dt>**legacy**</dt><dd>Legacy java.util.Date (if you really have a good reason not to use threetenbp</dd><dt>**java8-localdatetime**</dt><dd>Java 8 using LocalDateTime (for legacy app only)</dd><dt>**java8**</dt><dd>Java 8 native JSR310 (preferred for jdk 1.8+) - note: this also sets "java8" to true</dd><dt>**threetenbp**</dt><dd>Backport of JSR310 (preferred for jdk < 1.8)</dd><dl>|null|
|
||||
|java8|Option. Use Java8 classes instead of third party equivalents|<dl><dt>**true**</dt><dd>Use Java 8 classes such as Base64</dd><dt>**false**</dt><dd>Various third party libraries as needed</dd><dl>|null|
|
||||
|dateLibrary|Option. Date library to use|<dl><dt>**joda**</dt><dd>Joda (for legacy app only)</dd><dt>**legacy**</dt><dd>Legacy java.util.Date (if you really have a good reason not to use threetenbp</dd><dt>**java8-localdatetime**</dt><dd>Java 8 using LocalDateTime (for legacy app only)</dd><dt>**java8**</dt><dd>Java 8 native JSR310 (preferred for jdk 1.8+) - note: this also sets "java8" to true</dd><dt>**threetenbp**</dt><dd>Backport of JSR310 (preferred for jdk < 1.8)</dd><dl>|threetenbp|
|
||||
|java8|Option. Use Java8 classes instead of third party equivalents|<dl><dt>**true**</dt><dd>Use Java 8 classes such as Base64</dd><dt>**false**</dt><dd>Various third party libraries as needed</dd><dl>|false|
|
||||
|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|
|
||||
|booleanGetterPrefix|Set booleanGetterPrefix| |get|
|
||||
|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|
||||
|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|
||||
|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|
||||
|snapshotVersion|Uses a SNAPSHOT version.| |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|
|
||||
|snapshotVersion|Uses a SNAPSHOT version.|<dl><dt>**true**</dt><dd>Use a SnapShot Version</dd><dt>**false**</dt><dd>Use a Release Version</dd><dl>|null|
|
||||
|title|server title name or client service name| |OpenAPI Spring|
|
||||
|configPackage|configuration package for generated code| |org.openapitools.configuration|
|
||||
|basePackage|base package (invokerPackage) for generated code| |org.openapitools|
|
||||
|interfaceOnly|Whether to generate only API interface stubs without the server files.| |false|
|
||||
|delegatePattern|Whether to generate the server files using the delegate pattern| |false|
|
||||
|singleContentTypes|Whether to select only one produces/consumes content-type by operation.| |false|
|
||||
@@ -62,4 +62,4 @@ sidebar_label: spring
|
||||
|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|<dl><dt>**spring-boot**</dt><dd>Spring-boot Server application using the SpringFox integration.</dd><dt>**spring-mvc**</dt><dd>Spring-MVC Server application using the SpringFox integration.</dd><dt>**spring-cloud**</dt><dd>Spring-Cloud-Feign client with Spring-Boot auto-configured settings.</dd><dl>|spring-boot|
|
||||
|library|library template (sub-template)|<dl><dt>**spring-boot**</dt><dd>Spring-boot Server application using the SpringFox integration.</dd><dt>**spring-mvc**</dt><dd>Spring-MVC Server application using the SpringFox integration.</dd><dt>**spring-cloud**</dt><dd>Spring-Cloud-Feign client with Spring-Boot auto-configured settings.</dd><dl>|spring-boot|
|
||||
|
||||
@@ -14,15 +14,15 @@ sidebar_label: typescript-angular
|
||||
|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|
|
||||
|npmVersion|The version of your npm package. If not provided, using the version from the OpenAPI specification file.| |1.0.0|
|
||||
|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 '7.0.0'| |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|
|
||||
|ngVersion|The version of Angular.| |7.0.0|
|
||||
|serviceSuffix|The suffix of the generated service.| |Service|
|
||||
|serviceFileSuffix|The suffix of the file of the generated service (service<suffix>.ts).| |.service|
|
||||
|modelSuffix|The suffix of the generated model.| |null|
|
||||
|modelFileSuffix|The suffix of the file of the generated model (model<suffix>.ts).| |null|
|
||||
|fileNaming|Naming convention for the output files: 'camelCase', 'kebab-case'.| |camelCase|
|
||||
|
||||
@@ -15,8 +15,8 @@ sidebar_label: typescript-axios
|
||||
|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|
|
||||
|npmRepository|Use this property to set an url of 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|
|
||||
|withSeparateModelsAndApi|Put the model and api in separate folders and in separate classes| |false|
|
||||
|withoutPrefixEnums|Dont prefix enum names with class names| |false|
|
||||
|withoutPrefixEnums|Don't prefix enum names with class names| |false|
|
||||
|
||||
@@ -18,7 +18,7 @@ The transform logic needs to implement [CodegenConfig.java](https://github.com/o
|
||||
> * 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.
|
||||
Built-in templates are written in Mustache and processed by [jmustache](https://github.com/samskivert/jmustache). Beginning with version 4.0.0, we support experimental 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.
|
||||
|
||||
@@ -261,6 +261,165 @@ Congratulations! You've now modified one of the built-in templates to meet your
|
||||
|
||||
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.
|
||||
|
||||
### Custom Engines
|
||||
|
||||
> Custom template engine support is *experimental*
|
||||
|
||||
If Mustache or the experimental Handlebars engines don't suit your needs, you can define an adapter to your templating engine of choice. To do this, you'll need to define a new project which consumes the `openapi-generator-core` artifact, and at a minimum implement `TemplatingEngineAdapter`.
|
||||
|
||||
This example:
|
||||
|
||||
* creates an adapter providing the fundamental logic to compile [Pebble Templates](https://pebbletemplates.io)
|
||||
* will be implemented in Kotlin to demonstrate ServiceLoader configuration specific to Kotlin (Java will be similar)
|
||||
* requires Gradle 5.0+
|
||||
* provides project setup instructions for IntelliJ
|
||||
|
||||
To begin, create a [new Gradle project](https://www.jetbrains.com/help/idea/getting-started-with-gradle.html) with Kotlin support. To do this, go to `File` ➞ `New` ➞ `Project`, choose "Gradle" and "Kotlin". Specify groupId `org.openapitools.examples` and artifactId `pebble-template-adapter`.
|
||||
|
||||
Ensure the new project uses Gradle 5.0. Navigate to the newly created directory and execute:
|
||||
|
||||
```bash
|
||||
gradle wrapper --gradle-version 5.0
|
||||
```
|
||||
|
||||
In `build.gradle`, we'll add a dependency for OpenAPI Tools core which defines the interface and an abstract helper type for implementing the adapter. We'll also pull in the Pebble artifact. We'll be evaluating this new artifact locally, so we'll also add the Maven plugin for installing to the local maven repository. We'll also create a fatjar using the `shadow` plugin to simplify our classpath.
|
||||
|
||||
Modifications to the new project's `build.gradle` should be made in the `plugins` and `dependencies` nodes:
|
||||
|
||||
```diff
|
||||
plugins {
|
||||
id 'org.jetbrains.kotlin.jvm' version '1.3.11'
|
||||
id "com.github.johnrengelman.shadow" version "5.0.0"
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8"
|
||||
compile "org.openapitools:openapi-generator-core:4.0.0-SNAPSHOT"
|
||||
compile "io.pebbletemplates:pebble:3.0.8"
|
||||
}
|
||||
```
|
||||
|
||||
The above configuration for the `shadow` plugin is strictly optional. It is not needed, for instance, if you plan to publish your adapter and consume it via the Maven or Gradle plugins.
|
||||
|
||||
Next, create a new class file called `PebbleTemplateEngineAdapter` under `src/kotlin`. We'll define the template adapter's name as `pebble` and we'll also list this as the only supported file extension. We'll implement the adapter by extending `AbstractTemplatingEngineAdapter`, which includes reusable logic, such as retrieving a list of all possible template names for our provided template extensions(s).
|
||||
|
||||
The class in its simplest form looks like this (with inline comments):
|
||||
|
||||
```kotlin
|
||||
// Allows specifying engine by class name
|
||||
// e.g. -e org.openapitools.examples.templating.PebbleTemplateAdapter
|
||||
@file:JvmName("PebbleTemplateAdapter")
|
||||
package org.openapitools.examples.templating
|
||||
|
||||
// imports
|
||||
|
||||
class PebbleTemplateAdapter : AbstractTemplatingEngineAdapter() {
|
||||
// initialize the template compilation engine
|
||||
private val engine: PebbleEngine = PebbleEngine.Builder()
|
||||
.cacheActive(false)
|
||||
.loader(DelegatingLoader(listOf(FileLoader(), ClasspathLoader())))
|
||||
.build()
|
||||
|
||||
// allows targeting engine by id/name: -e pebble
|
||||
override fun getIdentifier(): String = "pebble"
|
||||
|
||||
override fun compileTemplate(
|
||||
generator: TemplatingGenerator?,
|
||||
bundle: MutableMap<String, Any>?,
|
||||
templateFile: String?
|
||||
): String {
|
||||
// This will convert, for example, model.mustache to model.pebble
|
||||
val modifiedTemplate = this.getModifiedFileLocation(templateFile).first()
|
||||
|
||||
// Uses generator built-in template resolution strategy to find the full template file
|
||||
val filePath = generator?.getFullTemplatePath(modifiedTemplate)
|
||||
|
||||
val writer = StringWriter()
|
||||
// Conditionally writes out the template if found.
|
||||
if (filePath != null) {
|
||||
engine.getTemplate(filePath.toAbsolutePath().toString())?.evaluate(writer, bundle)
|
||||
}
|
||||
return writer.toString()
|
||||
}
|
||||
|
||||
override fun getFileExtensions(): Array<String> = arrayOf("pebble")
|
||||
}
|
||||
```
|
||||
|
||||
Lastly, create a file `resources/META-INF/services/org.openapitools.codegen.api.TemplatingEngineAdapter`, containing the full class path to the above class:
|
||||
|
||||
```
|
||||
org.openapitools.examples.templating.PebbleTemplateAdapter
|
||||
```
|
||||
|
||||
This allows the adapter to load via ServiceLoader, and to be referenced via the identifier `pebble`. This is optional; if you don't provide the above file and contents, you'll only be able to load the engine via full class name (explained in a bit).
|
||||
|
||||
Now, build the fatjar for this new adapter:
|
||||
|
||||
```bash
|
||||
./gradlew shadowJar
|
||||
```
|
||||
|
||||
To test compilation of some templates, we'll need to first create one or more template files. Create a temp directory at `/tmp/pebble-example/templates` and add the following files.
|
||||
|
||||
*api.pebble*
|
||||
|
||||
```
|
||||
package {{packageName}}
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
{% for item in imports %}
|
||||
"{{item.import}}"
|
||||
{% endfor %}
|
||||
)
|
||||
|
||||
type Generated{{classname}}Servicer
|
||||
|
||||
// etc
|
||||
```
|
||||
|
||||
*model.pebble*
|
||||
|
||||
```
|
||||
package {{packageName}}
|
||||
|
||||
{% for item in models %}
|
||||
{% if item.isEnum %}
|
||||
// TODO: enum
|
||||
{% else %}
|
||||
{% if item.description is not empty %}// {{item.description}}{% endif %}
|
||||
type {{item.classname}} struct {
|
||||
{% for var in item.model.vars %}
|
||||
{% if var.description is not empty %}// {{var.description}}{% endif %}
|
||||
{{var.name}} {% if var.isNullable %}*{% endif %}{{var.dataType}} `json:"{{var.baseName}}{% if var.required == false %},omitempty{% endif %}"{% if var.withXml == true %} xml:"{{var.baseName}}{% if var.isXmlAttribute %},attr{% endif %}"{% endif %}`
|
||||
{% endfor %}
|
||||
}
|
||||
{% endif %}
|
||||
{{model.name}}
|
||||
{% endfor %}
|
||||
```
|
||||
|
||||
> Find object structures passed to templates later in this document's **Structures** section.
|
||||
|
||||
Finally, we can compile some code by explicitly defining our classpath and jar entrypoint for CLI (be sure to modify `/your/path` below)
|
||||
|
||||
```bash
|
||||
java $JAVA_OPTS -cp /your/path/build/libs/pebble-template-adapter-1.0-SNAPSHOT-all.jar:modules/openapi-generator-cli/target/openapi-generator-cli.jar \
|
||||
org.openapitools.codegen.OpenAPIGenerator \
|
||||
generate \
|
||||
-g go \
|
||||
-i https://raw.githubusercontent.com/OAI/OpenAPI-Specification/master/examples/v2.0/json/petstore-minimal.json \
|
||||
-e pebble \
|
||||
-o /tmp/pebble-example/out \
|
||||
-t /tmp/pebble-example/templates \
|
||||
-Dmodels -DmodelDocs=false -DmodelTests=false -Dapis -DapiTests=false -DapiDocs=false
|
||||
```
|
||||
|
||||
Notice how we've targeted our custom template engine adapter via `-e pebble`. If you don't include the SPI file under `META-INF/services`, you'll need to specify the exact classpath: `org.openapitools.examples.templating.PebbleTemplateAdapter`. Notice that the target class here matches the Kotlin class name. This is because of the `@file:JvmName` annotation.
|
||||
|
||||
Congratulations on creating a custom templating engine adapter!
|
||||
|
||||
## 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.
|
||||
|
||||
@@ -239,7 +239,9 @@ SYNOPSIS
|
||||
[--api-package <api package>] [--artifact-id <artifact id>]
|
||||
[--artifact-version <artifact version>]
|
||||
[(-c <configuration file> | --config <configuration file>)]
|
||||
[-D <system properties>...] [--enable-post-process-file]
|
||||
[-D <system properties>...]
|
||||
[(-e <templating engine> | --engine <templating engine>)]
|
||||
[--enable-post-process-file]
|
||||
[(-g <generator name> | --generator-name <generator name>)]
|
||||
[--generate-alias-as-model] [--git-repo-id <git repo id>]
|
||||
[--git-user-id <git user id>] [--group-id <group id>]
|
||||
@@ -259,6 +261,7 @@ SYNOPSIS
|
||||
[--remove-operation-id-prefix]
|
||||
[--reserved-words-mappings <reserved word mappings>...]
|
||||
[(-s | --skip-overwrite)] [--skip-validate-spec]
|
||||
[--strict-spec <true/false strict behavior>]
|
||||
[(-t <template directory> | --template-dir <template directory>)]
|
||||
[--type-mappings <type mappings>...] [(-v | --verbose)]
|
||||
|
||||
@@ -289,9 +292,11 @@ OPTIONS
|
||||
artifact version in generated pom.xml
|
||||
|
||||
-c <configuration file>, --config <configuration file>
|
||||
Path to json configuration file. File content should be in a json
|
||||
format {"optionKey":"optionValue", "optionKey1":"optionValue1"...}
|
||||
Supported options can be different for each language. Run
|
||||
Path to configuration file configuration file. It can be json or
|
||||
yaml.If file is json, the content should have the format
|
||||
{"optionKey":"optionValue", "optionKey1":"optionValue1"...}.If file
|
||||
is yaml, the content should have the format optionKey:
|
||||
optionValueSupported options can be different for each language. Run
|
||||
config-help -g {generator name} command for language specific config
|
||||
options.
|
||||
|
||||
@@ -299,11 +304,17 @@ OPTIONS
|
||||
sets specified system properties in the format of
|
||||
name=value,name=value (or multiple options, each with name=value)
|
||||
|
||||
-e <templating engine>, --engine <templating engine>
|
||||
templating engine: "mustache" (default) or "handlebars" (beta)
|
||||
|
||||
--enable-post-process-file
|
||||
enablePostProcessFile
|
||||
|
||||
-g <generator name>, --generator-name <generator name>
|
||||
generator to use (see langs command for list)
|
||||
generator to use (see list command for list)
|
||||
|
||||
--generate-alias-as-model
|
||||
Generate alias to map, array as models
|
||||
|
||||
--git-repo-id <git repo id>
|
||||
Git repo ID, e.g. openapi-generator.
|
||||
@@ -354,6 +365,9 @@ OPTIONS
|
||||
piping the JSON output of debug options (e.g. `-DdebugOperations`)
|
||||
to an external parser directly while testing a generator.
|
||||
|
||||
--minimal-update
|
||||
Only write output files that have changed.
|
||||
|
||||
--model-name-prefix <model name prefix>
|
||||
Prefix that will be prepended to all model names. Default is the
|
||||
empty string.
|
||||
@@ -368,6 +382,9 @@ OPTIONS
|
||||
-o <output directory>, --output <output directory>
|
||||
where to write the generated files (current dir by default)
|
||||
|
||||
--package-name <package name>
|
||||
package for generated classes (where supported)
|
||||
|
||||
--release-note <release note>
|
||||
Release note, default to 'Minor update'.
|
||||
|
||||
@@ -386,12 +403,17 @@ OPTIONS
|
||||
--skip-validate-spec
|
||||
Skips the default behavior of validating an input specification.
|
||||
|
||||
--strict-spec <true/false strict behavior>
|
||||
'MUST' and 'SHALL' wording in OpenAPI spec is strictly adhered to.
|
||||
e.g. when false, no fixes will be applied to documents which pass
|
||||
validation but don't follow the spec.
|
||||
|
||||
-t <template directory>, --template-dir <template directory>
|
||||
folder containing the template files
|
||||
|
||||
--type-mappings <type mappings>
|
||||
sets mappings between OpenAPI spec types and generated code types in
|
||||
the format of OpenaAPIType=generatedType,OpenAPIType=generatedType.
|
||||
the format of OpenAPIType=generatedType,OpenAPIType=generatedType.
|
||||
For example: array=List,map=Map,string=String. You can also have
|
||||
multiple occurrences of this option.
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<parent>
|
||||
<groupId>org.openapitools</groupId>
|
||||
<artifactId>openapi-generator-project</artifactId>
|
||||
<version>4.0.0-SNAPSHOT</version>
|
||||
<version>4.0.0</version>
|
||||
<relativePath>../..</relativePath>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
@@ -214,6 +214,12 @@ public class Generate implements Runnable {
|
||||
description = "Skips the default behavior of validating an input specification.")
|
||||
private Boolean skipValidateSpec;
|
||||
|
||||
@Option(name = {"--strict-spec"},
|
||||
title = "true/false strict behavior",
|
||||
description = "'MUST' and 'SHALL' wording in OpenAPI spec is strictly adhered to. e.g. when false, no fixes will be applied to documents which pass validation but don't follow the spec.",
|
||||
arity = 1)
|
||||
private Boolean strictSpecBehavior;
|
||||
|
||||
@Option(name = {"--log-to-stderr"},
|
||||
title = "Log to STDERR",
|
||||
description = "write all log messages (not just errors) to STDOUT."
|
||||
@@ -368,10 +374,15 @@ public class Generate implements Runnable {
|
||||
if (generateAliasAsModel != null) {
|
||||
configurator.setGenerateAliasAsModel(generateAliasAsModel);
|
||||
}
|
||||
|
||||
if (minimalUpdate != null) {
|
||||
configurator.setEnableMinimalUpdate(minimalUpdate);
|
||||
}
|
||||
|
||||
if (strictSpecBehavior != null) {
|
||||
configurator.setStrictSpecBehavior(strictSpecBehavior);
|
||||
}
|
||||
|
||||
applySystemPropertiesKvpList(systemProperties, configurator);
|
||||
applyInstantiationTypesKvpList(instantiationTypes, configurator);
|
||||
applyImportMappingsKvpList(importMappings, configurator);
|
||||
|
||||
@@ -8,6 +8,8 @@ import io.airlift.airline.Option;
|
||||
import org.openapitools.codegen.CodegenConfig;
|
||||
import org.openapitools.codegen.CodegenConfigLoader;
|
||||
import org.openapitools.codegen.CodegenType;
|
||||
import org.openapitools.codegen.meta.GeneratorMetadata;
|
||||
import org.openapitools.codegen.meta.Stability;
|
||||
|
||||
import java.util.Comparator;
|
||||
import java.util.List;
|
||||
@@ -70,16 +72,27 @@ public class ListGenerators implements Runnable {
|
||||
sb.append(System.lineSeparator());
|
||||
|
||||
list.forEach(generator -> {
|
||||
GeneratorMetadata meta = generator.getGeneratorMetadata();
|
||||
if (docusaurus) {
|
||||
sb.append("* ");
|
||||
String id = "generators/" + generator.getName();
|
||||
sb.append("[").append(generator.getName()).append("](").append(id).append(")");
|
||||
sb.append("[").append(generator.getName());
|
||||
|
||||
if (meta != null && meta.getStability() != null && meta.getStability() != Stability.STABLE) {
|
||||
sb.append(" (").append(meta.getStability().value()).append(")");
|
||||
}
|
||||
|
||||
sb.append("](").append(id).append(")");
|
||||
|
||||
// trailing space is important for markdown list formatting
|
||||
sb.append(" ");
|
||||
} else {
|
||||
sb.append(" - ");
|
||||
sb.append(generator.getName());
|
||||
|
||||
if (meta != null && meta.getStability() != null && meta.getStability() != Stability.STABLE) {
|
||||
sb.append(" (").append(meta.getStability().value()).append(")");
|
||||
}
|
||||
}
|
||||
sb.append(System.lineSeparator());
|
||||
});
|
||||
|
||||
@@ -277,6 +277,26 @@ public class GenerateTest {
|
||||
};
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testStrictSpec() throws Exception {
|
||||
|
||||
setupAndRunGenericTest("--strict-spec", "true");
|
||||
new FullVerifications() {
|
||||
{
|
||||
configurator.setStrictSpecBehavior(true);
|
||||
times = 1;
|
||||
}
|
||||
};
|
||||
|
||||
setupAndRunGenericTest("--strict-spec", "false");
|
||||
new FullVerifications() {
|
||||
{
|
||||
configurator.setStrictSpecBehavior(false);
|
||||
times = 1;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testPackageName() throws Exception {
|
||||
final String value = "io.foo.bar.baz";
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>openapi-generator-project</artifactId>
|
||||
<groupId>org.openapitools</groupId>
|
||||
<version>4.0.0-SNAPSHOT</version>
|
||||
<version>4.0.0</version>
|
||||
<relativePath>../..</relativePath>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
@@ -13,4 +13,4 @@
|
||||
<artifactId>openapi-generator-core</artifactId>
|
||||
<name>openapi-generator-core</name>
|
||||
<url>https://github.com/openapitools/openapi-generator</url>
|
||||
</project>
|
||||
</project>
|
||||
|
||||
@@ -16,6 +16,8 @@
|
||||
|
||||
package org.openapitools.codegen.api;
|
||||
|
||||
import java.nio.file.Path;
|
||||
|
||||
/**
|
||||
* interface to the full template content
|
||||
* implementers might take into account the -t cli option,
|
||||
@@ -25,9 +27,19 @@ public interface TemplatingGenerator {
|
||||
|
||||
/**
|
||||
* returns the template content by name
|
||||
*
|
||||
* @param name the template name (e.g. model.mustache)
|
||||
*
|
||||
* @return the contents of that template
|
||||
*/
|
||||
String getFullTemplateContents(String name);
|
||||
|
||||
/**
|
||||
* Returns the path of a template, allowing access to the template where consuming literal contents aren't desirable or possible.
|
||||
*
|
||||
* @param name the template name (e.g. model.mustache)
|
||||
*
|
||||
* @return The {@link Path} to the template
|
||||
*/
|
||||
Path getFullTemplatePath(String name);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,99 @@
|
||||
package org.openapitools.codegen.meta;
|
||||
|
||||
/**
|
||||
* Represents metadata about a generator.
|
||||
*/
|
||||
public class GeneratorMetadata {
|
||||
private Stability stability;
|
||||
private String generationMessage;
|
||||
|
||||
private GeneratorMetadata(Builder builder) {
|
||||
stability = builder.stability;
|
||||
generationMessage = builder.generationMessage;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new builder object for {@link GeneratorMetadata}.
|
||||
*
|
||||
* @return A new builder instance.
|
||||
*/
|
||||
public static Builder newBuilder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new builder object for {@link GeneratorMetadata}, accepting another instance from which to copy properties.
|
||||
*
|
||||
* @param copy An existing instance to copy defaults from
|
||||
*
|
||||
* @return A new builder instance, with values preset to those of 'copy'.
|
||||
*/
|
||||
public static Builder newBuilder(GeneratorMetadata copy) {
|
||||
Builder builder = new Builder();
|
||||
if (copy != null) {
|
||||
builder.stability = copy.getStability();
|
||||
builder.generationMessage = copy.getGenerationMessage();
|
||||
}
|
||||
return builder;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a message which can be displayed during generation.
|
||||
*
|
||||
* @return A message, if defined.
|
||||
*/
|
||||
public String getGenerationMessage() {
|
||||
return generationMessage;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an enum describing the stability index of the generator.
|
||||
*
|
||||
* @return The defined stability index.
|
||||
*/
|
||||
public Stability getStability() {
|
||||
return stability;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@code GeneratorMetadata} builder static inner class.
|
||||
*/
|
||||
public static final class Builder {
|
||||
private Stability stability;
|
||||
private String generationMessage;
|
||||
|
||||
private Builder() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the {@code stability} and returns a reference to this Builder so that the methods can be chained together.
|
||||
*
|
||||
* @param stability the {@code stability} to set
|
||||
* @return a reference to this Builder
|
||||
*/
|
||||
public Builder stability(Stability stability) {
|
||||
this.stability = stability;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the {@code generationMessage} and returns a reference to this Builder so that the methods can be chained together.
|
||||
*
|
||||
* @param generationMessage the {@code generationMessage} to set
|
||||
* @return a reference to this Builder
|
||||
*/
|
||||
public Builder generationMessage(String generationMessage) {
|
||||
this.generationMessage = generationMessage;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a {@code GeneratorMetadata} built from the parameters previously set.
|
||||
*
|
||||
* @return a {@code GeneratorMetadata} built with parameters of this {@code GeneratorMetadata.Builder}
|
||||
*/
|
||||
public GeneratorMetadata build() {
|
||||
return new GeneratorMetadata(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
package org.openapitools.codegen.meta;
|
||||
|
||||
/**
|
||||
* Represents the "stability index" of a generator or feature, based on the stability indexes defined in the node.js ecosystem.
|
||||
*/
|
||||
public enum Stability {
|
||||
/**
|
||||
* The feature or features are considered complete and "production-ready".
|
||||
*/
|
||||
STABLE("stable"),
|
||||
/**
|
||||
* The feature may be partially incomplete, but breaking changes will be avoided between major releases.
|
||||
*/
|
||||
BETA("beta"),
|
||||
/**
|
||||
* The feature is still under active development and subject to non-backward compatible changes or removal in any
|
||||
* future version. Use of the feature is not recommended in production environments.
|
||||
*/
|
||||
EXPERIMENTAL("experimental"),
|
||||
/**
|
||||
* The feature may emit warnings. Backward compatibility is not guaranteed. Removal is likely to occur in a subsequent major release.
|
||||
*/
|
||||
DEPRECATED("deprecated");
|
||||
|
||||
private String description;
|
||||
|
||||
Stability(String description) {
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a value for this stability index.
|
||||
*
|
||||
* @return The descriptive value of this enum.
|
||||
*/
|
||||
public String value() { return description; }
|
||||
}
|
||||
@@ -48,7 +48,7 @@ buildscript {
|
||||
mavenCentral()
|
||||
}
|
||||
dependencies {
|
||||
classpath "org.openapitools:openapi-generator-gradle-plugin:3.3.4"
|
||||
classpath "org.openapitools:openapi-generator-gradle-plugin:4.0.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -599,7 +599,7 @@ buildscript {
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:3.2.1'
|
||||
classpath('org.openapitools:openapi-generator-gradle-plugin:3.3.4') {
|
||||
classpath('org.openapitools:openapi-generator-gradle-plugin:4.0.0') {
|
||||
exclude group: 'com.google.guava'
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
openApiGeneratorVersion=4.0.0-SNAPSHOT
|
||||
openApiGeneratorVersion=4.0.0
|
||||
|
||||
# BEGIN placeholders
|
||||
# these are just placeholders to allow contributors to build directly
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<parent>
|
||||
<groupId>org.openapitools</groupId>
|
||||
<artifactId>openapi-generator-project</artifactId>
|
||||
<version>4.0.0-SNAPSHOT</version>
|
||||
<version>4.0.0</version>
|
||||
<relativePath>../..</relativePath>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
@@ -17,5 +17,5 @@ gradle generateGoWithInvalidSpec
|
||||
The samples can be tested against other versions of the plugin using the `openApiGeneratorVersion` property. For example:
|
||||
|
||||
```bash
|
||||
gradle -PopenApiGeneratorVersion=3.3.4 openApiValidate
|
||||
gradle -PopenApiGeneratorVersion=4.0.0 openApiValidate
|
||||
```
|
||||
|
||||
@@ -1 +1 @@
|
||||
openApiGeneratorVersion=4.0.0-beta3
|
||||
openApiGeneratorVersion=4.0.0
|
||||
|
||||
@@ -22,6 +22,8 @@ import org.gradle.internal.logging.text.StyledTextOutput
|
||||
import org.gradle.internal.logging.text.StyledTextOutputFactory
|
||||
import org.openapitools.codegen.CodegenConfigLoader
|
||||
import org.openapitools.codegen.CodegenType
|
||||
import org.openapitools.codegen.meta.GeneratorMetadata
|
||||
import org.openapitools.codegen.meta.Stability
|
||||
|
||||
/**
|
||||
* A task which lists out the generators available in OpenAPI Generator
|
||||
@@ -55,8 +57,18 @@ open class GeneratorsTask : DefaultTask() {
|
||||
generators.filter { it.tag == type }
|
||||
.sortedBy { it.name }
|
||||
.forEach({ generator ->
|
||||
|
||||
val meta: GeneratorMetadata? = generator.generatorMetadata
|
||||
|
||||
append(" - ")
|
||||
append(generator.name)
|
||||
|
||||
meta?.stability?.let {
|
||||
if (it != Stability.STABLE) {
|
||||
append(" (${it.value()})")
|
||||
}
|
||||
}
|
||||
|
||||
append(System.lineSeparator())
|
||||
})
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ Add to your `build->plugins` section (default phase is `generate-sources` phase)
|
||||
<plugin>
|
||||
<groupId>org.openapitools</groupId>
|
||||
<artifactId>openapi-generator-maven-plugin</artifactId>
|
||||
<version>3.3.4</version>
|
||||
<version>4.0.0</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
@@ -57,6 +57,7 @@ mvn clean compile
|
||||
- `logToStderr` - write all log messages (not just errors) to STDOUT
|
||||
- `enablePostProcessFile` - enable file post-processing hook
|
||||
- `skipValidateSpec` - Whether or not to skip validating the input spec prior to generation. By default, invalid specifications will result in an error.
|
||||
- `strictSpec` - Whether or not to treat an input document strictly against the spec. 'MUST' and 'SHALL' wording in OpenAPI spec is strictly adhered to. e.g. when false, no fixes will be applied to documents which pass validation but don't follow the spec.
|
||||
- `generateAliasAsModel` - generate alias (array, map) as model
|
||||
- `generateApis` - generate the apis (`true` by default)
|
||||
- `generateApiTests` - generate the api tests (`true` by default. Only available if `generateApis` is `true`)
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
<plugin>
|
||||
<groupId>org.openapitools</groupId>
|
||||
<artifactId>openapi-generator-maven-plugin</artifactId>
|
||||
<version>3.3.4</version>
|
||||
<version>4.0.0</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
<plugin>
|
||||
<groupId>org.openapitools</groupId>
|
||||
<artifactId>openapi-generator-maven-plugin</artifactId>
|
||||
<version>3.3.4</version>
|
||||
<version>4.0.0</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
<plugin>
|
||||
<groupId>org.openapitools</groupId>
|
||||
<artifactId>openapi-generator-maven-plugin</artifactId>
|
||||
<version>3.3.4</version>
|
||||
<version>4.0.0</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.openapitools</groupId>
|
||||
<artifactId>openapi-generator-project</artifactId>
|
||||
<version>4.0.0-SNAPSHOT</version>
|
||||
<version>4.0.0</version>
|
||||
<relativePath>../..</relativePath>
|
||||
</parent>
|
||||
<artifactId>openapi-generator-maven-plugin</artifactId>
|
||||
|
||||
@@ -235,6 +235,12 @@ public class CodeGenMojo extends AbstractMojo {
|
||||
@Parameter(name = "skipValidateSpec", required = false)
|
||||
private Boolean skipValidateSpec;
|
||||
|
||||
/**
|
||||
* To treat a document strictly against the spec.
|
||||
*/
|
||||
@Parameter(name = "strictSpec", required = false)
|
||||
private Boolean strictSpecBehavior;
|
||||
|
||||
/**
|
||||
* To generate alias (array, map) as model
|
||||
*/
|
||||
@@ -459,6 +465,10 @@ public class CodeGenMojo extends AbstractMojo {
|
||||
configurator.setValidateSpec(!skipValidateSpec);
|
||||
}
|
||||
|
||||
if (strictSpecBehavior != null) {
|
||||
configurator.setStrictSpecBehavior(strictSpecBehavior);
|
||||
}
|
||||
|
||||
if (logToStderr != null) {
|
||||
configurator.setLogToStderr(logToStderr);
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<parent>
|
||||
<groupId>org.openapitools</groupId>
|
||||
<artifactId>openapi-generator-project</artifactId>
|
||||
<version>4.0.0-SNAPSHOT</version>
|
||||
<version>4.0.0</version>
|
||||
<relativePath>../..</relativePath>
|
||||
</parent>
|
||||
<artifactId>openapi-generator-online</artifactId>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<parent>
|
||||
<groupId>org.openapitools</groupId>
|
||||
<artifactId>openapi-generator-project</artifactId>
|
||||
<version>4.0.0-SNAPSHOT</version>
|
||||
<version>4.0.0</version>
|
||||
<relativePath>../..</relativePath>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
@@ -313,7 +313,7 @@
|
||||
<dependency>
|
||||
<groupId>org.openapitools</groupId>
|
||||
<artifactId>openapi-generator-core</artifactId>
|
||||
<version>4.0.0-SNAPSHOT</version>
|
||||
<version>4.0.0</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<repositories>
|
||||
|
||||
@@ -25,6 +25,7 @@ import io.swagger.v3.oas.models.security.SecurityScheme;
|
||||
import io.swagger.v3.oas.models.servers.Server;
|
||||
import io.swagger.v3.oas.models.servers.ServerVariable;
|
||||
import org.openapitools.codegen.api.TemplatingEngineAdapter;
|
||||
import org.openapitools.codegen.meta.GeneratorMetadata;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.List;
|
||||
@@ -32,6 +33,8 @@ import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
public interface CodegenConfig {
|
||||
GeneratorMetadata getGeneratorMetadata();
|
||||
|
||||
CodegenType getTag();
|
||||
|
||||
String getName();
|
||||
@@ -270,4 +273,8 @@ public interface CodegenConfig {
|
||||
public boolean isEnableMinimalUpdate();
|
||||
|
||||
public void setEnableMinimalUpdate(boolean isEnableMinimalUpdate);
|
||||
|
||||
boolean isStrictSpecBehavior();
|
||||
|
||||
void setStrictSpecBehavior(boolean strictSpecBehavior);
|
||||
}
|
||||
|
||||
@@ -37,6 +37,9 @@ public class CodegenConstants {
|
||||
public static final String API_PACKAGE = "apiPackage";
|
||||
public static final String API_PACKAGE_DESC = "package for generated api classes";
|
||||
|
||||
public static final String API_SUFFIX = "apiSuffix";
|
||||
public static final String API_SUFFIX_DESC = "suffix for api classes";
|
||||
|
||||
public static final String MODEL_PACKAGE = "modelPackage";
|
||||
public static final String MODEL_PACKAGE_DESC = "package for generated models";
|
||||
|
||||
@@ -70,10 +73,10 @@ public class CodegenConstants {
|
||||
public static final String GROUP_ID_DESC = "groupId in generated pom.xml";
|
||||
|
||||
public static final String ARTIFACT_ID = "artifactId";
|
||||
public static final String ARTIFACT_ID_DESC = "artifactId in generated pom.xml";
|
||||
public static final String ARTIFACT_ID_DESC = "artifactId in generated pom.xml. This also becomes part of the generated library's filename";
|
||||
|
||||
public static final String ARTIFACT_VERSION = "artifactVersion";
|
||||
public static final String ARTIFACT_VERSION_DESC = "artifact version in generated pom.xml";
|
||||
public static final String ARTIFACT_VERSION_DESC = "artifact version in generated pom.xml. This also becomes part of the generated library's filename";
|
||||
|
||||
public static final String ARTIFACT_URL = "artifactUrl";
|
||||
public static final String ARTIFACT_URL_DESC = "artifact URL in generated pom.xml";
|
||||
|
||||
@@ -44,6 +44,8 @@ import org.openapitools.codegen.CodegenDiscriminator.MappedModel;
|
||||
import org.openapitools.codegen.api.TemplatingEngineAdapter;
|
||||
import org.openapitools.codegen.config.GeneratorProperties;
|
||||
import org.openapitools.codegen.examples.ExampleGenerator;
|
||||
import org.openapitools.codegen.meta.GeneratorMetadata;
|
||||
import org.openapitools.codegen.meta.Stability;
|
||||
import org.openapitools.codegen.serializer.SerializerUtils;
|
||||
import org.openapitools.codegen.templating.MustacheEngineAdapter;
|
||||
import org.openapitools.codegen.utils.ModelUtils;
|
||||
@@ -63,6 +65,7 @@ import static org.openapitools.codegen.utils.StringUtils.*;
|
||||
public class DefaultCodegen implements CodegenConfig {
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(DefaultCodegen.class);
|
||||
|
||||
protected GeneratorMetadata generatorMetadata;
|
||||
protected String inputSpec;
|
||||
protected String outputFolder = "";
|
||||
protected Set<String> defaultIncludes = new HashSet<String>();
|
||||
@@ -118,6 +121,9 @@ public class DefaultCodegen implements CodegenConfig {
|
||||
// flag to indicate whether to only update files whose contents have changed
|
||||
protected boolean enableMinimalUpdate = false;
|
||||
|
||||
// acts strictly upon a spec, potentially modifying it to have consistent behavior across generators.
|
||||
protected boolean strictSpecBehavior = true;
|
||||
|
||||
// make openapi available to all methods
|
||||
protected OpenAPI openAPI;
|
||||
|
||||
@@ -705,10 +711,18 @@ public class DefaultCodegen implements CodegenConfig {
|
||||
this.modelPackage = modelPackage;
|
||||
}
|
||||
|
||||
public String getModelNamePrefix() {
|
||||
return modelNamePrefix;
|
||||
}
|
||||
|
||||
public void setModelNamePrefix(String modelNamePrefix) {
|
||||
this.modelNamePrefix = modelNamePrefix;
|
||||
}
|
||||
|
||||
public String getModelNameSuffix() {
|
||||
return modelNameSuffix;
|
||||
}
|
||||
|
||||
public void setModelNameSuffix(String modelNameSuffix) {
|
||||
this.modelNameSuffix = modelNameSuffix;
|
||||
}
|
||||
@@ -717,18 +731,34 @@ public class DefaultCodegen implements CodegenConfig {
|
||||
this.apiPackage = apiPackage;
|
||||
}
|
||||
|
||||
public Boolean getSortParamsByRequiredFlag() {
|
||||
return sortParamsByRequiredFlag;
|
||||
}
|
||||
|
||||
public void setSortParamsByRequiredFlag(Boolean sortParamsByRequiredFlag) {
|
||||
this.sortParamsByRequiredFlag = sortParamsByRequiredFlag;
|
||||
}
|
||||
|
||||
public Boolean getPrependFormOrBodyParameters() {
|
||||
return prependFormOrBodyParameters;
|
||||
}
|
||||
|
||||
public void setPrependFormOrBodyParameters(Boolean prependFormOrBodyParameters) {
|
||||
this.prependFormOrBodyParameters = prependFormOrBodyParameters;
|
||||
}
|
||||
|
||||
public Boolean getEnsureUniqueParams() {
|
||||
return ensureUniqueParams;
|
||||
}
|
||||
|
||||
public void setEnsureUniqueParams(Boolean ensureUniqueParams) {
|
||||
this.ensureUniqueParams = ensureUniqueParams;
|
||||
}
|
||||
|
||||
public Boolean getAllowUnicodeIdentifiers() {
|
||||
return allowUnicodeIdentifiers;
|
||||
}
|
||||
|
||||
public void setAllowUnicodeIdentifiers(Boolean allowUnicodeIdentifiers) {
|
||||
this.allowUnicodeIdentifiers = allowUnicodeIdentifiers;
|
||||
}
|
||||
@@ -813,6 +843,16 @@ public class DefaultCodegen implements CodegenConfig {
|
||||
return camelize(name);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns metadata about the generator.
|
||||
*
|
||||
* @return A provided {@link GeneratorMetadata} instance
|
||||
*/
|
||||
@Override
|
||||
public GeneratorMetadata getGeneratorMetadata() {
|
||||
return generatorMetadata;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the operation ID (method name)
|
||||
*
|
||||
@@ -929,6 +969,15 @@ public class DefaultCodegen implements CodegenConfig {
|
||||
* returns string presentation of the example path (it's a constructor)
|
||||
*/
|
||||
public DefaultCodegen() {
|
||||
CodegenType codegenType = getTag();
|
||||
if (codegenType == null) {
|
||||
codegenType = CodegenType.OTHER;
|
||||
}
|
||||
generatorMetadata = GeneratorMetadata.newBuilder()
|
||||
.stability(Stability.STABLE)
|
||||
.generationMessage(String.format(Locale.ROOT, "OpenAPI Generator: %s (%s)", getName(), codegenType.toValue()))
|
||||
.build();
|
||||
|
||||
defaultIncludes = new HashSet<String>(
|
||||
Arrays.asList("double",
|
||||
"int",
|
||||
@@ -1283,6 +1332,7 @@ public class DefaultCodegen implements CodegenConfig {
|
||||
|
||||
/**
|
||||
* Return property value depending on property type.
|
||||
*
|
||||
* @param schema property type
|
||||
* @return property value
|
||||
*/
|
||||
@@ -1447,7 +1497,8 @@ public class DefaultCodegen implements CodegenConfig {
|
||||
} else if (ModelUtils.isDoubleSchema(schema)) {
|
||||
return SchemaTypeUtil.DOUBLE_FORMAT;
|
||||
} else {
|
||||
LOGGER.warn("Unknown `format` detected for " + schema.getName() + ": " + schema.getFormat());
|
||||
LOGGER.warn("Unknown `format` {} detected for type `number`. Defaulting to `number`", schema.getFormat());
|
||||
return "number";
|
||||
}
|
||||
} else if (ModelUtils.isIntegerSchema(schema)) {
|
||||
if (ModelUtils.isLongSchema(schema)) {
|
||||
@@ -1888,7 +1939,7 @@ public class DefaultCodegen implements CodegenConfig {
|
||||
*/
|
||||
public CodegenProperty fromProperty(String name, Schema p) {
|
||||
if (p == null) {
|
||||
LOGGER.error("Undefined property/schema for `{}`. Default to type:string.", name);
|
||||
LOGGER.error("Undefined property/schema for `{}`. Default to type:string.", name);
|
||||
return null;
|
||||
}
|
||||
LOGGER.debug("debugging fromProperty for " + name + " : " + p);
|
||||
@@ -2038,7 +2089,7 @@ public class DefaultCodegen implements CodegenConfig {
|
||||
if (innerSchema == null) {
|
||||
LOGGER.error("Undefined array inner type for `{}`. Default to String.", p.getName());
|
||||
innerSchema = new StringSchema().description("//TODO automatically added by openapi-generator due to undefined type");
|
||||
((ArraySchema)p).setItems(innerSchema);
|
||||
((ArraySchema) p).setItems(innerSchema);
|
||||
}
|
||||
} else if (ModelUtils.isMapSchema(p)) {
|
||||
Schema innerSchema = ModelUtils.unaliasSchema(this.openAPI, ModelUtils.getAdditionalProperties(p));
|
||||
@@ -2120,7 +2171,7 @@ public class DefaultCodegen implements CodegenConfig {
|
||||
if (innerSchema == null) {
|
||||
LOGGER.error("Undefined array inner type for `{}`. Default to String.", p.getName());
|
||||
innerSchema = new StringSchema().description("//TODO automatically added by openapi-generator due to undefined type");
|
||||
((ArraySchema)p).setItems(innerSchema);
|
||||
((ArraySchema) p).setItems(innerSchema);
|
||||
}
|
||||
CodegenProperty cp = fromProperty(itemName, innerSchema);
|
||||
updatePropertyForArray(property, cp);
|
||||
@@ -2387,11 +2438,13 @@ public class DefaultCodegen implements CodegenConfig {
|
||||
}
|
||||
operationId = removeNonNameElementToCamelCase(operationId);
|
||||
|
||||
if (path.startsWith("/")) {
|
||||
op.path = path;
|
||||
} else {
|
||||
if (isStrictSpecBehavior() && !path.startsWith("/")) {
|
||||
// modifies an operation.path to strictly conform to OpenAPI Spec
|
||||
op.path = "/" + path;
|
||||
} else {
|
||||
op.path = path;
|
||||
}
|
||||
|
||||
op.operationId = toOperationId(operationId);
|
||||
op.summary = escapeText(operation.getSummary());
|
||||
op.unescapedNotes = operation.getDescription();
|
||||
@@ -2510,8 +2563,9 @@ public class DefaultCodegen implements CodegenConfig {
|
||||
CodegenParameter bodyParam = null;
|
||||
RequestBody requestBody = operation.getRequestBody();
|
||||
if (requestBody != null) {
|
||||
if ("application/x-www-form-urlencoded".equalsIgnoreCase(getContentType(requestBody)) ||
|
||||
"multipart/form-data".equalsIgnoreCase(getContentType(requestBody))) {
|
||||
if (getContentType(requestBody) != null &&
|
||||
(getContentType(requestBody).toLowerCase(Locale.ROOT).startsWith("application/x-www-form-urlencoded") ||
|
||||
getContentType(requestBody).toLowerCase(Locale.ROOT).startsWith("multipart/form-data"))) {
|
||||
// process form parameters
|
||||
formParams = fromRequestBodyToFormParameters(requestBody, imports);
|
||||
for (CodegenParameter cp : formParams) {
|
||||
@@ -2878,8 +2932,22 @@ public class DefaultCodegen implements CodegenConfig {
|
||||
codegenParameter.vendorExtensions.putAll(parameter.getExtensions());
|
||||
}
|
||||
|
||||
if (parameter.getSchema() != null) {
|
||||
Schema parameterSchema = ModelUtils.unaliasSchema(this.openAPI, parameter.getSchema());
|
||||
Schema s;
|
||||
if(parameter.getSchema() != null) {
|
||||
s = parameter.getSchema();
|
||||
} else if (parameter.getContent() != null) {
|
||||
Content content = parameter.getContent();
|
||||
if (content.size() > 1) {
|
||||
LOGGER.warn("Multiple schemas found in content, returning only the first one");
|
||||
}
|
||||
MediaType mediaType = content.values().iterator().next();
|
||||
s = mediaType.getSchema();
|
||||
} else {
|
||||
s = null;
|
||||
}
|
||||
|
||||
if (s != null) {
|
||||
Schema parameterSchema = ModelUtils.unaliasSchema(this.openAPI, s);
|
||||
if (parameterSchema == null) {
|
||||
LOGGER.warn("warning! Schema not found for parameter \"" + parameter.getName() + "\", using String");
|
||||
parameterSchema = new StringSchema().description("//TODO automatically added by openapi-generator due to missing type definition.");
|
||||
@@ -4189,6 +4257,7 @@ public class DefaultCodegen implements CodegenConfig {
|
||||
|
||||
protected String getContentType(RequestBody requestBody) {
|
||||
if (requestBody == null || requestBody.getContent() == null || requestBody.getContent().isEmpty()) {
|
||||
LOGGER.debug("Cannot determine the content type. Returning null.");
|
||||
return null;
|
||||
}
|
||||
return new ArrayList<>(requestBody.getContent().keySet()).get(0);
|
||||
@@ -4270,7 +4339,9 @@ public class DefaultCodegen implements CodegenConfig {
|
||||
}
|
||||
|
||||
for (String consume : consumesInfo) {
|
||||
if ("application/x-www-form-urlencoded".equalsIgnoreCase(consume) || "multipart/form-data".equalsIgnoreCase(consume)) {
|
||||
if (consume != null &&
|
||||
consume.toLowerCase(Locale.ROOT).startsWith("application/x-www-form-urlencoded") ||
|
||||
consume.toLowerCase(Locale.ROOT).startsWith("multipart/form-data")) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -4761,6 +4832,15 @@ public class DefaultCodegen implements CodegenConfig {
|
||||
cliOptions.add(option);
|
||||
}
|
||||
|
||||
protected void updateOption(String key, String defaultValue) {
|
||||
for(int i = 0; i < cliOptions.size(); i++) {
|
||||
if(cliOptions.get(i).getOpt().equals(key)) {
|
||||
cliOptions.get(i).setDefault(defaultValue);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected void addSwitch(String key, String description, Boolean defaultValue) {
|
||||
CliOption option = CliOption.newBoolean(key, description);
|
||||
if (defaultValue != null)
|
||||
@@ -4844,7 +4924,7 @@ public class DefaultCodegen implements CodegenConfig {
|
||||
}
|
||||
|
||||
private void setParameterNullable(CodegenParameter parameter, CodegenProperty property) {
|
||||
if(parameter == null || property == null) {
|
||||
if (parameter == null || property == null) {
|
||||
return;
|
||||
}
|
||||
parameter.isNullable = property.isNullable;
|
||||
@@ -4893,11 +4973,31 @@ public class DefaultCodegen implements CodegenConfig {
|
||||
/**
|
||||
* Set the boolean value indicating the state of the option for updating only changed files
|
||||
*
|
||||
* @param enableMinimalUpdate true to enable minimal update
|
||||
* @param enableMinimalUpdate true to enable minimal update
|
||||
*/
|
||||
@Override
|
||||
public void setEnableMinimalUpdate(boolean enableMinimalUpdate) {
|
||||
this.enableMinimalUpdate = enableMinimalUpdate;
|
||||
}
|
||||
|
||||
/**
|
||||
* Indicates whether the codegen configuration should treat documents as strictly defined by the OpenAPI specification.
|
||||
*
|
||||
* @return true to act strictly upon spec documents, potentially modifying the spec to strictly fit the spec.
|
||||
*/
|
||||
@Override
|
||||
public boolean isStrictSpecBehavior() {
|
||||
return this.strictSpecBehavior;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the boolean valid indicating whether generation will work strictly against the specification, potentially making
|
||||
* minor changes to the input document.
|
||||
*
|
||||
* @param strictSpecBehavior true if we will behave strictly, false to allow specification documents which pass validation to be loosely interpreted against the spec.
|
||||
*/
|
||||
@Override
|
||||
public void setStrictSpecBehavior(final boolean strictSpecBehavior) {
|
||||
this.strictSpecBehavior = strictSpecBehavior;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,6 +35,8 @@ import org.apache.commons.lang3.StringUtils;
|
||||
import org.openapitools.codegen.config.GeneratorProperties;
|
||||
import org.openapitools.codegen.api.TemplatingEngineAdapter;
|
||||
import org.openapitools.codegen.ignore.CodegenIgnoreProcessor;
|
||||
import org.openapitools.codegen.meta.GeneratorMetadata;
|
||||
import org.openapitools.codegen.meta.Stability;
|
||||
import org.openapitools.codegen.templating.MustacheEngineAdapter;
|
||||
import org.openapitools.codegen.config.GeneratorProperties;
|
||||
import org.openapitools.codegen.utils.ImplementationVersion;
|
||||
@@ -45,6 +47,7 @@ import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.io.*;
|
||||
import java.net.URL;
|
||||
import java.nio.file.Path;
|
||||
import java.time.ZonedDateTime;
|
||||
import java.util.*;
|
||||
|
||||
@@ -431,9 +434,9 @@ public class DefaultGenerator extends AbstractGenerator implements Generator {
|
||||
if (unusedModels.contains(name)) {
|
||||
if (Boolean.FALSE.equals(skipFormModel)) {
|
||||
// if skipFormModel sets to true, still generate the model and log the result
|
||||
LOGGER.info("Model " + name + " (marked as unused due to form parameters) is generated due to skipFormModel=false (default)");
|
||||
LOGGER.info("Model " + name + " (marked as unused due to form parameters) is generated due to the system property skipFormModel=false (default)");
|
||||
} else {
|
||||
LOGGER.info("Model " + name + " not generated since it's marked as unused (due to form parameters) and skipFormModel set to true");
|
||||
LOGGER.info("Model " + name + " not generated since it's marked as unused (due to form parameters) and skipFormModel (system property) set to true");
|
||||
continue;
|
||||
}
|
||||
}
|
||||
@@ -882,6 +885,23 @@ public class DefaultGenerator extends AbstractGenerator implements Generator {
|
||||
throw new RuntimeException("missing config!");
|
||||
}
|
||||
|
||||
if (config.getGeneratorMetadata() == null) {
|
||||
LOGGER.warn(String.format(Locale.ROOT, "Generator '%s' is missing generator metadata!", config.getName()));
|
||||
} else {
|
||||
GeneratorMetadata generatorMetadata = config.getGeneratorMetadata();
|
||||
if (StringUtils.isNotEmpty(generatorMetadata.getGenerationMessage())) {
|
||||
LOGGER.info(generatorMetadata.getGenerationMessage());
|
||||
}
|
||||
|
||||
Stability stability = generatorMetadata.getStability();
|
||||
String stabilityMessage = String.format(Locale.ROOT, "Generator '%s' is considered %s.", config.getName(), stability.value());
|
||||
if (stability == Stability.DEPRECATED) {
|
||||
LOGGER.warn(stabilityMessage);
|
||||
} else {
|
||||
LOGGER.info(stabilityMessage);
|
||||
}
|
||||
}
|
||||
|
||||
// resolve inline models
|
||||
InlineModelResolver inlineModelResolver = new InlineModelResolver();
|
||||
inlineModelResolver.flatten(openAPI);
|
||||
@@ -917,6 +937,19 @@ public class DefaultGenerator extends AbstractGenerator implements Generator {
|
||||
return readTemplate(getFullTemplateFile(config, templateName));
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the path of a template, allowing access to the template where consuming literal contents aren't desirable or possible.
|
||||
*
|
||||
* @param name the template name (e.g. model.mustache)
|
||||
*
|
||||
* @return The {@link Path} to the template
|
||||
*/
|
||||
@Override
|
||||
public Path getFullTemplatePath(String name) {
|
||||
String fullPath = getFullTemplateFile(config, name);
|
||||
return java.nio.file.Paths.get(fullPath);
|
||||
}
|
||||
|
||||
protected File processTemplateToFile(Map<String, Object> templateData, String templateName, String outputFilename) throws IOException {
|
||||
String adjustedOutputFilename = outputFilename.replaceAll("//", "/").replace('/', File.separatorChar);
|
||||
if (ignoreProcessor.allowsFile(new File(adjustedOutputFilename))) {
|
||||
|
||||
@@ -312,6 +312,35 @@ public class InlineModelResolver {
|
||||
}
|
||||
}
|
||||
|
||||
private void flattenComposedChildren(OpenAPI openAPI, String key, List<Schema> children) {
|
||||
if (children == null || children.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
ListIterator<Schema> listIterator = children.listIterator();
|
||||
while (listIterator.hasNext()) {
|
||||
Schema component = listIterator.next();
|
||||
if (component instanceof ObjectSchema) {
|
||||
ObjectSchema op = (ObjectSchema) component;
|
||||
if (op.get$ref() == null && op.getProperties() != null && op.getProperties().size() > 0) {
|
||||
String innerModelName = resolveModelName(op.getTitle(), key);
|
||||
Schema innerModel = modelFromProperty(op, innerModelName);
|
||||
String existing = matchGenerated(innerModel);
|
||||
if (existing == null) {
|
||||
openAPI.getComponents().addSchemas(innerModelName, innerModel);
|
||||
addGenerated(innerModelName, innerModel);
|
||||
Schema schema = new Schema().$ref(innerModelName);
|
||||
schema.setRequired(op.getRequired());
|
||||
listIterator.set(schema);
|
||||
} else {
|
||||
Schema schema = new Schema().$ref(existing);
|
||||
schema.setRequired(op.getRequired());
|
||||
listIterator.set(schema);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Flatten inline models in components
|
||||
*
|
||||
@@ -326,7 +355,13 @@ public class InlineModelResolver {
|
||||
List<String> modelNames = new ArrayList<String>(models.keySet());
|
||||
for (String modelName : modelNames) {
|
||||
Schema model = models.get(modelName);
|
||||
if (model instanceof Schema) {
|
||||
if (ModelUtils.isComposedSchema(model)) {
|
||||
ComposedSchema m = (ComposedSchema) model;
|
||||
// inline child schemas
|
||||
flattenComposedChildren(openAPI, modelName + "_allOf", m.getAllOf());
|
||||
flattenComposedChildren(openAPI, modelName + "_anyOf", m.getAnyOf());
|
||||
flattenComposedChildren(openAPI, modelName + "_oneOf", m.getOneOf());
|
||||
} else if (model instanceof Schema) {
|
||||
Schema m = (Schema) model;
|
||||
Map<String, Schema> properties = m.getProperties();
|
||||
flattenProperties(properties, modelName);
|
||||
@@ -353,20 +388,6 @@ public class InlineModelResolver {
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (ModelUtils.isComposedSchema(model)) {
|
||||
ComposedSchema m = (ComposedSchema) model;
|
||||
if (m.getAllOf() != null && !m.getAllOf().isEmpty()) {
|
||||
Schema child = null;
|
||||
for (Schema component : m.getAllOf()) {
|
||||
if (component.get$ref() == null) {
|
||||
child = component;
|
||||
}
|
||||
}
|
||||
if (child != null) {
|
||||
Map<String, Schema> properties = child.getProperties();
|
||||
flattenProperties(properties, modelName);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -58,23 +58,6 @@ public class CodegenConfigurator implements Serializable {
|
||||
|
||||
public static final Logger LOGGER = LoggerFactory.getLogger(CodegenConfigurator.class);
|
||||
|
||||
private static Map<String, String> nameMigrationMap = new HashMap<>();
|
||||
|
||||
static {
|
||||
nameMigrationMap.put("akka-scala", new ScalaAkkaClientCodegen().getName());
|
||||
nameMigrationMap.put("scala", new ScalaHttpClientCodegen().getName());
|
||||
nameMigrationMap.put("jaxrs", new JavaJerseyServerCodegen().getName());
|
||||
nameMigrationMap.put("qt5cpp", new CppQt5ClientCodegen().getName());
|
||||
nameMigrationMap.put("cpprest", new CppRestSdkClientCodegen().getName());
|
||||
nameMigrationMap.put("tizen", new CppTizenClientCodegen().getName());
|
||||
nameMigrationMap.put("sinatra", new RubySinatraServerCodegen().getName());
|
||||
nameMigrationMap.put("swift", new SwiftClientCodegen().getName());
|
||||
nameMigrationMap.put("lumen", new PhpLumenServerCodegen().getName());
|
||||
nameMigrationMap.put("slim", new PhpSlimServerCodegen().getName());
|
||||
nameMigrationMap.put("ze-ph", new PhpZendExpressivePathHandlerServerCodegen().getName());
|
||||
nameMigrationMap.put("nancyfx", new CSharpNancyFXServerCodegen().getName());
|
||||
}
|
||||
|
||||
private String generatorName;
|
||||
private String inputSpec;
|
||||
private String outputDir;
|
||||
@@ -85,6 +68,7 @@ public class CodegenConfigurator implements Serializable {
|
||||
private boolean validateSpec;
|
||||
private boolean enablePostProcessFile;
|
||||
private boolean enableMinimalUpdate;
|
||||
private boolean strictSpecBehavior;
|
||||
private String templateDir;
|
||||
private String templatingEngineName;
|
||||
private String auth;
|
||||
@@ -117,11 +101,10 @@ public class CodegenConfigurator implements Serializable {
|
||||
|
||||
public CodegenConfigurator() {
|
||||
this.validateSpec = true;
|
||||
this.strictSpecBehavior = true;
|
||||
this.setOutputDir(".");
|
||||
}
|
||||
|
||||
// TODO: When setLang is removed, please remove nameMigrationMap and its usage(s).
|
||||
|
||||
/**
|
||||
* Set the "language". This has drifted away from language-only to include framework and
|
||||
* hyphenated generator types as well as language.
|
||||
@@ -150,15 +133,7 @@ public class CodegenConfigurator implements Serializable {
|
||||
* @return The fluent instance of {@link CodegenConfigurator}
|
||||
*/
|
||||
public CodegenConfigurator setGeneratorName(final String generatorName) {
|
||||
if (nameMigrationMap.containsKey(generatorName)) {
|
||||
String newValue = nameMigrationMap.get(generatorName);
|
||||
LOGGER.warn(String.format(Locale.ROOT,
|
||||
"The name '%s' is a deprecated. Please update to the new name of '%s'.",
|
||||
generatorName, newValue));
|
||||
this.generatorName = newValue;
|
||||
} else {
|
||||
this.generatorName = generatorName;
|
||||
}
|
||||
this.generatorName = generatorName;
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -252,6 +227,15 @@ public class CodegenConfigurator implements Serializable {
|
||||
return this;
|
||||
}
|
||||
|
||||
public boolean isStrictSpecBehavior() {
|
||||
return strictSpecBehavior;
|
||||
}
|
||||
|
||||
public CodegenConfigurator setStrictSpecBehavior(boolean strictSpecBehavior) {
|
||||
this.strictSpecBehavior = strictSpecBehavior;
|
||||
return this;
|
||||
}
|
||||
|
||||
public boolean isVerbose() {
|
||||
return verbose;
|
||||
}
|
||||
@@ -557,6 +541,8 @@ public class CodegenConfigurator implements Serializable {
|
||||
config.languageSpecificPrimitives().addAll(languageSpecificPrimitives);
|
||||
config.reservedWordsMappings().putAll(reservedWordMappings);
|
||||
|
||||
config.setStrictSpecBehavior(isStrictSpecBehavior());
|
||||
|
||||
checkAndSetAdditionalProperty(apiPackage, CodegenConstants.API_PACKAGE);
|
||||
checkAndSetAdditionalProperty(modelPackage, CodegenConstants.MODEL_PACKAGE);
|
||||
checkAndSetAdditionalProperty(invokerPackage, CodegenConstants.INVOKER_PACKAGE);
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -52,7 +52,6 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code
|
||||
public static final String SUPPORT_JAVA6 = "supportJava6";
|
||||
public static final String DISABLE_HTML_ESCAPING = "disableHtmlEscaping";
|
||||
public static final String BOOLEAN_GETTER_PREFIX = "booleanGetterPrefix";
|
||||
public static final String BOOLEAN_GETTER_PREFIX_DEFAULT = "get";
|
||||
public static final String USE_NULL_FOR_UNKNOWN_ENUM_VALUE = "useNullForUnknownEnumValue";
|
||||
|
||||
protected String dateLibrary = "threetenbp";
|
||||
@@ -86,7 +85,7 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code
|
||||
protected String modelDocPath = "docs/";
|
||||
protected boolean supportJava6 = false;
|
||||
protected boolean disableHtmlEscaping = false;
|
||||
protected String booleanGetterPrefix = BOOLEAN_GETTER_PREFIX_DEFAULT;
|
||||
protected String booleanGetterPrefix = "get";
|
||||
protected boolean useNullForUnknownEnumValue = false;
|
||||
protected String parentGroupId = "";
|
||||
protected String parentArtifactId = "";
|
||||
@@ -144,31 +143,30 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code
|
||||
|
||||
cliOptions.add(new CliOption(CodegenConstants.MODEL_PACKAGE, CodegenConstants.MODEL_PACKAGE_DESC));
|
||||
cliOptions.add(new CliOption(CodegenConstants.API_PACKAGE, CodegenConstants.API_PACKAGE_DESC));
|
||||
cliOptions.add(new CliOption(CodegenConstants.INVOKER_PACKAGE, CodegenConstants.INVOKER_PACKAGE_DESC));
|
||||
cliOptions.add(new CliOption(CodegenConstants.GROUP_ID, CodegenConstants.GROUP_ID_DESC));
|
||||
cliOptions.add(new CliOption(CodegenConstants.ARTIFACT_ID, CodegenConstants.ARTIFACT_ID_DESC));
|
||||
cliOptions.add(new CliOption(CodegenConstants.ARTIFACT_VERSION, CodegenConstants.ARTIFACT_VERSION_DESC));
|
||||
cliOptions.add(new CliOption(CodegenConstants.ARTIFACT_URL, CodegenConstants.ARTIFACT_URL_DESC));
|
||||
cliOptions.add(new CliOption(CodegenConstants.ARTIFACT_DESCRIPTION, CodegenConstants.ARTIFACT_DESCRIPTION_DESC));
|
||||
cliOptions.add(new CliOption(CodegenConstants.SCM_CONNECTION, CodegenConstants.SCM_CONNECTION_DESC));
|
||||
cliOptions.add(new CliOption(CodegenConstants.SCM_DEVELOPER_CONNECTION, CodegenConstants.SCM_DEVELOPER_CONNECTION_DESC));
|
||||
cliOptions.add(new CliOption(CodegenConstants.SCM_URL, CodegenConstants.SCM_URL_DESC));
|
||||
cliOptions.add(new CliOption(CodegenConstants.DEVELOPER_NAME, CodegenConstants.DEVELOPER_NAME_DESC));
|
||||
cliOptions.add(new CliOption(CodegenConstants.DEVELOPER_EMAIL, CodegenConstants.DEVELOPER_EMAIL_DESC));
|
||||
cliOptions.add(new CliOption(CodegenConstants.DEVELOPER_ORGANIZATION, CodegenConstants.DEVELOPER_ORGANIZATION_DESC));
|
||||
cliOptions.add(new CliOption(CodegenConstants.DEVELOPER_ORGANIZATION_URL, CodegenConstants.DEVELOPER_ORGANIZATION_URL_DESC));
|
||||
cliOptions.add(new CliOption(CodegenConstants.LICENSE_NAME, CodegenConstants.LICENSE_NAME_DESC));
|
||||
cliOptions.add(new CliOption(CodegenConstants.LICENSE_URL, CodegenConstants.LICENSE_URL_DESC));
|
||||
cliOptions.add(new CliOption(CodegenConstants.SOURCE_FOLDER, CodegenConstants.SOURCE_FOLDER_DESC));
|
||||
cliOptions.add(CliOption.newBoolean(CodegenConstants.SERIALIZABLE_MODEL, CodegenConstants.SERIALIZABLE_MODEL_DESC));
|
||||
cliOptions.add(CliOption.newBoolean(CodegenConstants.SERIALIZE_BIG_DECIMAL_AS_STRING, CodegenConstants
|
||||
.SERIALIZE_BIG_DECIMAL_AS_STRING_DESC));
|
||||
cliOptions.add(CliOption.newBoolean(FULL_JAVA_UTIL, "whether to use fully qualified name for classes under java.util. This option only works for Java API client"));
|
||||
cliOptions.add(new CliOption("hideGenerationTimestamp", "hides the timestamp when files were generated"));
|
||||
cliOptions.add(new CliOption(CodegenConstants.INVOKER_PACKAGE, CodegenConstants.INVOKER_PACKAGE_DESC).defaultValue(this.getInvokerPackage()));
|
||||
cliOptions.add(new CliOption(CodegenConstants.GROUP_ID, CodegenConstants.GROUP_ID_DESC).defaultValue(this.getGroupId()));
|
||||
cliOptions.add(new CliOption(CodegenConstants.ARTIFACT_ID, CodegenConstants.ARTIFACT_ID_DESC).defaultValue(this.getArtifactId()));
|
||||
cliOptions.add(new CliOption(CodegenConstants.ARTIFACT_VERSION, CodegenConstants.ARTIFACT_VERSION_DESC).defaultValue(this.getArtifactVersion()));
|
||||
cliOptions.add(new CliOption(CodegenConstants.ARTIFACT_URL, CodegenConstants.ARTIFACT_URL_DESC).defaultValue(this.getArtifactUrl()));
|
||||
cliOptions.add(new CliOption(CodegenConstants.ARTIFACT_DESCRIPTION, CodegenConstants.ARTIFACT_DESCRIPTION_DESC).defaultValue(this.getArtifactDescription()));
|
||||
cliOptions.add(new CliOption(CodegenConstants.SCM_CONNECTION, CodegenConstants.SCM_CONNECTION_DESC).defaultValue(this.getScmConnection()));
|
||||
cliOptions.add(new CliOption(CodegenConstants.SCM_DEVELOPER_CONNECTION, CodegenConstants.SCM_DEVELOPER_CONNECTION_DESC).defaultValue(this.getScmDeveloperConnection()));
|
||||
cliOptions.add(new CliOption(CodegenConstants.SCM_URL, CodegenConstants.SCM_URL_DESC).defaultValue(this.getScmUrl()));
|
||||
cliOptions.add(new CliOption(CodegenConstants.DEVELOPER_NAME, CodegenConstants.DEVELOPER_NAME_DESC).defaultValue(this.getDeveloperName()));
|
||||
cliOptions.add(new CliOption(CodegenConstants.DEVELOPER_EMAIL, CodegenConstants.DEVELOPER_EMAIL_DESC).defaultValue(this.getDeveloperEmail()));
|
||||
cliOptions.add(new CliOption(CodegenConstants.DEVELOPER_ORGANIZATION, CodegenConstants.DEVELOPER_ORGANIZATION_DESC).defaultValue(this.getDeveloperOrganization()));
|
||||
cliOptions.add(new CliOption(CodegenConstants.DEVELOPER_ORGANIZATION_URL, CodegenConstants.DEVELOPER_ORGANIZATION_URL_DESC).defaultValue(this.getDeveloperOrganizationUrl()));
|
||||
cliOptions.add(new CliOption(CodegenConstants.LICENSE_NAME, CodegenConstants.LICENSE_NAME_DESC).defaultValue(this.getLicenseName()));
|
||||
cliOptions.add(new CliOption(CodegenConstants.LICENSE_URL, CodegenConstants.LICENSE_URL_DESC).defaultValue(this.getLicenseUrl()));
|
||||
cliOptions.add(new CliOption(CodegenConstants.SOURCE_FOLDER, CodegenConstants.SOURCE_FOLDER_DESC).defaultValue(this.getSourceFolder()));
|
||||
cliOptions.add(CliOption.newBoolean(CodegenConstants.SERIALIZABLE_MODEL, CodegenConstants.SERIALIZABLE_MODEL_DESC, this.getSerializableModel()));
|
||||
cliOptions.add(CliOption.newBoolean(CodegenConstants.SERIALIZE_BIG_DECIMAL_AS_STRING, CodegenConstants.SERIALIZE_BIG_DECIMAL_AS_STRING_DESC, serializeBigDecimalAsString));
|
||||
cliOptions.add(CliOption.newBoolean(FULL_JAVA_UTIL, "whether to use fully qualified name for classes under java.util. This option only works for Java API client", fullJavaUtil));
|
||||
cliOptions.add(CliOption.newBoolean(CodegenConstants.HIDE_GENERATION_TIMESTAMP, CodegenConstants.HIDE_GENERATION_TIMESTAMP_DESC, this.isHideGenerationTimestamp()));
|
||||
cliOptions.add(CliOption.newBoolean(WITH_XML, "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)"));
|
||||
|
||||
CliOption dateLibrary = new CliOption(DATE_LIBRARY, "Option. Date library to use");
|
||||
Map<String, String> dateOptions = new HashMap<String, String>();
|
||||
CliOption dateLibrary = new CliOption(DATE_LIBRARY, "Option. Date library to use").defaultValue(this.getDateLibrary());
|
||||
Map<String, String> dateOptions = new HashMap<>();
|
||||
dateOptions.put("java8", "Java 8 native JSR310 (preferred for jdk 1.8+) - note: this also sets \"" + JAVA8_MODE + "\" to true");
|
||||
dateOptions.put("threetenbp", "Backport of JSR310 (preferred for jdk < 1.8)");
|
||||
dateOptions.put("java8-localdatetime", "Java 8 using LocalDateTime (for legacy app only)");
|
||||
@@ -177,20 +175,26 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code
|
||||
dateLibrary.setEnum(dateOptions);
|
||||
cliOptions.add(dateLibrary);
|
||||
|
||||
CliOption java8Mode = new CliOption(JAVA8_MODE, "Option. Use Java8 classes instead of third party equivalents");
|
||||
Map<String, String> java8ModeOptions = new HashMap<String, String>();
|
||||
CliOption java8Mode = new CliOption(JAVA8_MODE, "Option. Use Java8 classes instead of third party equivalents").defaultValue(String.valueOf(this.java8Mode));
|
||||
Map<String, String> java8ModeOptions = new HashMap<>();
|
||||
java8ModeOptions.put("true", "Use Java 8 classes such as Base64");
|
||||
java8ModeOptions.put("false", "Various third party libraries as needed");
|
||||
java8Mode.setEnum(java8ModeOptions);
|
||||
cliOptions.add(java8Mode);
|
||||
|
||||
cliOptions.add(CliOption.newBoolean(DISABLE_HTML_ESCAPING, "Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)"));
|
||||
cliOptions.add(CliOption.newString(BOOLEAN_GETTER_PREFIX, "Set booleanGetterPrefix (default value '" + BOOLEAN_GETTER_PREFIX_DEFAULT + "')"));
|
||||
cliOptions.add(CliOption.newBoolean(DISABLE_HTML_ESCAPING, "Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)", disableHtmlEscaping));
|
||||
cliOptions.add(CliOption.newString(BOOLEAN_GETTER_PREFIX, "Set booleanGetterPrefix").defaultValue(this.getBooleanGetterPrefix()));
|
||||
|
||||
cliOptions.add(CliOption.newString(CodegenConstants.PARENT_GROUP_ID, CodegenConstants.PARENT_GROUP_ID_DESC));
|
||||
cliOptions.add(CliOption.newString(CodegenConstants.PARENT_ARTIFACT_ID, CodegenConstants.PARENT_ARTIFACT_ID_DESC));
|
||||
cliOptions.add(CliOption.newString(CodegenConstants.PARENT_VERSION, CodegenConstants.PARENT_VERSION_DESC));
|
||||
cliOptions.add(CliOption.newString(CodegenConstants.SNAPSHOT_VERSION, CodegenConstants.SNAPSHOT_VERSION_DESC));
|
||||
CliOption snapShotVersion = CliOption.newString(CodegenConstants.SNAPSHOT_VERSION, CodegenConstants.SNAPSHOT_VERSION_DESC);
|
||||
Map<String, String> snapShotVersionOptions = new HashMap<>();
|
||||
snapShotVersionOptions.put("true", "Use a SnapShot Version");
|
||||
snapShotVersionOptions.put("false", "Use a Release Version");
|
||||
snapShotVersion.setEnum(snapShotVersionOptions);
|
||||
cliOptions.add(snapShotVersion);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -262,15 +266,6 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code
|
||||
additionalProperties.put(CodegenConstants.ARTIFACT_ID, artifactId);
|
||||
}
|
||||
|
||||
if (additionalProperties.containsKey(CodegenConstants.ARTIFACT_VERSION)) {
|
||||
this.setArtifactVersion((String) additionalProperties.get(CodegenConstants.ARTIFACT_VERSION));
|
||||
} else if (this.getVersionFromSpecification() != null) {
|
||||
this.setArtifactVersion(this.getVersionFromSpecification());
|
||||
} else {
|
||||
//not set, use to be passed to template
|
||||
additionalProperties.put(CodegenConstants.ARTIFACT_VERSION, artifactVersion);
|
||||
}
|
||||
|
||||
if (additionalProperties.containsKey(CodegenConstants.SNAPSHOT_VERSION)) {
|
||||
Boolean useSnapshotVersion = Boolean.valueOf((String) additionalProperties.get(CodegenConstants.SNAPSHOT_VERSION));
|
||||
|
||||
@@ -580,14 +575,6 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code
|
||||
return toModelName(name) + "Test";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toApiName(String name) {
|
||||
if (name.length() == 0) {
|
||||
return "DefaultApi";
|
||||
}
|
||||
return camelize(name) + "Api";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toApiFilename(String name) {
|
||||
return toApiName(name);
|
||||
@@ -607,7 +594,7 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code
|
||||
}
|
||||
|
||||
// if it's all uppper case, do nothing
|
||||
if (name.matches("^[A-Z_]*$")) {
|
||||
if (name.matches("^[A-Z0-9_]*$")) {
|
||||
return name;
|
||||
}
|
||||
|
||||
@@ -991,10 +978,6 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void postProcessParameter(CodegenParameter parameter) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> postProcessModels(Map<String, Object> objs) {
|
||||
// recursively add import for mapping one type to multiple imports
|
||||
@@ -1024,8 +1007,8 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code
|
||||
List<Map<String, String>> imports = (List<Map<String, String>>) objs.get("imports");
|
||||
Pattern pattern = Pattern.compile("java\\.util\\.(List|ArrayList|Map|HashMap)");
|
||||
for (Iterator<Map<String, String>> itr = imports.iterator(); itr.hasNext(); ) {
|
||||
String _import = itr.next().get("import");
|
||||
if (pattern.matcher(_import).matches()) {
|
||||
String itrImport = itr.next().get("import");
|
||||
if (pattern.matcher(itrImport).matches()) {
|
||||
itr.remove();
|
||||
}
|
||||
}
|
||||
@@ -1034,30 +1017,45 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code
|
||||
|
||||
@Override
|
||||
public void preprocessOpenAPI(OpenAPI openAPI) {
|
||||
if (openAPI == null || openAPI.getPaths() == null) {
|
||||
if (openAPI == null) {
|
||||
return;
|
||||
}
|
||||
for (String pathname : openAPI.getPaths().keySet()) {
|
||||
PathItem path = openAPI.getPaths().get(pathname);
|
||||
if (path.readOperations() == null) {
|
||||
continue;
|
||||
}
|
||||
for (Operation operation : path.readOperations()) {
|
||||
LOGGER.info("Processing operation " + operation.getOperationId());
|
||||
if (hasBodyParameter(openAPI, operation) || hasFormParameter(openAPI, operation)) {
|
||||
String defaultContentType = hasFormParameter(openAPI, operation) ? "application/x-www-form-urlencoded" : "application/json";
|
||||
List<String> consumes = new ArrayList<String>(getConsumesInfo(openAPI, operation));
|
||||
String contentType = consumes == null || consumes.isEmpty() ? defaultContentType : consumes.get(0);
|
||||
operation.addExtension("x-contentType", contentType);
|
||||
if (openAPI.getPaths() != null) {
|
||||
for (String pathname : openAPI.getPaths().keySet()) {
|
||||
PathItem path = openAPI.getPaths().get(pathname);
|
||||
if (path.readOperations() == null) {
|
||||
continue;
|
||||
}
|
||||
String accepts = getAccept(openAPI, operation);
|
||||
operation.addExtension("x-accepts", accepts);
|
||||
for (Operation operation : path.readOperations()) {
|
||||
LOGGER.info("Processing operation " + operation.getOperationId());
|
||||
if (hasBodyParameter(openAPI, operation) || hasFormParameter(openAPI, operation)) {
|
||||
String defaultContentType = hasFormParameter(openAPI, operation) ? "application/x-www-form-urlencoded" : "application/json";
|
||||
List<String> consumes = new ArrayList<>(getConsumesInfo(openAPI, operation));
|
||||
String contentType = consumes == null || consumes.isEmpty() ? defaultContentType : consumes.get(0);
|
||||
operation.addExtension("x-contentType", contentType);
|
||||
}
|
||||
String accepts = getAccept(openAPI, operation);
|
||||
operation.addExtension("x-accepts", accepts);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// If no artifactVersion is provided in additional properties, version from API specification is used.
|
||||
// If none of them is provided then fallbacks to default version
|
||||
if (additionalProperties.containsKey(CodegenConstants.ARTIFACT_VERSION)) {
|
||||
this.setArtifactVersion((String) additionalProperties.get(CodegenConstants.ARTIFACT_VERSION));
|
||||
} else if (openAPI.getInfo() != null && openAPI.getInfo().getVersion() != null) {
|
||||
this.setArtifactVersion(openAPI.getInfo().getVersion());
|
||||
additionalProperties.put(CodegenConstants.ARTIFACT_VERSION, artifactVersion);
|
||||
} else {
|
||||
//not set, use to be passed to template
|
||||
additionalProperties.put(CodegenConstants.ARTIFACT_VERSION, artifactVersion);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
protected static String getAccept(OpenAPI openAPI, Operation operation) {
|
||||
private static String getAccept(OpenAPI openAPI, Operation operation) {
|
||||
String accepts = null;
|
||||
String defaultContentType = "application/json";
|
||||
Set<String> producesInfo = getProducesInfo(openAPI, operation);
|
||||
@@ -1212,66 +1210,130 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code
|
||||
this.invokerPackage = invokerPackage;
|
||||
}
|
||||
|
||||
public String getGroupId() {
|
||||
return groupId;
|
||||
}
|
||||
|
||||
public void setGroupId(String groupId) {
|
||||
this.groupId = groupId;
|
||||
}
|
||||
|
||||
public String getArtifactId() {
|
||||
return artifactId;
|
||||
}
|
||||
|
||||
public void setArtifactId(String artifactId) {
|
||||
this.artifactId = artifactId;
|
||||
}
|
||||
|
||||
public String getArtifactVersion() {
|
||||
return artifactVersion;
|
||||
}
|
||||
|
||||
public void setArtifactVersion(String artifactVersion) {
|
||||
this.artifactVersion = artifactVersion;
|
||||
}
|
||||
|
||||
public String getArtifactUrl() {
|
||||
return artifactUrl;
|
||||
}
|
||||
|
||||
public void setArtifactUrl(String artifactUrl) {
|
||||
this.artifactUrl = artifactUrl;
|
||||
}
|
||||
|
||||
public String getArtifactDescription() {
|
||||
return artifactDescription;
|
||||
}
|
||||
|
||||
public void setArtifactDescription(String artifactDescription) {
|
||||
this.artifactDescription = artifactDescription;
|
||||
}
|
||||
|
||||
public String getScmConnection() {
|
||||
return scmConnection;
|
||||
}
|
||||
|
||||
public void setScmConnection(String scmConnection) {
|
||||
this.scmConnection = scmConnection;
|
||||
}
|
||||
|
||||
public String getScmDeveloperConnection() {
|
||||
return scmDeveloperConnection;
|
||||
}
|
||||
|
||||
public void setScmDeveloperConnection(String scmDeveloperConnection) {
|
||||
this.scmDeveloperConnection = scmDeveloperConnection;
|
||||
}
|
||||
|
||||
public String getScmUrl() {
|
||||
return scmUrl;
|
||||
}
|
||||
|
||||
public void setScmUrl(String scmUrl) {
|
||||
this.scmUrl = scmUrl;
|
||||
}
|
||||
|
||||
public String getDeveloperName() {
|
||||
return developerName;
|
||||
}
|
||||
|
||||
public void setDeveloperName(String developerName) {
|
||||
this.developerName = developerName;
|
||||
}
|
||||
|
||||
public String getDeveloperEmail() {
|
||||
return developerEmail;
|
||||
}
|
||||
|
||||
public void setDeveloperEmail(String developerEmail) {
|
||||
this.developerEmail = developerEmail;
|
||||
}
|
||||
|
||||
public String getDeveloperOrganization() {
|
||||
return developerOrganization;
|
||||
}
|
||||
|
||||
public void setDeveloperOrganization(String developerOrganization) {
|
||||
this.developerOrganization = developerOrganization;
|
||||
}
|
||||
|
||||
public String getDeveloperOrganizationUrl() {
|
||||
return developerOrganizationUrl;
|
||||
}
|
||||
|
||||
public void setDeveloperOrganizationUrl(String developerOrganizationUrl) {
|
||||
this.developerOrganizationUrl = developerOrganizationUrl;
|
||||
}
|
||||
|
||||
public String getLicenseName() {
|
||||
return licenseName;
|
||||
}
|
||||
|
||||
public void setLicenseName(String licenseName) {
|
||||
this.licenseName = licenseName;
|
||||
}
|
||||
|
||||
public String getLicenseUrl() {
|
||||
return licenseUrl;
|
||||
}
|
||||
|
||||
public void setLicenseUrl(String licenseUrl) {
|
||||
this.licenseUrl = licenseUrl;
|
||||
}
|
||||
|
||||
public String getSourceFolder() {
|
||||
return sourceFolder;
|
||||
}
|
||||
|
||||
public void setSourceFolder(String sourceFolder) {
|
||||
this.sourceFolder = sourceFolder;
|
||||
}
|
||||
|
||||
public String getTestFolder() {
|
||||
return testFolder;
|
||||
}
|
||||
|
||||
public void setTestFolder(String testFolder) {
|
||||
this.testFolder = testFolder;
|
||||
}
|
||||
@@ -1280,6 +1342,10 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code
|
||||
this.serializeBigDecimalAsString = s;
|
||||
}
|
||||
|
||||
public Boolean getSerializableModel() {
|
||||
return serializableModel;
|
||||
}
|
||||
|
||||
public void setSerializableModel(Boolean serializableModel) {
|
||||
this.serializableModel = serializableModel;
|
||||
}
|
||||
@@ -1297,6 +1363,10 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code
|
||||
this.withXml = withXml;
|
||||
}
|
||||
|
||||
public String getDateLibrary() {
|
||||
return dateLibrary;
|
||||
}
|
||||
|
||||
public void setDateLibrary(String library) {
|
||||
this.dateLibrary = library;
|
||||
}
|
||||
@@ -1313,6 +1383,10 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code
|
||||
this.disableHtmlEscaping = disabled;
|
||||
}
|
||||
|
||||
public String getBooleanGetterPrefix() {
|
||||
return booleanGetterPrefix;
|
||||
}
|
||||
|
||||
public void setBooleanGetterPrefix(String booleanGetterPrefix) {
|
||||
this.booleanGetterPrefix = booleanGetterPrefix;
|
||||
}
|
||||
@@ -1351,19 +1425,6 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets version from API specification.
|
||||
*
|
||||
* @return API version
|
||||
*/
|
||||
private String getVersionFromSpecification() {
|
||||
if (this.openAPI != null && this.openAPI.getInfo() != null) {
|
||||
return this.openAPI.getInfo().getVersion();
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Builds a SNAPSHOT version from a given version.
|
||||
*
|
||||
|
||||
@@ -42,7 +42,7 @@ public abstract class AbstractJavaJAXRSServerCodegen extends AbstractJavaCodegen
|
||||
protected String implFolder = "src/main/java";
|
||||
protected String testResourcesFolder = "src/test/resources";
|
||||
protected String title = "OpenAPI Server";
|
||||
|
||||
protected String serverPort = "8080";
|
||||
protected boolean useBeanValidation = true;
|
||||
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(AbstractJavaJAXRSServerCodegen.class);
|
||||
@@ -54,19 +54,24 @@ public abstract class AbstractJavaJAXRSServerCodegen extends AbstractJavaCodegen
|
||||
invokerPackage = "org.openapitools.api";
|
||||
artifactId = "openapi-jaxrs-server";
|
||||
dateLibrary = "legacy"; //TODO: add joda support to all jax-rs
|
||||
|
||||
apiPackage = "org.openapitools.api";
|
||||
modelPackage = "org.openapitools.model";
|
||||
|
||||
// clioOptions default redifinition need to be updated
|
||||
updateOption(CodegenConstants.INVOKER_PACKAGE, this.getInvokerPackage());
|
||||
updateOption(CodegenConstants.ARTIFACT_ID, this.getArtifactId());
|
||||
updateOption(CodegenConstants.API_PACKAGE, apiPackage);
|
||||
updateOption(CodegenConstants.MODEL_PACKAGE, modelPackage);
|
||||
updateOption(this.DATE_LIBRARY, this.getDateLibrary());
|
||||
|
||||
additionalProperties.put("title", title);
|
||||
// java inflector uses the jackson lib
|
||||
additionalProperties.put("jackson", "true");
|
||||
|
||||
cliOptions.add(new CliOption(CodegenConstants.IMPL_FOLDER, CodegenConstants.IMPL_FOLDER_DESC));
|
||||
cliOptions.add(new CliOption("title", "a title describing the application"));
|
||||
|
||||
cliOptions.add(new CliOption(CodegenConstants.IMPL_FOLDER, CodegenConstants.IMPL_FOLDER_DESC).defaultValue(implFolder));
|
||||
cliOptions.add(new CliOption("title", "a title describing the application").defaultValue(title));
|
||||
cliOptions.add(CliOption.newBoolean(USE_BEANVALIDATION, "Use BeanValidation API annotations",useBeanValidation));
|
||||
cliOptions.add(new CliOption(SERVER_PORT, "The port on which the server should be started"));
|
||||
cliOptions.add(new CliOption(SERVER_PORT, "The port on which the server should be started").defaultValue(serverPort));
|
||||
}
|
||||
|
||||
|
||||
@@ -97,6 +102,7 @@ public abstract class AbstractJavaJAXRSServerCodegen extends AbstractJavaCodegen
|
||||
|
||||
@Override
|
||||
public void preprocessOpenAPI(OpenAPI openAPI) {
|
||||
super.preprocessOpenAPI(openAPI);
|
||||
/* TODO there should be no need for the following logic
|
||||
if ("/".equals(swagger.getBasePath())) {
|
||||
swagger.setBasePath("");
|
||||
@@ -106,7 +112,7 @@ public abstract class AbstractJavaJAXRSServerCodegen extends AbstractJavaCodegen
|
||||
if (!this.additionalProperties.containsKey(SERVER_PORT)) {
|
||||
URL url = URLPathUtils.getServerURL(openAPI);
|
||||
// 8080 is the default value for a JEE Server:
|
||||
this.additionalProperties.put(SERVER_PORT, URLPathUtils.getPort(url, 8080));
|
||||
this.additionalProperties.put(SERVER_PORT, URLPathUtils.getPort(url, serverPort));
|
||||
}
|
||||
|
||||
if (openAPI.getPaths() != null) {
|
||||
|
||||
@@ -41,6 +41,7 @@ public abstract class AbstractKotlinCodegen extends DefaultCodegen implements Co
|
||||
protected String artifactVersion = "1.0.0";
|
||||
protected String groupId = "org.openapitools";
|
||||
protected String packageName = "org.openapitools";
|
||||
protected String apiSuffix = "Api";
|
||||
|
||||
protected String sourceFolder = "src/main/kotlin";
|
||||
|
||||
@@ -195,6 +196,7 @@ public abstract class AbstractKotlinCodegen extends DefaultCodegen implements Co
|
||||
cliOptions.clear();
|
||||
addOption(CodegenConstants.SOURCE_FOLDER, CodegenConstants.SOURCE_FOLDER_DESC, sourceFolder);
|
||||
addOption(CodegenConstants.PACKAGE_NAME, "Generated artifact package name.", packageName);
|
||||
addOption(CodegenConstants.API_SUFFIX, CodegenConstants.API_SUFFIX_DESC, apiSuffix);
|
||||
addOption(CodegenConstants.GROUP_ID, "Generated artifact package's organization (i.e. maven groupId).", groupId);
|
||||
addOption(CodegenConstants.ARTIFACT_ID, "Generated artifact id (name of jar).", artifactId);
|
||||
addOption(CodegenConstants.ARTIFACT_VERSION, "Generated artifact's package version.", artifactVersion);
|
||||
@@ -337,6 +339,10 @@ public abstract class AbstractKotlinCodegen extends DefaultCodegen implements Co
|
||||
additionalProperties.put(CodegenConstants.PACKAGE_NAME, packageName);
|
||||
}
|
||||
|
||||
if (additionalProperties.containsKey(CodegenConstants.API_SUFFIX)) {
|
||||
this.setApiSuffix((String) additionalProperties.get(CodegenConstants.API_SUFFIX));
|
||||
}
|
||||
|
||||
if (additionalProperties.containsKey(CodegenConstants.ARTIFACT_ID)) {
|
||||
this.setArtifactId((String) additionalProperties.get(CodegenConstants.ARTIFACT_ID));
|
||||
} else {
|
||||
@@ -396,6 +402,10 @@ public abstract class AbstractKotlinCodegen extends DefaultCodegen implements Co
|
||||
this.packageName = packageName;
|
||||
}
|
||||
|
||||
public void setApiSuffix(String apiSuffix) {
|
||||
this.apiSuffix = apiSuffix;
|
||||
}
|
||||
|
||||
public void setSourceFolder(String sourceFolder) {
|
||||
this.sourceFolder = sourceFolder;
|
||||
}
|
||||
@@ -463,6 +473,14 @@ public abstract class AbstractKotlinCodegen extends DefaultCodegen implements Co
|
||||
return super.toInstantiationType(p);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toApiName(String name) {
|
||||
if (name.length() == 0) {
|
||||
return "DefaultApi";
|
||||
}
|
||||
return (this.apiSuffix.isEmpty() ? camelize(name) : camelize(name) + this.apiSuffix);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the fully-qualified "Model" name for import
|
||||
*
|
||||
@@ -717,7 +735,7 @@ public abstract class AbstractKotlinCodegen extends DefaultCodegen implements Co
|
||||
}
|
||||
|
||||
// if it's all uppper case, do nothing
|
||||
if (name.matches("^[A-Z_]*$")) {
|
||||
if (name.matches("^[A-Z0-9_]*$")) {
|
||||
return name;
|
||||
}
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ public abstract class AbstractTypeScriptClientCodegen extends DefaultCodegen imp
|
||||
private static final String UNDEFINED_VALUE = "undefined";
|
||||
|
||||
protected String modelPropertyNaming = "camelCase";
|
||||
protected Boolean supportsES6 = true;
|
||||
protected Boolean supportsES6 = false;
|
||||
protected HashSet<String> languageGenericTypes;
|
||||
|
||||
public AbstractTypeScriptClientCodegen() {
|
||||
@@ -120,7 +120,7 @@ public abstract class AbstractTypeScriptClientCodegen extends DefaultCodegen imp
|
||||
typeMapping.put("Error", "Error");
|
||||
|
||||
cliOptions.add(new CliOption(CodegenConstants.MODEL_PROPERTY_NAMING, CodegenConstants.MODEL_PROPERTY_NAMING_DESC).defaultValue("camelCase"));
|
||||
cliOptions.add(new CliOption(CodegenConstants.SUPPORTS_ES6, CodegenConstants.SUPPORTS_ES6_DESC).defaultValue("false"));
|
||||
cliOptions.add(new CliOption(CodegenConstants.SUPPORTS_ES6, CodegenConstants.SUPPORTS_ES6_DESC).defaultValue(String.valueOf(this.getSupportsES6())));
|
||||
|
||||
}
|
||||
|
||||
@@ -130,6 +130,10 @@ public abstract class AbstractTypeScriptClientCodegen extends DefaultCodegen imp
|
||||
|
||||
if (StringUtils.isEmpty(System.getenv("TS_POST_PROCESS_FILE"))) {
|
||||
LOGGER.info("Hint: Environment variable 'TS_POST_PROCESS_FILE' (optional) not defined. E.g. to format the source code, please try 'export TS_POST_PROCESS_FILE=\"/usr/local/bin/prettier --write\"' (Linux/Mac)");
|
||||
LOGGER.info("Note: To enable file post-processing, 'enablePostProcessFile' must be set to `true` (--enable-post-process-file for CLI).");
|
||||
}
|
||||
else if (!this.isEnablePostProcessFile()) {
|
||||
LOGGER.info("Warning: Environment variable 'TS_POST_PROCESS_FILE' is set but file post-processing is not enabled. To enable file post-processing, 'enablePostProcessFile' must be set to `true` (--enable-post-process-file for CLI).");
|
||||
}
|
||||
|
||||
if (additionalProperties.containsKey(CodegenConstants.MODEL_PROPERTY_NAMING)) {
|
||||
|
||||
@@ -142,9 +142,9 @@ public class AspNetCoreServerCodegen extends AbstractCSharpCodegen {
|
||||
|
||||
addOption(COMPATIBILITY_VERSION, "ASP.Net Core CompatibilityVersion", compatibilityVersion);
|
||||
|
||||
aspnetCoreVersion.addEnum("2.0", "ASP.NET COre V2.0");
|
||||
aspnetCoreVersion.addEnum("2.1", "ASP.NET COre V2.1");
|
||||
aspnetCoreVersion.addEnum("2.2", "ASP.NET COre V2.2");
|
||||
aspnetCoreVersion.addEnum("2.0", "ASP.NET COre 2.0");
|
||||
aspnetCoreVersion.addEnum("2.1", "ASP.NET Core 2.1");
|
||||
aspnetCoreVersion.addEnum("2.2", "ASP.NET Core 2.2");
|
||||
aspnetCoreVersion.setDefault("2.2");
|
||||
aspnetCoreVersion.setOptValue(aspnetCoreVersion.getDefault());
|
||||
addOption(aspnetCoreVersion.getOpt(), aspnetCoreVersion.getDescription(), aspnetCoreVersion.getOptValue());
|
||||
@@ -180,13 +180,13 @@ public class AspNetCoreServerCodegen extends AbstractCSharpCodegen {
|
||||
classModifier.setOptValue(classModifier.getDefault());
|
||||
addOption(classModifier.getOpt(), classModifier.getDescription(), classModifier.getOptValue());
|
||||
|
||||
operationModifier.addEnum("virtual", "Keep method virtual ");
|
||||
operationModifier.addEnum("virtual", "Keep method virtual");
|
||||
operationModifier.addEnum("abstract", "Make method abstract");
|
||||
operationModifier.setDefault("virtual");
|
||||
operationModifier.setOptValue(operationModifier.getDefault());
|
||||
addOption(operationModifier.getOpt(), operationModifier.getDescription(), operationModifier.getOptValue());
|
||||
|
||||
buildTarget.addEnum("program", "Generate code for standalone server");
|
||||
buildTarget.addEnum("program", "Generate code for a standalone server");
|
||||
buildTarget.addEnum("library", "Generate code for a server abstract class lbrary");
|
||||
buildTarget.setDefault("program");
|
||||
buildTarget.setOptValue(buildTarget.getDefault());
|
||||
@@ -197,7 +197,7 @@ public class AspNetCoreServerCodegen extends AbstractCSharpCodegen {
|
||||
generateBody);
|
||||
|
||||
addSwitch(OPERATION_IS_ASYNC,
|
||||
"Set methods to async or sync.",
|
||||
"Set methods to async or sync (default).",
|
||||
operationIsAsync);
|
||||
|
||||
addSwitch(OPERATION_RESULT_TASK,
|
||||
|
||||
@@ -22,9 +22,16 @@ import org.openapitools.codegen.CodegenConstants;
|
||||
import org.openapitools.codegen.CodegenType;
|
||||
import org.openapitools.codegen.SupportingFile;
|
||||
|
||||
import org.openapitools.codegen.meta.GeneratorMetadata;
|
||||
import org.openapitools.codegen.meta.Stability;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
public class CSharpDotNet2ClientCodegen extends AbstractCSharpCodegen {
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(CSharpDotNet2ClientCodegen.class);
|
||||
|
||||
public static final String CLIENT_PACKAGE = "clientPackage";
|
||||
protected String clientPackage = "Org.OpenAPITools.Client";
|
||||
protected String apiDocPath = "docs/";
|
||||
@@ -33,6 +40,10 @@ public class CSharpDotNet2ClientCodegen extends AbstractCSharpCodegen {
|
||||
public CSharpDotNet2ClientCodegen() {
|
||||
super();
|
||||
|
||||
generatorMetadata = GeneratorMetadata.newBuilder(generatorMetadata)
|
||||
.stability(Stability.DEPRECATED)
|
||||
.build();
|
||||
|
||||
// clear import mapping (from default generator) as C# (2.0) does not use it
|
||||
// at the moment
|
||||
importMapping.clear();
|
||||
@@ -62,6 +73,8 @@ public class CSharpDotNet2ClientCodegen extends AbstractCSharpCodegen {
|
||||
|
||||
@Override
|
||||
public void processOpts() {
|
||||
LOGGER.warn("Per Microsoft Product Lifecycle (https://support.microsoft.com/en-us/lifecycle/search?sort=PN&alpha=.NET%20Framework&Filter=FilterNO), support for .NET Framework 2.0 ended in 2011 so there may be security issues using the auto-generated C# 2.0 source code.");
|
||||
|
||||
super.processOpts();
|
||||
|
||||
if (additionalProperties.containsKey(CLIENT_PACKAGE)) {
|
||||
|
||||
@@ -264,7 +264,7 @@ public class CppPistacheServerCodegen extends AbstractCppCodegen {
|
||||
|
||||
@Override
|
||||
public String toModelFilename(String name) {
|
||||
return camelize(toModelName(name));
|
||||
return toModelName(name);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -285,7 +285,7 @@ public class CppPistacheServerCodegen extends AbstractCppCodegen {
|
||||
|
||||
@Override
|
||||
public String toApiFilename(String name) {
|
||||
return modelNamePrefix + camelize(name) + "Api";
|
||||
return toApiName(name);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -17,11 +17,16 @@
|
||||
|
||||
package org.openapitools.codegen.languages;
|
||||
|
||||
import io.swagger.v3.oas.models.OpenAPI;
|
||||
import io.swagger.v3.oas.models.servers.Server;
|
||||
|
||||
import org.openapitools.codegen.CodegenConfig;
|
||||
import org.openapitools.codegen.CodegenType;
|
||||
import org.openapitools.codegen.SupportingFile;
|
||||
import org.openapitools.codegen.utils.URLPathUtils;
|
||||
|
||||
import java.io.File;
|
||||
import java.net.URL;
|
||||
|
||||
import static org.openapitools.codegen.utils.StringUtils.*;
|
||||
|
||||
@@ -188,7 +193,14 @@ public class CppQt5QHttpEngineServerCodegen extends CppQt5AbstractCodegen implem
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void preprocessOpenAPI(OpenAPI openAPI) {
|
||||
URL url = URLPathUtils.getServerURL(openAPI);
|
||||
String port = URLPathUtils.getPort(url, "8080");
|
||||
this.additionalProperties.put("serverPort", port);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toApiFilename(String name) {
|
||||
return modelNamePrefix + sanitizeName(camelize(name)) + "ApiHandler";
|
||||
|
||||
@@ -289,12 +289,12 @@ public class CppRestSdkClientCodegen extends AbstractCppCodegen {
|
||||
|
||||
@Override
|
||||
public String toModelFilename(String name) {
|
||||
return sanitizeName(toModelName(name));
|
||||
return toModelName(name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toApiFilename(String name) {
|
||||
return sanitizeName(toModelName(name) + "Api");
|
||||
return toApiName(name);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -193,12 +193,12 @@ public class CppRestbedServerCodegen extends AbstractCppCodegen {
|
||||
|
||||
@Override
|
||||
public String toModelFilename(String name) {
|
||||
return camelize(name);
|
||||
return toModelName(name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toApiFilename(String name) {
|
||||
return camelize(name) + "Api";
|
||||
return toApiName(name);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
|
||||
@@ -694,7 +694,10 @@ public class ElmClientCodegen extends DefaultCodegen implements CodegenConfig {
|
||||
}
|
||||
final String prefix = toEnumName(property);
|
||||
for (Map<String, Object> enumVar : enumVars) {
|
||||
enumVar.put("name", prefix + enumVar.get("name"));
|
||||
if (!enumVar.containsKey("_isPrefixed")) {
|
||||
enumVar.put("name", prefix + enumVar.get("name"));
|
||||
enumVar.put("_isPrefixed", true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,287 @@
|
||||
/*
|
||||
* Copyright 2018 OpenAPI-Generator Contributors (https://openapi-generator.tech)
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.openapitools.codegen.languages;
|
||||
|
||||
import com.samskivert.mustache.Mustache;
|
||||
import io.swagger.v3.oas.models.OpenAPI;
|
||||
import sun.reflect.generics.reflectiveObjects.NotImplementedException;
|
||||
|
||||
import org.openapitools.codegen.CodegenConstants;
|
||||
import org.openapitools.codegen.CodegenOperation;
|
||||
import org.openapitools.codegen.CodegenType;
|
||||
import org.openapitools.codegen.SupportingFile;
|
||||
import org.openapitools.codegen.CodegenModel;
|
||||
import org.openapitools.codegen.CodegenProperty;
|
||||
import org.openapitools.codegen.utils.URLPathUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.io.File;
|
||||
import java.net.URL;
|
||||
import java.util.Arrays;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.List;
|
||||
import java.util.ArrayList;
|
||||
|
||||
import static java.util.UUID.randomUUID;
|
||||
|
||||
public class FsharpGiraffeServerCodegen extends AbstractFSharpCodegen {
|
||||
|
||||
public static final String USE_SWASHBUCKLE = "useSwashbuckle";
|
||||
public static final String GENERATE_BODY = "generateBody";
|
||||
public static final String BUILD_TARGET = "buildTarget";
|
||||
|
||||
public static final String PROJECT_SDK = "projectSdk";
|
||||
public static final String SDK_WEB = "Microsoft.NET.Sdk.Web";
|
||||
public static final String SDK_LIB = "Microsoft.NET.Sdk";
|
||||
|
||||
private String packageGuid = "{" + randomUUID().toString().toUpperCase(Locale.ROOT) + "}";
|
||||
|
||||
@SuppressWarnings("hiding")
|
||||
protected Logger LOGGER = LoggerFactory.getLogger(FsharpGiraffeServerCodegen.class);
|
||||
|
||||
private boolean useSwashbuckle = false;
|
||||
protected int serverPort = 8080;
|
||||
protected String serverHost = "0.0.0.0";
|
||||
private boolean generateBody = true;
|
||||
private String buildTarget = "program";
|
||||
private String projectSdk = SDK_WEB;
|
||||
|
||||
public FsharpGiraffeServerCodegen() {
|
||||
super();
|
||||
|
||||
modelPackage = "Model";
|
||||
|
||||
apiTemplateFiles.put("Handler.mustache", "Handler.fs");
|
||||
apiTemplateFiles.put("HandlerParams.mustache", "HandlerParams.fs");
|
||||
apiTemplateFiles.put("ServiceInterface.mustache", "ServiceInterface.fs");
|
||||
apiTemplateFiles.put("ServiceImpl.mustache", "Service.fs");
|
||||
apiTestTemplateFiles.put("HandlerTests.mustache", ".fs");
|
||||
apiTestTemplateFiles.put("HandlerTestsHelper.mustache", "Helper.fs");
|
||||
modelTemplateFiles.put("Model.mustache", ".fs");
|
||||
|
||||
embeddedTemplateDir = templateDir = "fsharp-giraffe-server";
|
||||
|
||||
cliOptions.clear();
|
||||
|
||||
// CLI options
|
||||
addOption(CodegenConstants.LICENSE_URL,
|
||||
CodegenConstants.LICENSE_URL_DESC,
|
||||
licenseUrl);
|
||||
|
||||
addOption(CodegenConstants.LICENSE_NAME,
|
||||
CodegenConstants.LICENSE_NAME_DESC,
|
||||
licenseName);
|
||||
|
||||
addOption(CodegenConstants.PACKAGE_COPYRIGHT,
|
||||
CodegenConstants.PACKAGE_COPYRIGHT_DESC,
|
||||
packageCopyright);
|
||||
|
||||
addOption(CodegenConstants.PACKAGE_AUTHORS,
|
||||
CodegenConstants.PACKAGE_AUTHORS_DESC,
|
||||
packageAuthors);
|
||||
|
||||
addOption(CodegenConstants.PACKAGE_TITLE,
|
||||
CodegenConstants.PACKAGE_TITLE_DESC,
|
||||
packageTitle);
|
||||
|
||||
addOption(CodegenConstants.PACKAGE_NAME,
|
||||
"F# module name (convention: Title.Case).",
|
||||
packageName);
|
||||
|
||||
addOption(CodegenConstants.PACKAGE_VERSION,
|
||||
"F# package version.",
|
||||
packageVersion);
|
||||
|
||||
addOption(CodegenConstants.OPTIONAL_PROJECT_GUID,
|
||||
CodegenConstants.OPTIONAL_PROJECT_GUID_DESC,
|
||||
null);
|
||||
|
||||
addOption(CodegenConstants.SOURCE_FOLDER,
|
||||
CodegenConstants.SOURCE_FOLDER_DESC,
|
||||
sourceFolder);
|
||||
|
||||
// CLI Switches
|
||||
addSwitch(CodegenConstants.SORT_PARAMS_BY_REQUIRED_FLAG,
|
||||
CodegenConstants.SORT_PARAMS_BY_REQUIRED_FLAG_DESC,
|
||||
sortParamsByRequiredFlag);
|
||||
|
||||
addSwitch(CodegenConstants.USE_DATETIME_OFFSET,
|
||||
CodegenConstants.USE_DATETIME_OFFSET_DESC,
|
||||
useDateTimeOffsetFlag);
|
||||
|
||||
addSwitch(CodegenConstants.USE_COLLECTION,
|
||||
CodegenConstants.USE_COLLECTION_DESC,
|
||||
useCollection);
|
||||
|
||||
addSwitch(CodegenConstants.RETURN_ICOLLECTION,
|
||||
CodegenConstants.RETURN_ICOLLECTION_DESC,
|
||||
returnICollection);
|
||||
|
||||
addSwitch(USE_SWASHBUCKLE,
|
||||
"Uses the Swashbuckle.AspNetCore NuGet package for documentation.",
|
||||
useSwashbuckle);
|
||||
|
||||
addSwitch(GENERATE_BODY,
|
||||
"Generates method body.",
|
||||
generateBody);
|
||||
|
||||
addOption(BUILD_TARGET,
|
||||
"Target the build for a program or library.",
|
||||
buildTarget);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public CodegenType getTag() {
|
||||
return CodegenType.SERVER;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return "fsharp-giraffe-server";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getHelp() {
|
||||
return "Generates a F# Giraffe server (beta).";
|
||||
}
|
||||
|
||||
@Override
|
||||
public void preprocessOpenAPI(OpenAPI openAPI) {
|
||||
super.preprocessOpenAPI(openAPI);
|
||||
URL url = URLPathUtils.getServerURL(openAPI);
|
||||
additionalProperties.put("serverHost", url.getHost());
|
||||
additionalProperties.put("serverPort", URLPathUtils.getPort(url, 8080));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void processOpts() {
|
||||
super.processOpts();
|
||||
boolean isLibrary = false;
|
||||
|
||||
if (additionalProperties.containsKey(CodegenConstants.OPTIONAL_PROJECT_GUID)) {
|
||||
setPackageGuid((String) additionalProperties.get(CodegenConstants.OPTIONAL_PROJECT_GUID));
|
||||
}
|
||||
additionalProperties.put("packageGuid", packageGuid);
|
||||
|
||||
if (additionalProperties.containsKey(USE_SWASHBUCKLE)) {
|
||||
useSwashbuckle = convertPropertyToBooleanAndWriteBack(USE_SWASHBUCKLE);
|
||||
} else {
|
||||
additionalProperties.put(USE_SWASHBUCKLE, useSwashbuckle);
|
||||
}
|
||||
|
||||
additionalProperties.put(PROJECT_SDK, projectSdk);
|
||||
|
||||
// TODO - should we be supporting a Giraffe class library?
|
||||
if (isLibrary)
|
||||
LOGGER.warn("Library flag not currently supported.");
|
||||
|
||||
String authFolder = sourceFolder + File.separator + "auth";
|
||||
String serviceFolder = sourceFolder + File.separator + "services";
|
||||
String implFolder = sourceFolder + File.separator + "impl";
|
||||
String helperFolder = sourceFolder + File.separator + "helpers";
|
||||
|
||||
supportingFiles.add(new SupportingFile("build.sh.mustache", projectFolder, "build.sh"));
|
||||
supportingFiles.add(new SupportingFile("build.bat.mustache", projectFolder, "build.bat"));
|
||||
supportingFiles.add(new SupportingFile("README.mustache", projectFolder, "README.md"));
|
||||
supportingFiles.add(new SupportingFile("gitignore.mustache", projectFolder, ".gitignore"));
|
||||
supportingFiles.add(new SupportingFile("Project.fsproj.mustache", sourceFolder, packageName + ".fsproj"));
|
||||
supportingFiles.add(new SupportingFile("Program.mustache", sourceFolder, "Program.fs"));
|
||||
supportingFiles.add(new SupportingFile("AuthSchemes.mustache", authFolder, "AuthSchemes.fs"));
|
||||
supportingFiles.add(new SupportingFile("Helpers.mustache", helperFolder, "Helpers.fs"));
|
||||
supportingFiles.add(new SupportingFile("CustomHandlers.mustache", implFolder, "CustomHandlers.fs"));
|
||||
supportingFiles.add(new SupportingFile("Project.Tests.fsproj.mustache", testFolder, packageName + "Tests.fsproj"));
|
||||
supportingFiles.add(new SupportingFile("TestHelper.mustache", testFolder, "TestHelper.fs"));
|
||||
|
||||
// TODO - support Swashbuckle
|
||||
if (useSwashbuckle)
|
||||
LOGGER.warn("Swashbuckle flag not currently supported, this will be ignored.");
|
||||
}
|
||||
|
||||
public void setPackageGuid(String packageGuid) {
|
||||
this.packageGuid = packageGuid;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String modelFileFolder() {
|
||||
return super.modelFileFolder().replace("Model", "model");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String apiFileFolder() {
|
||||
return super.apiFileFolder() + File.separator + "api";
|
||||
}
|
||||
|
||||
private String implFileFolder() {
|
||||
return outputFolder + File.separator + sourceFolder + File.separator + "impl";
|
||||
}
|
||||
|
||||
@Override()
|
||||
public String toModelImport(String name) {
|
||||
return packageName + "." + modelPackage() + "." + name;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String apiFilename(String templateName, String tag) {
|
||||
String result = super.apiFilename(templateName, tag);
|
||||
if (templateName.endsWith("Impl.mustache")) {
|
||||
int ix = result.lastIndexOf(File.separatorChar);
|
||||
result = result.substring(0, ix) + result.substring(ix, result.length() - 2) + "fs";
|
||||
result = result.replace(apiFileFolder(), implFileFolder());
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public Map<String, Object> postProcessSupportingFileData(Map<String, Object> objs) {
|
||||
generateJSONSpecFile(objs);
|
||||
generateYAMLSpecFile(objs);
|
||||
return super.postProcessSupportingFileData(objs);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void processOperation(CodegenOperation operation) {
|
||||
super.processOperation(operation);
|
||||
|
||||
// HACK: Unlikely in the wild, but we need to clean operation paths for MVC Routing
|
||||
if (operation.path != null) {
|
||||
String original = operation.path;
|
||||
operation.path = operation.path.replace("?", "/");
|
||||
if (!original.equals(operation.path)) {
|
||||
LOGGER.warn("Normalized " + original + " to " + operation.path + ". Please verify generated source.");
|
||||
}
|
||||
}
|
||||
|
||||
// Converts, for example, PUT to HttpPut for controller attributes
|
||||
operation.httpMethod = "Http" + operation.httpMethod.substring(0, 1) + operation.httpMethod.substring(1).toLowerCase(Locale.ROOT);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Mustache.Compiler processCompiler(Mustache.Compiler compiler) {
|
||||
// To avoid unexpected behaviors when options are passed programmatically such as { "useCollection": "" }
|
||||
return super.processCompiler(compiler).emptyStringIsFalse(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toRegularExpression(String pattern) {
|
||||
return escapeText(pattern);
|
||||
}
|
||||
}
|
||||
@@ -60,7 +60,6 @@ public class GoClientCodegen extends AbstractGoCodegen {
|
||||
CodegenConstants.PREPEND_FORM_OR_BODY_PARAMETERS,
|
||||
CodegenConstants.PREPEND_FORM_OR_BODY_PARAMETERS_DESC)
|
||||
.defaultValue(Boolean.FALSE.toString()));
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -95,6 +94,8 @@ public class GoClientCodegen extends AbstractGoCodegen {
|
||||
supportingFiles.add(new SupportingFile("configuration.mustache", "", "configuration.go"));
|
||||
supportingFiles.add(new SupportingFile("client.mustache", "", "client.go"));
|
||||
supportingFiles.add(new SupportingFile("response.mustache", "", "response.go"));
|
||||
supportingFiles.add(new SupportingFile("go.mod.mustache", "", "go.mod"));
|
||||
supportingFiles.add(new SupportingFile("go.sum", "", "go.sum"));
|
||||
supportingFiles.add(new SupportingFile(".travis.yml", "", ".travis.yml"));
|
||||
|
||||
if (additionalProperties.containsKey(WITH_GO_CODEGEN_COMMENT)) {
|
||||
|
||||
@@ -17,19 +17,16 @@
|
||||
|
||||
package org.openapitools.codegen.languages;
|
||||
|
||||
import org.openapitools.codegen.CliOption;
|
||||
import org.openapitools.codegen.CodegenType;
|
||||
import org.openapitools.codegen.SupportingFile;
|
||||
import org.openapitools.codegen.*;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import static org.openapitools.codegen.utils.StringUtils.camelize;
|
||||
|
||||
|
||||
public class GroovyClientCodegen extends AbstractJavaCodegen {
|
||||
public static final String CONFIG_PACKAGE = "configPackage";
|
||||
protected String title = "Petstore Server";
|
||||
protected String configPackage = "";
|
||||
|
||||
public GroovyClientCodegen() {
|
||||
super();
|
||||
@@ -40,7 +37,7 @@ public class GroovyClientCodegen extends AbstractJavaCodegen {
|
||||
languageSpecificPrimitives.add("File");
|
||||
languageSpecificPrimitives.add("Map");
|
||||
|
||||
sourceFolder = projectFolder + File.separator + "groovy";
|
||||
sourceFolder = projectFolder + "/groovy";
|
||||
outputFolder = "generated-code/groovy";
|
||||
modelTemplateFiles.put("model.mustache", ".groovy");
|
||||
apiTemplateFiles.put("api.mustache", ".groovy");
|
||||
@@ -55,15 +52,18 @@ public class GroovyClientCodegen extends AbstractJavaCodegen {
|
||||
|
||||
apiPackage = "org.openapitools.api";
|
||||
modelPackage = "org.openapitools.model";
|
||||
configPackage = "org.openapitools.configuration";
|
||||
invokerPackage = "org.openapitools.api";
|
||||
artifactId = "openapi-groovy";
|
||||
dateLibrary = "legacy"; //TODO: add joda support to groovy
|
||||
|
||||
additionalProperties.put("title", title);
|
||||
additionalProperties.put(CONFIG_PACKAGE, configPackage);
|
||||
// clioOptions default redefinition need to be updated
|
||||
updateOption(CodegenConstants.SOURCE_FOLDER, this.getSourceFolder());
|
||||
updateOption(CodegenConstants.INVOKER_PACKAGE, this.getInvokerPackage());
|
||||
updateOption(CodegenConstants.ARTIFACT_ID, this.getArtifactId());
|
||||
updateOption(CodegenConstants.API_PACKAGE, apiPackage);
|
||||
updateOption(CodegenConstants.MODEL_PACKAGE, modelPackage);
|
||||
updateOption(DATE_LIBRARY, this.getDateLibrary());
|
||||
|
||||
cliOptions.add(new CliOption(CONFIG_PACKAGE, "configuration package for generated code"));
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -78,25 +78,32 @@ public class GroovyClientCodegen extends AbstractJavaCodegen {
|
||||
|
||||
@Override
|
||||
public String getHelp() {
|
||||
return "Generates a Groovy API client (beta).";
|
||||
return "Generates a Groovy API client.";
|
||||
}
|
||||
|
||||
@Override
|
||||
public void processOpts() {
|
||||
super.processOpts();
|
||||
|
||||
if (additionalProperties.containsKey(CONFIG_PACKAGE)) {
|
||||
this.setConfigPackage((String) additionalProperties.get(CONFIG_PACKAGE));
|
||||
}
|
||||
|
||||
supportingFiles.add(new SupportingFile("build.gradle.mustache", "", "build.gradle"));
|
||||
// TODO readme to be added later
|
||||
//supportingFiles.add(new SupportingFile("README.mustache", "", "README.md"));
|
||||
supportingFiles.add(new SupportingFile("README.mustache", "", "README.md"));
|
||||
supportingFiles.add(new SupportingFile("ApiUtils.mustache",
|
||||
(sourceFolder + File.separator + apiPackage).replace(".", java.io.File.separator), "ApiUtils.groovy"));
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> postProcessOperationsWithModels(Map<String, Object> operations, List<Object> allModels) {
|
||||
Map<String, Object> objs = (Map<String, Object>) operations.get("operations");
|
||||
|
||||
List<CodegenOperation> ops = (List<CodegenOperation>) objs.get("operation");
|
||||
for (CodegenOperation op : ops) {
|
||||
// Overwrite path to map variable with path parameters
|
||||
op.path = op.path.replace("{", "${");
|
||||
}
|
||||
return operations;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toApiName(String name) {
|
||||
if (name.length() == 0) {
|
||||
@@ -106,10 +113,6 @@ public class GroovyClientCodegen extends AbstractJavaCodegen {
|
||||
return camelize(name) + "Api";
|
||||
}
|
||||
|
||||
public void setConfigPackage(String configPackage) {
|
||||
this.configPackage = configPackage;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String escapeQuotationMark(String input) {
|
||||
// remove ' to avoid code injection
|
||||
|
||||
@@ -301,7 +301,6 @@ public class HaskellServantCodegen extends DefaultCodegen implements CodegenConf
|
||||
*/
|
||||
private void setGenerateToSchema(CodegenModel model) {
|
||||
for (CodegenProperty var : model.vars) {
|
||||
LOGGER.warn(var.dataType);
|
||||
if (var.dataType.contentEquals("Value") || var.dataType.contains(" Value")) {
|
||||
additionalProperties.put("generateToSchema", false);
|
||||
}
|
||||
@@ -349,7 +348,7 @@ public class HaskellServantCodegen extends DefaultCodegen implements CodegenConf
|
||||
@Override
|
||||
public String getSchemaType(Schema p) {
|
||||
String schemaType = super.getSchemaType(p);
|
||||
LOGGER.debug("debugging swager type: " + p.getType() + ", " + p.getFormat() + " => " + schemaType);
|
||||
LOGGER.debug("debugging OpenAPI type: " + p.getType() + ", " + p.getFormat() + " => " + schemaType);
|
||||
String type = null;
|
||||
if (typeMapping.containsKey(schemaType)) {
|
||||
type = typeMapping.get(schemaType);
|
||||
|
||||
@@ -58,12 +58,18 @@ public class JavaCXFClientCodegen extends AbstractJavaCodegen
|
||||
invokerPackage = "org.openapitools.api";
|
||||
artifactId = "openapi-jaxrs-client";
|
||||
dateLibrary = "legacy"; //TODO: add joda support to all jax-rs
|
||||
|
||||
apiPackage = "org.openapitools.api";
|
||||
modelPackage = "org.openapitools.model";
|
||||
|
||||
outputFolder = "generated-code/JavaJaxRS-CXF";
|
||||
|
||||
// clioOptions default redifinition need to be updated
|
||||
updateOption(CodegenConstants.SOURCE_FOLDER, this.getSourceFolder());
|
||||
updateOption(CodegenConstants.INVOKER_PACKAGE, this.getInvokerPackage());
|
||||
updateOption(CodegenConstants.ARTIFACT_ID, this.getArtifactId());
|
||||
updateOption(CodegenConstants.API_PACKAGE, apiPackage);
|
||||
updateOption(CodegenConstants.MODEL_PACKAGE, modelPackage);
|
||||
updateOption(this.DATE_LIBRARY, this.getDateLibrary());
|
||||
|
||||
// clear model and api doc template as this codegen
|
||||
// does not support auto-generated markdown doc at the moment
|
||||
//TODO: add doc templates
|
||||
@@ -72,16 +78,13 @@ public class JavaCXFClientCodegen extends AbstractJavaCodegen
|
||||
|
||||
|
||||
typeMapping.put("date", "LocalDate");
|
||||
|
||||
importMapping.put("LocalDate", "org.joda.time.LocalDate");
|
||||
|
||||
embeddedTemplateDir = templateDir = JAXRS_TEMPLATE_DIRECTORY_NAME + File.separator + "cxf";
|
||||
|
||||
cliOptions.add(CliOption.newBoolean(USE_BEANVALIDATION, "Use BeanValidation API annotations"));
|
||||
|
||||
cliOptions.add(CliOption.newBoolean(USE_GZIP_FEATURE_FOR_TESTS, "Use Gzip Feature for tests"));
|
||||
cliOptions.add(CliOption.newBoolean(USE_LOGGING_FEATURE_FOR_TESTS, "Use Logging Feature for tests"));
|
||||
|
||||
cliOptions.add(CliOption.newBoolean(USE_GENERIC_RESPONSE, "Use generic response"));
|
||||
}
|
||||
|
||||
|
||||
@@ -77,6 +77,9 @@ public class JavaCXFServerCodegen extends AbstractJavaJAXRSServerCodegen
|
||||
|
||||
outputFolder = "generated-code/JavaJaxRS-CXF";
|
||||
|
||||
// clioOptions default redifinition need to be updated
|
||||
updateOption(CodegenConstants.ARTIFACT_ID, this.getArtifactId());
|
||||
|
||||
apiTemplateFiles.put("apiServiceImpl.mustache", ".java");
|
||||
|
||||
// clear model and api doc template as this codegen
|
||||
|
||||
@@ -94,6 +94,7 @@ public class JavaClientCodegen extends AbstractJavaCodegen
|
||||
|
||||
public JavaClientCodegen() {
|
||||
super();
|
||||
|
||||
outputFolder = "generated-code" + File.separator + "java";
|
||||
embeddedTemplateDir = templateDir = "Java";
|
||||
invokerPackage = "org.openapitools.client";
|
||||
@@ -101,6 +102,12 @@ public class JavaClientCodegen extends AbstractJavaCodegen
|
||||
apiPackage = "org.openapitools.client.api";
|
||||
modelPackage = "org.openapitools.client.model";
|
||||
|
||||
// cliOptions default redefinition need to be updated
|
||||
updateOption(CodegenConstants.INVOKER_PACKAGE, this.getInvokerPackage());
|
||||
updateOption(CodegenConstants.ARTIFACT_ID, this.getArtifactId());
|
||||
updateOption(CodegenConstants.API_PACKAGE, apiPackage);
|
||||
updateOption(CodegenConstants.MODEL_PACKAGE, modelPackage);
|
||||
|
||||
modelTestTemplateFiles.put("model_test.mustache", ".java");
|
||||
|
||||
cliOptions.add(CliOption.newBoolean(USE_RX_JAVA, "Whether to use the RxJava adapter with the retrofit2 library."));
|
||||
|
||||
@@ -46,6 +46,8 @@ public class JavaInflectorServerCodegen extends AbstractJavaCodegen {
|
||||
invokerPackage = "org.openapitools.controllers";
|
||||
artifactId = "openapi-inflector-server";
|
||||
dateLibrary = "legacy"; //TODO: add joda support
|
||||
apiPackage = GeneratorProperties.getProperty("swagger.codegen.inflector.apipackage", "org.openapitools.controllers");
|
||||
modelPackage = GeneratorProperties.getProperty("swagger.codegen.inflector.modelpackage", "org.openapitools.model");
|
||||
|
||||
// clear model and api doc template as this codegen
|
||||
// does not support auto-generated markdown doc at the moment
|
||||
@@ -53,9 +55,13 @@ public class JavaInflectorServerCodegen extends AbstractJavaCodegen {
|
||||
modelDocTemplateFiles.remove("model_doc.mustache");
|
||||
apiDocTemplateFiles.remove("api_doc.mustache");
|
||||
|
||||
|
||||
apiPackage = GeneratorProperties.getProperty("swagger.codegen.inflector.apipackage", "org.openapitools.controllers");
|
||||
modelPackage = GeneratorProperties.getProperty("swagger.codegen.inflector.modelpackage", "org.openapitools.model");
|
||||
// clioOptions default redifinition need to be updated
|
||||
updateOption(CodegenConstants.SOURCE_FOLDER, this.getSourceFolder());
|
||||
updateOption(CodegenConstants.INVOKER_PACKAGE, this.getInvokerPackage());
|
||||
updateOption(CodegenConstants.ARTIFACT_ID, this.getArtifactId());
|
||||
updateOption(CodegenConstants.API_PACKAGE, apiPackage);
|
||||
updateOption(CodegenConstants.MODEL_PACKAGE, modelPackage);
|
||||
updateOption(this.DATE_LIBRARY, this.getDateLibrary());
|
||||
|
||||
additionalProperties.put("title", title);
|
||||
// java inflector uses the jackson lib
|
||||
|
||||
@@ -17,10 +17,7 @@
|
||||
|
||||
package org.openapitools.codegen.languages;
|
||||
|
||||
import org.openapitools.codegen.CliOption;
|
||||
import org.openapitools.codegen.CodegenModel;
|
||||
import org.openapitools.codegen.CodegenProperty;
|
||||
import org.openapitools.codegen.SupportingFile;
|
||||
import org.openapitools.codegen.*;
|
||||
import org.openapitools.codegen.languages.features.BeanValidationFeatures;
|
||||
|
||||
import java.io.File;
|
||||
@@ -43,6 +40,10 @@ public class JavaJAXRSCXFCDIServerCodegen extends JavaJAXRSSpecServerCodegen imp
|
||||
sourceFolder = "src/gen/java";
|
||||
useBeanValidation = true;
|
||||
|
||||
// clioOptions default redifinition need to be updated
|
||||
updateOption(CodegenConstants.SOURCE_FOLDER, this.getSourceFolder());
|
||||
updateOption(CodegenConstants.ARTIFACT_ID, this.getArtifactId());
|
||||
|
||||
// Three API templates to support CDI injection
|
||||
apiTemplateFiles.put("apiService.mustache", ".java");
|
||||
apiTemplateFiles.put("apiServiceImpl.mustache", ".java");
|
||||
@@ -51,8 +52,7 @@ public class JavaJAXRSCXFCDIServerCodegen extends JavaJAXRSSpecServerCodegen imp
|
||||
typeMapping.put("DateTime", "java.util.Date");
|
||||
|
||||
// Updated template directory
|
||||
embeddedTemplateDir = templateDir = JAXRS_TEMPLATE_DIRECTORY_NAME
|
||||
+ File.separator + "cxf-cdi";
|
||||
embeddedTemplateDir = templateDir = JAXRS_TEMPLATE_DIRECTORY_NAME + File.separator + "cxf-cdi";
|
||||
|
||||
cliOptions.add(CliOption.newBoolean(USE_BEANVALIDATION, "Use BeanValidation API annotations",useBeanValidation));
|
||||
}
|
||||
|
||||
@@ -51,11 +51,17 @@ public class JavaJAXRSSpecServerCodegen extends AbstractJavaJAXRSServerCodegen {
|
||||
invokerPackage = "org.openapitools.api";
|
||||
artifactId = "openapi-jaxrs-server";
|
||||
outputFolder = "generated-code/JavaJaxRS-Spec";
|
||||
apiPackage = "org.openapitools.api";
|
||||
modelPackage = "org.openapitools.model";
|
||||
|
||||
// clioOptions default redifinition need to be updated
|
||||
updateOption(CodegenConstants.INVOKER_PACKAGE, this.getInvokerPackage());
|
||||
updateOption(CodegenConstants.ARTIFACT_ID, this.getArtifactId());
|
||||
updateOption(CodegenConstants.API_PACKAGE, apiPackage);
|
||||
updateOption(CodegenConstants.MODEL_PACKAGE, modelPackage);
|
||||
|
||||
modelTemplateFiles.put("model.mustache", ".java");
|
||||
apiTemplateFiles.put("api.mustache", ".java");
|
||||
apiPackage = "org.openapitools.api";
|
||||
modelPackage = "org.openapitools.model";
|
||||
|
||||
apiTestTemplateFiles.clear(); // TODO: add api test template
|
||||
modelTestTemplateFiles.clear(); // TODO: add model test template
|
||||
@@ -81,11 +87,8 @@ public class JavaJAXRSSpecServerCodegen extends AbstractJavaJAXRSServerCodegen {
|
||||
}
|
||||
}
|
||||
|
||||
CliOption library = new CliOption(CodegenConstants.LIBRARY, "library template (sub-template) to use");
|
||||
library.setDefault(DEFAULT_LIBRARY);
|
||||
|
||||
Map<String, String> supportedLibraries = new LinkedHashMap<String, String>();
|
||||
|
||||
CliOption library = new CliOption(CodegenConstants.LIBRARY, CodegenConstants.LIBRARY_DESC).defaultValue(DEFAULT_LIBRARY);
|
||||
Map<String, String> supportedLibraries = new LinkedHashMap<>();
|
||||
supportedLibraries.put(DEFAULT_LIBRARY, "JAXRS");
|
||||
library.setEnum(supportedLibraries);
|
||||
|
||||
|
||||
@@ -55,12 +55,10 @@ public class JavaJerseyServerCodegen extends AbstractJavaJAXRSServerCodegen {
|
||||
|
||||
embeddedTemplateDir = templateDir = JAXRS_TEMPLATE_DIRECTORY_NAME;
|
||||
|
||||
CliOption library = new CliOption(CodegenConstants.LIBRARY, "library template (sub-template) to use");
|
||||
|
||||
CliOption library = new CliOption(CodegenConstants.LIBRARY, CodegenConstants.LIBRARY_DESC).defaultValue(DEFAULT_JERSEY_LIBRARY);
|
||||
supportedLibraries.put(LIBRARY_JERSEY1, "Jersey core 1.x");
|
||||
supportedLibraries.put(LIBRARY_JERSEY2, "Jersey core 2.x");
|
||||
library.setEnum(supportedLibraries);
|
||||
library.setDefault(DEFAULT_JERSEY_LIBRARY);
|
||||
|
||||
cliOptions.add(library);
|
||||
cliOptions.add(CliOption.newBoolean(SUPPORT_JAVA6, "Whether to support Java6 with the Jersey1/2 library."));
|
||||
|
||||
@@ -45,7 +45,7 @@ public class JavaMSF4JServerCodegen extends AbstractJavaJAXRSServerCodegen {
|
||||
modelDocTemplateFiles.remove("model_doc.mustache");
|
||||
apiDocTemplateFiles.remove("api_doc.mustache");
|
||||
embeddedTemplateDir = templateDir = "MSF4J";
|
||||
CliOption library = new CliOption(CodegenConstants.LIBRARY, "library template (sub-template) to use");
|
||||
CliOption library = new CliOption(CodegenConstants.LIBRARY, CodegenConstants.LIBRARY_DESC);
|
||||
supportedLibraries.put(LIBRARY_JERSEY1, "Jersey core 1.x");
|
||||
supportedLibraries.put(LIBRARY_JERSEY2, "Jersey core 2.x");
|
||||
library.setEnum(supportedLibraries);
|
||||
|
||||
@@ -52,25 +52,23 @@ public class JavaPKMSTServerCodegen extends AbstractJavaCodegen {
|
||||
|
||||
public JavaPKMSTServerCodegen() {
|
||||
super();
|
||||
this.projectFolder = "src" + File.separator + "main";
|
||||
this.projectTestFolder = "src" + File.separator + "test";
|
||||
this.sourceFolder = this.projectFolder + File.separator + "java";
|
||||
this.testFolder = this.projectTestFolder + File.separator + "java";
|
||||
|
||||
groupId = "com.prokarma";
|
||||
artifactId = "pkmst-microservice";
|
||||
artifactVersion = "1.0.0";
|
||||
embeddedTemplateDir = templateDir = "java-pkmst";
|
||||
apiPackage = "com.prokarma.pkmst.controller";
|
||||
modelPackage = "com.prokarma.pkmst.model";
|
||||
invokerPackage = "com.prokarma.pkmst.controller";
|
||||
|
||||
// clioOptions default redifinition need to be updated
|
||||
updateOption(CodegenConstants.GROUP_ID, this.getGroupId());
|
||||
updateOption(CodegenConstants.INVOKER_PACKAGE, this.getInvokerPackage());
|
||||
updateOption(CodegenConstants.ARTIFACT_ID, this.getArtifactId());
|
||||
updateOption(CodegenConstants.API_PACKAGE, apiPackage);
|
||||
updateOption(CodegenConstants.MODEL_PACKAGE, modelPackage);
|
||||
|
||||
additionalProperties.put("jackson", "true");
|
||||
serializeBigDecimalAsString = false;
|
||||
withXml = false;
|
||||
javaUtilPrefix = "";
|
||||
serializableModel = false;
|
||||
this.cliOptions.add(new CliOption("groupId", "groupId in generated pom.xml"));
|
||||
this.cliOptions.add(new CliOption("artifactId", "artifactId in generated pom.xml"));
|
||||
this.cliOptions.add(new CliOption("artifactVersion", "artifact version in generated pom.xml"));
|
||||
|
||||
this.cliOptions.add(new CliOption("basePackage", "base package for java source code"));
|
||||
this.cliOptions.add(new CliOption("serviceName", "Service Name"));
|
||||
this.cliOptions.add(new CliOption(TITLE, "server title name or client service name"));
|
||||
@@ -79,6 +77,7 @@ public class JavaPKMSTServerCodegen extends AbstractJavaCodegen {
|
||||
this.cliOptions.add(new CliOption("springBootAdminUri", "Spring-Boot URI"));
|
||||
// Middleware config
|
||||
this.cliOptions.add(new CliOption("pkmstInterceptor", "PKMST Interceptor"));
|
||||
|
||||
this.apiTestTemplateFiles.put("api_test.mustache", ".java");
|
||||
|
||||
if (".md".equals(this.modelDocTemplateFiles.get("model_doc.mustache"))) {
|
||||
@@ -611,86 +610,18 @@ public class JavaPKMSTServerCodegen extends AbstractJavaCodegen {
|
||||
return (this.outputFolder + "/" + this.modelDocPath).replace("/", File.separator);
|
||||
}
|
||||
|
||||
public String getGroupId() {
|
||||
return groupId;
|
||||
}
|
||||
|
||||
public void setGroupId(String groupId) {
|
||||
this.groupId = groupId;
|
||||
}
|
||||
|
||||
public String getArtifactId() {
|
||||
return artifactId;
|
||||
}
|
||||
|
||||
public void setArtifactId(String artifactId) {
|
||||
this.artifactId = artifactId;
|
||||
}
|
||||
|
||||
public String getArtifactVersion() {
|
||||
return artifactVersion;
|
||||
}
|
||||
|
||||
public void setArtifactVersion(String artifactVersion) {
|
||||
this.artifactVersion = artifactVersion;
|
||||
}
|
||||
|
||||
public String getProjectFolder() {
|
||||
return projectFolder;
|
||||
}
|
||||
|
||||
public void setProjectFolder(String projectFolder) {
|
||||
this.projectFolder = projectFolder;
|
||||
}
|
||||
|
||||
public String getEurekaUri() {
|
||||
return eurekaUri;
|
||||
}
|
||||
|
||||
public void setEurekaUri(String eurekaUri) {
|
||||
this.eurekaUri = eurekaUri;
|
||||
}
|
||||
|
||||
public String getZipkinUri() {
|
||||
return zipkinUri;
|
||||
}
|
||||
|
||||
public void setZipkinUri(String zipkinUri) {
|
||||
this.zipkinUri = zipkinUri;
|
||||
}
|
||||
|
||||
public String getSpringBootAdminUri() {
|
||||
return springBootAdminUri;
|
||||
}
|
||||
|
||||
public void setSpringBootAdminUri(String springBootAdminUri) {
|
||||
this.springBootAdminUri = springBootAdminUri;
|
||||
}
|
||||
|
||||
public String getProjectTestFolder() {
|
||||
return projectTestFolder;
|
||||
}
|
||||
|
||||
public void setProjectTestFolder(String projectTestFolder) {
|
||||
this.projectTestFolder = projectTestFolder;
|
||||
}
|
||||
|
||||
public String getSourceFolder() {
|
||||
return sourceFolder;
|
||||
}
|
||||
|
||||
public void setSourceFolder(String sourceFolder) {
|
||||
this.sourceFolder = sourceFolder;
|
||||
}
|
||||
|
||||
public String getTestFolder() {
|
||||
return testFolder;
|
||||
}
|
||||
|
||||
public void setTestFolder(String testFolder) {
|
||||
this.testFolder = testFolder;
|
||||
}
|
||||
|
||||
public String getBasePackage() {
|
||||
return basePackage;
|
||||
}
|
||||
@@ -715,46 +646,6 @@ public class JavaPKMSTServerCodegen extends AbstractJavaCodegen {
|
||||
this.configPackage = configPackage;
|
||||
}
|
||||
|
||||
public boolean isImplicitHeaders() {
|
||||
return implicitHeaders;
|
||||
}
|
||||
|
||||
public void setImplicitHeaders(boolean implicitHeaders) {
|
||||
this.implicitHeaders = implicitHeaders;
|
||||
}
|
||||
|
||||
public boolean isSerializeBigDecimalAsString() {
|
||||
return serializeBigDecimalAsString;
|
||||
}
|
||||
|
||||
public void setSerializeBigDecimalAsString(boolean serializeBigDecimalAsString) {
|
||||
this.serializeBigDecimalAsString = serializeBigDecimalAsString;
|
||||
}
|
||||
|
||||
public boolean isFullJavaUtil() {
|
||||
return fullJavaUtil;
|
||||
}
|
||||
|
||||
public void setFullJavaUtil(boolean fullJavaUtil) {
|
||||
this.fullJavaUtil = fullJavaUtil;
|
||||
}
|
||||
|
||||
public Boolean getSerializableModel() {
|
||||
return serializableModel;
|
||||
}
|
||||
|
||||
public void setSerializableModel(Boolean serializableModel) {
|
||||
this.serializableModel = serializableModel;
|
||||
}
|
||||
|
||||
public String getInvokerPackage() {
|
||||
return invokerPackage;
|
||||
}
|
||||
|
||||
public void setInvokerPackage(String invokerPackage) {
|
||||
this.invokerPackage = invokerPackage;
|
||||
}
|
||||
|
||||
public String getTitle() {
|
||||
return title;
|
||||
}
|
||||
@@ -763,14 +654,6 @@ public class JavaPKMSTServerCodegen extends AbstractJavaCodegen {
|
||||
this.title = title;
|
||||
}
|
||||
|
||||
public boolean isWithXml() {
|
||||
return withXml;
|
||||
}
|
||||
|
||||
public void setWithXml(boolean withXml) {
|
||||
this.withXml = withXml;
|
||||
}
|
||||
|
||||
private interface DataTypeAssigner {
|
||||
|
||||
void setReturnType(String returnType);
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user