mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-12-19 03:47:05 +00:00
Compare commits
215 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e22c7c1c8a | ||
|
|
2b87b309ad | ||
|
|
dcc0b5e772 | ||
|
|
3a5ec0a69d | ||
|
|
e4b5f50515 | ||
|
|
755dfe53de | ||
|
|
2040050e55 | ||
|
|
cbc84254c3 | ||
|
|
8b47984e3c | ||
|
|
345b7ec7e5 | ||
|
|
cbddb08468 | ||
|
|
f1f7bdd23f | ||
|
|
3a71e59e00 | ||
|
|
da8cf01dfa | ||
|
|
e0cbf46041 | ||
|
|
8e57e0d44f | ||
|
|
bd71e629a3 | ||
|
|
5aad02ed90 | ||
|
|
70e6e119d1 | ||
|
|
4775c630aa | ||
|
|
cd8bf10b74 | ||
|
|
df61cd9cb3 | ||
|
|
e3b26372cd | ||
|
|
8fb3b707a1 | ||
|
|
14de289fc1 | ||
|
|
abb2690ef5 | ||
|
|
ed1277348d | ||
|
|
bde97b44b9 | ||
|
|
6dc618fa3f | ||
|
|
c0a6eaab85 | ||
|
|
29e9f5bda0 | ||
|
|
cc6efe01c7 | ||
|
|
3cacbcb965 | ||
|
|
0e045bee1b | ||
|
|
1b2f3fbfb6 | ||
|
|
340466066c | ||
|
|
ca9a4a2ff3 | ||
|
|
b7edad5cd0 | ||
|
|
78fae0ea49 | ||
|
|
3027514242 | ||
|
|
24b234bdbb | ||
|
|
9e1dfc0837 | ||
|
|
5c794a01f8 | ||
|
|
27e343ffef | ||
|
|
5fc76ba834 | ||
|
|
b909656418 | ||
|
|
fe0f2cfad6 | ||
|
|
04bbd3b0e6 | ||
|
|
58e43ceeec | ||
|
|
fc35bb17d0 | ||
|
|
48e66ed627 | ||
|
|
29322da2f6 | ||
|
|
9a19a064af | ||
|
|
95302efdfc | ||
|
|
096ac567ce | ||
|
|
131cf94fe4 | ||
|
|
f29ba97e8b | ||
|
|
59ad12183f | ||
|
|
3d4c3c545b | ||
|
|
3cfcf77c88 | ||
|
|
1ae3403f6d | ||
|
|
2d99836e90 | ||
|
|
6a1e560540 | ||
|
|
f80fa08a01 | ||
|
|
7596fb7119 | ||
|
|
aa29219f8c | ||
|
|
825404a1df | ||
|
|
47b3210cb2 | ||
|
|
1ead8bcca5 | ||
|
|
4a9b0a91aa | ||
|
|
a0f8c5e468 | ||
|
|
abe741f989 | ||
|
|
c5463232d3 | ||
|
|
a8cbae4dc8 | ||
|
|
b9e9f54dab | ||
|
|
5d259952b3 | ||
|
|
e29f263941 | ||
|
|
39c734fc25 | ||
|
|
3abeb82685 | ||
|
|
26591f5d7f | ||
|
|
5d52bd51bf | ||
|
|
7a18a1a7b6 | ||
|
|
66022a1f22 | ||
|
|
9d89387d83 | ||
|
|
f7b807f980 | ||
|
|
b24b6df448 | ||
|
|
9b38618f68 | ||
|
|
cabc1af823 | ||
|
|
8a034ce063 | ||
|
|
cc53774180 | ||
|
|
d9400caf69 | ||
|
|
a2acfe3be0 | ||
|
|
026c26075d | ||
|
|
8ccb7135d3 | ||
|
|
d4c0de2876 | ||
|
|
e5244e8c3d | ||
|
|
d327c5be46 | ||
|
|
31149a5a69 | ||
|
|
6bc3c70115 | ||
|
|
5ad471cc6e | ||
|
|
dd35acdb92 | ||
|
|
aceec7a5a2 | ||
|
|
f95dfbef75 | ||
|
|
baa70e51fe | ||
|
|
e7c05f16db | ||
|
|
fd83b2d491 | ||
|
|
f664938d8e | ||
|
|
9e45fbb13b | ||
|
|
3b2951b305 | ||
|
|
5745f6df70 | ||
|
|
d49fb1c777 | ||
|
|
f4d7403ed6 | ||
|
|
f987306a15 | ||
|
|
62abd51a02 | ||
|
|
b8db2af4bb | ||
|
|
8e1e05e86c | ||
|
|
09a62d7fef | ||
|
|
2544ace262 | ||
|
|
a1205f6109 | ||
|
|
4558e49c7e | ||
|
|
5926ee5f1f | ||
|
|
8689227b3e | ||
|
|
5cd5143b80 | ||
|
|
1ea0a1e856 | ||
|
|
b505795bf7 | ||
|
|
e3bd47921c | ||
|
|
e75b115244 | ||
|
|
15cec0ae09 | ||
|
|
4401407c7c | ||
|
|
267ffc0e2e | ||
|
|
40d815946a | ||
|
|
37fd4264ac | ||
|
|
39e9206976 | ||
|
|
50c6ac34f1 | ||
|
|
6a00b2a802 | ||
|
|
010b469914 | ||
|
|
f802f8b7d7 | ||
|
|
219a88e9c6 | ||
|
|
79dacb20a0 | ||
|
|
704c1b8893 | ||
|
|
8be06bc22d | ||
|
|
f2b0adfa05 | ||
|
|
4830be0ea4 | ||
|
|
4a5bd50202 | ||
|
|
6a47d49ee8 | ||
|
|
3d06900e68 | ||
|
|
3259bf71e6 | ||
|
|
526e980a69 | ||
|
|
ab09909f99 | ||
|
|
d8b597b168 | ||
|
|
9bc335b35e | ||
|
|
227f2779d7 | ||
|
|
2ffda45adf | ||
|
|
bb2712fe45 | ||
|
|
cbf61d5524 | ||
|
|
39763a8ca7 | ||
|
|
aa19369466 | ||
|
|
3f65d6c350 | ||
|
|
99646e6436 | ||
|
|
450d624474 | ||
|
|
ca0c35aa15 | ||
|
|
fcfd8ea76e | ||
|
|
2044c36398 | ||
|
|
d374e1c160 | ||
|
|
ee491a0e5e | ||
|
|
e605882451 | ||
|
|
b91c8e17a7 | ||
|
|
dcc622d374 | ||
|
|
a3e5edc367 | ||
|
|
bd7c9e30d3 | ||
|
|
62dfb749f1 | ||
|
|
3b9de3baa3 | ||
|
|
d593988e5d | ||
|
|
0191210145 | ||
|
|
0f30a052b2 | ||
|
|
1c6ab3f831 | ||
|
|
5ffc297a69 | ||
|
|
e7340bfe5b | ||
|
|
f22e9c27a9 | ||
|
|
ca651becf8 | ||
|
|
6de09688ad | ||
|
|
94806b8036 | ||
|
|
fa52826c24 | ||
|
|
7b8f51a465 | ||
|
|
79b993e6d5 | ||
|
|
56bba880e7 | ||
|
|
7acba8a4d8 | ||
|
|
08ca54d3d5 | ||
|
|
7b04732f09 | ||
|
|
b64864f47d | ||
|
|
c237fe9f1c | ||
|
|
5e1c4cde50 | ||
|
|
1559c4fadd | ||
|
|
0cd6d8c139 | ||
|
|
ddb0920fed | ||
|
|
21777f2759 | ||
|
|
afdef8f890 | ||
|
|
d019bbd2c7 | ||
|
|
748d1d70cb | ||
|
|
987fd77042 | ||
|
|
a0984a9be8 | ||
|
|
9920c435ca | ||
|
|
4060fcbb8b | ||
|
|
d0ccac5663 | ||
|
|
06263d7606 | ||
|
|
3245c0a139 | ||
|
|
546b54b15d | ||
|
|
0809d8f527 | ||
|
|
baf16cf834 | ||
|
|
629608c573 | ||
|
|
e143214685 | ||
|
|
2340d83a33 | ||
|
|
69852123e0 | ||
|
|
90a8b81728 | ||
|
|
30fb22fffa |
2
.github/PULL_REQUEST_TEMPLATE.md
vendored
2
.github/PULL_REQUEST_TEMPLATE.md
vendored
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
- [ ] Read the [contribution guidelines](https://github.com/openapitools/openapi-generator/blob/master/CONTRIBUTING.md).
|
- [ ] Read the [contribution guidelines](https://github.com/openapitools/openapi-generator/blob/master/CONTRIBUTING.md).
|
||||||
- [ ] Ran the shell script under `./bin/` to update Petstore sample so that CIs can verify the change. (For instance, only need to run `./bin/{LANG}-petstore.sh` and `./bin/security/{LANG}-petstore.sh` if updating the {LANG} (e.g. php, ruby, python, etc) code generator or {LANG} client's mustache templates). Windows batch files can be found in `.\bin\windows\`.
|
- [ ] Ran the shell script under `./bin/` to update Petstore sample so that CIs can verify the change. (For instance, only need to run `./bin/{LANG}-petstore.sh` and `./bin/security/{LANG}-petstore.sh` if updating the {LANG} (e.g. php, ruby, python, etc) code generator or {LANG} client's mustache templates). Windows batch files can be found in `.\bin\windows\`.
|
||||||
- [ ] Filed the PR against the [correct branch](https://github.com/OpenAPITools/openapi-generator/wiki/Git-Branches): `master`, `4.0.x`. Default: `master`.
|
- [ ] Filed the PR against the [correct branch](https://github.com/OpenAPITools/openapi-generator/wiki/Git-Branches): `master` (3.3.x), `4.0.x`. Default: `master`.
|
||||||
- [ ] Copied the [technical committee](https://github.com/openapitools/openapi-generator/#62---openapi-generator-technical-committee) to review the pull request if your PR is targeting a particular programming language.
|
- [ ] Copied the [technical committee](https://github.com/openapitools/openapi-generator/#62---openapi-generator-technical-committee) to review the pull request if your PR is targeting a particular programming language.
|
||||||
|
|
||||||
### Description of the PR
|
### Description of the PR
|
||||||
|
|||||||
26
.gitignore
vendored
26
.gitignore
vendored
@@ -6,6 +6,7 @@ out/
|
|||||||
*.gpg
|
*.gpg
|
||||||
classpath.txt
|
classpath.txt
|
||||||
version.properties
|
version.properties
|
||||||
|
modules/openapi-generator-gradle-plugin/bin/
|
||||||
!modules/openapi-generator-cli/src/main/resources/version.properties
|
!modules/openapi-generator-cli/src/main/resources/version.properties
|
||||||
.project
|
.project
|
||||||
.classpath
|
.classpath
|
||||||
@@ -59,6 +60,12 @@ samples/client/petstore/qt5cpp/PetStore/PetStore
|
|||||||
samples/client/petstore/qt5cpp/PetStore/Makefile
|
samples/client/petstore/qt5cpp/PetStore/Makefile
|
||||||
samples/client/petstore/qt5cpp/PetStore/PetStore.pro.user
|
samples/client/petstore/qt5cpp/PetStore/PetStore.pro.user
|
||||||
|
|
||||||
|
# cpprestsdk
|
||||||
|
samples/client/petstore/cpp-restsdk/CMakeCache.txt
|
||||||
|
samples/client/petstore/cpp-restsdk/CMakeFiles/
|
||||||
|
samples/client/petstore/cpp-restsdk/Makefile
|
||||||
|
samples/client/petstore/cpp-restsdk/cmake_install.cmake
|
||||||
|
|
||||||
#Java/Android
|
#Java/Android
|
||||||
**/.gradle
|
**/.gradle
|
||||||
samples/client/petstore/java/hello.txt
|
samples/client/petstore/java/hello.txt
|
||||||
@@ -87,21 +94,6 @@ samples/client/petstore/java/jersey2-java6/project/
|
|||||||
samples/client/petstore/java/jersey2-java8/project/
|
samples/client/petstore/java/jersey2-java8/project/
|
||||||
samples/client/petstore/java/jersey2/project/
|
samples/client/petstore/java/jersey2/project/
|
||||||
|
|
||||||
#PHP
|
|
||||||
samples/client/petstore/php/OpenAPIToolsClient-php/composer.lock
|
|
||||||
samples/client/petstore/php/OpenAPIToolsClient-php/vendor/
|
|
||||||
samples/client/petstore/silex/SwaggerServer/composer.lock
|
|
||||||
samples/client/petstore/silex/SwaggerServer/venodr/
|
|
||||||
**/vendor/
|
|
||||||
**/composer.lock
|
|
||||||
|
|
||||||
#PHP-Symfony
|
|
||||||
samples/server/petstore/php-symfony/SymfonyBundle-php/Tests/cache/
|
|
||||||
samples/server/petstore/php-symfony/SymfonyBundle-php/Tests/logs/
|
|
||||||
|
|
||||||
#PHP-laravel
|
|
||||||
samples/server/petstore/php-laravel/node_modules
|
|
||||||
|
|
||||||
# Perl
|
# Perl
|
||||||
samples/client/petstore/perl/deep_module_test/
|
samples/client/petstore/perl/deep_module_test/
|
||||||
|
|
||||||
@@ -124,14 +116,14 @@ samples/client/petstore/swift/**/SwaggerClientTests/SwaggerClient.xcworkspace/xc
|
|||||||
samples/client/petstore/swift/**/SwaggerClientTests/Pods/
|
samples/client/petstore/swift/**/SwaggerClientTests/Pods/
|
||||||
#samples/client/petstore/swift/**/SwaggerClientTests/Pods/Pods.xcodeproj/xcuserdata
|
#samples/client/petstore/swift/**/SwaggerClientTests/Pods/Pods.xcodeproj/xcuserdata
|
||||||
#samples/client/petstore/swift/**/SwaggerClientTests/Pods/Pods.xcodeproj/xcshareddata/xcschemes
|
#samples/client/petstore/swift/**/SwaggerClientTests/Pods/Pods.xcodeproj/xcshareddata/xcschemes
|
||||||
samples/client/petstore/swift/**/SwaggerClientTests/Podfile.lock
|
samples/client/petstore/swift/**/SwaggerClientTests/Podfile.lock
|
||||||
# Swift3
|
# Swift3
|
||||||
samples/client/petstore/swift3/**/SwaggerClientTests/SwaggerClient.xcodeproj/xcuserdata
|
samples/client/petstore/swift3/**/SwaggerClientTests/SwaggerClient.xcodeproj/xcuserdata
|
||||||
samples/client/petstore/swift3/**/SwaggerClientTests/SwaggerClient.xcworkspace/xcuserdata
|
samples/client/petstore/swift3/**/SwaggerClientTests/SwaggerClient.xcworkspace/xcuserdata
|
||||||
#samples/client/petstore/swift3/**/SwaggerClientTests/Pods/
|
#samples/client/petstore/swift3/**/SwaggerClientTests/Pods/
|
||||||
#samples/client/petstore/swift3/**/SwaggerClientTests/Pods/Pods.xcodeproj/xcuserdata
|
#samples/client/petstore/swift3/**/SwaggerClientTests/Pods/Pods.xcodeproj/xcuserdata
|
||||||
#samples/client/petstore/swift3/**/SwaggerClientTests/Pods/Pods.xcodeproj/xcshareddata/xcschemes
|
#samples/client/petstore/swift3/**/SwaggerClientTests/Pods/Pods.xcodeproj/xcshareddata/xcschemes
|
||||||
samples/client/petstore/swift3/**/SwaggerClientTests/Podfile.lock
|
samples/client/petstore/swift3/**/SwaggerClientTests/Podfile.lock
|
||||||
|
|
||||||
# C#
|
# C#
|
||||||
*.csproj.user
|
*.csproj.user
|
||||||
|
|||||||
36
.hub.cli.dockerfile
Normal file
36
.hub.cli.dockerfile
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
## The builder labeled image acts as a transient container which is meant to
|
||||||
|
## hold all non-artifact code.
|
||||||
|
##
|
||||||
|
## You can build _just_ this part with:
|
||||||
|
## docker --target builder -t container-name:builder -f .hub.cli.dockerfile .
|
||||||
|
FROM jimschubert/8-jdk-alpine-mvn:1.0 as builder
|
||||||
|
|
||||||
|
RUN set -x && \
|
||||||
|
apk add --no-cache bash
|
||||||
|
|
||||||
|
ENV GEN_DIR /opt/openapi-generator
|
||||||
|
WORKDIR ${GEN_DIR}
|
||||||
|
COPY . ${GEN_DIR}
|
||||||
|
|
||||||
|
# Pre-compile openapi-generator-cli
|
||||||
|
RUN mvn -am -pl "modules/openapi-generator-cli" package
|
||||||
|
|
||||||
|
## The final (release) image
|
||||||
|
## The resulting container here only needs the target jar
|
||||||
|
## and ca-certificates (to be able to query HTTPS hosted specs)
|
||||||
|
FROM openjdk:8-jre-alpine
|
||||||
|
|
||||||
|
ENV GEN_DIR /opt/openapi-generator
|
||||||
|
|
||||||
|
RUN apk --no-cache add ca-certificates bash
|
||||||
|
RUN mkdir -p ${GEN_DIR}/modules/openapi-generator-cli/target
|
||||||
|
|
||||||
|
WORKDIR ${GEN_DIR}/modules/openapi-generator-cli/target
|
||||||
|
|
||||||
|
COPY --from=builder ${GEN_DIR}/modules/openapi-generator-cli/target/openapi-generator-cli.jar ${GEN_DIR}/modules/openapi-generator-cli/target/openapi-generator-cli.jar
|
||||||
|
|
||||||
|
COPY docker-entrypoint.sh /usr/local/bin/
|
||||||
|
|
||||||
|
ENTRYPOINT ["docker-entrypoint.sh"]
|
||||||
|
|
||||||
|
CMD ["help"]
|
||||||
35
.hub.online.dockerfile
Normal file
35
.hub.online.dockerfile
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
## The builder labeled image acts as a transient container which is meant to
|
||||||
|
## hold all non-artifact code.
|
||||||
|
##
|
||||||
|
## You can build _just_ this part with:
|
||||||
|
## docker --target builder -t container-name:builder -f .hub.online.dockerfile .
|
||||||
|
FROM jimschubert/8-jdk-alpine-mvn:1.0 as builder
|
||||||
|
|
||||||
|
RUN set -x && \
|
||||||
|
apk add --no-cache bash
|
||||||
|
|
||||||
|
ENV GEN_DIR /opt/openapi-generator
|
||||||
|
WORKDIR ${GEN_DIR}
|
||||||
|
COPY . ${GEN_DIR}
|
||||||
|
|
||||||
|
# Pre-compile openapi-generator-online
|
||||||
|
RUN mvn -am -pl "modules/openapi-generator-online" package
|
||||||
|
|
||||||
|
## The final (release) image
|
||||||
|
## The resulting container here only needs the target jar
|
||||||
|
FROM openjdk:8-jre-alpine
|
||||||
|
|
||||||
|
ENV GEN_DIR /opt/openapi-generator
|
||||||
|
ENV TARGET_DIR /generator
|
||||||
|
|
||||||
|
RUN mkdir -p ${TARGET_DIR}
|
||||||
|
|
||||||
|
WORKDIR ${TARGET_DIR}
|
||||||
|
|
||||||
|
COPY --from=builder ${GEN_DIR}/modules/openapi-generator-online/target/openapi-generator-online.jar ${TARGET_DIR}/openapi-generator-online.jar
|
||||||
|
|
||||||
|
ENV GENERATOR_HOST=http://localhost
|
||||||
|
|
||||||
|
EXPOSE 8080
|
||||||
|
|
||||||
|
CMD ["java", "-jar", "/generator/openapi-generator-online.jar"]
|
||||||
18
.travis.yml
18
.travis.yml
@@ -30,7 +30,10 @@ cache:
|
|||||||
- $HOME/perl5
|
- $HOME/perl5
|
||||||
- $HOME/.cargo
|
- $HOME/.cargo
|
||||||
- $HOME/.stack
|
- $HOME/.stack
|
||||||
|
- $HOME/.pub-cache
|
||||||
- $HOME/samples/server/petstore/cpp-pistache/pistache
|
- $HOME/samples/server/petstore/cpp-pistache/pistache
|
||||||
|
- $HOME/.npm
|
||||||
|
- $HOME/.rvm/gems/ruby-2.4.1
|
||||||
|
|
||||||
services:
|
services:
|
||||||
- docker
|
- docker
|
||||||
@@ -57,7 +60,7 @@ before_install:
|
|||||||
- gem install bundler
|
- gem install bundler
|
||||||
- npm install -g typescript
|
- npm install -g typescript
|
||||||
- npm install -g npm
|
- npm install -g npm
|
||||||
- npm install -g elm
|
- npm install -g elm@0.18.0-exp5
|
||||||
- npm config set registry http://registry.npmjs.org/
|
- npm config set registry http://registry.npmjs.org/
|
||||||
# set python 3.6.3 as default
|
# set python 3.6.3 as default
|
||||||
- source ~/virtualenv/python3.6/bin/activate
|
- source ~/virtualenv/python3.6/bin/activate
|
||||||
@@ -70,6 +73,13 @@ before_install:
|
|||||||
- sudo apt-get update -qq
|
- sudo apt-get update -qq
|
||||||
- sudo apt-get install -qq bats
|
- sudo apt-get install -qq bats
|
||||||
- sudo apt-get install -qq curl
|
- sudo apt-get install -qq curl
|
||||||
|
# install dart
|
||||||
|
#- sudo apt-get update
|
||||||
|
- sudo apt-get install apt-transport-https
|
||||||
|
- sudo sh -c 'curl https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -'
|
||||||
|
- sudo sh -c 'curl https://storage.googleapis.com/download.dartlang.org/linux/debian/dart_stable.list > /etc/apt/sources.list.d/dart_stable.list'
|
||||||
|
- sudo apt-get update
|
||||||
|
- sudo apt-get install dart
|
||||||
# install perl module
|
# install perl module
|
||||||
#- cpanm --local-lib=~/perl5 local::lib && eval $(perl -I ~/perl5/lib/perl5/ -Mlocal::lib)
|
#- cpanm --local-lib=~/perl5 local::lib && eval $(perl -I ~/perl5/lib/perl5/ -Mlocal::lib)
|
||||||
#- cpanm Test::Exception Test::More Log::Any LWP::UserAgent JSON URI:Query Module::Runtime DateTime Module::Find Moose::Role
|
#- cpanm Test::Exception Test::More Log::Any LWP::UserAgent JSON URI:Query Module::Runtime DateTime Module::Find Moose::Role
|
||||||
@@ -94,11 +104,13 @@ install:
|
|||||||
# Add Godeps dependencies to GOPATH and PATH
|
# Add Godeps dependencies to GOPATH and PATH
|
||||||
#- eval "$(curl -sL https://raw.githubusercontent.com/travis-ci/gimme/master/gimme | GIMME_GO_VERSION=1.4 bash)"
|
#- eval "$(curl -sL https://raw.githubusercontent.com/travis-ci/gimme/master/gimme | GIMME_GO_VERSION=1.4 bash)"
|
||||||
#- export GOPATH="${TRAVIS_BUILD_DIR}/Godeps/_workspace"
|
#- export GOPATH="${TRAVIS_BUILD_DIR}/Godeps/_workspace"
|
||||||
- export PATH="${TRAVIS_BUILD_DIR}/Godeps/_workspace/bin:$HOME/.cargo/bin:$PATH"
|
- export PATH="${TRAVIS_BUILD_DIR}/Godeps/_workspace/bin:$HOME/.cargo/bin:$PATH:/usr/lib/dart/bin"
|
||||||
#- go version
|
#- go version
|
||||||
- gcc -v
|
- gcc -v
|
||||||
- echo $CC
|
- echo $CC
|
||||||
- echo $CXX
|
- echo $CXX
|
||||||
|
- pub version
|
||||||
|
- dart --version
|
||||||
|
|
||||||
script:
|
script:
|
||||||
# fail fast
|
# fail fast
|
||||||
@@ -123,7 +135,7 @@ after_success:
|
|||||||
./gradlew -Psigning.keyId="$SIGNING_KEY" -Psigning.password="$SIGNING_PASSPHRASE" -Psigning.secretKeyRingFile="${TRAVIS_BUILD_DIR}/sec.gpg" -PossrhUsername="${SONATYPE_USERNAME}" -PossrhPassword="${SONATYPE_PASSWORD}" uploadArchives --no-daemon;
|
./gradlew -Psigning.keyId="$SIGNING_KEY" -Psigning.password="$SIGNING_PASSPHRASE" -Psigning.secretKeyRingFile="${TRAVIS_BUILD_DIR}/sec.gpg" -PossrhUsername="${SONATYPE_USERNAME}" -PossrhPassword="${SONATYPE_PASSWORD}" uploadArchives --no-daemon;
|
||||||
echo "Finished ./gradlew uploadArchives";
|
echo "Finished ./gradlew uploadArchives";
|
||||||
popd;
|
popd;
|
||||||
elif ([ "$TRAVIS_BRANCH" == "4.0.x" ]) ; then
|
elif ([[ "$TRAVIS_BRANCH" =~ ^[0-9]+\.[0-9]+\.x$ ]]) ; then
|
||||||
mvn clean deploy --settings CI/settings.xml;
|
mvn clean deploy --settings CI/settings.xml;
|
||||||
echo "Finished mvn clean deploy for $TRAVIS_BRANCH";
|
echo "Finished mvn clean deploy for $TRAVIS_BRANCH";
|
||||||
pushd .;
|
pushd .;
|
||||||
|
|||||||
@@ -8,6 +8,11 @@ if [ "$NODE_INDEX" = "1" ]; then
|
|||||||
cp CI/pom.xml.circleci pom.xml
|
cp CI/pom.xml.circleci pom.xml
|
||||||
java -version
|
java -version
|
||||||
mvn --quiet verify -Psamples
|
mvn --quiet verify -Psamples
|
||||||
|
elif [ "$NODE_INDEX" = "2" ]; then
|
||||||
|
echo "Running node $NODE_INDEX to test ensure-up-to-date"
|
||||||
|
#export GO_POST_PROCESS_FILE="/usr/local/bin/gofmt -w"
|
||||||
|
# not formatting the code as different go versions may format the code a bit different
|
||||||
|
#./bin/utils/ensure-up-to-date
|
||||||
else
|
else
|
||||||
echo "Running node $NODE_INDEX to test CI/pom.xml.circleci.java7 ..."
|
echo "Running node $NODE_INDEX to test CI/pom.xml.circleci.java7 ..."
|
||||||
sudo update-java-alternatives -s java-1.7.0-openjdk-amd64
|
sudo update-java-alternatives -s java-1.7.0-openjdk-amd64
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
<artifactId>openapi-generator-project</artifactId>
|
<artifactId>openapi-generator-project</artifactId>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
<name>openapi-generator-project</name>
|
<name>openapi-generator-project</name>
|
||||||
<version>3.2.0</version>
|
<version>3.3.0</version>
|
||||||
<url>https://github.com/openapi-tools/openapi-generator</url>
|
<url>https://github.com/openapi-tools/openapi-generator</url>
|
||||||
<scm>
|
<scm>
|
||||||
<connection>scm:git:git@github.com:openapi-tools/openapi-generator.git</connection>
|
<connection>scm:git:git@github.com:openapi-tools/openapi-generator.git</connection>
|
||||||
@@ -920,8 +920,8 @@
|
|||||||
</repository>
|
</repository>
|
||||||
</repositories>
|
</repositories>
|
||||||
<properties>
|
<properties>
|
||||||
<swagger-parser-version>2.0.2-OpenAPITools.org-1</swagger-parser-version>
|
<swagger-parser-version>2.0.4</swagger-parser-version>
|
||||||
<swagger-core-version>2.0.1</swagger-core-version>
|
<swagger-core-version>2.0.4</swagger-core-version>
|
||||||
<scala-version>2.11.1</scala-version>
|
<scala-version>2.11.1</scala-version>
|
||||||
<felix-version>3.3.0</felix-version>
|
<felix-version>3.3.0</felix-version>
|
||||||
<commons-io-version>2.4</commons-io-version>
|
<commons-io-version>2.4</commons-io-version>
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
<artifactId>openapi-generator-project</artifactId>
|
<artifactId>openapi-generator-project</artifactId>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
<name>openapi-generator-project</name>
|
<name>openapi-generator-project</name>
|
||||||
<version>3.2.0</version>
|
<version>3.3.0</version>
|
||||||
<url>https://github.com/openapitools/openapi-generator</url>
|
<url>https://github.com/openapitools/openapi-generator</url>
|
||||||
<scm>
|
<scm>
|
||||||
<connection>scm:git:git@github.com:openapitools/openapi-generator.git</connection>
|
<connection>scm:git:git@github.com:openapitools/openapi-generator.git</connection>
|
||||||
@@ -607,6 +607,55 @@
|
|||||||
<module>samples/server/petstore/jaxrs/jersey1</module>
|
<module>samples/server/petstore/jaxrs/jersey1</module>
|
||||||
</modules>
|
</modules>
|
||||||
</profile>
|
</profile>
|
||||||
|
<profile>
|
||||||
|
<!-- openapi v3's one -->
|
||||||
|
<id>jaxrs-jersey</id>
|
||||||
|
<activation>
|
||||||
|
<property>
|
||||||
|
<name>env</name>
|
||||||
|
<value>java</value>
|
||||||
|
</property>
|
||||||
|
</activation>
|
||||||
|
<modules>
|
||||||
|
<module>samples/server/petstore/jaxrs-jersey</module>
|
||||||
|
</modules>
|
||||||
|
</profile>
|
||||||
|
<profile>
|
||||||
|
<id>jaxrs-spec</id>
|
||||||
|
<activation>
|
||||||
|
<property>
|
||||||
|
<name>env</name>
|
||||||
|
<value>java</value>
|
||||||
|
</property>
|
||||||
|
</activation>
|
||||||
|
<modules>
|
||||||
|
<module>samples/server/petstore/jaxrs-spec</module>
|
||||||
|
</modules>
|
||||||
|
</profile>
|
||||||
|
<profile>
|
||||||
|
<id>jaxrs-spec-interface</id>
|
||||||
|
<activation>
|
||||||
|
<property>
|
||||||
|
<name>env</name>
|
||||||
|
<value>java</value>
|
||||||
|
</property>
|
||||||
|
</activation>
|
||||||
|
<modules>
|
||||||
|
<module>samples/server/petstore/jaxrs-spec-interface</module>
|
||||||
|
</modules>
|
||||||
|
</profile>
|
||||||
|
<profile>
|
||||||
|
<id>jaxrs-spec-interface-response</id>
|
||||||
|
<activation>
|
||||||
|
<property>
|
||||||
|
<name>env</name>
|
||||||
|
<value>java</value>
|
||||||
|
</property>
|
||||||
|
</activation>
|
||||||
|
<modules>
|
||||||
|
<module>samples/server/petstore/jaxrs-spec-interface-response</module>
|
||||||
|
</modules>
|
||||||
|
</profile>
|
||||||
<profile>
|
<profile>
|
||||||
<id>typescript-fetch-client-tests-default</id>
|
<id>typescript-fetch-client-tests-default</id>
|
||||||
<activation>
|
<activation>
|
||||||
@@ -842,6 +891,7 @@
|
|||||||
<module>samples/client/petstore/scalaz</module>
|
<module>samples/client/petstore/scalaz</module>
|
||||||
<module>samples/client/petstore/clojure</module>
|
<module>samples/client/petstore/clojure</module>
|
||||||
<module>samples/client/petstore/java/feign</module>
|
<module>samples/client/petstore/java/feign</module>
|
||||||
|
<module>samples/client/petstore/java/feign10x</module>
|
||||||
<module>samples/client/petstore/java/jersey1</module>
|
<module>samples/client/petstore/java/jersey1</module>
|
||||||
<module>samples/client/petstore/java/jersey2</module>
|
<module>samples/client/petstore/java/jersey2</module>
|
||||||
<module>samples/client/petstore/java/jersey2-java8</module>
|
<module>samples/client/petstore/java/jersey2-java8</module>
|
||||||
@@ -850,6 +900,7 @@
|
|||||||
<module>samples/client/petstore/java/retrofit2</module>
|
<module>samples/client/petstore/java/retrofit2</module>
|
||||||
<module>samples/client/petstore/java/retrofit2rx</module>
|
<module>samples/client/petstore/java/retrofit2rx</module>
|
||||||
<module>samples/client/petstore/java/retrofit2-play25</module>
|
<module>samples/client/petstore/java/retrofit2-play25</module>
|
||||||
|
<module>samples/client/petstore/java/retrofit2-play26</module>
|
||||||
<module>samples/client/petstore/jaxrs-cxf-client</module>
|
<module>samples/client/petstore/jaxrs-cxf-client</module>
|
||||||
<module>samples/client/petstore/java/resttemplate</module>
|
<module>samples/client/petstore/java/resttemplate</module>
|
||||||
<module>samples/client/petstore/java/resttemplate-withXml</module>
|
<module>samples/client/petstore/java/resttemplate-withXml</module>
|
||||||
@@ -862,6 +913,10 @@
|
|||||||
<module>samples/client/petstore/kotlin-threetenbp/</module>
|
<module>samples/client/petstore/kotlin-threetenbp/</module>
|
||||||
<module>samples/client/petstore/kotlin-string/</module>
|
<module>samples/client/petstore/kotlin-string/</module>
|
||||||
<!-- servers -->
|
<!-- servers -->
|
||||||
|
<module>samples/server/petstore/jaxrs-jersey</module>
|
||||||
|
<module>samples/server/petstore/jaxrs-spec</module>
|
||||||
|
<module>samples/server/petstore/jaxrs-spec-interface</module>
|
||||||
|
<module>samples/server/petstore/jaxrs-spec-interface-response</module>
|
||||||
<module>samples/server/petstore/java-vertx/rx</module>
|
<module>samples/server/petstore/java-vertx/rx</module>
|
||||||
<module>samples/server/petstore/java-vertx/async</module>
|
<module>samples/server/petstore/java-vertx/async</module>
|
||||||
<module>samples/server/petstore/java-inflector</module>
|
<module>samples/server/petstore/java-inflector</module>
|
||||||
@@ -901,10 +956,10 @@
|
|||||||
<module>samples/server/petstore/jaxrs-cxf-cdi</module>
|
<module>samples/server/petstore/jaxrs-cxf-cdi</module>
|
||||||
<module>samples/server/petstore/jaxrs-cxf-non-spring-app</module>
|
<module>samples/server/petstore/jaxrs-cxf-non-spring-app</module>
|
||||||
<module>samples/server/petstore/java-msf4j</module>
|
<module>samples/server/petstore/java-msf4j</module>
|
||||||
<module>samples/server/petstore/jaxrs-spec-interface</module>
|
|
||||||
<module>samples/server/petstore/scala-lagom-server</module>
|
<module>samples/server/petstore/scala-lagom-server</module>
|
||||||
<module>samples/server/petstore/scalatra</module>
|
<module>samples/server/petstore/scalatra</module>
|
||||||
<module>samples/server/petstore/finch</module>
|
<module>samples/server/petstore/finch</module>
|
||||||
|
<module>samples/server/petstore/kotlin-springboot</module>
|
||||||
</modules>
|
</modules>
|
||||||
</profile>
|
</profile>
|
||||||
</profiles>
|
</profiles>
|
||||||
@@ -976,8 +1031,8 @@
|
|||||||
</repository>
|
</repository>
|
||||||
</repositories>
|
</repositories>
|
||||||
<properties>
|
<properties>
|
||||||
<swagger-parser-version>2.0.2-OpenAPITools.org-1</swagger-parser-version>
|
<swagger-parser-version>2.0.4</swagger-parser-version>
|
||||||
<swagger-core-version>2.0.1</swagger-core-version>
|
<swagger-core-version>2.0.4</swagger-core-version>
|
||||||
<scala-version>2.11.1</scala-version>
|
<scala-version>2.11.1</scala-version>
|
||||||
<felix-version>3.3.0</felix-version>
|
<felix-version>3.3.0</felix-version>
|
||||||
<commons-io-version>2.4</commons-io-version>
|
<commons-io-version>2.4</commons-io-version>
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
<artifactId>openapi-generator-project</artifactId>
|
<artifactId>openapi-generator-project</artifactId>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
<name>openapi-generator-project</name>
|
<name>openapi-generator-project</name>
|
||||||
<version>3.2.0</version>
|
<version>3.3.0</version>
|
||||||
<url>https://github.com/openapitools/openapi-generator</url>
|
<url>https://github.com/openapitools/openapi-generator</url>
|
||||||
<scm>
|
<scm>
|
||||||
<connection>scm:git:git@github.com:openapitools/openapi-generator.git</connection>
|
<connection>scm:git:git@github.com:openapitools/openapi-generator.git</connection>
|
||||||
@@ -607,6 +607,55 @@
|
|||||||
<module>samples/server/petstore/jaxrs/jersey1</module>
|
<module>samples/server/petstore/jaxrs/jersey1</module>
|
||||||
</modules>
|
</modules>
|
||||||
</profile>
|
</profile>
|
||||||
|
<profile>
|
||||||
|
<!-- openapi v3's one -->
|
||||||
|
<id>jaxrs-jersey</id>
|
||||||
|
<activation>
|
||||||
|
<property>
|
||||||
|
<name>env</name>
|
||||||
|
<value>java</value>
|
||||||
|
</property>
|
||||||
|
</activation>
|
||||||
|
<modules>
|
||||||
|
<module>samples/server/petstore/jaxrs-jersey</module>
|
||||||
|
</modules>
|
||||||
|
</profile>
|
||||||
|
<profile>
|
||||||
|
<id>jaxrs-spec</id>
|
||||||
|
<activation>
|
||||||
|
<property>
|
||||||
|
<name>env</name>
|
||||||
|
<value>java</value>
|
||||||
|
</property>
|
||||||
|
</activation>
|
||||||
|
<modules>
|
||||||
|
<module>samples/server/petstore/jaxrs-spec</module>
|
||||||
|
</modules>
|
||||||
|
</profile>
|
||||||
|
<profile>
|
||||||
|
<id>jaxrs-spec-interface</id>
|
||||||
|
<activation>
|
||||||
|
<property>
|
||||||
|
<name>env</name>
|
||||||
|
<value>java</value>
|
||||||
|
</property>
|
||||||
|
</activation>
|
||||||
|
<modules>
|
||||||
|
<module>samples/server/petstore/jaxrs-spec-interface</module>
|
||||||
|
</modules>
|
||||||
|
</profile>
|
||||||
|
<profile>
|
||||||
|
<id>jaxrs-spec-interface-response</id>
|
||||||
|
<activation>
|
||||||
|
<property>
|
||||||
|
<name>env</name>
|
||||||
|
<value>java</value>
|
||||||
|
</property>
|
||||||
|
</activation>
|
||||||
|
<modules>
|
||||||
|
<module>samples/server/petstore/jaxrs-spec-interface-response</module>
|
||||||
|
</modules>
|
||||||
|
</profile>
|
||||||
<profile>
|
<profile>
|
||||||
<id>typescript-fetch-client-tests-default</id>
|
<id>typescript-fetch-client-tests-default</id>
|
||||||
<activation>
|
<activation>
|
||||||
@@ -853,6 +902,10 @@
|
|||||||
<module>samples/client/petstore/java/google-api-client</module>
|
<module>samples/client/petstore/java/google-api-client</module>
|
||||||
<module>samples/client/petstore/kotlin/</module>
|
<module>samples/client/petstore/kotlin/</module>
|
||||||
<!-- servers -->
|
<!-- servers -->
|
||||||
|
<module>samples/server/petstore/jaxrs-jersey</module>
|
||||||
|
<module>samples/server/petstore/jaxrs-spec</module>
|
||||||
|
<module>samples/server/petstore/jaxrs-spec-interface</module>
|
||||||
|
<module>samples/server/petstore/jaxrs-spec-interface-response</module>
|
||||||
<module>samples/server/petstore/java-vertx/rx</module>
|
<module>samples/server/petstore/java-vertx/rx</module>
|
||||||
<module>samples/server/petstore/java-vertx/async</module>
|
<module>samples/server/petstore/java-vertx/async</module>
|
||||||
<module>samples/server/petstore/java-inflector</module>
|
<module>samples/server/petstore/java-inflector</module>
|
||||||
@@ -876,7 +929,6 @@
|
|||||||
<module>samples/server/petstore/jaxrs-cxf-cdi</module>
|
<module>samples/server/petstore/jaxrs-cxf-cdi</module>
|
||||||
<module>samples/server/petstore/jaxrs-cxf-non-spring-app</module>
|
<module>samples/server/petstore/jaxrs-cxf-non-spring-app</module>
|
||||||
<module>samples/server/petstore/java-msf4j</module>
|
<module>samples/server/petstore/java-msf4j</module>
|
||||||
<module>samples/server/petstore/jaxrs-spec-interface</module>
|
|
||||||
</modules>
|
</modules>
|
||||||
</profile>
|
</profile>
|
||||||
</profiles>
|
</profiles>
|
||||||
@@ -948,8 +1000,8 @@
|
|||||||
</repository>
|
</repository>
|
||||||
</repositories>
|
</repositories>
|
||||||
<properties>
|
<properties>
|
||||||
<swagger-parser-version>2.0.2-OpenAPITools.org-1</swagger-parser-version>
|
<swagger-parser-version>2.0.4</swagger-parser-version>
|
||||||
<swagger-core-version>2.0.1</swagger-core-version>
|
<swagger-core-version>2.0.4</swagger-core-version>
|
||||||
<scala-version>2.11.1</scala-version>
|
<scala-version>2.11.1</scala-version>
|
||||||
<felix-version>3.3.0</felix-version>
|
<felix-version>3.3.0</felix-version>
|
||||||
<commons-io-version>2.4</commons-io-version>
|
<commons-io-version>2.4</commons-io-version>
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
<artifactId>openapi-generator-project</artifactId>
|
<artifactId>openapi-generator-project</artifactId>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
<name>openapi-generator-project</name>
|
<name>openapi-generator-project</name>
|
||||||
<version>3.2.0</version>
|
<version>3.3.0</version>
|
||||||
<url>https://github.com/openapitools/openapi-generator</url>
|
<url>https://github.com/openapitools/openapi-generator</url>
|
||||||
<scm>
|
<scm>
|
||||||
<connection>scm:git:git@github.com:openapitools/openapi-generator.git</connection>
|
<connection>scm:git:git@github.com:openapitools/openapi-generator.git</connection>
|
||||||
@@ -928,8 +928,8 @@
|
|||||||
</repository>
|
</repository>
|
||||||
</repositories>
|
</repositories>
|
||||||
<properties>
|
<properties>
|
||||||
<swagger-parser-version>2.0.2-OpenAPITools.org-1</swagger-parser-version>
|
<swagger-parser-version>2.0.4</swagger-parser-version>
|
||||||
<swagger-core-version>2.0.1</swagger-core-version>
|
<swagger-core-version>2.0.4</swagger-core-version>
|
||||||
<scala-version>2.11.1</scala-version>
|
<scala-version>2.11.1</scala-version>
|
||||||
<felix-version>3.3.0</felix-version>
|
<felix-version>3.3.0</felix-version>
|
||||||
<commons-io-version>2.4</commons-io-version>
|
<commons-io-version>2.4</commons-io-version>
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ public class ApiClientTest {
|
|||||||
assertEquals(dateStr, apiClient.formatDate(apiClient.parseDate("2015-11-07T02:49:09.356-01:00")));
|
assertEquals(dateStr, apiClient.formatDate(apiClient.parseDate("2015-11-07T02:49:09.356-01:00")));
|
||||||
|
|
||||||
// custom date format: without milli-seconds, custom time zone
|
// custom date format: without milli-seconds, custom time zone
|
||||||
DateFormat format = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssXXX");
|
DateFormat format = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssXXX", Locale.ROOT);
|
||||||
format.setTimeZone(TimeZone.getTimeZone("GMT+10"));
|
format.setTimeZone(TimeZone.getTimeZone("GMT+10"));
|
||||||
apiClient.setDateFormat(format);
|
apiClient.setDateFormat(format);
|
||||||
dateStr = "2015-11-07T13:49:09+10:00";
|
dateStr = "2015-11-07T13:49:09+10:00";
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ public class ApiClientTest {
|
|||||||
assertEquals(dateStr, apiClient.formatDate(apiClient.parseDate("2015-11-07T02:49:09.356-01:00")));
|
assertEquals(dateStr, apiClient.formatDate(apiClient.parseDate("2015-11-07T02:49:09.356-01:00")));
|
||||||
|
|
||||||
// custom date format: without milli-seconds, custom time zone
|
// custom date format: without milli-seconds, custom time zone
|
||||||
DateFormat format = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssXXX");
|
DateFormat format = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssXXX", Locale.ROOT);
|
||||||
format.setTimeZone(TimeZone.getTimeZone("GMT+10"));
|
format.setTimeZone(TimeZone.getTimeZone("GMT+10"));
|
||||||
apiClient.setDateFormat(format);
|
apiClient.setDateFormat(format);
|
||||||
dateStr = "2015-11-07T13:49:09+10:00";
|
dateStr = "2015-11-07T13:49:09+10:00";
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ import java.text.SimpleDateFormat;
|
|||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.GregorianCalendar;
|
import java.util.GregorianCalendar;
|
||||||
|
import java.util.Locale;
|
||||||
import java.util.TimeZone;
|
import java.util.TimeZone;
|
||||||
|
|
||||||
import okio.ByteString;
|
import okio.ByteString;
|
||||||
@@ -46,7 +47,7 @@ public class JSONTest {
|
|||||||
assertEquals(json.deserialize("\"2015-11-07T03:49:09.356" + getCurrentTimezoneOffset() + "\"", java.sql.Date.class).toString(), date.toString());
|
assertEquals(json.deserialize("\"2015-11-07T03:49:09.356" + getCurrentTimezoneOffset() + "\"", java.sql.Date.class).toString(), date.toString());
|
||||||
|
|
||||||
// custom date format: without day
|
// custom date format: without day
|
||||||
DateFormat format = new SimpleDateFormat("yyyy-MM");
|
DateFormat format = new SimpleDateFormat("yyyy-MM", Locale.ROOT);
|
||||||
apiClient.setSqlDateFormat(format);
|
apiClient.setSqlDateFormat(format);
|
||||||
String dateStr = "\"2015-11\"";
|
String dateStr = "\"2015-11\"";
|
||||||
assertEquals(dateStr, json.serialize(json.deserialize("\"2015-11-07T03:49:09Z\"", java.sql.Date.class)));
|
assertEquals(dateStr, json.serialize(json.deserialize("\"2015-11-07T03:49:09Z\"", java.sql.Date.class)));
|
||||||
@@ -79,7 +80,7 @@ public class JSONTest {
|
|||||||
assertEquals(utcDate, json.serialize(date));
|
assertEquals(utcDate, json.serialize(date));
|
||||||
|
|
||||||
// custom datetime format: without milli-seconds, custom time zone
|
// custom datetime format: without milli-seconds, custom time zone
|
||||||
DateFormat format = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssXXX");
|
DateFormat format = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssXXX", Locale.ROOT);
|
||||||
format.setTimeZone(TimeZone.getTimeZone("GMT+10"));
|
format.setTimeZone(TimeZone.getTimeZone("GMT+10"));
|
||||||
apiClient.setDateFormat(format);
|
apiClient.setDateFormat(format);
|
||||||
|
|
||||||
@@ -190,10 +191,10 @@ public class JSONTest {
|
|||||||
public static String getCurrentTimezoneOffset() {
|
public static String getCurrentTimezoneOffset() {
|
||||||
|
|
||||||
TimeZone tz = TimeZone.getDefault();
|
TimeZone tz = TimeZone.getDefault();
|
||||||
Calendar cal = GregorianCalendar.getInstance(tz);
|
Calendar cal = GregorianCalendar.getInstance(tz, Locale.ROOT);
|
||||||
int offsetInMillis = tz.getOffset(cal.getTimeInMillis());
|
int offsetInMillis = tz.getOffset(cal.getTimeInMillis());
|
||||||
|
|
||||||
String offset = String.format("%02d:%02d", Math.abs(offsetInMillis / 3600000), Math.abs((offsetInMillis / 60000) % 60));
|
String offset = String.format(Locale.ROOT,"%02d:%02d", Math.abs(offsetInMillis / 3600000), Math.abs((offsetInMillis / 60000) % 60));
|
||||||
offset = (offsetInMillis >= 0 ? "+" : "-") + offset;
|
offset = (offsetInMillis >= 0 ? "+" : "-") + offset;
|
||||||
|
|
||||||
return offset;
|
return offset;
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ public class ApiClientTest {
|
|||||||
assertEquals(dateStr, apiClient.formatDate(apiClient.parseDate("2015-11-07T02:49:09.356-01:00")));
|
assertEquals(dateStr, apiClient.formatDate(apiClient.parseDate("2015-11-07T02:49:09.356-01:00")));
|
||||||
|
|
||||||
// custom date format: without milli-seconds, custom time zone
|
// custom date format: without milli-seconds, custom time zone
|
||||||
DateFormat format = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssXXX");
|
DateFormat format = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssXXX", Locale.ROOT);
|
||||||
format.setTimeZone(TimeZone.getTimeZone("GMT+10"));
|
format.setTimeZone(TimeZone.getTimeZone("GMT+10"));
|
||||||
apiClient.setDateFormat(format);
|
apiClient.setDateFormat(format);
|
||||||
dateStr = "2015-11-07T13:49:09+10:00";
|
dateStr = "2015-11-07T13:49:09+10:00";
|
||||||
|
|||||||
97
README.md
97
README.md
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
<div align="center">
|
<div align="center">
|
||||||
|
|
||||||
[Master](https://github.com/OpenAPITools/openapi-generator/tree/master) (`3.2.1`): [](https://travis-ci.org/OpenAPITools/openapi-generator)
|
[Master](https://github.com/OpenAPITools/openapi-generator/tree/master) (`3.3.0`): [](https://travis-ci.org/OpenAPITools/openapi-generator)
|
||||||
[](https://circleci.com/gh/OpenAPITools/openapi-generator)
|
[](https://circleci.com/gh/OpenAPITools/openapi-generator)
|
||||||
[](https://app.shippable.com/github/OpenAPITools/openapi-generator)
|
[](https://app.shippable.com/github/OpenAPITools/openapi-generator)
|
||||||
[](https://ci.appveyor.com/project/WilliamCheng/openapi-generator-wh2wu)
|
[](https://ci.appveyor.com/project/WilliamCheng/openapi-generator-wh2wu)
|
||||||
@@ -42,11 +42,11 @@ OpenAPI Generator allows generation of API client libraries (SDK generation), se
|
|||||||
|
|
||||||
| | Languages/Frameworks |
|
| | Languages/Frameworks |
|
||||||
|-|-|
|
|-|-|
|
||||||
**API clients** | **ActionScript**, **Ada**, **Apex**, **Bash**, **C#** (.net 2.0, 3.5 or later), **C++** (cpprest, Qt5, Tizen), **Clojure**, **Dart**, **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), **Kotlin**, **Lua**, **Node.js** (ES5, ES6, AngularJS with Google Closure Compiler annotations, Flow types) **Objective-C**, **Perl**, **PHP**, **PowerShell**, **Python**, **R**, **Ruby**, **Rust** (rust, rust-server), **Scala** (akka, http4s, scalaz, swagger-async-httpclient), **Swift** (2.x, 3.x, 4.x), **Typescript** (AngularJS, Angular (2.x - 6.x), Aurelia, Fetch, Inversify, jQuery, Node)
|
**API clients** | **ActionScript**, **Ada**, **Apex**, **Bash**, **C#** (.net 2.0, 3.5 or later), **C++** (cpprest, Qt5, Tizen), **Clojure**, **Dart (1.x, 2.x)**, **Elixir**, **Elm**, **Eiffel**, **Erlang**, **Go**, **Groovy**, **Haskell** (http-client, Servant), **Java** (Jersey1.x, Jersey2.x, OkHttp, Retrofit1.x, Retrofit2.x, Feign, RestTemplate, RESTEasy, Vertx, Google API Client Library for Java, Rest-assured, Spring 5 Web Client), **Kotlin**, **Lua**, **Node.js** (ES5, ES6, AngularJS with Google Closure Compiler annotations, Flow types) **Objective-C**, **Perl**, **PHP**, **PowerShell**, **Python**, **R**, **Ruby**, **Rust** (rust, rust-server), **Scala** (akka, http4s, scalaz, swagger-async-httpclient), **Swift** (2.x, 3.x, 4.x), **Typescript** (AngularJS, Angular (2.x - 6.x), Aurelia, Axios, Fetch, Inversify, jQuery, Node)
|
||||||
**Server stubs** | **Ada**, **C#** (ASP.NET Core, NancyFx), **C++** (Pistache, Restbed), **Erlang**, **Go**, **Haskell** (Servant), **Java** (MSF4J, Spring, Undertow, JAX-RS: CDI, CXF, Inflector, RestEasy, Play Framework, [PKMST](https://github.com/ProKarma-Inc/pkmst-getting-started-examples)), **Kotlin**, **PHP** (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), Scalatra)
|
**Server stubs** | **Ada**, **C#** (ASP.NET Core, NancyFx), **C++** (Pistache, Restbed), **Erlang**, **Go** (net/http, Gin), **Haskell** (Servant), **Java** (MSF4J, Spring, Undertow, JAX-RS: CDI, CXF, Inflector, RestEasy, Play Framework, [PKMST](https://github.com/ProKarma-Inc/pkmst-getting-started-examples)), **Kotlin** (Spring Boot), **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), Scalatra)
|
||||||
**API documentation generators** | **HTML**, **Confluence Wiki**
|
**API documentation generators** | **HTML**, **Confluence Wiki**
|
||||||
**Configuration files** | [**Apache2**](https://httpd.apache.org/)
|
**Configuration files** | [**Apache2**](https://httpd.apache.org/)
|
||||||
**Others** | **JMeter**
|
**Others** | **JMeter**, **MySQL Schema**
|
||||||
|
|
||||||
## Table of contents
|
## Table of contents
|
||||||
|
|
||||||
@@ -80,19 +80,17 @@ OpenAPI Generator allows generation of API client libraries (SDK generation), se
|
|||||||
|
|
||||||
The OpenAPI Specification has undergone 3 revisions since initial creation in 2010. The openapi-generator project has the following compatibilities with the OpenAPI Specification:
|
The OpenAPI Specification has undergone 3 revisions since initial creation in 2010. The openapi-generator project has the following compatibilities with the OpenAPI Specification:
|
||||||
|
|
||||||
OpenAPI Generator Version | Release Date | OpenAPI Spec compatibility | Notes
|
OpenAPI Generator Version | Release Date | Notes
|
||||||
---------------------------- | ------------ | -------------------------- | -----
|
---------------------------- | ------------ | -----
|
||||||
4.0.0 (upcoming major release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/4.0.0-SNAPSHOT/)| TBD | 1.0, 1.1, 1.2, 2.0, 3.0 | Major release with breaking changes (no fallback)
|
4.0.0 (upcoming major release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/4.0.0-SNAPSHOT/)| TBD | Major release with breaking changes (no fallback)
|
||||||
3.2.1 (current master, upcoming minor release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/3.2.1-SNAPSHOT/)| TBD | 1.0, 1.1, 1.2, 2.0, 3.0 | Minor release with breaking changes (with fallbacks)
|
3.4.0 (upcoming minor release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/3.4.0-SNAPSHOT/)| TBD | Minor release (breaking changes with fallbacks)
|
||||||
[3.1.2](https://github.com/OpenAPITools/openapi-generator/releases/tag/v3.1.2) | 25.07.2018 | 1.0, 1.1, 1.2, 2.0, 3.0 | Bugfix release
|
[3.3.0](https://github.com/OpenAPITools/openapi-generator/releases/tag/v3.3.0) (latest stable release) | 01.10.2018 | Minor release (breaking changes with fallbacks)
|
||||||
[3.1.1](https://github.com/OpenAPITools/openapi-generator/releases/tag/v3.1.1) | 18.07.2018 | 1.0, 1.1, 1.2, 2.0, 3.0 | Bugfix release
|
|
||||||
[3.1.0](https://github.com/OpenAPITools/openapi-generator/releases/tag/v3.1.0) | 06.07.2018 | 1.0, 1.1, 1.2, 2.0, 3.0 | Minor release with breaking changes (with fallbacks)
|
|
||||||
[3.0.3](https://github.com/OpenAPITools/openapi-generator/releases/tag/v3.0.3) | 27.06.2018 | 1.0, 1.1, 1.2, 2.0, 3.0 | Bugfix release
|
|
||||||
[3.0.2](https://github.com/OpenAPITools/openapi-generator/releases/tag/v3.0.2) | 18.06.2018 | 1.0, 1.1, 1.2, 2.0, 3.0 | Bugfix release
|
|
||||||
[3.0.1](https://github.com/OpenAPITools/openapi-generator/releases/tag/v3.0.1) | 11.06.2018 | 1.0, 1.1, 1.2, 2.0, 3.0 | Bugfix release
|
|
||||||
[3.0.0](https://github.com/OpenAPITools/openapi-generator/releases/tag/v3.0.0) | 01.06.2018 | 1.0, 1.1, 1.2, 2.0, 3.0 | First release with breaking changes
|
|
||||||
|
|
||||||
### [1.2 - Artifacts on Maven Central](#table-of-contents)
|
OpenAPI Spec compatibility: 1.0, 1.1, 1.2, 2.0, 3.0
|
||||||
|
|
||||||
|
For old releases, please refer to the [**Release**](https://github.com/OpenAPITools/openapi-generator/releases) page.
|
||||||
|
|
||||||
|
## [1.2 - Artifacts on Maven Central](#table-of-contents)
|
||||||
|
|
||||||
You can find our released artefacts on maven central:
|
You can find our released artefacts on maven central:
|
||||||
|
|
||||||
@@ -142,16 +140,16 @@ See the different versions of the [openapi-generator-cli](https://mvnrepository.
|
|||||||
|
|
||||||
If you're looking for the latest stable version, you can grab it directly from Maven.org (Java 8 runtime at a minimum):
|
If you're looking for the latest stable version, you can grab it directly from Maven.org (Java 8 runtime at a minimum):
|
||||||
|
|
||||||
JAR location: `http://central.maven.org/maven2/org/openapitools/openapi-generator-cli/3.1.2/openapi-generator-cli-3.1.2.jar`
|
JAR location: `http://central.maven.org/maven2/org/openapitools/openapi-generator-cli/3.3.0/openapi-generator-cli-3.3.0.jar`
|
||||||
|
|
||||||
For **Mac/Linux** users:
|
For **Mac/Linux** users:
|
||||||
```sh
|
```sh
|
||||||
wget http://central.maven.org/maven2/org/openapitools/openapi-generator-cli/3.1.2/openapi-generator-cli-3.1.2.jar -O openapi-generator-cli.jar
|
wget http://central.maven.org/maven2/org/openapitools/openapi-generator-cli/3.3.0/openapi-generator-cli-3.3.0.jar -O openapi-generator-cli.jar
|
||||||
```
|
```
|
||||||
|
|
||||||
For **Windows** users, you will need to install [wget](http://gnuwin32.sourceforge.net/packages/wget.htm) or you can use Invoke-WebRequest in PowerShell (3.0+), e.g.
|
For **Windows** users, you will need to install [wget](http://gnuwin32.sourceforge.net/packages/wget.htm) or you can use Invoke-WebRequest in PowerShell (3.0+), e.g.
|
||||||
```
|
```
|
||||||
Invoke-WebRequest -OutFile openapi-generator-cli.jar http://central.maven.org/maven2/org/openapitools/openapi-generator-cli/3.1.2/openapi-generator-cli-3.1.2.jar
|
Invoke-WebRequest -OutFile openapi-generator-cli.jar http://central.maven.org/maven2/org/openapitools/openapi-generator-cli/3.3.0/openapi-generator-cli-3.3.0.jar
|
||||||
```
|
```
|
||||||
|
|
||||||
After downloading the JAR, run `java -jar openapi-generator-cli.jar help` to show the usage.
|
After downloading the JAR, run `java -jar openapi-generator-cli.jar help` to show the usage.
|
||||||
@@ -164,7 +162,7 @@ export PATH=${JAVA_HOME}/bin:$PATH
|
|||||||
|
|
||||||
### Launcher Script
|
### Launcher Script
|
||||||
|
|
||||||
One downside to manual jar downloads is that you don't keep up-to-date with the latest released version. We have a Bash launcher script at [bin/utils/openapi-generator.cli.sh](./bin/utils/openapi-generator.cli.sh) which resolves this issue.
|
One downside to manual jar downloads is that you don't keep up-to-date with the latest released version. We have a Bash launcher script at [bin/utils/openapi-generator.cli.sh](./bin/utils/openapi-generator-cli.sh) which resolves this issue.
|
||||||
|
|
||||||
To install the launcher script, copy the contents of the script to a location on your path and make the script executable.
|
To install the launcher script, copy the contents of the script to a location on your path and make the script executable.
|
||||||
|
|
||||||
@@ -172,7 +170,7 @@ An example of setting this up (NOTE: Always evaluate scripts curled from externa
|
|||||||
|
|
||||||
```
|
```
|
||||||
mkdir -p ~/bin/openapitools
|
mkdir -p ~/bin/openapitools
|
||||||
curl https://raw.githubusercontent.com/OpenAPITools/openapi-generator/master/bin/utils/openapi-generator.cli.sh > ~/bin/openapitools/openapi-generator-cli
|
curl https://raw.githubusercontent.com/OpenAPITools/openapi-generator/master/bin/utils/openapi-generator-cli.sh > ~/bin/openapitools/openapi-generator-cli
|
||||||
chmod u+x ~/bin/openapitools/openapi-generator-cli
|
chmod u+x ~/bin/openapitools/openapi-generator-cli
|
||||||
export PATH=$PATH:~/bin/openapitools/
|
export PATH=$PATH:~/bin/openapitools/
|
||||||
```
|
```
|
||||||
@@ -368,21 +366,23 @@ To get a list of PHP specified options (which can be passed to the generator wit
|
|||||||
You can build a client against the [Petstore API](https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/2_0/petstore.yaml) as follows:
|
You can build a client against the [Petstore API](https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/2_0/petstore.yaml) as follows:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
./bin/java-petstore.sh
|
./bin/java-petstore-okhttp-gson.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
(On Windows, run `.\bin\windows\java-petstore.bat` instead)
|
(On Windows, run `.\bin\windows\java-petstore-okhttp-gson.bat` instead)
|
||||||
|
|
||||||
This will run the generator with this command:
|
This script uses the default library, which is `okhttp-gson`. It will run the generator with this command:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar generate \
|
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 \
|
-i https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/2_0/petstore.yaml \
|
||||||
-g java \
|
-g java \
|
||||||
-o samples/client/petstore/java
|
-o samples/client/petstore/java/okhttp-gson
|
||||||
```
|
```
|
||||||
|
|
||||||
with a number of options. You can get the options with the `help generate` command (below only shows partial results):
|
with a number of options. [The java options are documented here.](docs/generators/java.md)
|
||||||
|
|
||||||
|
You can also get the options with the `help generate` command (below only shows partial results):
|
||||||
|
|
||||||
```
|
```
|
||||||
NAME
|
NAME
|
||||||
@@ -407,13 +407,14 @@ SYNOPSIS
|
|||||||
[--invoker-package <invoker package>]
|
[--invoker-package <invoker package>]
|
||||||
[(-l <language> | --lang <language>)]
|
[(-l <language> | --lang <language>)]
|
||||||
[--language-specific-primitives <language specific primitives>...]
|
[--language-specific-primitives <language specific primitives>...]
|
||||||
[--library <library>] [--model-name-prefix <model name prefix>]
|
[--library <library>] [--log-to-stderr]
|
||||||
|
[--model-name-prefix <model name prefix>]
|
||||||
[--model-name-suffix <model name suffix>]
|
[--model-name-suffix <model name suffix>]
|
||||||
[--model-package <model package>]
|
[--model-package <model package>]
|
||||||
[(-o <output directory> | --output <output directory>)]
|
[(-o <output directory> | --output <output directory>)]
|
||||||
[--release-note <release note>] [--remove-operation-id-prefix]
|
[--release-note <release note>] [--remove-operation-id-prefix]
|
||||||
[--reserved-words-mappings <reserved word mappings>...]
|
[--reserved-words-mappings <reserved word mappings>...]
|
||||||
[(-s | --skip-overwrite)]
|
[(-s | --skip-overwrite)] [--skip-validate-spec]
|
||||||
[(-t <template directory> | --template-dir <template directory>)]
|
[(-t <template directory> | --template-dir <template directory>)]
|
||||||
[--type-mappings <type mappings>...] [(-v | --verbose)]
|
[--type-mappings <type mappings>...] [(-v | --verbose)]
|
||||||
|
|
||||||
@@ -433,16 +434,19 @@ OPTIONS
|
|||||||
You can then compile and run the client, as well as unit tests against it:
|
You can then compile and run the client, as well as unit tests against it:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
cd samples/client/petstore/java
|
cd samples/client/petstore/java/okhttp-gson
|
||||||
mvn package
|
mvn package
|
||||||
```
|
```
|
||||||
|
|
||||||
Other languages have petstore samples, too:
|
Other languages have petstore samples, too:
|
||||||
```sh
|
```sh
|
||||||
./bin/android-petstore.sh
|
./bin/android-petstore-all.sh
|
||||||
./bin/java-petstore.sh
|
./bin/java-petstore-all.sh
|
||||||
./bin/objc-petstore.sh
|
./bin/objc-petstore.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
|
... and others. [Here is a list of all scripts.](wiki/Samples-folder#scripts)
|
||||||
|
|
||||||
### [3.1 - Customization](#table-of-contents)
|
### [3.1 - Customization](#table-of-contents)
|
||||||
|
|
||||||
Please refer to [customization.md](docs/customization.md) on how to customize the output (e.g. package name, version)
|
Please refer to [customization.md](docs/customization.md) on how to customize the output (e.g. package name, version)
|
||||||
@@ -469,12 +473,17 @@ Here are some companies/projects (alphabetical order) using OpenAPI Generator in
|
|||||||
|
|
||||||
- [Angular.Schule](https://angular.schule/)
|
- [Angular.Schule](https://angular.schule/)
|
||||||
- [Bithost GmbH](https://www.bithost.ch)
|
- [Bithost GmbH](https://www.bithost.ch)
|
||||||
|
- [Boxever](https://www.boxever.com/)
|
||||||
- [GMO Pepabo](https://pepabo.com/en/)
|
- [GMO Pepabo](https://pepabo.com/en/)
|
||||||
|
- [JustStar](https://www.juststarinfo.com)
|
||||||
|
- [Myworkout](https://myworkout.com)
|
||||||
- [Raiffeisen Schweiz Genossenschaft](https://www.raiffeisen.ch)
|
- [Raiffeisen Schweiz Genossenschaft](https://www.raiffeisen.ch)
|
||||||
- [RepreZen API Studio](https://www.reprezen.com/swagger-openapi-code-generation-api-first-microservices-enterprise-development)
|
- [RepreZen API Studio](https://www.reprezen.com/swagger-openapi-code-generation-api-first-microservices-enterprise-development)
|
||||||
- [REST United](https://restunited.com)
|
- [REST United](https://restunited.com)
|
||||||
|
- [Suva](https://www.suva.ch/)
|
||||||
- [Telstra](https://dev.telstra.com)
|
- [Telstra](https://dev.telstra.com)
|
||||||
- [unblu inc.](https://www.unblu.com/)
|
- [unblu inc.](https://www.unblu.com/)
|
||||||
|
- [Zalando](https://www.zalando.com)
|
||||||
|
|
||||||
## [5 - Presentations/Videos/Tutorials/Books](#table-of-contents)
|
## [5 - Presentations/Videos/Tutorials/Books](#table-of-contents)
|
||||||
|
|
||||||
@@ -483,8 +492,9 @@ Here are some companies/projects (alphabetical order) using OpenAPI Generator in
|
|||||||
- 2018/05/15 - [REST API仕様からAPIクライアントやスタブサーバを自動生成する「OpenAPI Generator」オープンソースで公開。Swagger Codegenからのフォーク](https://www.publickey1.jp/blog/18/rest_apiapiopenapi_generatorswagger_generator.html) by [Publickey](https://www.publickey1.jp)
|
- 2018/05/15 - [REST API仕様からAPIクライアントやスタブサーバを自動生成する「OpenAPI Generator」オープンソースで公開。Swagger Codegenからのフォーク](https://www.publickey1.jp/blog/18/rest_apiapiopenapi_generatorswagger_generator.html) by [Publickey](https://www.publickey1.jp)
|
||||||
- 2018/06/08 - [Swagger Codegen is now OpenAPI Generator](https://angular.schule/blog/2018-06-swagger-codegen-is-now-openapi-generator) by [JohannesHoppe](https://github.com/JohannesHoppe)
|
- 2018/06/08 - [Swagger Codegen is now OpenAPI Generator](https://angular.schule/blog/2018-06-swagger-codegen-is-now-openapi-generator) by [JohannesHoppe](https://github.com/JohannesHoppe)
|
||||||
- 2018/06/21 - [Connect your JHipster apps to the world of APIs with OpenAPI and gRPC](https://fr.slideshare.net/chbornet/jhipster-conf-2018-connect-your-jhipster-apps-to-the-world-of-apis-with-openapi-and-grpc) by [Christophe Bornet](https://github.com/cbornet) at [JHipster Conf 2018](https://jhipster-conf.github.io/)
|
- 2018/06/21 - [Connect your JHipster apps to the world of APIs with OpenAPI and gRPC](https://fr.slideshare.net/chbornet/jhipster-conf-2018-connect-your-jhipster-apps-to-the-world-of-apis-with-openapi-and-grpc) by [Christophe Bornet](https://github.com/cbornet) at [JHipster Conf 2018](https://jhipster-conf.github.io/)
|
||||||
- 2018/06/27 - [Lessons Learned from Leading an Open-Source Project Supporting 30+ Programming Languages](https://speakerdeck.com/wing328/lessons-learned-from-leading-an-open-source-project-supporting-30-plus-programming-languages) - [William Cheng](https://github.com/wing328) at [LinuxCon + ContainerCon + CloudOpen China 2018](https://www.lfasiallc.com/events/lc3-2018/)
|
- 2018/06/27 - [Lessons Learned from Leading an Open-Source Project Supporting 30+ Programming Languages](https://speakerdeck.com/wing328/lessons-learned-from-leading-an-open-source-project-supporting-30-plus-programming-languages) - [William Cheng](https://github.com/wing328) at [LinuxCon + ContainerCon + CloudOpen China 2018](http://bit.ly/2waDKKX)
|
||||||
- 2018/07/19 - [OpenAPI Generator Contribution Quickstart - RingCentral Go SDK](https://medium.com/ringcentral-developers/openapi-generator-for-go-contribution-quickstart-8cc72bf37b53) by [John Wang](https://github.com/grokify)
|
- 2018/07/19 - [OpenAPI Generator Contribution Quickstart - RingCentral Go SDK](https://medium.com/ringcentral-developers/openapi-generator-for-go-contribution-quickstart-8cc72bf37b53) by [John Wang](https://github.com/grokify)
|
||||||
|
- 2018/08/22 - [OpenAPI Generatorのプロジェクト構成などのメモ](https://yinm.info/20180822/) by [Yusuke Iinuma](https://github.com/yinm)
|
||||||
|
|
||||||
## [6 - About Us](#table-of-contents)
|
## [6 - About Us](#table-of-contents)
|
||||||
|
|
||||||
@@ -514,7 +524,9 @@ Here is a list of template creators:
|
|||||||
* C# (.NET 4.5 refactored): @jimschubert
|
* C# (.NET 4.5 refactored): @jimschubert
|
||||||
* Clojure: @xhh
|
* Clojure: @xhh
|
||||||
* Dart: @yissachar
|
* Dart: @yissachar
|
||||||
* Dart (refactored in 2.4.0): @joernahrens
|
* Dart (refactor): @joernahrens
|
||||||
|
* Dart 2: @swipesight
|
||||||
|
* Dart (Jaguar): @jaumard
|
||||||
* Elixir: @niku
|
* Elixir: @niku
|
||||||
* Elm: @trenneman
|
* Elm: @trenneman
|
||||||
* Eiffel: @jvelilla
|
* Eiffel: @jvelilla
|
||||||
@@ -550,11 +562,12 @@ Here is a list of template creators:
|
|||||||
* Swift: @tkqubo
|
* Swift: @tkqubo
|
||||||
* Swift 3: @hexelon
|
* Swift 3: @hexelon
|
||||||
* Swift 4: @ehyche
|
* Swift 4: @ehyche
|
||||||
* TypeScript (Node): @mhardorf
|
|
||||||
* TypeScript (Angular1): @mhardorf
|
* TypeScript (Angular1): @mhardorf
|
||||||
* TypeScript (Fetch): @leonyu
|
|
||||||
* TypeScript (Angular2): @roni-frantchi
|
* TypeScript (Angular2): @roni-frantchi
|
||||||
|
* TypeScript (Axios): @nicokoenig
|
||||||
|
* TypeScript (Fetch): @leonyu
|
||||||
* TypeScript (jQuery): @bherila
|
* TypeScript (jQuery): @bherila
|
||||||
|
* TypeScript (Node): @mhardorf
|
||||||
* Server Stubs
|
* Server Stubs
|
||||||
* Ada: @stcarrez
|
* Ada: @stcarrez
|
||||||
* C# ASP.NET5: @jimschubert
|
* C# ASP.NET5: @jimschubert
|
||||||
@@ -564,6 +577,7 @@ Here is a list of template creators:
|
|||||||
* C++ Restbed: @stkrwork
|
* C++ Restbed: @stkrwork
|
||||||
* Erlang Server: @galaxie
|
* Erlang Server: @galaxie
|
||||||
* Go Server: @guohuang
|
* Go Server: @guohuang
|
||||||
|
* Go (Gin) Server: @kemokemo
|
||||||
* Haskell Servant: @algas
|
* Haskell Servant: @algas
|
||||||
* Java MSF4J: @sanjeewa-malalgoda
|
* Java MSF4J: @sanjeewa-malalgoda
|
||||||
* Java Spring Boot: @diyfr
|
* Java Spring Boot: @diyfr
|
||||||
@@ -575,6 +589,7 @@ Here is a list of template creators:
|
|||||||
* JAX-RS CXF (CDI): @nickcmaynard
|
* JAX-RS CXF (CDI): @nickcmaynard
|
||||||
* JAX-RS RestEasy (JBoss EAP): @jfiala
|
* JAX-RS RestEasy (JBoss EAP): @jfiala
|
||||||
* Kotlin: @jimschubert
|
* Kotlin: @jimschubert
|
||||||
|
* Kotlin (Spring Boot): @dr4ke616
|
||||||
* PHP Laravel: @renepardon
|
* PHP Laravel: @renepardon
|
||||||
* PHP Lumen: @abcsun
|
* PHP Lumen: @abcsun
|
||||||
* PHP Slim: @jfastnacht
|
* PHP Slim: @jfastnacht
|
||||||
@@ -589,6 +604,8 @@ Here is a list of template creators:
|
|||||||
* Confluence Wiki: @jhitchcock
|
* Confluence Wiki: @jhitchcock
|
||||||
* Configuration
|
* Configuration
|
||||||
* Apache2: @stkrwork
|
* Apache2: @stkrwork
|
||||||
|
* Schema
|
||||||
|
* MySQL: @ybelenko
|
||||||
|
|
||||||
#### How to join the core team
|
#### How to join the core team
|
||||||
|
|
||||||
@@ -629,16 +646,16 @@ If you want to join the committee, please kindly apply by sending an email to te
|
|||||||
| C++ | @ravinikam (2017/07) @stkrwork (2017/07) @fvarose (2017/11) @etherealjoy (2018/02) @martindelille (2018/03) |
|
| C++ | @ravinikam (2017/07) @stkrwork (2017/07) @fvarose (2017/11) @etherealjoy (2018/02) @martindelille (2018/03) |
|
||||||
| C# | @mandrean (2017/08) @jimschubert (2017/09) |
|
| C# | @mandrean (2017/08) @jimschubert (2017/09) |
|
||||||
| Clojure | |
|
| Clojure | |
|
||||||
| Dart | @ircecho (2017/07) |
|
| Dart | @ircecho (2017/07) @swipesight (2018/09) @jaumard (2018/09) |
|
||||||
| Eiffel | @jvelilla (2017/09) |
|
| Eiffel | @jvelilla (2017/09) |
|
||||||
| Elixir | |
|
| Elixir | |
|
||||||
| Elm | |
|
| Elm | @trenneman (2018/09) |
|
||||||
| Erlang | @tsloughter (2017/11) |
|
| Erlang | @tsloughter (2017/11) |
|
||||||
| Go | @antihax (2017/11) @bvwells (2017/12) @grokify (2018/07) |
|
| Go | @antihax (2017/11) @bvwells (2017/12) @grokify (2018/07) @kemokemo (2018/09 |
|
||||||
| Groovy | |
|
| Groovy | |
|
||||||
| Haskell | |
|
| Haskell | |
|
||||||
| Java | @bbdouglas (2017/07) @JFCote (2017/08) @sreeshas (2017/08) @jfiala (2017/08) @lukoyanov (2017/09) @cbornet (2017/09) @jeff9finger (2018/01) |
|
| Java | @bbdouglas (2017/07) @JFCote (2017/08) @sreeshas (2017/08) @jfiala (2017/08) @lukoyanov (2017/09) @cbornet (2017/09) @jeff9finger (2018/01) |
|
||||||
| Kotlin | @jimschubert (2017/09) |
|
| Kotlin | @jimschubert (2017/09) @dr4ke616 (2018/08) |
|
||||||
| Lua | @daurnimator (2017/08) |
|
| Lua | @daurnimator (2017/08) |
|
||||||
| NodeJS/Javascript | @CodeNinjai (2017/07) @frol (2017/07) @cliffano (2017/07) |
|
| NodeJS/Javascript | @CodeNinjai (2017/07) @frol (2017/07) @cliffano (2017/07) |
|
||||||
| ObjC | |
|
| ObjC | |
|
||||||
@@ -651,7 +668,7 @@ If you want to join the committee, please kindly apply by sending an email to te
|
|||||||
| Rust | @frol (2017/07) @farcaller (2017/08) @bjgill (2017/12) |
|
| Rust | @frol (2017/07) @farcaller (2017/08) @bjgill (2017/12) |
|
||||||
| Scala | @clasnake (2017/07) @jimschubert (2017/09) @shijinkui (2018/01) @ramzimaalej (2018/03) |
|
| Scala | @clasnake (2017/07) @jimschubert (2017/09) @shijinkui (2018/01) @ramzimaalej (2018/03) |
|
||||||
| Swift | @jgavris (2017/07) @ehyche (2017/08) @Edubits (2017/09) @jaz-ah (2017/09) @d-date (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) |
|
| TypeScript | @TiFu (2017/07) @taxpon (2017/07) @sebastianhaas (2017/07) @kenisteward (2017/07) @Vrolijkx (2017/09) @macjohnny (2018/01) @nicokoenig (2018/09) |
|
||||||
|
|
||||||
### [6.3 - History of OpenAPI Generator](#table-of-contents)
|
### [6.3 - History of OpenAPI Generator](#table-of-contents)
|
||||||
|
|
||||||
|
|||||||
@@ -35,6 +35,8 @@ build_script:
|
|||||||
# install openapi-generator locally
|
# install openapi-generator locally
|
||||||
- mvn clean install --quiet
|
- mvn clean install --quiet
|
||||||
test_script:
|
test_script:
|
||||||
|
# restore test-related files
|
||||||
|
- copy /b/v/y CI\samples.ci\client\petstore\csharp\OpenAPIClient\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj samples\client\petstore\csharp\OpenAPIClient\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
|
||||||
# test c# API client
|
# test c# API client
|
||||||
- nunit-console samples\client\petstore\csharp\OpenAPIClient\src\Org.OpenAPITools.Test\bin\Debug\Org.OpenAPITools.Test.dll --result=myresults.xml;format=AppVeyor
|
- nunit-console samples\client\petstore\csharp\OpenAPIClient\src\Org.OpenAPITools.Test\bin\Debug\Org.OpenAPITools.Test.dll --result=myresults.xml;format=AppVeyor
|
||||||
# test c# API client (with PropertyChanged)
|
# test c# API client (with PropertyChanged)
|
||||||
@@ -42,6 +44,10 @@ test_script:
|
|||||||
|
|
||||||
# generate all petstore clients
|
# generate all petstore clients
|
||||||
- .\bin\windows\run-all-petstore.cmd
|
- .\bin\windows\run-all-petstore.cmd
|
||||||
|
|
||||||
|
# generate all petstore clients (openapi3)
|
||||||
|
- .\bin\openapi3\windows\run-all-petstore.cmd
|
||||||
|
|
||||||
cache:
|
cache:
|
||||||
- C:\maven\
|
- C:\maven\
|
||||||
- C:\Users\appveyor\.m2
|
- C:\Users\appveyor\.m2
|
||||||
|
|||||||
@@ -29,8 +29,9 @@ fi
|
|||||||
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
|
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
|
||||||
ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g csharp -o samples/client/petstore/csharp/OpenAPIClient --additional-properties packageGuid={321C8C3F-0156-40C1-AE42-D59761FB9B6C} $@"
|
ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g csharp -o samples/client/petstore/csharp/OpenAPIClient --additional-properties packageGuid={321C8C3F-0156-40C1-AE42-D59761FB9B6C} $@"
|
||||||
|
|
||||||
|
java $JAVA_OPTS -jar $executable $ags
|
||||||
|
|
||||||
# restore csproj file
|
# restore csproj file
|
||||||
echo "restore csproject file: CI/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj"
|
echo "restore csproject file: CI/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj"
|
||||||
cp ./CI/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj ./samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/
|
cp ./CI/samples.ci/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj ./samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/
|
||||||
|
|
||||||
java $JAVA_OPTS -jar $executable $ags
|
|
||||||
|
|||||||
42
bin/dart-jaguar-petstore.sh
Executable file
42
bin/dart-jaguar-petstore.sh
Executable file
@@ -0,0 +1,42 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
SCRIPT="$0"
|
||||||
|
|
||||||
|
while [ -h "$SCRIPT" ] ; do
|
||||||
|
ls=`ls -ld "$SCRIPT"`
|
||||||
|
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||||
|
if expr "$link" : '/.*' > /dev/null; then
|
||||||
|
SCRIPT="$link"
|
||||||
|
else
|
||||||
|
SCRIPT=`dirname "$SCRIPT"`/"$link"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ ! -d "${APP_DIR}" ]; then
|
||||||
|
APP_DIR=`dirname "$SCRIPT"`/..
|
||||||
|
APP_DIR=`cd "${APP_DIR}"; pwd`
|
||||||
|
fi
|
||||||
|
|
||||||
|
executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar"
|
||||||
|
|
||||||
|
if [ ! -f "$executable" ]
|
||||||
|
then
|
||||||
|
mvn clean package
|
||||||
|
fi
|
||||||
|
|
||||||
|
# if you've executed sbt assembly previously it will use that instead.
|
||||||
|
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
|
||||||
|
|
||||||
|
# Generate client
|
||||||
|
ags="$@ generate -t modules/openapi-generator/src/main/resources/dart-jaguar -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -l dart-jaguar -o samples/client/petstore/dart-jaguar/openapi -DhideGenerationTimestamp=true -DpubName=openapi"
|
||||||
|
java $JAVA_OPTS -jar $executable $ags
|
||||||
|
|
||||||
|
# Generate non-browserClient and put it to the flutter sample app
|
||||||
|
ags="$@ generate -t modules/openapi-generator/src/main/resources/dart-jaguar -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -l dart-jaguar -o samples/client/petstore/dart-jaguar/flutter_petstore/openapi -DhideGenerationTimestamp=true -DpubName=openapi"
|
||||||
|
java $JAVA_OPTS -jar $executable $ags
|
||||||
|
|
||||||
|
# There is a proposal to allow importing different libraries depending on the environment:
|
||||||
|
# https://github.com/munificent/dep-interface-libraries
|
||||||
|
# When this is implemented there will only be one library.
|
||||||
|
|
||||||
|
# The current petstore test will then work for both: the browser library and the vm library.
|
||||||
@@ -29,18 +29,18 @@ fi
|
|||||||
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
|
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
|
||||||
|
|
||||||
# Generate non-browserClient
|
# Generate non-browserClient
|
||||||
ags="generate -t modules/openapi-generator/src/main/resources/dart -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g dart -o samples/client/petstore/dart/openapi -DhideGenerationTimestamp=true -DbrowserClient=false $@"
|
ags="generate -t modules/openapi-generator/src/main/resources/dart -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g dart -o samples/client/petstore/dart/openapi -DhideGenerationTimestamp=true -DbrowserClient=false --additional-properties supportDart2=false $@"
|
||||||
|
|
||||||
# then options to generate the library for vm would be:
|
# then options to generate the library for vm would be:
|
||||||
#ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g dart -o samples/client/petstore/dart/openapi_vm -DbrowserClient=false -DpubName=openapi_vm $@"
|
#ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g dart -o samples/client/petstore/dart/openapi_vm -DbrowserClient=false -DpubName=openapi_vm --additional-properties supportDart2=false $@"
|
||||||
java $JAVA_OPTS -jar $executable $ags
|
java $JAVA_OPTS -jar $executable $ags
|
||||||
|
|
||||||
# Generate browserClient
|
# Generate browserClient
|
||||||
ags="generate -t modules/openapi-generator/src/main/resources/dart -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g dart -o samples/client/petstore/dart/openapi-browser-client -DhideGenerationTimestamp=true -DbrowserClient=true $@"
|
ags="generate -t modules/openapi-generator/src/main/resources/dart -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g dart -o samples/client/petstore/dart/openapi-browser-client -DhideGenerationTimestamp=true -DbrowserClient=true --additional-properties supportDart2=false $@"
|
||||||
java $JAVA_OPTS -jar $executable $ags
|
java $JAVA_OPTS -jar $executable $ags
|
||||||
|
|
||||||
# Generate non-browserClient and put it to the flutter sample app
|
# Generate non-browserClient and put it to the flutter sample app
|
||||||
ags="generate -t modules/openapi-generator/src/main/resources/dart -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g dart -o samples/client/petstore/dart/flutter_petstore/openapi -DhideGenerationTimestamp=true -DbrowserClient=false $@"
|
ags="generate -t modules/openapi-generator/src/main/resources/dart -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g dart -o samples/client/petstore/dart/flutter_petstore/openapi -DhideGenerationTimestamp=true -DbrowserClient=false --additional-properties supportDart2=false $@"
|
||||||
java $JAVA_OPTS -jar $executable $ags
|
java $JAVA_OPTS -jar $executable $ags
|
||||||
|
|
||||||
# There is a proposal to allow importing different libraries depending on the environment:
|
# There is a proposal to allow importing different libraries depending on the environment:
|
||||||
|
|||||||
50
bin/dart2-petstore.sh
Executable file
50
bin/dart2-petstore.sh
Executable file
@@ -0,0 +1,50 @@
|
|||||||
|
#!/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"
|
||||||
|
|
||||||
|
# Generate non-browserClient
|
||||||
|
ags="generate -t modules/openapi-generator/src/main/resources/dart -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g dart -o samples/client/petstore/dart2/openapi -DhideGenerationTimestamp=true -DbrowserClient=false $@"
|
||||||
|
|
||||||
|
# then options to generate the library for vm would be:
|
||||||
|
#ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g dart -o samples/client/petstore/dart2/openapi_vm -DbrowserClient=false -DpubName=openapi_vm $@"
|
||||||
|
java $JAVA_OPTS -jar $executable $ags
|
||||||
|
|
||||||
|
# Generate browserClient
|
||||||
|
ags="generate -t modules/openapi-generator/src/main/resources/dart -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g dart -o samples/client/petstore/dart2/openapi-browser-client -DhideGenerationTimestamp=true -DbrowserClient=true $@"
|
||||||
|
java $JAVA_OPTS -jar $executable $ags
|
||||||
|
|
||||||
|
# Generate non-browserClient and put it to the flutter sample app
|
||||||
|
ags="generate -t modules/openapi-generator/src/main/resources/dart -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g dart -o samples/client/petstore/dart2/flutter_petstore/openapi -DhideGenerationTimestamp=true -DbrowserClient=false $@"
|
||||||
|
java $JAVA_OPTS -jar $executable $ags
|
||||||
|
|
||||||
|
# There is a proposal to allow importing different libraries depending on the environment:
|
||||||
|
# https://github.com/munificent/dep-interface-libraries
|
||||||
|
# When this is implemented there will only be one library.
|
||||||
|
|
||||||
|
# The current petstore test will then work for both: the browser library and the vm library.
|
||||||
@@ -27,6 +27,6 @@ fi
|
|||||||
|
|
||||||
# if you've executed sbt assembly previously it will use that instead.
|
# 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"
|
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
|
||||||
ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g dynamic-html -o samples/dynamic-html $@"
|
ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g dynamic-html -o samples/documentation/dynamic-html $@"
|
||||||
|
|
||||||
java $JAVA_OPTS -jar $executable $ags
|
java $JAVA_OPTS -jar $executable $ags
|
||||||
|
|||||||
32
bin/elm-0.18-petstore.sh
Executable file
32
bin/elm-0.18-petstore.sh
Executable file
@@ -0,0 +1,32 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
SCRIPT="$0"
|
||||||
|
echo "# START SCRIPT: $SCRIPT"
|
||||||
|
|
||||||
|
while [ -h "$SCRIPT" ] ; do
|
||||||
|
ls=`ls -ld "$SCRIPT"`
|
||||||
|
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||||
|
if expr "$link" : '/.*' > /dev/null; then
|
||||||
|
SCRIPT="$link"
|
||||||
|
else
|
||||||
|
SCRIPT=`dirname "$SCRIPT"`/"$link"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ ! -d "${APP_DIR}" ]; then
|
||||||
|
APP_DIR=`dirname "$SCRIPT"`/..
|
||||||
|
APP_DIR=`cd "${APP_DIR}"; pwd`
|
||||||
|
fi
|
||||||
|
|
||||||
|
executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar"
|
||||||
|
|
||||||
|
if [ ! -f "$executable" ]
|
||||||
|
then
|
||||||
|
mvn -B clean package
|
||||||
|
fi
|
||||||
|
|
||||||
|
# if you've executed sbt assembly previously it will use that instead.
|
||||||
|
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
|
||||||
|
ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g elm -t modules/openapi-generator/src/main/resources/elm -o samples/client/petstore/elm-0.18 --additional-properties elmVersion=0.18 $@"
|
||||||
|
|
||||||
|
java $JAVA_OPTS -jar $executable $ags
|
||||||
5
bin/elm-petstore-all.sh
Executable file
5
bin/elm-petstore-all.sh
Executable file
@@ -0,0 +1,5 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
./bin/elm-0.18-petstore.sh
|
||||||
|
./bin/elm-petstore.sh
|
||||||
|
|
||||||
34
bin/go-gin-petstore-server.sh
Executable file
34
bin/go-gin-petstore-server.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} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
|
||||||
|
|
||||||
|
ags="generate -t modules/openapi-generator/src/main/resources/go-gin-server -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g go-gin-server -o samples/server/petstore/go-gin-api-server -DpackageName=petstoreserver --additional-properties hideGenerationTimestamp=true -Dservice $@"
|
||||||
|
|
||||||
|
java $JAVA_OPTS -jar $executable $ags
|
||||||
|
#!/usr/bin/env bash
|
||||||
@@ -27,6 +27,6 @@ fi
|
|||||||
|
|
||||||
# if you've executed sbt assembly previously it will use that instead.
|
# 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"
|
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
|
||||||
ags="generate -i modules/openapi-generator/src/test/resources/2_0/markdown.yaml -g html -o samples/html.md $@"
|
ags="generate -i modules/openapi-generator/src/test/resources/2_0/markdown.yaml -g html -o samples/documentation/html.md $@"
|
||||||
|
|
||||||
java $JAVA_OPTS -jar $executable $ags
|
java $JAVA_OPTS -jar $executable $ags
|
||||||
|
|||||||
@@ -27,6 +27,6 @@ fi
|
|||||||
|
|
||||||
# if you've executed sbt assembly previously it will use that instead.
|
# 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"
|
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
|
||||||
ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g html -o samples/html $@"
|
ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g html -o samples/documentation/html $@"
|
||||||
|
|
||||||
java $JAVA_OPTS -jar $executable $ags
|
java $JAVA_OPTS -jar $executable $ags
|
||||||
|
|||||||
@@ -27,6 +27,6 @@ fi
|
|||||||
|
|
||||||
# if you've executed sbt assembly previously it will use that instead.
|
# 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"
|
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
|
||||||
ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g html2 -o samples/html2 --additional-properties hideGenerationTimestamp=true $@"
|
ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g html2 -o samples/documentation/html2 --additional-properties hideGenerationTimestamp=true $@"
|
||||||
|
|
||||||
java $JAVA_OPTS -jar $executable $ags
|
java $JAVA_OPTS -jar $executable $ags
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
./bin/java-petstore-jersey1.sh
|
./bin/java-petstore-jersey1.sh
|
||||||
./bin/java-petstore-jersey2.sh
|
./bin/java-petstore-jersey2.sh
|
||||||
./bin/java-petstore-feign.sh
|
./bin/java-petstore-feign.sh
|
||||||
|
./bin/java-petstore-feign-10x.sh
|
||||||
./bin/java-petstore-okhttp-gson.sh
|
./bin/java-petstore-okhttp-gson.sh
|
||||||
./bin/java-petstore-okhttp-gson-parcelable.sh
|
./bin/java-petstore-okhttp-gson-parcelable.sh
|
||||||
./bin/java-petstore-retrofit.sh
|
./bin/java-petstore-retrofit.sh
|
||||||
@@ -13,6 +14,7 @@
|
|||||||
./bin/java8-petstore-jersey2.sh
|
./bin/java8-petstore-jersey2.sh
|
||||||
./bin/java-petstore-retrofit2-play24.sh
|
./bin/java-petstore-retrofit2-play24.sh
|
||||||
./bin/java-petstore-retrofit2-play25.sh
|
./bin/java-petstore-retrofit2-play25.sh
|
||||||
|
./bin/java-petstore-retrofit2-play26.sh
|
||||||
./bin/java-petstore-jersey2-java6.sh
|
./bin/java-petstore-jersey2-java6.sh
|
||||||
./bin/java-petstore-resttemplate.sh
|
./bin/java-petstore-resttemplate.sh
|
||||||
./bin/java-petstore-resttemplate-withxml.sh
|
./bin/java-petstore-resttemplate-withxml.sh
|
||||||
|
|||||||
5
bin/java-petstore-feign-10x.json
Normal file
5
bin/java-petstore-feign-10x.json
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"library": "feign",
|
||||||
|
"artifactId": "petstore-feign-10x",
|
||||||
|
"feignVersion": "10.x"
|
||||||
|
}
|
||||||
40
bin/java-petstore-feign-10x.sh
Executable file
40
bin/java-petstore-feign-10x.sh
Executable file
@@ -0,0 +1,40 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
SCRIPT="$0"
|
||||||
|
echo "# START SCRIPT: $SCRIPT"
|
||||||
|
|
||||||
|
while [ -h "$SCRIPT" ] ; do
|
||||||
|
ls=`ls -ld "$SCRIPT"`
|
||||||
|
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||||
|
if expr "$link" : '/.*' > /dev/null; then
|
||||||
|
SCRIPT="$link"
|
||||||
|
else
|
||||||
|
SCRIPT=`dirname "$SCRIPT"`/"$link"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ ! -d "${APP_DIR}" ]; then
|
||||||
|
APP_DIR=`dirname "$SCRIPT"`/..
|
||||||
|
APP_DIR=`cd "${APP_DIR}"; pwd`
|
||||||
|
fi
|
||||||
|
|
||||||
|
executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar"
|
||||||
|
|
||||||
|
if [ ! -f "$executable" ]
|
||||||
|
then
|
||||||
|
mvn -B clean package
|
||||||
|
fi
|
||||||
|
|
||||||
|
# if you've executed sbt assembly previously it will use that instead.
|
||||||
|
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
|
||||||
|
ags="generate -t modules/openapi-generator/src/main/resources/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-10x.json -o samples/client/petstore/java/feign10x -DhideGenerationTimestamp=true -DbooleanGetterPrefix=is $@"
|
||||||
|
|
||||||
|
echo "Removing files and folders under samples/client/petstore/java/feign10x/src/main"
|
||||||
|
rm -rf samples/client/petstore/java/feign10x/src/main
|
||||||
|
find samples/client/petstore/java/feign10x -maxdepth 1 -type f ! -name "README.md" -exec rm {} +
|
||||||
|
java $JAVA_OPTS -jar $executable $ags
|
||||||
|
|
||||||
|
# copy additional manually written unit-tests
|
||||||
|
mkdir samples/client/petstore/java/feign10x/src/test/java/org/openapitools/client
|
||||||
|
|
||||||
|
cp CI/samples.ci/client/petstore/java/test-manual/common/StringUtilTest.java samples/client/petstore/java/feign10x/src/test/java/org/openapitools/client/StringUtilTest.java
|
||||||
5
bin/java-petstore-feign-9x.json
Normal file
5
bin/java-petstore-feign-9x.json
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"library": "feign",
|
||||||
|
"artifactId": "petstore-feign",
|
||||||
|
"feignVersion": "9.x"
|
||||||
|
}
|
||||||
@@ -1,4 +1,5 @@
|
|||||||
{
|
{
|
||||||
"library": "feign",
|
"library": "feign",
|
||||||
"artifactId": "petstore-feign"
|
"artifactId": "petstore-feign",
|
||||||
|
"feignVersion": "10.x"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ fi
|
|||||||
|
|
||||||
# if you've executed sbt assembly previously it will use that instead.
|
# 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"
|
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -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.json -o samples/client/petstore/java/feign -DhideGenerationTimestamp=true -DbooleanGetterPrefix=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 -DhideGenerationTimestamp=true -DbooleanGetterPrefix=is $@"
|
||||||
|
|
||||||
echo "Removing files and folders under samples/client/petstore/java/feign/src/main"
|
echo "Removing files and folders under samples/client/petstore/java/feign/src/main"
|
||||||
rm -rf samples/client/petstore/java/feign/src/main
|
rm -rf samples/client/petstore/java/feign/src/main
|
||||||
@@ -37,4 +37,4 @@ java $JAVA_OPTS -jar $executable $ags
|
|||||||
# copy additional manually written unit-tests
|
# copy additional manually written unit-tests
|
||||||
mkdir samples/client/petstore/java/feign/src/test/java/org/openapitools/client
|
mkdir samples/client/petstore/java/feign/src/test/java/org/openapitools/client
|
||||||
|
|
||||||
cp CI/samples.ci/client/petstore/java/test-manual/common/StringUtilTest.java samples/client/petstore/java/feign/src/test/java/org/openapitools/client/StringUtilTest.java
|
cp CI/samples.ci/client/petstore/java/test-manual/common/StringUtilTest.java samples/client/petstore/java/feign/src/test/java/org/openapitools/client/StringUtilTest.java
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
./bin/java-petstore-retrofit2-play24.sh
|
./bin/java-petstore-retrofit2-play24.sh
|
||||||
./bin/java-petstore-retrofit2-play25.sh
|
./bin/java-petstore-retrofit2-play25.sh
|
||||||
|
./bin/java-petstore-retrofit2-play26.sh
|
||||||
./bin/java-petstore-retrofit2.sh
|
./bin/java-petstore-retrofit2.sh
|
||||||
./bin/java-petstore-retrofit2rx.sh
|
./bin/java-petstore-retrofit2rx.sh
|
||||||
./bin/java-petstore-retrofit2rx2.sh
|
./bin/java-petstore-retrofit2rx2.sh
|
||||||
|
|||||||
1
bin/java-petstore-retrofit2-play26.json
Normal file
1
bin/java-petstore-retrofit2-play26.json
Normal file
@@ -0,0 +1 @@
|
|||||||
|
{"useBeanValidation":"true","enableBuilderSupport":"true","library":"retrofit2","usePlayWS":"true","playVersion":"play26"}
|
||||||
35
bin/java-petstore-retrofit2-play26.sh
Executable file
35
bin/java-petstore-retrofit2-play26.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 -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 petstore-java-client-retrofit2-play26 -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin/java-petstore-retrofit2-play26.json -o samples/client/petstore/java/retrofit2-play26 -DhideGenerationTimestamp=true $@"
|
||||||
|
|
||||||
|
echo "Removing files and folders under samples/client/petstore/java/retrofit2-play26/src/main"
|
||||||
|
rm -rf samples/client/petstore/java/retrofit2-play26/src/main
|
||||||
|
find samples/client/petstore/java/retrofit2-play26 -maxdepth 1 -type f ! -name "README.md" -exec rm {} +
|
||||||
|
java $JAVA_OPTS -jar $executable $ags
|
||||||
35
bin/kotlin-springboot-petstore-server.sh
Executable file
35
bin/kotlin-springboot-petstore-server.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} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
|
||||||
|
ags="$@ generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -t modules/openapi-generator/src/main/resources/kotlin-spring -g kotlin-spring -o samples/server/petstore/kotlin-springboot --additional-properties=library=spring-boot,beanValidations=true,swaggerAnnotations=true,serviceImplementation=true"
|
||||||
|
|
||||||
|
echo "Cleaning previously generated files if any from samples/server/petstore/kotlin-springboot"
|
||||||
|
rm -rf samples/server/petstore/kotlin-springboot
|
||||||
|
|
||||||
|
echo "Generating Kotling Spring Boot server..."
|
||||||
|
java $JAVA_OPTS -jar $executable $ags
|
||||||
@@ -26,11 +26,11 @@ then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
|
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
|
||||||
ags="meta -n myClientCodegen -p com.my.company.codegen -o samples/meta-codegen/lib $@"
|
ags="meta -n myClientCodegen -t DOCUMENTATION -p com.my.company.codegen -o samples/meta-codegen/lib $@"
|
||||||
|
|
||||||
java $JAVA_OPTS -jar $executable $ags
|
java $JAVA_OPTS -jar $executable $ags
|
||||||
|
|
||||||
mvn verify -f samples/meta-codegen/lib/pom.xml
|
mvn 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 $@"
|
ags2="generate -g myClientCodegen -i modules/openapi-generator/src/test/resources/2_0/petstore.json -o samples/meta-codegen/usage $@"
|
||||||
|
|
||||||
|
|||||||
32
bin/mysql-schema-petstore.sh
Normal file
32
bin/mysql-schema-petstore.sh
Normal 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/mysql-schema -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g mysql-schema -o samples/schema/petstore/mysql $@"
|
||||||
|
|
||||||
|
java $JAVA_OPTS -jar $executable $ags
|
||||||
@@ -27,6 +27,6 @@ fi
|
|||||||
|
|
||||||
# if you've executed sbt assembly previously it will use that instead.
|
# 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"
|
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
|
||||||
ags="generate $@ -i modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml -g csharp -o samples/client/petstore/csharp/OpenAPIClient --additional-properties packageGuid={321C8C3F-0156-40C1-AE42-D59761FB9B6C}"
|
ags="generate $@ -i modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml -g csharp -o samples/openapi3/client/petstore/csharp/OpenAPIClient --additional-properties packageGuid={321C8C3F-0156-40C1-AE42-D59761FB9B6C}"
|
||||||
|
|
||||||
java $JAVA_OPTS -jar $executable $ags
|
java $JAVA_OPTS -jar $executable $ags
|
||||||
|
|||||||
32
bin/openapi3/jaxrs-jersey-petstore.sh
Executable file
32
bin/openapi3/jaxrs-jersey-petstore.sh
Executable file
@@ -0,0 +1,32 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
SCRIPT="$0"
|
||||||
|
echo "# START SCRIPT: $SCRIPT"
|
||||||
|
|
||||||
|
while [ -h "$SCRIPT" ] ; do
|
||||||
|
ls=`ls -ld "$SCRIPT"`
|
||||||
|
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||||
|
if expr "$link" : '/.*' > /dev/null; then
|
||||||
|
SCRIPT="$link"
|
||||||
|
else
|
||||||
|
SCRIPT=`dirname "$SCRIPT"`/"$link"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ ! -d "${APP_DIR}" ]; then
|
||||||
|
APP_DIR=`dirname "$SCRIPT"`/..
|
||||||
|
APP_DIR=`cd "${APP_DIR}"; pwd`
|
||||||
|
fi
|
||||||
|
|
||||||
|
executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar"
|
||||||
|
|
||||||
|
if [ ! -f "$executable" ]
|
||||||
|
then
|
||||||
|
mvn clean package
|
||||||
|
fi
|
||||||
|
|
||||||
|
# if you've executed sbt assembly previously it will use that instead.
|
||||||
|
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
|
||||||
|
ags="generate --artifact-id "openapiv3-jaxrs-jersey-petstore-server" -t modules/openapi-generator/src/main/resources/JavaJaxRS/ -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g jaxrs-jersey -o samples/server/petstore/jaxrs-jersey $@"
|
||||||
|
|
||||||
|
java $JAVA_OPTS -jar $executable $ags
|
||||||
35
bin/openapi3/kotlin-springboot-petstore-server.sh
Executable file
35
bin/openapi3/kotlin-springboot-petstore-server.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} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
|
||||||
|
ags="$@ generate -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -t modules/openapi-generator/src/main/resources/kotlin-spring -g kotlin-spring -o samples/server/openapi3/petstore/kotlin-springboot --additional-properties=library=spring-boot,beanValidations=true,swaggerAnnotations=true,serviceImplementation=true"
|
||||||
|
|
||||||
|
echo "Cleaning previously generated files if any from samples/server/openapi3/petstore/kotlin-springboot"
|
||||||
|
rm -rf samples/server/openapi3/petstore/kotlin-springboot
|
||||||
|
|
||||||
|
echo "Generating Kotling Spring Boot server..."
|
||||||
|
java $JAVA_OPTS -jar $executable $ags
|
||||||
33
bin/openapi3/run-all-petstore
Executable file
33
bin/openapi3/run-all-petstore
Executable file
@@ -0,0 +1,33 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# this bash script will loop through all the .sh files under bin
|
||||||
|
# execute the script and check the result (exit code) to see if
|
||||||
|
# there's any error
|
||||||
|
|
||||||
|
echo "IMPORTANT: this script should be run by the CI (e.g. Shippable) only. There's no need to run this script to update Petstore samples for all generators."
|
||||||
|
echo "Please press CTRL+C to stop or the script will continue in 10 seconds."
|
||||||
|
|
||||||
|
sleep 10
|
||||||
|
|
||||||
|
successes=0
|
||||||
|
failures=0
|
||||||
|
for SCRIPT in $(ls -l ./bin/openapi3/*.sh | grep -v all)
|
||||||
|
do
|
||||||
|
if [ -f ${SCRIPT} -a -x ${SCRIPT} ]; then
|
||||||
|
echo "Running $SCRIPT (output to /dev/null)"
|
||||||
|
${SCRIPT} 2>&1 > /dev/null
|
||||||
|
rc=$?
|
||||||
|
if [[ ${rc} != 0 ]]; then
|
||||||
|
>&2 echo "ERROR!! FAILED TO RUN ${SCRIPT}"
|
||||||
|
((failures+=1))
|
||||||
|
else
|
||||||
|
((successes+=1))
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
if (( failures > 0 )); then
|
||||||
|
>&2 echo "[ERROR] ${failures} out of $((failures+successes)) scripts failed."
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
echo "[SUCCESS] ${successes} generators finished."
|
||||||
|
fi
|
||||||
14
bin/openapi3/windows/csharp-petstore.bat
Executable file
14
bin/openapi3/windows/csharp-petstore.bat
Executable file
@@ -0,0 +1,14 @@
|
|||||||
|
set executable=.\modules\openapi-generator-cli\target\openapi-generator-cli.jar
|
||||||
|
|
||||||
|
If Not Exist %executable% (
|
||||||
|
mvn clean package
|
||||||
|
)
|
||||||
|
|
||||||
|
REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M
|
||||||
|
set ags=generate -i modules\openapi-generator\src\test/resources\2_0\petstore-with-fake-endpoints-models-for-testing.yaml -g csharp -o samples\openapi3\client\petstore\csharp\SwaggerClient --additional-properties packageGuid={321C8C3F-0156-40C1-AE42-D59761FB9B6C}
|
||||||
|
|
||||||
|
java %JAVA_OPTS% -jar %executable% %ags%
|
||||||
|
|
||||||
|
REM restore csproj file
|
||||||
|
echo "restore csproject file: CI\samples.ci\client\petstore\csharp\OpenAPIClient\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj"
|
||||||
|
copy /b/v/y CI\samples.ci\client\petstore\csharp\OpenAPIClient\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj samples\openapi3\client\petstore\csharp\OpenAPIClient\src\Org.OpenAPITools.Test\
|
||||||
15
bin/openapi3/windows/run-all-petstore.cmd
Normal file
15
bin/openapi3/windows/run-all-petstore.cmd
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
REM this batch file will loop through all the .bat files under bin\openapi3\windows\
|
||||||
|
REM execute the script and check the error level to see if there's any error
|
||||||
|
|
||||||
|
echo IMPORTANT: this script should be run by the CI (e.g. appveyor) only. There's no need to run this script to update Petstore samples for all generators.
|
||||||
|
echo Please press CTRL+C to stop or the script will continue in 10 seconds.
|
||||||
|
|
||||||
|
timeout 10
|
||||||
|
|
||||||
|
for /f "delims=" %%i in ('dir /b ".\bin\openapi3\windows\*.bat"') do (
|
||||||
|
|
||||||
|
CALL .\bin\openapi3\windows\%%i
|
||||||
|
|
||||||
|
IF ERRORLEVEL 1 IF NOT ERRORLEVEL 2 exit /b 1
|
||||||
|
|
||||||
|
)
|
||||||
@@ -13,8 +13,8 @@ failures=0
|
|||||||
for SCRIPT in $(ls -l ./bin/*.sh | grep -v all)
|
for SCRIPT in $(ls -l ./bin/*.sh | grep -v all)
|
||||||
do
|
do
|
||||||
if [ -f ${SCRIPT} -a -x ${SCRIPT} ]; then
|
if [ -f ${SCRIPT} -a -x ${SCRIPT} ]; then
|
||||||
echo "Running $SCRIPT"
|
echo "Running $SCRIPT (output to /dev/null)"
|
||||||
${SCRIPT}
|
${SCRIPT} 2>&1 > /dev/null
|
||||||
rc=$?
|
rc=$?
|
||||||
if [[ ${rc} != 0 ]]; then
|
if [[ ${rc} != 0 ]]; then
|
||||||
>&2 echo "ERROR!! FAILED TO RUN ${SCRIPT}"
|
>&2 echo "ERROR!! FAILED TO RUN ${SCRIPT}"
|
||||||
@@ -30,4 +30,4 @@ if (( failures > 0 )); then
|
|||||||
exit 1
|
exit 1
|
||||||
else
|
else
|
||||||
echo "[SUCCESS] ${successes} generators finished."
|
echo "[SUCCESS] ${successes} generators finished."
|
||||||
fi
|
fi
|
||||||
|
|||||||
32
bin/security/mysql-schema-petstore.sh
Normal file
32
bin/security/mysql-schema-petstore.sh
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
SCRIPT="$0"
|
||||||
|
echo "# START SCRIPT: $SCRIPT"
|
||||||
|
|
||||||
|
while [ -h "$SCRIPT" ] ; do
|
||||||
|
ls=`ls -ld "$SCRIPT"`
|
||||||
|
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||||
|
if expr "$link" : '/.*' > /dev/null; then
|
||||||
|
SCRIPT="$link"
|
||||||
|
else
|
||||||
|
SCRIPT=`dirname "$SCRIPT"`/"$link"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ ! -d "${APP_DIR}" ]; then
|
||||||
|
APP_DIR=`dirname "$SCRIPT"`/..
|
||||||
|
APP_DIR=`cd "${APP_DIR}"; pwd`
|
||||||
|
fi
|
||||||
|
|
||||||
|
executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar"
|
||||||
|
|
||||||
|
if [ ! -f "$executable" ]
|
||||||
|
then
|
||||||
|
mvn clean package
|
||||||
|
fi
|
||||||
|
|
||||||
|
# if you've executed sbt assembly previously it will use that instead.
|
||||||
|
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
|
||||||
|
ags="generate -t modules/openapi-generator/src/main/resources/mysql-schema -i modules/openapi-generator/src/test/resources/2_0/petstore-security-test.yaml -g mysql-schema -o samples/schema/petstore-security-test/mysql $@"
|
||||||
|
|
||||||
|
java $JAVA_OPTS -jar $executable $ags
|
||||||
@@ -33,6 +33,6 @@ fi
|
|||||||
|
|
||||||
# if you've executed sbt assembly previously it will use that instead.
|
# 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"
|
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
|
||||||
ags="generate -t modules/openapi-generator/src/main/resources/php -i modules/openapi-generator/src/test/resources/2_0/petstore-security-test.yaml -g php -o samples/client/petstore-security-test/php $@"
|
ags="generate -t modules/openapi-generator/src/main/resources/php -i modules/openapi-generator/src/test/resources/2_0/petstore-security-test.yaml -g php -o samples/client/petstore-security-test/php/OpenAPIClient-php $@"
|
||||||
|
|
||||||
java $JAVA_OPTS -jar $executable $ags
|
java $JAVA_OPTS -jar $executable $ags
|
||||||
|
|||||||
@@ -27,6 +27,6 @@ fi
|
|||||||
|
|
||||||
# if you've executed sbt assembly previously it will use that instead.
|
# 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"
|
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
|
||||||
ags="generate -t modules/openapi-generator/src/main/resources/php-silex -i modules/openapi-generator/src/test/resources/2_0/petstore-security-test.yaml -g php-silex -o samples/server/petstore-security-test/silex $@"
|
ags="generate -t modules/openapi-generator/src/main/resources/php-silex -i modules/openapi-generator/src/test/resources/2_0/petstore-security-test.yaml -g php-silex -o samples/server/petstore-security-test/silex/SwaggerServer $@"
|
||||||
|
|
||||||
java $JAVA_OPTS -jar $executable $ags
|
java $JAVA_OPTS -jar $executable $ags
|
||||||
|
|||||||
@@ -17,3 +17,4 @@
|
|||||||
./bin/springboot-petstore-server-beanvalidation.sh
|
./bin/springboot-petstore-server-beanvalidation.sh
|
||||||
./bin/springboot-petstore-server-implicitHeaders.sh
|
./bin/springboot-petstore-server-implicitHeaders.sh
|
||||||
./bin/springboot-petstore-server-useOptional.sh
|
./bin/springboot-petstore-server-useOptional.sh
|
||||||
|
./bin/springboot-virtualan-petstore-server.sh
|
||||||
@@ -26,7 +26,7 @@ fi
|
|||||||
|
|
||||||
# if you've executed sbt assembly previously it will use that instead.
|
# 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"
|
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
|
||||||
ags="generate --artifact-id springboot-reactive -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-reactive -Dreactive=true,hideGenerationTimestamp=true $@"
|
ags="generate --artifact-id springboot-reactive -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-reactive -Dreactive=true,delegatePattern=true,hideGenerationTimestamp=true $@"
|
||||||
|
|
||||||
echo "Removing files and folders under samples/server/petstore/springboot-reactive/src/main"
|
echo "Removing files and folders under samples/server/petstore/springboot-reactive/src/main"
|
||||||
rm -rf samples/server/petstore/springboot-reactive/src/main
|
rm -rf samples/server/petstore/springboot-reactive/src/main
|
||||||
|
|||||||
7
bin/springboot-virtualan-petstore-server.json
Normal file
7
bin/springboot-virtualan-petstore-server.json
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"artifactId": "springboot-virtualan",
|
||||||
|
"library": "spring-boot",
|
||||||
|
"virtualService": true,
|
||||||
|
"modelPackage" : "org.openapitools.virtualan.model",
|
||||||
|
"apiPackage" : "org.openapitools.virtualan.api"
|
||||||
|
}
|
||||||
35
bin/springboot-virtualan-petstore-server.sh
Normal file
35
bin/springboot-virtualan-petstore-server.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 -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 springboot-virtualan -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-virtualan -c bin/springboot-virtualan-petstore-server.json -DhideGenerationTimestamp=true $@"
|
||||||
|
|
||||||
|
echo "Removing files and folders under samples/server/petstore/springboot-virtualan/src/main"
|
||||||
|
rm -rf samples/server/petstore/springboot-virtualan/src/main
|
||||||
|
find samples/server/petstore/springboot-virtualan -maxdepth 1 -type f ! -name "README.md" -exec rm {} +
|
||||||
|
java $JAVA_OPTS -jar $executable $ags
|
||||||
33
bin/tests/run-all-test
Executable file
33
bin/tests/run-all-test
Executable file
@@ -0,0 +1,33 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# this bash script will loop through all the .sh files under bin/tests
|
||||||
|
# execute the script and check the result (exit code) to see if
|
||||||
|
# there's any error
|
||||||
|
|
||||||
|
echo "IMPORTANT: this script should be run by the CI (e.g. Shippable) only. There's no need to run this script manually."
|
||||||
|
echo "Please press CTRL+C to stop or the script will continue in 10 seconds."
|
||||||
|
|
||||||
|
sleep 10
|
||||||
|
|
||||||
|
successes=0
|
||||||
|
failures=0
|
||||||
|
for SCRIPT in $(ls -l ./bin/tests/*.sh | grep -v all)
|
||||||
|
do
|
||||||
|
if [ -f ${SCRIPT} -a -x ${SCRIPT} ]; then
|
||||||
|
echo "Running $SCRIPT (output to /dev/null)"
|
||||||
|
${SCRIPT} 2>&1 > /dev/null
|
||||||
|
rc=$?
|
||||||
|
if [[ ${rc} != 0 ]]; then
|
||||||
|
>&2 echo "ERROR!! FAILED TO RUN ${SCRIPT}"
|
||||||
|
((failures+=1))
|
||||||
|
else
|
||||||
|
((successes+=1))
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
if (( failures > 0 )); then
|
||||||
|
>&2 echo "[ERROR] ${failures} out of $((failures+successes)) scripts failed."
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
echo "[SUCCESS] ${successes} generators finished."
|
||||||
|
fi
|
||||||
38
bin/tests/test-debug-supporting-files.sh
Executable file
38
bin/tests/test-debug-supporting-files.sh
Executable file
@@ -0,0 +1,38 @@
|
|||||||
|
#!/bin/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
|
||||||
|
|
||||||
|
if [ ! -d "${APP_DIR}" ]; then
|
||||||
|
APP_DIR=`dirname "$SCRIPT"`/..
|
||||||
|
APP_DIR=`cd "${APP_DIR}"; pwd`
|
||||||
|
fi
|
||||||
|
|
||||||
|
executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar"
|
||||||
|
|
||||||
|
if [ ! -f "$executable" ]
|
||||||
|
then
|
||||||
|
mvn -B clean package $@
|
||||||
|
fi
|
||||||
|
|
||||||
|
# if you've executed sbt assembly previously it will use that instead.
|
||||||
|
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
|
||||||
|
ags="generate -t modules/openapi-generator/src/main/resources/python -i modules/openapi-generator/src/test/resources/3_0/issue_241.yaml -g python -o /tmp/test-debug-supporting-files/ -DpackageName=petstore_api -DdebugSupportingFiles=true $@"
|
||||||
|
|
||||||
|
if [[ $(java $JAVA_OPTS -jar $executable $ags 2>&1 | grep "StackOverflowError") ]]; then
|
||||||
|
echo "There are StackOverflowError. Please check the result."
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
echo "No StackOverflowError found."
|
||||||
|
fi
|
||||||
|
|
||||||
6
bin/typescript-axios-petstore-all.sh
Normal file
6
bin/typescript-axios-petstore-all.sh
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
./bin/typescript-axios-petstore-target-es6.sh
|
||||||
|
./bin/typescript-axios-petstore-with-npm-version.sh
|
||||||
|
./bin/typescript-axios-petstore-interfaces.sh
|
||||||
|
./bin/typescript-axios-petstore.sh
|
||||||
32
bin/typescript-axios-petstore-interfaces.sh
Normal file
32
bin/typescript-axios-petstore-interfaces.sh
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
SCRIPT="$0"
|
||||||
|
echo "# START SCRIPT: $SCRIPT"
|
||||||
|
|
||||||
|
while [ -h "$SCRIPT" ] ; do
|
||||||
|
ls=`ls -ld "$SCRIPT"`
|
||||||
|
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||||
|
if expr "$link" : '/.*' > /dev/null; then
|
||||||
|
SCRIPT="$link"
|
||||||
|
else
|
||||||
|
SCRIPT=`dirname "$SCRIPT"`/"$link"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ ! -d "${APP_DIR}" ]; then
|
||||||
|
APP_DIR=`dirname "$SCRIPT"`/..
|
||||||
|
APP_DIR=`cd "${APP_DIR}"; pwd`
|
||||||
|
fi
|
||||||
|
|
||||||
|
executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar"
|
||||||
|
|
||||||
|
if [ ! -f "$executable" ]
|
||||||
|
then
|
||||||
|
mvn -B clean package
|
||||||
|
fi
|
||||||
|
|
||||||
|
# if you've executed sbt assembly previously it will use that instead.
|
||||||
|
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
|
||||||
|
ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g typescript-axios -o samples/client/petstore/typescript-axios/builds/with-interfaces -D withInterfaces=true $@"
|
||||||
|
|
||||||
|
java $JAVA_OPTS -jar $executable $ags
|
||||||
7
bin/typescript-axios-petstore-target-es6.json
Normal file
7
bin/typescript-axios-petstore-target-es6.json
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"npmName": "@swagger/typescript-axios-petstore",
|
||||||
|
"npmVersion": "1.0.0",
|
||||||
|
"npmRepository": "https://skimdb.npmjs.com/registry",
|
||||||
|
"snapshot": false,
|
||||||
|
"supportsES6": true
|
||||||
|
}
|
||||||
32
bin/typescript-axios-petstore-target-es6.sh
Normal file
32
bin/typescript-axios-petstore-target-es6.sh
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
SCRIPT="$0"
|
||||||
|
echo "# START SCRIPT: $SCRIPT"
|
||||||
|
|
||||||
|
while [ -h "$SCRIPT" ] ; do
|
||||||
|
ls=`ls -ld "$SCRIPT"`
|
||||||
|
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||||
|
if expr "$link" : '/.*' > /dev/null; then
|
||||||
|
SCRIPT="$link"
|
||||||
|
else
|
||||||
|
SCRIPT=`dirname "$SCRIPT"`/"$link"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ ! -d "${APP_DIR}" ]; then
|
||||||
|
APP_DIR=`dirname "$SCRIPT"`/..
|
||||||
|
APP_DIR=`cd "${APP_DIR}"; pwd`
|
||||||
|
fi
|
||||||
|
|
||||||
|
executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar"
|
||||||
|
|
||||||
|
if [ ! -f "$executable" ]
|
||||||
|
then
|
||||||
|
mvn -B clean package
|
||||||
|
fi
|
||||||
|
|
||||||
|
# if you've executed sbt assembly previously it will use that instead.
|
||||||
|
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
|
||||||
|
ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g typescript-axios -c bin/typescript-axios-petstore-target-es6.json -o samples/client/petstore/typescript-axios/builds/es6-target $@"
|
||||||
|
|
||||||
|
java $JAVA_OPTS -jar $executable $ags
|
||||||
6
bin/typescript-axios-petstore-with-npm-version.json
Normal file
6
bin/typescript-axios-petstore-with-npm-version.json
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"npmName": "@swagger/typescript-axios-petstore",
|
||||||
|
"npmVersion": "1.0.0",
|
||||||
|
"npmRepository": "https://skimdb.npmjs.com/registry",
|
||||||
|
"snapshot": false
|
||||||
|
}
|
||||||
32
bin/typescript-axios-petstore-with-npm-version.sh
Normal file
32
bin/typescript-axios-petstore-with-npm-version.sh
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
SCRIPT="$0"
|
||||||
|
echo "# START SCRIPT: $SCRIPT"
|
||||||
|
|
||||||
|
while [ -h "$SCRIPT" ] ; do
|
||||||
|
ls=`ls -ld "$SCRIPT"`
|
||||||
|
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||||
|
if expr "$link" : '/.*' > /dev/null; then
|
||||||
|
SCRIPT="$link"
|
||||||
|
else
|
||||||
|
SCRIPT=`dirname "$SCRIPT"`/"$link"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ ! -d "${APP_DIR}" ]; then
|
||||||
|
APP_DIR=`dirname "$SCRIPT"`/..
|
||||||
|
APP_DIR=`cd "${APP_DIR}"; pwd`
|
||||||
|
fi
|
||||||
|
|
||||||
|
executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar"
|
||||||
|
|
||||||
|
if [ ! -f "$executable" ]
|
||||||
|
then
|
||||||
|
mvn -B clean package
|
||||||
|
fi
|
||||||
|
|
||||||
|
# if you've executed sbt assembly previously it will use that instead.
|
||||||
|
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
|
||||||
|
ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g typescript-axios -c bin/typescript-axios-petstore-with-npm-version.json -o samples/client/petstore/typescript-axios/builds/with-npm-version $@"
|
||||||
|
|
||||||
|
java $JAVA_OPTS -jar $executable $ags
|
||||||
32
bin/typescript-axios-petstore.sh
Normal file
32
bin/typescript-axios-petstore.sh
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
SCRIPT="$0"
|
||||||
|
echo "# START SCRIPT: $SCRIPT"
|
||||||
|
|
||||||
|
while [ -h "$SCRIPT" ] ; do
|
||||||
|
ls=`ls -ld "$SCRIPT"`
|
||||||
|
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||||
|
if expr "$link" : '/.*' > /dev/null; then
|
||||||
|
SCRIPT="$link"
|
||||||
|
else
|
||||||
|
SCRIPT=`dirname "$SCRIPT"`/"$link"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ ! -d "${APP_DIR}" ]; then
|
||||||
|
APP_DIR=`dirname "$SCRIPT"`/..
|
||||||
|
APP_DIR=`cd "${APP_DIR}"; pwd`
|
||||||
|
fi
|
||||||
|
|
||||||
|
executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar"
|
||||||
|
|
||||||
|
if [ ! -f "$executable" ]
|
||||||
|
then
|
||||||
|
mvn -B clean package
|
||||||
|
fi
|
||||||
|
|
||||||
|
# if you've executed sbt assembly previously it will use that instead.
|
||||||
|
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
|
||||||
|
ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g typescript-axios -o samples/client/petstore/typescript-axios/builds/default $@"
|
||||||
|
|
||||||
|
java $JAVA_OPTS -jar $executable $ags
|
||||||
@@ -10,7 +10,7 @@ echo "Please press CTRL+C to stop or the script will continue in 5 seconds."
|
|||||||
sleep 5
|
sleep 5
|
||||||
|
|
||||||
# LIST OF SCRIPTS:
|
# LIST OF SCRIPTS:
|
||||||
./bin/ruby-petstore.sh > /dev/null 2>&1
|
./bin/ruby-client-petstore.sh > /dev/null 2>&1
|
||||||
./bin/java-petstore-all.sh > /dev/null 2>&1
|
./bin/java-petstore-all.sh > /dev/null 2>&1
|
||||||
./bin/java-jaxrs-petstore-server-all.sh > /dev/null 2>&1
|
./bin/java-jaxrs-petstore-server-all.sh > /dev/null 2>&1
|
||||||
./bin/spring-all-pestore.sh > /dev/null 2>&1
|
./bin/spring-all-pestore.sh > /dev/null 2>&1
|
||||||
@@ -18,6 +18,7 @@ sleep 5
|
|||||||
./bin/kotlin-client-string.sh > /dev/null 2>&1
|
./bin/kotlin-client-string.sh > /dev/null 2>&1
|
||||||
./bin/kotlin-client-threetenbp.sh > /dev/null 2>&1
|
./bin/kotlin-client-threetenbp.sh > /dev/null 2>&1
|
||||||
./bin/kotlin-server-petstore.sh > /dev/null 2>&1
|
./bin/kotlin-server-petstore.sh > /dev/null 2>&1
|
||||||
|
./bin/mysql-schema-petstore.sh > /dev/null 2>&1
|
||||||
./bin/php-petstore.sh > /dev/null 2>&1
|
./bin/php-petstore.sh > /dev/null 2>&1
|
||||||
./bin/php-silex-petstore-server.sh > /dev/null 2>&1
|
./bin/php-silex-petstore-server.sh > /dev/null 2>&1
|
||||||
./bin/php-symfony-petstore.sh > /dev/null 2>&1
|
./bin/php-symfony-petstore.sh > /dev/null 2>&1
|
||||||
@@ -30,7 +31,12 @@ sleep 5
|
|||||||
./bin/typescript-node-petstore-all.sh > /dev/null 2>&1
|
./bin/typescript-node-petstore-all.sh > /dev/null 2>&1
|
||||||
./bin/typescript-inversify-petstore.sh > /dev/null 2>&1
|
./bin/typescript-inversify-petstore.sh > /dev/null 2>&1
|
||||||
./bin/rust-server-petstore.sh > /dev/null 2>&1
|
./bin/rust-server-petstore.sh > /dev/null 2>&1
|
||||||
./bin/openapi3/haskell-http-client-petstore.sh > /dev/null 2>&1
|
./bin/haskell-http-client-petstore.sh > /dev/null 2>&1
|
||||||
|
./bin/csharp-petstore.sh > /dev/null 2>&1
|
||||||
|
./bin/meta-codegen.sh > /dev/null 2>&1
|
||||||
|
./bin/utils/export_docs_generators.sh > /dev/null 2>&1
|
||||||
|
./bin/go-petstore.sh > /dev/null 2>&1
|
||||||
|
./bin/go-gin-petstore-server.sh > /dev/null 2>&1
|
||||||
|
|
||||||
# Check:
|
# Check:
|
||||||
if [ -n "$(git status --porcelain)" ]; then
|
if [ -n "$(git status --porcelain)" ]; then
|
||||||
|
|||||||
11
bin/utils/export_docs_generators.sh
Executable file
11
bin/utils/export_docs_generators.sh
Executable file
@@ -0,0 +1,11 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
SCRIPT="$0"
|
||||||
|
echo "# START SCRIPT: $SCRIPT"
|
||||||
|
|
||||||
|
executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar"
|
||||||
|
|
||||||
|
for GENERATOR in $(java -jar $executable list --short | sed -e 's/,/\'$'\n''/g')
|
||||||
|
do
|
||||||
|
./bin/utils/export_generator.sh $GENERATOR
|
||||||
|
done
|
||||||
17
bin/utils/export_generator.sh
Executable file
17
bin/utils/export_generator.sh
Executable file
@@ -0,0 +1,17 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
SCRIPT="$0"
|
||||||
|
echo "# START SCRIPT: $SCRIPT"
|
||||||
|
|
||||||
|
if [[ "$1" != "" ]]; then
|
||||||
|
NAME="$1"
|
||||||
|
else
|
||||||
|
echo "Missing argument. Usage e.g.: ./bin/utils/export-generator.sh jaxrs-jersey"
|
||||||
|
exit 1;
|
||||||
|
fi
|
||||||
|
|
||||||
|
executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar"
|
||||||
|
|
||||||
|
java -jar $executable config-help -g $NAME | sed -e 's/CONFIG OPTIONS/CONFIG OPTIONS for \'$NAME'\'$'\n''/g' > docs/generators/$NAME.md
|
||||||
|
|
||||||
|
echo "Back to the [generators list](README.md)" >> docs/generators/$NAME.md
|
||||||
8
bin/utils/export_generators_readme.sh
Executable file
8
bin/utils/export_generators_readme.sh
Executable file
@@ -0,0 +1,8 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
SCRIPT="$0"
|
||||||
|
echo "# START SCRIPT: $SCRIPT"
|
||||||
|
|
||||||
|
executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar"
|
||||||
|
|
||||||
|
java -jar $executable list | sed -e 's/\([A-Z]*\) generators:/* \1 generators:/g' -e 's/- \([a-z0-9\-]*\)/- [\1]\(\1.md\)/g' > docs/generators/README.md
|
||||||
@@ -31,8 +31,6 @@ else
|
|||||||
exit 1;
|
exit 1;
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
echo "IMPORTANT: this script works on Mac only"
|
|
||||||
echo "Release preparation: replacing $FROM with $TO in different files"
|
echo "Release preparation: replacing $FROM with $TO in different files"
|
||||||
|
|
||||||
declare -a files=("CI/pom.xml.bash"
|
declare -a files=("CI/pom.xml.bash"
|
||||||
@@ -45,13 +43,18 @@ declare -a files=("CI/pom.xml.bash"
|
|||||||
"modules/openapi-generator-maven-plugin/pom.xml"
|
"modules/openapi-generator-maven-plugin/pom.xml"
|
||||||
"modules/openapi-generator-online/pom.xml"
|
"modules/openapi-generator-online/pom.xml"
|
||||||
"modules/openapi-generator/pom.xml"
|
"modules/openapi-generator/pom.xml"
|
||||||
"modules/openapi-generator-online/Dockerfile"
|
"samples/meta-codegen/lib/pom.xml"
|
||||||
"pom.xml")
|
"pom.xml")
|
||||||
|
|
||||||
|
sedi () {
|
||||||
|
# Cross-platform version of sed -i that works both on Mac and Linux
|
||||||
|
sed --version >/dev/null 2>&1 && sed -i -e "$@" || sed -i "" "$@"
|
||||||
|
}
|
||||||
|
|
||||||
for filename in "${files[@]}"; do
|
for filename in "${files[@]}"; do
|
||||||
# e.g. sed -i '' "s/3.0.1-SNAPSHOT/3.0.1/g" CI/pom.xml.bash
|
# e.g. sed -i '' "s/3.0.1-SNAPSHOT/3.0.1/g" CI/pom.xml.bash
|
||||||
#echo "Running command: sed -i '' "s/$FROM/$TO/g" $filename"
|
#echo "Running command: sed -i '' "s/$FROM/$TO/g" $filename"
|
||||||
if sed -i '' "s/$FROM/$TO/g" $filename; then
|
if sedi "s/$FROM/$TO/g" $filename; then
|
||||||
echo "Updated $filename successfully!"
|
echo "Updated $filename successfully!"
|
||||||
else
|
else
|
||||||
echo "ERROR: Failed to update $filename with the following command"
|
echo "ERROR: Failed to update $filename with the following command"
|
||||||
|
|||||||
@@ -31,8 +31,6 @@ else
|
|||||||
exit 1;
|
exit 1;
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
echo "IMPORTANT: this script works on Mac only"
|
|
||||||
echo "Release preparation: replacing $FROM with $TO in different files"
|
echo "Release preparation: replacing $FROM with $TO in different files"
|
||||||
|
|
||||||
declare -a files=("modules/openapi-generator-maven-plugin/README.md"
|
declare -a files=("modules/openapi-generator-maven-plugin/README.md"
|
||||||
@@ -45,10 +43,15 @@ declare -a files=("modules/openapi-generator-maven-plugin/README.md"
|
|||||||
"modules/openapi-generator-gradle-plugin/samples/local-spec/README.md"
|
"modules/openapi-generator-gradle-plugin/samples/local-spec/README.md"
|
||||||
"README.md")
|
"README.md")
|
||||||
|
|
||||||
|
sedi () {
|
||||||
|
# Cross-platform version of sed -i that works both on Mac and Linux
|
||||||
|
sed --version >/dev/null 2>&1 && sed -i -e "$@" || sed -i "" "$@"
|
||||||
|
}
|
||||||
|
|
||||||
for filename in "${files[@]}"; do
|
for filename in "${files[@]}"; do
|
||||||
# e.g. sed -i '' "s/3.0.1-SNAPSHOT/3.0.1/g" CI/pom.xml.bash
|
# e.g. sed -i '' "s/3.0.1-SNAPSHOT/3.0.1/g" CI/pom.xml.bash
|
||||||
#echo "Running command: sed -i '' "s/$FROM/$TO/g" $filename"
|
#echo "Running command: sed -i '' "s/$FROM/$TO/g" $filename"
|
||||||
if sed -i '' "s/$FROM/$TO/g" $filename; then
|
if sedi "s/$FROM/$TO/g" $filename; then
|
||||||
echo "Updated $filename successfully!"
|
echo "Updated $filename successfully!"
|
||||||
else
|
else
|
||||||
echo "ERROR: Failed to update $filename with the following command"
|
echo "ERROR: Failed to update $filename with the following command"
|
||||||
|
|||||||
@@ -5,6 +5,6 @@ If Not Exist %executable% (
|
|||||||
)
|
)
|
||||||
|
|
||||||
REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M
|
REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M
|
||||||
set ags=generate -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g csharp -o samples/client/petstore/csharp/SwaggerClientNet40 --additional-properties packageGuid={321C8C3F-0156-40C1-AE42-D59761FB9B6C} -c ./bin/csharp-petstore-net-40.json
|
set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore-with-fake-endpoints-models-for-testing.yaml -g csharp -o samples\client\petstore\csharp\SwaggerClientNet40 --additional-properties packageGuid={321C8C3F-0156-40C1-AE42-D59761FB9B6C} -c .\bin\csharp-petstore-net-40.json
|
||||||
|
|
||||||
java %JAVA_OPTS% -jar %executable% %ags%
|
java %JAVA_OPTS% -jar %executable% %ags%
|
||||||
|
|||||||
@@ -5,6 +5,6 @@ If Not Exist %executable% (
|
|||||||
)
|
)
|
||||||
|
|
||||||
REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M
|
REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M
|
||||||
set ags=generate -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g csharp -o samples\client\petstore\csharp\SwaggerClientNetStandard --additional-properties targetFramework=v5.0,packageGuid={3AB1F259-1769-484B-9411-84505FCCBD55}
|
set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore-with-fake-endpoints-models-for-testing.yaml -g csharp -o samples\client\petstore\csharp\SwaggerClientNetStandard --additional-properties targetFramework=v5.0,packageGuid={3AB1F259-1769-484B-9411-84505FCCBD55}
|
||||||
|
|
||||||
java %JAVA_OPTS% -jar %executable% %ags%
|
java %JAVA_OPTS% -jar %executable% %ags%
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ set ags=generate -i modules\openapi-generator\src\test/resources\2_0\petstore-wi
|
|||||||
|
|
||||||
java %JAVA_OPTS% -jar %executable% %ags%
|
java %JAVA_OPTS% -jar %executable% %ags%
|
||||||
|
|
||||||
# restore csproj file
|
REM restore csproj file
|
||||||
echo "restore csproject file: CI\samples\client\petstore\csharp\OpenAPIClient\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj"
|
echo "restore csproject file: CI\samples.ci\client\petstore\csharp\OpenAPIClient\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj"
|
||||||
copy .\CI\samples\client\petstore\csharp\OpenAPIClient\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj .\samples\client\petstore\csharp\OpenAPIClient\src\Org.OpenAPITools.Test\
|
copy /b/v/y CI\samples.ci\client\petstore\csharp\OpenAPIClient\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj samples\client\petstore\csharp\OpenAPIClient\src\Org.OpenAPITools.Test\
|
||||||
|
|
||||||
|
|||||||
12
bin/windows/dart-client-petstore.bat
Executable file
12
bin/windows/dart-client-petstore.bat
Executable file
@@ -0,0 +1,12 @@
|
|||||||
|
set executable=.\modules\swagger-codegen-cli\target\swagger-codegen-cli.jar
|
||||||
|
|
||||||
|
If Not Exist %executable% (
|
||||||
|
mvn clean package
|
||||||
|
)
|
||||||
|
|
||||||
|
REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -DloggerPath=conf/log4j.properties
|
||||||
|
set ags=generate -i modules\swagger-codegen\src\test\resources\2_0\petstore.yaml -l dart-jaguar -o samples\client\petstore\dart-jaguar\swagger -DhideGenerationTimestamp=true -DbrowserClient=false
|
||||||
|
java %JAVA_OPTS% -jar %executable% %ags%
|
||||||
|
|
||||||
|
set ags=generate -i modules\swagger-codegen\src\test\resources\2_0\petstore.yaml -l dart-jaguar -o samples\client\petstore\dart-jaguar\flutter_petstore\swagger -DhideGenerationTimestamp=true
|
||||||
|
java %JAVA_OPTS% -jar %executable% %ags%
|
||||||
10
bin/windows/go-gin-petstore-server.bat
Normal file
10
bin/windows/go-gin-petstore-server.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 -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g go-gin-server -o samples\server\petstore\go-gin-api-server -DpackageName=petstoreserver -Dservice
|
||||||
|
|
||||||
|
java %JAVA_OPTS% -jar %executable% %ags%
|
||||||
@@ -5,6 +5,6 @@ If Not Exist %executable% (
|
|||||||
)
|
)
|
||||||
|
|
||||||
REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -DloggerPath=conf/log4j.properties
|
REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -DloggerPath=conf/log4j.properties
|
||||||
set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g html -o samples\client\petstore\html
|
set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g html -o samples\documentation\html
|
||||||
|
|
||||||
java %JAVA_OPTS% -jar %executable% %ags%
|
java %JAVA_OPTS% -jar %executable% %ags%
|
||||||
|
|||||||
@@ -5,6 +5,6 @@ If Not Exist %executable% (
|
|||||||
)
|
)
|
||||||
|
|
||||||
REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -DloggerPath=conf/log4j.properties
|
REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -DloggerPath=conf/log4j.properties
|
||||||
set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g html2 -o samples\html2
|
set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g html2 -o samples\documentation\html2
|
||||||
|
|
||||||
java %JAVA_OPTS% -jar %executable% %ags%
|
java %JAVA_OPTS% -jar %executable% %ags%
|
||||||
|
|||||||
10
bin/windows/kotlin-springboot-petstore-server.bat
Normal file
10
bin/windows/kotlin-springboot-petstore-server.bat
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
set executable=.\modules\openapi-generator-cli\target\openapi-generator-cli.jar
|
||||||
|
|
||||||
|
If Not Exist %executable% (
|
||||||
|
mvn clean package
|
||||||
|
)
|
||||||
|
|
||||||
|
REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M
|
||||||
|
set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g kotlin-spring -o samples\server\petstore\kotlin-springboot --additional-properties=library=spring-boot
|
||||||
|
|
||||||
|
java %JAVA_OPTS% -jar %executable% %ags%
|
||||||
10
bin/windows/mysql-schema-petstore.bat
Executable file
10
bin/windows/mysql-schema-petstore.bat
Executable file
@@ -0,0 +1,10 @@
|
|||||||
|
set executable=.\modules\openapi-generator-cli\target\openapi-generator-cli.jar
|
||||||
|
|
||||||
|
If Not Exist %executable% (
|
||||||
|
mvn clean package
|
||||||
|
)
|
||||||
|
|
||||||
|
REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M
|
||||||
|
set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore-with-fake-endpoints-models-for-testing.yaml -g mysql-schema -o samples\schema\petstore\mysql
|
||||||
|
|
||||||
|
java %JAVA_OPTS% -jar %executable% %ags%
|
||||||
10
bin/windows/openapi3/kotlin-springboot-petstore-server.bat
Normal file
10
bin/windows/openapi3/kotlin-springboot-petstore-server.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.yaml -g kotlin-spring -o samples\server\openapi3\petstore\kotlin-springboot --additional-properties=library=spring-boot
|
||||||
|
|
||||||
|
java %JAVA_OPTS% -jar %executable% %ags%
|
||||||
6
bin/windows/typescript-axios-petstore-all.bat
Normal file
6
bin/windows/typescript-axios-petstore-all.bat
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
@ECHO OFF
|
||||||
|
|
||||||
|
call bin\windows\typescript-axios-petstore.bat
|
||||||
|
call bin\windows\typescript-axios-petstore-target-es6.bat
|
||||||
|
call bin\windows\typescript-axios-petstore-with-npm-version.bat
|
||||||
|
call bin\windows\typescript-axios-petstore-interfaces.bat
|
||||||
12
bin/windows/typescript-axios-petstore-interfaces.bat
Normal file
12
bin/windows/typescript-axios-petstore-interfaces.bat
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
@ECHO OFF
|
||||||
|
|
||||||
|
set executable=.\modules\openapi-generator-cli\target\openapi-generator-cli.jar
|
||||||
|
|
||||||
|
If Not Exist %executable% (
|
||||||
|
mvn clean package
|
||||||
|
)
|
||||||
|
|
||||||
|
REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M
|
||||||
|
set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g typescript-axios -o samples\client\petstore\typescript-axios\builds\with-interfaces -D withInterfaces=true
|
||||||
|
|
||||||
|
java %JAVA_OPTS% -jar %executable% %ags%
|
||||||
12
bin/windows/typescript-axios-petstore-target-es6.bat
Normal file
12
bin/windows/typescript-axios-petstore-target-es6.bat
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
@ECHO OFF
|
||||||
|
|
||||||
|
set executable=.\modules\openapi-generator-cli\target\openapi-generator-cli.jar
|
||||||
|
|
||||||
|
If Not Exist %executable% (
|
||||||
|
mvn clean package
|
||||||
|
)
|
||||||
|
|
||||||
|
REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M
|
||||||
|
set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g typescript-axios -c bin\typescript-axios-petstore-target-es6.json -o samples\client\petstore\typescript-axios\builds\es6-target
|
||||||
|
|
||||||
|
java %JAVA_OPTS% -jar %executable% %ags%
|
||||||
12
bin/windows/typescript-axios-petstore-with-npm-version.bat
Normal file
12
bin/windows/typescript-axios-petstore-with-npm-version.bat
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
@ECHO OFF
|
||||||
|
|
||||||
|
set executable=.\modules\openapi-generator-cli\target\openapi-generator-cli.jar
|
||||||
|
|
||||||
|
If Not Exist %executable% (
|
||||||
|
mvn clean package
|
||||||
|
)
|
||||||
|
|
||||||
|
REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M
|
||||||
|
set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g typescript-axios -c bin\typescript-axios-petstore-with-npm-version.json -o samples\client\petstore\typescript-axios\builds\with-npm-version
|
||||||
|
|
||||||
|
java %JAVA_OPTS% -jar %executable% %ags%
|
||||||
14
bin/windows/typescript-axios-petstore.bat
Normal file
14
bin/windows/typescript-axios-petstore.bat
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
@ECHO OFF
|
||||||
|
|
||||||
|
set executable=.\modules\openapi-generator-cli\target\openapi-generator-cli.jar
|
||||||
|
|
||||||
|
If Not Exist %executable% (
|
||||||
|
mvn clean package
|
||||||
|
)
|
||||||
|
|
||||||
|
REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M
|
||||||
|
|
||||||
|
echo
|
||||||
|
set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g typescript-axios -o samples\client\petstore\typescript-axios\builds\default
|
||||||
|
|
||||||
|
java %JAVA_OPTS% -jar %executable% %ags%
|
||||||
@@ -10,7 +10,7 @@ jobs:
|
|||||||
machine:
|
machine:
|
||||||
docker_layer_caching: true
|
docker_layer_caching: true
|
||||||
working_directory: ~/OpenAPITools/openapi-generator
|
working_directory: ~/OpenAPITools/openapi-generator
|
||||||
parallelism: 2
|
parallelism: 3
|
||||||
shell: /bin/bash --login
|
shell: /bin/bash --login
|
||||||
environment:
|
environment:
|
||||||
CIRCLE_ARTIFACTS: /tmp/circleci-artifacts
|
CIRCLE_ARTIFACTS: /tmp/circleci-artifacts
|
||||||
|
|||||||
@@ -35,6 +35,8 @@ These names can be anything you like. If you are building a client for the white
|
|||||||
|
|
||||||
**NOTE** Convention is to use kebab casing for names passed to `-n`. Example, `scala-finatra` would become `ScalaFinatraGenerator`.
|
**NOTE** Convention is to use kebab casing for names passed to `-n`. Example, `scala-finatra` would become `ScalaFinatraGenerator`.
|
||||||
|
|
||||||
|
#### Use your new generator with the CLI
|
||||||
|
|
||||||
To compile your library, enter the `out/generators/my-codegen` directory, run `mvn package` and execute the generator:
|
To compile your library, enter the `out/generators/my-codegen` directory, run `mvn package` and execute the generator:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
@@ -50,11 +52,59 @@ Note the `my-codegen` is an option for `-g` now, and you can use the usual argum
|
|||||||
|
|
||||||
```sh
|
```sh
|
||||||
java -cp out/codegens/customCodegen/target/my-codegen-openapi-generator-1.0.0.jar:modules/openapi-generator-cli/target/openapi-generator-cli.jar \
|
java -cp out/codegens/customCodegen/target/my-codegen-openapi-generator-1.0.0.jar:modules/openapi-generator-cli/target/openapi-generator-cli.jar \
|
||||||
io.openapitools.codegen.OpenAPIGenerator generate -g my-codegen \
|
org.openapitools.codegen.OpenAPIGenerator generate -g my-codegen \
|
||||||
-i https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/2_0/petstore.yaml \
|
-i https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/2_0/petstore.yaml \
|
||||||
-o ./out/myClient
|
-o ./out/myClient
|
||||||
```
|
```
|
||||||
|
|
||||||
|
For Windows users:
|
||||||
|
```
|
||||||
|
java -cp out/codegens/customCodegen/target/my-codegen-openapi-generator-1.0.0.jar;modules/openapi-generator-cli/target/openapi-generator-cli.jar \
|
||||||
|
org.openapitools.codegen.OpenAPIGenerator generate -g my-codegen \
|
||||||
|
-i https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/2_0/petstore.yaml \
|
||||||
|
-o ./out/myClient
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Use your new generator with the maven plugin
|
||||||
|
|
||||||
|
Install your library to your local maven repository by running:
|
||||||
|
|
||||||
|
```
|
||||||
|
mvn clean install -f out/generators/my-codegen
|
||||||
|
```
|
||||||
|
|
||||||
|
This will install `org.openapitools:my-codegen-openapi-generator:1.0.0` to your local maven repository.
|
||||||
|
|
||||||
|
You can use this as additional dependency of the `openapi-generator-maven-plugin` plugin and use `my-codegen` as `generatorName` value:
|
||||||
|
|
||||||
|
```xml
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.openapitools</groupId>
|
||||||
|
<artifactId>openapi-generator-maven-plugin</artifactId>
|
||||||
|
<version>${openapi-generator-version}</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>generate-client-code</id>
|
||||||
|
<goals>
|
||||||
|
<goal>generate</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<generatorName>my-codegen</generatorName>
|
||||||
|
<!-- other configuration ... -->
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.openapitools</groupId>
|
||||||
|
<artifactId>my-codegen-openapi-generator</artifactId>
|
||||||
|
<version>1.0.0</version>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
</plugin>
|
||||||
|
```
|
||||||
|
|
||||||
|
If you publish your artifact to a distant maven repository, do not forget to add this repository as `pluginRepository` for your project.
|
||||||
|
|
||||||
### Selective generation
|
### Selective generation
|
||||||
You may not want to generate *all* models in your project. Likewise you may want just one or two apis to be written. If that's the case, you can use system properties to control the output:
|
You may not want to generate *all* models in your project. Likewise you may want just one or two apis to be written. If that's the case, you can use system properties to control the output:
|
||||||
@@ -106,6 +156,14 @@ java -Dapis -DmodelTests=false {opts}
|
|||||||
|
|
||||||
When using selective generation, _only_ the templates needed for the specific generation will be used.
|
When using selective generation, _only_ the templates needed for the specific generation will be used.
|
||||||
|
|
||||||
|
To skip models defined as the form parameters in "requestBody", please use `skipFormModel` (default to false) (this option is introduced at v3.2.2)
|
||||||
|
|
||||||
|
```sh
|
||||||
|
java -DskipFormModel=true
|
||||||
|
```
|
||||||
|
|
||||||
|
This option will be helpful to skip model generation due to the form parameter, which is defined differently in OAS3 as there's no form parameter in OAS3
|
||||||
|
|
||||||
### Ignore file format
|
### Ignore file format
|
||||||
|
|
||||||
OpenAPI Generator supports a `.openapi-generator-ignore` file, similar to `.gitignore` or `.dockerignore` you're probably already familiar with.
|
OpenAPI Generator supports a `.openapi-generator-ignore` file, similar to `.gitignore` or `.dockerignore` you're probably already familiar with.
|
||||||
|
|||||||
110
docs/generators/README.md
Normal file
110
docs/generators/README.md
Normal file
@@ -0,0 +1,110 @@
|
|||||||
|
The following generators are available:
|
||||||
|
|
||||||
|
* CLIENT generators:
|
||||||
|
- [ada](ada.md)
|
||||||
|
- [android](android.md)
|
||||||
|
- [apex](apex.md)
|
||||||
|
- [bash](bash.md)
|
||||||
|
- [clojure](clojure.md)
|
||||||
|
- [cpp-qt5](cpp-qt5.md)
|
||||||
|
- [cpp-restsdk](cpp-restsdk.md)
|
||||||
|
- [cpp-tizen](cpp-tizen.md)
|
||||||
|
- [csharp](csharp.md)
|
||||||
|
- [csharp-dotnet2](csharp-dotnet2.md)
|
||||||
|
- [dart](dart.md)
|
||||||
|
- [eiffel](eiffel.md)
|
||||||
|
- [elixir](elixir.md)
|
||||||
|
- [elm](elm.md)
|
||||||
|
- [erlang-client](erlang-client.md)
|
||||||
|
- [flash](flash.md)
|
||||||
|
- [go](go.md)
|
||||||
|
- [groovy](groovy.md)
|
||||||
|
- [haskell-http-client](haskell-http-client.md)
|
||||||
|
- [java](java.md)
|
||||||
|
- [javascript](javascript.md)
|
||||||
|
- [javascript-closure-angular](javascript-closure-angular.md)
|
||||||
|
- [javascript-flowtyped](javascript-flowtyped.md)
|
||||||
|
- [jaxrs-cxf-client](jaxrs-cxf-client.md)
|
||||||
|
- [jmeter](jmeter.md)
|
||||||
|
- [kotlin](kotlin.md)
|
||||||
|
- [lua](lua.md)
|
||||||
|
- [objc](objc.md)
|
||||||
|
- [perl](perl.md)
|
||||||
|
- [php](php.md)
|
||||||
|
- [powershell](powershell.md)
|
||||||
|
- [python](python.md)
|
||||||
|
- [r](r.md)
|
||||||
|
- [ruby](ruby.md)
|
||||||
|
- [rust](rust.md)
|
||||||
|
- [scala-akka](scala-akka.md)
|
||||||
|
- [scala-gatling](scala-gatling.md)
|
||||||
|
- [scala-httpclient](scala-httpclient.md)
|
||||||
|
- [scalaz](scalaz.md)
|
||||||
|
- [swift2-deprecated](swift2-deprecated.md)
|
||||||
|
- [swift3](swift3.md)
|
||||||
|
- [swift4](swift4.md)
|
||||||
|
- [typescript-angular](typescript-angular.md)
|
||||||
|
- [typescript-angularjs](typescript-angularjs.md)
|
||||||
|
- [typescript-aurelia](typescript-aurelia.md)
|
||||||
|
- [typescript-fetch](typescript-fetch.md)
|
||||||
|
- [typescript-inversify](typescript-inversify.md)
|
||||||
|
- [typescript-jquery](typescript-jquery.md)
|
||||||
|
- [typescript-node](typescript-node.md)
|
||||||
|
|
||||||
|
|
||||||
|
* SERVER generators:
|
||||||
|
- [ada-server](ada-server.md)
|
||||||
|
- [aspnetcore](aspnetcore.md)
|
||||||
|
- [cpp-pistache-server](cpp-pistache-server.md)
|
||||||
|
- [cpp-qt5-qhttpengine-server](cpp-qt5-qhttpengine-server.md)
|
||||||
|
- [cpp-restbed-server](cpp-restbed-server.md)
|
||||||
|
- [csharp-nancyfx](csharp-nancyfx.md)
|
||||||
|
- [erlang-server](erlang-server.md)
|
||||||
|
- [go-server](go-server.md)
|
||||||
|
- [go-gin-server](go-gin-server.md)
|
||||||
|
- [haskell](haskell.md)
|
||||||
|
- [java-inflector](java-inflector.md)
|
||||||
|
- [java-msf4j](java-msf4j.md)
|
||||||
|
- [java-pkmst](java-pkmst.md)
|
||||||
|
- [java-play-framework](java-play-framework.md)
|
||||||
|
- [java-undertow-server](java-undertow-server.md)
|
||||||
|
- [java-vertx](java-vertx.md)
|
||||||
|
- [jaxrs-cxf](jaxrs-cxf.md)
|
||||||
|
- [jaxrs-cxf-cdi](jaxrs-cxf-cdi.md)
|
||||||
|
- [jaxrs-jersey](jaxrs-jersey.md)
|
||||||
|
- [jaxrs-resteasy](jaxrs-resteasy.md)
|
||||||
|
- [jaxrs-resteasy-eap](jaxrs-resteasy-eap.md)
|
||||||
|
- [jaxrs-spec](jaxrs-spec.md)
|
||||||
|
- [kotlin-server](kotlin-server.md)
|
||||||
|
- [kotlin-spring](kotlin-spring.md)
|
||||||
|
- [nodejs-server](nodejs-server.md)
|
||||||
|
- [php-laravel](php-laravel.md)
|
||||||
|
- [php-lumen](php-lumen.md)
|
||||||
|
- [php-silex](php-silex.md)
|
||||||
|
- [php-slim](php-slim.md)
|
||||||
|
- [php-symfony](php-symfony.md)
|
||||||
|
- [php-ze-ph](php-ze-ph.md)
|
||||||
|
- [python-flask](python-flask.md)
|
||||||
|
- [ruby-on-rails](ruby-on-rails.md)
|
||||||
|
- [ruby-sinatra](ruby-sinatra.md)
|
||||||
|
- [rust-server](rust-server.md)
|
||||||
|
- [scala-finch](scala-finch.md)
|
||||||
|
- [scala-lagom-server](scala-lagom-server.md)
|
||||||
|
- [scalatra](scalatra.md)
|
||||||
|
- [spring](spring.md)
|
||||||
|
|
||||||
|
|
||||||
|
* DOCUMENTATION generators:
|
||||||
|
- [cwiki](cwiki.md)
|
||||||
|
- [dynamic-html](dynamic-html.md)
|
||||||
|
- [html](html.md)
|
||||||
|
- [html2](html2.md)
|
||||||
|
- [openapi](openapi.md)
|
||||||
|
- [openapi-yaml](openapi-yaml.md)
|
||||||
|
|
||||||
|
|
||||||
|
* CONFIG generators:
|
||||||
|
- [apache2](apache2.md)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
19
docs/generators/ada-server.md
Normal file
19
docs/generators/ada-server.md
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
|
||||||
|
CONFIG OPTIONS for ada-server
|
||||||
|
|
||||||
|
sortParamsByRequiredFlag
|
||||||
|
Sort method arguments to place required parameters before optional parameters. (Default: true)
|
||||||
|
|
||||||
|
ensureUniqueParams
|
||||||
|
Whether to ensure parameter names are unique in an operation (rename parameters that are not). (Default: true)
|
||||||
|
|
||||||
|
allowUnicodeIdentifiers
|
||||||
|
boolean, toggles whether unicode identifiers are allowed in names or not, default is false (Default: false)
|
||||||
|
|
||||||
|
prependFormOrBodyParameters
|
||||||
|
Add form or body parameters to the beginning of the parameter list. (Default: false)
|
||||||
|
|
||||||
|
projectName
|
||||||
|
GNAT project name (Default: defaultProject)
|
||||||
|
|
||||||
|
Back to the [generators list](README.md)
|
||||||
19
docs/generators/ada.md
Normal file
19
docs/generators/ada.md
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
|
||||||
|
CONFIG OPTIONS for ada
|
||||||
|
|
||||||
|
sortParamsByRequiredFlag
|
||||||
|
Sort method arguments to place required parameters before optional parameters. (Default: true)
|
||||||
|
|
||||||
|
ensureUniqueParams
|
||||||
|
Whether to ensure parameter names are unique in an operation (rename parameters that are not). (Default: true)
|
||||||
|
|
||||||
|
allowUnicodeIdentifiers
|
||||||
|
boolean, toggles whether unicode identifiers are allowed in names or not, default is false (Default: false)
|
||||||
|
|
||||||
|
prependFormOrBodyParameters
|
||||||
|
Add form or body parameters to the beginning of the parameter list. (Default: false)
|
||||||
|
|
||||||
|
projectName
|
||||||
|
GNAT project name (Default: defaultProject)
|
||||||
|
|
||||||
|
Back to the [generators list](README.md)
|
||||||
57
docs/generators/android.md
Normal file
57
docs/generators/android.md
Normal file
@@ -0,0 +1,57 @@
|
|||||||
|
|
||||||
|
CONFIG OPTIONS for android
|
||||||
|
|
||||||
|
sortParamsByRequiredFlag
|
||||||
|
Sort method arguments to place required parameters before optional parameters. (Default: true)
|
||||||
|
|
||||||
|
ensureUniqueParams
|
||||||
|
Whether to ensure parameter names are unique in an operation (rename parameters that are not). (Default: true)
|
||||||
|
|
||||||
|
allowUnicodeIdentifiers
|
||||||
|
boolean, toggles whether unicode identifiers are allowed in names or not, default is false (Default: false)
|
||||||
|
|
||||||
|
prependFormOrBodyParameters
|
||||||
|
Add form or body parameters to the beginning of the parameter list. (Default: false)
|
||||||
|
|
||||||
|
modelPackage
|
||||||
|
package for generated models
|
||||||
|
|
||||||
|
apiPackage
|
||||||
|
package for generated api classes
|
||||||
|
|
||||||
|
invokerPackage
|
||||||
|
root package for generated code
|
||||||
|
|
||||||
|
groupId
|
||||||
|
groupId for use in the generated build.gradle and pom.xml
|
||||||
|
|
||||||
|
artifactId
|
||||||
|
artifactId for use in the generated build.gradle and pom.xml
|
||||||
|
|
||||||
|
artifactVersion
|
||||||
|
artifact version for use in the generated build.gradle and pom.xml
|
||||||
|
|
||||||
|
sourceFolder
|
||||||
|
source folder for generated code
|
||||||
|
|
||||||
|
useAndroidMavenGradlePlugin
|
||||||
|
A flag to toggle android-maven gradle plugin. (Default: true)
|
||||||
|
|
||||||
|
androidGradleVersion
|
||||||
|
gradleVersion version for use in the generated build.gradle
|
||||||
|
|
||||||
|
androidSdkVersion
|
||||||
|
compileSdkVersion version for use in the generated build.gradle
|
||||||
|
|
||||||
|
androidBuildToolsVersion
|
||||||
|
buildToolsVersion version for use in the generated build.gradle
|
||||||
|
|
||||||
|
serializableModel
|
||||||
|
boolean - toggle "implements Serializable" for generated models (Default: false)
|
||||||
|
|
||||||
|
library
|
||||||
|
library template (sub-template) to use
|
||||||
|
volley - HTTP client: Volley 1.0.19 (default)
|
||||||
|
httpclient - HTTP client: Apache HttpClient 4.3.6. JSON processing: Gson 2.3.1. IMPORTANT: Android client using HttpClient is not actively maintained and will be depecreated in the next major release.
|
||||||
|
|
||||||
|
Back to the [generators list](README.md)
|
||||||
19
docs/generators/apache2.md
Normal file
19
docs/generators/apache2.md
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
|
||||||
|
CONFIG OPTIONS for apache2
|
||||||
|
|
||||||
|
sortParamsByRequiredFlag
|
||||||
|
Sort method arguments to place required parameters before optional parameters. (Default: true)
|
||||||
|
|
||||||
|
ensureUniqueParams
|
||||||
|
Whether to ensure parameter names are unique in an operation (rename parameters that are not). (Default: true)
|
||||||
|
|
||||||
|
allowUnicodeIdentifiers
|
||||||
|
boolean, toggles whether unicode identifiers are allowed in names or not, default is false (Default: false)
|
||||||
|
|
||||||
|
prependFormOrBodyParameters
|
||||||
|
Add form or body parameters to the beginning of the parameter list. (Default: false)
|
||||||
|
|
||||||
|
userInfoPath
|
||||||
|
Path to the user and group files
|
||||||
|
|
||||||
|
Back to the [generators list](README.md)
|
||||||
28
docs/generators/apex.md
Normal file
28
docs/generators/apex.md
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
|
||||||
|
CONFIG OPTIONS for apex
|
||||||
|
|
||||||
|
sortParamsByRequiredFlag
|
||||||
|
Sort method arguments to place required parameters before optional parameters. (Default: true)
|
||||||
|
|
||||||
|
ensureUniqueParams
|
||||||
|
Whether to ensure parameter names are unique in an operation (rename parameters that are not). (Default: true)
|
||||||
|
|
||||||
|
allowUnicodeIdentifiers
|
||||||
|
boolean, toggles whether unicode identifiers are allowed in names or not, default is false (Default: false)
|
||||||
|
|
||||||
|
prependFormOrBodyParameters
|
||||||
|
Add form or body parameters to the beginning of the parameter list. (Default: false)
|
||||||
|
|
||||||
|
classPrefix
|
||||||
|
Prefix for generated classes. Set this to avoid overwriting existing classes in your org.
|
||||||
|
|
||||||
|
apiVersion
|
||||||
|
The Metadata API version number to use for components in this package.
|
||||||
|
|
||||||
|
buildMethod
|
||||||
|
The build method for this package.
|
||||||
|
|
||||||
|
namedCredential
|
||||||
|
The named credential name for the HTTP callouts
|
||||||
|
|
||||||
|
Back to the [generators list](README.md)
|
||||||
34
docs/generators/aspnetcore.md
Normal file
34
docs/generators/aspnetcore.md
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
|
||||||
|
CONFIG OPTIONS for aspnetcore
|
||||||
|
|
||||||
|
packageName
|
||||||
|
C# package name (convention: Title.Case). (Default: Org.OpenAPITools)
|
||||||
|
|
||||||
|
packageVersion
|
||||||
|
C# package version. (Default: 1.0.0)
|
||||||
|
|
||||||
|
packageGuid
|
||||||
|
The GUID that will be associated with the C# project
|
||||||
|
|
||||||
|
sourceFolder
|
||||||
|
source folder for generated code (Default: src)
|
||||||
|
|
||||||
|
aspnetCoreVersion
|
||||||
|
ASP.NET Core version: 2.1 (default), 2.0 (deprecated) (Default: 2.1)
|
||||||
|
|
||||||
|
sortParamsByRequiredFlag
|
||||||
|
Sort method arguments to place required parameters before optional parameters. (Default: true)
|
||||||
|
|
||||||
|
useDateTimeOffset
|
||||||
|
Use DateTimeOffset to model date-time properties (Default: false)
|
||||||
|
|
||||||
|
useCollection
|
||||||
|
Deserialize array types to Collection<T> instead of List<T>. (Default: false)
|
||||||
|
|
||||||
|
returnICollection
|
||||||
|
Return ICollection<T> instead of the concrete type. (Default: false)
|
||||||
|
|
||||||
|
useSwashbuckle
|
||||||
|
Uses the Swashbuckle.AspNetCore NuGet package for documentation. (Default: true)
|
||||||
|
|
||||||
|
Back to the [generators list](README.md)
|
||||||
40
docs/generators/bash.md
Normal file
40
docs/generators/bash.md
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
|
||||||
|
CONFIG OPTIONS for bash
|
||||||
|
|
||||||
|
sortParamsByRequiredFlag
|
||||||
|
Sort method arguments to place required parameters before optional parameters. (Default: true)
|
||||||
|
|
||||||
|
ensureUniqueParams
|
||||||
|
Whether to ensure parameter names are unique in an operation (rename parameters that are not). (Default: true)
|
||||||
|
|
||||||
|
allowUnicodeIdentifiers
|
||||||
|
boolean, toggles whether unicode identifiers are allowed in names or not, default is false (Default: false)
|
||||||
|
|
||||||
|
prependFormOrBodyParameters
|
||||||
|
Add form or body parameters to the beginning of the parameter list. (Default: false)
|
||||||
|
|
||||||
|
curlOptions
|
||||||
|
Default cURL options
|
||||||
|
|
||||||
|
processMarkdown
|
||||||
|
Convert all Markdown Markup into terminal formatting (Default: false)
|
||||||
|
|
||||||
|
scriptName
|
||||||
|
The name of the script that will be generated (e.g. petstore-cli)
|
||||||
|
|
||||||
|
generateBashCompletion
|
||||||
|
Whether to generate the Bash completion script (Default: false)
|
||||||
|
|
||||||
|
generateZshCompletion
|
||||||
|
Whether to generate the Zsh completion script (Default: false)
|
||||||
|
|
||||||
|
hostEnvironmentVariable
|
||||||
|
Name of environment variable where host can be defined (e.g. PETSTORE_HOST='http://api.openapitools.org:8080')
|
||||||
|
|
||||||
|
basicAuthEnvironmentVariable
|
||||||
|
Name of environment variable where username and password can be defined (e.g. PETSTORE_CREDS='username:password')
|
||||||
|
|
||||||
|
apiKeyAuthEnvironmentVariable
|
||||||
|
Name of environment variable where API key can be defined (e.g. PETSTORE_APIKEY='kjhasdGASDa5asdASD') (Default: false)
|
||||||
|
|
||||||
|
Back to the [generators list](README.md)
|
||||||
37
docs/generators/clojure.md
Normal file
37
docs/generators/clojure.md
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
|
||||||
|
CONFIG OPTIONS for clojure
|
||||||
|
|
||||||
|
sortParamsByRequiredFlag
|
||||||
|
Sort method arguments to place required parameters before optional parameters. (Default: true)
|
||||||
|
|
||||||
|
ensureUniqueParams
|
||||||
|
Whether to ensure parameter names are unique in an operation (rename parameters that are not). (Default: true)
|
||||||
|
|
||||||
|
allowUnicodeIdentifiers
|
||||||
|
boolean, toggles whether unicode identifiers are allowed in names or not, default is false (Default: false)
|
||||||
|
|
||||||
|
prependFormOrBodyParameters
|
||||||
|
Add form or body parameters to the beginning of the parameter list. (Default: false)
|
||||||
|
|
||||||
|
projectName
|
||||||
|
name of the project (Default: generated from info.title or "openapi-clj-client")
|
||||||
|
|
||||||
|
projectDescription
|
||||||
|
description of the project (Default: using info.description or "Client library of <projectNname>")
|
||||||
|
|
||||||
|
projectVersion
|
||||||
|
version of the project (Default: using info.version or "1.0.0")
|
||||||
|
|
||||||
|
projectUrl
|
||||||
|
URL of the project (Default: using info.contact.url or not included in project.clj)
|
||||||
|
|
||||||
|
projectLicenseName
|
||||||
|
name of the license the project uses (Default: using info.license.name or not included in project.clj)
|
||||||
|
|
||||||
|
projectLicenseUrl
|
||||||
|
URL of the license the project uses (Default: using info.license.url or not included in project.clj)
|
||||||
|
|
||||||
|
baseNamespace
|
||||||
|
the base/top namespace (Default: generated from projectName)
|
||||||
|
|
||||||
|
Back to the [generators list](README.md)
|
||||||
10
docs/generators/cpp-pistache-server.md
Normal file
10
docs/generators/cpp-pistache-server.md
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
|
||||||
|
CONFIG OPTIONS for cpp-pistache-server
|
||||||
|
|
||||||
|
addExternalLibs
|
||||||
|
Add the Possibility to fetch and compile external Libraries needed by this Framework. (Default: true)
|
||||||
|
|
||||||
|
helpersPackage
|
||||||
|
Specify the package name to be used for the helpers (e.g. org.openapitools.server.helpers). (Default: org.openapitools.server.helpers)
|
||||||
|
|
||||||
|
Back to the [generators list](README.md)
|
||||||
19
docs/generators/cpp-qt5-qhttpengine-server.md
Normal file
19
docs/generators/cpp-qt5-qhttpengine-server.md
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
|
||||||
|
CONFIG OPTIONS for cpp-qt5-qhttpengine-server
|
||||||
|
|
||||||
|
sortParamsByRequiredFlag
|
||||||
|
Sort method arguments to place required parameters before optional parameters. (Default: true)
|
||||||
|
|
||||||
|
ensureUniqueParams
|
||||||
|
Whether to ensure parameter names are unique in an operation (rename parameters that are not). (Default: true)
|
||||||
|
|
||||||
|
allowUnicodeIdentifiers
|
||||||
|
boolean, toggles whether unicode identifiers are allowed in names or not, default is false (Default: false)
|
||||||
|
|
||||||
|
prependFormOrBodyParameters
|
||||||
|
Add form or body parameters to the beginning of the parameter list. (Default: false)
|
||||||
|
|
||||||
|
cppNamespace
|
||||||
|
C++ namespace (convention: name::space::for::api). (Default: OpenAPI)
|
||||||
|
|
||||||
|
Back to the [generators list](README.md)
|
||||||
22
docs/generators/cpp-qt5.md
Normal file
22
docs/generators/cpp-qt5.md
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
|
||||||
|
CONFIG OPTIONS for cpp-qt5
|
||||||
|
|
||||||
|
sortParamsByRequiredFlag
|
||||||
|
Sort method arguments to place required parameters before optional parameters. (Default: true)
|
||||||
|
|
||||||
|
ensureUniqueParams
|
||||||
|
Whether to ensure parameter names are unique in an operation (rename parameters that are not). (Default: true)
|
||||||
|
|
||||||
|
allowUnicodeIdentifiers
|
||||||
|
boolean, toggles whether unicode identifiers are allowed in names or not, default is false (Default: false)
|
||||||
|
|
||||||
|
prependFormOrBodyParameters
|
||||||
|
Add form or body parameters to the beginning of the parameter list. (Default: false)
|
||||||
|
|
||||||
|
cppNamespace
|
||||||
|
C++ namespace (convention: name::space::for::api). (Default: OpenAPI)
|
||||||
|
|
||||||
|
optionalProjectFile
|
||||||
|
Generate client.pri. (Default: true)
|
||||||
|
|
||||||
|
Back to the [generators list](README.md)
|
||||||
19
docs/generators/cpp-restbed-server.md
Normal file
19
docs/generators/cpp-restbed-server.md
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
|
||||||
|
CONFIG OPTIONS for cpp-restbed-server
|
||||||
|
|
||||||
|
modelPackage
|
||||||
|
C++ namespace for models (convention: name.space.model). (Default: org.openapitools.server.model)
|
||||||
|
|
||||||
|
apiPackage
|
||||||
|
C++ namespace for apis (convention: name.space.api). (Default: org.openapitools.server.api)
|
||||||
|
|
||||||
|
packageVersion
|
||||||
|
C++ package version. (Default: 1.0.0)
|
||||||
|
|
||||||
|
declspec
|
||||||
|
C++ preprocessor to place before the class name for handling dllexport/dllimport. (Default: )
|
||||||
|
|
||||||
|
defaultInclude
|
||||||
|
The default include statement that should be placed in all headers for including things like the declspec (convention: #include "Commons.h" (Default: )
|
||||||
|
|
||||||
|
Back to the [generators list](README.md)
|
||||||
22
docs/generators/cpp-restsdk.md
Normal file
22
docs/generators/cpp-restsdk.md
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
|
||||||
|
CONFIG OPTIONS for cpp-restsdk
|
||||||
|
|
||||||
|
modelPackage
|
||||||
|
C++ namespace for models (convention: name.space.model). (Default: org.openapitools.client.model)
|
||||||
|
|
||||||
|
apiPackage
|
||||||
|
C++ namespace for apis (convention: name.space.api). (Default: org.openapitools.client.api)
|
||||||
|
|
||||||
|
packageVersion
|
||||||
|
C++ package version. (Default: 1.0.0)
|
||||||
|
|
||||||
|
declspec
|
||||||
|
C++ preprocessor to place before the class name for handling dllexport/dllimport. (Default: )
|
||||||
|
|
||||||
|
defaultInclude
|
||||||
|
The default include statement that should be placed in all headers for including things like the declspec (convention: #include "Commons.h" (Default: )
|
||||||
|
|
||||||
|
generateGMocksForApis
|
||||||
|
Generate Google Mock classes for APIs.
|
||||||
|
|
||||||
|
Back to the [generators list](README.md)
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user