forked from loafle/openapi-generator-original
Compare commits
258 Commits
v4.1.0
...
swift_null
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cfeff0c31c | ||
|
|
d933a69aed | ||
|
|
8b2e25e4da | ||
|
|
0c8481b8c7 | ||
|
|
213efd8e84 | ||
|
|
0029d9aa91 | ||
|
|
d4500b307f | ||
|
|
f955966b09 | ||
|
|
711a210423 | ||
|
|
f13043e433 | ||
|
|
08a5e81797 | ||
|
|
83d64b7e38 | ||
|
|
60567bddd6 | ||
|
|
cc1bfe5fef | ||
|
|
0ebc2f720e | ||
|
|
ebc9e291c3 | ||
|
|
7c7fa68737 | ||
|
|
5c24a54173 | ||
|
|
2b72df2135 | ||
|
|
88ed52fa88 | ||
|
|
c136b83bdb | ||
|
|
2272743c1d | ||
|
|
0c7820ccbe | ||
|
|
41acae19e4 | ||
|
|
8383f26616 | ||
|
|
cb38de9afa | ||
|
|
baa53cbf57 | ||
|
|
31827f5f35 | ||
|
|
af9eb8d7da | ||
|
|
9ae49db670 | ||
|
|
d2b299860d | ||
|
|
243589ec80 | ||
|
|
44f482f21a | ||
|
|
c8ac41c051 | ||
|
|
775d96c8e6 | ||
|
|
7a95c9e20d | ||
|
|
600a81f76e | ||
|
|
7dbda049f0 | ||
|
|
c8d5701089 | ||
|
|
b5fb92d5a8 | ||
|
|
8212e80d0e | ||
|
|
5dcd959f30 | ||
|
|
8293902134 | ||
|
|
0bf9926066 | ||
|
|
e901132ea9 | ||
|
|
7bb3579345 | ||
|
|
eb793ae279 | ||
|
|
5f6e53fc60 | ||
|
|
2664c628a3 | ||
|
|
078d7a38c0 | ||
|
|
af74f3443f | ||
|
|
cb5720e4d7 | ||
|
|
4317ac0297 | ||
|
|
bd992a4218 | ||
|
|
e20af77944 | ||
|
|
8408232d1a | ||
|
|
252c3e58be | ||
|
|
002da8d9f9 | ||
|
|
85b4ddea39 | ||
|
|
81fdc2abbd | ||
|
|
431aba8747 | ||
|
|
6f1b8ef658 | ||
|
|
b867a6c3d5 | ||
|
|
1a55020194 | ||
|
|
3019b5a5e1 | ||
|
|
ee2e4395a9 | ||
|
|
91a610ec0e | ||
|
|
21e0e0d5d5 | ||
|
|
0ea1ead59e | ||
|
|
aadaac7e17 | ||
|
|
b793a95765 | ||
|
|
5610610d44 | ||
|
|
1dfa61231c | ||
|
|
0b6dfdcd99 | ||
|
|
3fe0281d3b | ||
|
|
ba7fc2396b | ||
|
|
3f9d1b1fec | ||
|
|
a8826816fb | ||
|
|
667a6097b5 | ||
|
|
4538db92a2 | ||
|
|
9647416032 | ||
|
|
2ac46eda9f | ||
|
|
334d0dcb48 | ||
|
|
87dce1bfe1 | ||
|
|
8f43373948 | ||
|
|
e0b56502a3 | ||
|
|
8055231400 | ||
|
|
ec5df2e1c0 | ||
|
|
95c4a05b70 | ||
|
|
f15f814d9b | ||
|
|
f27ff79e93 | ||
|
|
763e7a0c14 | ||
|
|
e56bfe4af3 | ||
|
|
dc2907aced | ||
|
|
3242949e1a | ||
|
|
ea029b4029 | ||
|
|
68967b8705 | ||
|
|
3e6b72bcde | ||
|
|
3ebefccfa9 | ||
|
|
e73bf9be1d | ||
|
|
d46bff9e78 | ||
|
|
e18f361534 | ||
|
|
8d67acc3ed | ||
|
|
9ca4bac881 | ||
|
|
f2fe4fc200 | ||
|
|
096f2d0fc8 | ||
|
|
239d68df36 | ||
|
|
5fd15b8b18 | ||
|
|
640e2ca825 | ||
|
|
ddf0e3e225 | ||
|
|
dd152eefcc | ||
|
|
c7d4a965c7 | ||
|
|
458d47b4ae | ||
|
|
9cc7bd15f2 | ||
|
|
c63cf7e5f3 | ||
|
|
6a4e92887a | ||
|
|
03edb64030 | ||
|
|
ec7f2a0450 | ||
|
|
2a2eefe93d | ||
|
|
cec2818e1f | ||
|
|
91daca36ef | ||
|
|
12ba8174d1 | ||
|
|
8f13b88ed9 | ||
|
|
3be1196264 | ||
|
|
911cdd8d0c | ||
|
|
1b12b89fd8 | ||
|
|
d21b3390fe | ||
|
|
806141297b | ||
|
|
e39b420fa8 | ||
|
|
f25c6da856 | ||
|
|
b0549fe6da | ||
|
|
87727de079 | ||
|
|
8236424aff | ||
|
|
e4b39ce95e | ||
|
|
026612fed7 | ||
|
|
8f7e43b500 | ||
|
|
1443f01709 | ||
|
|
c2f786b8ad | ||
|
|
44d8b49dee | ||
|
|
f4d3df762a | ||
|
|
ceccb4f83a | ||
|
|
34ec98d17b | ||
|
|
2016bc086f | ||
|
|
28cf0b279d | ||
|
|
31d7bf9d18 | ||
|
|
d36dd47b12 | ||
|
|
5a54aa5726 | ||
|
|
9182784955 | ||
|
|
60e4c923dd | ||
|
|
dc7bcbdb85 | ||
|
|
7c480446e6 | ||
|
|
45d70e1bf3 | ||
|
|
f94ff32b0c | ||
|
|
e1116814c4 | ||
|
|
5bd63074c4 | ||
|
|
d0d545bbdd | ||
|
|
c290555e5e | ||
|
|
197294a167 | ||
|
|
7afd350616 | ||
|
|
7e772e1b71 | ||
|
|
ee7c8a82e8 | ||
|
|
136c1407ac | ||
|
|
5289262aec | ||
|
|
cba2d3b8cf | ||
|
|
cd6b844d75 | ||
|
|
16ac05dcdf | ||
|
|
859df23428 | ||
|
|
e12459f3bd | ||
|
|
8cd5a4187b | ||
|
|
a05f68431a | ||
|
|
15f680e1eb | ||
|
|
0beb8caa85 | ||
|
|
1f5aa22f5c | ||
|
|
dfb4c133d8 | ||
|
|
286ddf38f7 | ||
|
|
761e435248 | ||
|
|
1188d0f141 | ||
|
|
a390676cc6 | ||
|
|
b8f9e995ce | ||
|
|
158cdfeb3c | ||
|
|
1fc03c88b2 | ||
|
|
d64ec14ab4 | ||
|
|
73eae09738 | ||
|
|
96dd31a462 | ||
|
|
14a39349d5 | ||
|
|
4898ffa4e9 | ||
|
|
62ca0c78ff | ||
|
|
a748e1ff9a | ||
|
|
8741a8ca35 | ||
|
|
870bb1c858 | ||
|
|
f6ead7b877 | ||
|
|
abfef86c8b | ||
|
|
b323b0a0af | ||
|
|
1a808dd644 | ||
|
|
d09e097e4e | ||
|
|
9de908a386 | ||
|
|
57236bc846 | ||
|
|
6924b3c710 | ||
|
|
bb5cd4c42d | ||
|
|
94eb6860aa | ||
|
|
10a310ef69 | ||
|
|
50253f2b15 | ||
|
|
99d7b4e70b | ||
|
|
2ee0c34347 | ||
|
|
e5912b4925 | ||
|
|
4575b3074a | ||
|
|
7abd2e141a | ||
|
|
1adb0ba588 | ||
|
|
6addd76e11 | ||
|
|
8c498fb08a | ||
|
|
a5ab60bec8 | ||
|
|
e086ad1b6e | ||
|
|
1a6d3671d9 | ||
|
|
589e5c6312 | ||
|
|
024f46814c | ||
|
|
1ce09788a9 | ||
|
|
44fda895d2 | ||
|
|
aa4ead2a6d | ||
|
|
7e8c7db798 | ||
|
|
b83fe0c611 | ||
|
|
5182955cca | ||
|
|
cd9eea2fe5 | ||
|
|
ef88bd175f | ||
|
|
99fcfbc802 | ||
|
|
a4811c7850 | ||
|
|
2ada4d90b4 | ||
|
|
dac370b7f7 | ||
|
|
6f7d2792c7 | ||
|
|
2d7785ac63 | ||
|
|
eb6ca9199b | ||
|
|
c3535cf9ca | ||
|
|
286cdfdfa2 | ||
|
|
55786119e7 | ||
|
|
94d4e0cfac | ||
|
|
99d85a39a3 | ||
|
|
b936d72dfa | ||
|
|
93aedcf3d5 | ||
|
|
d04e16a255 | ||
|
|
fae0528cd5 | ||
|
|
ba65f675e2 | ||
|
|
5e27f11ef1 | ||
|
|
850c493c63 | ||
|
|
f5327b601e | ||
|
|
123efc5d65 | ||
|
|
36ccd87a80 | ||
|
|
20db89e277 | ||
|
|
a5349cfde5 | ||
|
|
4a92cd8dca | ||
|
|
c8a65a9942 | ||
|
|
4b6499c636 | ||
|
|
290550ef91 | ||
|
|
06533b977c | ||
|
|
07381e7275 | ||
|
|
01222268e8 | ||
|
|
22d022b2d5 | ||
|
|
42d6420400 | ||
|
|
ac85c8f901 | ||
|
|
5956569e7a |
6
.github/.test/samples.json
vendored
6
.github/.test/samples.json
vendored
@@ -145,12 +145,6 @@
|
||||
"Documentation: Cwiki"
|
||||
]
|
||||
},
|
||||
{
|
||||
"input": "dart-flutter-petstore.sh",
|
||||
"matches": [
|
||||
"Client: Dart"
|
||||
]
|
||||
},
|
||||
{
|
||||
"input": "dart-jaguar-petstore.sh",
|
||||
"matches": [
|
||||
|
||||
2
.gitignore
vendored
2
.gitignore
vendored
@@ -174,6 +174,7 @@ samples/client/petstore/python-tornado/.venv/
|
||||
samples/client/petstore/typescript-angular2/npm/npm-debug.log
|
||||
samples/client/petstore/typescript-node/npm/npm-debug.log
|
||||
samples/client/petstore/typescript-angular/tsd-debug.log
|
||||
samples/client/petstore/typescript-fetch/tests/**/dist/
|
||||
|
||||
# aspnetcore
|
||||
samples/server/petstore/aspnetcore/.vs/
|
||||
@@ -186,6 +187,7 @@ samples/client/petstore/kotlin-string/build
|
||||
samples/openapi3/client/petstore/kotlin/build
|
||||
samples/server/petstore/kotlin-server/ktor/build
|
||||
samples/server/petstore/kotlin-springboot/build
|
||||
samples/client/petstore/kotlin-multiplatform/build/
|
||||
\?
|
||||
|
||||
# haskell
|
||||
|
||||
@@ -94,6 +94,8 @@ before_install:
|
||||
# - Rely on `kerl` for [pre-compiled versions available](https://docs.travis-ci.com/user/languages/erlang#Choosing-OTP-releases-to-test-against). Rely on installation path chosen by [`travis-erlang-builder`](https://github.com/travis-ci/travis-erlang-builder/blob/e6d016b1a91ca7ecac5a5a46395bde917ea13d36/bin/compile#L18).
|
||||
# - . ~/otp/18.2.1/activate && erl -version
|
||||
#- curl -f -L -o ./rebar3 https://s3.amazonaws.com/rebar3/rebar3 && chmod +x ./rebar3 && ./rebar3 version && export PATH="${TRAVIS_BUILD_DIR}:$PATH"
|
||||
# install valgrind for C++ memory test
|
||||
- sudo apt-get install valgrind
|
||||
# install Qt 5.10
|
||||
- sudo add-apt-repository --yes ppa:beineri/opt-qt-5.10.1-trusty
|
||||
- sudo apt-get update -qq
|
||||
|
||||
@@ -2,12 +2,32 @@ kind: pipeline
|
||||
name: default
|
||||
|
||||
steps:
|
||||
# test haskell client
|
||||
- name: haskell-client-test
|
||||
image: haskell:8.6.5
|
||||
commands:
|
||||
- (cd samples/client/petstore/haskell-http-client/ && stack --install-ghc --no-haddock-deps haddock --fast && stack test --fast)
|
||||
# test Dart 2.x petstore client
|
||||
- name: dart2x-test
|
||||
image: google/dart
|
||||
commands:
|
||||
- (cd samples/client/petstore/dart-jaguar/openapi && pub get && pub run build_runner build --delete-conflicting-outputs)
|
||||
- (cd samples/client/petstore/dart-jaguar/flutter_petstore/openapi && pub get && pub run build_runner build --delete-conflicting-outputs)
|
||||
- (cd samples/client/petstore/dart2/petstore && pub get && pub run test)
|
||||
# test Java 11 HTTP client
|
||||
- name: java11-test
|
||||
image: hirokimatsumoto/alpine-openjdk-11
|
||||
image: openjdk:11.0
|
||||
commands:
|
||||
- ./mvnw clean install
|
||||
- ./mvnw --quiet verify -Psamples.droneio
|
||||
# test all generators with fake petstore spec (2.0, 3.0)
|
||||
- /bin/bash bin/utils/test-fake-petstore-for-all.sh
|
||||
# generate test scripts
|
||||
- /bin/bash bin/tests/run-all-test
|
||||
# generate all petstore samples (client, servers, doc)
|
||||
- /bin/bash bin/run-all-petstore
|
||||
# generate all petstore samples (openapi3)
|
||||
- /bin/bash bin/openapi3/run-all-petstore
|
||||
# test ocaml petstore client
|
||||
- name: ocaml-test
|
||||
image: ocaml/opam2:4.07
|
||||
|
||||
@@ -14,14 +14,6 @@ if [ "$NODE_INDEX" = "1" ]; then
|
||||
mvn --quiet verify -Psamples.circleci
|
||||
mvn --quiet javadoc:javadoc -Psamples.circleci
|
||||
|
||||
# generate all petstore samples (client, servers, doc)
|
||||
./bin/run-all-petstore
|
||||
# generate all petstore samples (openapi3)
|
||||
./bin/openapi3/run-all-petstore
|
||||
# generate test scripts
|
||||
./bin/tests/run-all-test
|
||||
# test all generators with fake petstore spec (2.0, 3.0)
|
||||
./bin/utils/test-fake-petstore-for-all.sh
|
||||
elif [ "$NODE_INDEX" = "2" ]; then
|
||||
# run ensure-up-to-date sample script on SNAPSHOT version only
|
||||
project_version=`mvn org.apache.maven.plugins:maven-help-plugin:3.1.0:evaluate -Dexpression=project.version -q -DforceStdout`
|
||||
@@ -29,12 +21,6 @@ elif [ "$NODE_INDEX" = "2" ]; 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
|
||||
|
||||
@@ -53,6 +53,7 @@ public class ArrayOfArrayOfNumberOnlyTest {
|
||||
List<BigDecimal> arrayArrayNumber = new ArrayList<BigDecimal>();
|
||||
arrayArrayNumber.add(b1);
|
||||
arrayArrayNumber.add(b2);
|
||||
model.setArrayArrayNumber(new ArrayList<List<BigDecimal>>());
|
||||
model.getArrayArrayNumber().add(arrayArrayNumber);
|
||||
|
||||
// create another instance for comparison
|
||||
@@ -62,6 +63,7 @@ public class ArrayOfArrayOfNumberOnlyTest {
|
||||
List<BigDecimal> arrayArrayNumber2 = new ArrayList<BigDecimal>();
|
||||
arrayArrayNumber2.add(b1);
|
||||
arrayArrayNumber2.add(b2);
|
||||
model2.setArrayArrayNumber(new ArrayList<List<BigDecimal>>());
|
||||
model2.getArrayArrayNumber().add(arrayArrayNumber2);
|
||||
|
||||
Assert.assertTrue(model2.equals(model));
|
||||
|
||||
@@ -0,0 +1,73 @@
|
||||
<project>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>org.openapitools</groupId>
|
||||
<artifactId>TypeScriptFetchBuildPrefixParameterInterfacesPestoreClientTests</artifactId>
|
||||
<packaging>pom</packaging>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<name>TS Fetch Petstore Client (with namespacing for parameter interfaces)</name>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>maven-dependency-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>copy-dependencies</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<outputDirectory>${project.build.directory}</outputDirectory>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>exec-maven-plugin</artifactId>
|
||||
<version>1.2.1</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>npm-install</id>
|
||||
<phase>integration-test</phase>
|
||||
<goals>
|
||||
<goal>exec</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<executable>npm</executable>
|
||||
<arguments>
|
||||
<argument>install</argument>
|
||||
</arguments>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>npm-build</id>
|
||||
<phase>integration-test</phase>
|
||||
<goals>
|
||||
<goal>exec</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<executable>npm</executable>
|
||||
<arguments>
|
||||
<argument>run</argument>
|
||||
<argument>build</argument>
|
||||
</arguments>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>npm-test</id>
|
||||
<phase>integration-test</phase>
|
||||
<goals>
|
||||
<goal>exec</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<executable>npm</executable>
|
||||
<arguments>
|
||||
<argument>test</argument>
|
||||
</arguments>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
77
README.md
77
README.md
@@ -2,12 +2,18 @@
|
||||
|
||||
<div align="center">
|
||||
|
||||
[Master](https://github.com/OpenAPITools/openapi-generator/tree/master) (`4.1.0`): [](https://travis-ci.org/OpenAPITools/openapi-generator)
|
||||
[Master](https://github.com/OpenAPITools/openapi-generator/tree/master) (`4.1.3-SNAPSHOT`): [](https://travis-ci.org/OpenAPITools/openapi-generator)
|
||||
[](https://circleci.com/gh/OpenAPITools/openapi-generator)
|
||||
[](https://app.shippable.com/github/OpenAPITools/openapi-generator)
|
||||
[](https://ci.appveyor.com/project/WilliamCheng/openapi-generator-wh2wu)
|
||||
[](https://cloud.drone.io/OpenAPITools/openapi-generator)
|
||||
|
||||
[`4.2.x`](https://github.com/OpenAPITools/openapi-generator/tree/4.2.x) branch: [](https://travis-ci.org/OpenAPITools/openapi-generator)
|
||||
[](https://circleci.com/gh/OpenAPITools/openapi-generator)
|
||||
[](https://app.shippable.com/github/OpenAPITools/openapi-generator)
|
||||
[](https://ci.appveyor.com/project/WilliamCheng/openapi-generator-wh2wu)
|
||||
[](https://cloud.drone.io/OpenAPITools/openapi-generator)
|
||||
|
||||
[`5.0.x`](https://github.com/OpenAPITools/openapi-generator/tree/5.0.x) branch: [](https://travis-ci.org/OpenAPITools/openapi-generator)
|
||||
[](https://circleci.com/gh/OpenAPITools/openapi-generator)
|
||||
[](https://app.shippable.com/github/OpenAPITools/openapi-generator)
|
||||
@@ -59,11 +65,11 @@ OpenAPI Generator allows generation of API client libraries (SDK generation), se
|
||||
|
||||
| | Languages/Frameworks |
|
||||
|-|-|
|
||||
**API clients** | **ActionScript**, **Ada**, **Apex**, **Bash**, **C**, **C#** (.net 2.0, 3.5 or later), **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/JavaScript** (ES5, ES6, AngularJS with Google Closure Compiler annotations, Flow types), **Objective-C**, **OCaml**, **Perl**, **PHP**, **PowerShell**, **Python**, **R**, **Ruby**, **Rust** (rust, rust-server), **Scala** (akka, http4s, scalaz, swagger-async-httpclient), **Swift** (2.x, 3.x, 4.x), **Typescript** (AngularJS, Angular (2.x - 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**
|
||||
**API clients** | **ActionScript**, **Ada**, **Apex**, **Bash**, **C**, **C#** (.net 2.0, 3.5 or later, .NET Standard 1.3 - 2.0, .NET Core 2.0), **C++** (cpp-restsdk, Qt5, Tizen), **Clojure**, **Dart (1.x, 2.x)**, **Elixir**, **Elm**, **Eiffel**, **Erlang**, **Go**, **Groovy**, **Haskell** (http-client, Servant), **Java** (Jersey1.x, Jersey2.x, OkHttp, Retrofit1.x, Retrofit2.x, Feign, RestTemplate, RESTEasy, Vertx, Google API Client Library for Java, Rest-assured, Spring 5 Web Client), **Kotlin**, **Lua**, **Nim**, **Node.js/JavaScript** (ES5, ES6, AngularJS with Google Closure Compiler annotations, Flow types), **Objective-C**, **OCaml**, **Perl**, **PHP**, **PowerShell**, **Python**, **R**, **Ruby**, **Rust** (rust, rust-server), **Scala** (akka, http4s, scalaz, swagger-async-httpclient), **Swift** (2.x, 3.x, 4.x), **Typescript** (AngularJS, Angular (2.x - 8.x), Aurelia, Axios, Fetch, Inversify, jQuery, Node, Rxjs)
|
||||
**Server stubs** | **Ada**, **C#** (ASP.NET Core, NancyFx), **C++** (Pistache, Restbed, Qt5 QHTTPEngine), **Erlang**, **F#** (Giraffe), **Go** (net/http, Gin), **Haskell** (Servant), **Java** (MSF4J, Spring, Undertow, JAX-RS: CDI, CXF, Inflector, Jersey, RestEasy, Play Framework, [PKMST](https://github.com/ProKarma-Inc/pkmst-getting-started-examples)), **Kotlin** (Spring Boot, Ktor, Vertx), **PHP** (Laravel, Lumen, Slim, Silex, [Symfony](https://symfony.com/), [Zend Expressive](https://github.com/zendframework/zend-expressive)), **Python** (Flask), **NodeJS**, **Ruby** (Sinatra, Rails5), **Rust** (rust-server), **Scala** ([Finch](https://github.com/finagle/finch), [Lagom](https://github.com/lagom/lagom), [Play](https://www.playframework.com/), Scalatra)
|
||||
**API documentation generators** | **HTML**, **Confluence Wiki**, **Asciidoc**
|
||||
**Configuration files** | [**Apache2**](https://httpd.apache.org/)
|
||||
**Others** | **GraphQL**, **JMeter**, **MySQL Schema**
|
||||
**Others** | **GraphQL**, **JMeter**, **MySQL Schema**, **Protocol Buffer**
|
||||
|
||||
## Table of contents
|
||||
|
||||
@@ -101,8 +107,9 @@ The OpenAPI Specification has undergone 3 revisions since initial creation in 20
|
||||
OpenAPI Generator Version | Release Date | Notes
|
||||
---------------------------- | ------------ | -----
|
||||
5.0.0 (upcoming major release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/5.0.0-SNAPSHOT/)| 13.05.2020 | Major release with breaking changes (no fallback)
|
||||
4.1.0 (upcoming minor release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/4.1.0-SNAPSHOT/)| 31.07.2019 | Minor release (breaking changes with fallbacks)
|
||||
[4.1.0](https://github.com/OpenAPITools/openapi-generator/releases/tag/v4.1.0) (latest stable release) | 09.07.2019 | Patch release (bug fixes, minor enhancements, etc)
|
||||
4.2.0 (upcoming minor release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/4.2.0-SNAPSHOT/)| 09.10.2019 | Minor release (breaking changes with fallbacks)
|
||||
4.1.3 (upcoming minor release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/4.1.3-SNAPSHOT/)| 30.09.2019 | Patch release (bug fixes, enhancements)
|
||||
[4.1.2](https://github.com/OpenAPITools/openapi-generator/releases/tag/v4.1.2) (latest stable release) | 12.09.2019 | Patch release (bug fixes, enhancements)
|
||||
|
||||
OpenAPI Spec compatibility: 1.0, 1.1, 1.2, 2.0, 3.0
|
||||
|
||||
@@ -158,16 +165,16 @@ See the different versions of the [openapi-generator-cli](https://mvnrepository.
|
||||
<!-- RELEASE_VERSION -->
|
||||
If you're looking for the latest stable version, you can grab it directly from Maven.org (Java 8 runtime at a minimum):
|
||||
|
||||
JAR location: `http://central.maven.org/maven2/org/openapitools/openapi-generator-cli/4.1.0/openapi-generator-cli-4.1.0.jar`
|
||||
JAR location: `http://central.maven.org/maven2/org/openapitools/openapi-generator-cli/4.1.3/openapi-generator-cli-4.1.3.jar`
|
||||
|
||||
For **Mac/Linux** users:
|
||||
```sh
|
||||
wget http://central.maven.org/maven2/org/openapitools/openapi-generator-cli/4.1.0/openapi-generator-cli-4.1.0.jar -O openapi-generator-cli.jar
|
||||
wget http://central.maven.org/maven2/org/openapitools/openapi-generator-cli/4.1.3/openapi-generator-cli-4.1.3.jar -O openapi-generator-cli.jar
|
||||
```
|
||||
|
||||
For **Windows** users, you will need to install [wget](http://gnuwin32.sourceforge.net/packages/wget.htm) or you can use Invoke-WebRequest in PowerShell (3.0+), e.g.
|
||||
```
|
||||
Invoke-WebRequest -OutFile openapi-generator-cli.jar http://central.maven.org/maven2/org/openapitools/openapi-generator-cli/4.1.0/openapi-generator-cli-4.1.0.jar
|
||||
Invoke-WebRequest -OutFile openapi-generator-cli.jar http://central.maven.org/maven2/org/openapitools/openapi-generator-cli/4.1.3/openapi-generator-cli-4.1.3.jar
|
||||
```
|
||||
|
||||
After downloading the JAR, run `java -jar openapi-generator-cli.jar help` to show the usage.
|
||||
@@ -382,10 +389,10 @@ openapi-generator version
|
||||
```
|
||||
|
||||
<!-- RELEASE_VERSION -->
|
||||
Or install a particular OpenAPI Generator version (e.g. v4.1.0):
|
||||
Or install a particular OpenAPI Generator version (e.g. v4.1.3):
|
||||
|
||||
```sh
|
||||
npm install @openapitools/openapi-generator-cli@cli-4.1.0 -g
|
||||
npm install @openapitools/openapi-generator-cli@cli-4.1.3 -g
|
||||
```
|
||||
|
||||
Or install it as dev-dependency:
|
||||
@@ -409,7 +416,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`)
|
||||
|
||||
<!-- RELEASE_VERSION -->
|
||||
You can also download the JAR (latest release) directly from [maven.org](http://central.maven.org/maven2/org/openapitools/openapi-generator-cli/4.1.0/openapi-generator-cli-4.1.0.jar)
|
||||
You can also download the JAR (latest release) directly from [maven.org](http://central.maven.org/maven2/org/openapitools/openapi-generator-cli/4.1.3/openapi-generator-cli-4.1.3.jar)
|
||||
<!-- /RELEASE_VERSION -->
|
||||
|
||||
To get a list of **general** options available, please run `java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar help generate`
|
||||
@@ -448,7 +455,7 @@ NAME
|
||||
SYNOPSIS
|
||||
openapi-generator-cli generate
|
||||
[(-a <authorization> | --auth <authorization>)]
|
||||
[--additional-properties <additional properties>...]
|
||||
[--api-name-suffix <api name suffix>]
|
||||
[--api-package <api package>] [--artifact-id <artifact id>]
|
||||
[--artifact-version <artifact version>]
|
||||
[(-c <configuration file> | --config <configuration file>)]
|
||||
@@ -469,12 +476,13 @@ SYNOPSIS
|
||||
[--model-name-prefix <model name prefix>]
|
||||
[--model-name-suffix <model name suffix>]
|
||||
[--model-package <model package>]
|
||||
[(-o <output directory> | --output <output directory>)]
|
||||
[(-o <output directory> | --output <output directory>)]
|
||||
[(-p <additional properties> | --additional-properties <additional properties>)...]
|
||||
[--package-name <package name>] [--release-note <release note>]
|
||||
[--remove-operation-id-prefix]
|
||||
[--reserved-words-mappings <reserved word mappings>...]
|
||||
[(-s | --skip-overwrite)] [--skip-validate-spec]
|
||||
[--strict-spec <true/false strict behavior>]
|
||||
[(-s | --skip-overwrite)] [--server-variables <server variables>...]
|
||||
[--skip-validate-spec] [--strict-spec <true/false strict behavior>]
|
||||
[(-t <template directory> | --template-dir <template directory>)]
|
||||
[--type-mappings <type mappings>...] [(-v | --verbose)]
|
||||
|
||||
@@ -553,15 +561,20 @@ Here are some companies/projects (alphabetical order) using OpenAPI Generator in
|
||||
- [Commencis](https://www.commencis.com/)
|
||||
- [Cupix](https://www.cupix.com/)
|
||||
- [DB Systel](https://www.dbsystel.de)
|
||||
- [Element AI](https://www.elementai.com/)
|
||||
- [FormAPI](https://formapi.io/)
|
||||
- [Fuse](https://www.fuse.no/)
|
||||
- [Gantner](https://www.gantner.com)
|
||||
- [GenFlow](https://github.com/RepreZen/GenFlow)
|
||||
- [GMO Pepabo](https://pepabo.com/en/)
|
||||
- [GoDaddy](https://godaddy.com)
|
||||
- [JustStar](https://www.juststarinfo.com)
|
||||
- [Klarna](https://www.klarna.com/)
|
||||
- [Médiavision](https://www.mediavision.fr/)
|
||||
- [Metaswitch](https://www.metaswitch.com/)
|
||||
- [Myworkout](https://myworkout.com)
|
||||
- [Paxos](https://www.paxos.com)
|
||||
- [Pricefx](https://www.pricefx.com/)
|
||||
- [Prometheus/Alertmanager](https://github.com/prometheus/alertmanager)
|
||||
- [Raiffeisen Schweiz Genossenschaft](https://www.raiffeisen.ch)
|
||||
- [RepreZen API Studio](https://www.reprezen.com/swagger-openapi-code-generation-api-first-microservices-enterprise-development)
|
||||
@@ -619,6 +632,23 @@ Here are some companies/projects (alphabetical order) using OpenAPI Generator in
|
||||
- 2019-07-08 - [OpenAPI Generator にコントリビュートしたら社名が載った話。(CAM) - CAM TECH BLOG](https://tech.cam-inc.co.jp/entry/2019/07/08/140000) by [CAM, Inc.](https://www.cam-inc.co.jp/)
|
||||
- 2019-07-14 - [OpenAPI GeneratorでPythonのクライアントライブラリを作成した](https://qiita.com/yuji38kwmt/items/dfb929316a1335a161c0) by [yuji38kwmt](https://qiita.com/yuji38kwmt)
|
||||
- 2019-07-19 - [Developer Experience (DX) for Open-Source Projects: How to Engage Developers and Build a Growing Developer Community](https://speakerdeck.com/wing328/developer-experience-dx-for-open-source-projects-english-japanese) by [William Cheng](https://twitter.com/wing328), [中野暁人](https://github.com/ackintosh) at [Open Source Summit Japan 2019](https://events.linuxfoundation.org/events/open-source-summit-japan-2019/)
|
||||
- 2019-08-14 - [Our OpenAPI journey with Standardizing SDKs](https://bitmovin.com/our-openapi-journey-with-standardizing-sdks/) by [Sebastian Burgstaller](https://bitmovin.com/author/sburgstaller/) at [Bitmovin](https://www.bitmovin.com)
|
||||
- 2019-08-15 - [APIのコードを自動生成させたいだけならgRPCでなくてもよくない?](https://www.m3tech.blog/entry/2019/08/15/110000) by [M3, Inc.](https://corporate.m3.com/)
|
||||
- 2019-08-22 - [マイクロサービスにおけるWeb APIスキーマの管理─ GraphQL、gRPC、OpenAPIの特徴と使いどころ](https://employment.en-japan.com/engineerhub/entry/2019/08/22/103000) by [@ota42y](https://twitter.com/ota42y)
|
||||
- 2019-08-24 - [SwaggerドキュメントからOpenAPI Generatorを使ってモックサーバー作成](https://qiita.com/masayoshi0222/items/4845e4c715d04587c104) by [坂本正義](https://qiita.com/masayoshi0222)
|
||||
- 2019-08-29 - [OpenAPI初探](https://cloud.tencent.com/developer/article/1495986) by [peakxie](https://cloud.tencent.com/developer/user/1113152) at [腾讯云社区](https://cloud.tencent.com/developer)
|
||||
- 2019-08-29 - [全面进化:Kubernetes CRD 1.16 GA前瞻](https://www.servicemesher.com/blog/kubernetes-1.16-crd-ga-preview/) by [Min Kim](https://github.com/yue9944882) at [ServiceMesher Blog](https://www.servicemesher.com/blog/)
|
||||
- 2019-09-01 - [Creating a PHP-Slim server using OpenAPI (Youtube video)](https://www.youtube.com/watch?v=5cJtbIrsYkg) by [Daniel Persson](https://www.youtube.com/channel/UCnG-TN23lswO6QbvWhMtxpA)
|
||||
- 2019-09-06 - [Vert.x and OpenAPI](https://wissel.net/blog/2019/09/vertx-and-openapi.html) by [Stephan H Wissel](https://twitter.com/notessensei) at [wissel.net blog](https://wissel.net)
|
||||
- 2019-09-09 - [Cloud-native development - Creating RESTful microservices](https://cloud.ibm.com/docs/cloud-native?topic=cloud-native-rest-api) in [IBM Cloud Docs](https://cloud.ibm.com/docs)
|
||||
- 2019-09-14 - [Generating and Configuring a Mastercard API Client](https://developer.mastercard.com/platform/documentation/generating-and-configuring-a-mastercard-api-client/) at [Mastercard Developers Platform](https://developer.mastercard.com/platform/documentation/)
|
||||
- 2019-09-15 - [OpenAPI(Swagger)導入下調べ](https://qiita.com/ShoichiKuraoka/items/f1f7a3c2376f7cd9c56a) by [Shoichi Kuraoka](https://qiita.com/ShoichiKuraoka)
|
||||
- 2019-09-17 - [Tutorial: Documenting http4k APIs with OpenApi3](https://www.http4k.org/tutorials/documenting_apis_with_openapi/) by [http4k](https://www.http4k.org/)
|
||||
- 2019-09-22 - [OpenAPI 3を完全に理解できる本](https://booth.pm/ja/items/1571902) by [@ota42y](https://twitter.com/ota42y)
|
||||
- 2019-09-22 - [RESTful APIs: Tutorial of OpenAPI Specification](https://medium.com/@amirm.lavasani/restful-apis-tutorial-of-openapi-specification-eeada0e3901d) by [Amir Lavasani](https://medium.com/@amirm.lavasani)
|
||||
- 2019-09-22 - [Redefining SDKs as software diversity kits](https://devrel.net/dev-rel/redefining-sdks-as-software-diversity-kits) by [Sid Maestre (Xero)](https://twitter.com/sidneyallen) at [DevRelCon San Francisco 2019](https://sf2019.devrel.net/)
|
||||
- 2019-09-23 - [swaggerからOpenApi GeneratorでSpringのコードを自動生成](https://qiita.com/littleFeet/items/492df2ad68a0799a5e5e) by [@littleFeet](https://qiita.com/littleFeet) at [Qiita](https://qiita.com/)
|
||||
|
||||
|
||||
## [6 - About Us](#table-of-contents)
|
||||
|
||||
@@ -681,7 +711,9 @@ Here is a list of template creators:
|
||||
* Javascript (Flow types) @jaypea
|
||||
* JMeter: @davidkiss
|
||||
* Kotlin: @jimschubert [:heart:](https://www.patreon.com/jimschubert)
|
||||
* Kotlin (MultiPlatform): @andrewemery
|
||||
* Lua: @daurnimator
|
||||
* Nim: @hokamoto
|
||||
* OCaml: @cgensoul
|
||||
* Perl: @wing328 [:heart:](https://www.patreon.com/wing328)
|
||||
* PHP (Guzzle): @baartosz
|
||||
@@ -730,6 +762,7 @@ Here is a list of template creators:
|
||||
* JAX-RS RestEasy (JBoss EAP): @jfiala
|
||||
* Kotlin: @jimschubert [:heart:](https://www.patreon.com/jimschubert)
|
||||
* Kotlin (Spring Boot): @dr4ke616
|
||||
* Kotlin (Vertx): @Wooyme
|
||||
* NodeJS Express: @YishTish
|
||||
* PHP Laravel: @renepardon
|
||||
* PHP Lumen: @abcsun
|
||||
@@ -743,13 +776,16 @@ Here is a list of template creators:
|
||||
* Scala Lagom: @gmkumar2005
|
||||
* Scala Play: @adigerber
|
||||
* Documentation
|
||||
* AsciiDoc: @man-at-home
|
||||
* HTML Doc 2: @jhitchcock
|
||||
* Confluence Wiki: @jhitchcock
|
||||
* Configuration
|
||||
* Apache2: @stkrwork
|
||||
* Schema
|
||||
* Avro: @sgadouar
|
||||
* GraphQL: @wing328 [:heart:](https://www.patreon.com/wing328)
|
||||
* MySQL: @ybelenko
|
||||
* Protocol Buffer: @wing328
|
||||
|
||||
:heart: = Link to support the contributor directly
|
||||
|
||||
@@ -790,10 +826,10 @@ If you want to join the committee, please kindly apply by sending an email to te
|
||||
| Apex | |
|
||||
| Bash | @frol (2017/07) @bkryza (2017/08) @kenjones-cisco (2017/09) |
|
||||
| C | @zhemant (2018/11) |
|
||||
| C++ | @ravinikam (2017/07) @stkrwork (2017/07) @etherealjoy (2018/02) @martindelille (2018/03) |
|
||||
| C# | @mandrean (2017/08), @jimschubert (2017/09) [:heart:](https://www.patreon.com/jimschubert) |
|
||||
| C++ | @ravinikam (2017/07) @stkrwork (2017/07) @etherealjoy (2018/02) @martindelille (2018/03) @muttleyxd (2019/08) |
|
||||
| C# | @mandrean (2017/08), @jimschubert (2017/09) [:heart:](https://www.patreon.com/jimschubert) @frankyjuang (2019/09) |
|
||||
| Clojure | |
|
||||
| Dart | @ircecho (2017/07) @swipesight (2018/09) @jaumard (2018/09) |
|
||||
| Dart | @ircecho (2017/07) @swipesight (2018/09) @jaumard (2018/09) @nickmeinhold (2019/09) |
|
||||
| Eiffel | @jvelilla (2017/09) |
|
||||
| Elixir | @mrmstn (2018/12) |
|
||||
| Elm | @eriktim (2018/09) |
|
||||
@@ -806,6 +842,7 @@ If you want to join the committee, please kindly apply by sending an email to te
|
||||
| Java | @bbdouglas (2017/07) @sreeshas (2017/08) @jfiala (2017/08) @lukoyanov (2017/09) @cbornet (2017/09) @jeff9finger (2018/01) @karismann (2019/03) @Zomzog (2019/04) |
|
||||
| Kotlin | @jimschubert (2017/09) [:heart:](https://www.patreon.com/jimschubert), @dr4ke616 (2018/08) @karismann (2019/03) @Zomzog (2019/04) |
|
||||
| Lua | @daurnimator (2017/08) |
|
||||
| Nim | |
|
||||
| NodeJS/Javascript | @CodeNinjai (2017/07) @frol (2017/07) @cliffano (2017/07) |
|
||||
| ObjC | |
|
||||
| OCaml | @cgensoul (2019/08) |
|
||||
|
||||
31
bin/asciidoc-documentation-petstore.sh
Executable file
31
bin/asciidoc-documentation-petstore.sh
Executable file
@@ -0,0 +1,31 @@
|
||||
#!/bin/sh
|
||||
|
||||
SCRIPT="$0"
|
||||
|
||||
while [ -h "$SCRIPT" ] ; do
|
||||
ls=$(ls -ld "$SCRIPT")
|
||||
link=$(expr "$ls" : '.*-> \(.*\)$')
|
||||
if expr "$link" : '/.*' > /dev/null; then
|
||||
SCRIPT="$link"
|
||||
else
|
||||
SCRIPT=$(dirname "$SCRIPT")/"$link"
|
||||
fi
|
||||
done
|
||||
|
||||
if [ ! -d "${APP_DIR}" ]; then
|
||||
APP_DIR=$(dirname "$SCRIPT")/..
|
||||
APP_DIR=$(cd "${APP_DIR}"; pwd)
|
||||
fi
|
||||
|
||||
executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar"
|
||||
|
||||
if [ ! -f "$executable" ]
|
||||
then
|
||||
mvn clean package
|
||||
fi
|
||||
|
||||
# if you've executed sbt assembly previously it will use that instead.
|
||||
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
|
||||
ags="$@ generate -t modules/openapi-generator/src/main/resources/asciidoc-documentation --additional-properties=specDir=modules/openapi-generator/src/main/resources/asciidoc-documentation,snippetDir=. -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g asciidoc -o samples/documentation/asciidoc"
|
||||
|
||||
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 -g cpp-pistache-server -t modules/openapi-generator/src/main/resources/cpp-pistache-server -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml --additional-properties addExternalLibs=true -o samples/server/petstore/cpp-pistache $@"
|
||||
ags="generate -g cpp-pistache-server -t modules/openapi-generator/src/main/resources/cpp-pistache-server -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml --additional-properties addExternalLibs=true --additional-properties useStructModel=false -o samples/server/petstore/cpp-pistache $@"
|
||||
|
||||
java $JAVA_OPTS -jar $executable $ags
|
||||
|
||||
@@ -1,50 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
SCRIPT="$0"
|
||||
|
||||
while [ -h "$SCRIPT" ] ; do
|
||||
ls=`ls -ld "$SCRIPT"`
|
||||
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||
if expr "$link" : '/.*' > /dev/null; then
|
||||
SCRIPT="$link"
|
||||
else
|
||||
SCRIPT=`dirname "$SCRIPT"`/"$link"
|
||||
fi
|
||||
done
|
||||
|
||||
if [ ! -d "${APP_DIR}" ]; then
|
||||
APP_DIR=`dirname "$SCRIPT"`/..
|
||||
APP_DIR=`cd "${APP_DIR}"; pwd`
|
||||
fi
|
||||
|
||||
executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar"
|
||||
|
||||
if [ ! -f "$executable" ]
|
||||
then
|
||||
mvn -B clean package
|
||||
fi
|
||||
|
||||
# if you've executed sbt assembly previously it will use that instead.
|
||||
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
|
||||
|
||||
## Generate non-browserClient
|
||||
#ags="generate -t modules/openapi-generator/src/main/resources/dart -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g dart -o samples/client/petstore/dart/swagger --additional-properties hideGenerationTimestamp=true,browserClient=false $@"
|
||||
#
|
||||
## then options to generate the library for vm would be:
|
||||
##ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g dart -o samples/client/petstore/dart/swagger_vm --additional-properties browserClient=false,pubName=swagger_vm $@"
|
||||
#java $JAVA_OPTS -jar $executable $ags
|
||||
#
|
||||
## Generate browserClient
|
||||
#ags="generate -t modules/openapi-generator/src/main/resources/dart -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g dart -o samples/client/petstore/dart/swagger-browser-client --additional-properties hideGenerationTimestamp=true,browserClient=true $@"
|
||||
#java $JAVA_OPTS -jar $executable $ags
|
||||
|
||||
# Generate non-browserClient and put it to the flutter sample app
|
||||
ags="generate -t modules/openapi-generator/src/main/resources/dart -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g dart -o samples/client/petstore/dart/flutter_petstore/swagger --additional-properties hideGenerationTimestamp=true,browserClient=false $@"
|
||||
java $JAVA_OPTS -jar $executable $ags
|
||||
|
||||
# There is a proposal to allow importing different libraries depending on the environment:
|
||||
# https://github.com/munificent/dep-interface-libraries
|
||||
# When this is implemented there will only be one library.
|
||||
|
||||
# The current petstore test will then work for both: the browser library and the vm library.
|
||||
|
||||
@@ -28,23 +28,6 @@ fi
|
||||
# if you've executed sbt assembly previously it will use that instead.
|
||||
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
|
||||
|
||||
# Generate non-browserClient
|
||||
ags="generate -t modules/openapi-generator/src/main/resources/dart -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g dart -o samples/client/petstore/dart2/openapi --additional-properties hideGenerationTimestamp=true,browserClient=false $@"
|
||||
|
||||
# then options to generate the library for vm would be:
|
||||
#ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g dart -o samples/client/petstore/dart2/openapi_vm --additional-properties browserClient=false,pubName=openapi_vm $@"
|
||||
# Generate client
|
||||
ags="generate -t modules/openapi-generator/src/main/resources/dart2 -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g dart -o samples/client/petstore/dart2/petstore_client_lib --additional-properties hideGenerationTimestamp=true $@"
|
||||
java $JAVA_OPTS -jar $executable $ags
|
||||
|
||||
# Generate browserClient
|
||||
ags="generate -t modules/openapi-generator/src/main/resources/dart -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g dart -o samples/client/petstore/dart2/openapi-browser-client --additional-properties hideGenerationTimestamp=true,browserClient=true $@"
|
||||
java $JAVA_OPTS -jar $executable $ags
|
||||
|
||||
# Generate non-browserClient and put it to the flutter sample app
|
||||
ags="generate -t modules/openapi-generator/src/main/resources/dart -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g dart -o samples/client/petstore/dart2/flutter_petstore/openapi --additional-properties hideGenerationTimestamp=true,browserClient=false $@"
|
||||
java $JAVA_OPTS -jar $executable $ags
|
||||
|
||||
# There is a proposal to allow importing different libraries depending on the environment:
|
||||
# https://github.com/munificent/dep-interface-libraries
|
||||
# When this is implemented there will only be one library.
|
||||
|
||||
# The current petstore test will then work for both: the browser library and the vm library.
|
||||
|
||||
31
bin/fsharp-functions-server-petstore.sh
Executable file
31
bin/fsharp-functions-server-petstore.sh
Executable file
@@ -0,0 +1,31 @@
|
||||
#!/bin/sh
|
||||
|
||||
SCRIPT="$0"
|
||||
|
||||
while [ -h "$SCRIPT" ] ; do
|
||||
ls=$(ls -ld "$SCRIPT")
|
||||
link=$(expr "$ls" : '.*-> \(.*\)$')
|
||||
if expr "$link" : '/.*' > /dev/null; then
|
||||
SCRIPT="$link"
|
||||
else
|
||||
SCRIPT=$(dirname "$SCRIPT")/"$link"
|
||||
fi
|
||||
done
|
||||
|
||||
if [ ! -d "${APP_DIR}" ]; then
|
||||
APP_DIR=$(dirname "$SCRIPT")/..
|
||||
APP_DIR=$(cd "${APP_DIR}"; pwd)
|
||||
fi
|
||||
|
||||
executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar"
|
||||
|
||||
if [ ! -f "$executable" ]
|
||||
then
|
||||
mvn clean package
|
||||
fi
|
||||
|
||||
# if you've executed sbt assembly previously it will use that instead.
|
||||
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
|
||||
ags="$@ generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g fsharp-functions -o samples/server/petstore/fsharp-functions"
|
||||
|
||||
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/rust -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g rust -o samples/client/petstore/rust-reqwest --additional-properties packageName=petstore_client --library=reqwest $@"
|
||||
ags="generate -t modules/openapi-generator/src/main/resources/kotlin-client -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g kotlin --artifact-id kotlin-client-petstore-multiplatform --library multiplatform -o samples/client/petstore/kotlin-multiplatform $@"
|
||||
|
||||
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/kotlin-client -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g kotlin --artifact-id kotlin-petstore-client --additional-properties dateLibrary=java8 -o samples/client/petstore/kotlin $@"
|
||||
ags="generate -t modules/openapi-generator/src/main/resources/kotlin-client -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g kotlin --artifact-id kotlin-petstore-client --additional-properties dateLibrary=java8,serializableModel=true -o samples/client/petstore/kotlin $@"
|
||||
|
||||
java ${JAVA_OPTS} -jar ${executable} ${ags}
|
||||
|
||||
@@ -27,7 +27,7 @@ fi
|
||||
|
||||
# if you've executed sbt assembly previously it will use that instead.
|
||||
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
|
||||
ags="generate -t modules/openapi-generator/src/main/resources/kotlin-client -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g kotlin --artifact-id kotlin-petstore-string --additional-properties dateLibrary=string -o samples/client/petstore/kotlin-string $@"
|
||||
ags="generate -t modules/openapi-generator/src/main/resources/kotlin-client -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g kotlin --artifact-id kotlin-petstore-string --additional-properties dateLibrary=string,serializableModel=true -o samples/client/petstore/kotlin-string $@"
|
||||
|
||||
java ${JAVA_OPTS} -jar ${executable} ${ags}
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ 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 -t modules/openapi-generator/src/main/resources/kotlin-server -g kotlin-server --library=ktor -o samples/server/petstore/kotlin-server/ktor --additional-properties hideGenerationTimestamp=true $@"
|
||||
ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -t modules/openapi-generator/src/main/resources/kotlin-server -g kotlin-server --library=ktor -o samples/server/petstore/kotlin-server/ktor --additional-properties hideGenerationTimestamp=true,serializableModel=true $@"
|
||||
|
||||
java ${JAVA_OPTS} -jar ${executable} ${ags}
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ then
|
||||
fi
|
||||
|
||||
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
|
||||
ags="$@ generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -t modules/openapi-generator/src/main/resources/kotlin-spring -g kotlin-spring -o samples/server/petstore/kotlin-springboot --additional-properties=library=spring-boot,beanValidations=true,swaggerAnnotations=true,serviceImplementation=true"
|
||||
ags="$@ generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -t modules/openapi-generator/src/main/resources/kotlin-spring -g kotlin-spring -o samples/server/petstore/kotlin-springboot --additional-properties=library=spring-boot,beanValidations=true,swaggerAnnotations=true,serviceImplementation=true,serializableModel=true"
|
||||
|
||||
echo "Cleaning previously generated files if any from samples/server/petstore/kotlin-springboot"
|
||||
rm -rf samples/server/petstore/kotlin-springboot
|
||||
|
||||
31
bin/kotlin-vertx-server-petstore.sh
Executable file
31
bin/kotlin-vertx-server-petstore.sh
Executable file
@@ -0,0 +1,31 @@
|
||||
#!/bin/sh
|
||||
|
||||
SCRIPT="$0"
|
||||
|
||||
while [ -h "$SCRIPT" ] ; do
|
||||
ls=$(ls -ld "$SCRIPT")
|
||||
link=$(expr "$ls" : '.*-> \(.*\)$')
|
||||
if expr "$link" : '/.*' > /dev/null; then
|
||||
SCRIPT="$link"
|
||||
else
|
||||
SCRIPT=$(dirname "$SCRIPT")/"$link"
|
||||
fi
|
||||
done
|
||||
|
||||
if [ ! -d "${APP_DIR}" ]; then
|
||||
APP_DIR=$(dirname "$SCRIPT")/..
|
||||
APP_DIR=$(cd "${APP_DIR}"; pwd)
|
||||
fi
|
||||
|
||||
executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar"
|
||||
|
||||
if [ ! -f "$executable" ]
|
||||
then
|
||||
mvn clean package
|
||||
fi
|
||||
|
||||
# if you've executed sbt assembly previously it will use that instead.
|
||||
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
|
||||
ags="$@ generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g kotlin-vertx -o samples/server/petstore/kotlin/vertx"
|
||||
|
||||
java ${JAVA_OPTS} -jar ${executable} ${ags}
|
||||
@@ -22,7 +22,7 @@ executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar"
|
||||
|
||||
if [ ! -f "$executable" ]
|
||||
then
|
||||
mvn -B clean package
|
||||
./mvnw -B clean package
|
||||
fi
|
||||
|
||||
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
|
||||
@@ -30,7 +30,7 @@ ags="meta -n myClientCodegen -t DOCUMENTATION -p com.my.company.codegen -o sampl
|
||||
|
||||
java $JAVA_OPTS -jar $executable $ags
|
||||
|
||||
mvn clean package -f samples/meta-codegen/pom.xml
|
||||
./mvnw clean package -f samples/meta-codegen/pom.xml
|
||||
|
||||
ags2="generate -g myClientCodegen -i modules/openapi-generator/src/test/resources/2_0/petstore.json -o samples/meta-codegen/usage $@"
|
||||
|
||||
|
||||
31
bin/nim-client-petstore.sh
Executable file
31
bin/nim-client-petstore.sh
Executable file
@@ -0,0 +1,31 @@
|
||||
#!/bin/sh
|
||||
|
||||
SCRIPT="$0"
|
||||
|
||||
while [ -h "$SCRIPT" ] ; do
|
||||
ls=$(ls -ld "$SCRIPT")
|
||||
link=$(expr "$ls" : '.*-> \(.*\)$')
|
||||
if expr "$link" : '/.*' > /dev/null; then
|
||||
SCRIPT="$link"
|
||||
else
|
||||
SCRIPT=$(dirname "$SCRIPT")/"$link"
|
||||
fi
|
||||
done
|
||||
|
||||
if [ ! -d "${APP_DIR}" ]; then
|
||||
APP_DIR=$(dirname "$SCRIPT")/..
|
||||
APP_DIR=$(cd "${APP_DIR}"; pwd)
|
||||
fi
|
||||
|
||||
executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar"
|
||||
|
||||
if [ ! -f "$executable" ]
|
||||
then
|
||||
mvn clean package
|
||||
fi
|
||||
|
||||
# if you've executed sbt assembly previously it will use that instead.
|
||||
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
|
||||
ags="$@ generate -t modules/openapi-generator/src/main/resources/nim-client -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml --additional-properties packageName=petstore -g nim -o samples/client/petstore/nim"
|
||||
|
||||
java ${JAVA_OPTS} -jar ${executable} ${ags}
|
||||
32
bin/openapi3/avro-petstore.sh
Executable file
32
bin/openapi3/avro-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 -t modules/openapi-generator/src/main/resources/avro-schema -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g avro-schema -o samples/openapi3/schema/petstore/avro-schema $@"
|
||||
|
||||
java $JAVA_OPTS -jar $executable $ags
|
||||
35
bin/openapi3/kotlin-client-petstore-multiplatform.sh
Executable file
35
bin/openapi3/kotlin-client-petstore-multiplatform.sh
Executable file
@@ -0,0 +1,35 @@
|
||||
#!/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
|
||||
|
||||
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
|
||||
ags="generate -i modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml -t modules/openapi-generator/src/main/resources/kotlin-client -g kotlin --artifact-id kotlin-client-petstore-multiplatform --library multiplatform -o samples/openapi3/client/petstore/kotlin-multiplatform $@"
|
||||
|
||||
echo "Cleaning previously generated files if any from samples/openapi3/client/petstore/kotlin-multiplatform"
|
||||
rm -rf samples/openapi3/client/petstore/kotlin-multiplatform
|
||||
|
||||
echo "Generating Kotling client..."
|
||||
java $JAVA_OPTS -jar $executable $ags
|
||||
@@ -26,7 +26,7 @@ then
|
||||
fi
|
||||
|
||||
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
|
||||
ags="$@ generate -i modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml -t modules/openapi-generator/src/main/resources/kotlin-client -g kotlin --artifact-id kotlin-petstore-client --additional-properties dateLibrary=java8 -o samples/openapi3/client/petstore/kotlin $@"
|
||||
ags="generate -i modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml -t modules/openapi-generator/src/main/resources/kotlin-client -g kotlin --artifact-id kotlin-petstore-client --additional-properties dateLibrary=java8,serializableModel=true -o samples/openapi3/client/petstore/kotlin $@"
|
||||
|
||||
echo "Cleaning previously generated files if any from samples/openapi3/client/petstore/kotlin"
|
||||
rm -rf samples/openapi3/client/petstore/kotlin
|
||||
|
||||
@@ -26,7 +26,7 @@ then
|
||||
fi
|
||||
|
||||
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/kotlin-spring -g kotlin-spring -o samples/openapi3/server/petstore/kotlin-springboot --additional-properties=library=spring-boot,beanValidations=true,swaggerAnnotations=true,serviceImplementation=true"
|
||||
ags="$@ generate -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -t modules/openapi-generator/src/main/resources/kotlin-spring -g kotlin-spring -o samples/openapi3/server/petstore/kotlin-springboot --additional-properties=library=spring-boot,beanValidations=true,swaggerAnnotations=true,serviceImplementation=true,serializableModel=true"
|
||||
|
||||
echo "Cleaning previously generated files if any from samples/server/openapi3/petstore/kotlin-springboot"
|
||||
rm -rf samples/server/openapi3/petstore/kotlin-springboot
|
||||
|
||||
@@ -4,3 +4,4 @@
|
||||
./bin/openapi3/typescript-fetch-petstore-with-npm-version.sh
|
||||
./bin/openapi3/typescript-fetch-petstore-interfaces.sh
|
||||
./bin/openapi3/typescript-fetch-petstore.sh
|
||||
./bin/openapi3/typescript-fetch-petstore-prefix-parameter-interfaces.sh
|
||||
|
||||
32
bin/openapi3/typescript-fetch-petstore-prefix-parameter-interfaces.sh
Executable file
32
bin/openapi3/typescript-fetch-petstore-prefix-parameter-interfaces.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 -g typescript-fetch -o samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces --additional-properties prefixParameterInterfaces=true $@"
|
||||
|
||||
java $JAVA_OPTS -jar $executable $ags
|
||||
10
bin/openapi3/windows/nodejs-express-server-petstore.bat
Executable file
10
bin/openapi3/windows/nodejs-express-server-petstore.bat
Executable 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 -i modules\openapi-generator\src\test\resources\3_0\petstore.yaml -g nodejs-express-server -o samples\openapi3\server\petstore\nodejs-express-server
|
||||
|
||||
java %JAVA_OPTS% -jar %executable% %ags%
|
||||
32
bin/protobuf-schema-petstore.sh
Executable file
32
bin/protobuf-schema-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 -B clean package
|
||||
fi
|
||||
|
||||
# if you've executed sbt assembly previously it will use that instead.
|
||||
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties $@"
|
||||
ags="generate -t modules/openapi-generator/src/main/resources/protobuf-schema -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g protobuf-schema -o samples/config/petstore/protobuf-schema --additional-properties packageName=petstore $@"
|
||||
|
||||
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/python -i modules/openapi-generator/src/test/resources/2_0/python-client-experimental/petstore-with-fake-endpoints-models-for-testing.yaml -g python-experimental -o samples/client/petstore/python-experimental -DpackageName=petstore_api $@"
|
||||
ags="generate -t modules/openapi-generator/src/main/resources/python -i modules/openapi-generator/src/test/resources/2_0/python-client-experimental/petstore-with-fake-endpoints-models-for-testing.yaml -g python-experimental -o samples/client/petstore/python-experimental --additional-properties packageName=petstore_api $@"
|
||||
|
||||
java $JAVA_OPTS -jar $executable $ags
|
||||
|
||||
@@ -2,5 +2,6 @@
|
||||
"gemName": "petstore",
|
||||
"moduleName": "Petstore",
|
||||
"library": "faraday",
|
||||
"gemVersion": "1.0.0"
|
||||
"gemVersion": "1.0.0",
|
||||
"strictSpecBehavior": false
|
||||
}
|
||||
|
||||
@@ -2,5 +2,6 @@
|
||||
"gemName": "petstore",
|
||||
"library": "typhoeus",
|
||||
"moduleName": "Petstore",
|
||||
"gemVersion": "1.0.0"
|
||||
"gemVersion": "1.0.0",
|
||||
"strictSpecBehavior": false
|
||||
}
|
||||
|
||||
@@ -27,6 +27,21 @@ 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/rust -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g rust -o samples/client/petstore/rust --additional-properties packageName=petstore_client --library=hyper $@"
|
||||
|
||||
java ${JAVA_OPTS} -jar ${executable} ${ags}
|
||||
for spec_path in \
|
||||
modules/openapi-generator/src/test/resources/2_0/petstore.yaml \
|
||||
modules/openapi-generator/src/test/resources/3_0/rust/rust-test.yaml \
|
||||
modules/openapi-generator/src/test/resources/2_0/fileResponseTest.json\
|
||||
; do
|
||||
spec=$(basename "$spec_path" | sed 's/.yaml//' | sed 's/.json//' )
|
||||
|
||||
for library in hyper reqwest; do
|
||||
args="generate --template-dir modules/openapi-generator/src/main/resources/rust
|
||||
--input-spec $spec_path
|
||||
--generator-name rust
|
||||
--output samples/client/petstore/rust/$library/$spec
|
||||
--additional-properties packageName=${spec}-${library}
|
||||
--library=$library $@"
|
||||
java ${JAVA_OPTS} -jar ${executable} ${args} || exit 1
|
||||
done
|
||||
done
|
||||
|
||||
@@ -38,4 +38,8 @@ for spec_path in modules/openapi-generator/src/test/resources/*/rust-server/* ;
|
||||
$@"
|
||||
|
||||
java $JAVA_OPTS -jar $executable $args
|
||||
|
||||
if [ $? -ne 0 ]; then
|
||||
exit $?
|
||||
fi
|
||||
done
|
||||
|
||||
@@ -13,3 +13,4 @@
|
||||
./bin/typescript-angular-v7-petstore-not-provided-in-root-with-npm.sh
|
||||
./bin/typescript-angular-v7-petstore-provided-in-root.sh
|
||||
./bin/typescript-angular-v7-petstore-provided-in-root-with-npm.sh
|
||||
./bin/typescript-angular-v8-petstore-provided-in-root-with-npm.sh
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"npmName": "@openapitools/typescript-angular-petstore",
|
||||
"npmVersion": "1.0.0",
|
||||
"npmRepository" : "https://skimdb.npmjs.com/registry",
|
||||
"snapshot" : false,
|
||||
"ngVersion": "8.0.0"
|
||||
}
|
||||
32
bin/typescript-angular-v8-petstore-provided-in-root-with-npm.sh
Executable file
32
bin/typescript-angular-v8-petstore-provided-in-root-with-npm.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 -B clean package
|
||||
fi
|
||||
|
||||
# if you've executed sbt assembly previously it will use that instead.
|
||||
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
|
||||
ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g typescript-angular -c bin/typescript-angular-v8-petstore-provided-in-root-with-npm.json -o samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-npm --additional-properties ngVersion=8.0.0 $@"
|
||||
|
||||
java $JAVA_OPTS -jar $executable $ags
|
||||
@@ -4,4 +4,6 @@
|
||||
./bin/typescript-fetch-petstore-with-npm-version.sh
|
||||
./bin/typescript-fetch-petstore-interfaces.sh
|
||||
./bin/typescript-fetch-petstore.sh
|
||||
./bin/typescript-fetch-petstore-multiple-parameters.sh
|
||||
./bin/typescript-fetch-petstore-multiple-parameters.sh
|
||||
./bin/typescript-fetch-petstore-prefix-parameter-interfaces.sh
|
||||
./bin/typescript-fetch-petstore-typescript-three-plus.sh
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"npmName": "@openapitools/typescript-fetch-petstore",
|
||||
"npmVersion": "1.0.0",
|
||||
"npmRepository" : "https://skimdb.npmjs.com/registry",
|
||||
"snapshot" : false,
|
||||
"prefixParameterInterfaces": true
|
||||
}
|
||||
34
bin/typescript-fetch-petstore-prefix-parameter-interfaces.sh
Executable file
34
bin/typescript-fetch-petstore-prefix-parameter-interfaces.sh
Executable file
@@ -0,0 +1,34 @@
|
||||
#!/bin/sh
|
||||
|
||||
SCRIPT="$0"
|
||||
echo "# START SCRIPT: $SCRIPT"
|
||||
|
||||
while [ -h "$SCRIPT" ] ; do
|
||||
ls=`ls -ld "$SCRIPT"`
|
||||
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||
if expr "$link" : '/.*' > /dev/null; then
|
||||
SCRIPT="$link"
|
||||
else
|
||||
SCRIPT=`dirname "$SCRIPT"`/"$link"
|
||||
fi
|
||||
done
|
||||
|
||||
if [ ! -d "${APP_DIR}" ]; then
|
||||
APP_DIR=`dirname "$SCRIPT"`/..
|
||||
APP_DIR=`cd "${APP_DIR}"; pwd`
|
||||
fi
|
||||
|
||||
executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar"
|
||||
|
||||
if [ ! -f "$executable" ]
|
||||
then
|
||||
mvn -B clean package
|
||||
fi
|
||||
|
||||
# if you've executed sbt assembly previously it will use that instead.
|
||||
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
|
||||
ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g typescript-fetch -c bin/typescript-fetch-petstore-prefix-parameter-interfaces.json -o samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces $@"
|
||||
|
||||
java $JAVA_OPTS -jar $executable $ags
|
||||
|
||||
cp CI/samples.ci/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/pom.xml samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/pom.xml
|
||||
7
bin/typescript-fetch-petstore-typescript-three-plus.json
Normal file
7
bin/typescript-fetch-petstore-typescript-three-plus.json
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"npmName": "@openapitools/typescript-fetch-petstore",
|
||||
"npmVersion": "1.0.0",
|
||||
"npmRepository" : "https://skimdb.npmjs.com/registry",
|
||||
"snapshot" : false,
|
||||
"typescriptThreePlus": true
|
||||
}
|
||||
32
bin/typescript-fetch-petstore-typescript-three-plus.sh
Executable file
32
bin/typescript-fetch-petstore-typescript-three-plus.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 -B clean package
|
||||
fi
|
||||
|
||||
# if you've executed sbt assembly previously it will use that instead.
|
||||
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
|
||||
ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g typescript-fetch -c bin/typescript-fetch-petstore-typescript-three-plus.json -o samples/client/petstore/typescript-fetch/builds/typescript-three-plus $@"
|
||||
|
||||
java $JAVA_OPTS -jar $executable $ags
|
||||
@@ -12,6 +12,7 @@ sleep 5
|
||||
# LIST OF SCRIPTS:
|
||||
declare -a scripts=(
|
||||
# SAMPLES
|
||||
"./bin/ruby-client-petstore.sh"
|
||||
"./bin/openapi3/ruby-client-petstore.sh"
|
||||
"./bin/openapi3/ruby-client-faraday-petstore.sh"
|
||||
"./bin/java-petstore-all.sh"
|
||||
@@ -20,6 +21,7 @@ declare -a scripts=(
|
||||
"./bin/openapi3/jaxrs-jersey-petstore.sh"
|
||||
"./bin/spring-all-petstore.sh"
|
||||
"./bin/javascript-petstore-all.sh"
|
||||
"./bin/kotlin-client-petstore-multiplatform.sh"
|
||||
"./bin/kotlin-client-petstore.sh"
|
||||
"./bin/kotlin-client-string.sh"
|
||||
"./bin/kotlin-client-threetenbp.sh"
|
||||
@@ -27,6 +29,7 @@ declare -a scripts=(
|
||||
"./bin/kotlin-springboot-petstore-server.sh"
|
||||
"./bin/kotlin-springboot-petstore-server-reactive.sh"
|
||||
"./bin/mysql-schema-petstore.sh"
|
||||
"./bin/nim-client-petstore.sh"
|
||||
"./bin/python-petstore-all.sh"
|
||||
"./bin/openapi3/python-petstore.sh"
|
||||
"./bin/php-petstore.sh"
|
||||
@@ -51,17 +54,22 @@ declare -a scripts=(
|
||||
"./bin/csharp-petstore.sh"
|
||||
"./bin/csharp-netcore-petstore-all.sh"
|
||||
"./bin/elixir-petstore.sh"
|
||||
"./bin/openapi3/go-petstore.sh"
|
||||
"./bin/go-experimental-petstore.sh"
|
||||
"./bin/go-petstore.sh"
|
||||
"./bin/go-petstore-withxml.sh"
|
||||
"./bin/go-gin-petstore-server.sh"
|
||||
"./bin/groovy-petstore.sh"
|
||||
"./bin/apex-petstore.sh"
|
||||
"./bin/perl-petstore-all.sh"
|
||||
"./bin/dart-jaguar-petstore.sh"
|
||||
"./bin/dart-petstore.sh"
|
||||
"./bin/dart2-petstore.sh"
|
||||
"./bin/java-play-framework-petstore-server-all.sh"
|
||||
#"./bin/elm-petstore-all.sh"
|
||||
"./bin/meta-codegen.sh"
|
||||
# OTHERS
|
||||
"./bin/utils/export_docs_generators.sh"
|
||||
"./bin/utils/export_generators_docusaurus_index.sh"
|
||||
"./bin/utils/copy-to-website.sh"
|
||||
"./bin/utils/export_generators_readme.sh")
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ echo "# START SCRIPT: ${SCRIPT}"
|
||||
|
||||
executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar"
|
||||
|
||||
for GENERATOR in $(java -jar ${executable} list --short | sed -e 's/,/\'$'\n''/g')
|
||||
for GENERATOR in $(java -jar ${executable} list --short --include all | sed -e 's/,/\'$'\n''/g')
|
||||
do
|
||||
./bin/utils/export_generator.sh ${GENERATOR}
|
||||
done
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
SCRIPT="$0"
|
||||
echo "# START SCRIPT: $SCRIPT"
|
||||
|
||||
executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar"
|
||||
|
||||
\rm -rf docs/generators.md
|
||||
|
||||
cat > docs/generators.md << EOF
|
||||
---
|
||||
id: generators
|
||||
title: Generators List
|
||||
---
|
||||
|
||||
EOF
|
||||
|
||||
java -jar $executable list --docsite >> docs/generators.md
|
||||
|
||||
echo "Wrote $(pwd)/docs/generators.md"
|
||||
@@ -15,6 +15,6 @@ title: Generators List
|
||||
|
||||
EOF
|
||||
|
||||
java -jar $executable list | sed -e 's/\([A-Z]*\) generators:/* \1 generators:/g' -e 's/- \([a-z0-9\-]*\)/- [\1]\(generators\/\1.md\)/g' >> docs/generators.md
|
||||
java -jar $executable list --docsite --include all >> docs/generators.md
|
||||
|
||||
echo "Wrote $(pwd)/docs/generators.md"
|
||||
|
||||
@@ -42,7 +42,7 @@ artifactid=openapi-generator-cli
|
||||
ver=${OPENAPI_GENERATOR_VERSION:-$(latest.tag $ghrepo)}
|
||||
|
||||
jar=${artifactid}-${ver}.jar
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
DIR=${OPENAPI_GENERATOR_DOWLOAD_CACHE_DIR:-"$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"}
|
||||
|
||||
if [ ! -f ${DIR}/${jar} ]; then
|
||||
repo="central::default::https://repo1.maven.org/maven2/"
|
||||
|
||||
10
bin/windows/asciidoc-documentation-petstore.bat
Normal file
10
bin/windows/asciidoc-documentation-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 "asciidoc-petstore-documentation" -t modules\openapi-generator\src\main\resources\asciidoc-documentation --additional-properties=specDir=modules\openapi-generator\src\main\resources\asciidoc-documentation,snippetDir=. -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g asciidoc -o samples\documentation\asciidoc
|
||||
|
||||
java %JAVA_OPTS% -jar %executable% %ags%
|
||||
10
bin/windows/fsharp-functions-server-petstore.bat
Normal file
10
bin/windows/fsharp-functions-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-functions-petstore-server" -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g fsharp-functions -o samples\server\petstore\fsharp-functions
|
||||
|
||||
java %JAVA_OPTS% -jar %executable% %ags%
|
||||
10
bin/windows/kotlin-client-petstore-multiplatform.bat
Normal file
10
bin/windows/kotlin-client-petstore-multiplatform.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 "kotlin-client-petstore-multiplatform" -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g kotlin --library multiplatform -o samples\client\petstore\kotlin-multiplatform
|
||||
|
||||
java %JAVA_OPTS% -jar %executable% %ags%
|
||||
10
bin/windows/kotlin-vertx-server-petstore.bat
Normal file
10
bin/windows/kotlin-vertx-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 "kotlin-vertx-petstore-server" -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g kotlin-vertx -o samples\server\petstore\kotlin\vertx
|
||||
|
||||
java %JAVA_OPTS% -jar %executable% %ags%
|
||||
10
bin/windows/nim-client-petstore.bat
Normal file
10
bin/windows/nim-client-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 "nim-petstore-client" -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml --additional-properties packageName=petstore -g nim -o samples\client\petstore\nim
|
||||
|
||||
java %JAVA_OPTS% -jar %executable% %ags%
|
||||
10
bin/windows/protobuf-schema-petstore.bat
Executable file
10
bin/windows/protobuf-schema-petstore.bat
Executable 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
|
||||
set ags=generate -t modules\openapi-generator\src\main\resources\protobuf-schema -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g protobuf-schema -o samples\config\petstore\protobuf-schema
|
||||
|
||||
java %JAVA_OPTS% -jar %executable% %ags%
|
||||
@@ -11,4 +11,4 @@ call .\bin\windows\typescript-angular-v7-provided-in-root.bat
|
||||
call .\bin\windows\typescript-angular-v7-provided-in-root-with-npm.bat
|
||||
call .\bin\windows\typescript-angular-v7-not-provided-in-root.bat
|
||||
call .\bin\windows\typescript-angular-v7-not-provided-in-root-with-npm.bat
|
||||
|
||||
call .\bin\windows\typescript-angular-v8-provided-in-root-with-npm.bat
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
set executable=.\modules\openapi-generator-cli\target\openapi-generator-cli.jar
|
||||
|
||||
If Not Exist %executable% (
|
||||
mvn clean package
|
||||
)
|
||||
|
||||
set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g typescript-angular -c bin/typescript-angular-v8-petstore-provided-in-root-with-npm.json -o samples\client\petstore\typescript-angular-v8-provided-in-root\builds\with-npm --additional-properties ngVersion=8.0.0
|
||||
|
||||
java %JAVA_OPTS% -jar %executable% %ags%
|
||||
@@ -5,3 +5,5 @@ call bin\windows\typescript-fetch-petstore-target-es6.bat
|
||||
call bin\windows\typescript-fetch-petstore-with-npm-version.bat
|
||||
call bin\windows\typescript-fetch-petstore-interfaces.bat
|
||||
call bin\windows\typescript-fetch-petstore-multiple-parameters.bat
|
||||
call bin\windows\typescript-fetch-petstore-prefix-parameter-interfaces.bat
|
||||
call bin\windows\typescript-fetch-petstore-typescript-three-plus.bat
|
||||
@@ -0,0 +1,12 @@
|
||||
@ECHO OFF
|
||||
|
||||
set executable=.\modules\openapi-generator-cli\target\openapi-generator-cli.jar
|
||||
|
||||
If Not Exist %executable% (
|
||||
mvn clean package
|
||||
)
|
||||
|
||||
REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M
|
||||
set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g typescript-fetch -o samples\client\petstore\typescript-fetch\builds\prefix-parameter-interfaces --additional-properties prefixParameterInterfaces=true
|
||||
|
||||
java %JAVA_OPTS% -jar %executable% %ags%
|
||||
@@ -0,0 +1,12 @@
|
||||
@ECHO OFF
|
||||
|
||||
set executable=.\modules\openapi-generator-cli\target\openapi-generator-cli.jar
|
||||
|
||||
If Not Exist %executable% (
|
||||
mvn clean package
|
||||
)
|
||||
|
||||
REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M
|
||||
set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g typescript-fetch -c bin/typescript-fetch-petstore-typescript-three-plus.json -o samples\client\petstore\typescript-fetch\builds\typescript-three-plus
|
||||
|
||||
java %JAVA_OPTS% -jar %executable% %ags%
|
||||
@@ -5,7 +5,7 @@ title: FAQ: General
|
||||
|
||||
## Do you have a chat room?
|
||||
|
||||
[](https://gitter.im/OpenAPITools/openapi-generator)
|
||||
[](https://join.slack.com/t/openapi-generator/shared_invite/enQtNzAyNDMyOTU0OTE1LTY5ZDBiNDI5NzI5ZjQ1Y2E5OWVjMjZkYzY1ZGM2MWQ4YWFjMzcyNDY5MGI4NjQxNDBiMTlmZTc5NjY2ZTQ5MGM)
|
||||
|
||||
## What is the governance structure of the OpenAPI Generator project?
|
||||
|
||||
|
||||
@@ -5,132 +5,138 @@ title: Generators List
|
||||
|
||||
The following generators are available:
|
||||
|
||||
* CLIENT generators:
|
||||
- [ada](generators/ada.md)
|
||||
- [android](generators/android.md)
|
||||
- [apex](generators/apex.md)
|
||||
- [bash](generators/bash.md)
|
||||
- [c](generators/c.md)
|
||||
- [clojure](generators/clojure.md)
|
||||
- [cpp-qt5-client](generators/cpp-qt5-client.md)
|
||||
- [cpp-restsdk](generators/cpp-restsdk.md)
|
||||
- [cpp-tizen](generators/cpp-tizen.md)
|
||||
- [csharp](generators/csharp.md)
|
||||
- [csharp-dotnet2](generators/csharp-dotnet2.md) (deprecated)
|
||||
- [csharp-netcore](generators/csharp-netcore.md)
|
||||
- [dart](generators/dart.md)
|
||||
- [dart-jaguar](generators/dart-jaguar.md)
|
||||
- [eiffel](generators/eiffel.md)
|
||||
- [elixir](generators/elixir.md)
|
||||
- [elm](generators/elm.md)
|
||||
- [erlang-client](generators/erlang-client.md)
|
||||
- [erlang-proper](generators/erlang-proper.md)
|
||||
- [flash](generators/flash.md)
|
||||
- [go](generators/go.md)
|
||||
- [go-experimental](generators/go-experimental.md)
|
||||
- [groovy](generators/groovy.md)
|
||||
- [haskell-http-client](generators/haskell-http-client.md)
|
||||
- [java](generators/java.md)
|
||||
- [javascript](generators/javascript.md)
|
||||
- [javascript-closure-angular](generators/javascript-closure-angular.md)
|
||||
- [javascript-flowtyped](generators/javascript-flowtyped.md)
|
||||
- [jaxrs-cxf-client](generators/jaxrs-cxf-client.md)
|
||||
- [jmeter](generators/jmeter.md)
|
||||
- [kotlin](generators/kotlin.md)
|
||||
- [lua](generators/lua.md)
|
||||
- [objc](generators/objc.md)
|
||||
- [ocaml](generators/ocaml.md)
|
||||
- [perl](generators/perl.md)
|
||||
- [php](generators/php.md)
|
||||
- [powershell](generators/powershell.md)
|
||||
- [python](generators/python.md)
|
||||
- [python-experimental](generators/python-experimental.md)
|
||||
- [r](generators/r.md)
|
||||
- [ruby](generators/ruby.md)
|
||||
- [rust](generators/rust.md)
|
||||
- [scala-akka](generators/scala-akka.md)
|
||||
- [scala-gatling](generators/scala-gatling.md)
|
||||
- [scala-httpclient-deprecated](generators/scala-httpclient-deprecated.md) (deprecated)
|
||||
- [scalaz](generators/scalaz.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)
|
||||
- [typescript-aurelia](generators/typescript-aurelia.md)
|
||||
- [typescript-axios](generators/typescript-axios.md)
|
||||
- [typescript-fetch](generators/typescript-fetch.md)
|
||||
- [typescript-inversify](generators/typescript-inversify.md)
|
||||
- [typescript-jquery](generators/typescript-jquery.md)
|
||||
- [typescript-node](generators/typescript-node.md)
|
||||
- [typescript-rxjs](generators/typescript-rxjs.md)
|
||||
## CLIENT generators
|
||||
* [ada](generators/ada)
|
||||
* [android](generators/android)
|
||||
* [apex](generators/apex)
|
||||
* [bash](generators/bash)
|
||||
* [c](generators/c)
|
||||
* [clojure](generators/clojure)
|
||||
* [cpp-qt5-client](generators/cpp-qt5-client)
|
||||
* [cpp-restsdk](generators/cpp-restsdk)
|
||||
* [cpp-tizen](generators/cpp-tizen)
|
||||
* [csharp](generators/csharp)
|
||||
* [csharp-dotnet2 (deprecated)](generators/csharp-dotnet2)
|
||||
* [csharp-netcore](generators/csharp-netcore)
|
||||
* [dart](generators/dart)
|
||||
* [dart-jaguar](generators/dart-jaguar)
|
||||
* [eiffel](generators/eiffel)
|
||||
* [elixir](generators/elixir)
|
||||
* [elm](generators/elm)
|
||||
* [erlang-client](generators/erlang-client)
|
||||
* [erlang-proper](generators/erlang-proper)
|
||||
* [flash](generators/flash)
|
||||
* [go](generators/go)
|
||||
* [go-experimental (experimental)](generators/go-experimental)
|
||||
* [groovy](generators/groovy)
|
||||
* [haskell-http-client](generators/haskell-http-client)
|
||||
* [java](generators/java)
|
||||
* [javascript](generators/javascript)
|
||||
* [javascript-closure-angular](generators/javascript-closure-angular)
|
||||
* [javascript-flowtyped](generators/javascript-flowtyped)
|
||||
* [jaxrs-cxf-client](generators/jaxrs-cxf-client)
|
||||
* [jmeter](generators/jmeter)
|
||||
* [kotlin](generators/kotlin)
|
||||
* [lua](generators/lua)
|
||||
* [nim (beta)](generators/nim)
|
||||
* [objc](generators/objc)
|
||||
* [ocaml](generators/ocaml)
|
||||
* [perl](generators/perl)
|
||||
* [php](generators/php)
|
||||
* [powershell](generators/powershell)
|
||||
* [python](generators/python)
|
||||
* [python-experimental (experimental)](generators/python-experimental)
|
||||
* [r](generators/r)
|
||||
* [ruby](generators/ruby)
|
||||
* [rust](generators/rust)
|
||||
* [scala-akka](generators/scala-akka)
|
||||
* [scala-gatling](generators/scala-gatling)
|
||||
* [scala-httpclient-deprecated (deprecated)](generators/scala-httpclient-deprecated)
|
||||
* [scalaz](generators/scalaz)
|
||||
* [swift2-deprecated (deprecated)](generators/swift2-deprecated)
|
||||
* [swift3-deprecated (deprecated)](generators/swift3-deprecated)
|
||||
* [swift4](generators/swift4)
|
||||
* [typescript-angular](generators/typescript-angular)
|
||||
* [typescript-angularjs](generators/typescript-angularjs)
|
||||
* [typescript-aurelia](generators/typescript-aurelia)
|
||||
* [typescript-axios](generators/typescript-axios)
|
||||
* [typescript-fetch](generators/typescript-fetch)
|
||||
* [typescript-inversify](generators/typescript-inversify)
|
||||
* [typescript-jquery](generators/typescript-jquery)
|
||||
* [typescript-node](generators/typescript-node)
|
||||
* [typescript-rxjs](generators/typescript-rxjs)
|
||||
|
||||
|
||||
* SERVER generators:
|
||||
- [ada-server](generators/ada-server.md)
|
||||
- [aspnetcore](generators/aspnetcore.md)
|
||||
- [cpp-pistache-server](generators/cpp-pistache-server.md)
|
||||
- [cpp-qt5-qhttpengine-server](generators/cpp-qt5-qhttpengine-server.md)
|
||||
- [cpp-restbed-server](generators/cpp-restbed-server.md)
|
||||
- [csharp-nancyfx](generators/csharp-nancyfx.md)
|
||||
- [erlang-server](generators/erlang-server.md)
|
||||
- [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)
|
||||
- [haskell](generators/haskell.md)
|
||||
- [java-inflector](generators/java-inflector.md)
|
||||
- [java-msf4j](generators/java-msf4j.md)
|
||||
- [java-pkmst](generators/java-pkmst.md)
|
||||
- [java-play-framework](generators/java-play-framework.md)
|
||||
- [java-undertow-server](generators/java-undertow-server.md)
|
||||
- [java-vertx](generators/java-vertx.md)
|
||||
- [jaxrs-cxf](generators/jaxrs-cxf.md)
|
||||
- [jaxrs-cxf-cdi](generators/jaxrs-cxf-cdi.md)
|
||||
- [jaxrs-cxf-extended](generators/jaxrs-cxf-extended.md)
|
||||
- [jaxrs-jersey](generators/jaxrs-jersey.md)
|
||||
- [jaxrs-resteasy](generators/jaxrs-resteasy.md)
|
||||
- [jaxrs-resteasy-eap](generators/jaxrs-resteasy-eap.md)
|
||||
- [jaxrs-spec](generators/jaxrs-spec.md)
|
||||
- [kotlin-server](generators/kotlin-server.md)
|
||||
- [kotlin-spring](generators/kotlin-spring.md)
|
||||
- [nodejs-express-server](generators/nodejs-express-server.md) (beta)
|
||||
- [nodejs-server-deprecated](generators/nodejs-server-deprecated.md) (deprecated)
|
||||
- [php-laravel](generators/php-laravel.md)
|
||||
- [php-lumen](generators/php-lumen.md)
|
||||
- [php-silex](generators/php-silex.md)
|
||||
- [php-slim](generators/php-slim.md)
|
||||
- [php-symfony](generators/php-symfony.md)
|
||||
- [php-ze-ph](generators/php-ze-ph.md)
|
||||
- [python-aiohttp](generators/python-aiohttp.md)
|
||||
- [python-blueplanet](generators/python-blueplanet.md)
|
||||
- [python-flask](generators/python-flask.md)
|
||||
- [ruby-on-rails](generators/ruby-on-rails.md)
|
||||
- [ruby-sinatra](generators/ruby-sinatra.md)
|
||||
- [rust-server](generators/rust-server.md)
|
||||
- [scala-finch](generators/scala-finch.md)
|
||||
- [scala-lagom-server](generators/scala-lagom-server.md)
|
||||
- [scala-play-server](generators/scala-play-server.md)
|
||||
- [scalatra](generators/scalatra.md)
|
||||
- [spring](generators/spring.md)
|
||||
## SERVER generators
|
||||
* [ada-server](generators/ada-server)
|
||||
* [aspnetcore](generators/aspnetcore)
|
||||
* [cpp-pistache-server](generators/cpp-pistache-server)
|
||||
* [cpp-qt5-qhttpengine-server](generators/cpp-qt5-qhttpengine-server)
|
||||
* [cpp-restbed-server](generators/cpp-restbed-server)
|
||||
* [csharp-nancyfx](generators/csharp-nancyfx)
|
||||
* [erlang-server](generators/erlang-server)
|
||||
* [fsharp-functions (beta)](generators/fsharp-functions)
|
||||
* [fsharp-giraffe-server (beta)](generators/fsharp-giraffe-server)
|
||||
* [go-gin-server](generators/go-gin-server)
|
||||
* [go-server](generators/go-server)
|
||||
* [graphql-nodejs-express-server](generators/graphql-nodejs-express-server)
|
||||
* [haskell](generators/haskell)
|
||||
* [java-inflector](generators/java-inflector)
|
||||
* [java-msf4j](generators/java-msf4j)
|
||||
* [java-pkmst](generators/java-pkmst)
|
||||
* [java-play-framework](generators/java-play-framework)
|
||||
* [java-undertow-server](generators/java-undertow-server)
|
||||
* [java-vertx](generators/java-vertx)
|
||||
* [jaxrs-cxf](generators/jaxrs-cxf)
|
||||
* [jaxrs-cxf-cdi](generators/jaxrs-cxf-cdi)
|
||||
* [jaxrs-cxf-extended](generators/jaxrs-cxf-extended)
|
||||
* [jaxrs-jersey](generators/jaxrs-jersey)
|
||||
* [jaxrs-resteasy](generators/jaxrs-resteasy)
|
||||
* [jaxrs-resteasy-eap](generators/jaxrs-resteasy-eap)
|
||||
* [jaxrs-spec](generators/jaxrs-spec)
|
||||
* [kotlin-server](generators/kotlin-server)
|
||||
* [kotlin-spring](generators/kotlin-spring)
|
||||
* [kotlin-vertx (beta)](generators/kotlin-vertx)
|
||||
* [nodejs-express-server (beta)](generators/nodejs-express-server)
|
||||
* [nodejs-server-deprecated (deprecated)](generators/nodejs-server-deprecated)
|
||||
* [php-laravel](generators/php-laravel)
|
||||
* [php-lumen](generators/php-lumen)
|
||||
* [php-silex](generators/php-silex)
|
||||
* [php-slim](generators/php-slim)
|
||||
* [php-symfony](generators/php-symfony)
|
||||
* [php-ze-ph](generators/php-ze-ph)
|
||||
* [python-aiohttp](generators/python-aiohttp)
|
||||
* [python-blueplanet](generators/python-blueplanet)
|
||||
* [python-flask](generators/python-flask)
|
||||
* [ruby-on-rails](generators/ruby-on-rails)
|
||||
* [ruby-sinatra](generators/ruby-sinatra)
|
||||
* [rust-server](generators/rust-server)
|
||||
* [scala-finch](generators/scala-finch)
|
||||
* [scala-lagom-server](generators/scala-lagom-server)
|
||||
* [scala-play-server](generators/scala-play-server)
|
||||
* [scalatra](generators/scalatra)
|
||||
* [spring](generators/spring)
|
||||
|
||||
|
||||
* DOCUMENTATION generators:
|
||||
- [cwiki](generators/cwiki.md)
|
||||
- [dynamic-html](generators/dynamic-html.md)
|
||||
- [html](generators/html.md)
|
||||
- [html2](generators/html2.md)
|
||||
- [openapi](generators/openapi.md)
|
||||
- [openapi-yaml](generators/openapi-yaml.md)
|
||||
## DOCUMENTATION generators
|
||||
* [asciidoc](generators/asciidoc)
|
||||
* [cwiki](generators/cwiki)
|
||||
* [dynamic-html](generators/dynamic-html)
|
||||
* [html](generators/html)
|
||||
* [html2](generators/html2)
|
||||
* [openapi](generators/openapi)
|
||||
* [openapi-yaml](generators/openapi-yaml)
|
||||
|
||||
|
||||
* SCHEMA generators:
|
||||
- [mysql-schema](generators/mysql-schema.md)
|
||||
## SCHEMA generators
|
||||
* [avro-schema (beta)](generators/avro-schema)
|
||||
* [mysql-schema](generators/mysql-schema)
|
||||
|
||||
|
||||
* CONFIG generators:
|
||||
- [apache2](generators/apache2.md)
|
||||
- [graphql-schema](generators/graphql-schema.md)
|
||||
## CONFIG generators
|
||||
* [apache2](generators/apache2)
|
||||
* [graphql-schema](generators/graphql-schema)
|
||||
* [protobuf-schema (beta)](generators/protobuf-schema)
|
||||
|
||||
|
||||
|
||||
|
||||
25
docs/generators/asciidoc.md
Normal file
25
docs/generators/asciidoc.md
Normal file
@@ -0,0 +1,25 @@
|
||||
|
||||
---
|
||||
id: generator-opts-documentation-asciidoc
|
||||
title: Config Options for asciidoc
|
||||
sidebar_label: asciidoc
|
||||
---
|
||||
|
||||
| Option | Description | Values | Default |
|
||||
| ------ | ----------- | ------ | ------- |
|
||||
|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true|
|
||||
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|
||||
|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false|
|
||||
|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false|
|
||||
|appName|short name of the application| |null|
|
||||
|appDescription|description of the application| |null|
|
||||
|infoUrl|a URL where users can get more information about the application| |null|
|
||||
|infoEmail|an email address to contact for inquiries about the application| |null|
|
||||
|licenseInfo|a short description of the license| |null|
|
||||
|licenseUrl|a URL pointing to the full license| |null|
|
||||
|invokerPackage|root package for generated code| |null|
|
||||
|groupId|groupId in generated pom.xml| |null|
|
||||
|artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |null|
|
||||
|artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |null|
|
||||
|snippetDir|path with includable markup snippets (e.g. test output generated by restdoc, default: .| |.|
|
||||
|specDir|path with includable markup spec files (e.g. handwritten additional docs, default: .| |..|
|
||||
14
docs/generators/avro-schema.md
Normal file
14
docs/generators/avro-schema.md
Normal file
@@ -0,0 +1,14 @@
|
||||
|
||||
---
|
||||
id: generator-opts-schema-avro-schema
|
||||
title: Config Options for avro-schema
|
||||
sidebar_label: avro-schema
|
||||
---
|
||||
|
||||
| Option | Description | Values | Default |
|
||||
| ------ | ----------- | ------ | ------- |
|
||||
|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true|
|
||||
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|
||||
|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false|
|
||||
|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false|
|
||||
|packageName|package for generated classes (where supported)| |null|
|
||||
@@ -9,3 +9,4 @@ sidebar_label: cpp-pistache-server
|
||||
| ------ | ----------- | ------ | ------- |
|
||||
|addExternalLibs|Add the Possibility to fetch and compile external Libraries needed by this Framework.| |true|
|
||||
|helpersPackage|Specify the package name to be used for the helpers (e.g. org.openapitools.server.helpers).| |org.openapitools.server.helpers|
|
||||
|useStructModel|Use struct-based model template instead of get/set-based model template| |false|
|
||||
|
||||
@@ -12,7 +12,7 @@ sidebar_label: csharp-netcore
|
||||
|sourceFolder|source folder for generated code| |src|
|
||||
|packageGuid|The GUID that will be associated with the C# project| |null|
|
||||
|interfacePrefix|Prefix interfaces with a community standard or widely accepted prefix.| |I|
|
||||
|targetFramework|The target .NET framework version.|<dl><dt>**netstandard1.3**</dt><dd>.NET Standard 1.3 compatible</dd><dt>**netstandard1.4**</dt><dd>.NET Standard 1.4 compatible</dd><dt>**netstandard1.5**</dt><dd>.NET Standard 1.5 compatible</dd><dt>**netstandard1.6**</dt><dd>.NET Standard 1.6 compatible</dd><dt>**netstandard2.0**</dt><dd>.NET Standard 2.0 compatible</dd><dt>**netcoreapp2.0**</dt><dd>.NET Core 2.0 compatible</dd><dl>|v4.6.1|
|
||||
|targetFramework|The target .NET framework version.|<dl><dt>**netstandard1.3**</dt><dd>.NET Standard 1.3 compatible</dd><dt>**netstandard1.4**</dt><dd>.NET Standard 1.4 compatible</dd><dt>**netstandard1.5**</dt><dd>.NET Standard 1.5 compatible</dd><dt>**netstandard1.6**</dt><dd>.NET Standard 1.6 compatible</dd><dt>**netstandard2.0**</dt><dd>.NET Standard 2.0 compatible</dd><dt>**netcoreapp2.0**</dt><dd>.NET Core 2.0 compatible</dd><dl>|netstandard2.0|
|
||||
|modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name| |PascalCase|
|
||||
|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true|
|
||||
|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true|
|
||||
@@ -26,3 +26,4 @@ sidebar_label: csharp-netcore
|
||||
|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false|
|
||||
|netCoreProjectFile|Use the new format (.NET Core) for .NET project files (.csproj).| |false|
|
||||
|validatable|Generates self-validatable models.| |true|
|
||||
|caseInsensitiveResponseHeaders|Make API response's headers case-insensitive| |false|
|
||||
|
||||
@@ -11,12 +11,12 @@ sidebar_label: dart-jaguar
|
||||
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|
||||
|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false|
|
||||
|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false|
|
||||
|browserClient|Is the client browser based| |null|
|
||||
|browserClient|Is the client browser based (for Dart 1.x only)| |null|
|
||||
|pubName|Name in generated pubspec| |null|
|
||||
|pubVersion|Version in generated pubspec| |null|
|
||||
|pubDescription|Description in generated pubspec| |null|
|
||||
|useEnumExtension|Allow the 'x-enum-values' extension for enums| |null|
|
||||
|sourceFolder|source folder for generated code| |null|
|
||||
|supportDart2|support dart2| |true|
|
||||
|sourceFolder|Source folder for generated code| |null|
|
||||
|supportDart2|Support Dart 2.x (Dart 1.x support has been deprecated)| |true|
|
||||
|nullableFields|Is the null fields should be in the JSON payload| |null|
|
||||
|serialization|Choose serialization format JSON or PROTO is supported| |null|
|
||||
|
||||
@@ -11,10 +11,10 @@ sidebar_label: dart
|
||||
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|
||||
|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false|
|
||||
|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false|
|
||||
|browserClient|Is the client browser based| |null|
|
||||
|browserClient|Is the client browser based (for Dart 1.x only)| |null|
|
||||
|pubName|Name in generated pubspec| |null|
|
||||
|pubVersion|Version in generated pubspec| |null|
|
||||
|pubDescription|Description in generated pubspec| |null|
|
||||
|useEnumExtension|Allow the 'x-enum-values' extension for enums| |null|
|
||||
|sourceFolder|source folder for generated code| |null|
|
||||
|supportDart2|support dart2| |true|
|
||||
|sourceFolder|Source folder for generated code| |null|
|
||||
|supportDart2|Support Dart 2.x (Dart 1.x support has been deprecated)| |true|
|
||||
|
||||
22
docs/generators/fsharp-functions.md
Normal file
22
docs/generators/fsharp-functions.md
Normal file
@@ -0,0 +1,22 @@
|
||||
|
||||
---
|
||||
id: generator-opts-server-fsharp-functions
|
||||
title: Config Options for fsharp-functions
|
||||
sidebar_label: fsharp-functions
|
||||
---
|
||||
|
||||
| Option | Description | Values | Default |
|
||||
| ------ | ----------- | ------ | ------- |
|
||||
|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true|
|
||||
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|
||||
|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false|
|
||||
|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false|
|
||||
|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|
|
||||
@@ -13,4 +13,5 @@ sidebar_label: go-experimental
|
||||
|isGoSubmodule|whether the generated Go module is a submodule| |false|
|
||||
|withGoCodegenComment|whether to include Go codegen comment to disable Go Lint and collapse by default GitHub in PRs and diffs| |false|
|
||||
|withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false|
|
||||
|enumClassPrefix|Prefix enum with class name| |false|
|
||||
|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false|
|
||||
|
||||
@@ -13,4 +13,5 @@ sidebar_label: go
|
||||
|isGoSubmodule|whether the generated Go module is a submodule| |false|
|
||||
|withGoCodegenComment|whether to include Go codegen comment to disable Go Lint and collapse by default GitHub in PRs and diffs| |false|
|
||||
|withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false|
|
||||
|enumClassPrefix|Prefix enum with class name| |false|
|
||||
|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false|
|
||||
|
||||
9
docs/generators/grpc-schema.md
Normal file
9
docs/generators/grpc-schema.md
Normal file
@@ -0,0 +1,9 @@
|
||||
|
||||
---
|
||||
id: generator-opts-config-grpc-schema
|
||||
title: Config Options for grpc-schema
|
||||
sidebar_label: grpc-schema
|
||||
---
|
||||
|
||||
| Option | Description | Values | Default |
|
||||
| ------ | ----------- | ------ | ------- |
|
||||
@@ -28,6 +28,7 @@ sidebar_label: haskell-http-client
|
||||
|strictFields|Add strictness annotations to all model fields| |true|
|
||||
|useKatip|Sets the default value for the UseKatip cabal flag. If true, the katip package provides logging instead of monad-logger| |true|
|
||||
|dateTimeFormat|format string used to parse/render a datetime| |null|
|
||||
|dateTimeParseFormat|overrides the format string used to parse a datetime| |null|
|
||||
|dateFormat|format string used to parse/render a date| |%Y-%m-%d|
|
||||
|customTestInstanceModule|test module used to provide typeclass instances for types not known by the generator| |null|
|
||||
|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true|
|
||||
|
||||
@@ -55,4 +55,5 @@ sidebar_label: java
|
||||
|feignVersion|Version of OpenFeign: '10.x', '9.x' (default)| |false|
|
||||
|useReflectionEqualsHashCode|Use org.apache.commons.lang3.builder for equals and hashCode in the models. WARNING: This will fail under a security manager, unless the appropriate permissions are set up correctly and also there's potential performance impact.| |false|
|
||||
|caseInsensitiveResponseHeaders|Make API response's headers case-insensitive. Available on okhttp-gson, jersey2 libraries| |false|
|
||||
|library|library template (sub-template) to use|<dl><dt>**jersey1**</dt><dd>HTTP client: Jersey client 1.19.x. JSON processing: Jackson 2.8.x. Enable Java6 support using '-DsupportJava6=true'. Enable gzip request encoding using '-DuseGzipFeature=true'. IMPORTANT NOTE: jersey 1.x is no longer actively maintained so please upgrade to 'jersey2' or other HTTP libaries instead.</dd><dt>**jersey2**</dt><dd>HTTP client: Jersey client 2.25.1. JSON processing: Jackson 2.8.x</dd><dt>**feign**</dt><dd>HTTP client: OpenFeign 9.x or 10.x. JSON processing: Jackson 2.8.x. To enable OpenFeign 10.x, set the 'feignVersion' option to '10.x'</dd><dt>**okhttp-gson**</dt><dd>[DEFAULT] HTTP client: OkHttp 3.x. JSON processing: Gson 2.8.x. Enable Parcelable models on Android using '-DparcelableModel=true'. Enable gzip request encoding using '-DuseGzipFeature=true'.</dd><dt>**retrofit**</dt><dd>HTTP client: OkHttp 2.x. JSON processing: Gson 2.x (Retrofit 1.9.0). IMPORTANT NOTE: retrofit1.x is no longer actively maintained so please upgrade to 'retrofit2' instead.</dd><dt>**retrofit2**</dt><dd>HTTP client: OkHttp 3.x. JSON processing: Gson 2.x (Retrofit 2.3.0). Enable the RxJava adapter using '-DuseRxJava[2]=true'. (RxJava 1.x or 2.x)</dd><dt>**resttemplate**</dt><dd>HTTP client: Spring RestTemplate 4.x. JSON processing: Jackson 2.8.x</dd><dt>**webclient**</dt><dd>HTTP client: Spring WebClient 5.x. JSON processing: Jackson 2.9.x</dd><dt>**resteasy**</dt><dd>HTTP client: Resteasy client 3.x. JSON processing: Jackson 2.8.x</dd><dt>**vertx**</dt><dd>HTTP client: VertX client 3.x. JSON processing: Jackson 2.8.x</dd><dt>**google-api-client**</dt><dd>HTTP client: Google API client 1.x. JSON processing: Jackson 2.8.x</dd><dt>**rest-assured**</dt><dd>HTTP client: rest-assured : 4.x. JSON processing: Gson 2.x. Only for Java8</dd><dt>**native**</dt><dd>HTTP client: Java native HttpClient. JSON processing: Jackson 2.9.x. Only for Java11+</dd><dl>|okhttp-gson|
|
||||
|library|library template (sub-template) to use|<dl><dt>**jersey1**</dt><dd>HTTP client: Jersey client 1.19.x. JSON processing: Jackson 2.9.x. Enable Java6 support using '-DsupportJava6=true'. Enable gzip request encoding using '-DuseGzipFeature=true'. IMPORTANT NOTE: jersey 1.x is no longer actively maintained so please upgrade to 'jersey2' or other HTTP libaries instead.</dd><dt>**jersey2**</dt><dd>HTTP client: Jersey client 2.25.1. JSON processing: Jackson 2.9.x</dd><dt>**feign**</dt><dd>HTTP client: OpenFeign 9.x or 10.x. JSON processing: Jackson 2.9.x. To enable OpenFeign 10.x, set the 'feignVersion' option to '10.x'</dd><dt>**okhttp-gson**</dt><dd>[DEFAULT] HTTP client: OkHttp 3.x. JSON processing: Gson 2.8.x. Enable Parcelable models on Android using '-DparcelableModel=true'. Enable gzip request encoding using '-DuseGzipFeature=true'.</dd><dt>**retrofit**</dt><dd>HTTP client: OkHttp 2.x. JSON processing: Gson 2.x (Retrofit 1.9.0). IMPORTANT NOTE: retrofit1.x is no longer actively maintained so please upgrade to 'retrofit2' instead.</dd><dt>**retrofit2**</dt><dd>HTTP client: OkHttp 3.x. JSON processing: Gson 2.x (Retrofit 2.3.0). Enable the RxJava adapter using '-DuseRxJava[2]=true'. (RxJava 1.x or 2.x)</dd><dt>**resttemplate**</dt><dd>HTTP client: Spring RestTemplate 4.x. JSON processing: Jackson 2.9.x</dd><dt>**webclient**</dt><dd>HTTP client: Spring WebClient 5.x. JSON processing: Jackson 2.9.x</dd><dt>**resteasy**</dt><dd>HTTP client: Resteasy client 3.x. JSON processing: Jackson 2.9.x</dd><dt>**vertx**</dt><dd>HTTP client: VertX client 3.x. JSON processing: Jackson 2.9.x</dd><dt>**google-api-client**</dt><dd>HTTP client: Google API client 1.x. JSON processing: Jackson 2.9.x</dd><dt>**rest-assured**</dt><dd>HTTP client: rest-assured : 4.x. JSON processing: Gson 2.x or Jackson 2.9.x. Only for Java8</dd><dt>**native**</dt><dd>HTTP client: Java native HttpClient. JSON processing: Jackson 2.9.x. Only for Java11+</dd><dl>|okhttp-gson|
|
||||
|serializationLibrary|Serialization library, default depends from the library|<dl><dt>**jackson**</dt><dd>Use Jackson as serialization library</dd><dt>**gson**</dt><dd>Use Gson as serialization library</dd><dl>|null|
|
||||
|
||||
@@ -46,7 +46,7 @@ sidebar_label: jaxrs-cxf-cdi
|
||||
|title|a title describing the application| |OpenAPI Server|
|
||||
|useBeanValidation|Use BeanValidation API annotations| |true|
|
||||
|serverPort|The port on which the server should be started| |8080|
|
||||
|library|library template (sub-template)|<dl><dt>**<default>**</dt><dd>JAXRS</dd><dl>|<default>|
|
||||
|library|library template (sub-template)|<dl><dt>**<default>**</dt><dd>JAXRS spec only, to be deployed in an app server (TomEE, JBoss, WLS, ...)</dd><dt>**quarkus**</dt><dd>Server using Quarkus</dd><dt>**thorntail**</dt><dd>Server using Thorntail</dd><dt>**openliberty**</dt><dd>Server using Open Liberty</dd><dt>**helidon**</dt><dd>Server using Helidon</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|
|
||||
|
||||
@@ -46,7 +46,7 @@ sidebar_label: jaxrs-spec
|
||||
|title|a title describing the application| |OpenAPI Server|
|
||||
|useBeanValidation|Use BeanValidation API annotations| |true|
|
||||
|serverPort|The port on which the server should be started| |8080|
|
||||
|library|library template (sub-template)|<dl><dt>**<default>**</dt><dd>JAXRS</dd><dl>|<default>|
|
||||
|library|library template (sub-template)|<dl><dt>**<default>**</dt><dd>JAXRS spec only, to be deployed in an app server (TomEE, JBoss, WLS, ...)</dd><dt>**quarkus**</dt><dd>Server using Quarkus</dd><dt>**thorntail**</dt><dd>Server using Thorntail</dd><dt>**openliberty**</dt><dd>Server using Open Liberty</dd><dt>**helidon**</dt><dd>Server using Helidon</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|
|
||||
|
||||
@@ -14,7 +14,9 @@ sidebar_label: kotlin-server
|
||||
|artifactId|Generated artifact id (name of jar).| |kotlin-server|
|
||||
|artifactVersion|Generated artifact's package version.| |1.0.0|
|
||||
|enumPropertyNaming|Naming convention for enum properties: 'camelCase', 'PascalCase', 'snake_case', 'UPPERCASE', and 'original'| |camelCase|
|
||||
|serializationLibrary|What serialization library to use: 'moshi' (default), or 'gson'| |moshi|
|
||||
|parcelizeModels|toggle "@Parcelize" for generated models| |null|
|
||||
|serializableModel|boolean - toggle "implements Serializable" for generated models| |null|
|
||||
|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|
|
||||
|
||||
@@ -14,7 +14,9 @@ sidebar_label: kotlin-spring
|
||||
|artifactId|Generated artifact id (name of jar).| |openapi-spring|
|
||||
|artifactVersion|Generated artifact's package version.| |1.0.0|
|
||||
|enumPropertyNaming|Naming convention for enum properties: 'camelCase', 'PascalCase', 'snake_case', 'UPPERCASE', and 'original'| |camelCase|
|
||||
|serializationLibrary|What serialization library to use: 'moshi' (default), or 'gson'| |moshi|
|
||||
|parcelizeModels|toggle "@Parcelize" for generated models| |null|
|
||||
|serializableModel|boolean - toggle "implements Serializable" for generated models| |null|
|
||||
|title|server title name or client service name| |OpenAPI Kotlin Spring|
|
||||
|basePackage|base package (invokerPackage) for generated code| |org.openapitools|
|
||||
|serverPort|configuration the port in which the sever is to run on| |8080|
|
||||
|
||||
19
docs/generators/kotlin-vertx.md
Normal file
19
docs/generators/kotlin-vertx.md
Normal file
@@ -0,0 +1,19 @@
|
||||
|
||||
---
|
||||
id: generator-opts-server-kotlin-vertx
|
||||
title: Config Options for kotlin-vertx
|
||||
sidebar_label: kotlin-vertx
|
||||
---
|
||||
|
||||
| Option | Description | Values | Default |
|
||||
| ------ | ----------- | ------ | ------- |
|
||||
|sourceFolder|source folder for generated code| |src/main/kotlin|
|
||||
|packageName|Generated artifact package name.| |org.openapitools|
|
||||
|apiSuffix|suffix for api classes| |Api|
|
||||
|groupId|Generated artifact package's organization (i.e. maven groupId).| |org.openapitools|
|
||||
|artifactId|Generated artifact id (name of jar).| |null|
|
||||
|artifactVersion|Generated artifact's package version.| |1.0.0|
|
||||
|enumPropertyNaming|Naming convention for enum properties: 'camelCase', 'PascalCase', 'snake_case', 'UPPERCASE', and 'original'| |camelCase|
|
||||
|serializationLibrary|What serialization library to use: 'moshi' (default), or 'gson'| |moshi|
|
||||
|parcelizeModels|toggle "@Parcelize" for generated models| |null|
|
||||
|serializableModel|boolean - toggle "implements Serializable" for generated models| |null|
|
||||
@@ -14,6 +14,9 @@ sidebar_label: kotlin
|
||||
|artifactId|Generated artifact id (name of jar).| |kotlin-client|
|
||||
|artifactVersion|Generated artifact's package version.| |1.0.0|
|
||||
|enumPropertyNaming|Naming convention for enum properties: 'camelCase', 'PascalCase', 'snake_case', 'UPPERCASE', and 'original'| |camelCase|
|
||||
|serializationLibrary|What serialization library to use: 'moshi' (default), or 'gson'| |moshi|
|
||||
|parcelizeModels|toggle "@Parcelize" for generated models| |null|
|
||||
|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|
|
||||
|serializableModel|boolean - toggle "implements Serializable" 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 (jvm only)</dd><dt>**threetenbp**</dt><dd>Threetenbp (jvm only)</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|
|
||||
|library|Library template (sub-template) to use|<dl><dt>**jvm**</dt><dd>Platform: Java Virtual Machine. HTTP client: OkHttp 2.7.5. JSON processing: Gson 2.8.1.</dd><dt>**multiplatform**</dt><dd>Platform: Kotlin multiplatform. HTTP client: Ktor 1.2.4. JSON processing: Kotlinx Serialization: 0.12.0.</dd><dl>|jvm|
|
||||
|
||||
13
docs/generators/nim.md
Normal file
13
docs/generators/nim.md
Normal file
@@ -0,0 +1,13 @@
|
||||
|
||||
---
|
||||
id: generator-opts-client-nim
|
||||
title: Config Options for nim
|
||||
sidebar_label: nim
|
||||
---
|
||||
|
||||
| Option | Description | Values | Default |
|
||||
| ------ | ----------- | ------ | ------- |
|
||||
|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true|
|
||||
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|
||||
|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false|
|
||||
|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false|
|
||||
9
docs/generators/protobuf-schema.md
Normal file
9
docs/generators/protobuf-schema.md
Normal file
@@ -0,0 +1,9 @@
|
||||
|
||||
---
|
||||
id: generator-opts-config-protobuf-schema
|
||||
title: Config Options for protobuf-schema
|
||||
sidebar_label: protobuf-schema
|
||||
---
|
||||
|
||||
| Option | Description | Values | Default |
|
||||
| ------ | ----------- | ------ | ------- |
|
||||
@@ -13,7 +13,6 @@ sidebar_label: swift4
|
||||
|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false|
|
||||
|projectName|Project name in Xcode| |null|
|
||||
|responseAs|Optionally use libraries to manage response. Currently PromiseKit, RxSwift are available.| |null|
|
||||
|unwrapRequired|Treat 'required' properties in response as non-optional (which would crash the app if api returns null as opposed to required option specified in json schema| |null|
|
||||
|objcCompatible|Add additional properties and methods for Objective-C compatibility (default: false)| |null|
|
||||
|podSource|Source information used for Podspec| |null|
|
||||
|podVersion|Version used for Podspec| |null|
|
||||
|
||||
@@ -20,7 +20,7 @@ sidebar_label: typescript-angular
|
||||
|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.| |7.0.0|
|
||||
|ngVersion|The version of Angular.| |8.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|
|
||||
|
||||
@@ -19,3 +19,5 @@ sidebar_label: typescript-fetch
|
||||
|npmRepository|Use this property to set an url your private npmRepo in the package.json| |null|
|
||||
|withInterfaces|Setting this property to true will generate interfaces next to the default class implementations.| |false|
|
||||
|useSingleRequestParameter|Setting this property to true will generate functions with a single argument containing all API endpoint parameters instead of one argument per parameter.| |true|
|
||||
|prefixParameterInterfaces|Setting this property to true will generate parameter interface declarations prefixed with API class name to avoid name conflicts.| |false|
|
||||
|typescriptThreePlus|Setting this property to true will generate TypeScript 3.6+ compatible code.| |false|
|
||||
|
||||
@@ -3,7 +3,7 @@ id: swagger-codegen-migration
|
||||
title: Migrating from Swagger Codegen
|
||||
---
|
||||
|
||||
OpenAPI Generator is a fork of `swagger-codegen` between version `2.3.1` and `2.4.0`.
|
||||
OpenAPI Generator is a fork of `swagger-codegen` between version `2.3.1` and `2.4.0`. For the reasons behind the fork, please refer to the [Q&A](https://github.com/OpenAPITools/openapi-generator/blob/master/docs/qna.md).
|
||||
This community-driven version called "OpenAPI Generator" provides similar functionalities and can be used as drop-in replacement.
|
||||
This guide explains the major differences in order to help you with the migration.
|
||||
|
||||
@@ -22,6 +22,7 @@ This guide explains the major differences in order to help you with the migratio
|
||||
- [New fully qualified name for the classes](#new-fully-qualified-name-for-the-classes)
|
||||
- [Body parameter name](#body-parameter-name)
|
||||
- [Default basePath](#default-basepath)
|
||||
- [Nullable](#nullable)
|
||||
|
||||
## New docker images
|
||||
|
||||
@@ -250,3 +251,7 @@ If your API client is using named parameters in the function call (e.g. Perl req
|
||||
## Default basePath
|
||||
|
||||
The default `basePath` has been changed from `https://localhost` to `http://localhost` (http without s)
|
||||
|
||||
## Nullable
|
||||
|
||||
OpenAPI spec v3 has better support for `nullable`. If you're still using OpenAPI/Swagger spec v2, please use `x-nullable: true` instead.
|
||||
|
||||
@@ -38,9 +38,15 @@ NAME
|
||||
openapi-generator-cli list - Lists the available generators
|
||||
|
||||
SYNOPSIS
|
||||
openapi-generator-cli list [(-s | --short)]
|
||||
openapi-generator-cli list [(-i <include> | --include <include>)]
|
||||
[(-s | --short)]
|
||||
|
||||
OPTIONS
|
||||
-i <include>, --include <include>
|
||||
comma-separated list of stability indexes to include (value:
|
||||
all,beta,stable,experimental,deprecated). Excludes deprecated by
|
||||
default.
|
||||
|
||||
-s, --short
|
||||
shortened output (suitable for scripting)
|
||||
|
||||
@@ -210,13 +216,14 @@ This command takes one or more parameters representing the args list you would o
|
||||
|
||||
```bash
|
||||
openapi-generator completion config-help
|
||||
--named-header
|
||||
-o
|
||||
--output
|
||||
--named-header
|
||||
-g
|
||||
--generator-name
|
||||
-l
|
||||
--lang
|
||||
-f
|
||||
--format
|
||||
--markdown-header
|
||||
```
|
||||
|
||||
An example bash completion script can be found in the repo at [scripts/openapi-generator-cli-completion.bash](https://github.com/OpenAPITools/openapi-generator/blob/master/scripts/openapi-generator-cli-completion.bash).
|
||||
@@ -235,7 +242,6 @@ NAME
|
||||
SYNOPSIS
|
||||
openapi-generator-cli generate
|
||||
[(-a <authorization> | --auth <authorization>)]
|
||||
[--additional-properties <additional properties>...]
|
||||
[--api-package <api package>] [--artifact-id <artifact id>]
|
||||
[--artifact-version <artifact version>]
|
||||
[(-c <configuration file> | --config <configuration file>)]
|
||||
@@ -256,15 +262,15 @@ SYNOPSIS
|
||||
[--model-name-prefix <model name prefix>]
|
||||
[--model-name-suffix <model name suffix>]
|
||||
[--model-package <model package>]
|
||||
[(-o <output directory> | --output <output directory>)]
|
||||
[(-o <output directory> | --output <output directory>)]
|
||||
[(-p <additional properties> | --additional-properties <additional properties>)...]
|
||||
[--package-name <package name>] [--release-note <release note>]
|
||||
[--remove-operation-id-prefix]
|
||||
[--reserved-words-mappings <reserved word mappings>...]
|
||||
[(-s | --skip-overwrite)] [--skip-validate-spec]
|
||||
[--strict-spec <true/false strict behavior>]
|
||||
[(-s | --skip-overwrite)] [--server-variables <server variables>...]
|
||||
[--skip-validate-spec] [--strict-spec <true/false strict behavior>]
|
||||
[(-t <template directory> | --template-dir <template directory>)]
|
||||
[--type-mappings <type mappings>...] [(-v | --verbose)]
|
||||
|
||||
```
|
||||
|
||||
<details>
|
||||
@@ -277,19 +283,16 @@ OPTIONS
|
||||
remotely. Pass in a URL-encoded string of name:header with a comma
|
||||
separating multiple values
|
||||
|
||||
--additional-properties <additional properties>
|
||||
sets additional properties that can be referenced by the mustache
|
||||
templates in the format of name=value,name=value. You can also have
|
||||
multiple occurrences of this option.
|
||||
|
||||
--api-package <api package>
|
||||
package for generated api classes
|
||||
|
||||
--artifact-id <artifact id>
|
||||
artifactId in generated pom.xml
|
||||
artifactId in generated pom.xml. This also becomes part of the
|
||||
generated library's filename
|
||||
|
||||
--artifact-version <artifact version>
|
||||
artifact version in generated pom.xml
|
||||
artifact version in generated pom.xml. This also becomes part of the
|
||||
generated library's filename
|
||||
|
||||
-c <configuration file>, --config <configuration file>
|
||||
Path to configuration file configuration file. It can be json or
|
||||
@@ -382,6 +385,12 @@ OPTIONS
|
||||
-o <output directory>, --output <output directory>
|
||||
where to write the generated files (current dir by default)
|
||||
|
||||
-p <additional properties>, --additional-properties <additional
|
||||
properties>
|
||||
sets additional properties that can be referenced by the mustache
|
||||
templates in the format of name=value,name=value. You can also have
|
||||
multiple occurrences of this option.
|
||||
|
||||
--package-name <package name>
|
||||
package for generated classes (where supported)
|
||||
|
||||
@@ -400,6 +409,10 @@ OPTIONS
|
||||
specifies if the existing files should be overwritten during the
|
||||
generation.
|
||||
|
||||
--server-variables <server variables>
|
||||
sets server variables for spec documents which support variable
|
||||
templating of servers.
|
||||
|
||||
--skip-validate-spec
|
||||
Skips the default behavior of validating an input specification.
|
||||
|
||||
|
||||
@@ -54,10 +54,7 @@
|
||||
<property name="tokens" value="LITERAL_TRY, LITERAL_FINALLY, LITERAL_IF, LITERAL_ELSE, LITERAL_SWITCH"/>
|
||||
</module>
|
||||
<module name="NeedBraces"/>
|
||||
<module name="LeftCurly">
|
||||
<property name="maxLineLength" value="100"/>
|
||||
</module>
|
||||
<module name="RightCurly"/>
|
||||
<module name="LeftCurly"/>
|
||||
<module name="RightCurly">
|
||||
<property name="option" value="alone"/>
|
||||
<property name="tokens" value="CLASS_DEF, METHOD_DEF, CTOR_DEF, LITERAL_FOR, LITERAL_WHILE, LITERAL_DO, STATIC_INIT, INSTANCE_INIT"/>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<groupId>org.openapitools</groupId>
|
||||
<artifactId>openapi-generator-project</artifactId>
|
||||
<!-- RELEASE_VERSION -->
|
||||
<version>4.1.0</version>
|
||||
<version>4.2.0-SNAPSHOT</version>
|
||||
<!-- /RELEASE_VERSION -->
|
||||
<relativePath>../..</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -18,13 +18,7 @@
|
||||
package org.openapitools.codegen.cmd;
|
||||
|
||||
import static org.apache.commons.lang3.StringUtils.isNotEmpty;
|
||||
import static org.openapitools.codegen.config.CodegenConfiguratorUtils.applyAdditionalPropertiesKvpList;
|
||||
import static org.openapitools.codegen.config.CodegenConfiguratorUtils.applyImportMappingsKvpList;
|
||||
import static org.openapitools.codegen.config.CodegenConfiguratorUtils.applyInstantiationTypesKvpList;
|
||||
import static org.openapitools.codegen.config.CodegenConfiguratorUtils.applyLanguageSpecificPrimitivesCsvList;
|
||||
import static org.openapitools.codegen.config.CodegenConfiguratorUtils.applyReservedWordsMappingsKvpList;
|
||||
import static org.openapitools.codegen.config.CodegenConfiguratorUtils.applySystemPropertiesKvpList;
|
||||
import static org.openapitools.codegen.config.CodegenConfiguratorUtils.applyTypeMappingsKvpList;
|
||||
import static org.openapitools.codegen.config.CodegenConfiguratorUtils.*;
|
||||
|
||||
import ch.qos.logback.classic.LoggerContext;
|
||||
import ch.qos.logback.core.spi.FilterAttachable;
|
||||
@@ -71,7 +65,7 @@ public class Generate implements Runnable {
|
||||
private String templateDir;
|
||||
|
||||
@Option(name = {"-e", "--engine"}, title = "templating engine",
|
||||
description = "templating engine: \"mustache\" (default) or \"handlebars\" (beta)")
|
||||
description = "templating engine: \"mustache\" (default) or \"handlebars\" (beta)")
|
||||
private String templatingEngine;
|
||||
|
||||
@Option(
|
||||
@@ -115,6 +109,10 @@ public class Generate implements Runnable {
|
||||
description = CodegenConstants.MODEL_PACKAGE_DESC)
|
||||
private String modelPackage;
|
||||
|
||||
@Option(name = {"--api-name-suffix"}, title = "api name suffix",
|
||||
description = CodegenConstants.API_NAME_SUFFIX_DESC)
|
||||
private String apiNameSuffix;
|
||||
|
||||
@Option(name = {"--model-name-prefix"}, title = "model name prefix",
|
||||
description = CodegenConstants.MODEL_NAME_PREFIX_DESC)
|
||||
private String modelNamePrefix;
|
||||
@@ -160,6 +158,12 @@ public class Generate implements Runnable {
|
||||
+ " You can also have multiple occurrences of this option.")
|
||||
private List<String> importMappings = new ArrayList<>();
|
||||
|
||||
@Option(
|
||||
name = {"--server-variables"},
|
||||
title = "server variables",
|
||||
description = "sets server variables overrides for spec documents which support variable templating of servers.")
|
||||
private List<String> serverVariableOverrides = new ArrayList<>();
|
||||
|
||||
@Option(name = {"--invoker-package"}, title = "invoker package",
|
||||
description = CodegenConstants.INVOKER_PACKAGE_DESC)
|
||||
private String invokerPackage;
|
||||
@@ -178,6 +182,10 @@ public class Generate implements Runnable {
|
||||
@Option(name = {"--library"}, title = "library", description = CodegenConstants.LIBRARY_DESC)
|
||||
private String library;
|
||||
|
||||
@Option(name = {"--git-host"}, title = "git host",
|
||||
description = CodegenConstants.GIT_HOST_DESC)
|
||||
private String gitHost;
|
||||
|
||||
@Option(name = {"--git-user-id"}, title = "git user id",
|
||||
description = CodegenConstants.GIT_USER_ID_DESC)
|
||||
private String gitUserId;
|
||||
@@ -315,6 +323,10 @@ public class Generate implements Runnable {
|
||||
configurator.setModelPackage(modelPackage);
|
||||
}
|
||||
|
||||
if (isNotEmpty(apiNameSuffix)) {
|
||||
configurator.setApiNameSuffix(apiNameSuffix);
|
||||
}
|
||||
|
||||
if (isNotEmpty(modelNamePrefix)) {
|
||||
configurator.setModelNamePrefix(modelNamePrefix);
|
||||
}
|
||||
@@ -343,6 +355,10 @@ public class Generate implements Runnable {
|
||||
configurator.setLibrary(library);
|
||||
}
|
||||
|
||||
if (isNotEmpty(gitHost)) {
|
||||
configurator.setGitHost(gitHost);
|
||||
}
|
||||
|
||||
if (isNotEmpty(gitUserId)) {
|
||||
configurator.setGitUserId(gitUserId);
|
||||
}
|
||||
@@ -393,6 +409,7 @@ public class Generate implements Runnable {
|
||||
applyAdditionalPropertiesKvpList(additionalProperties, configurator);
|
||||
applyLanguageSpecificPrimitivesCsvList(languageSpecificPrimitives, configurator);
|
||||
applyReservedWordsMappingsKvpList(reservedWordsMappings, configurator);
|
||||
applyServerVariablesKvpList(serverVariableOverrides, configurator);
|
||||
|
||||
try {
|
||||
final ClientOptInput clientOptInput = configurator.toClientOptInput();
|
||||
|
||||
@@ -5,15 +5,14 @@ import com.google.common.base.Objects;
|
||||
import io.airlift.airline.Command;
|
||||
import io.airlift.airline.Option;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
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;
|
||||
import java.util.Locale;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
// NOTE: List can later have subcommands such as list languages, list types, list frameworks, etc.
|
||||
@@ -26,9 +25,31 @@ public class ListGenerators implements Runnable {
|
||||
@Option(name = {"-d", "--docsite" }, description = "format for docusaurus site output", hidden = true)
|
||||
private Boolean docusaurus = false;
|
||||
|
||||
@Option(name = {"-i", "--include" },
|
||||
description = "comma-separated list of stability indexes to include (value: all,beta,stable,experimental,deprecated). Excludes deprecated by default.",
|
||||
allowedValues = { "all", "beta", "stable", "experimental", "deprecated" })
|
||||
private String include = "stable,beta,experimental";
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
List<CodegenConfig> generators = CodegenConfigLoader.getAll();
|
||||
List<CodegenConfig> generators = new ArrayList<>();
|
||||
List<Stability> stabilities = Arrays.asList(Stability.values());
|
||||
|
||||
if (!StringUtils.isEmpty(include)) {
|
||||
List<String> includes = Arrays.asList(include.split(","));
|
||||
if (includes.size() != 0 && !includes.contains("all")) {
|
||||
stabilities = includes.stream()
|
||||
.map(Stability::forDescription)
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
}
|
||||
|
||||
for (CodegenConfig codegenConfig : CodegenConfigLoader.getAll()) {
|
||||
GeneratorMetadata meta = codegenConfig.getGeneratorMetadata();
|
||||
if (meta != null && stabilities.contains(meta.getStability())) {
|
||||
generators.add(codegenConfig);
|
||||
}
|
||||
}
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<artifactId>openapi-generator-project</artifactId>
|
||||
<groupId>org.openapitools</groupId>
|
||||
<!-- RELEASE_VERSION -->
|
||||
<version>4.1.0</version>
|
||||
<version>4.2.0-SNAPSHOT</version>
|
||||
<!-- /RELEASE_VERSION -->
|
||||
<relativePath>../..</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -30,6 +30,7 @@ import java.util.*;
|
||||
public final class GeneratorSettings implements Serializable {
|
||||
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(GeneratorSettings.class);
|
||||
private static String DEFAULT_GIT_HOST = "github.com";
|
||||
private static String DEFAULT_GIT_USER_ID = "GIT_USER_ID";
|
||||
private static String DEFAULT_GIT_REPO_ID = "GIT_REPO_ID";
|
||||
private static String DEFAULT_RELEASE_NOTE = "Minor update";
|
||||
@@ -39,6 +40,7 @@ public final class GeneratorSettings implements Serializable {
|
||||
private String modelPackage;
|
||||
private String invokerPackage;
|
||||
private String packageName;
|
||||
private String apiNameSuffix;
|
||||
private String modelNamePrefix;
|
||||
private String modelNameSuffix;
|
||||
private String groupId;
|
||||
@@ -52,7 +54,9 @@ public final class GeneratorSettings implements Serializable {
|
||||
private ImmutableMap<String, String> importMappings;
|
||||
private ImmutableSet<String> languageSpecificPrimitives;
|
||||
private ImmutableMap<String, String> reservedWordMappings;
|
||||
private ImmutableMap<String, String> serverVariables;
|
||||
|
||||
private String gitHost;
|
||||
private String gitUserId;
|
||||
private String gitRepoId;
|
||||
private String releaseNote;
|
||||
@@ -103,6 +107,21 @@ public final class GeneratorSettings implements Serializable {
|
||||
return packageName;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a api name suffix for generated models. This name will be appended to a api name.
|
||||
* <p>
|
||||
* This option is often used to circumvent compilation issues where models match keywords.
|
||||
* <p>
|
||||
* Example:
|
||||
* <p>
|
||||
* Suffix <code>Gen</code> applied to <code>Object</code> results in a generated class named <code>ObjectGen</code>.
|
||||
*
|
||||
* @return the model name suffix
|
||||
*/
|
||||
public String getApiNameSuffix() {
|
||||
return apiNameSuffix;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a model name prefix for generated models. This name will be prefixed to a model name.
|
||||
* <p>
|
||||
@@ -245,6 +264,28 @@ public final class GeneratorSettings implements Serializable {
|
||||
return reservedWordMappings;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Gets server variable. Values defined here will be attempted to be replaced within a templated server object.
|
||||
*
|
||||
* @return the server variables
|
||||
*/
|
||||
public Map<String, String> getServerVariables() {
|
||||
return serverVariables;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets git host. e.g. <strong>gitlab.com</strong>.
|
||||
* <p>
|
||||
* Generally used by git_push.sh in generated sources which support it.
|
||||
* This value may also be used by templates in maven style references, READMEs, or other documentation.
|
||||
*
|
||||
* @return the git host
|
||||
*/
|
||||
public String getGitHost() {
|
||||
return gitHost;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets git user id. e.g. <strong>openapitools</strong>.
|
||||
* <p>
|
||||
@@ -300,6 +341,7 @@ public final class GeneratorSettings implements Serializable {
|
||||
modelPackage = builder.modelPackage;
|
||||
invokerPackage = builder.invokerPackage;
|
||||
packageName = builder.packageName;
|
||||
apiNameSuffix = builder.apiNameSuffix;
|
||||
modelNamePrefix = builder.modelNamePrefix;
|
||||
modelNameSuffix = builder.modelNameSuffix;
|
||||
groupId = builder.groupId;
|
||||
@@ -311,6 +353,8 @@ public final class GeneratorSettings implements Serializable {
|
||||
importMappings = ImmutableMap.copyOf(builder.importMappings);
|
||||
languageSpecificPrimitives = ImmutableSet.copyOf(builder.languageSpecificPrimitives);
|
||||
reservedWordMappings = ImmutableMap.copyOf(builder.reservedWordMappings);
|
||||
serverVariables = ImmutableMap.copyOf(builder.serverVariables);
|
||||
gitHost = builder.gitHost;
|
||||
gitUserId = builder.gitUserId;
|
||||
gitRepoId = builder.gitRepoId;
|
||||
releaseNote = builder.releaseNote;
|
||||
@@ -339,12 +383,18 @@ public final class GeneratorSettings implements Serializable {
|
||||
if (isNotEmpty(artifactVersion)) {
|
||||
additional.put("artifactVersion", artifactVersion);
|
||||
}
|
||||
if (isNotEmpty(apiNameSuffix)) {
|
||||
additional.put("apiNameSuffix", apiNameSuffix);
|
||||
}
|
||||
if (isNotEmpty(modelNamePrefix)) {
|
||||
additional.put("modelNamePrefix", modelNamePrefix);
|
||||
}
|
||||
if (isNotEmpty(modelNameSuffix)) {
|
||||
additional.put("modelNameSuffix", modelNameSuffix);
|
||||
}
|
||||
if (isNotEmpty(gitHost)) {
|
||||
additional.put("gitHost", gitHost);
|
||||
}
|
||||
if (isNotEmpty(gitUserId)) {
|
||||
additional.put("gitUserId", gitUserId);
|
||||
}
|
||||
@@ -373,9 +423,11 @@ public final class GeneratorSettings implements Serializable {
|
||||
importMappings = ImmutableMap.of();
|
||||
languageSpecificPrimitives = ImmutableSet.of();
|
||||
reservedWordMappings = ImmutableMap.of();
|
||||
serverVariables = ImmutableMap.of();
|
||||
}
|
||||
|
||||
private void setDefaults() {
|
||||
gitHost = DEFAULT_GIT_HOST;
|
||||
gitUserId = DEFAULT_GIT_USER_ID;
|
||||
gitRepoId = DEFAULT_GIT_REPO_ID;
|
||||
releaseNote = DEFAULT_RELEASE_NOTE;
|
||||
@@ -394,12 +446,6 @@ public final class GeneratorSettings implements Serializable {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
/**
|
||||
* New builder builder.
|
||||
*
|
||||
* @param copy the copy
|
||||
* @return the builder
|
||||
*/
|
||||
public static Builder newBuilder(GeneratorSettings copy) {
|
||||
Builder builder = new Builder();
|
||||
builder.generatorName = copy.getGeneratorName();
|
||||
@@ -407,18 +453,35 @@ public final class GeneratorSettings implements Serializable {
|
||||
builder.modelPackage = copy.getModelPackage();
|
||||
builder.invokerPackage = copy.getInvokerPackage();
|
||||
builder.packageName = copy.getPackageName();
|
||||
builder.apiNameSuffix = copy.getApiNameSuffix();
|
||||
builder.modelNamePrefix = copy.getModelNamePrefix();
|
||||
builder.modelNameSuffix = copy.getModelNameSuffix();
|
||||
builder.groupId = copy.getGroupId();
|
||||
builder.artifactId = copy.getArtifactId();
|
||||
builder.artifactVersion = copy.getArtifactVersion();
|
||||
builder.library = copy.getLibrary();
|
||||
builder.instantiationTypes = new HashMap<>(copy.getInstantiationTypes());
|
||||
builder.typeMappings = new HashMap<>(copy.getTypeMappings());
|
||||
builder.additionalProperties = new HashMap<>(copy.getAdditionalProperties());
|
||||
builder.importMappings = new HashMap<>(copy.getImportMappings());
|
||||
builder.languageSpecificPrimitives = new HashSet<>(copy.getLanguageSpecificPrimitives());
|
||||
builder.reservedWordMappings = new HashMap<>(copy.getReservedWordMappings());
|
||||
if (copy.getInstantiationTypes() != null) {
|
||||
builder.instantiationTypes.putAll(copy.getInstantiationTypes());
|
||||
}
|
||||
if (copy.getTypeMappings() != null) {
|
||||
builder.typeMappings.putAll(copy.getTypeMappings());
|
||||
}
|
||||
if (copy.getAdditionalProperties() != null) {
|
||||
builder.additionalProperties.putAll(copy.getAdditionalProperties());
|
||||
}
|
||||
if (copy.getImportMappings() != null) {
|
||||
builder.importMappings.putAll(copy.getImportMappings());
|
||||
}
|
||||
if (copy.getLanguageSpecificPrimitives() != null) {
|
||||
builder.languageSpecificPrimitives.addAll(copy.getLanguageSpecificPrimitives());
|
||||
}
|
||||
if (copy.getReservedWordMappings() != null) {
|
||||
builder.reservedWordMappings.putAll(copy.getReservedWordMappings());
|
||||
}
|
||||
if (copy.getServerVariables() != null) {
|
||||
builder.serverVariables.putAll(copy.getServerVariables());
|
||||
}
|
||||
builder.gitHost = copy.getGitHost();
|
||||
builder.gitUserId = copy.getGitUserId();
|
||||
builder.gitRepoId = copy.getGitRepoId();
|
||||
builder.releaseNote = copy.getReleaseNote();
|
||||
@@ -437,6 +500,7 @@ public final class GeneratorSettings implements Serializable {
|
||||
private String modelPackage;
|
||||
private String invokerPackage;
|
||||
private String packageName;
|
||||
private String apiNameSuffix;
|
||||
private String modelNamePrefix;
|
||||
private String modelNameSuffix;
|
||||
private String groupId;
|
||||
@@ -449,6 +513,8 @@ public final class GeneratorSettings implements Serializable {
|
||||
private Map<String, String> importMappings;
|
||||
private Set<String> languageSpecificPrimitives;
|
||||
private Map<String, String> reservedWordMappings;
|
||||
private Map<String, String> serverVariables;
|
||||
private String gitHost;
|
||||
private String gitUserId;
|
||||
private String gitRepoId;
|
||||
private String releaseNote;
|
||||
@@ -464,7 +530,9 @@ public final class GeneratorSettings implements Serializable {
|
||||
importMappings = new HashMap<>();
|
||||
languageSpecificPrimitives = new HashSet<>();
|
||||
reservedWordMappings = new HashMap<>();
|
||||
serverVariables = new HashMap<>();
|
||||
|
||||
gitHost = DEFAULT_GIT_HOST;
|
||||
gitUserId = DEFAULT_GIT_USER_ID;
|
||||
gitRepoId = DEFAULT_GIT_REPO_ID;
|
||||
releaseNote = DEFAULT_RELEASE_NOTE;
|
||||
@@ -525,6 +593,17 @@ public final class GeneratorSettings implements Serializable {
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the {@code apiNameSuffix} and returns a reference to this Builder so that the methods can be chained together.
|
||||
*
|
||||
* @param apiNameSuffix the {@code apiNameSuffix} to set
|
||||
* @return a reference to this Builder
|
||||
*/
|
||||
public Builder withApiNameSuffix(String apiNameSuffix) {
|
||||
this.apiNameSuffix = apiNameSuffix;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the {@code modelNamePrefix} and returns a reference to this Builder so that the methods can be chained together.
|
||||
*
|
||||
@@ -617,6 +696,17 @@ public final class GeneratorSettings implements Serializable {
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the {@code serverVariables} and returns a reference to this Builder so that the methods can be chained together.
|
||||
*
|
||||
* @param serverVariables the {@code serverVariables} to set
|
||||
* @return a reference to this Builder
|
||||
*/
|
||||
public Builder withServerVariables(Map<String, String> serverVariables) {
|
||||
this.serverVariables = serverVariables;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the {@code typeMappings} and returns a reference to this Builder so that the methods can be chained together.
|
||||
*
|
||||
@@ -731,6 +821,33 @@ public final class GeneratorSettings implements Serializable {
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Sets a single {@code serverVariables} and returns a reference to this Builder so that the methods can be chained together.
|
||||
*
|
||||
* @param key A key for some server variable
|
||||
* @param value The value of some server variable to be replaced in a templated server object.
|
||||
* @return a reference to this Builder
|
||||
*/
|
||||
public Builder withServerVariable(String key, String value) {
|
||||
if (this.serverVariables == null) {
|
||||
this.serverVariables = new HashMap<>();
|
||||
}
|
||||
this.serverVariables.put(key, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the {@code gitHost} and returns a reference to this Builder so that the methods can be chained together.
|
||||
*
|
||||
* @param gitHost the {@code gitHost} to set
|
||||
* @return a reference to this Builder
|
||||
*/
|
||||
public Builder withGitHost(String gitHost) {
|
||||
this.gitHost = gitHost;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the {@code gitUserId} and returns a reference to this Builder so that the methods can be chained together.
|
||||
*
|
||||
@@ -796,6 +913,7 @@ public final class GeneratorSettings implements Serializable {
|
||||
", modelPackage='" + modelPackage + '\'' +
|
||||
", invokerPackage='" + invokerPackage + '\'' +
|
||||
", packageName='" + packageName + '\'' +
|
||||
", apiNameSuffix='" + apiNameSuffix + '\'' +
|
||||
", modelNamePrefix='" + modelNamePrefix + '\'' +
|
||||
", modelNameSuffix='" + modelNameSuffix + '\'' +
|
||||
", groupId='" + groupId + '\'' +
|
||||
@@ -808,6 +926,7 @@ public final class GeneratorSettings implements Serializable {
|
||||
", importMappings=" + importMappings +
|
||||
", languageSpecificPrimitives=" + languageSpecificPrimitives +
|
||||
", reservedWordMappings=" + reservedWordMappings +
|
||||
", gitHost='" + gitHost + '\'' +
|
||||
", gitUserId='" + gitUserId + '\'' +
|
||||
", gitRepoId='" + gitRepoId + '\'' +
|
||||
", releaseNote='" + releaseNote + '\'' +
|
||||
@@ -825,6 +944,7 @@ public final class GeneratorSettings implements Serializable {
|
||||
Objects.equals(getModelPackage(), that.getModelPackage()) &&
|
||||
Objects.equals(getInvokerPackage(), that.getInvokerPackage()) &&
|
||||
Objects.equals(getPackageName(), that.getPackageName()) &&
|
||||
Objects.equals(getApiNameSuffix(), that.getApiNameSuffix()) &&
|
||||
Objects.equals(getModelNamePrefix(), that.getModelNamePrefix()) &&
|
||||
Objects.equals(getModelNameSuffix(), that.getModelNameSuffix()) &&
|
||||
Objects.equals(getGroupId(), that.getGroupId()) &&
|
||||
@@ -837,6 +957,7 @@ public final class GeneratorSettings implements Serializable {
|
||||
Objects.equals(getImportMappings(), that.getImportMappings()) &&
|
||||
Objects.equals(getLanguageSpecificPrimitives(), that.getLanguageSpecificPrimitives()) &&
|
||||
Objects.equals(getReservedWordMappings(), that.getReservedWordMappings()) &&
|
||||
Objects.equals(getGitHost(), that.getGitHost()) &&
|
||||
Objects.equals(getGitUserId(), that.getGitUserId()) &&
|
||||
Objects.equals(getGitRepoId(), that.getGitRepoId()) &&
|
||||
Objects.equals(getReleaseNote(), that.getReleaseNote()) &&
|
||||
@@ -851,6 +972,7 @@ public final class GeneratorSettings implements Serializable {
|
||||
getModelPackage(),
|
||||
getInvokerPackage(),
|
||||
getPackageName(),
|
||||
getApiNameSuffix(),
|
||||
getModelNamePrefix(),
|
||||
getModelNameSuffix(),
|
||||
getGroupId(),
|
||||
@@ -863,6 +985,7 @@ public final class GeneratorSettings implements Serializable {
|
||||
getImportMappings(),
|
||||
getLanguageSpecificPrimitives(),
|
||||
getReservedWordMappings(),
|
||||
getGitHost(),
|
||||
getGitUserId(),
|
||||
getGitRepoId(),
|
||||
getReleaseNote(),
|
||||
|
||||
@@ -33,38 +33,48 @@ import java.util.Objects;
|
||||
public class WorkflowSettings {
|
||||
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(WorkflowSettings.class);
|
||||
public static final String DEFAULT_OUTPUT_DIR = ".";
|
||||
public static final boolean DEFAULT_VERBOSE = false;
|
||||
public static final boolean DEFAULT_SKIP_OVERWRITE = false;
|
||||
public static final boolean DEFAULT_REMOVE_OPERATION_ID_PREFIX = false;
|
||||
public static final boolean DEFAULT_LOG_TO_STDERR = false;
|
||||
public static final boolean DEFAULT_VALIDATE_SPEC = true;
|
||||
public static final boolean DEFAULT_ENABLE_POST_PROCESS_FILE = false;
|
||||
public static final boolean DEFAULT_ENABLE_MINIMAL_UPDATE = false;
|
||||
public static final boolean DEFAULT_STRICT_SPEC_BEHAVIOR = true;
|
||||
public static final String DEFAULT_TEMPLATING_ENGINE_NAME = "mustache";
|
||||
public static final ImmutableMap<String, String> DEFAULT_SYSTEM_PROPERTIES = ImmutableMap.of();
|
||||
|
||||
private String inputSpec;
|
||||
private String outputDir;
|
||||
private boolean verbose;
|
||||
private boolean skipOverwrite;
|
||||
private boolean removeOperationIdPrefix;
|
||||
private boolean logToStderr;
|
||||
private boolean validateSpec;
|
||||
private boolean enablePostProcessFile;
|
||||
private boolean enableMinimalUpdate;
|
||||
private boolean strictSpecBehavior;
|
||||
private String outputDir = DEFAULT_OUTPUT_DIR;
|
||||
private boolean verbose = DEFAULT_VERBOSE;
|
||||
private boolean skipOverwrite = DEFAULT_SKIP_OVERWRITE;
|
||||
private boolean removeOperationIdPrefix = DEFAULT_REMOVE_OPERATION_ID_PREFIX;
|
||||
private boolean logToStderr = DEFAULT_LOG_TO_STDERR;
|
||||
private boolean validateSpec = DEFAULT_VALIDATE_SPEC;
|
||||
private boolean enablePostProcessFile = DEFAULT_ENABLE_POST_PROCESS_FILE;
|
||||
private boolean enableMinimalUpdate = DEFAULT_ENABLE_MINIMAL_UPDATE;
|
||||
private boolean strictSpecBehavior = DEFAULT_STRICT_SPEC_BEHAVIOR;
|
||||
private String templateDir;
|
||||
private String templatingEngineName;
|
||||
private String templatingEngineName = DEFAULT_TEMPLATING_ENGINE_NAME;
|
||||
private String ignoreFileOverride;
|
||||
private ImmutableMap<String, String> systemProperties;
|
||||
private ImmutableMap<String, String> systemProperties = DEFAULT_SYSTEM_PROPERTIES;
|
||||
|
||||
private WorkflowSettings(Builder builder) {
|
||||
setDefaults();
|
||||
inputSpec = builder.inputSpec;
|
||||
outputDir = builder.outputDir;
|
||||
verbose = builder.verbose;
|
||||
skipOverwrite = builder.skipOverwrite;
|
||||
removeOperationIdPrefix = builder.removeOperationIdPrefix;
|
||||
logToStderr = builder.logToStderr;
|
||||
validateSpec = builder.validateSpec;
|
||||
enablePostProcessFile = builder.enablePostProcessFile;
|
||||
enableMinimalUpdate = builder.enableMinimalUpdate;
|
||||
strictSpecBehavior = builder.strictSpecBehavior;
|
||||
templateDir = builder.templateDir;
|
||||
templatingEngineName = builder.templatingEngineName;
|
||||
ignoreFileOverride = builder.ignoreFileOverride;
|
||||
systemProperties = ImmutableMap.copyOf(builder.systemProperties);
|
||||
this.inputSpec = builder.inputSpec;
|
||||
this.outputDir = builder.outputDir;
|
||||
this.verbose = builder.verbose;
|
||||
this.skipOverwrite = builder.skipOverwrite;
|
||||
this.removeOperationIdPrefix = builder.removeOperationIdPrefix;
|
||||
this.logToStderr = builder.logToStderr;
|
||||
this.validateSpec = builder.validateSpec;
|
||||
this.enablePostProcessFile = builder.enablePostProcessFile;
|
||||
this.enableMinimalUpdate = builder.enableMinimalUpdate;
|
||||
this.strictSpecBehavior = builder.strictSpecBehavior;
|
||||
this.templateDir = builder.templateDir;
|
||||
this.templatingEngineName = builder.templatingEngineName;
|
||||
this.ignoreFileOverride = builder.ignoreFileOverride;
|
||||
this.systemProperties = ImmutableMap.copyOf(builder.systemProperties);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -72,14 +82,7 @@ public class WorkflowSettings {
|
||||
*/
|
||||
@SuppressWarnings("unused")
|
||||
public WorkflowSettings() {
|
||||
setDefaults();
|
||||
systemProperties = ImmutableMap.of();
|
||||
}
|
||||
|
||||
private void setDefaults(){
|
||||
validateSpec = true;
|
||||
strictSpecBehavior = true;
|
||||
outputDir = ".";
|
||||
}
|
||||
|
||||
public static Builder newBuilder() {
|
||||
@@ -87,7 +90,7 @@ public class WorkflowSettings {
|
||||
}
|
||||
|
||||
public static Builder newBuilder(WorkflowSettings copy) {
|
||||
Builder builder = new Builder();
|
||||
Builder builder = newBuilder();
|
||||
builder.inputSpec = copy.getInputSpec();
|
||||
builder.outputDir = copy.getOutputDir();
|
||||
builder.verbose = copy.isVerbose();
|
||||
@@ -257,24 +260,24 @@ public class WorkflowSettings {
|
||||
@SuppressWarnings("unused")
|
||||
public static final class Builder {
|
||||
private String inputSpec;
|
||||
private String outputDir;
|
||||
private boolean verbose;
|
||||
private boolean skipOverwrite;
|
||||
private boolean removeOperationIdPrefix;
|
||||
private boolean logToStderr;
|
||||
private boolean validateSpec;
|
||||
private boolean enablePostProcessFile;
|
||||
private boolean enableMinimalUpdate;
|
||||
private boolean strictSpecBehavior;
|
||||
private String outputDir = DEFAULT_OUTPUT_DIR;
|
||||
private Boolean verbose = DEFAULT_VERBOSE;
|
||||
private Boolean skipOverwrite = DEFAULT_SKIP_OVERWRITE;
|
||||
private Boolean removeOperationIdPrefix = DEFAULT_REMOVE_OPERATION_ID_PREFIX;
|
||||
private Boolean logToStderr = DEFAULT_LOG_TO_STDERR;
|
||||
private Boolean validateSpec = DEFAULT_VALIDATE_SPEC;
|
||||
private Boolean enablePostProcessFile = DEFAULT_ENABLE_POST_PROCESS_FILE;
|
||||
private Boolean enableMinimalUpdate = DEFAULT_ENABLE_MINIMAL_UPDATE;
|
||||
private Boolean strictSpecBehavior = DEFAULT_STRICT_SPEC_BEHAVIOR;
|
||||
private String templateDir;
|
||||
private String templatingEngineName;
|
||||
private String templatingEngineName = DEFAULT_TEMPLATING_ENGINE_NAME;
|
||||
private String ignoreFileOverride;
|
||||
private Map<String, String> systemProperties;
|
||||
private Map<String, String> systemProperties = new HashMap<>();;
|
||||
|
||||
private Builder() {
|
||||
systemProperties = new HashMap<>();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Sets the {@code inputSpec} and returns a reference to this Builder so that the methods can be chained together.
|
||||
*
|
||||
@@ -282,7 +285,9 @@ public class WorkflowSettings {
|
||||
* @return a reference to this Builder
|
||||
*/
|
||||
public Builder withInputSpec(String inputSpec) {
|
||||
this.inputSpec = inputSpec;
|
||||
if (inputSpec != null) {
|
||||
this.inputSpec = inputSpec;
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -293,7 +298,11 @@ public class WorkflowSettings {
|
||||
* @return a reference to this Builder
|
||||
*/
|
||||
public Builder withOutputDir(String outputDir) {
|
||||
this.outputDir = Paths.get(outputDir).toAbsolutePath().toString();;
|
||||
if (outputDir != null ) {
|
||||
this.outputDir = Paths.get(outputDir).toAbsolutePath().toString();
|
||||
} else {
|
||||
this.outputDir = DEFAULT_OUTPUT_DIR;
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -303,8 +312,8 @@ public class WorkflowSettings {
|
||||
* @param verbose the {@code verbose} to set
|
||||
* @return a reference to this Builder
|
||||
*/
|
||||
public Builder withVerbose(boolean verbose) {
|
||||
this.verbose = verbose;
|
||||
public Builder withVerbose(Boolean verbose) {
|
||||
this.verbose = verbose != null ? verbose : Boolean.valueOf(DEFAULT_VERBOSE);
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -314,8 +323,8 @@ public class WorkflowSettings {
|
||||
* @param skipOverwrite the {@code skipOverwrite} to set
|
||||
* @return a reference to this Builder
|
||||
*/
|
||||
public Builder withSkipOverwrite(boolean skipOverwrite) {
|
||||
this.skipOverwrite = skipOverwrite;
|
||||
public Builder withSkipOverwrite(Boolean skipOverwrite) {
|
||||
this.skipOverwrite = skipOverwrite != null ? skipOverwrite : Boolean.valueOf(DEFAULT_SKIP_OVERWRITE);
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -325,8 +334,8 @@ public class WorkflowSettings {
|
||||
* @param removeOperationIdPrefix the {@code removeOperationIdPrefix} to set
|
||||
* @return a reference to this Builder
|
||||
*/
|
||||
public Builder withRemoveOperationIdPrefix(boolean removeOperationIdPrefix) {
|
||||
this.removeOperationIdPrefix = removeOperationIdPrefix;
|
||||
public Builder withRemoveOperationIdPrefix(Boolean removeOperationIdPrefix) {
|
||||
this.removeOperationIdPrefix = removeOperationIdPrefix != null ? removeOperationIdPrefix : Boolean.valueOf(DEFAULT_REMOVE_OPERATION_ID_PREFIX);
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -336,8 +345,8 @@ public class WorkflowSettings {
|
||||
* @param logToStderr the {@code logToStderr} to set
|
||||
* @return a reference to this Builder
|
||||
*/
|
||||
public Builder withLogToStderr(boolean logToStderr) {
|
||||
this.logToStderr = logToStderr;
|
||||
public Builder withLogToStderr(Boolean logToStderr) {
|
||||
this.logToStderr = logToStderr != null ? logToStderr : Boolean.valueOf(DEFAULT_LOG_TO_STDERR);
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -347,8 +356,8 @@ public class WorkflowSettings {
|
||||
* @param validateSpec the {@code validateSpec} to set
|
||||
* @return a reference to this Builder
|
||||
*/
|
||||
public Builder withValidateSpec(boolean validateSpec) {
|
||||
this.validateSpec = validateSpec;
|
||||
public Builder withValidateSpec(Boolean validateSpec) {
|
||||
this.validateSpec = validateSpec != null ? validateSpec : Boolean.valueOf(DEFAULT_VALIDATE_SPEC);
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -358,8 +367,8 @@ public class WorkflowSettings {
|
||||
* @param enablePostProcessFile the {@code enablePostProcessFile} to set
|
||||
* @return a reference to this Builder
|
||||
*/
|
||||
public Builder withEnablePostProcessFile(boolean enablePostProcessFile) {
|
||||
this.enablePostProcessFile = enablePostProcessFile;
|
||||
public Builder withEnablePostProcessFile(Boolean enablePostProcessFile) {
|
||||
this.enablePostProcessFile = enablePostProcessFile != null ? enablePostProcessFile : Boolean.valueOf(DEFAULT_ENABLE_POST_PROCESS_FILE);
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -369,8 +378,8 @@ public class WorkflowSettings {
|
||||
* @param enableMinimalUpdate the {@code enableMinimalUpdate} to set
|
||||
* @return a reference to this Builder
|
||||
*/
|
||||
public Builder withEnableMinimalUpdate(boolean enableMinimalUpdate) {
|
||||
this.enableMinimalUpdate = enableMinimalUpdate;
|
||||
public Builder withEnableMinimalUpdate(Boolean enableMinimalUpdate) {
|
||||
this.enableMinimalUpdate = enableMinimalUpdate != null ? enableMinimalUpdate : Boolean.valueOf(DEFAULT_ENABLE_MINIMAL_UPDATE);
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -380,8 +389,8 @@ public class WorkflowSettings {
|
||||
* @param strictSpecBehavior the {@code strictSpecBehavior} to set
|
||||
* @return a reference to this Builder
|
||||
*/
|
||||
public Builder withStrictSpecBehavior(boolean strictSpecBehavior) {
|
||||
this.strictSpecBehavior = strictSpecBehavior;
|
||||
public Builder withStrictSpecBehavior(Boolean strictSpecBehavior) {
|
||||
this.strictSpecBehavior = strictSpecBehavior != null ? strictSpecBehavior : Boolean.valueOf(DEFAULT_STRICT_SPEC_BEHAVIOR);
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -392,9 +401,7 @@ public class WorkflowSettings {
|
||||
* @return a reference to this Builder
|
||||
*/
|
||||
public Builder withTemplateDir(String templateDir) {
|
||||
if (templateDir == null) {
|
||||
this.templateDir = null;
|
||||
} else {
|
||||
if (templateDir != null) {
|
||||
File f = new File(templateDir);
|
||||
|
||||
// check to see if the folder exists
|
||||
@@ -416,7 +423,7 @@ public class WorkflowSettings {
|
||||
* @return a reference to this Builder
|
||||
*/
|
||||
public Builder withTemplatingEngineName(String templatingEngineName) {
|
||||
this.templatingEngineName = templatingEngineName;
|
||||
this.templatingEngineName = templatingEngineName != null ? templatingEngineName : DEFAULT_TEMPLATING_ENGINE_NAME;
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -438,7 +445,9 @@ public class WorkflowSettings {
|
||||
* @return a reference to this Builder
|
||||
*/
|
||||
public Builder withSystemProperties(Map<String, String> systemProperties) {
|
||||
this.systemProperties = systemProperties;
|
||||
if (systemProperties != null) {
|
||||
this.systemProperties = systemProperties;
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
@@ -50,4 +50,14 @@ public enum Stability {
|
||||
* @return The descriptive value of this enum.
|
||||
*/
|
||||
public String value() { return description; }
|
||||
|
||||
public static Stability forDescription(String description) {
|
||||
for (Stability value: values()) {
|
||||
if (value.description.equals(description)) {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
|
||||
throw new IllegalArgumentException("description not found in the available values.");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,103 @@
|
||||
/*
|
||||
* Copyright 2019 OpenAPI-Generator Contributors (https://openapi-generator.tech)
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* 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.config;
|
||||
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
import java.nio.file.Paths;
|
||||
|
||||
import static org.testng.Assert.*;
|
||||
|
||||
public class WorkflowSettingsTest {
|
||||
@Test
|
||||
public void defaultValuesNotOverriddenByNulls(){
|
||||
WorkflowSettings settings = WorkflowSettings.newBuilder()
|
||||
.withOutputDir(null)
|
||||
.withVerbose(null)
|
||||
.withSkipOverwrite(null)
|
||||
.withRemoveOperationIdPrefix(null)
|
||||
.withLogToStderr(null)
|
||||
.withValidateSpec(null)
|
||||
.withEnablePostProcessFile(null)
|
||||
.withEnableMinimalUpdate(null)
|
||||
.withStrictSpecBehavior(null)
|
||||
.build();
|
||||
|
||||
assertEquals(settings.getOutputDir(), ".");
|
||||
assertFalse(settings.isVerbose());
|
||||
assertFalse(settings.isSkipOverwrite());
|
||||
assertFalse(settings.isRemoveOperationIdPrefix());
|
||||
assertFalse(settings.isLogToStderr());
|
||||
assertTrue(settings.isValidateSpec());
|
||||
assertFalse(settings.isEnablePostProcessFile());
|
||||
assertFalse(settings.isEnableMinimalUpdate());
|
||||
assertTrue(settings.isStrictSpecBehavior());
|
||||
}
|
||||
|
||||
private void assertOnChangesToDefaults(WorkflowSettings defaults) {
|
||||
WorkflowSettings settings = WorkflowSettings.newBuilder()
|
||||
.withOutputDir("output")
|
||||
.withVerbose(true)
|
||||
.withSkipOverwrite(true)
|
||||
.withRemoveOperationIdPrefix(true)
|
||||
.withLogToStderr(true)
|
||||
.withValidateSpec(false)
|
||||
.withEnablePostProcessFile(true)
|
||||
.withEnableMinimalUpdate(true)
|
||||
.withStrictSpecBehavior(false)
|
||||
.build();
|
||||
|
||||
assertNotEquals(defaults.getOutputDir(), settings.getOutputDir());
|
||||
assertEquals(settings.getOutputDir(), Paths.get("output").toAbsolutePath().toString());
|
||||
|
||||
assertNotEquals(defaults.isVerbose(), settings.isVerbose());
|
||||
assertTrue(settings.isVerbose());
|
||||
|
||||
assertNotEquals(defaults.isSkipOverwrite(), settings.isSkipOverwrite());
|
||||
assertTrue(settings.isSkipOverwrite());
|
||||
|
||||
assertNotEquals(defaults.isRemoveOperationIdPrefix(), settings.isRemoveOperationIdPrefix());
|
||||
assertTrue(settings.isRemoveOperationIdPrefix());
|
||||
|
||||
assertNotEquals(defaults.isLogToStderr(), settings.isLogToStderr());
|
||||
assertTrue(settings.isLogToStderr());
|
||||
|
||||
assertNotEquals(defaults.isValidateSpec(), settings.isValidateSpec());
|
||||
assertFalse(settings.isValidateSpec());
|
||||
|
||||
assertNotEquals(defaults.isEnablePostProcessFile(), settings.isEnablePostProcessFile());
|
||||
assertTrue(settings.isEnablePostProcessFile());
|
||||
|
||||
assertNotEquals(defaults.isEnableMinimalUpdate(), settings.isEnableMinimalUpdate());
|
||||
assertTrue(settings.isEnableMinimalUpdate());
|
||||
|
||||
assertNotEquals(defaults.isStrictSpecBehavior(), settings.isStrictSpecBehavior());
|
||||
assertFalse(settings.isStrictSpecBehavior());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void defaultValuesCanBeChangedClassConstructor(){
|
||||
WorkflowSettings defaults = new WorkflowSettings();
|
||||
assertOnChangesToDefaults(defaults);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void defaultValuesCanBeChangedBuilder(){
|
||||
WorkflowSettings defaults = WorkflowSettings.newBuilder().build();
|
||||
assertOnChangesToDefaults(defaults);
|
||||
}
|
||||
}
|
||||
@@ -45,7 +45,7 @@ compileJava.dependsOn tasks.openApiGenerate
|
||||
[source,group]
|
||||
----
|
||||
plugins {
|
||||
id "org.openapi.generator" version "4.1.0"
|
||||
id "org.openapi.generator" version "4.1.1"
|
||||
}
|
||||
----
|
||||
|
||||
@@ -61,7 +61,7 @@ buildscript {
|
||||
// url "https://plugins.gradle.org/m2/"
|
||||
}
|
||||
dependencies {
|
||||
classpath "org.openapitools:openapi-generator-gradle-plugin:4.1.0"
|
||||
classpath "org.openapitools:openapi-generator-gradle-plugin:4.1.1"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -202,6 +202,11 @@ apply plugin: 'org.openapi.generator'
|
||||
|None
|
||||
|Reference the library template (sub-template) of a generator.
|
||||
|
||||
|gitHost
|
||||
|String
|
||||
|github.com
|
||||
|Git user ID, e.g. gitlab.com.
|
||||
|
||||
|gitUserId
|
||||
|String
|
||||
|None
|
||||
@@ -374,6 +379,18 @@ openApiGenerate {
|
||||
|
||||
|===
|
||||
|
||||
=== openApiGenerators
|
||||
|
||||
.Options
|
||||
|===
|
||||
|Key |Data Type |Default |Description
|
||||
|
||||
|include
|
||||
|String[]
|
||||
|None
|
||||
|A list of stability indexes to include (values: all,beta,stable,experimental,deprecated). Excludes deprecated by default.
|
||||
|
||||
|===
|
||||
|
||||
== Examples
|
||||
|
||||
@@ -609,7 +626,7 @@ buildscript {
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:3.2.1'
|
||||
classpath('org.openapitools:openapi-generator-gradle-plugin:4.1.0') {
|
||||
classpath('org.openapitools:openapi-generator-gradle-plugin:4.1.1') {
|
||||
exclude group: 'com.google.guava'
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
buildscript {
|
||||
ext.kotlin_version = '1.2.61'
|
||||
repositories {
|
||||
mavenLocal()
|
||||
mavenCentral()
|
||||
maven {
|
||||
url "https://plugins.gradle.org/m2/"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# RELEASE_VERSION
|
||||
openApiGeneratorVersion=4.1.0
|
||||
openApiGeneratorVersion=4.2.0-SNAPSHOT
|
||||
# /RELEASE_VERSION
|
||||
|
||||
# BEGIN placeholders
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<groupId>org.openapitools</groupId>
|
||||
<artifactId>openapi-generator-project</artifactId>
|
||||
<!-- RELEASE_VERSION -->
|
||||
<version>4.1.0</version>
|
||||
<version>4.2.0-SNAPSHOT</version>
|
||||
<!-- /RELEASE_VERSION -->
|
||||
<relativePath>../..</relativePath>
|
||||
</parent>
|
||||
@@ -20,6 +20,20 @@
|
||||
<gradleVersion>4.10.2</gradleVersion>
|
||||
</properties>
|
||||
|
||||
<pluginRepositories>
|
||||
<pluginRepository>
|
||||
<id>Gradle Releases</id>
|
||||
<name>Gradle Releases repository</name>
|
||||
<url>https://repo.gradle.org/gradle/libs-releases-local/</url>
|
||||
<releases>
|
||||
<enabled>true</enabled>
|
||||
</releases>
|
||||
<snapshots>
|
||||
<enabled>false</enabled>
|
||||
</snapshots>
|
||||
</pluginRepository>
|
||||
</pluginRepositories>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.openapitools</groupId>
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user