mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-12-06 07:26:12 +00:00
Compare commits
271 Commits
swift5-cod
...
v4.1.2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
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 | ||
|
|
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 | ||
|
|
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 | ||
|
|
22d022b2d5 | ||
|
|
42d6420400 | ||
|
|
ac85c8f901 | ||
|
|
5956569e7a | ||
|
|
59c4e381d1 | ||
|
|
1ab7b9ceb6 | ||
|
|
65c7c1b39b | ||
|
|
2d7cc778db | ||
|
|
fbb2f1e05a | ||
|
|
752030890f | ||
|
|
36dd848440 | ||
|
|
4b0fc3013f | ||
|
|
1152af4d02 | ||
|
|
b28ef78145 | ||
|
|
7f36f26422 | ||
|
|
411199bc99 | ||
|
|
4478f42927 | ||
|
|
9e659d13ed | ||
|
|
b8295afa27 | ||
|
|
3538c08a8b | ||
|
|
5ab1c9c75b | ||
|
|
2bbebf9752 | ||
|
|
f756bd5e11 | ||
|
|
fae073874b | ||
|
|
00f7134eb3 | ||
|
|
b20118b87c | ||
|
|
a48df102d6 | ||
|
|
3f7653a5c9 | ||
|
|
4df1e1928c | ||
|
|
83f17941b9 | ||
|
|
6963e5eeb0 | ||
|
|
86228e9964 | ||
|
|
480d6baf3b | ||
|
|
8b44c9dff1 | ||
|
|
ba63aa55a5 | ||
|
|
d45e306480 | ||
|
|
1c36fa9fe3 | ||
|
|
d0f0e17542 | ||
|
|
ffaeb11a61 | ||
|
|
4c1133be3f | ||
|
|
dff3386594 | ||
|
|
ca85ecb283 | ||
|
|
93ddf6e2ef | ||
|
|
ed82aaae97 | ||
|
|
581131e0fe | ||
|
|
08415d1d83 | ||
|
|
4d285939a6 | ||
|
|
eca8ec3cf8 | ||
|
|
0a7527b03e | ||
|
|
bcc3a9ecf7 | ||
|
|
f90f214121 | ||
|
|
0e621dcc29 | ||
|
|
8b054e6f8e | ||
|
|
88af8964fd | ||
|
|
199447a398 | ||
|
|
4c9d023468 | ||
|
|
d46cabcd4f | ||
|
|
6824bd8b24 | ||
|
|
f90507b527 | ||
|
|
3b584c2138 | ||
|
|
37cdc8e493 | ||
|
|
c684505cba | ||
|
|
1bf8c15206 | ||
|
|
b4f1581941 | ||
|
|
cf01bf4ae7 | ||
|
|
74eeb07b22 | ||
|
|
981b3a53ef | ||
|
|
9cb3ae1048 | ||
|
|
cbd78d7fca | ||
|
|
6e3176557c | ||
|
|
1713c7610d | ||
|
|
049f69c55b | ||
|
|
b9e863a9ca | ||
|
|
6358b11516 | ||
|
|
652b14c28f | ||
|
|
93cb215531 | ||
|
|
d5d8b7a118 | ||
|
|
45fcf3792a | ||
|
|
43590582c5 | ||
|
|
8253c28d6e | ||
|
|
fabe021fb0 | ||
|
|
8231cbfe81 | ||
|
|
a3cf964ce9 | ||
|
|
d0b728794d | ||
|
|
da62116c9d | ||
|
|
2c9bfdf29a | ||
|
|
64c2069256 | ||
|
|
3f3ecb6879 | ||
|
|
2f479f493f | ||
|
|
ee538be964 | ||
|
|
a0dd7394ac | ||
|
|
3f7725c9e2 | ||
|
|
ab644f9912 | ||
|
|
28a16bea24 | ||
|
|
2e81e612fc | ||
|
|
a4b1c269d8 | ||
|
|
2c4fdd0792 | ||
|
|
00c7d6f46b | ||
|
|
40f1f920df | ||
|
|
5775813031 | ||
|
|
d2576f411e | ||
|
|
76fecf744b | ||
|
|
f436904359 | ||
|
|
5cba55f8fb | ||
|
|
1413775e0e | ||
|
|
21e29d7177 | ||
|
|
5c7d902c4c | ||
|
|
e58cc2a282 | ||
|
|
84e2f60d6b | ||
|
|
944e1c3468 | ||
|
|
26b8d1f4c2 | ||
|
|
0fec25e92e | ||
|
|
1aa8a2bec4 | ||
|
|
1e735c69fa | ||
|
|
4223743ee0 | ||
|
|
29a85d54a2 | ||
|
|
a85bd0f8f9 | ||
|
|
610ca28681 |
36
.github/.test/samples.json
vendored
36
.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": [
|
||||
@@ -1094,36 +1088,6 @@
|
||||
"Client: Swift"
|
||||
]
|
||||
},
|
||||
{
|
||||
"input": "swift5-petstore-promisekit.sh",
|
||||
"matches": [
|
||||
"Client: Swift"
|
||||
]
|
||||
},
|
||||
{
|
||||
"input": "swift5-petstore-rxswift.sh",
|
||||
"matches": [
|
||||
"Client: Swift"
|
||||
]
|
||||
},
|
||||
{
|
||||
"input": "swift5-petstore-unwrapRequired.sh",
|
||||
"matches": [
|
||||
"Client: Swift"
|
||||
]
|
||||
},
|
||||
{
|
||||
"input": "swift5-petstore.sh",
|
||||
"matches": [
|
||||
"Client: Swift"
|
||||
]
|
||||
},
|
||||
{
|
||||
"input": "swift5-test.sh",
|
||||
"matches": [
|
||||
"Client: Swift"
|
||||
]
|
||||
},
|
||||
{
|
||||
"input": "typescript-angular-v2-petstore-interfaces.sh",
|
||||
"matches": [
|
||||
|
||||
4
.gitignore
vendored
4
.gitignore
vendored
@@ -232,3 +232,7 @@ samples/client/petstore/elm/index.html
|
||||
# C
|
||||
samples/client/petstore/c/build
|
||||
samples/client/petstore/c/*.so
|
||||
|
||||
# Ruby
|
||||
samples/openapi3/client/petstore/ruby/Gemfile.lock
|
||||
samples/openapi3/client/petstore/ruby-faraday/Gemfile.lock
|
||||
|
||||
@@ -94,6 +94,14 @@ 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
|
||||
- sudo apt-get install qt510-meta-minimal
|
||||
- source /opt/qt510/bin/qt510-env.sh
|
||||
- qmake -v
|
||||
|
||||
# show host table to confirm petstore.swagger.io is mapped to localhost
|
||||
- cat /etc/hosts
|
||||
|
||||
40
CI/.drone.yml
Normal file
40
CI/.drone.yml
Normal file
@@ -0,0 +1,40 @@
|
||||
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/openapi && pub get && pub run test)
|
||||
# test Java 11 HTTP client
|
||||
- name: java11-test
|
||||
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
|
||||
commands:
|
||||
- sudo apt-get -y install m4
|
||||
- cd samples/client/petstore/ocaml
|
||||
- opam install ppx_deriving_yojson cohttp ppx_deriving cohttp-lwt-unix
|
||||
- eval $(opam env)
|
||||
- sudo chmod -R 777 .
|
||||
- dune build --build-dir=./_build
|
||||
@@ -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
|
||||
|
||||
@@ -10,6 +10,7 @@ import java.util.TimeZone;
|
||||
|
||||
import org.junit.*;
|
||||
import static org.junit.Assert.*;
|
||||
import static org.hamcrest.CoreMatchers.*;
|
||||
|
||||
|
||||
public class ApiClientTest {
|
||||
@@ -329,24 +330,18 @@ public class ApiClientTest {
|
||||
assertEquals("sun.gif", apiClient.sanitizeFilename(".\\sun.gif"));
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
public void testInterceptorCleanupWithNewClient() {
|
||||
public void testNewHttpClient() {
|
||||
OkHttpClient oldClient = apiClient.getHttpClient();
|
||||
assertEquals(1, oldClient.networkInterceptors().size());
|
||||
|
||||
OkHttpClient newClient = new OkHttpClient();
|
||||
apiClient.setHttpClient(newClient);
|
||||
assertEquals(1, apiClient.getHttpClient().networkInterceptors().size());
|
||||
apiClient.setHttpClient(newClient);
|
||||
assertEquals(1, apiClient.getHttpClient().networkInterceptors().size());
|
||||
apiClient.setHttpClient(oldClient.newBuilder().build());
|
||||
assertThat(apiClient.getHttpClient(), is(not(oldClient)));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testInterceptorCleanupWithSameClient() {
|
||||
OkHttpClient oldClient = apiClient.getHttpClient();
|
||||
assertEquals(1, oldClient.networkInterceptors().size());
|
||||
apiClient.setHttpClient(oldClient);
|
||||
assertEquals(1, apiClient.getHttpClient().networkInterceptors().size());
|
||||
/**
|
||||
* Tests the invariant that the HttpClient for the ApiClient must never be null
|
||||
*/
|
||||
@Test(expected = NullPointerException.class)
|
||||
public void testNullHttpClient() {
|
||||
apiClient.setHttpClient(null);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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,26 @@
|
||||
<project>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>org.openapitools</groupId>
|
||||
<artifactId>TypeScriptAngularBuildPestoreClientTests</artifactId>
|
||||
<packaging>pom</packaging>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<name>TS Fetch Multiple Parameters Petstore Client</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>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
@@ -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>
|
||||
100
README.md
100
README.md
@@ -2,20 +2,28 @@
|
||||
|
||||
<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.1`): [](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)
|
||||
[](https://ci.appveyor.com/project/WilliamCheng/openapi-generator-wh2wu)
|
||||
[](https://cloud.drone.io/OpenAPITools/openapi-generator)
|
||||
</div>
|
||||
|
||||
<div align="center">
|
||||
|
||||
[](https://gitter.im/OpenAPITools/openapi-generator?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
||||
[](https://join.slack.com/t/openapi-generator/shared_invite/enQtNzAyNDMyOTU0OTE1LTY5ZDBiNDI5NzI5ZjQ1Y2E5OWVjMjZkYzY1ZGM2MWQ4YWFjMzcyNDY5MGI4NjQxNDBiMTlmZTc5NjY2ZTQ5MGM)
|
||||
[](http://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22org.openapitools%22%20AND%20a%3A%22openapi-generator%22)
|
||||
[](https://twitter.com/oas_generator)
|
||||
|
||||
@@ -46,16 +54,22 @@ If you find OpenAPI Generator useful for work, please consider asking your compa
|
||||
[](https://www.namsor.com/?utm_source=openapi_generator&utm_medium=github_webpage&utm_campaign=sponsor)
|
||||
[](https://www.lightbow.net/?utm_source=openapi_generator&utm_medium=github_webpage&utm_campaign=sponsor)
|
||||
|
||||
#### Thank you GoDaddy for sponsoring the domain names and Linode for sponsoring the VPS
|
||||
|
||||
[<img src="https://openapi-generator.tech/img/companies/godaddy.png" width="150">](https://www.godaddy.com/?utm_source=openapi_generator&utm_medium=github_webpage&utm_campaign=sponsor)
|
||||
[](https://www.linode.com/?utm_source=openapi_generator&utm_medium=github_webpage&utm_campaign=sponsor)
|
||||
|
||||
|
||||
## Overview
|
||||
OpenAPI Generator allows generation of API client libraries (SDK generation), server stubs, documentation and configuration automatically given an [OpenAPI Spec](https://github.com/OAI/OpenAPI-Specification) (both 2.0 and 3.0 are supported). Currently, the following languages/frameworks are supported:
|
||||
|
||||
| | Languages/Frameworks |
|
||||
|-|-|
|
||||
**API clients** | **ActionScript**, **Ada**, **Apex**, **Bash**, **C**, **C#** (.net 2.0, 3.5 or later), **C++** (cpp-restsdk, Qt5, Tizen), **Clojure**, **Dart (1.x, 2.x)**, **Elixir**, **Elm**, **Eiffel**, **Erlang**, **Go**, **Groovy**, **Haskell** (http-client, Servant), **Java** (Jersey1.x, Jersey2.x, OkHttp, Retrofit1.x, Retrofit2.x, Feign, RestTemplate, RESTEasy, Vertx, Google API Client Library for Java, Rest-assured, Spring 5 Web Client), **Kotlin**, **Lua**, **Node.js** (ES5, ES6, AngularJS with Google Closure Compiler annotations, Flow types) **Objective-C**, **Perl**, **PHP**, **PowerShell**, **Python**, **R**, **Ruby**, **Rust** (rust, rust-server), **Scala** (akka, http4s, scalaz, swagger-async-httpclient), **Swift** (2.x, 3.x, 4.x), **Typescript** (AngularJS, Angular (2.x - 7.x), Aurelia, Axios, Fetch, Inversify, jQuery, Node, Rxjs)
|
||||
**Server stubs** | **Ada**, **C#** (ASP.NET Core, NancyFx), **C++** (Pistache, Restbed, Qt5 QHTTPEngine), **Erlang**, **F#** (Giraffe), **Go** (net/http, Gin), **Haskell** (Servant), **Java** (MSF4J, Spring, Undertow, JAX-RS: CDI, CXF, Inflector, RestEasy, Play Framework, [PKMST](https://github.com/ProKarma-Inc/pkmst-getting-started-examples)), **Kotlin** (Spring Boot, Ktor), **PHP** (Laravel, Lumen, Slim, Silex, [Symfony](https://symfony.com/), [Zend Expressive](https://github.com/zendframework/zend-expressive)), **Python** (Flask), **NodeJS**, **Ruby** (Sinatra, Rails5), **Rust** (rust-server), **Scala** ([Finch](https://github.com/finagle/finch), [Lagom](https://github.com/lagom/lagom), [Play](https://www.playframework.com/), Scalatra)
|
||||
**API 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**, **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), **PHP** (Laravel, Lumen, Slim, Silex, [Symfony](https://symfony.com/), [Zend Expressive](https://github.com/zendframework/zend-expressive)), **Python** (Flask), **NodeJS**, **Ruby** (Sinatra, Rails5), **Rust** (rust-server), **Scala** ([Finch](https://github.com/finagle/finch), [Lagom](https://github.com/lagom/lagom), [Play](https://www.playframework.com/), Scalatra)
|
||||
**API documentation generators** | **HTML**, **Confluence Wiki**
|
||||
**Configuration files** | [**Apache2**](https://httpd.apache.org/)
|
||||
**Others** | **GraphQL**, **JMeter**, **MySQL Schema**
|
||||
**Others** | **GraphQL**, **JMeter**, **MySQL Schema**, **Protocol Buffer**
|
||||
|
||||
## Table of contents
|
||||
|
||||
@@ -93,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.0.3](https://github.com/OpenAPITools/openapi-generator/releases/tag/v4.0.3) (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) | 11.09.2019 | Minor release (breaking changes with fallbacks)
|
||||
|
||||
OpenAPI Spec compatibility: 1.0, 1.1, 1.2, 2.0, 3.0
|
||||
|
||||
@@ -150,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.0.3/openapi-generator-cli-4.0.3.jar`
|
||||
JAR location: `http://central.maven.org/maven2/org/openapitools/openapi-generator-cli/4.1.1/openapi-generator-cli-4.1.1.jar`
|
||||
|
||||
For **Mac/Linux** users:
|
||||
```sh
|
||||
wget http://central.maven.org/maven2/org/openapitools/openapi-generator-cli/4.0.3/openapi-generator-cli-4.0.3.jar -O openapi-generator-cli.jar
|
||||
wget http://central.maven.org/maven2/org/openapitools/openapi-generator-cli/4.1.1/openapi-generator-cli-4.1.1.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.0.3/openapi-generator-cli-4.0.3.jar
|
||||
Invoke-WebRequest -OutFile openapi-generator-cli.jar http://central.maven.org/maven2/org/openapitools/openapi-generator-cli/4.1.1/openapi-generator-cli-4.1.1.jar
|
||||
```
|
||||
|
||||
After downloading the JAR, run `java -jar openapi-generator-cli.jar help` to show the usage.
|
||||
@@ -217,9 +232,9 @@ openapi-generator-cli version # is always 3.0.2, unless any of the above overrid
|
||||
|
||||
To build from source, you need the following installed and available in your `$PATH:`
|
||||
|
||||
* [Java 8](http://java.oracle.com)
|
||||
* [Java 8](https://www.oracle.com/technetwork/java/index.html)
|
||||
|
||||
* [Apache Maven 3.3.4 or greater](http://maven.apache.org/)
|
||||
* [Apache Maven 3.3.4 or greater](https://maven.apache.org/)
|
||||
|
||||
After cloning the project, you can build it from source with this command:
|
||||
```sh
|
||||
@@ -242,6 +257,17 @@ openapi-generator generate -i https://raw.githubusercontent.com/openapitools/ope
|
||||
|
||||
To reinstall with the latest master, run `brew uninstall openapi-generator && brew install --HEAD openapi-generator`
|
||||
|
||||
To install OpenJDK (pre-requisites), please run
|
||||
```sh
|
||||
brew cask install adoptopenjdk12
|
||||
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk-12.0.2.jdk/Contents/Home/
|
||||
```
|
||||
|
||||
To install Maven, please run
|
||||
```sh
|
||||
brew install maven
|
||||
```
|
||||
|
||||
### [1.6 - Docker](#table-of-contents)
|
||||
|
||||
#### Public Pre-built Docker images
|
||||
@@ -342,7 +368,7 @@ Right now: no solution for this one :|
|
||||
#### Run Docker in Vagrant
|
||||
Prerequisite: install [Vagrant](https://www.vagrantup.com/downloads.html) and [VirtualBox](https://www.virtualbox.org/wiki/Downloads).
|
||||
```sh
|
||||
git clone http://github.com/openapitools/openapi-generator.git
|
||||
git clone https://github.com/openapitools/openapi-generator.git
|
||||
cd openapi-generator
|
||||
vagrant up
|
||||
vagrant ssh
|
||||
@@ -363,10 +389,10 @@ openapi-generator version
|
||||
```
|
||||
|
||||
<!-- RELEASE_VERSION -->
|
||||
Or install a particular OpenAPI Generator version (e.g. v4.0.3):
|
||||
Or install a particular OpenAPI Generator version (e.g. v4.1.1):
|
||||
|
||||
```sh
|
||||
npm install @openapitools/openapi-generator-cli@cli-4.0.3 -g
|
||||
npm install @openapitools/openapi-generator-cli@cli-4.1.1 -g
|
||||
```
|
||||
|
||||
Or install it as dev-dependency:
|
||||
@@ -390,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.0.3/openapi-generator-cli-4.0.3.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.1/openapi-generator-cli-4.1.1.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`
|
||||
@@ -429,7 +455,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>)]
|
||||
@@ -450,12 +475,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)]
|
||||
|
||||
@@ -500,8 +526,8 @@ Please refer to [integration.md](docs/integration.md) on how to integrate OpenAP
|
||||
|
||||
Here are the public online services:
|
||||
|
||||
- latest stable version: http://api.openapi-generator.tech
|
||||
- latest master: http://api-latest-master.openapi-generator.tech (updated with latest master every hour)
|
||||
- latest stable version: https://api.openapi-generator.tech
|
||||
- latest master: https://api-latest-master.openapi-generator.tech (updated with latest master every hour)
|
||||
|
||||
The server is sponsored by [Linode](https://www.linode.com/) [](https://www.linode.com/)
|
||||
|
||||
@@ -531,8 +557,10 @@ Here are some companies/projects (alphabetical order) using OpenAPI Generator in
|
||||
- [CAM](https://www.cam-inc.co.jp/)
|
||||
- [Camptocamp](https://www.camptocamp.com/en)
|
||||
- [codecentric AG](https://www.codecentric.de/)
|
||||
- [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/)
|
||||
- [GenFlow](https://github.com/RepreZen/GenFlow)
|
||||
@@ -542,6 +570,8 @@ Here are some companies/projects (alphabetical order) using OpenAPI Generator in
|
||||
- [Klarna](https://www.klarna.com/)
|
||||
- [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)
|
||||
@@ -575,6 +605,7 @@ Here are some companies/projects (alphabetical order) using OpenAPI Generator in
|
||||
- 2018/12/09 - [openapi-generator をカスタマイズする方法](https://qiita.com/watiko/items/0961287c02eac9211572) by [@watiko](https://qiita.com/watiko)
|
||||
- 2019/01/03 - [Calling a Swagger service from Apex using openapi-generator](https://lekkimworld.com/2019/01/03/calling-a-swagger-service-from-apex-using-openapi-generator/) by [Mikkel Flindt Heisterberg](https://lekkimworld.com)
|
||||
- 2019/01/13 - [OpenAPI GeneratorでRESTful APIの定義書から色々自動生成する](https://ky-yk-d.hatenablog.com/entry/2019/01/13/234108) by [@ky_yk_d](https://twitter.com/ky_yk_d)
|
||||
- 2019/01/20 - [Contract-First API Development with OpenAPI Generator and Connexion](https://medium.com/commencis/contract-first-api-development-with-openapi-generator-and-connexion-b21bbf2f9244) by [Anil Can Aydin](https://github.com/anlcnydn)
|
||||
- 2019/01/30 - [Rapid Application Development With API First Approach Using Open-API Generator](https://dzone.com/articles/rapid-api-development-using-open-api-generator) by [Milan Sonkar](https://dzone.com/users/828329/milan_sonkar.html)
|
||||
- 2019/02/02 - [平静を保ち、コードを生成せよ 〜 OpenAPI Generator誕生の背景と軌跡 〜](https://speakerdeck.com/akihito_nakano/gunmaweb34) by [中野暁人](https://github.com/ackintosh) at [Gunma.web #34 スキーマ駆動開発](https://gunmaweb.connpass.com/event/113974/)
|
||||
- 2019/02/20 - [An adventure in OpenAPI V3 code generation](https://mux.com/blog/an-adventure-in-openapi-v3-api-code-generation/) by [Phil Cluff](https://mux.com/blog/author/philc/)
|
||||
@@ -597,6 +628,14 @@ Here are some companies/projects (alphabetical order) using OpenAPI Generator in
|
||||
- 2019-07-04 - [REST API のためのコード生成入門 (OpenAPI Generator)](https://gum.co/openapi_generator_ebook_big5) by [William Cheng](https://twitter.com/wing328), [中野暁人](https://github.com/ackintosh), [和田拓朗](https://github.com/taxpon)
|
||||
- 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)
|
||||
|
||||
## [6 - About Us](#table-of-contents)
|
||||
|
||||
@@ -653,16 +692,19 @@ Here is a list of template creators:
|
||||
* Java (Vertx): @lopesmcc
|
||||
* Java (Google APIs Client Library): @charlescapps
|
||||
* Java (Rest-assured): @viclovsky
|
||||
* Java (Java 11 Native HTTP client): @bbdouglas
|
||||
* Javascript/NodeJS: @jfiala
|
||||
* Javascript (Closure-annotated Angular) @achew22
|
||||
* Javascript (Flow types) @jaypea
|
||||
* JMeter: @davidkiss
|
||||
* Kotlin: @jimschubert [:heart:](https://www.patreon.com/jimschubert)
|
||||
* Lua: @daurnimator
|
||||
* OCaml: @cgensoul
|
||||
* Perl: @wing328 [:heart:](https://www.patreon.com/wing328)
|
||||
* PHP (Guzzle): @baartosz
|
||||
* PowerShell: @beatcracker
|
||||
* R: @ramnov
|
||||
* Ruby (Faraday): @meganemura @dkliban
|
||||
* Rust: @farcaller
|
||||
* Rust (rust-server): @metaswitch
|
||||
* Scala (scalaz & http4s): @tbrown1979
|
||||
@@ -705,6 +747,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
|
||||
* NodeJS Express: @YishTish
|
||||
* PHP Laravel: @renepardon
|
||||
* PHP Lumen: @abcsun
|
||||
* PHP Slim: @jfastnacht
|
||||
@@ -722,8 +765,10 @@ Here is a list of template creators:
|
||||
* 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
|
||||
|
||||
@@ -764,16 +809,16 @@ 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++ | @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) |
|
||||
| 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) |
|
||||
| Erlang | @tsloughter (2017/11) @jfacorro (2018/10) @robertoaloi (2018/10) |
|
||||
| F# | @nmfisher (2019/05) |
|
||||
| Go | @antihax (2017/11) @bvwells (2017/12) @grokify (2018/07) @kemokemo (2018/09 |
|
||||
| Go | @antihax (2017/11) @bvwells (2017/12) @grokify (2018/07) @kemokemo (2018/09) @bkabrda (2019/07) |
|
||||
| GraphQL | @renepardon (2018/12) |
|
||||
| Groovy | |
|
||||
| Haskell | |
|
||||
@@ -782,13 +827,14 @@ If you want to join the committee, please kindly apply by sending an email to te
|
||||
| Lua | @daurnimator (2017/08) |
|
||||
| NodeJS/Javascript | @CodeNinjai (2017/07) @frol (2017/07) @cliffano (2017/07) |
|
||||
| ObjC | |
|
||||
| OCaml | @cgensoul (2019/08) |
|
||||
| Perl | @wing328 (2017/07) [:heart:](https://www.patreon.com/wing328) @yue9944882 (2019/06) |
|
||||
| PHP | @jebentier (2017/07), @dkarlovi (2017/07), @mandrean (2017/08), @jfastnacht (2017/09), @ackintosh (2017/09) [:heart:](https://www.patreon.com/ackintosh/overview), @ybelenko (2018/07), @renepardon (2018/12) |
|
||||
| PowerShell | |
|
||||
| Python | @taxpon (2017/07) @frol (2017/07) @mbohlool (2017/07) @cbornet (2017/09) @kenjones-cisco (2017/11) @tomplus (2018/10) @Jyhess (2019/01) |
|
||||
| R | @Ramanth (2019/07) @saigiridhar21 (2019/07) |
|
||||
| Ruby | @cliffano (2017/07) @zlx (2017/09) @autopp (2019/02) |
|
||||
| Rust | @frol (2017/07) @farcaller (2017/08) @bjgill (2017/12) |
|
||||
| Rust | @frol (2017/07) @farcaller (2017/08) @bjgill (2017/12) @richardwhiuk (2019/07) |
|
||||
| Scala | @clasnake (2017/07), @jimschubert (2017/09) [:heart:](https://www.patreon.com/jimschubert), @shijinkui (2018/01), @ramzimaalej (2018/03) |
|
||||
| Swift | @jgavris (2017/07) @ehyche (2017/08) @Edubits (2017/09) @jaz-ah (2017/09) @d-date (2018/03) |
|
||||
| TypeScript | @TiFu (2017/07) @taxpon (2017/07) @sebastianhaas (2017/07) @kenisteward (2017/07) @Vrolijkx (2017/09) @macjohnny (2018/01) @nicokoenig (2018/09) @topce (2018/10) @akehir (2019/07) |
|
||||
@@ -861,7 +907,7 @@ Copyright 2018 SmartBear Software
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at [apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0)
|
||||
You may obtain a copy of the License at [apache.org/licenses/LICENSE-2.0](https://www.apache.org/licenses/LICENSE-2.0)
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
|
||||
@@ -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/openapi --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.
|
||||
|
||||
@@ -34,6 +34,6 @@ rm -rf $STUB_DIR
|
||||
|
||||
# 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/$GENERATOR -i $SPEC -g $GENERATOR -o $STUB_DIR -DpackageName=petstore $@"
|
||||
ags="generate -t modules/openapi-generator/src/main/resources/$GENERATOR -i $SPEC -g $GENERATOR -o $STUB_DIR --additional-properties packageName=petstore $@"
|
||||
|
||||
java $JAVA_OPTS -jar $executable $ags
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
./bin/java-petstore-feign-10x.sh
|
||||
./bin/java-petstore-okhttp-gson.sh
|
||||
./bin/java-petstore-okhttp-gson-parcelable.sh
|
||||
./bin/java-petstore-native.sh
|
||||
./bin/java-petstore-retrofit.sh
|
||||
./bin/java-petstore-retrofit2.sh
|
||||
./bin/java-petstore-retrofit2rx.sh
|
||||
|
||||
@@ -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 --artifact-id petstore-java-client-jersey1 -t modules/openapi-generator/src/main/resources/Java -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g java -o samples/client/petstore/java/jersey1 --additional-properties hideGenerationTimestamp=true --library=jersey1 --additional-properties useNullForUnknownEnumValue=true $@"
|
||||
ags="generate --artifact-id petstore-java-client-jersey1 -t modules/openapi-generator/src/main/resources/Java -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g java -o samples/client/petstore/java/jersey1 --additional-properties hideGenerationTimestamp=true --library=jersey1 $@"
|
||||
|
||||
echo "Removing files and folders under samples/client/petstore/java/jersey1/src/main"
|
||||
rm -rf samples/client/petstore/java/jersey1/src/main
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
{
|
||||
"library": "jersey2",
|
||||
"artifactId": "petstore-jersey2",
|
||||
"additionalProperties" : {
|
||||
"useNullForUnknownEnumValue" : true
|
||||
}
|
||||
"artifactId": "petstore-jersey2"
|
||||
}
|
||||
|
||||
4
bin/java-petstore-native.json
Normal file
4
bin/java-petstore-native.json
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"library": "native",
|
||||
"artifactId": "petstore-native"
|
||||
}
|
||||
@@ -27,20 +27,9 @@ fi
|
||||
|
||||
# if you've executed sbt assembly previously it will use that instead.
|
||||
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
|
||||
ags="generate -t modules/openapi-generator/src/main/resources/swift5 -i modules/openapi-generator/src/test/resources/2_0/swift/petstore-with-fake-endpoints-models-for-testing.yaml -g swift5 -c ./bin/swift5-petstore.json -o samples/client/petstore/swift5/default --generate-alias-as-model $@"
|
||||
ags="generate -t modules/openapi-generator/src/main/resources/Java/libraries/native -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin/java-petstore-native.json -o samples/client/petstore/java/native --additional-properties hideGenerationTimestamp=true $@"
|
||||
|
||||
echo "Removing files and folders under samples/client/petstore/java/httpclient/src/main"
|
||||
rm -rf samples/client/petstore/java/native/src/main
|
||||
find samples/client/petstore/java/native -maxdepth 1 -type f ! -name "README.md" -exec rm {} +
|
||||
java $JAVA_OPTS -jar $executable $ags
|
||||
|
||||
cd samples/client/petstore/swift5/default
|
||||
|
||||
if type "xcodegen" > /dev/null 2>&1; then
|
||||
xcodegen generate
|
||||
|
||||
if type "carthage" > /dev/null 2>&1; then
|
||||
carthage update --no-use-binaries --platform ios --cache-builds
|
||||
fi
|
||||
fi
|
||||
|
||||
if type "swiftlint" > /dev/null 2>&1; then
|
||||
swiftlint autocorrect --quiet
|
||||
fi
|
||||
@@ -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 $@"
|
||||
|
||||
|
||||
@@ -27,20 +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/swift5 -i modules/openapi-generator/src/test/resources/2_0/swift/petstore-with-fake-endpoints-models-for-testing.yaml -g swift5 -c ./bin/swift5-petstore-rxswift.json -o samples/client/petstore/swift5/rxswift --generate-alias-as-model $@"
|
||||
ags="generate -t modules/openapi-generator/src/main/resources/nodejs-express-server -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g nodejs-express-server -o samples/server/petstore/nodejs-express-server -Dservice $@"
|
||||
|
||||
java $JAVA_OPTS -jar $executable $ags
|
||||
|
||||
cd samples/client/petstore/swift5/rxswift
|
||||
|
||||
if type "xcodegen" > /dev/null 2>&1; then
|
||||
xcodegen generate
|
||||
|
||||
if type "carthage" > /dev/null 2>&1; then
|
||||
carthage update --no-use-binaries --platform ios --cache-builds
|
||||
fi
|
||||
fi
|
||||
|
||||
if type "swiftlint" > /dev/null 2>&1; then
|
||||
swiftlint autocorrect --quiet
|
||||
fi
|
||||
34
bin/ocaml-petstore.sh
Executable file
34
bin/ocaml-petstore.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"
|
||||
|
||||
args="generate -t modules/openapi-generator/src/main/resources/ocaml -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g ocaml -o samples/client/petstore/ocaml --additional-properties packageName=petstore_client $@"
|
||||
|
||||
echo "java ${JAVA_OPTS} -jar ${executable} ${args}"
|
||||
java $JAVA_OPTS -jar $executable $args
|
||||
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
|
||||
@@ -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 -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
|
||||
|
||||
34
bin/openapi3/ocaml-client-petstore.sh
Executable file
34
bin/openapi3/ocaml-client-petstore.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 -DdebugOperations -DloggerPath=conf/log4j.properties"
|
||||
|
||||
args="generate -t modules/openapi-generator/src/main/resources/ocaml -i modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml -g ocaml -o samples/openapi3/client/petstore/ocaml/ --additional-properties packageName=petstore_client $@"
|
||||
|
||||
echo "java ${JAVA_OPTS} -jar ${executable} ${args}"
|
||||
java $JAVA_OPTS -jar $executable $args
|
||||
@@ -23,7 +23,7 @@ if [ ! -d "${APP_DIR}" ]; then
|
||||
fi
|
||||
|
||||
# Make sure that we are regenerating the sample by removing any existing target directory
|
||||
TARGET_DIR="$SCRIPT_DIR/../../samples/server/petstore/php-symfony/SymfonyBundle-php"
|
||||
TARGET_DIR="$SCRIPT_DIR/../../samples/openapi3/server/petstore/php-symfony/SymfonyBundle-php"
|
||||
if [ -d "$TARGET_DIR" ]; then
|
||||
rm -rf $TARGET_DIR
|
||||
fi
|
||||
|
||||
43
bin/openapi3/ruby-client-faraday-petstore.sh
Executable file
43
bin/openapi3/ruby-client-faraday-petstore.sh
Executable file
@@ -0,0 +1,43 @@
|
||||
#!/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
|
||||
|
||||
# purge lib/doc folder
|
||||
echo "purge ruby petstore lib, docs folder"
|
||||
rm -Rf samples/openapi3/client/petstore/ruby-faraday/lib
|
||||
rm -Rf samples/openapi3/client/petstore/ruby-faraday/docs
|
||||
|
||||
# purge test files other than integration test
|
||||
# NOTE: spec/custom/*.rb and spec/petstore_helper.rb are not generated files
|
||||
echo "purge ruby petstore spec"
|
||||
find samples/openapi3/client/petstore/ruby-faraday/spec -type d -not -name spec -not -name custom | xargs rm -Rf
|
||||
find samples/openapi3/client/petstore/ruby-faraday/spec -type f -not -name petstore_helper.rb -not -iwholename '*/spec/custom/*' | xargs rm -Rf
|
||||
|
||||
# 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/ruby-client -i modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml -g ruby -c bin/openapi3/ruby-petstore-faraday.json -o samples/openapi3/client/petstore/ruby-faraday --additional-properties skipFormModel=true $@"
|
||||
|
||||
java $JAVA_OPTS -jar $executable $ags
|
||||
6
bin/openapi3/ruby-petstore-faraday.json
Normal file
6
bin/openapi3/ruby-petstore-faraday.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"gemName": "petstore",
|
||||
"moduleName": "Petstore",
|
||||
"library": "faraday",
|
||||
"gemVersion": "1.0.0"
|
||||
}
|
||||
@@ -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
|
||||
32
bin/ruby-client-petstore-faraday.sh
Executable file
32
bin/ruby-client-petstore-faraday.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} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
|
||||
ags="generate -t modules/openapi-generator/src/main/resources/ruby-client -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g ruby -c bin/ruby-petstore-faraday.json -o samples/client/petstore/ruby-faraday $@"
|
||||
|
||||
java $JAVA_OPTS -jar $executable $ags
|
||||
7
bin/ruby-petstore-faraday.json
Normal file
7
bin/ruby-petstore-faraday.json
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"gemName": "petstore",
|
||||
"moduleName": "Petstore",
|
||||
"library": "faraday",
|
||||
"gemVersion": "1.0.0",
|
||||
"strictSpecBehavior": false
|
||||
}
|
||||
@@ -1,5 +1,7 @@
|
||||
{
|
||||
"gemName": "petstore",
|
||||
"library": "typhoeus",
|
||||
"moduleName": "Petstore",
|
||||
"gemVersion": "1.0.0"
|
||||
"gemVersion": "1.0.0",
|
||||
"strictSpecBehavior": false
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
# Generate clients:
|
||||
./bin/spring-cloud-feign-petstore.sh
|
||||
./bin/spring-cloud-feign-async-petstore.sh
|
||||
./bin/spring-stubs.sh
|
||||
|
||||
# Generate spring-mvc servers:
|
||||
|
||||
@@ -27,20 +27,9 @@ fi
|
||||
|
||||
# if you've executed sbt assembly previously it will use that instead.
|
||||
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
|
||||
ags="generate -t modules/openapi-generator/src/main/resources/swift5 -i modules/openapi-generator/src/test/resources/2_0/swift/petstore-with-fake-endpoints-models-for-testing.yaml -g swift5 -c ./bin/swift5-petstore-promisekit.json -o samples/client/petstore/swift5/promisekit --generate-alias-as-model $@"
|
||||
ags="generate -t modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-cloud -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g spring -c bin/spring-cloud-feign-petstore.json -o samples/client/petstore/spring-cloud-async --additional-properties hideGenerationTimestamp=true,java8=true,async=true $@"
|
||||
|
||||
echo "Removing files and folders under samples/client/petstore/spring-cloud-async/src/main"
|
||||
rm -rf samples/client/petstore/spring-cloud-async/src/main
|
||||
find samples/client/petstore/spring-cloud-async -maxdepth 1 -type f ! -name "README.md" -exec rm {} +
|
||||
java $JAVA_OPTS -jar $executable $ags
|
||||
|
||||
cd samples/client/petstore/swift5/promisekit
|
||||
|
||||
if type "xcodegen" > /dev/null 2>&1; then
|
||||
xcodegen generate
|
||||
|
||||
if type "carthage" > /dev/null 2>&1; then
|
||||
carthage update --no-use-binaries --platform ios --cache-builds
|
||||
fi
|
||||
fi
|
||||
|
||||
if type "swiftlint" > /dev/null 2>&1; then
|
||||
swiftlint autocorrect --quiet
|
||||
fi
|
||||
@@ -30,3 +30,13 @@ export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
|
||||
ags="generate -t modules/openapi-generator/src/main/resources/swift4 -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g swift4 -c ./bin/swift4-petstore-objcCompatible.json -o samples/client/petstore/swift4/objcCompatible $@"
|
||||
|
||||
java $JAVA_OPTS -jar $executable $ags
|
||||
|
||||
if type "xcodegen" > /dev/null 2>&1; then
|
||||
cd samples/client/petstore/swift4/objcCompatible
|
||||
xcodegen generate
|
||||
fi
|
||||
|
||||
if type "swiftlint" > /dev/null 2>&1; then
|
||||
cd samples/client/petstore/swift4/objcCompatible
|
||||
swiftlint autocorrect
|
||||
fi
|
||||
@@ -30,3 +30,13 @@ export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
|
||||
ags="generate -t modules/openapi-generator/src/main/resources/swift4 -i modules/openapi-generator/src/test/resources/2_0/swift/petstore-with-fake-endpoints-models-for-testing.yaml -g swift4 -c ./bin/swift4-petstore-promisekit.json -o samples/client/petstore/swift4/promisekit --generate-alias-as-model $@"
|
||||
|
||||
java $JAVA_OPTS -jar $executable $ags
|
||||
|
||||
if type "xcodegen" > /dev/null 2>&1; then
|
||||
cd samples/client/petstore/swift4/promisekit
|
||||
xcodegen generate
|
||||
fi
|
||||
|
||||
if type "swiftlint" > /dev/null 2>&1; then
|
||||
cd samples/client/petstore/swift4/promisekit
|
||||
swiftlint autocorrect
|
||||
fi
|
||||
@@ -30,3 +30,13 @@ export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
|
||||
ags="generate -t modules/openapi-generator/src/main/resources/swift4 -i modules/openapi-generator/src/test/resources/2_0/swift/petstore-with-fake-endpoints-models-for-testing.yaml -g swift4 -c ./bin/swift4-petstore-rxswift.json -o samples/client/petstore/swift4/rxswift --generate-alias-as-model $@"
|
||||
|
||||
java $JAVA_OPTS -jar $executable $ags
|
||||
|
||||
if type "xcodegen" > /dev/null 2>&1; then
|
||||
cd samples/client/petstore/swift4/rxswift
|
||||
xcodegen generate
|
||||
fi
|
||||
|
||||
if type "swiftlint" > /dev/null 2>&1; then
|
||||
cd samples/client/petstore/swift4/rxswift
|
||||
swiftlint autocorrect
|
||||
fi
|
||||
@@ -30,3 +30,13 @@ export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
|
||||
ags="generate -t modules/openapi-generator/src/main/resources/swift4 -i modules/openapi-generator/src/test/resources/2_0/swift/petstore-with-fake-endpoints-models-for-testing.yaml -g swift4 -c ./bin/swift4-petstore-unwrapRequired.json -o samples/client/petstore/swift4/unwrapRequired --generate-alias-as-model $@"
|
||||
|
||||
java $JAVA_OPTS -jar $executable $ags
|
||||
|
||||
if type "xcodegen" > /dev/null 2>&1; then
|
||||
cd samples/client/petstore/swift4/unwrapRequired
|
||||
xcodegen generate
|
||||
fi
|
||||
|
||||
if type "swiftlint" > /dev/null 2>&1; then
|
||||
cd samples/client/petstore/swift4/unwrapRequired
|
||||
swiftlint autocorrect
|
||||
fi
|
||||
@@ -30,3 +30,13 @@ export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
|
||||
ags="generate -t modules/openapi-generator/src/main/resources/swift4 -i modules/openapi-generator/src/test/resources/2_0/swift/petstore-with-fake-endpoints-models-for-testing.yaml -g swift4 -c ./bin/swift4-petstore.json -o samples/client/petstore/swift4/default --generate-alias-as-model $@"
|
||||
|
||||
java $JAVA_OPTS -jar $executable $ags
|
||||
|
||||
if type "xcodegen" > /dev/null 2>&1; then
|
||||
cd samples/client/petstore/swift4/default
|
||||
xcodegen generate
|
||||
fi
|
||||
|
||||
if type "swiftlint" > /dev/null 2>&1; then
|
||||
cd samples/client/petstore/swift4/default
|
||||
swiftlint autocorrect
|
||||
fi
|
||||
|
||||
@@ -30,3 +30,13 @@ export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
|
||||
ags="generate -t modules/openapi-generator/src/main/resources/swift4 -i modules/openapi-generator/src/test/resources/2_0/swift4Test.json -g swift4 -c ./bin/swift4-test.json -o samples/client/test/swift4/default $@"
|
||||
|
||||
java $JAVA_OPTS -jar $executable $ags
|
||||
|
||||
if type "xcodegen" > /dev/null 2>&1; then
|
||||
cd samples/client/test/swift4/default
|
||||
xcodegen generate
|
||||
fi
|
||||
|
||||
if type "swiftlint" > /dev/null 2>&1; then
|
||||
cd samples/client/test/swift4/default
|
||||
swiftlint autocorrect
|
||||
fi
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
./bin/swift5-petstore-all.sh
|
||||
./bin/swift5-test.sh
|
||||
@@ -1,6 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
./bin/swift5-petstore.sh
|
||||
./bin/swift5-petstore-promisekit.sh
|
||||
./bin/swift5-petstore-rxswift.sh
|
||||
./bin/swift5-petstore-unwrapRequired.sh
|
||||
@@ -1,8 +0,0 @@
|
||||
{
|
||||
"podSummary": "PetstoreClient",
|
||||
"podHomepage": "https://github.com/openapitools/openapi-generator",
|
||||
"podAuthors": "",
|
||||
"projectName": "PetstoreClient",
|
||||
"onlyPlainInterface": false,
|
||||
"responseAs": "PromiseKit"
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
{
|
||||
"podSummary": "PetstoreClient",
|
||||
"podHomepage": "https://github.com/openapitools/openapi-generator",
|
||||
"podAuthors": "",
|
||||
"projectName": "PetstoreClient",
|
||||
"onlyPlainInterface": false,
|
||||
"responseAs": "RxSwift"
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
{
|
||||
"podSummary": "PetstoreClient",
|
||||
"podHomepage": "https://github.com/openapitools/openapi-generator",
|
||||
"podAuthors": "",
|
||||
"projectName": "PetstoreClient",
|
||||
"unwrapRequired": true
|
||||
}
|
||||
@@ -1,46 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
SCRIPT="$0"
|
||||
echo "# START SCRIPT: $SCRIPT"
|
||||
|
||||
while [ -h "$SCRIPT" ] ; do
|
||||
ls=`ls -ld "$SCRIPT"`
|
||||
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||
if expr "$link" : '/.*' > /dev/null; then
|
||||
SCRIPT="$link"
|
||||
else
|
||||
SCRIPT=`dirname "$SCRIPT"`/"$link"
|
||||
fi
|
||||
done
|
||||
|
||||
if [ ! -d "${APP_DIR}" ]; then
|
||||
APP_DIR=`dirname "$SCRIPT"`/..
|
||||
APP_DIR=`cd "${APP_DIR}"; pwd`
|
||||
fi
|
||||
|
||||
executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar"
|
||||
|
||||
if [ ! -f "$executable" ]
|
||||
then
|
||||
mvn -B clean package
|
||||
fi
|
||||
|
||||
# if you've executed sbt assembly previously it will use that instead.
|
||||
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
|
||||
ags="generate -t modules/openapi-generator/src/main/resources/swift5 -i modules/openapi-generator/src/test/resources/2_0/swift/petstore-with-fake-endpoints-models-for-testing.yaml -g swift5 -c ./bin/swift5-petstore-unwrapRequired.json -o samples/client/petstore/swift5/unwrapRequired --generate-alias-as-model $@"
|
||||
|
||||
java $JAVA_OPTS -jar $executable $ags
|
||||
|
||||
cd samples/client/petstore/swift5/unwrapRequired
|
||||
|
||||
if type "xcodegen" > /dev/null 2>&1; then
|
||||
xcodegen generate
|
||||
|
||||
if type "carthage" > /dev/null 2>&1; then
|
||||
carthage update --no-use-binaries --platform ios --cache-builds
|
||||
fi
|
||||
fi
|
||||
|
||||
if type "swiftlint" > /dev/null 2>&1; then
|
||||
swiftlint autocorrect --quiet
|
||||
fi
|
||||
@@ -1,6 +0,0 @@
|
||||
{
|
||||
"podSummary": "PetstoreClient",
|
||||
"podHomepage": "https://github.com/openapitools/openapi-generator",
|
||||
"podAuthors": "",
|
||||
"projectName": "PetstoreClient"
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
{
|
||||
"podSummary": "TestClient",
|
||||
"podHomepage": "https://github.com/openapitools/openapi-generator",
|
||||
"podAuthors": "",
|
||||
"projectName": "TestClient"
|
||||
}
|
||||
@@ -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
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
{
|
||||
"npmName": "@openapitools/typescript-angular-petstore",
|
||||
"npmVersion": "1.0.0",
|
||||
"npmRepository" : "https://skimdb.npmjs.com/registry",
|
||||
"snapshot" : false
|
||||
"stringEnums": true,
|
||||
"npmRepository": "https://skimdb.npmjs.com/registry",
|
||||
"snapshot": false
|
||||
}
|
||||
|
||||
@@ -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
|
||||
@@ -3,5 +3,6 @@
|
||||
./bin/typescript-axios-petstore-target-es6.sh
|
||||
./bin/typescript-axios-petstore-with-npm-version.sh
|
||||
./bin/typescript-axios-petstore-with-npm-version-and-separate-models-and-api.sh
|
||||
./bin/typescript-axios-petstore-with-complex-headers.sh
|
||||
./bin/typescript-axios-petstore-interfaces.sh
|
||||
./bin/typescript-axios-petstore.sh
|
||||
|
||||
32
bin/typescript-axios-petstore-with-complex-headers.sh
Executable file
32
bin/typescript-axios-petstore-with-complex-headers.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} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
|
||||
ags="generate -i modules/openapi-generator/src/test/resources/3_0/petstore-with-complex-headers.yaml -g typescript-axios -o samples/client/petstore/typescript-axios/builds/with-complex-headers $@"
|
||||
|
||||
java $JAVA_OPTS -jar $executable $ags
|
||||
@@ -4,3 +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-prefix-parameter-interfaces.sh
|
||||
./bin/typescript-fetch-petstore-typescript-three-plus.sh
|
||||
|
||||
4
bin/typescript-fetch-petstore-multiple-parameters.json
Normal file
4
bin/typescript-fetch-petstore-multiple-parameters.json
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"snapshot" : false,
|
||||
"useSingleRequestParameter": false
|
||||
}
|
||||
34
bin/typescript-fetch-petstore-multiple-parameters.sh
Executable file
34
bin/typescript-fetch-petstore-multiple-parameters.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-multiple-parameters.json -o samples/client/petstore/typescript-fetch/builds/multiple-parameters $@"
|
||||
|
||||
java $JAVA_OPTS -jar $executable $ags
|
||||
cp CI/samples.ci/client/petstore/typescript-fetch/builds/multiple-parameters/pom.xml samples/client/petstore/typescript-fetch/builds/multiple-parameters/pom.xml
|
||||
cp CI/samples.ci/client/petstore/typescript-fetch/tests/default/pom.xml samples/client/petstore/typescript-fetch/tests/default/pom.xml
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"npmName": "@openapitools/typescript-fetch-petstore",
|
||||
"npmVersion": "1.0.0",
|
||||
"npmRepository" : "https://skimdb.npmjs.com/registry",
|
||||
"snapshot" : false,
|
||||
"prefixParameterInterfaces": true
|
||||
}
|
||||
@@ -27,20 +27,8 @@ fi
|
||||
|
||||
# if you've executed sbt assembly previously it will use that instead.
|
||||
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
|
||||
ags="generate -t modules/openapi-generator/src/main/resources/swift5 -i modules/openapi-generator/src/test/resources/2_0/swift4Test.json -g swift5 -c ./bin/swift5-test.json -o samples/client/test/swift5default $@"
|
||||
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
|
||||
|
||||
cd samples/client/test/swift5default
|
||||
|
||||
if type "xcodegen" > /dev/null 2>&1; then
|
||||
xcodegen generate
|
||||
|
||||
if type "carthage" > /dev/null 2>&1; then
|
||||
carthage update --no-use-binaries --platform ios --cache-builds
|
||||
fi
|
||||
fi
|
||||
|
||||
if type "swiftlint" > /dev/null 2>&1; then
|
||||
swiftlint autocorrect --quiet
|
||||
fi
|
||||
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,8 +12,9 @@ sleep 5
|
||||
# LIST OF SCRIPTS:
|
||||
declare -a scripts=(
|
||||
# SAMPLES
|
||||
"./bin/openapi3/ruby-client-petstore.sh"
|
||||
"./bin/ruby-client-petstore.sh"
|
||||
"./bin/openapi3/ruby-client-petstore.sh"
|
||||
"./bin/openapi3/ruby-client-faraday-petstore.sh"
|
||||
"./bin/java-petstore-all.sh"
|
||||
"./bin/java-jaxrs-petstore-server-all.sh"
|
||||
"./bin/java-msf4j-petstore-server.sh"
|
||||
@@ -57,11 +58,14 @@ declare -a scripts=(
|
||||
"./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/"
|
||||
|
||||
@@ -2,6 +2,7 @@ call .\bin\windows\java-petstore-jersey1.bat
|
||||
call .\bin\windows\java-petstore-jersey2.bat
|
||||
call .\bin\windows\java-petstore-feign.bat
|
||||
call .\bin\windows\java-petstore-feign-10x.bat
|
||||
call .\bin\windows\java-petstore-native.bat
|
||||
call .\bin\windows\java-petstore-okhttp-gson.bat
|
||||
call .\bin\windows\java-petstore-okhttp-gson-parcelable.bat
|
||||
call .\bin\windows\java-petstore-retrofit.bat
|
||||
|
||||
10
bin/windows/java-petstore-native.bat
Normal file
10
bin/windows/java-petstore-native.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
|
||||
set ags=generate -t modules\openapi-generator\src\main\resources\Java\libraries\native -i modules\openapi-generator\src\test\resources\2_0\petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin\java-petstore-native.json -o samples\client\petstore\java\native --additional-properties hideGenerationTimestamp=true
|
||||
|
||||
java %JAVA_OPTS% -jar %executable% %ags%
|
||||
10
bin/windows/ocaml-petstore.bat
Executable file
10
bin/windows/ocaml-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\2_0\petstore.yaml -g ocaml -o samples\client\petstore\ocaml
|
||||
|
||||
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%
|
||||
10
bin/windows/python-experimental-petstore.bat
Normal file
10
bin/windows/python-experimental-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
|
||||
set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore-with-fake-endpoints-models-for-testing.yaml -g python-experimental -o samples\client\petstore\python-experimental -DpackageName=petstore_api
|
||||
|
||||
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%
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
call bin\windows\typescript-axios-petstore.bat
|
||||
call bin\windows\typescript-axios-petstore-target-es6.bat
|
||||
call bin\windows\typescript-axios-petstore-with-complex-headers.bat
|
||||
call bin\windows\typescript-axios-petstore-with-npm-version.bat
|
||||
call bin\windows\typescript-axios-petstore-interfaces.bat
|
||||
call bin\windows\typescript-axios-petstore-with-npm-version-and-separate-models-and-api.bat
|
||||
12
bin/windows/typescript-axios-petstore-with-complex-headers.bat
Executable file
12
bin/windows/typescript-axios-petstore-with-complex-headers.bat
Executable file
@@ -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\3_0\petstore-with-complex-headers.yaml -g typescript-axios -o samples\client\petstore\typescript-axios\builds\with-complex-headers
|
||||
|
||||
java %JAVA_OPTS% -jar %executable% %ags%
|
||||
@@ -4,3 +4,6 @@ call bin\windows\typescript-fetch-petstore.bat
|
||||
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 -c bin\typescript-fetch-petstore-multiple-parameters.json -o samples\client\petstore\typescript-fetch\builds\multiple-parameters
|
||||
|
||||
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 -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%
|
||||
@@ -19,7 +19,7 @@ if [[ -f "${codegen}" && -n "$(java ${JAVA_OPTS} -jar "${codegen}" completion |
|
||||
command=$1
|
||||
shift
|
||||
exec java ${JAVA_OPTS} -jar "${codegen}" "${command}" "$@"
|
||||
elif [[ -n "$(echo commands | tr ',' '\n' | grep "^$1\$" )" ]]; then
|
||||
elif [[ -n "$(echo $commands | tr ',' '\n' | grep "^$1\$" )" ]]; then
|
||||
# If CLI jar does not exist, and $1 is a known CLI command, build the CLI jar and run that command.
|
||||
if [[ ! -f "${codegen}" ]]; then
|
||||
(cd "${GEN_DIR}" && exec mvn -am -pl "modules/openapi-generator-cli" -Duser.home=$(dirname $MAVEN_CONFIG) package)
|
||||
|
||||
@@ -62,3 +62,26 @@ The steps are shown here for a specific version of the generator, but apply the
|
||||
Listening for transport dt_socket at address: 5005
|
||||
```
|
||||
* Set breakpoints in code, and then attach your remote debugger from your IDE (see above). The generator will automatically unblock once the remote debugger is attached. You can now step through the code.
|
||||
|
||||
## Logs
|
||||
|
||||
You can try to enable debugging log with `-Dlog.level=debug` option to the `JAVA_OPTS` environment variable to see more information:
|
||||
|
||||
```bash
|
||||
export JAVA_OPTS="${JAVA_OPTS} -Dlog.level=debug"
|
||||
```
|
||||
|
||||
Set the option then DEBUG logs are printed out:
|
||||
|
||||
```bash
|
||||
openapi-generator generate -g go ...
|
||||
|
||||
...
|
||||
...
|
||||
[main] DEBUG o.o.codegen.DefaultCodegen - debugging fromProperty for files : class Schema {
|
||||
type: null
|
||||
format: null
|
||||
$ref: #/components/schemas/File
|
||||
...
|
||||
...
|
||||
```
|
||||
|
||||
@@ -5,131 +5,134 @@ 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)
|
||||
- [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)
|
||||
- [swift5](generators/swift5.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)
|
||||
* [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-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-giraffe-server](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)
|
||||
* [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
|
||||
* [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)
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -47,7 +47,6 @@ The following generators are available:
|
||||
- [swift2-deprecated](swift2-deprecated.md)
|
||||
- [swift3-deprecated](swift3-deprecated.md)
|
||||
- [swift4](swift4.md)
|
||||
- [swift5](swift5.md)
|
||||
- [typescript-angular](typescript-angular.md)
|
||||
- [typescript-angularjs](typescript-angularjs.md)
|
||||
- [typescript-aurelia](typescript-aurelia.md)
|
||||
|
||||
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|
|
||||
@@ -12,5 +12,5 @@ sidebar_label: cpp-qt5-client
|
||||
|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false|
|
||||
|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false|
|
||||
|cppNamespace|C++ namespace (convention: name::space::for::api).| |OpenAPI|
|
||||
|cppNamespace|C++ namespace (convention: name::space::for::api).| |OpenAPI|
|
||||
|modelNamePrefix|Prefix that will be prepended to all model names.| |OAI|
|
||||
|optionalProjectFile|Generate client.pri.| |true|
|
||||
|
||||
@@ -12,4 +12,4 @@ sidebar_label: cpp-qt5-qhttpengine-server
|
||||
|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false|
|
||||
|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false|
|
||||
|cppNamespace|C++ namespace (convention: name::space::for::api).| |OpenAPI|
|
||||
|cppNamespace|C++ namespace (convention: name::space::for::api).| |OpenAPI|
|
||||
|modelNamePrefix|Prefix that will be prepended to all model names.| |OAI|
|
||||
|
||||
@@ -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|
|
||||
|
||||
@@ -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 |
|
||||
| ------ | ----------- | ------ | ------- |
|
||||
@@ -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><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|
|
||||
|
||||
@@ -14,6 +14,7 @@ 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|
|
||||
|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|
|
||||
|
||||
@@ -14,6 +14,7 @@ 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|
|
||||
|title|server title name or client service name| |OpenAPI Kotlin Spring|
|
||||
|basePackage|base package (invokerPackage) for generated code| |org.openapitools|
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user