forked from loafle/openapi-generator-original
Compare commits
357 Commits
v4.2.0
...
swift_vapo
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e09f1c9b37 | ||
|
|
55c6c0385b | ||
|
|
fe8775a5a5 | ||
|
|
50f7e14a99 | ||
|
|
6a48dd7cd6 | ||
|
|
8a94a3a7d5 | ||
|
|
4767259df4 | ||
|
|
65a6d94842 | ||
|
|
0344f14e9a | ||
|
|
bf24d646c5 | ||
|
|
fb6daa89b0 | ||
|
|
cf67725e4f | ||
|
|
b22fde6caa | ||
|
|
b22f7f033f | ||
|
|
b680d7cd7f | ||
|
|
78bf3adc4a | ||
|
|
4627c7d534 | ||
|
|
5e5536367b | ||
|
|
20c7400d56 | ||
|
|
cbc12543a9 | ||
|
|
75508f5ce0 | ||
|
|
6dcdf5c311 | ||
|
|
2d24d42e65 | ||
|
|
a2532cc3c5 | ||
|
|
5ec34b9b59 | ||
|
|
c27a6ed2bf | ||
|
|
e23f2aa6aa | ||
|
|
d51354783f | ||
|
|
ec1e9a4c9b | ||
|
|
9b893ef3c1 | ||
|
|
38185d8558 | ||
|
|
79d11d7129 | ||
|
|
c2ee4aefe1 | ||
|
|
25036e48d5 | ||
|
|
965efdd965 | ||
|
|
6dc3216f6d | ||
|
|
7073859aa8 | ||
|
|
759ab1390a | ||
|
|
60b1855ec1 | ||
|
|
41f3cba85f | ||
|
|
8e1bb3ddff | ||
|
|
e675360b9e | ||
|
|
7c31b7f206 | ||
|
|
1cb99e3497 | ||
|
|
5cc5fbe76a | ||
|
|
39ba6bbfb1 | ||
|
|
d643b2706a | ||
|
|
3a2439c8e6 | ||
|
|
85f6ed5338 | ||
|
|
178a3e24bd | ||
|
|
89e963c072 | ||
|
|
ac4ead9e78 | ||
|
|
f37d26cc73 | ||
|
|
43a5411436 | ||
|
|
0ebbfbc26a | ||
|
|
85f43a3000 | ||
|
|
da8500db95 | ||
|
|
1a5ba8736d | ||
|
|
3100f8c4e4 | ||
|
|
57d248dd3d | ||
|
|
54cfab84b6 | ||
|
|
90cbf71134 | ||
|
|
adf9c12f73 | ||
|
|
ca6fb2c4f2 | ||
|
|
24155b31e9 | ||
|
|
69b8831cbe | ||
|
|
376e419d0b | ||
|
|
daec02b8c5 | ||
|
|
9cab534034 | ||
|
|
d9c3af54e6 | ||
|
|
ad4b9c711b | ||
|
|
a8bc3360fd | ||
|
|
4b01943b06 | ||
|
|
0c92b0c4a4 | ||
|
|
2949b53820 | ||
|
|
a95e3e3684 | ||
|
|
e90fa5c4df | ||
|
|
c0994c479d | ||
|
|
ca4f718748 | ||
|
|
04ac754d3e | ||
|
|
3959530465 | ||
|
|
1084cd38a1 | ||
|
|
af783a8c54 | ||
|
|
27bf120d87 | ||
|
|
966eab4cf3 | ||
|
|
5740348902 | ||
|
|
3eaafce569 | ||
|
|
ad6c832162 | ||
|
|
2f5a229fb9 | ||
|
|
3146e80c61 | ||
|
|
56f298a0b4 | ||
|
|
9feaae8572 | ||
|
|
b6fd1b0ade | ||
|
|
dc91112031 | ||
|
|
265ad2297b | ||
|
|
87ee6c8bfb | ||
|
|
77b28f7963 | ||
|
|
5ba67c8c95 | ||
|
|
366bfd2a67 | ||
|
|
10b60e27b1 | ||
|
|
a18494bd8e | ||
|
|
b62d68ac5a | ||
|
|
e6e919fe98 | ||
|
|
c6ec794293 | ||
|
|
fb0479a213 | ||
|
|
fee79246d0 | ||
|
|
4ee610c857 | ||
|
|
375f24f605 | ||
|
|
4ac5ba13ca | ||
|
|
52d3844ff4 | ||
|
|
b73dbee8d1 | ||
|
|
bb93a3b1e2 | ||
|
|
0ae1ea68fb | ||
|
|
88efb28506 | ||
|
|
617904c876 | ||
|
|
83cb4206cd | ||
|
|
7ea4dcd703 | ||
|
|
62e5d1f43b | ||
|
|
399e73e5d8 | ||
|
|
1f8383a973 | ||
|
|
67de4c4d8d | ||
|
|
45eb87c16a | ||
|
|
8d37641ae1 | ||
|
|
c98644a672 | ||
|
|
49022d7b66 | ||
|
|
a9cc96b50f | ||
|
|
7bd378c026 | ||
|
|
adbed055dd | ||
|
|
bb4af91bbd | ||
|
|
789f1a06f0 | ||
|
|
02f5cb1a65 | ||
|
|
0ffb99a48e | ||
|
|
3754679751 | ||
|
|
db2c8e843e | ||
|
|
1e995cacdc | ||
|
|
f784667dc7 | ||
|
|
6ed2b0de57 | ||
|
|
7e75cea6f1 | ||
|
|
2277934d5e | ||
|
|
fe9121967f | ||
|
|
21ad2869b1 | ||
|
|
9754ef4f88 | ||
|
|
b19d241be7 | ||
|
|
a695748805 | ||
|
|
00abb4780c | ||
|
|
60ba6194c1 | ||
|
|
525174f4d6 | ||
|
|
f22f6a40a1 | ||
|
|
ca9313881a | ||
|
|
a9494ac1a3 | ||
|
|
307f37c7f9 | ||
|
|
42f685f59c | ||
|
|
5116163bfb | ||
|
|
d8c469c19d | ||
|
|
68cb98e9f6 | ||
|
|
ebf9ba023a | ||
|
|
41bb41c87c | ||
|
|
d405158d3f | ||
|
|
acc04c5609 | ||
|
|
cd6ec0dcf5 | ||
|
|
85affe83cb | ||
|
|
0c0050578f | ||
|
|
6b99aed93f | ||
|
|
da44e458e0 | ||
|
|
775cf655f9 | ||
|
|
467fb74a21 | ||
|
|
4dc07cb9c5 | ||
|
|
8d8eea4fe9 | ||
|
|
f472020412 | ||
|
|
d0dfe3e4a0 | ||
|
|
cb31089664 | ||
|
|
acf081bc02 | ||
|
|
dce392336d | ||
|
|
5453edf1b6 | ||
|
|
a3c3012707 | ||
|
|
c882338ef1 | ||
|
|
e774db05b6 | ||
|
|
06ba8317f9 | ||
|
|
e0d6f7df1f | ||
|
|
01e84d79a0 | ||
|
|
7eeeab0825 | ||
|
|
cb2df9e848 | ||
|
|
2a592b5d01 | ||
|
|
dd1a624ba3 | ||
|
|
ba3af50384 | ||
|
|
663ee66068 | ||
|
|
11c7007429 | ||
|
|
f9662e0eff | ||
|
|
c0e11ec01b | ||
|
|
030a7a848d | ||
|
|
a9bbd9334d | ||
|
|
f6b4e18ac4 | ||
|
|
18b950cdc3 | ||
|
|
52554af454 | ||
|
|
6f86830e0c | ||
|
|
af3d862c5b | ||
|
|
8cc7befbf3 | ||
|
|
df682aba99 | ||
|
|
df7b9b53f1 | ||
|
|
538fdeafb5 | ||
|
|
a839203e0d | ||
|
|
3626aaf8fa | ||
|
|
e3dbd82e79 | ||
|
|
bee2671243 | ||
|
|
e2df6c32e0 | ||
|
|
fac83ce760 | ||
|
|
d13d05955b | ||
|
|
2dc0220874 | ||
|
|
96c1bda608 | ||
|
|
e09417d25c | ||
|
|
8991168518 | ||
|
|
cd6986d9be | ||
|
|
c104821d6e | ||
|
|
37a8b56a2b | ||
|
|
6bf5741fd1 | ||
|
|
2f26812982 | ||
|
|
2d22ae90fc | ||
|
|
498c9b8a47 | ||
|
|
006ec182ef | ||
|
|
a9a131ac51 | ||
|
|
d5c7c9c9b7 | ||
|
|
d0e838ee02 | ||
|
|
40799937fb | ||
|
|
eff94da9c9 | ||
|
|
dc4296819a | ||
|
|
ab98833f7d | ||
|
|
d9bde12ebb | ||
|
|
3084fe5937 | ||
|
|
bfb82f1a91 | ||
|
|
8cf34ca80f | ||
|
|
6a828d55df | ||
|
|
d70adae0e3 | ||
|
|
dd6257917d | ||
|
|
2f01053680 | ||
|
|
56c38904fb | ||
|
|
87a9fa3808 | ||
|
|
a1fc114efa | ||
|
|
70954cabde | ||
|
|
5c275bccd2 | ||
|
|
de69eac316 | ||
|
|
c89d21a903 | ||
|
|
80064d8411 | ||
|
|
51aeb6c833 | ||
|
|
f434b5fa13 | ||
|
|
b0d6110686 | ||
|
|
52384badd2 | ||
|
|
1de71a9e16 | ||
|
|
47473401ec | ||
|
|
3adfdfafea | ||
|
|
db77e070d1 | ||
|
|
eebad5c9aa | ||
|
|
96bbab98a4 | ||
|
|
e4364b612f | ||
|
|
2838db2052 | ||
|
|
23479b30e4 | ||
|
|
1ccf4b9cb3 | ||
|
|
8ff1aca4f8 | ||
|
|
5238597f95 | ||
|
|
6e2e542f83 | ||
|
|
518c33a209 | ||
|
|
964260101b | ||
|
|
8ca1788a75 | ||
|
|
244c6e358c | ||
|
|
2daa89a326 | ||
|
|
6af9131d2f | ||
|
|
c649203270 | ||
|
|
83a4616ba7 | ||
|
|
389be8180a | ||
|
|
40d7b58666 | ||
|
|
8766531c56 | ||
|
|
47ac49ff99 | ||
|
|
a0d68baa24 | ||
|
|
10f17877f1 | ||
|
|
bf6db1c2d1 | ||
|
|
2f428e7763 | ||
|
|
78d7ffbce7 | ||
|
|
d175673077 | ||
|
|
3cd0e13a46 | ||
|
|
60958b78d9 | ||
|
|
5181ddcbb0 | ||
|
|
a1a9e70fe4 | ||
|
|
2b36383308 | ||
|
|
f07b3e0521 | ||
|
|
2683dd4510 | ||
|
|
b43785a25c | ||
|
|
6c714ddca9 | ||
|
|
d9e93ce6ca | ||
|
|
fe0b3ce24d | ||
|
|
287af4aba3 | ||
|
|
4a91e62fb7 | ||
|
|
bb4500eaf6 | ||
|
|
64c1547c5d | ||
|
|
bdd34a34e9 | ||
|
|
fa1e003a3b | ||
|
|
440e3f301d | ||
|
|
34c715e4ce | ||
|
|
4494bf1e9a | ||
|
|
c663124ce3 | ||
|
|
99204ecd66 | ||
|
|
21a291f569 | ||
|
|
9ceabc760c | ||
|
|
94b58634a7 | ||
|
|
11bcb661a1 | ||
|
|
7bfc53b3bb | ||
|
|
84d3562a0f | ||
|
|
0aa1b7c7a8 | ||
|
|
dbbe2b8b2d | ||
|
|
7e6e87a857 | ||
|
|
139894ffbe | ||
|
|
d0b2465b89 | ||
|
|
3e87a5fbaf | ||
|
|
357f6caed5 | ||
|
|
db729be7df | ||
|
|
777e39007a | ||
|
|
de162f7f34 | ||
|
|
5b4441892f | ||
|
|
79d7e61b87 | ||
|
|
05e954c8aa | ||
|
|
7cf027fbf5 | ||
|
|
f9af3c2752 | ||
|
|
b0b0e2b102 | ||
|
|
7e7fb16e12 | ||
|
|
e472d02669 | ||
|
|
048fe29226 | ||
|
|
f0bcaaf45d | ||
|
|
9a1ff9bf05 | ||
|
|
649eab2868 | ||
|
|
9bfea4b7e5 | ||
|
|
c25a02f77f | ||
|
|
d635ac3973 | ||
|
|
55737c236c | ||
|
|
c4f0b09459 | ||
|
|
16ad66759b | ||
|
|
1edbe956e3 | ||
|
|
d16352a7b3 | ||
|
|
e3bfa282e5 | ||
|
|
b4c72427fe | ||
|
|
2ee2319552 | ||
|
|
b536119162 | ||
|
|
61d7d22b24 | ||
|
|
f352fa6fb5 | ||
|
|
10627ed5cc | ||
|
|
68dbf20d7e | ||
|
|
de9f56969d | ||
|
|
3f72f8da50 | ||
|
|
f77b5da0f0 | ||
|
|
ea600989f7 | ||
|
|
fe3b59d3c5 | ||
|
|
a9854ce71e | ||
|
|
39bc13d244 | ||
|
|
8882d9ab3f | ||
|
|
931908c77c | ||
|
|
a9ea8636e5 | ||
|
|
cf29908ff2 | ||
|
|
cd11cc2615 | ||
|
|
47e2c0d027 | ||
|
|
c69a5a69f9 |
30
.github/CODEOWNERS
vendored
Normal file
30
.github/CODEOWNERS
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
## Core team
|
||||
modules/openapi-generator/src/main/java/org/openapitools/codegen/*.java @OpenAPITools/generator-core-team
|
||||
modules/openapi-generator/src/main/java/org/openapitools/codegen/auth/*.java @OpenAPITools/generator-core-team
|
||||
modules/openapi-generator/src/main/java/org/openapitools/codegen/config/*.java @OpenAPITools/generator-core-team
|
||||
modules/openapi-generator/src/main/java/org/openapitools/codegen/examples/*.java @OpenAPITools/generator-core-team
|
||||
modules/openapi-generator/src/main/java/org/openapitools/codegen/ignore/**/*.java @OpenAPITools/generator-core-team
|
||||
modules/openapi-generator/src/main/java/org/openapitools/codegen/serializer/*.java @OpenAPITools/generator-core-team
|
||||
modules/openapi-generator/src/main/java/org/openapitools/codegen/templating/**/*.java @OpenAPITools/generator-core-team
|
||||
modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/**/*.java @OpenAPITools/generator-core-team
|
||||
modules/openapi-generator-core/**/* @OpenAPITools/generator-core-team
|
||||
|
||||
# No need for auto-generated subdirectories (reduces noise)
|
||||
docs/ @OpenAPITools/generator-core-team
|
||||
|
||||
## Individual interests
|
||||
.github/**/* @jimschubert
|
||||
scripts/**/* @jimschubert
|
||||
website/**/* @jimschubert
|
||||
bin/ci/**/* @jimschubert
|
||||
|
||||
## Bulid related
|
||||
CI/**/* @OpenAPITools/build
|
||||
.mvn/**/* @OpenAPITools/build
|
||||
bin/utils/**/* @OpenAPITools/build
|
||||
|
||||
## Module-specific
|
||||
modules/openapi-generator-cli/**/* @jimschubert
|
||||
modules/openapi-generator-gradle-plugin/**/* @jimschubert
|
||||
modules/openapi-generator-maven-plugin/**/* @jimschubert
|
||||
|
||||
2
.github/PULL_REQUEST_TEMPLATE.md
vendored
2
.github/PULL_REQUEST_TEMPLATE.md
vendored
@@ -6,5 +6,5 @@
|
||||
- [ ] Read the [contribution guidelines](https://github.com/openapitools/openapi-generator/blob/master/CONTRIBUTING.md).
|
||||
- [ ] If contributing template-only or documentation-only changes which will change sample output, [build the project](https://github.com/OpenAPITools/openapi-generator#14---build-projects) before.
|
||||
- [ ] Run the shell script(s) under `./bin/` (or Windows batch scripts under`.\bin\windows`) to update Petstore samples related to your fix. This is important, as CI jobs will verify _all_ generator outputs of your HEAD commit, and these must match the expectations made by your contribution. You only need to run `./bin/{LANG}-petstore.sh`, `./bin/openapi3/{LANG}-petstore.sh` if updating the code or mustache templates for a language (`{LANG}`) (e.g. php, ruby, python, etc).
|
||||
- [ ] File the PR against the [correct branch](https://github.com/OpenAPITools/openapi-generator/wiki/Git-Branches): `master`, `4.1.x`, `5.0.x`. Default: `master`.
|
||||
- [ ] File the PR against the [correct branch](https://github.com/OpenAPITools/openapi-generator/wiki/Git-Branches): `master`, `4.3.x`, `5.0.x`. Default: `master`.
|
||||
- [ ] Copy the [technical committee](https://github.com/openapitools/openapi-generator/#62---openapi-generator-technical-committee) to review the pull request if your PR is targeting a particular programming language.
|
||||
|
||||
2
.github/auto-labeler.yml
vendored
2
.github/auto-labeler.yml
vendored
@@ -247,7 +247,7 @@ labels:
|
||||
'Server: Java':
|
||||
- '\s*?\[java-.*?\]\s*?'
|
||||
- '\s*?-[gl] java-.*?\s*?'
|
||||
- '\s*?-[gl] jaxrx-.*?\s*?'
|
||||
- '\s*?-[gl] jaxrs-.*?\s*?'
|
||||
'Server: Kotlin':
|
||||
- '\s*?\[ktor]\s*?'
|
||||
- '\s*?\[kotlin-spring]\s*?'
|
||||
|
||||
@@ -62,7 +62,7 @@ before_install:
|
||||
- gem install bundler
|
||||
- npm install -g typescript
|
||||
- npm install -g npm
|
||||
- npm install -g elm@0.18.0-exp5
|
||||
#- npm install -g elm@0.18.0-exp5
|
||||
- npm config set registry http://registry.npmjs.org/
|
||||
# set python 3.6.3 as default
|
||||
- source ~/virtualenv/python3.6/bin/activate
|
||||
@@ -136,8 +136,10 @@ script:
|
||||
- mvn --quiet --batch-mode --show-version clean install
|
||||
- mvn --quiet --batch-mode --show-version verify -Psamples
|
||||
# test maven plugin
|
||||
- mvn clean compile -f modules/openapi-generator-maven-plugin/examples/java-client.xml
|
||||
- mvn clean compile -f modules/openapi-generator-maven-plugin/examples/multi-module/pom.xml
|
||||
- mvn --quiet clean compile -f modules/openapi-generator-maven-plugin/examples/java-client.xml
|
||||
- mvn --quiet clean compile -f modules/openapi-generator-maven-plugin/examples/multi-module/pom.xml
|
||||
- mvn --quiet clean compile -f modules/openapi-generator-maven-plugin/examples/kotlin.xml
|
||||
- mvn --quiet clean compile -f modules/openapi-generator-maven-plugin/examples/spring.xml
|
||||
# test gradle plugin
|
||||
- (cd modules/openapi-generator-gradle-plugin/samples/local-spec && ./gradlew buildGoSdk)
|
||||
- (cd modules/openapi-generator-gradle-plugin/samples/local-spec && ./gradlew openApiGenerate)
|
||||
|
||||
@@ -2,6 +2,17 @@ kind: pipeline
|
||||
name: default
|
||||
|
||||
steps:
|
||||
# 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
|
||||
- opam pin add ocaml-migrate-parsetree 1.3.1
|
||||
- eval $(opam env)
|
||||
- sudo chmod -R 777 .
|
||||
- dune build --build-dir=./_build
|
||||
# test haskell client
|
||||
- name: haskell-client-test
|
||||
image: haskell:8.6.5
|
||||
@@ -28,13 +39,3 @@ steps:
|
||||
- /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
|
||||
|
||||
@@ -1,55 +1,25 @@
|
||||
sudo: required
|
||||
language: objective-c
|
||||
osx_image: xcode8.1
|
||||
cache:
|
||||
directories:
|
||||
- $HOME/.m2
|
||||
- $HOME/.ivy2
|
||||
- $HOME/.gradle/caches/
|
||||
- $HOME/.gradle/wrapper/
|
||||
- $HOME/.stack
|
||||
- $HOME/samples/client/petstore/php/OpenAPIToolsClient-php/vendor
|
||||
- $HOME/samples/client/petstore/ruby/venodr/bundle
|
||||
- $HOME/samples/client/petstore/python/.venv/
|
||||
- $HOME/samples/client/petstore/typescript-node/npm/node_modules
|
||||
- $HOME/samples/client/petstore/typescript-node/npm/typings/
|
||||
- $HOME/samples/client/petstore/typescript-fetch/tests/default/node_modules
|
||||
- $HOME/samples/client/petstore/typescript-fetch/tests/default/typings
|
||||
- $HOME/samples/client/petstore/typescript-fetch/builds/default/node_modules
|
||||
- $HOME/samples/client/petstore/typescript-fetch/builds/default/typings
|
||||
- $HOME/samples/client/petstore/typescript-fetch/builds/es6-target/node_modules
|
||||
- $HOME/samples/client/petstore/typescript-fetch/builds/es6-target/typings
|
||||
- $HOME/samples/client/petstore/typescript-fetch/builds/with-npm-version/node_modules
|
||||
- $HOME/samples/client/petstore/typescript-fetch/npm/with-npm-version/typings
|
||||
- $HOME/samples/client/petstore/typescript-angularjs/node_modules
|
||||
- $HOME/samples/client/petstore/typescript-angularjs/typings
|
||||
- $HOME/.cocoapods/repos/master
|
||||
timeout: 1000
|
||||
|
||||
# comment out the host table change to use the public petstore server
|
||||
addons:
|
||||
hosts:
|
||||
- petstore.swagger.io
|
||||
|
||||
osx_image: xcode10.3
|
||||
before_install:
|
||||
- export SW=`pwd`
|
||||
- rvm list
|
||||
- rvm use 2.3.3
|
||||
#- rvm use 2.3.3
|
||||
- gem environment
|
||||
- gem install bundler -N --no-ri --no-rdoc
|
||||
- gem install cocoapods -v 1.2.1 -N --no-ri --no-rdoc
|
||||
- gem install xcpretty -N --no-ri --no-rdoc
|
||||
- gem install bundler -N
|
||||
- gem install cocoapods -v 1.2.1 -N
|
||||
- gem install xcpretty -N
|
||||
- pod --version
|
||||
# comment out below to avoid errors
|
||||
#- pod repo update
|
||||
- pod setup --silent > /dev/null
|
||||
- mkdir -p ~/.local/bin
|
||||
- export PATH=$HOME/.local/bin:$PATH
|
||||
# start local petstore server
|
||||
- git clone -b docker --single-branch https://github.com/wing328/swagger-samples
|
||||
- cd swagger-samples/java/java-jersey-jaxrs
|
||||
- sudo mvn jetty:run &
|
||||
- cd $SW
|
||||
#- pod setup --silent > /dev/null
|
||||
#- mkdir -p ~/.local/bin
|
||||
#- export PATH=$HOME/.local/bin:$PATH
|
||||
## start local petstore server
|
||||
#- git clone -b docker --single-branch https://github.com/wing328/swagger-samples
|
||||
#- cd swagger-samples/java/java-jersey-jaxrs
|
||||
#- sudo mvn jetty:run &
|
||||
#- cd $SW
|
||||
|
||||
# show host table to confirm petstore.swagger.io is mapped to localhost
|
||||
- cat /etc/hosts
|
||||
@@ -64,4 +34,4 @@ before_install:
|
||||
|
||||
script:
|
||||
# run integration tests defined in maven pom.xml
|
||||
- mvn -q --batch-mode verify -Psamples
|
||||
- mvn -q --batch-mode verify -Psamples.ios -Dmaven.javadoc.skip=true
|
||||
|
||||
79
CI/bitrise.yml
Normal file
79
CI/bitrise.yml
Normal file
@@ -0,0 +1,79 @@
|
||||
---
|
||||
format_version: '8'
|
||||
default_step_lib_source: https://github.com/bitrise-io/bitrise-steplib.git
|
||||
project_type: other
|
||||
trigger_map:
|
||||
- push_branch: "*"
|
||||
workflow: primary
|
||||
- pull_request_source_branch: "*"
|
||||
workflow: primary
|
||||
workflows:
|
||||
primary:
|
||||
steps:
|
||||
- git-clone@4.0.17: {}
|
||||
- brew-install@0.10.2:
|
||||
inputs:
|
||||
- packages: maven
|
||||
- script@1.1.5:
|
||||
title: Install Cocoapods
|
||||
inputs:
|
||||
- content: |
|
||||
#!/usr/bin/env bash
|
||||
|
||||
sudo gem install cocoapods
|
||||
- script@1.1.5:
|
||||
inputs:
|
||||
- content: |
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
mvn package
|
||||
title: Build openapi-generator
|
||||
- script@1.1.5:
|
||||
title: Update Swift4 samples
|
||||
inputs:
|
||||
- content: |
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
sh bin/swift4-all.sh
|
||||
- script@1.1.5:
|
||||
title: Run Swift4 tests
|
||||
inputs:
|
||||
- content: |
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
./samples/client/petstore/swift4/swift4_test_all.sh
|
||||
./samples/client/test/swift4/swift4_test_all.sh
|
||||
- script@1.1.5:
|
||||
title: Update Swift5 samples
|
||||
inputs:
|
||||
- content: |
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
sh bin/swift5-all.sh
|
||||
- script@1.1.5:
|
||||
title: Run Swift5 tests
|
||||
inputs:
|
||||
- content: |
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
./samples/client/petstore/swift5/swift5_test_all.sh
|
||||
./samples/client/test/swift5/swift5_test_all.sh
|
||||
- script@1.1.5:
|
||||
title: Run all bin scripts
|
||||
inputs:
|
||||
- content: |-
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
./bin/run-all-petstore
|
||||
@@ -102,7 +102,7 @@ ext {
|
||||
jersey_version = "2.6"
|
||||
commons_io_version=2.5
|
||||
commons_lang3_version=3.6
|
||||
junit_version = "4.12"
|
||||
junit_version = "4.13"
|
||||
threetenbp_version = "2.6.4"
|
||||
}
|
||||
|
||||
|
||||
@@ -128,8 +128,6 @@ public class PetApiTest {
|
||||
//empty
|
||||
}
|
||||
});
|
||||
// the API call should be executed asynchronously, so result should be empty at the moment
|
||||
assertTrue(result.isEmpty());
|
||||
|
||||
// wait for the asynchronous call to finish (at most 10 seconds)
|
||||
final int maxTry = 10;
|
||||
@@ -146,6 +144,14 @@ public class PetApiTest {
|
||||
}
|
||||
} while (result.isEmpty());
|
||||
assertPetMatches(pet, fetched);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testCreateAndGetPetAsyncInvalidID() throws Exception {
|
||||
Pet pet = createPet();
|
||||
api.addPet(pet);
|
||||
// to store returned Pet or error message/exception
|
||||
final Map<String, Object> result = new HashMap<String, Object>();
|
||||
|
||||
// test getting a nonexistent pet
|
||||
result.clear();
|
||||
@@ -172,8 +178,11 @@ public class PetApiTest {
|
||||
});
|
||||
|
||||
// wait for the asynchronous call to finish (at most 10 seconds)
|
||||
tryCount = 1;
|
||||
final int maxTry = 10;
|
||||
int tryCount = 1;
|
||||
Pet fetched = null;
|
||||
ApiException exception = null;
|
||||
|
||||
do {
|
||||
if (tryCount > maxTry) fail("have not got result of getPetByIdAsync after 10 seconds");
|
||||
Thread.sleep(1000);
|
||||
@@ -414,16 +423,16 @@ public class PetApiTest {
|
||||
assertEquals(expected.getId(), actual.getId());
|
||||
assertNotNull(actual.getCategory());
|
||||
assertEquals(expected.getCategory().getName(),
|
||||
actual.getCategory().getName());
|
||||
actual.getCategory().getName());
|
||||
}
|
||||
|
||||
/**
|
||||
* Assert that the given upload/download progress list satisfies the
|
||||
* following constraints:
|
||||
*
|
||||
* - List is not empty
|
||||
* - Byte count should be nondecreasing
|
||||
* - The last element, and only the last element, should have done=true
|
||||
* <p>
|
||||
* - List is not empty
|
||||
* - Byte count should be nondecreasing
|
||||
* - The last element, and only the last element, should have done=true
|
||||
*/
|
||||
private void assertValidProgress(List<Progress> progressList) {
|
||||
assertFalse(progressList.isEmpty());
|
||||
@@ -434,7 +443,7 @@ public class PetApiTest {
|
||||
if (prev != null) {
|
||||
if (prev.done || prev.bytes > progress.bytes) {
|
||||
fail("Progress list out of order at index " + index
|
||||
+ ": " + progressList);
|
||||
+ ": " + progressList);
|
||||
}
|
||||
}
|
||||
prev = progress;
|
||||
@@ -450,9 +459,9 @@ public class PetApiTest {
|
||||
|
||||
private final CountDownLatch latch;
|
||||
private final ConcurrentLinkedQueue<Progress> uploadProgress =
|
||||
new ConcurrentLinkedQueue<Progress>();
|
||||
new ConcurrentLinkedQueue<Progress>();
|
||||
private final ConcurrentLinkedQueue<Progress> downloadProgress =
|
||||
new ConcurrentLinkedQueue<Progress>();
|
||||
new ConcurrentLinkedQueue<Progress>();
|
||||
|
||||
private boolean done;
|
||||
private boolean success;
|
||||
|
||||
@@ -61,7 +61,7 @@ Code change should conform to the programming style guide of the respective lang
|
||||
- Go: https://github.com/golang/go/wiki/CodeReviewComments
|
||||
- ObjC: https://github.com/NYTimes/objective-c-style-guide
|
||||
- Perl: http://perldoc.perl.org/perlstyle.html
|
||||
- PHP: https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md
|
||||
- PHP: https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-12-extended-coding-style-guide.md
|
||||
- PowerShell: https://msdn.microsoft.com/en-us/library/dd878270(v=vs.85).aspx
|
||||
- Python: https://www.python.org/dev/peps/pep-0008/
|
||||
- R: https://google.github.io/styleguide/Rguide.xml
|
||||
@@ -101,5 +101,5 @@ To start the CI tests, you can run `mvn verify -Psamples` (assuming you've all t
|
||||
- Make sure test cases passed after the change (one way is to leverage https://travis-ci.org/ to run the CI tests)
|
||||
- File a PR with meaningful title, description and commit messages.
|
||||
- Recommended git settings
|
||||
- `git config --global core.autocrlf input` to tell Git convert CRLF to LF on commit but not the other way around
|
||||
- `git config core.autocrlf input` to tell Git convert CRLF to LF on commit but not the other way around
|
||||
- To close an issue (e.g. issue 1542) automatically after a PR is merged, use keywords "fix", "close", "resolve" in the PR description, e.g. `fix #1542`. (Ref: [closing issues using keywords](https://help.github.com/articles/closing-issues-using-keywords/))
|
||||
|
||||
@@ -27,6 +27,7 @@ RUN mvn -am -pl "modules/openapi-generator-cli" package
|
||||
|
||||
# This exists at the end of the file to benefit from cached layers when modifying docker-entrypoint.sh.
|
||||
COPY docker-entrypoint.sh /usr/local/bin/
|
||||
RUN ln -s /usr/local/bin/docker-entrypoint.sh /usr/local/bin/openapi-generator
|
||||
|
||||
ENTRYPOINT ["docker-entrypoint.sh"]
|
||||
|
||||
|
||||
95
README.md
95
README.md
@@ -2,17 +2,26 @@
|
||||
|
||||
<div align="center">
|
||||
|
||||
[Master](https://github.com/OpenAPITools/openapi-generator/tree/master) (`4.2.0-SNAPSHOT`): [](https://travis-ci.org/OpenAPITools/openapi-generator)
|
||||
[Master](https://github.com/OpenAPITools/openapi-generator/tree/master) (`4.2.3-SNAPSHOT`): [](https://travis-ci.org/OpenAPITools/openapi-generator)
|
||||
[](https://circleci.com/gh/OpenAPITools/openapi-generator)
|
||||
[](https://app.shippable.com/github/OpenAPITools/openapi-generator)
|
||||
[](https://ci.appveyor.com/project/WilliamCheng/openapi-generator-wh2wu)
|
||||
[](https://cloud.drone.io/OpenAPITools/openapi-generator)
|
||||
[](https://app.bitrise.io/app/4a2b10a819d12b67)
|
||||
|
||||
[`4.3.x`](https://github.com/OpenAPITools/openapi-generator/tree/4.3.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)
|
||||
[](https://app.bitrise.io/app/4a2b10a819d12b67)
|
||||
|
||||
[`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)
|
||||
[](https://app.bitrise.io/app/4a2b10a819d12b67)
|
||||
</div>
|
||||
|
||||
<div align="center">
|
||||
@@ -47,6 +56,8 @@ 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)
|
||||
[<img src="https://openapi-generator.tech/img/companies/docspring.png" width="128" height="128">](https://docspring.com/?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
|
||||
|
||||
@@ -59,7 +70,7 @@ OpenAPI Generator allows generation of API client libraries (SDK generation), se
|
||||
|
||||
| | Languages/Frameworks |
|
||||
|-|-|
|
||||
**API clients** | **ActionScript**, **Ada**, **Apex**, **Bash**, **C**, **C#** (.net 2.0, 3.5 or later, .NET Standard 1.3 - 2.0, .NET Core 2.0), **C++** (cpp-restsdk, Qt5, Tizen), **Clojure**, **Dart (1.x, 2.x)**, **Elixir**, **Elm**, **Eiffel**, **Erlang**, **Go**, **Groovy**, **Haskell** (http-client, Servant), **Java** (Jersey1.x, Jersey2.x, OkHttp, Retrofit1.x, Retrofit2.x, Feign, RestTemplate, RESTEasy, Vertx, Google API Client Library for Java, Rest-assured, Spring 5 Web Client), **Kotlin**, **Lua**, **Nim**, **Node.js/JavaScript** (ES5, ES6, AngularJS with Google Closure Compiler annotations, Flow types), **Objective-C**, **OCaml**, **Perl**, **PHP**, **PowerShell**, **Python**, **R**, **Ruby**, **Rust** (rust, rust-server), **Scala** (akka, http4s, scalaz, swagger-async-httpclient), **Swift** (2.x, 3.x, 4.x), **Typescript** (AngularJS, Angular (2.x - 8.x), Aurelia, Axios, Fetch, Inversify, jQuery, Node, Rxjs)
|
||||
**API clients** | **ActionScript**, **Ada**, **Apex**, **Bash**, **C**, **C#** (.net 2.0, 3.5 or later, .NET Standard 1.3 - 2.0, .NET Core 2.0), **C++** (cpp-restsdk, Qt5, Tizen), **Clojure**, **Dart (1.x, 2.x)**, **Elixir**, **Elm**, **Eiffel**, **Erlang**, **Go**, **Groovy**, **Haskell** (http-client, Servant), **Java** (Jersey1.x, Jersey2.x, OkHttp, Retrofit1.x, Retrofit2.x, Feign, RestTemplate, RESTEasy, Vertx, Google API Client Library for Java, Rest-assured, Spring 5 Web Client, MicroProfile Rest Client), **Kotlin**, **Lua**, **Nim**, **Node.js/JavaScript** (ES5, ES6, AngularJS with Google Closure Compiler annotations, Flow types), **Objective-C**, **OCaml**, **Perl**, **PHP**, **PowerShell**, **Python**, **R**, **Ruby**, **Rust** (rust, rust-server), **Scala** (akka, http4s, scalaz, swagger-async-httpclient), **Swift** (2.x, 3.x, 4.x, 5.x), **Typescript** (AngularJS, Angular (2.x - 8.x), Aurelia, Axios, Fetch, Inversify, jQuery, Node, Rxjs)
|
||||
**Server stubs** | **Ada**, **C#** (ASP.NET Core, NancyFx), **C++** (Pistache, Restbed, Qt5 QHTTPEngine), **Erlang**, **F#** (Giraffe), **Go** (net/http, Gin), **Haskell** (Servant), **Java** (MSF4J, Spring, Undertow, JAX-RS: CDI, CXF, Inflector, Jersey, RestEasy, Play Framework, [PKMST](https://github.com/ProKarma-Inc/pkmst-getting-started-examples), [Vert.x](https://vertx.io/)), **Kotlin** (Spring Boot, Ktor, Vertx), **PHP** (Laravel, Lumen, Slim, Silex, [Symfony](https://symfony.com/), [Zend Expressive](https://github.com/zendframework/zend-expressive)), **Python** (Flask), **NodeJS**, **Ruby** (Sinatra, Rails5), **Rust** (rust-server), **Scala** ([Finch](https://github.com/finagle/finch), [Lagom](https://github.com/lagom/lagom), [Play](https://www.playframework.com/), Scalatra)
|
||||
**API documentation generators** | **HTML**, **Confluence Wiki**, **Asciidoc**
|
||||
**Configuration files** | [**Apache2**](https://httpd.apache.org/)
|
||||
@@ -102,8 +113,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.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](https://github.com/OpenAPITools/openapi-generator/releases/tag/v4.1.3) (latest stable release) | 04.10.2019 | Patch release (bug fixes, enhancements)
|
||||
4.3.0 (upcoming minor release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/4.3.0-SNAPSHOT/)| 29.02.2020 | Minor release (breaking changes with fallbacks)
|
||||
4.2.3-SNAPSHOT (upcoming patch release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/4.2.3-SNAPSHOT/)| 31.01.2020 | Patch release
|
||||
[4.2.2](https://github.com/OpenAPITools/openapi-generator/releases/tag/v4.2.2) (latest stable release) | 02.12.2019 | Patch release
|
||||
|
||||
OpenAPI Spec compatibility: 1.0, 1.1, 1.2, 2.0, 3.0
|
||||
|
||||
@@ -159,16 +171,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.2.0/openapi-generator-cli-4.2.0.jar`
|
||||
JAR location: `http://central.maven.org/maven2/org/openapitools/openapi-generator-cli/4.2.2/openapi-generator-cli-4.2.2.jar`
|
||||
|
||||
For **Mac/Linux** users:
|
||||
```sh
|
||||
wget http://central.maven.org/maven2/org/openapitools/openapi-generator-cli/4.2.0/openapi-generator-cli-4.2.0.jar -O openapi-generator-cli.jar
|
||||
wget http://central.maven.org/maven2/org/openapitools/openapi-generator-cli/4.2.2/openapi-generator-cli-4.2.2.jar -O openapi-generator-cli.jar
|
||||
```
|
||||
|
||||
For **Windows** users, you will need to install [wget](http://gnuwin32.sourceforge.net/packages/wget.htm) or you can use Invoke-WebRequest in PowerShell (3.0+), e.g.
|
||||
```
|
||||
Invoke-WebRequest -OutFile openapi-generator-cli.jar http://central.maven.org/maven2/org/openapitools/openapi-generator-cli/4.2.0/openapi-generator-cli-4.2.0.jar
|
||||
Invoke-WebRequest -OutFile openapi-generator-cli.jar http://central.maven.org/maven2/org/openapitools/openapi-generator-cli/4.2.2/openapi-generator-cli-4.2.2.jar
|
||||
```
|
||||
|
||||
After downloading the JAR, run `java -jar openapi-generator-cli.jar help` to show the usage.
|
||||
@@ -383,10 +395,10 @@ openapi-generator version
|
||||
```
|
||||
|
||||
<!-- RELEASE_VERSION -->
|
||||
Or install a particular OpenAPI Generator version (e.g. v4.2.0):
|
||||
Or install a particular OpenAPI Generator version (e.g. v4.1.2):
|
||||
|
||||
```sh
|
||||
npm install @openapitools/openapi-generator-cli@cli-4.2.0 -g
|
||||
npm install @openapitools/openapi-generator-cli@cli-4.1.2 -g
|
||||
```
|
||||
|
||||
Or install it as dev-dependency:
|
||||
@@ -410,7 +422,7 @@ java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar generat
|
||||
(if you're on Windows, replace the last command with `java -jar modules\openapi-generator-cli\target\openapi-generator-cli.jar generate -i https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g php -o c:\temp\php_api_client`)
|
||||
|
||||
<!-- 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.2.0/openapi-generator-cli-4.2.0.jar)
|
||||
You can also download the JAR (latest release) directly from [maven.org](http://central.maven.org/maven2/org/openapitools/openapi-generator-cli/4.2.2/openapi-generator-cli-4.2.2.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`
|
||||
@@ -470,7 +482,7 @@ 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]
|
||||
@@ -515,7 +527,7 @@ Please refer to [customization.md](docs/customization.md) on how to customize th
|
||||
|
||||
### [3.2 - Workflow Integration (Maven, Gradle, Github, CI/CD)](#table-of-contents)
|
||||
|
||||
Please refer to [integration.md](docs/integration.md) on how to integrate OpenAPI generator with Maven, Gradle, Github and CI/CD.
|
||||
Please refer to [integration.md](docs/integration.md) on how to integrate OpenAPI generator with Maven, Gradle, sbt, Bazel, Github and CI/CD.
|
||||
|
||||
### [3.3 - Online OpenAPI generator](#table-of-contents)
|
||||
|
||||
@@ -550,7 +562,7 @@ Here is a list of community-conitributed IDE plug-ins that integrate with OpenAP
|
||||
- Visual Studio: [REST API Client Code Generator](https://marketplace.visualstudio.com/items?itemName=ChristianResmaHelle.ApiClientCodeGenerator) by [Christian Resma Helle](https://christian-helle.blogspot.com/)
|
||||
- Visual Studio Code: [Codewind OpenAPI Tools](https://marketplace.visualstudio.com/items?itemName=IBM.codewind-openapi-tools) by [IBM](https://marketplace.visualstudio.com/publishers/IBM)
|
||||
|
||||
|
||||
|
||||
## [4 - Companies/Projects using OpenAPI Generator](#table-of-contents)
|
||||
Here are some companies/projects (alphabetical order) using OpenAPI Generator in production. To add your company/project to the list, please visit [README.md](README.md) and click on the icon to edit the page.
|
||||
|
||||
@@ -568,37 +580,49 @@ Here are some companies/projects (alphabetical order) using OpenAPI Generator in
|
||||
- [California State University, Northridge](https://www.csun.edu)
|
||||
- [CAM](https://www.cam-inc.co.jp/)
|
||||
- [Camptocamp](https://www.camptocamp.com/en)
|
||||
- [Cisco](https://www.cisco.com/)
|
||||
- [codecentric AG](https://www.codecentric.de/)
|
||||
- [Commencis](https://www.commencis.com/)
|
||||
- [Crossover Health](https://crossoverhealth.com/)
|
||||
- [Cupix](https://www.cupix.com/)
|
||||
- [DB Systel](https://www.dbsystel.de)
|
||||
- [DocSpring](https://docspring.com/)
|
||||
- [dwango](https://dwango.co.jp/)
|
||||
- [Edge Impulse](https://www.edgeimpulse.com/)
|
||||
- [Element AI](https://www.elementai.com/)
|
||||
- [Embotics](https://www.embotics.com/)
|
||||
- [Fenergo](https://www.fenergo.com/)
|
||||
- [FormAPI](https://formapi.io/)
|
||||
- [FreshCells](https://www.freshcells.de/)
|
||||
- [Fuse](https://www.fuse.no/)
|
||||
- [Gantner](https://www.gantner.com)
|
||||
- [GenFlow](https://github.com/RepreZen/GenFlow)
|
||||
- [GetYourGuide](https://www.getyourguide.com/)
|
||||
- [GMO Pepabo](https://pepabo.com/en/)
|
||||
- [GoDaddy](https://godaddy.com)
|
||||
- [Here](https://developer.here.com/)
|
||||
- [IBM](https://www.ibm.com/)
|
||||
- [JustStar](https://www.juststarinfo.com)
|
||||
- [Klarna](https://www.klarna.com/)
|
||||
- [Kronsoft Development](https://www.kronsoft.ro/home/)
|
||||
- [Kubernetes](https://kubernetes.io)
|
||||
- [Linode](https://www.linode.com/)
|
||||
- [Médiavision](https://www.mediavision.fr/)
|
||||
- [Metaswitch](https://www.metaswitch.com/)
|
||||
- [Myworkout](https://myworkout.com)
|
||||
- [NamSor](https://www.namsor.com/)
|
||||
- [Openet](https://www.openet.com/)
|
||||
- [Oracle](https://www.oracle.com/)
|
||||
- [Paxos](https://www.paxos.com)
|
||||
- [Ponicode](https://ponicode.dev/)
|
||||
- [Pricefx](https://www.pricefx.com/)
|
||||
- [Prometheus/Alertmanager](https://github.com/prometheus/alertmanager)
|
||||
- [QEDIT](https://qed-it.com)
|
||||
- [Qulix Systems](https://www.qulix.com)
|
||||
- [Raiffeisen Schweiz Genossenschaft](https://www.raiffeisen.ch)
|
||||
- [RedHat](https://www.redhat.com)
|
||||
- [RepreZen API Studio](https://www.reprezen.com/swagger-openapi-code-generation-api-first-microservices-enterprise-development)
|
||||
- [REST United](https://restunited.com)
|
||||
- [Sony Interactive Entertainment](https://www.sie.com/en/index.html)
|
||||
- [Stingray](http://www.stingray.com)
|
||||
- [Suva](https://www.suva.ch/)
|
||||
- [Telstra](https://dev.telstra.com)
|
||||
@@ -606,9 +630,11 @@ Here are some companies/projects (alphabetical order) using OpenAPI Generator in
|
||||
- [TUI InfoTec GmbH](http://www.tui-infotec.com/)
|
||||
- [unblu inc.](https://www.unblu.com/)
|
||||
- [Veamly](https://www.veamly.com/)
|
||||
- [Woleet](https://www.woleet.io/)
|
||||
- [WSO2](https://wso2.com/)
|
||||
- [Vouchery.io](https://vouchery.io)
|
||||
- [Xero](https://www.xero.com/)
|
||||
- [Yahoo Japan](https://www.yahoo.co.jp/)
|
||||
- [Yelp](https://www.yelp.com/)
|
||||
- [Zalando](https://www.zalando.com)
|
||||
|
||||
@@ -677,6 +703,22 @@ Here are some companies/projects (alphabetical order) using OpenAPI Generator in
|
||||
- 2019-10-16 - [How to ship APIs faster?](https://medium.com/@accounts_76224/how-to-ship-apis-faster-cabef2f819e4) by [Simon Guilliams @ PoniCode](https://ponicode.dev)
|
||||
- 2019-10-22 - [OpenAPI + Spring Boot(Kotlin)でファイルダウンロードAPIを作成する](https://qiita.com/boronngo/items/4b78b92526209daeaee9) by [Yuki Furukawa](https://twitter.com/yuki_furukawa5)
|
||||
- 2019-10-24 - [Microprofile OpenAPI - Code First or Design First?](https://github.com/pe-st/apidocs/blob/master/MicroProfile-OpenAPI-all-slides.pdf) by [Peter [pɛʃə] Steiner](https://twitter.com/pesche) at [eclipsecon Europe 2019](https://www.eclipsecon.org/europe2019/sessions/microprofile-openapi-code-first-or-design-first)
|
||||
- 2019-11-06 - [Generating API clients based on OpenAPI v3 specifications](https://98elements.com/blog/generating-api-clients-based-on-openapi-v3-specifications) by [Dominik Jastrzębski @ 98elements](https://98elements.com)
|
||||
- 2019-11-06 - [OpenAPIを利用して自前のAPIサーバー(Sinatra)を移植した時のメモ](https://qiita.com/YasuhiroABE/items/c73920eab2d9d6e97fd9) by [Yasuhiro ABE](https://twitter.com/YasuhiroABE)
|
||||
- 2019-11-07 - [API First development with OpenAPI - You should you practise it !?](https://www.youtube.com/watch?v=F9iF3a1Z8Y8) by [Nick Van Hoof](https://www.nickvanhoof.com/) at [Devoxx Belgium 2019](https://devoxx.be/)
|
||||
- 2019-11-08 - [JHipster beyond CRUD - API-First for Enterprises by Enrico Costanzi](https://www.youtube.com/watch?v=m28JFovKQ20) by [Enrico Costanzi](https://twitter.com/enricocostanzi) at [JHipster Conf 2019 in Paris](https://jhipster-conf.github.io/)
|
||||
- 2019-11-11 - [TypeScript REST APIクライアント](https://qiita.com/unhurried/items/7b74f7d3c43545dadd2b) by [@unhurried](https://qiita.com/unhurried)
|
||||
- 2019-11-11 - [One Spec to Rule them all - OpenAPI in Action](https://www.youtube.com/watch?v=MMay_nht8ec) by [Andreas Litt](https://github.com/littldr) at [code.talks 2019](https://www.codetalks.com/)
|
||||
- 2019-11-17 - [OpenAPI Generator YouTube playlist](https://www.youtube.com/playlist?list=PLtJyHVMdzfF6fBkOUV5VDVErP23CGgHIy) at [YouTube](https://www.youtube.com)
|
||||
- 2019-11-20 - [Introduction to OpenAPI](https://noti.st/lornajane/HvDH7U/introduction-to-openapi) by [Lorna Mitchell](https://twitter.com/lornajane) at [GOTO Copenhagen 2019](https://gotocph.com/2019/)
|
||||
- 2019-11-20 - [How to Generate Angular code from OpenAPI specifications](https://dotnetthoughts.net/how-to-generate-angular-code-from-openapi-specifications/) by Anuraj
|
||||
- 2019-11-23 - [Swagger ではない OpenAPI Specification 3.0 による API サーバー開発](https://www.slideshare.net/techblogyahoo/swagger-openapi-specification-30-api) by [Tetsuya Morimoto](https://github.com/t2y) at [JJUG CCC 2019 Fall](https://ccc2019fall.java-users.jp/)
|
||||
- 2019-11-24 - [Accelerate Flutter development with OpenAPI and Dart code generation](https://medium.com/@irinasouthwell_220/accelerate-flutter-development-with-openapi-and-dart-code-generation-1f16f8329a6a) by [Irina Southwell](https://medium.com/@irinasouthwell_220)
|
||||
- 2019-11-25 - [openapi-generatorで手軽にスタブサーバとクライアントの生成](https://qiita.com/pochopocho13/items/8db662e1934fb2b408b8) by [@pochopocho13](https://twitter.com/pochopocho13)
|
||||
- 2019-11-26 - [CordaCon 2019 Highlights: Braid Server and OpenAPI Generator for Corda Client API’s](https://blog.b9lab.com/cordacon-2019-highlights-braid-server-and-openapi-generator-for-corda-flows-api-s-d24179ccb27c) by [Adel Rustum](https://blog.b9lab.com/@adelrestom) at [B9lab](https://blog.b9lab.com/)
|
||||
- 2019-12-04 - [Angular+NestJS+OpenAPI(Swagger)でマイクロサービスを視野に入れた環境を考える](https://qiita.com/teracy55/items/0327c7a170ec772970c6) by [てらしー](https://twitter.com/teracy55)
|
||||
- 2019-12-17 - [OpenAPI Generator で OAuth2 アクセストークン発行のコードまで生成してみる](https://www.techscore.com/blog/2019/12/17/openapi-generator-oauth2-accesstoken/) by [TECHSCORE](https://www.techscore.com/blog/)
|
||||
- 2019-12-23 - [Use Ada for Your Web Development](https://www.electronicdesign.com/technologies/embedded-revolution/article/21119177/use-ada-for-your-web-development) by [Stephane Carrez](https://github.com/stcarrez)
|
||||
|
||||
## [6 - About Us](#table-of-contents)
|
||||
|
||||
@@ -692,7 +734,7 @@ OpenAPI Generator core team members are contributors who have been making signif
|
||||
* [@jmini](https://github.com/jmini) (2018/04) [:heart:](https://www.patreon.com/jmini)
|
||||
* [@etherealjoy](https://github.com/etherealjoy) (2019/06)
|
||||
|
||||
:heart: = Link to support the contributor directly
|
||||
:heart: = Link to support the contributor directly
|
||||
|
||||
#### Template Creator
|
||||
|
||||
@@ -747,8 +789,9 @@ Here is a list of template creators:
|
||||
* Perl: @wing328 [:heart:](https://www.patreon.com/wing328)
|
||||
* PHP (Guzzle): @baartosz
|
||||
* PowerShell: @beatcracker
|
||||
* Python-experimental: @spacether
|
||||
* R: @ramnov
|
||||
* Ruby (Faraday): @meganemura @dkliban
|
||||
* Ruby (Faraday): @meganemura @dkliban
|
||||
* Rust: @farcaller
|
||||
* Rust (rust-server): @metaswitch
|
||||
* Scala (scalaz & http4s): @tbrown1979
|
||||
@@ -756,9 +799,10 @@ Here is a list of template creators:
|
||||
* Swift: @tkqubo
|
||||
* Swift 3: @hexelon
|
||||
* Swift 4: @ehyche
|
||||
* Swift 5: @4brunu
|
||||
* TypeScript (Angular1): @mhardorf
|
||||
* TypeScript (Angular2): @roni-frantchi
|
||||
* TypeScript (Angular6): @akehir
|
||||
* TypeScript (Angular6): @akehir
|
||||
* TypeScript (Angular7): @topce
|
||||
* TypeScript (Axios): @nicokoenig
|
||||
* TypeScript (Fetch): @leonyu
|
||||
@@ -766,10 +810,11 @@ Here is a list of template creators:
|
||||
* TypeScript (Node): @mhardorf
|
||||
* TypeScript (Rxjs): @denyo
|
||||
* TypeScript (Inversify): @gualtierim
|
||||
* TypeScript (redux-query): @petejohansonxo
|
||||
* Server Stubs
|
||||
* Ada: @stcarrez
|
||||
* C# ASP.NET 5: @jimschubert [:heart:](https://www.patreon.com/jimschubert)
|
||||
* C# ASP.NET Core 3.0: @A-Joshi
|
||||
* C# ASP.NET Core 3.0: @A-Joshi
|
||||
* C# NancyFX: @mstefaniuk
|
||||
* C++ (Qt5 QHttpEngine): @etherealjoy
|
||||
* C++ Pistache: @sebymiano
|
||||
@@ -812,7 +857,7 @@ Here is a list of template creators:
|
||||
* Configuration
|
||||
* Apache2: @stkrwork
|
||||
* Schema
|
||||
* Avro: @sgadouar
|
||||
* Avro: @sgadouar
|
||||
* GraphQL: @wing328 [:heart:](https://www.patreon.com/wing328)
|
||||
* MySQL: @ybelenko
|
||||
* Protocol Buffer: @wing328
|
||||
@@ -855,11 +900,11 @@ If you want to join the committee, please kindly apply by sending an email to te
|
||||
| Android | @jaz-ah (2017/09) |
|
||||
| Apex | |
|
||||
| Bash | @frol (2017/07) @bkryza (2017/08) @kenjones-cisco (2017/09) |
|
||||
| C | @zhemant (2018/11) |
|
||||
| C | @zhemant (2018/11) @ityuhui (2019/12) |
|
||||
| C++ | @ravinikam (2017/07) @stkrwork (2017/07) @etherealjoy (2018/02) @martindelille (2018/03) @muttleyxd (2019/08) |
|
||||
| C# | @mandrean (2017/08), @jimschubert (2017/09) [:heart:](https://www.patreon.com/jimschubert) @frankyjuang (2019/09) |
|
||||
| Clojure | |
|
||||
| Dart | @ircecho (2017/07) @swipesight (2018/09) @jaumard (2018/09) @nickmeinhold (2019/09) |
|
||||
| Dart | @ircecho (2017/07) @swipesight (2018/09) @jaumard (2018/09) @nickmeinhold (2019/09) @athornz (2019/12) @amondnet (2019/12) |
|
||||
| Eiffel | @jvelilla (2017/09) |
|
||||
| Elixir | @mrmstn (2018/12) |
|
||||
| Elm | @eriktim (2018/09) |
|
||||
@@ -870,7 +915,7 @@ If you want to join the committee, please kindly apply by sending an email to te
|
||||
| Groovy | |
|
||||
| Haskell | |
|
||||
| Java | @bbdouglas (2017/07) @sreeshas (2017/08) @jfiala (2017/08) @lukoyanov (2017/09) @cbornet (2017/09) @jeff9finger (2018/01) @karismann (2019/03) @Zomzog (2019/04) @lwlee2608 (2019/10) |
|
||||
| Kotlin | @jimschubert (2017/09) [:heart:](https://www.patreon.com/jimschubert), @dr4ke616 (2018/08) @karismann (2019/03) @Zomzog (2019/04) @andrewemery (2019/10) |
|
||||
| Kotlin | @jimschubert (2017/09) [:heart:](https://www.patreon.com/jimschubert), @dr4ke616 (2018/08) @karismann (2019/03) @Zomzog (2019/04) @andrewemery (2019/10) @4brunu (2019/11) |
|
||||
| Lua | @daurnimator (2017/08) |
|
||||
| Nim | |
|
||||
| NodeJS/Javascript | @CodeNinjai (2017/07) @frol (2017/07) @cliffano (2017/07) |
|
||||
@@ -879,13 +924,13 @@ If you want to join the committee, please kindly apply by sending an email to te
|
||||
| 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) |
|
||||
| Python | @taxpon (2017/07) @frol (2017/07) @mbohlool (2017/07) @cbornet (2017/09) @kenjones-cisco (2017/11) @tomplus (2018/10) @Jyhess (2019/01) @slash-arun (2019/11) @spacether (2019/11)|
|
||||
| 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) @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) |
|
||||
| Swift | @jgavris (2017/07) @ehyche (2017/08) @Edubits (2017/09) @jaz-ah (2017/09) @4brunu (2019/11) |
|
||||
| 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) @petejohansonxo (2019/11) |
|
||||
|
||||
:heart: = Link to support the contributor directly
|
||||
|
||||
|
||||
@@ -26,6 +26,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/asciidoc-documentation --additional-properties=specDir=modules/openapi-generator/src/main/resources/asciidoc-documentation,snippetDir=. -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g asciidoc -o samples/documentation/asciidoc"
|
||||
ags="generate -t modules/openapi-generator/src/main/resources/asciidoc-documentation --additional-properties=specDir=modules/openapi-generator/src/main/resources/asciidoc-documentation,snippetDir=. -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g asciidoc -o samples/documentation/asciidoc $@"
|
||||
|
||||
java ${JAVA_OPTS} -jar ${executable} ${ags}
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
"templateDir": "modules/openapi-generator/src/main/resources/Java/libraries/feign",
|
||||
"additionalProperties": {
|
||||
"hideGenerationTimestamp": true,
|
||||
"booleanGetterPrefix": "is"
|
||||
"booleanGetterPrefix": "is",
|
||||
"additionalModelTypeAnnotations": "@javax.annotation.concurrent.Immutable"
|
||||
}
|
||||
}
|
||||
@@ -6,6 +6,8 @@
|
||||
"templateDir": "modules/openapi-generator/src/main/resources/kotlin-client",
|
||||
"additionalProperties": {
|
||||
"dateLibrary": "string",
|
||||
"serializableModel": "true"
|
||||
"serializableModel": "true",
|
||||
"sortParamsByRequiredFlag": "false",
|
||||
"sortModelPropertiesByRequiredFlag": "false"
|
||||
}
|
||||
}
|
||||
6
bin/ci/php-slim4-server-petstore.json
Normal file
6
bin/ci/php-slim4-server-petstore.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"generatorName": "php-slim4",
|
||||
"inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml",
|
||||
"outputDir": "samples/server/petstore/php-slim4",
|
||||
"templateDir": "modules/openapi-generator/src/main/resources/php-slim4-server"
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"generatorName": "php-symfony",
|
||||
"inputSpec": "/Users/jim/projects/openapi-generator/bin/../modules/openapi-generator/src/test/resources/2_0/petstore.yaml",
|
||||
"outputDir": "/Users/jim/projects/openapi-generator/bin/../samples/server/petstore/php-symfony/SymfonyBundle-php",
|
||||
"templateDir": "/Users/jim/projects/openapi-generator/bin/../modules/openapi-generator/src/main/resources/php-symfony"
|
||||
"inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore.yaml",
|
||||
"outputDir": "samples/server/petstore/php-symfony/SymfonyBundle-php",
|
||||
"templateDir": "modules/openapi-generator/src/main/resources/php-symfony"
|
||||
}
|
||||
9
bin/ci/python-experimental.json
Normal file
9
bin/ci/python-experimental.json
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"generatorName": "python-experimental",
|
||||
"inputSpec": "modules/openapi-generator/src/test/resources/2_0/python-client-experimental/petstore-with-fake-endpoints-models-for-testing.yaml",
|
||||
"outputDir": "samples/client/petstore/python-experimental",
|
||||
"templateDir": "modules/openapi-generator/src/main/resources/python",
|
||||
"additionalProperties": {
|
||||
"packageName": "petstore_api"
|
||||
}
|
||||
}
|
||||
@@ -5,6 +5,7 @@
|
||||
"outputDir": "samples/server/petstore/springboot",
|
||||
"templateDir": "modules/openapi-generator/src/main/resources/JavaSpring",
|
||||
"additionalProperties": {
|
||||
"hideGenerationTimestamp": true
|
||||
"hideGenerationTimestamp": true,
|
||||
"snapshotVersion": true
|
||||
}
|
||||
}
|
||||
8
bin/cpp-qt5-petstore.json
Normal file
8
bin/cpp-qt5-petstore.json
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore.yaml",
|
||||
"outputDir": "samples/client/petstore/cpp-qt5",
|
||||
"additionalProperties": {
|
||||
"cppNamespace": "test_namespace",
|
||||
"modelNamePrefix": "PFX"
|
||||
}
|
||||
}
|
||||
@@ -27,6 +27,10 @@ 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/cpp-qt5-client -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g cpp-qt5-client -o samples/client/petstore/cpp-qt5 $@"
|
||||
args="generate -t modules/openapi-generator/src/main/resources/cpp-qt5-client \
|
||||
-i modules/openapi-generator/src/test/resources/2_0/petstore.yaml \
|
||||
-g cpp-qt5-client \
|
||||
-c bin/cpp-qt5-petstore.json \
|
||||
$@"
|
||||
|
||||
java $JAVA_OPTS -jar $executable $ags
|
||||
java $JAVA_OPTS -jar $executable $args
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
./bin/java-petstore-jersey1.sh
|
||||
./bin/java-petstore-jersey2-java6.sh
|
||||
./bin/java-petstore-jersey2.sh
|
||||
./bin/java-petstore-microprofile.sh
|
||||
./bin/java-petstore-native.sh
|
||||
./bin/java-petstore-okhttp-gson-parcelable.sh
|
||||
./bin/java-petstore-okhttp-gson.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 -t modules/openapi-generator/src/main/resources/Java/libraries/feign -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin/java-petstore-feign-9x.json -o samples/client/petstore/java/feign --additional-properties hideGenerationTimestamp=true,booleanGetterPrefix=is $@"
|
||||
ags="generate -t modules/openapi-generator/src/main/resources/Java/libraries/feign -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin/java-petstore-feign-9x.json -o samples/client/petstore/java/feign --additional-properties hideGenerationTimestamp=true,booleanGetterPrefix=is,additionalModelTypeAnnotations=@javax.annotation.concurrent.Immutable $@"
|
||||
|
||||
echo "Removing files and folders under samples/client/petstore/java/feign/src/main"
|
||||
rm -rf samples/client/petstore/java/feign/src/main
|
||||
|
||||
36
bin/java-petstore-microprofile.sh
Executable file
36
bin/java-petstore-microprofile.sh
Executable file
@@ -0,0 +1,36 @@
|
||||
#!/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 --artifact-id "microprofile-rest-client" -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g java --library microprofile -o samples/client/petstore/java/microprofile-rest-client $@"
|
||||
|
||||
echo "Removing files and folders under samples/client/petstore/java/microprofile-rest-client/src/main"
|
||||
rm -rf samples/client/petstore/java/microprofile-rest-client/src/main
|
||||
find samples/client/petstore/java/microprofile-rest-client -maxdepth 1 -type f ! -name "README.md" -exec rm {} +
|
||||
|
||||
java $JAVA_OPTS -jar $executable $ags
|
||||
@@ -1,8 +1,13 @@
|
||||
#!/bin/sh
|
||||
|
||||
./bin/kotlin-client-gson.sh
|
||||
./bin/kotlin-client-moshi-codegen.sh
|
||||
./bin/kotlin-client-nonpublic.sh
|
||||
./bin/kotlin-client-okhttp3.sh
|
||||
./bin/kotlin-client-petstore-multiplatform.sh
|
||||
./bin/kotlin-client-petstore.sh
|
||||
./bin/kotlin-client-string.sh
|
||||
./bin/kotlin-client-threetenbp.sh
|
||||
./bin/kotlin-client-nullable.sh
|
||||
./bin/kotlin-client-retrofit2.sh
|
||||
./bin/kotlin-client-json-request-date.sh
|
||||
|
||||
32
bin/kotlin-client-gson.sh
Executable file
32
bin/kotlin-client-gson.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/kotlin-client -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g kotlin --artifact-id kotlin-petstore-gson --additional-properties serializationLibrary=gson -o samples/client/petstore/kotlin-gson $@"
|
||||
|
||||
java ${JAVA_OPTS} -jar ${executable} ${ags}
|
||||
32
bin/kotlin-client-json-request-date.sh
Executable file
32
bin/kotlin-client-json-request-date.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/kotlin-client -i modules/openapi-generator/src/test/resources/2_0/petstore-with-date-field.yaml -g kotlin --artifact-id kotlin-petstore-json-request-date --additional-properties requestDateConverter=toJson -o samples/client/petstore/kotlin-json-request-date $@"
|
||||
|
||||
java ${JAVA_OPTS} -jar ${executable} ${ags}
|
||||
32
bin/kotlin-client-moshi-codegen.sh
Executable file
32
bin/kotlin-client-moshi-codegen.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/kotlin-client -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g kotlin --artifact-id kotlin-petstore-moshi-codegen --additional-properties serializationLibrary=moshi,moshiCodeGen=true -o samples/client/petstore/kotlin-moshi-codegen $@"
|
||||
|
||||
java ${JAVA_OPTS} -jar ${executable} ${ags}
|
||||
@@ -30,5 +30,3 @@ export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
|
||||
ags="generate -t modules/openapi-generator/src/main/resources/kotlin-client -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g kotlin --artifact-id kotlin-petstore-nonpublic --additional-properties nonPublicApi=true -o samples/client/petstore/kotlin-nonpublic $@"
|
||||
|
||||
java ${JAVA_OPTS} -jar ${executable} ${ags}
|
||||
|
||||
cp CI/samples.ci/client/petstore/kotlin-string/pom.xml samples/client/petstore/kotlin-string/pom.xml
|
||||
|
||||
32
bin/kotlin-client-nullable.sh
Executable file
32
bin/kotlin-client-nullable.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/kotlin-client -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g kotlin --artifact-id kotlin-petstore-nullable --additional-properties nullableReturnType=true,serializableModel=true -o samples/client/petstore/kotlin-nullable $@"
|
||||
|
||||
java ${JAVA_OPTS} -jar ${executable} ${ags}
|
||||
@@ -30,5 +30,3 @@ export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
|
||||
ags="generate -t modules/openapi-generator/src/main/resources/kotlin-client -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g kotlin --artifact-id kotlin-petstore-okhttp3 --library jvm-okhttp3 -o samples/client/petstore/kotlin-okhttp3 $@"
|
||||
|
||||
java ${JAVA_OPTS} -jar ${executable} ${ags}
|
||||
|
||||
#cp CI/samples.ci/client/petstore/kotlin-okhttp3/pom.xml samples/client/petstore/kotlin-okhttp3/pom.xml
|
||||
|
||||
32
bin/kotlin-client-retrofit2.sh
Executable file
32
bin/kotlin-client-retrofit2.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/kotlin-client -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g kotlin --artifact-id kotlin-petstore-retrofit2 --library jvm-retrofit2 -o samples/client/petstore/kotlin-retrofit2 $@"
|
||||
|
||||
java ${JAVA_OPTS} -jar ${executable} ${ags}
|
||||
@@ -27,7 +27,7 @@ fi
|
||||
|
||||
# if you've executed sbt assembly previously it will use that instead.
|
||||
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
|
||||
ags="generate -t modules/openapi-generator/src/main/resources/kotlin-client -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g kotlin --artifact-id kotlin-petstore-string --additional-properties dateLibrary=string,serializableModel=true -o samples/client/petstore/kotlin-string $@"
|
||||
ags="generate -t modules/openapi-generator/src/main/resources/kotlin-client -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g kotlin --artifact-id kotlin-petstore-string --additional-properties dateLibrary=string,serializableModel=true,sortParamsByRequiredFlag=false,sortModelPropertiesByRequiredFlag=false -o samples/client/petstore/kotlin-string $@"
|
||||
|
||||
java ${JAVA_OPTS} -jar ${executable} ${ags}
|
||||
|
||||
|
||||
34
bin/kotlin-client-uppercase-enum.sh
Executable file
34
bin/kotlin-client-uppercase-enum.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 -t modules/openapi-generator/src/main/resources/kotlin-client -i modules/openapi-generator/src/test/resources/3_0/issue-4062.yaml -g kotlin --artifact-id kotlin-uppercase-enum --additional-properties enumPropertyNaming=UPPERCASE -o samples/client/petstore/kotlin-uppercase-enum $@"
|
||||
|
||||
java ${JAVA_OPTS} -jar ${executable} ${ags}
|
||||
|
||||
#cp CI/samples.ci/client/petstore/kotlin-uppercase-enum/pom.xml samples/client/petstore/kotlin-uppercase-enum/pom.xml
|
||||
@@ -1,4 +1,5 @@
|
||||
#!/bin/sh
|
||||
|
||||
./bin/kotlin-springboot-petstore-server.sh
|
||||
./bin/kotlin-springboot-petstore-server-reactive.sh
|
||||
./bin/kotlin-springboot-petstore-server-reactive.sh
|
||||
./bin/kotlin-springboot-petstore-server-model-mutable.sh
|
||||
|
||||
35
bin/kotlin-springboot-petstore-server-model-mutable.sh
Executable file
35
bin/kotlin-springboot-petstore-server-model-mutable.sh
Executable file
@@ -0,0 +1,35 @@
|
||||
#!/bin/sh
|
||||
|
||||
SCRIPT="$0"
|
||||
echo "# START SCRIPT: $SCRIPT"
|
||||
|
||||
while [ -h "$SCRIPT" ] ; do
|
||||
ls=$(ls -ld "$SCRIPT")
|
||||
link=$(expr "$ls" : '.*-> \(.*\)$')
|
||||
if expr "$link" : '/.*' > /dev/null; then
|
||||
SCRIPT="$link"
|
||||
else
|
||||
SCRIPT=$(dirname "$SCRIPT")/"$link"
|
||||
fi
|
||||
done
|
||||
|
||||
if [ ! -d "${APP_DIR}" ]; then
|
||||
APP_DIR=$(dirname "$SCRIPT")/..
|
||||
APP_DIR=$(cd "${APP_DIR}"; pwd)
|
||||
fi
|
||||
|
||||
executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar"
|
||||
|
||||
if [ ! -f "$executable" ]
|
||||
then
|
||||
mvn clean package
|
||||
fi
|
||||
|
||||
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
|
||||
ags="$@ generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -t modules/openapi-generator/src/main/resources/kotlin-spring -g kotlin-spring -o samples/server/petstore/kotlin-springboot-modelMutable --additional-properties=library=spring-boot,beanValidations=true,swaggerAnnotations=true,serviceImplementation=true,serializableModel=true,modelMutable=true"
|
||||
|
||||
echo "Cleaning previously generated files if any from samples/server/petstore/kotlin-springboot"
|
||||
rm -rf samples/server/petstore/kotlin-springboot-modelMutable
|
||||
|
||||
echo "Generating Kotling Spring Boot server..."
|
||||
java $JAVA_OPTS -jar $executable $ags
|
||||
@@ -26,6 +26,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 -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g kotlin-vertx -o samples/server/petstore/kotlin/vertx"
|
||||
ags="$@ generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g kotlin-vertx -o samples/server/petstore/kotlin/vertx --additional-properties=modelMutable=false"
|
||||
|
||||
java ${JAVA_OPTS} -jar ${executable} ${ags}
|
||||
|
||||
31
bin/markdown-documentation-petstore.sh
Executable file
31
bin/markdown-documentation-petstore.sh
Executable file
@@ -0,0 +1,31 @@
|
||||
#!/bin/sh
|
||||
|
||||
SCRIPT="$0"
|
||||
|
||||
while [ -h "$SCRIPT" ] ; do
|
||||
ls=$(ls -ld "$SCRIPT")
|
||||
link=$(expr "$ls" : '.*-> \(.*\)$')
|
||||
if expr "$link" : '/.*' > /dev/null; then
|
||||
SCRIPT="$link"
|
||||
else
|
||||
SCRIPT=$(dirname "$SCRIPT")/"$link"
|
||||
fi
|
||||
done
|
||||
|
||||
if [ ! -d "${APP_DIR}" ]; then
|
||||
APP_DIR=$(dirname "$SCRIPT")/..
|
||||
APP_DIR=$(cd "${APP_DIR}"; pwd)
|
||||
fi
|
||||
|
||||
executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar"
|
||||
|
||||
if [ ! -f "$executable" ]
|
||||
then
|
||||
mvn -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/markdown-documentation -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g markdown -o samples/documentation/markdown $@"
|
||||
|
||||
java ${JAVA_OPTS} -jar ${executable} ${ags}
|
||||
40
bin/meta-codegen-kotlin.sh
Executable file
40
bin/meta-codegen-kotlin.sh
Executable file
@@ -0,0 +1,40 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
SCRIPT="$0"
|
||||
echo "# START SCRIPT: $SCRIPT"
|
||||
|
||||
declare cwd="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
declare root="$(cd "$cwd" && cd ../ && pwd)"
|
||||
|
||||
if ! command -v gradle > /dev/null; then
|
||||
echo "[WARN] This script requires a system gradle to be installed. Not treating this as an error."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
executable="${root}/modules/openapi-generator-cli/target/openapi-generator-cli.jar"
|
||||
|
||||
if [ ! -f "$executable" ]
|
||||
then
|
||||
(cd "$root" && ./mvnw -B clean package)
|
||||
fi
|
||||
|
||||
\rm -rf "${root}/samples/meta-codegen-kotlin/lib"
|
||||
|
||||
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
|
||||
ags="meta -n myClientCodegen -t DOCUMENTATION -p com.my.company.codegen -o samples/meta-codegen-kotlin/lib -l kotlin $@"
|
||||
|
||||
java $JAVA_OPTS -jar $executable $ags
|
||||
|
||||
if [ ! -f "${root}"samples/meta-codegen-kotlin/gradle/wrapper/gradle-wrapper.jar ]; then
|
||||
(cd "${root}"/samples/meta-codegen-kotlin/ && gradle wrapper --gradle-version 5.6.2 --distribution-type bin)
|
||||
fi
|
||||
|
||||
|
||||
(cp "${root}"/samples/meta-codegen-kotlin/gradlew "${root}"/samples/meta-codegen-kotlin/lib/ && \
|
||||
cp -R "${root}"/samples/meta-codegen-kotlin/gradle "${root}"/samples/meta-codegen-kotlin/lib/ && \
|
||||
cd "${root}"/samples/meta-codegen-kotlin/lib && \
|
||||
./gradlew shadowJar)
|
||||
|
||||
ags2="generate -g myClientCodegen -i modules/openapi-generator/src/test/resources/2_0/petstore.json -o samples/meta-codegen-kotlin/usage $@"
|
||||
|
||||
java $JAVA_OPTS -cp ${root}/samples/meta-codegen-kotlin/lib/build/libs/my-client-codegen-openapi-generator-1.0-SNAPSHOT-all.jar:$executable org.openapitools.codegen.OpenAPIGenerator $ags2
|
||||
@@ -1,28 +1,15 @@
|
||||
#!/bin/sh
|
||||
#!/usr/bin/env bash
|
||||
|
||||
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
|
||||
declare cwd="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
declare root="$(cd "$cwd" && cd ../ && pwd)"
|
||||
|
||||
if [ ! -d "${APP_DIR}" ]; then
|
||||
APP_DIR=`dirname "$SCRIPT"`/..
|
||||
APP_DIR=`cd "${APP_DIR}"; pwd`
|
||||
fi
|
||||
executable="${root}/modules/openapi-generator-cli/target/openapi-generator-cli.jar"
|
||||
|
||||
executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar"
|
||||
|
||||
if [ ! -f "$executable" ]
|
||||
then
|
||||
./mvnw -B clean package
|
||||
if [ ! -f "$executable" ]; then
|
||||
(cd "$root" && ./mvnw -B clean package)
|
||||
fi
|
||||
|
||||
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
|
||||
@@ -30,8 +17,8 @@ ags="meta -n myClientCodegen -t DOCUMENTATION -p com.my.company.codegen -o sampl
|
||||
|
||||
java $JAVA_OPTS -jar $executable $ags
|
||||
|
||||
./mvnw clean package -f samples/meta-codegen/pom.xml
|
||||
(cd "$root" && ./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 $@"
|
||||
|
||||
java $JAVA_OPTS -cp samples/meta-codegen/lib/target/myClientCodegen-openapi-generator-1.0.0.jar:$executable org.openapitools.codegen.OpenAPIGenerator $ags2
|
||||
java $JAVA_OPTS -cp ${root}/samples/meta-codegen/lib/target/myClientCodegen-openapi-generator-1.0.0.jar:$executable org.openapitools.codegen.OpenAPIGenerator $ags2
|
||||
|
||||
@@ -27,6 +27,6 @@ fi
|
||||
|
||||
# if you've executed sbt assembly previously it will use that instead.
|
||||
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
|
||||
args="generate -t modules/openapi-generator/src/main/resources/bash -i modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml -g bash -o samples/client/petstore/bash -c modules/openapi-generator/src/test/resources/3_0/bash-config.json --additional-properties hideGenerationTimestamp=true $@"
|
||||
args="generate -t modules/openapi-generator/src/main/resources/bash -i modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml -g bash -o samples/client/petstore/bash -c modules/openapi-generator/src/test/resources/2_0/bash-config.json --additional-properties hideGenerationTimestamp=true $@"
|
||||
|
||||
java $JAVA_OPTS -jar $executable $args
|
||||
|
||||
5
bin/openapi3/elm-all.sh
Executable file
5
bin/openapi3/elm-all.sh
Executable file
@@ -0,0 +1,5 @@
|
||||
#!/bin/sh
|
||||
|
||||
./bin/openapi3/elm-petstore.sh
|
||||
./bin/openapi3/elm-composition.sh
|
||||
|
||||
@@ -22,11 +22,14 @@ executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar"
|
||||
|
||||
if [ ! -f "$executable" ]
|
||||
then
|
||||
mvn clean package
|
||||
mvn -B clean package
|
||||
fi
|
||||
|
||||
# auto format elm code using elm-format
|
||||
export ELM_POST_PROCESS_FILE="/usr/bin/env elm-format --elm-version=0.19 --yes"
|
||||
|
||||
# if you've executed sbt assembly previously it will use that instead.
|
||||
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
|
||||
ags="generate -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g nodejs-server-deprecated --additional-properties=googleCloudFunctions=true -o samples/server/petstore/nodejs-google-cloud-functions -Dservice $@"
|
||||
ags="generate -i modules/openapi-generator/src/test/resources/3_0/composition.yaml -g elm -t modules/openapi-generator/src/main/resources/elm -o samples/openapi3/client/composition/elm --enable-post-process-file $@"
|
||||
|
||||
java $JAVA_OPTS -jar $executable $ags
|
||||
35
bin/openapi3/kotlin-client-petstore-nullable-required.sh
Normal file
35
bin/openapi3/kotlin-client-petstore-nullable-required.sh
Normal file
@@ -0,0 +1,35 @@
|
||||
#!/bin/sh
|
||||
|
||||
SCRIPT="$0"
|
||||
echo "# START SCRIPT: $SCRIPT"
|
||||
|
||||
while [ -h "$SCRIPT" ] ; do
|
||||
ls=$(ls -ld "$SCRIPT")
|
||||
link=$(expr "$ls" : '.*-> \(.*\)$')
|
||||
if expr "$link" : '/.*' > /dev/null; then
|
||||
SCRIPT="$link"
|
||||
else
|
||||
SCRIPT=$(dirname "$SCRIPT")/"$link"
|
||||
fi
|
||||
done
|
||||
|
||||
if [ ! -d "${APP_DIR}" ]; then
|
||||
APP_DIR=$(dirname "$SCRIPT")/..
|
||||
APP_DIR=$(cd "${APP_DIR}"; pwd)
|
||||
fi
|
||||
|
||||
executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar"
|
||||
|
||||
if [ ! -f "$executable" ]
|
||||
then
|
||||
mvn clean package
|
||||
fi
|
||||
|
||||
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
|
||||
ags="generate -i modules/openapi-generator/src/test/resources/3_0/petstore-with-nullable-required.yaml -t modules/openapi-generator/src/main/resources/kotlin-client -g kotlin --artifact-id kotlin-petstore-nullable-required --additional-properties allowRequiredAsNullable=true -o samples/openapi3/client/petstore/kotlin-nullable-required $@"
|
||||
|
||||
echo "Cleaning previously generated files if any from samples/openapi3/client/petstore/kotlin-nullable-required"
|
||||
rm -rf samples/openapi3/client/petstore/kotlin-nullable-required
|
||||
|
||||
echo "Generating Kotling client..."
|
||||
java $JAVA_OPTS -jar $executable $ags
|
||||
10
bin/openapi3/windows/kotlin-client-nullable-required.bat
Normal file
10
bin/openapi3/windows/kotlin-client-nullable-required.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\3_0\petstore-with-nullable-required.yaml -g kotlin --artifact-id "kotlin-petstore-nullable-required" --additional-properties allowRequiredAsNullable=true -o samples\openapi3\client\petstore\kotlin-nullable-required
|
||||
|
||||
java %JAVA_OPTS% -jar %executable% %ags%
|
||||
@@ -3,4 +3,5 @@
|
||||
|
||||
./bin/python-asyncio-petstore.sh
|
||||
./bin/python-petstore.sh
|
||||
./bin/python-experimental-petstore.sh
|
||||
./bin/python-tornado-petstore.sh
|
||||
|
||||
@@ -3,3 +3,4 @@
|
||||
./bin/python-server-aiohttp-petstore.sh
|
||||
./bin/python-server-flask-petstore.sh
|
||||
./bin/python-server-flask-petstore-python2.sh
|
||||
./bin/python-server-blueplanet-petstore.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 springboot -t modules/openapi-generator/src/main/resources/JavaSpring -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g spring -o samples/server/petstore/springboot --additional-properties hideGenerationTimestamp=true $@"
|
||||
ags="generate --artifact-id springboot -t modules/openapi-generator/src/main/resources/JavaSpring -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g spring -o samples/server/petstore/springboot --additional-properties hideGenerationTimestamp=true,snapshotVersion=true $@"
|
||||
|
||||
echo "Removing files and folders under samples/server/petstore/springboot/src/main"
|
||||
rm -rf samples/server/petstore/springboot/src/main
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
|
||||
./bin/swift4-petstore.sh
|
||||
./bin/swift4-petstore-promisekit.sh
|
||||
./bin/swift4-petstore-result.sh
|
||||
./bin/swift4-petstore-rxswift.sh
|
||||
./bin/swift4-petstore-objcCompatible.sh
|
||||
./bin/swift4-petstore-unwrapRequired.sh
|
||||
./bin/swift4-petstore-nonPublicApi.sh
|
||||
|
||||
8
bin/swift4-petstore-nonPublicApi.json
Normal file
8
bin/swift4-petstore-nonPublicApi.json
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"podSummary": "PetstoreClient",
|
||||
"podHomepage": "https://github.com/openapitools/openapi-generator",
|
||||
"podAuthors": "",
|
||||
"projectName": "PetstoreClient",
|
||||
"nonPublicApi": true,
|
||||
"sortParamsByRequiredFlag": false
|
||||
}
|
||||
42
bin/swift4-petstore-nonPublicApi.sh
Executable file
42
bin/swift4-petstore-nonPublicApi.sh
Executable file
@@ -0,0 +1,42 @@
|
||||
#!/bin/sh
|
||||
|
||||
SCRIPT="$0"
|
||||
echo "# START SCRIPT: $SCRIPT"
|
||||
|
||||
while [ -h "$SCRIPT" ] ; do
|
||||
ls=`ls -ld "$SCRIPT"`
|
||||
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||
if expr "$link" : '/.*' > /dev/null; then
|
||||
SCRIPT="$link"
|
||||
else
|
||||
SCRIPT=`dirname "$SCRIPT"`/"$link"
|
||||
fi
|
||||
done
|
||||
|
||||
if [ ! -d "${APP_DIR}" ]; then
|
||||
APP_DIR=`dirname "$SCRIPT"`/..
|
||||
APP_DIR=`cd "${APP_DIR}"; pwd`
|
||||
fi
|
||||
|
||||
executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar"
|
||||
|
||||
if [ ! -f "$executable" ]
|
||||
then
|
||||
mvn -B clean package
|
||||
fi
|
||||
|
||||
# if you've executed sbt assembly previously it will use that instead.
|
||||
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
|
||||
ags="generate -t modules/openapi-generator/src/main/resources/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-nonPublicApi.json -o samples/client/petstore/swift4/nonPublicApi --generate-alias-as-model $@"
|
||||
|
||||
java $JAVA_OPTS -jar $executable $ags
|
||||
|
||||
if type "xcodegen" > /dev/null 2>&1; then
|
||||
cd samples/client/petstore/swift4/nonPublicApi
|
||||
xcodegen generate
|
||||
fi
|
||||
|
||||
if type "swiftlint" > /dev/null 2>&1; then
|
||||
cd samples/client/petstore/swift4/nonPublicApi
|
||||
swiftlint autocorrect
|
||||
fi
|
||||
@@ -27,7 +27,7 @@ fi
|
||||
|
||||
# if you've executed sbt assembly previously it will use that instead.
|
||||
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
|
||||
ags="generate -t modules/openapi-generator/src/main/resources/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 $@"
|
||||
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-objcCompatible.json -o samples/client/petstore/swift4/objcCompatible --generate-alias-as-model $@"
|
||||
|
||||
java $JAVA_OPTS -jar $executable $ags
|
||||
|
||||
|
||||
@@ -27,16 +27,16 @@ fi
|
||||
|
||||
# if you've executed sbt assembly previously it will use that instead.
|
||||
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
|
||||
ags="generate -t modules/openapi-generator/src/main/resources/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 $@"
|
||||
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/promisekitLibrary --generate-alias-as-model $@"
|
||||
|
||||
java $JAVA_OPTS -jar $executable $ags
|
||||
|
||||
if type "xcodegen" > /dev/null 2>&1; then
|
||||
cd samples/client/petstore/swift4/promisekit
|
||||
cd samples/client/petstore/swift4/promisekitLibrary
|
||||
xcodegen generate
|
||||
fi
|
||||
|
||||
if type "swiftlint" > /dev/null 2>&1; then
|
||||
cd samples/client/petstore/swift4/promisekit
|
||||
cd samples/client/petstore/swift4/promisekitLibrary
|
||||
swiftlint autocorrect
|
||||
fi
|
||||
7
bin/swift4-petstore-result.json
Normal file
7
bin/swift4-petstore-result.json
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"podSummary": "PetstoreClient",
|
||||
"podHomepage": "https://github.com/openapitools/openapi-generator",
|
||||
"podAuthors": "",
|
||||
"projectName": "PetstoreClient",
|
||||
"responseAs": "Result"
|
||||
}
|
||||
42
bin/swift4-petstore-result.sh
Executable file
42
bin/swift4-petstore-result.sh
Executable file
@@ -0,0 +1,42 @@
|
||||
#!/bin/sh
|
||||
|
||||
SCRIPT="$0"
|
||||
echo "# START SCRIPT: $SCRIPT"
|
||||
|
||||
while [ -h "$SCRIPT" ] ; do
|
||||
ls=`ls -ld "$SCRIPT"`
|
||||
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||
if expr "$link" : '/.*' > /dev/null; then
|
||||
SCRIPT="$link"
|
||||
else
|
||||
SCRIPT=`dirname "$SCRIPT"`/"$link"
|
||||
fi
|
||||
done
|
||||
|
||||
if [ ! -d "${APP_DIR}" ]; then
|
||||
APP_DIR=`dirname "$SCRIPT"`/..
|
||||
APP_DIR=`cd "${APP_DIR}"; pwd`
|
||||
fi
|
||||
|
||||
executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar"
|
||||
|
||||
if [ ! -f "$executable" ]
|
||||
then
|
||||
mvn -B clean package
|
||||
fi
|
||||
|
||||
# if you've executed sbt assembly previously it will use that instead.
|
||||
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
|
||||
ags="generate -t modules/openapi-generator/src/main/resources/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-result.json -o samples/client/petstore/swift4/resultLibrary --generate-alias-as-model $@"
|
||||
|
||||
java $JAVA_OPTS -jar $executable $ags
|
||||
|
||||
if type "xcodegen" > /dev/null 2>&1; then
|
||||
cd samples/client/petstore/swift4/resultLibrary
|
||||
xcodegen generate
|
||||
fi
|
||||
|
||||
if type "swiftlint" > /dev/null 2>&1; then
|
||||
cd samples/client/petstore/swift4/resultLibrary
|
||||
swiftlint autocorrect
|
||||
fi
|
||||
@@ -27,16 +27,16 @@ fi
|
||||
|
||||
# if you've executed sbt assembly previously it will use that instead.
|
||||
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
|
||||
ags="generate -t modules/openapi-generator/src/main/resources/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 $@"
|
||||
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/rxswiftLibrary --generate-alias-as-model $@"
|
||||
|
||||
java $JAVA_OPTS -jar $executable $ags
|
||||
|
||||
if type "xcodegen" > /dev/null 2>&1; then
|
||||
cd samples/client/petstore/swift4/rxswift
|
||||
cd samples/client/petstore/swift4/rxswiftLibrary
|
||||
xcodegen generate
|
||||
fi
|
||||
|
||||
if type "swiftlint" > /dev/null 2>&1; then
|
||||
cd samples/client/petstore/swift4/rxswift
|
||||
cd samples/client/petstore/swift4/rxswiftLibrary
|
||||
swiftlint autocorrect
|
||||
fi
|
||||
@@ -27,7 +27,7 @@ fi
|
||||
|
||||
# if you've executed sbt assembly previously it will use that instead.
|
||||
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
|
||||
ags="generate -t modules/openapi-generator/src/main/resources/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 $@"
|
||||
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 --generate-alias-as-model $@"
|
||||
|
||||
java $JAVA_OPTS -jar $executable $ags
|
||||
|
||||
|
||||
4
bin/swift5-all.sh
Executable file
4
bin/swift5-all.sh
Executable file
@@ -0,0 +1,4 @@
|
||||
#!/bin/sh
|
||||
|
||||
./bin/swift5-petstore-all.sh
|
||||
./bin/swift5-test.sh
|
||||
7
bin/swift5-petstore-alamofire.json
Normal file
7
bin/swift5-petstore-alamofire.json
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"podSummary": "PetstoreClient",
|
||||
"podHomepage": "https://github.com/openapitools/openapi-generator",
|
||||
"podAuthors": "",
|
||||
"projectName": "PetstoreClient",
|
||||
"library": "alamofire"
|
||||
}
|
||||
42
bin/swift5-petstore-alamofire.sh
Executable file
42
bin/swift5-petstore-alamofire.sh
Executable file
@@ -0,0 +1,42 @@
|
||||
#!/bin/sh
|
||||
|
||||
SCRIPT="$0"
|
||||
echo "# START SCRIPT: $SCRIPT"
|
||||
|
||||
while [ -h "$SCRIPT" ] ; do
|
||||
ls=`ls -ld "$SCRIPT"`
|
||||
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||
if expr "$link" : '/.*' > /dev/null; then
|
||||
SCRIPT="$link"
|
||||
else
|
||||
SCRIPT=`dirname "$SCRIPT"`/"$link"
|
||||
fi
|
||||
done
|
||||
|
||||
if [ ! -d "${APP_DIR}" ]; then
|
||||
APP_DIR=`dirname "$SCRIPT"`/..
|
||||
APP_DIR=`cd "${APP_DIR}"; pwd`
|
||||
fi
|
||||
|
||||
executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar"
|
||||
|
||||
if [ ! -f "$executable" ]
|
||||
then
|
||||
mvn -B clean package
|
||||
fi
|
||||
|
||||
# if you've executed sbt assembly previously it will use that instead.
|
||||
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
|
||||
ags="generate -t modules/openapi-generator/src/main/resources/swift5 -i modules/openapi-generator/src/test/resources/2_0/swift/petstore-with-fake-endpoints-models-for-testing.yaml -g swift5 -c ./bin/swift5-petstore-alamofire.json -o samples/client/petstore/swift5/alamofireLibrary --generate-alias-as-model $@"
|
||||
|
||||
java $JAVA_OPTS -jar $executable $ags
|
||||
|
||||
if type "xcodegen" > /dev/null 2>&1; then
|
||||
cd samples/client/petstore/swift5/alamofireLibrary
|
||||
xcodegen generate
|
||||
fi
|
||||
|
||||
if type "swiftlint" > /dev/null 2>&1; then
|
||||
cd samples/client/petstore/swift5/alamofireLibrary
|
||||
swiftlint autocorrect
|
||||
fi
|
||||
12
bin/swift5-petstore-all.sh
Executable file
12
bin/swift5-petstore-all.sh
Executable file
@@ -0,0 +1,12 @@
|
||||
#!/bin/sh
|
||||
|
||||
./bin/swift5-petstore.sh
|
||||
./bin/swift5-petstore-promisekit.sh
|
||||
./bin/swift5-petstore-result.sh
|
||||
./bin/swift5-petstore-rxswift.sh
|
||||
./bin/swift5-petstore-objcCompatible.sh
|
||||
./bin/swift5-petstore-nonPublicApi.sh
|
||||
./bin/swift5-petstore-urlsession.sh
|
||||
./bin/swift5-petstore-alamofire.sh
|
||||
./bin/swift5-petstore-combine.sh
|
||||
|
||||
7
bin/swift5-petstore-combine.json
Normal file
7
bin/swift5-petstore-combine.json
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"podSummary": "PetstoreClient",
|
||||
"podHomepage": "https://github.com/openapitools/openapi-generator",
|
||||
"podAuthors": "",
|
||||
"projectName": "PetstoreClient",
|
||||
"responseAs": "Combine"
|
||||
}
|
||||
42
bin/swift5-petstore-combine.sh
Executable file
42
bin/swift5-petstore-combine.sh
Executable file
@@ -0,0 +1,42 @@
|
||||
#!/bin/sh
|
||||
|
||||
SCRIPT="$0"
|
||||
echo "# START SCRIPT: $SCRIPT"
|
||||
|
||||
while [ -h "$SCRIPT" ] ; do
|
||||
ls=`ls -ld "$SCRIPT"`
|
||||
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||
if expr "$link" : '/.*' > /dev/null; then
|
||||
SCRIPT="$link"
|
||||
else
|
||||
SCRIPT=`dirname "$SCRIPT"`/"$link"
|
||||
fi
|
||||
done
|
||||
|
||||
if [ ! -d "${APP_DIR}" ]; then
|
||||
APP_DIR=`dirname "$SCRIPT"`/..
|
||||
APP_DIR=`cd "${APP_DIR}"; pwd`
|
||||
fi
|
||||
|
||||
executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar"
|
||||
|
||||
if [ ! -f "$executable" ]
|
||||
then
|
||||
mvn -B clean package
|
||||
fi
|
||||
|
||||
# if you've executed sbt assembly previously it will use that instead.
|
||||
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
|
||||
ags="generate -t modules/openapi-generator/src/main/resources/swift5 -i modules/openapi-generator/src/test/resources/2_0/swift/petstore-with-fake-endpoints-models-for-testing.yaml -g swift5 -c ./bin/swift5-petstore-combine.json -o samples/client/petstore/swift5/combineLibrary --generate-alias-as-model $@"
|
||||
|
||||
java $JAVA_OPTS -jar $executable $ags
|
||||
|
||||
if type "xcodegen" > /dev/null 2>&1; then
|
||||
cd samples/client/petstore/swift5/combineLibrary
|
||||
xcodegen generate
|
||||
fi
|
||||
|
||||
if type "swiftlint" > /dev/null 2>&1; then
|
||||
cd samples/client/petstore/swift5/combineLibrary
|
||||
swiftlint autocorrect
|
||||
fi
|
||||
8
bin/swift5-petstore-nonPublicApi.json
Normal file
8
bin/swift5-petstore-nonPublicApi.json
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"podSummary": "PetstoreClient",
|
||||
"podHomepage": "https://github.com/openapitools/openapi-generator",
|
||||
"podAuthors": "",
|
||||
"projectName": "PetstoreClient",
|
||||
"nonPublicApi": true,
|
||||
"sortParamsByRequiredFlag": false
|
||||
}
|
||||
42
bin/swift5-petstore-nonPublicApi.sh
Executable file
42
bin/swift5-petstore-nonPublicApi.sh
Executable file
@@ -0,0 +1,42 @@
|
||||
#!/bin/sh
|
||||
|
||||
SCRIPT="$0"
|
||||
echo "# START SCRIPT: $SCRIPT"
|
||||
|
||||
while [ -h "$SCRIPT" ] ; do
|
||||
ls=`ls -ld "$SCRIPT"`
|
||||
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||
if expr "$link" : '/.*' > /dev/null; then
|
||||
SCRIPT="$link"
|
||||
else
|
||||
SCRIPT=`dirname "$SCRIPT"`/"$link"
|
||||
fi
|
||||
done
|
||||
|
||||
if [ ! -d "${APP_DIR}" ]; then
|
||||
APP_DIR=`dirname "$SCRIPT"`/..
|
||||
APP_DIR=`cd "${APP_DIR}"; pwd`
|
||||
fi
|
||||
|
||||
executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar"
|
||||
|
||||
if [ ! -f "$executable" ]
|
||||
then
|
||||
mvn -B clean package
|
||||
fi
|
||||
|
||||
# if you've executed sbt assembly previously it will use that instead.
|
||||
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
|
||||
ags="generate -t modules/openapi-generator/src/main/resources/swift5 -i modules/openapi-generator/src/test/resources/2_0/swift/petstore-with-fake-endpoints-models-for-testing.yaml -g swift5 -c ./bin/swift5-petstore-nonPublicApi.json -o samples/client/petstore/swift5/nonPublicApi --generate-alias-as-model $@"
|
||||
|
||||
java $JAVA_OPTS -jar $executable $ags
|
||||
|
||||
if type "xcodegen" > /dev/null 2>&1; then
|
||||
cd samples/client/petstore/swift5/nonPublicApi
|
||||
xcodegen generate
|
||||
fi
|
||||
|
||||
if type "swiftlint" > /dev/null 2>&1; then
|
||||
cd samples/client/petstore/swift5/nonPublicApi
|
||||
swiftlint autocorrect
|
||||
fi
|
||||
7
bin/swift5-petstore-objcCompatible.json
Normal file
7
bin/swift5-petstore-objcCompatible.json
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"podSummary": "PetstoreClient",
|
||||
"podHomepage": "https://github.com/openapitools/openapi-generator",
|
||||
"podAuthors": "",
|
||||
"projectName": "PetstoreClient",
|
||||
"objcCompatible": true
|
||||
}
|
||||
42
bin/swift5-petstore-objcCompatible.sh
Executable file
42
bin/swift5-petstore-objcCompatible.sh
Executable file
@@ -0,0 +1,42 @@
|
||||
#!/bin/sh
|
||||
|
||||
SCRIPT="$0"
|
||||
echo "# START SCRIPT: $SCRIPT"
|
||||
|
||||
while [ -h "$SCRIPT" ] ; do
|
||||
ls=`ls -ld "$SCRIPT"`
|
||||
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||
if expr "$link" : '/.*' > /dev/null; then
|
||||
SCRIPT="$link"
|
||||
else
|
||||
SCRIPT=`dirname "$SCRIPT"`/"$link"
|
||||
fi
|
||||
done
|
||||
|
||||
if [ ! -d "${APP_DIR}" ]; then
|
||||
APP_DIR=`dirname "$SCRIPT"`/..
|
||||
APP_DIR=`cd "${APP_DIR}"; pwd`
|
||||
fi
|
||||
|
||||
executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar"
|
||||
|
||||
if [ ! -f "$executable" ]
|
||||
then
|
||||
mvn -B clean package
|
||||
fi
|
||||
|
||||
# if you've executed sbt assembly previously it will use that instead.
|
||||
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
|
||||
ags="generate -t modules/openapi-generator/src/main/resources/swift5 -i modules/openapi-generator/src/test/resources/2_0/swift/petstore-with-fake-endpoints-models-for-testing.yaml -g swift5 -c ./bin/swift5-petstore-objcCompatible.json -o samples/client/petstore/swift5/objcCompatible --generate-alias-as-model $@"
|
||||
|
||||
java $JAVA_OPTS -jar $executable $ags
|
||||
|
||||
if type "xcodegen" > /dev/null 2>&1; then
|
||||
cd samples/client/petstore/swift5/objcCompatible
|
||||
xcodegen generate
|
||||
fi
|
||||
|
||||
if type "swiftlint" > /dev/null 2>&1; then
|
||||
cd samples/client/petstore/swift5/objcCompatible
|
||||
swiftlint autocorrect
|
||||
fi
|
||||
7
bin/swift5-petstore-promisekit.json
Normal file
7
bin/swift5-petstore-promisekit.json
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"podSummary": "PetstoreClient",
|
||||
"podHomepage": "https://github.com/openapitools/openapi-generator",
|
||||
"podAuthors": "",
|
||||
"projectName": "PetstoreClient",
|
||||
"responseAs": "PromiseKit"
|
||||
}
|
||||
42
bin/swift5-petstore-promisekit.sh
Executable file
42
bin/swift5-petstore-promisekit.sh
Executable file
@@ -0,0 +1,42 @@
|
||||
#!/bin/sh
|
||||
|
||||
SCRIPT="$0"
|
||||
echo "# START SCRIPT: $SCRIPT"
|
||||
|
||||
while [ -h "$SCRIPT" ] ; do
|
||||
ls=`ls -ld "$SCRIPT"`
|
||||
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||
if expr "$link" : '/.*' > /dev/null; then
|
||||
SCRIPT="$link"
|
||||
else
|
||||
SCRIPT=`dirname "$SCRIPT"`/"$link"
|
||||
fi
|
||||
done
|
||||
|
||||
if [ ! -d "${APP_DIR}" ]; then
|
||||
APP_DIR=`dirname "$SCRIPT"`/..
|
||||
APP_DIR=`cd "${APP_DIR}"; pwd`
|
||||
fi
|
||||
|
||||
executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar"
|
||||
|
||||
if [ ! -f "$executable" ]
|
||||
then
|
||||
mvn -B clean package
|
||||
fi
|
||||
|
||||
# if you've executed sbt assembly previously it will use that instead.
|
||||
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
|
||||
ags="generate -t modules/openapi-generator/src/main/resources/swift5 -i modules/openapi-generator/src/test/resources/2_0/swift/petstore-with-fake-endpoints-models-for-testing.yaml -g swift5 -c ./bin/swift5-petstore-promisekit.json -o samples/client/petstore/swift5/promisekitLibrary --generate-alias-as-model $@"
|
||||
|
||||
java $JAVA_OPTS -jar $executable $ags
|
||||
|
||||
if type "xcodegen" > /dev/null 2>&1; then
|
||||
cd samples/client/petstore/swift5/promisekitLibrary
|
||||
xcodegen generate
|
||||
fi
|
||||
|
||||
if type "swiftlint" > /dev/null 2>&1; then
|
||||
cd samples/client/petstore/swift5/promisekitLibrary
|
||||
swiftlint autocorrect
|
||||
fi
|
||||
7
bin/swift5-petstore-result.json
Normal file
7
bin/swift5-petstore-result.json
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"podSummary": "PetstoreClient",
|
||||
"podHomepage": "https://github.com/openapitools/openapi-generator",
|
||||
"podAuthors": "",
|
||||
"projectName": "PetstoreClient",
|
||||
"responseAs": "Result"
|
||||
}
|
||||
42
bin/swift5-petstore-result.sh
Executable file
42
bin/swift5-petstore-result.sh
Executable file
@@ -0,0 +1,42 @@
|
||||
#!/bin/sh
|
||||
|
||||
SCRIPT="$0"
|
||||
echo "# START SCRIPT: $SCRIPT"
|
||||
|
||||
while [ -h "$SCRIPT" ] ; do
|
||||
ls=`ls -ld "$SCRIPT"`
|
||||
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||
if expr "$link" : '/.*' > /dev/null; then
|
||||
SCRIPT="$link"
|
||||
else
|
||||
SCRIPT=`dirname "$SCRIPT"`/"$link"
|
||||
fi
|
||||
done
|
||||
|
||||
if [ ! -d "${APP_DIR}" ]; then
|
||||
APP_DIR=`dirname "$SCRIPT"`/..
|
||||
APP_DIR=`cd "${APP_DIR}"; pwd`
|
||||
fi
|
||||
|
||||
executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar"
|
||||
|
||||
if [ ! -f "$executable" ]
|
||||
then
|
||||
mvn -B clean package
|
||||
fi
|
||||
|
||||
# if you've executed sbt assembly previously it will use that instead.
|
||||
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
|
||||
ags="generate -t modules/openapi-generator/src/main/resources/swift5 -i modules/openapi-generator/src/test/resources/2_0/swift/petstore-with-fake-endpoints-models-for-testing.yaml -g swift5 -c ./bin/swift5-petstore-result.json -o samples/client/petstore/swift5/resultLibrary --generate-alias-as-model $@"
|
||||
|
||||
java $JAVA_OPTS -jar $executable $ags
|
||||
|
||||
if type "xcodegen" > /dev/null 2>&1; then
|
||||
cd samples/client/petstore/swift5/resultLibrary
|
||||
xcodegen generate
|
||||
fi
|
||||
|
||||
if type "swiftlint" > /dev/null 2>&1; then
|
||||
cd samples/client/petstore/swift5/resultLibrary
|
||||
swiftlint autocorrect
|
||||
fi
|
||||
7
bin/swift5-petstore-rxswift.json
Normal file
7
bin/swift5-petstore-rxswift.json
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"podSummary": "PetstoreClient",
|
||||
"podHomepage": "https://github.com/openapitools/openapi-generator",
|
||||
"podAuthors": "",
|
||||
"projectName": "PetstoreClient",
|
||||
"responseAs": "RxSwift"
|
||||
}
|
||||
42
bin/swift5-petstore-rxswift.sh
Executable file
42
bin/swift5-petstore-rxswift.sh
Executable file
@@ -0,0 +1,42 @@
|
||||
#!/bin/sh
|
||||
|
||||
SCRIPT="$0"
|
||||
echo "# START SCRIPT: $SCRIPT"
|
||||
|
||||
while [ -h "$SCRIPT" ] ; do
|
||||
ls=`ls -ld "$SCRIPT"`
|
||||
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||
if expr "$link" : '/.*' > /dev/null; then
|
||||
SCRIPT="$link"
|
||||
else
|
||||
SCRIPT=`dirname "$SCRIPT"`/"$link"
|
||||
fi
|
||||
done
|
||||
|
||||
if [ ! -d "${APP_DIR}" ]; then
|
||||
APP_DIR=`dirname "$SCRIPT"`/..
|
||||
APP_DIR=`cd "${APP_DIR}"; pwd`
|
||||
fi
|
||||
|
||||
executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar"
|
||||
|
||||
if [ ! -f "$executable" ]
|
||||
then
|
||||
mvn -B clean package
|
||||
fi
|
||||
|
||||
# if you've executed sbt assembly previously it will use that instead.
|
||||
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
|
||||
ags="generate -t modules/openapi-generator/src/main/resources/swift5 -i modules/openapi-generator/src/test/resources/2_0/swift/petstore-with-fake-endpoints-models-for-testing.yaml -g swift5 -c ./bin/swift5-petstore-rxswift.json -o samples/client/petstore/swift5/rxswiftLibrary --generate-alias-as-model $@"
|
||||
|
||||
java $JAVA_OPTS -jar $executable $ags
|
||||
|
||||
if type "xcodegen" > /dev/null 2>&1; then
|
||||
cd samples/client/petstore/swift5/rxswiftLibrary
|
||||
xcodegen generate
|
||||
fi
|
||||
|
||||
if type "swiftlint" > /dev/null 2>&1; then
|
||||
cd samples/client/petstore/swift5/rxswiftLibrary
|
||||
swiftlint autocorrect
|
||||
fi
|
||||
7
bin/swift5-petstore-urlsession.json
Normal file
7
bin/swift5-petstore-urlsession.json
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"podSummary": "PetstoreClient",
|
||||
"podHomepage": "https://github.com/openapitools/openapi-generator",
|
||||
"podAuthors": "",
|
||||
"projectName": "PetstoreClient",
|
||||
"library": "urlsession"
|
||||
}
|
||||
42
bin/swift5-petstore-urlsession.sh
Executable file
42
bin/swift5-petstore-urlsession.sh
Executable file
@@ -0,0 +1,42 @@
|
||||
#!/bin/sh
|
||||
|
||||
SCRIPT="$0"
|
||||
echo "# START SCRIPT: $SCRIPT"
|
||||
|
||||
while [ -h "$SCRIPT" ] ; do
|
||||
ls=`ls -ld "$SCRIPT"`
|
||||
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||
if expr "$link" : '/.*' > /dev/null; then
|
||||
SCRIPT="$link"
|
||||
else
|
||||
SCRIPT=`dirname "$SCRIPT"`/"$link"
|
||||
fi
|
||||
done
|
||||
|
||||
if [ ! -d "${APP_DIR}" ]; then
|
||||
APP_DIR=`dirname "$SCRIPT"`/..
|
||||
APP_DIR=`cd "${APP_DIR}"; pwd`
|
||||
fi
|
||||
|
||||
executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar"
|
||||
|
||||
if [ ! -f "$executable" ]
|
||||
then
|
||||
mvn -B clean package
|
||||
fi
|
||||
|
||||
# if you've executed sbt assembly previously it will use that instead.
|
||||
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
|
||||
ags="generate -t modules/openapi-generator/src/main/resources/swift5 -i modules/openapi-generator/src/test/resources/2_0/swift/petstore-with-fake-endpoints-models-for-testing.yaml -g swift5 -c ./bin/swift5-petstore-urlsession.json -o samples/client/petstore/swift5/urlsessionLibrary --generate-alias-as-model $@"
|
||||
|
||||
java $JAVA_OPTS -jar $executable $ags
|
||||
|
||||
if type "xcodegen" > /dev/null 2>&1; then
|
||||
cd samples/client/petstore/swift5/urlsessionLibrary
|
||||
xcodegen generate
|
||||
fi
|
||||
|
||||
if type "swiftlint" > /dev/null 2>&1; then
|
||||
cd samples/client/petstore/swift5/urlsessionLibrary
|
||||
swiftlint autocorrect
|
||||
fi
|
||||
6
bin/swift5-petstore.json
Normal file
6
bin/swift5-petstore.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"podSummary": "PetstoreClient",
|
||||
"podHomepage": "https://github.com/openapitools/openapi-generator",
|
||||
"podAuthors": "",
|
||||
"projectName": "PetstoreClient"
|
||||
}
|
||||
42
bin/swift5-petstore.sh
Executable file
42
bin/swift5-petstore.sh
Executable file
@@ -0,0 +1,42 @@
|
||||
#!/bin/sh
|
||||
|
||||
SCRIPT="$0"
|
||||
echo "# START SCRIPT: $SCRIPT"
|
||||
|
||||
while [ -h "$SCRIPT" ] ; do
|
||||
ls=`ls -ld "$SCRIPT"`
|
||||
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||
if expr "$link" : '/.*' > /dev/null; then
|
||||
SCRIPT="$link"
|
||||
else
|
||||
SCRIPT=`dirname "$SCRIPT"`/"$link"
|
||||
fi
|
||||
done
|
||||
|
||||
if [ ! -d "${APP_DIR}" ]; then
|
||||
APP_DIR=`dirname "$SCRIPT"`/..
|
||||
APP_DIR=`cd "${APP_DIR}"; pwd`
|
||||
fi
|
||||
|
||||
executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar"
|
||||
|
||||
if [ ! -f "$executable" ]
|
||||
then
|
||||
mvn -B clean package
|
||||
fi
|
||||
|
||||
# if you've executed sbt assembly previously it will use that instead.
|
||||
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
|
||||
ags="generate -t modules/openapi-generator/src/main/resources/swift5 -i modules/openapi-generator/src/test/resources/2_0/swift/petstore-with-fake-endpoints-models-for-testing.yaml -g swift5 -c ./bin/swift5-petstore.json -o samples/client/petstore/swift5/default --generate-alias-as-model $@"
|
||||
|
||||
java $JAVA_OPTS -jar $executable $ags
|
||||
|
||||
if type "xcodegen" > /dev/null 2>&1; then
|
||||
cd samples/client/petstore/swift5/default
|
||||
xcodegen generate
|
||||
fi
|
||||
|
||||
if type "swiftlint" > /dev/null 2>&1; then
|
||||
cd samples/client/petstore/swift5/default
|
||||
swiftlint autocorrect
|
||||
fi
|
||||
6
bin/swift5-test.json
Normal file
6
bin/swift5-test.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"podSummary": "TestClient",
|
||||
"podHomepage": "https://github.com/openapitools/openapi-generator",
|
||||
"podAuthors": "",
|
||||
"projectName": "TestClient"
|
||||
}
|
||||
42
bin/swift5-test.sh
Executable file
42
bin/swift5-test.sh
Executable file
@@ -0,0 +1,42 @@
|
||||
#!/bin/sh
|
||||
|
||||
SCRIPT="$0"
|
||||
echo "# START SCRIPT: $SCRIPT"
|
||||
|
||||
while [ -h "$SCRIPT" ] ; do
|
||||
ls=`ls -ld "$SCRIPT"`
|
||||
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||
if expr "$link" : '/.*' > /dev/null; then
|
||||
SCRIPT="$link"
|
||||
else
|
||||
SCRIPT=`dirname "$SCRIPT"`/"$link"
|
||||
fi
|
||||
done
|
||||
|
||||
if [ ! -d "${APP_DIR}" ]; then
|
||||
APP_DIR=`dirname "$SCRIPT"`/..
|
||||
APP_DIR=`cd "${APP_DIR}"; pwd`
|
||||
fi
|
||||
|
||||
executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar"
|
||||
|
||||
if [ ! -f "$executable" ]
|
||||
then
|
||||
mvn -B clean package
|
||||
fi
|
||||
|
||||
# if you've executed sbt assembly previously it will use that instead.
|
||||
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
|
||||
ags="generate -t modules/openapi-generator/src/main/resources/swift5 -i modules/openapi-generator/src/test/resources/2_0/swift5Test.json -g swift5 -c ./bin/swift5-test.json -o samples/client/test/swift5/default --generate-alias-as-model $@"
|
||||
|
||||
java $JAVA_OPTS -jar $executable $ags
|
||||
|
||||
if type "xcodegen" > /dev/null 2>&1; then
|
||||
cd samples/client/test/swift5/default
|
||||
xcodegen generate
|
||||
fi
|
||||
|
||||
if type "swiftlint" > /dev/null 2>&1; then
|
||||
cd samples/client/test/swift5/default
|
||||
swiftlint autocorrect
|
||||
fi
|
||||
@@ -15,3 +15,4 @@
|
||||
./bin/typescript-angular-v7-petstore-provided-in-root-with-npm.sh
|
||||
./bin/typescript-angular-v8-petstore-provided-in-root-with-npm.sh
|
||||
./bin/typescript-angular-v8-petstore-provided-in-root-with-prefixed-module-name.sh
|
||||
./bin/typescript-angular-v8-petstore-single-request-parameter.sh
|
||||
|
||||
@@ -22,11 +22,11 @@ executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar"
|
||||
|
||||
if [ ! -f "$executable" ]
|
||||
then
|
||||
mvn clean package
|
||||
mvn -B clean package
|
||||
fi
|
||||
|
||||
# if you've executed sbt assembly previously it will use that instead.
|
||||
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
|
||||
ags="generate -t modules/openapi-generator/src/main/resources/nodejs -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g nodejs-server-deprecated -o samples/server/petstore/nodejs -Dservice $@"
|
||||
ags="generate -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/single-request-parameter --additional-properties ngVersion=8.0.0,useSingleRequestParameter=true $@"
|
||||
|
||||
java $JAVA_OPTS -jar $executable $ags
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"npmName": "@openapitools/typescript-redux-query-petstore",
|
||||
"npmVersion": "1.0.0",
|
||||
"npmRepository" : "https://skimdb.npmjs.com/registry",
|
||||
"snapshot" : false
|
||||
}
|
||||
@@ -27,6 +27,6 @@ fi
|
||||
|
||||
# if you've executed sbt assembly previously it will use that instead.
|
||||
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
|
||||
ags="generate -t modules/openapi-generator/src/main/resources/nodejs -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g nodejs-server-deprecated -o samples/server/petstore/nodejs -Dservice $@"
|
||||
ags="generate -t modules/openapi-generator/src/main/resources/typescript-redux-query -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g typescript-redux-query -c bin/typescript-redux-query-petstore-with-npm-version.json -o samples/client/petstore/typescript-redux-query/builds/with-npm-version $@"
|
||||
|
||||
java $JAVA_OPTS -jar $executable $ags
|
||||
@@ -27,6 +27,6 @@ fi
|
||||
|
||||
# if you've executed sbt assembly previously it will use that instead.
|
||||
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
|
||||
ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g nodejs-server-deprecated --additional-properties=googleCloudFunctions=true -o samples/server/petstore/nodejs-google-cloud-functions -Dservice $@"
|
||||
ags="generate -t modules/openapi-generator/src/main/resources/typescript-redux-query -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g typescript-redux-query -o samples/client/petstore/typescript-redux-query/builds/default $@"
|
||||
|
||||
java $JAVA_OPTS -jar $executable $ags
|
||||
20
bin/utils/dart-keywords/README.md
Normal file
20
bin/utils/dart-keywords/README.md
Normal file
@@ -0,0 +1,20 @@
|
||||
|
||||
## What is the purpose?
|
||||
|
||||
Running `./save_dart_keywords.sh` from this directory will generate `dart-keywords.txt` which contains the current Dart keywords and is used by the dart generator as a set of reserved words.
|
||||
|
||||
## When should the keywords be generated?
|
||||
|
||||
`save_dart_keywords.sh` should be run when a new version of Dart is release to update the keywords file.
|
||||
|
||||
The last Dart version that was used to generate the keywords can be found in `dart-version.txt`.
|
||||
|
||||
## What does the shellscript do?
|
||||
|
||||
1. compile a dart app
|
||||
- `dart2native save-dart-keywords.dart`
|
||||
|
||||
1. run the dart app
|
||||
- `./save-dart-keywords.exe`
|
||||
|
||||
1. the ouput is `dart-keywords.txt` and `dart-version.txt`
|
||||
1
bin/utils/dart-keywords/dart-version.txt
Normal file
1
bin/utils/dart-keywords/dart-version.txt
Normal file
@@ -0,0 +1 @@
|
||||
Dart VM version: 2.7.0-dev.0.0 (Tue Nov 5 12:57:33 2019 +0100) on "macos_x64"
|
||||
194
bin/utils/dart-keywords/pubspec.lock
Normal file
194
bin/utils/dart-keywords/pubspec.lock
Normal file
@@ -0,0 +1,194 @@
|
||||
# Generated by pub
|
||||
# See https://dart.dev/tools/pub/glossary#lockfile
|
||||
packages:
|
||||
_fe_analyzer_shared:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: _fe_analyzer_shared
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.0.0"
|
||||
analyzer:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: analyzer
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "0.39.1"
|
||||
args:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: args
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.5.2"
|
||||
async:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: async
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.4.0"
|
||||
charcode:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: charcode
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.1.2"
|
||||
collection:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: collection
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.14.12"
|
||||
convert:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: convert
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.1.1"
|
||||
crypto:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: crypto
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.1.3"
|
||||
csslib:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: csslib
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "0.16.1"
|
||||
front_end:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: front_end
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "0.1.29"
|
||||
glob:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: glob
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.2.0"
|
||||
html:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: html
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "0.14.0+3"
|
||||
js:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: js
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "0.6.1+1"
|
||||
kernel:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: kernel
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "0.3.29"
|
||||
meta:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: meta
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.1.8"
|
||||
node_interop:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: node_interop
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.0.3"
|
||||
node_io:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: node_io
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.0.1+2"
|
||||
package_config:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: package_config
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.1.0"
|
||||
path:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: path
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.6.4"
|
||||
pedantic:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: pedantic
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.8.0+1"
|
||||
pub_semver:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: pub_semver
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.4.2"
|
||||
source_span:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: source_span
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.5.5"
|
||||
string_scanner:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: string_scanner
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.0.5"
|
||||
term_glyph:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: term_glyph
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.1.0"
|
||||
typed_data:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: typed_data
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.1.6"
|
||||
watcher:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: watcher
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "0.9.7+12"
|
||||
yaml:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: yaml
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.2.0"
|
||||
sdks:
|
||||
dart: ">=2.6.0 <3.0.0"
|
||||
10
bin/utils/dart-keywords/pubspec.yaml
Normal file
10
bin/utils/dart-keywords/pubspec.yaml
Normal file
@@ -0,0 +1,10 @@
|
||||
name: dart_keywords
|
||||
description: Use the Dart SDK to generate Dart keywords.
|
||||
|
||||
version: 1.0.0+1
|
||||
|
||||
environment:
|
||||
sdk: ">=2.6.0 <3.0.0"
|
||||
|
||||
dependencies:
|
||||
analyzer:
|
||||
16
bin/utils/dart-keywords/save-dart-keywords.dart
Normal file
16
bin/utils/dart-keywords/save-dart-keywords.dart
Normal file
@@ -0,0 +1,16 @@
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:analyzer/dart/ast/token.dart';
|
||||
|
||||
main() {
|
||||
// save keywords to a text file
|
||||
final txtFile = File(
|
||||
'../../../modules/openapi-generator/src/main/resources/dart/dart-keywords.txt');
|
||||
String txtString = '';
|
||||
for (String keyword in Keyword.keywords.keys.toList()) {
|
||||
txtString += keyword + '\n';
|
||||
}
|
||||
txtString =
|
||||
txtString.substring(0, txtString.length - 1); // remove last newline
|
||||
txtFile.writeAsStringSync(txtString);
|
||||
}
|
||||
3
bin/utils/dart-keywords/save_dart_keywords.sh
Executable file
3
bin/utils/dart-keywords/save_dart_keywords.sh
Executable file
@@ -0,0 +1,3 @@
|
||||
dart2native save-dart-keywords.dart
|
||||
./save-dart-keywords.exe
|
||||
dart --version &> dart-version.txt
|
||||
@@ -1,92 +1,122 @@
|
||||
#!/bin/bash
|
||||
# this bash script run the scripts for the 'mature' generators
|
||||
#!/usr/bin/env bash
|
||||
# this bash script runs the scripts for the 'mature' generators by default.
|
||||
# Supports --batch option which will compile all generators defined under bin/ci/*.json
|
||||
# it ensures that all changes are committed into the 'samples/' folder
|
||||
# shellcheck disable=SC2155
|
||||
declare cwd="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
declare root="$(cd "$cwd" && cd ../../ && pwd)"
|
||||
declare executable="${root}/modules/openapi-generator-cli/target/openapi-generator-cli.jar"
|
||||
declare batch_mode="false"
|
||||
|
||||
echo "# START SCRIPT: $0"
|
||||
|
||||
echo "IMPORTANT: this script should be run by the CI (e.g. Shippable) to ensure that the 'samples/' folder is up to date."
|
||||
if [ "--batch" = "$1" ]; then
|
||||
batch_mode="true"
|
||||
echo "Running in 'batch mode' (single JVM, mutliple threads)."
|
||||
else
|
||||
echo "When running locally execute with argument --batch."
|
||||
fi
|
||||
echo "Please press CTRL+C to stop or the script will continue in 5 seconds."
|
||||
|
||||
sleep 5
|
||||
|
||||
# LIST OF SCRIPTS:
|
||||
declare -a scripts=(
|
||||
# SAMPLES
|
||||
"./bin/ruby-client-petstore.sh"
|
||||
"./bin/ruby-client-petstore-faraday.sh"
|
||||
"./bin/openapi3/ruby-client-petstore.sh"
|
||||
"./bin/openapi3/ruby-client-faraday-petstore.sh"
|
||||
declare -a samples=(
|
||||
"${root}/bin/ruby-client-petstore.sh"
|
||||
"${root}/bin/ruby-client-petstore-faraday.sh"
|
||||
"${root}/bin/openapi3/ruby-client-petstore.sh"
|
||||
"${root}/bin/openapi3/ruby-client-faraday-petstore.sh"
|
||||
"${root}/bin/java-petstore-all.sh"
|
||||
"${root}/bin/java-jaxrs-petstore-server-all.sh"
|
||||
"${root}/bin/java-msf4j-petstore-server.sh"
|
||||
"${root}/bin/openapi3/jaxrs-jersey-petstore.sh"
|
||||
"${root}/bin/spring-all-petstore.sh"
|
||||
"${root}/bin/javascript-petstore-all.sh"
|
||||
"${root}/bin/kotlin-client-all.sh"
|
||||
"${root}/bin/kotlin-server-petstore.sh"
|
||||
"${root}/bin/kotlin-springboot-petstore-server.sh"
|
||||
"${root}/bin/kotlin-springboot-petstore-server-reactive.sh"
|
||||
"${root}/bin/mysql-schema-petstore.sh"
|
||||
"${root}/bin/nim-client-petstore.sh"
|
||||
"${root}/bin/python-petstore-all.sh"
|
||||
"${root}/bin/openapi3/python-petstore.sh"
|
||||
"${root}/bin/php-petstore.sh"
|
||||
"${root}/bin/php-silex-petstore-server.sh"
|
||||
"${root}/bin/php-symfony-petstore.sh"
|
||||
"${root}/bin/php-lumen-petstore-server.sh"
|
||||
"${root}/bin/php-slim-server-petstore.sh"
|
||||
#"${root}/bin/php-slim4-server-petstore.sh"
|
||||
"${root}/bin/php-ze-ph-petstore-server.sh"
|
||||
"${root}/bin/openapi3/php-petstore.sh"
|
||||
"${root}/bin/typescript-angularjs-petstore.sh"
|
||||
"${root}/bin/typescript-angular-petstore-all.sh"
|
||||
"${root}/bin/typescript-aurelia-petstore.sh"
|
||||
"${root}/bin/typescript-axios-petstore-all.sh"
|
||||
"${root}/bin/typescript-fetch-petstore-all.sh"
|
||||
"${root}/bin/typescript-inversify-petstore.sh"
|
||||
"${root}/bin/typescript-jquery-petstore-all.sh"
|
||||
"${root}/bin/typescript-node-petstore-all.sh"
|
||||
"${root}/bin/typescript-rxjs-petstore-all.sh"
|
||||
"${root}/bin/rust-server-petstore.sh"
|
||||
"${root}/bin/r-petstore.sh"
|
||||
"${root}/bin/haskell-http-client-petstore.sh"
|
||||
"${root}/bin/csharp-petstore.sh"
|
||||
"${root}/bin/csharp-netcore-petstore-all.sh"
|
||||
"${root}/bin/elixir-petstore.sh"
|
||||
"${root}/bin/openapi3/go-petstore.sh"
|
||||
"${root}/bin/go-experimental-petstore.sh"
|
||||
"${root}/bin/go-petstore.sh"
|
||||
"${root}/bin/go-petstore-withxml.sh"
|
||||
"${root}/bin/go-petstore-server.sh"
|
||||
"${root}/bin/go-gin-petstore-server.sh"
|
||||
"${root}/bin/groovy-petstore.sh"
|
||||
"${root}/bin/apex-petstore.sh"
|
||||
"${root}/bin/perl-petstore-all.sh"
|
||||
"${root}/bin/dart-jaguar-petstore.sh"
|
||||
#"${root}/bin/dart-dio-petstore.sh"
|
||||
"${root}/bin/dart-petstore.sh"
|
||||
"${root}/bin/dart2-petstore.sh"
|
||||
"${root}/bin/java-play-framework-petstore-server-all.sh"
|
||||
#"${root}/bin/elm-petstore-all.sh"
|
||||
"${root}/bin/typescript-redux-query-petstore-with-npm-version.sh"
|
||||
)
|
||||
|
||||
"./bin/java-petstore-all.sh"
|
||||
"./bin/java-jaxrs-petstore-server-all.sh"
|
||||
"./bin/java-msf4j-petstore-server.sh"
|
||||
"./bin/openapi3/jaxrs-jersey-petstore.sh"
|
||||
"./bin/spring-all-petstore.sh"
|
||||
"./bin/javascript-petstore-all.sh"
|
||||
"./bin/kotlin-client-petstore-multiplatform.sh"
|
||||
"./bin/kotlin-client-petstore.sh"
|
||||
"./bin/kotlin-client-string.sh"
|
||||
"./bin/kotlin-client-threetenbp.sh"
|
||||
"./bin/kotlin-server-petstore.sh"
|
||||
"./bin/kotlin-springboot-petstore-server.sh"
|
||||
"./bin/kotlin-springboot-petstore-server-reactive.sh"
|
||||
"./bin/mysql-schema-petstore.sh"
|
||||
"./bin/nim-client-petstore.sh"
|
||||
"./bin/python-petstore-all.sh"
|
||||
"./bin/openapi3/python-petstore.sh"
|
||||
"./bin/php-petstore.sh"
|
||||
"./bin/php-silex-petstore-server.sh"
|
||||
"./bin/php-symfony-petstore.sh"
|
||||
"./bin/php-lumen-petstore-server.sh"
|
||||
"./bin/php-slim-server-petstore.sh"
|
||||
"./bin/php-slim4-server-petstore.sh"
|
||||
"./bin/php-ze-ph-petstore-server.sh"
|
||||
"./bin/openapi3/php-petstore.sh"
|
||||
"./bin/typescript-angularjs-petstore.sh"
|
||||
"./bin/typescript-angular-petstore-all.sh"
|
||||
"./bin/typescript-aurelia-petstore.sh"
|
||||
"./bin/typescript-axios-petstore-all.sh"
|
||||
"./bin/typescript-fetch-petstore-all.sh"
|
||||
"./bin/typescript-inversify-petstore.sh"
|
||||
"./bin/typescript-jquery-petstore-all.sh"
|
||||
"./bin/typescript-node-petstore-all.sh"
|
||||
"./bin/typescript-rxjs-petstore-all.sh"
|
||||
"./bin/rust-server-petstore.sh"
|
||||
"./bin/r-petstore.sh"
|
||||
"./bin/haskell-http-client-petstore.sh"
|
||||
"./bin/csharp-petstore.sh"
|
||||
"./bin/csharp-netcore-petstore-all.sh"
|
||||
"./bin/elixir-petstore.sh"
|
||||
"./bin/openapi3/go-petstore.sh"
|
||||
"./bin/go-experimental-petstore.sh"
|
||||
"./bin/go-petstore.sh"
|
||||
"./bin/go-petstore-withxml.sh"
|
||||
"./bin/go-petstore-server.sh"
|
||||
"./bin/go-gin-petstore-server.sh"
|
||||
"./bin/groovy-petstore.sh"
|
||||
"./bin/apex-petstore.sh"
|
||||
"./bin/perl-petstore-all.sh"
|
||||
"./bin/dart-jaguar-petstore.sh"
|
||||
#"./bin/dart-dio-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/copy-to-website.sh"
|
||||
"./bin/utils/export_generators_readme.sh")
|
||||
# Some special case generators may expect to be run as a stanalone process (e.g. modifying classpath)
|
||||
# Docs should always be run, regardless of batch or operation.
|
||||
declare -a always_iterate=(
|
||||
"${root}/bin/meta-codegen.sh"
|
||||
"${root}/bin/utils/export_docs_generators.sh"
|
||||
"${root}/bin/utils/copy-to-website.sh"
|
||||
"${root}/bin/utils/export_generators_readme.sh"
|
||||
)
|
||||
|
||||
export JAVA_OPTS="-Djava.awt.headless=true"
|
||||
export JAVA_OPTS="${JAVA_OPTS} -Djava.awt.headless=true"
|
||||
|
||||
for script in "${scripts[@]}"; do
|
||||
if eval $script > /dev/null 2>&1; then
|
||||
echo "Executed $script successfully!"
|
||||
else
|
||||
echo "ERROR: Failed to run $script"
|
||||
exit 1
|
||||
if [ "true" = "$batch_mode" ]; then
|
||||
if [ ! -f "$executable" ]; then
|
||||
(cd "${root}" && mvn -B clean package -DskipTests=true -Dmaven.javadoc.skip=true)
|
||||
fi
|
||||
|
||||
# shellcheck disable=SC2086
|
||||
java $JAVA_OPTS -jar "$executable" batch --includes-base-dir "${root}" --fail-fast -- "${root}"/bin/ci/*
|
||||
else
|
||||
for script in "${samples[@]}"; do
|
||||
if eval "$script" > /dev/null 2>&1; then
|
||||
echo "Executed $script successfully!"
|
||||
else
|
||||
echo "ERROR: Failed to run $script"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
for i in "${always_iterate[@]}"; do
|
||||
if eval "$i" > /dev/null 2>&1; then
|
||||
echo "Executed $i successfully!"
|
||||
else
|
||||
echo "ERROR: Failed to run $i"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
# Check:
|
||||
@@ -102,3 +132,4 @@ if [ -n "$(git status --porcelain)" ]; then
|
||||
else
|
||||
echo "Git working tree is clean"
|
||||
fi
|
||||
|
||||
|
||||
@@ -14,4 +14,4 @@ fi
|
||||
|
||||
executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar"
|
||||
|
||||
java -jar ${executable} config-help -g "${NAME}" --named-header --format markdown --markdown-header -o "docs/generators/${NAME}.md"
|
||||
java -jar ${executable} config-help -g "${NAME}" --full-details --named-header --format markdown --markdown-header -o "docs/generators/${NAME}.md"
|
||||
|
||||
@@ -22,7 +22,7 @@ set -o pipefail
|
||||
|
||||
for cmd in {mvn,jq,curl}; do
|
||||
if ! command -v ${cmd} > /dev/null; then
|
||||
>&2 echo "This script requires '${cmd}' to be installed."
|
||||
>&2 echo "This script requires '${cmd}' to be installed."
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
@@ -42,7 +42,18 @@ artifactid=openapi-generator-cli
|
||||
ver=${OPENAPI_GENERATOR_VERSION:-$(latest.tag $ghrepo)}
|
||||
|
||||
jar=${artifactid}-${ver}.jar
|
||||
DIR=${OPENAPI_GENERATOR_DOWLOAD_CACHE_DIR:-"$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"}
|
||||
|
||||
# TODO: Remove OPENAPI_GENERATOR_DOWLOAD_CACHE_DIR for release 5.0
|
||||
if [ -n "${OPENAPI_GENERATOR_DOWLOAD_CACHE_DIR}" ]; then
|
||||
>&2 printf "[WARN] Variable OPENAPI_GENERATOR_DOWLOAD_CACHE_DIR is misspelled.\nPlease change to OPENAPI_GENERATOR_DOWNLOAD_CACHE_DIR. This option will be removed in the 5.0 release.\n"
|
||||
fi
|
||||
cachedir=${OPENAPI_GENERATOR_DOWNLOAD_CACHE_DIR:-"$OPENAPI_GENERATOR_DOWLOAD_CACHE_DIR"}
|
||||
|
||||
DIR=${cachedir:-"$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"}
|
||||
|
||||
if [ ! -d "${DIR}" ]; then
|
||||
mkdir -p "${DIR}"
|
||||
fi
|
||||
|
||||
if [ ! -f ${DIR}/${jar} ]; then
|
||||
repo="central::default::https://repo1.maven.org/maven2/"
|
||||
|
||||
@@ -5,6 +5,6 @@ If Not Exist %executable% (
|
||||
)
|
||||
|
||||
REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M
|
||||
set ags=generate -t modules\openapi-generator\src\main\resources\Java\libraries\feign -i modules\openapi-generator\src\test\resources\2_0\petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin\java-petstore-feign-9x.json -o samples\client\petstore\java\feign --additional-properties hideGenerationTimestamp=true,booleanGetterPrefix=is
|
||||
set ags=generate -t modules\openapi-generator\src\main\resources\Java\libraries\feign -i modules\openapi-generator\src\test\resources\2_0\petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin\java-petstore-feign-9x.json -o samples\client\petstore\java\feign --additional-properties hideGenerationTimestamp=true,booleanGetterPrefix=is,additionalModelTypeAnnotations=@javax.annotation.concurrent.Immutable
|
||||
|
||||
java %JAVA_OPTS% -jar %executable% %ags%
|
||||
|
||||
10
bin/windows/java-petstore-microprofile.bat
Executable file
10
bin/windows/java-petstore-microprofile.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 --artifact-id "microprofile-rest-client" -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g java --library microprofile -o samples\client\petstore\java\microprofile-rest-client
|
||||
|
||||
java %JAVA_OPTS% -jar %executable% %ags%
|
||||
11
bin/windows/kotlin-client-all.bat
Normal file
11
bin/windows/kotlin-client-all.bat
Normal file
@@ -0,0 +1,11 @@
|
||||
call powershell -command "& '%~dp0\kotlin-client-gson.bat'"
|
||||
call powershell -command "& '%~dp0\kotlin-client-moshi-codegen.bat'"
|
||||
call powershell -command "& '%~dp0\kotlin-client-nonpublic.bat'"
|
||||
call powershell -command "& '%~dp0\kotlin-client-okhttp3.bat'"
|
||||
call powershell -command "& '%~dp0\kotlin-client-petstore-multiplatform.bat'"
|
||||
call powershell -command "& '%~dp0\kotlin-client-petstore.bat'"
|
||||
call powershell -command "& '%~dp0\kotlin-client-string.bat'"
|
||||
call powershell -command "& '%~dp0\kotlin-client-threetenbp.bat'"
|
||||
call powershell -command "& '%~dp0\kotlin-client-nullable.bat'"
|
||||
call powershell -command "& '%~dp0\kotlin-client-json-request-date.bat'"
|
||||
call powershell -command "& '%~dp0\kotlin-client-retrofit2.bat'"
|
||||
10
bin/windows/kotlin-client-gson.bat
Normal file
10
bin/windows/kotlin-client-gson.bat
Normal file
@@ -0,0 +1,10 @@
|
||||
set executable=.\modules\openapi-generator-cli\target\openapi-generator-cli.jar
|
||||
|
||||
If Not Exist %executable% (
|
||||
mvn clean package
|
||||
)
|
||||
|
||||
REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -DloggerPath=conf/log4j.properties
|
||||
set ags=generate --artifact-id "kotlin-petstore-gson" -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g kotlin --additional-properties serializationLibrary=gson -o samples\client\petstore\kotlin-gson
|
||||
|
||||
java %JAVA_OPTS% -jar %executable% %ags%
|
||||
10
bin/windows/kotlin-client-json-request-date.bat
Normal file
10
bin/windows/kotlin-client-json-request-date.bat
Normal file
@@ -0,0 +1,10 @@
|
||||
set executable=.\modules\openapi-generator-cli\target\openapi-generator-cli.jar
|
||||
|
||||
If Not Exist %executable% (
|
||||
mvn clean package
|
||||
)
|
||||
|
||||
REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -DloggerPath=conf/log4j.properties
|
||||
set ags=generate --artifact-id "kotlin-petstore-json-request-date" -i modules\openapi-generator\src\test\resources\2_0\petstore-with-date-field.yaml -g kotlin --additional-properties requestDateConverter=toJson -o samples\client\petstore\kotlin-json-request-date
|
||||
|
||||
java %JAVA_OPTS% -jar %executable% %ags%
|
||||
10
bin/windows/kotlin-client-moshi-codegen.bat
Normal file
10
bin/windows/kotlin-client-moshi-codegen.bat
Normal file
@@ -0,0 +1,10 @@
|
||||
set executable=.\modules\openapi-generator-cli\target\openapi-generator-cli.jar
|
||||
|
||||
If Not Exist %executable% (
|
||||
mvn clean package
|
||||
)
|
||||
|
||||
REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -DloggerPath=conf/log4j.properties
|
||||
set ags=generate --artifact-id "kotlin-petstore-moshi-codegen" -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g kotlin --additional-properties serializationLibrary=moshi,moshiCodeGen=true -o samples\client\petstore\kotlin-moshi-codegen
|
||||
|
||||
java %JAVA_OPTS% -jar %executable% %ags%
|
||||
10
bin/windows/kotlin-client-nonpublic.bat
Normal file
10
bin/windows/kotlin-client-nonpublic.bat
Normal file
@@ -0,0 +1,10 @@
|
||||
set executable=.\modules\openapi-generator-cli\target\openapi-generator-cli.jar
|
||||
|
||||
If Not Exist %executable% (
|
||||
mvn clean package
|
||||
)
|
||||
|
||||
REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -DloggerPath=conf/log4j.properties
|
||||
set ags=generate --artifact-id "kotlin-petstore-nonpublic" -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g kotlin --additional-properties nonPublicApi=true -o samples\client\petstore\kotlin-nonpublic
|
||||
|
||||
java %JAVA_OPTS% -jar %executable% %ags%
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user