forked from loafle/openapi-generator-original
Add OpenAPI spec 3.0 support (beta)
Co-authored-by: Akihito Nakano <sora.akatsuki@gmail.com> Co-authored-by: Jeremie Bresson <dev@jmini.fr> Co-authored-by: Jim Schubert <james.schubert@gmail.com> Co-authored-by: Martin Delille <martin@phonations.com> Co-authored-by: Tomasz Prus <tomasz.prus@gmail.com> Co-authored-by: William Cheng <wing328hk@gmail.com>
This commit is contained in:
parent
4cfbc118e8
commit
53597764c3
8
.github/ISSUE_TEMPLATE.md
vendored
8
.github/ISSUE_TEMPLATE.md
vendored
@ -7,11 +7,11 @@ Also please indicate in the issue title which language/library is concerned. Eg:
|
|||||||
|
|
||||||
<!-- describe what is the question, suggestion or issue and why this is a problem for you. -->
|
<!-- describe what is the question, suggestion or issue and why this is a problem for you. -->
|
||||||
|
|
||||||
##### Swagger-codegen version
|
##### openapi-generator version
|
||||||
|
|
||||||
<!-- which version of swagger-codegen are you using, is it a regression? -->
|
<!-- which version of openapi-generator are you using, is it a regression? -->
|
||||||
|
|
||||||
##### Swagger declaration file content or url
|
##### OpenAPI declaration file content or url
|
||||||
|
|
||||||
<!-- if it is a bug, a json or yaml that produces it.
|
<!-- if it is a bug, a json or yaml that produces it.
|
||||||
If you post the code inline, please wrap it with
|
If you post the code inline, please wrap it with
|
||||||
@ -37,7 +37,7 @@ link it here.
|
|||||||
|
|
||||||
##### Related issues/PRs
|
##### Related issues/PRs
|
||||||
|
|
||||||
<!-- has a similar issue/PR been reported/opened before? Please do a search in https://github.com/swagger-api/swagger-codegen/issues?utf8=%E2%9C%93&q=is%3Aissue%20 -->
|
<!-- has a similar issue/PR been reported/opened before? Please do a search in https://github.com/wing328/openapi-generator/issues?utf8=%E2%9C%93&q=is%3Aissue%20 -->
|
||||||
|
|
||||||
##### Suggest a fix/enhancement
|
##### Suggest a fix/enhancement
|
||||||
|
|
||||||
|
4
.github/PULL_REQUEST_TEMPLATE.md
vendored
4
.github/PULL_REQUEST_TEMPLATE.md
vendored
@ -1,9 +1,9 @@
|
|||||||
### PR checklist
|
### PR checklist
|
||||||
|
|
||||||
- [ ] Read the [contribution guidelines](https://github.com/swagger-api/swagger-codegen/blob/master/CONTRIBUTING.md).
|
- [ ] Read the [contribution guidelines](https://github.com/wing328/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: `3.0.0` branch for changes related to OpenAPI spec 3.0. Default: `master`.
|
- [ ] Filed the PR against the correct branch: `3.0.0` branch for changes related to OpenAPI spec 3.0. Default: `master`.
|
||||||
- [ ] Copied the [technical committee](https://github.com/swagger-api/swagger-codegen/#swagger-codegen-technical-committee) to review the pull request if your PR is targeting a particular programming language.
|
- [ ] Copied the [technical committee](https://github.com/wing328/openapi-generator/#swagger-codegen-technical-committee) to review the pull request if your PR is targeting a particular programming language.
|
||||||
|
|
||||||
### Description of the PR
|
### Description of the PR
|
||||||
|
|
||||||
|
2
.gitignore
vendored
2
.gitignore
vendored
@ -5,7 +5,7 @@ out/
|
|||||||
*.iws
|
*.iws
|
||||||
classpath.txt
|
classpath.txt
|
||||||
version.properties
|
version.properties
|
||||||
!modules/swagger-codegen-cli/src/main/resources/version.properties
|
!modules/openapi-generator-cli/src/main/resources/version.properties
|
||||||
.project
|
.project
|
||||||
.classpath
|
.classpath
|
||||||
lib/*
|
lib/*
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
sudo: required
|
sudo: required
|
||||||
language: java
|
language: java
|
||||||
jdk:
|
jdk:
|
||||||
- openjdk7
|
- openjdk8
|
||||||
|
|
||||||
cache:
|
cache:
|
||||||
directories:
|
directories:
|
||||||
|
@ -34,7 +34,7 @@ addons:
|
|||||||
before_install:
|
before_install:
|
||||||
- export SW=`pwd`
|
- export SW=`pwd`
|
||||||
- rvm list
|
- rvm list
|
||||||
- rvm use 2.3.0
|
- rvm use 2.3.3
|
||||||
- gem environment
|
- gem environment
|
||||||
- gem install bundler -N --no-ri --no-rdoc
|
- gem install bundler -N --no-ri --no-rdoc
|
||||||
- gem install cocoapods -v 1.2.1 -N --no-ri --no-rdoc
|
- gem install cocoapods -v 1.2.1 -N --no-ri --no-rdoc
|
||||||
@ -61,8 +61,6 @@ before_install:
|
|||||||
- xcpretty -v
|
- xcpretty -v
|
||||||
# show go version
|
# show go version
|
||||||
- go version
|
- go version
|
||||||
# show stack version
|
|
||||||
- stack --version
|
|
||||||
|
|
||||||
script:
|
script:
|
||||||
# run integration tests defined in maven pom.xml
|
# run integration tests defined in maven pom.xml
|
||||||
|
@ -747,9 +747,11 @@ Please refer to this [page](https://github.com/swagger-api/swagger-codegen/blob/
|
|||||||
Companies/Projects using Swagger Codegen
|
Companies/Projects using Swagger Codegen
|
||||||
----------------------------------------
|
----------------------------------------
|
||||||
Here are some companies/projects using Swagger Codegen in production. To add your company/project to the list, please visit [README.md](https://github.com/swagger-api/swagger-codegen/blob/master/README.md) and click on the icon to edit the page.
|
Here are some companies/projects using Swagger Codegen in production. To add your company/project to the list, please visit [README.md](https://github.com/swagger-api/swagger-codegen/blob/master/README.md) and click on the icon to edit the page.
|
||||||
|
- [Acando](https://www.acando.de/)
|
||||||
- [Accengage](https://www.accengage.com/)
|
- [Accengage](https://www.accengage.com/)
|
||||||
- [Accruent](https://www.accruent.com/)
|
- [Accruent](https://www.accruent.com/)
|
||||||
- [Activehours](https://www.activehours.com/)
|
- [Activehours](https://www.activehours.com/)
|
||||||
|
- [Actonica](https://www.actonica.com)
|
||||||
- [Acunetix](https://www.acunetix.com/)
|
- [Acunetix](https://www.acunetix.com/)
|
||||||
- [Atlassian](https://www.atlassian.com/)
|
- [Atlassian](https://www.atlassian.com/)
|
||||||
- [Autodesk](http://www.autodesk.com/)
|
- [Autodesk](http://www.autodesk.com/)
|
||||||
@ -947,6 +949,7 @@ Presentations/Videos/Tutorials/Books
|
|||||||
- 2018/01/19 - [Generowanie kodu usług REST - przewodnik dla początkujących](https://gum.co/swagger_codegen_beginner_pl)(eBook) by [William Cheng](https://github.com/wing328), [Tomasz Prus](https://github.com/tomplus), [Bartek Kryza](https://github.com/bkryza)
|
- 2018/01/19 - [Generowanie kodu usług REST - przewodnik dla początkujących](https://gum.co/swagger_codegen_beginner_pl)(eBook) by [William Cheng](https://github.com/wing328), [Tomasz Prus](https://github.com/tomplus), [Bartek Kryza](https://github.com/bkryza)
|
||||||
- 2018/02/03 - [Writing REST APIs with OpenAPI and Swagger Ada](https://www.slideshare.net/StephaneCarrez1/writing-rest-apis-with-openapi-and-swagger-ada/StephaneCarrez1/writing-rest-apis-with-openapi-and-swagger-ada) by [Stephane Carrez](https://github.com/stcarrez) at [FOSDEM 2018](https://fosdem.org/2018)
|
- 2018/02/03 - [Writing REST APIs with OpenAPI and Swagger Ada](https://www.slideshare.net/StephaneCarrez1/writing-rest-apis-with-openapi-and-swagger-ada/StephaneCarrez1/writing-rest-apis-with-openapi-and-swagger-ada) by [Stephane Carrez](https://github.com/stcarrez) at [FOSDEM 2018](https://fosdem.org/2018)
|
||||||
- 2018/02/28 - [OpenAPI–An eBay Perspective](https://www.ebayinc.com/stories/blogs/tech/openapi-an-ebay-perspective/) by Shekhar Banerjee (eBay)
|
- 2018/02/28 - [OpenAPI–An eBay Perspective](https://www.ebayinc.com/stories/blogs/tech/openapi-an-ebay-perspective/) by Shekhar Banerjee (eBay)
|
||||||
|
- 2018/03/16 - [REST APIのためのコード生成入門](https://gumroad.com/l/swagger_codegen_beginner_jp) by [William Cheng](https://github.com/wing328), [中野暁人](https://github.com/ackintosh), [和田拓朗](https://github.com/taxpon)
|
||||||
|
|
||||||
# Swagger Codegen Core Team
|
# Swagger Codegen Core Team
|
||||||
|
|
||||||
@ -1079,7 +1082,7 @@ If you want to join the committee, please kindly apply by sending an email to wi
|
|||||||
| Android | @jaz-ah (2017/09) |
|
| Android | @jaz-ah (2017/09) |
|
||||||
| Apex | |
|
| Apex | |
|
||||||
| Bash | @frol (2017/07) @bkryza (2017/08) @kenjones-cisco (2017/09) |
|
| Bash | @frol (2017/07) @bkryza (2017/08) @kenjones-cisco (2017/09) |
|
||||||
| C++ | @ravinikam (2017/07) @stkrwork (2017/07) @fvarose (2017/11) @etherealjoy (2018/02) |
|
| 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) |
|
||||||
@ -1102,7 +1105,7 @@ If you want to join the committee, please kindly apply by sending an email to wi
|
|||||||
| Ruby | @cliffano (2017/07) @zlx (2017/09) |
|
| Ruby | @cliffano (2017/07) @zlx (2017/09) |
|
||||||
| 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) |
|
| 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) |
|
||||||
|
|
||||||
|
|
||||||
|
@ -26,6 +26,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/cpprest -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -l cpprest -o samples/client/petstore/cpprest"
|
ags="generate -t modules/openapi-generator/src/main/resources/cpprest -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -l cpp-restsdk -o samples/client/petstore/cpprest $@"
|
||||||
|
|
||||||
java $JAVA_OPTS -jar $executable $ags
|
java $JAVA_OPTS -jar $executable $ags
|
||||||
|
4
bin/flash-petstore.json
Normal file
4
bin/flash-petstore.json
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
"packageName": "io.swagger",
|
||||||
|
"invokerPackage": "io.swagger"
|
||||||
|
}
|
@ -26,6 +26,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/flash -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -l flash -o samples/client/petstore/flash"
|
ags="$@ generate -t modules/openapi-generator/src/main/resources/flash -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -l flash -o samples/client/petstore/flash -c bin/flash-petstore.json"
|
||||||
|
|
||||||
java $JAVA_OPTS -jar $executable $ags
|
java $JAVA_OPTS -jar $executable $ags
|
||||||
|
@ -26,6 +26,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/JavaInflector -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -l inflector -o samples/server/petstore/java-inflector -DhideGenerationTimestamp=true"
|
ags="$@ generate -t modules/openapi-generator/src/main/resources/JavaInflector -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -l java-inflector -o samples/server/petstore/java-inflector -DhideGenerationTimestamp=true"
|
||||||
|
|
||||||
java $JAVA_OPTS -jar $executable $ags
|
java $JAVA_OPTS -jar $executable $ags
|
||||||
|
@ -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 -t modules/openapi-generator/src/main/resources/MSF4J -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -l msf4j -o samples/server/petstore/java-msf4j/ -DhideGenerationTimestamp=true --additional-properties artifactId=swagger-msf4j-server"
|
ags="$@ generate -t modules/openapi-generator/src/main/resources/MSF4J -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -l java-msf4j -o samples/server/petstore/java-msf4j/ -DhideGenerationTimestamp=true --additional-properties artifactId=swagger-msf4j-server"
|
||||||
|
|
||||||
echo "Removing files and folders under samples/server/petstore/java-msf4j/src/main"
|
echo "Removing files and folders under samples/server/petstore/java-msf4j/src/main"
|
||||||
rm -rf samples/server/petstore/java-msf4j/src/main
|
rm -rf samples/server/petstore/java-msf4j/src/main
|
||||||
|
@ -9,3 +9,4 @@
|
|||||||
./bin/java-play-framework-petstore-server-no-wrap-calls.sh
|
./bin/java-play-framework-petstore-server-no-wrap-calls.sh
|
||||||
./bin/java-play-framework-petstore-server-fake-endpoints.sh
|
./bin/java-play-framework-petstore-server-fake-endpoints.sh
|
||||||
./bin/java-play-framework-petstore-server-api-package-override.sh
|
./bin/java-play-framework-petstore-server-api-package-override.sh
|
||||||
|
./bin/java-play-framework-petstore-server-async.sh
|
||||||
|
5
bin/java-play-framework-petstore-server-async.json
Executable file
5
bin/java-play-framework-petstore-server-async.json
Executable file
@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"additionalProperties" : {
|
||||||
|
"supportAsync" : true
|
||||||
|
}
|
||||||
|
}
|
31
bin/java-play-framework-petstore-server-async.sh
Executable file
31
bin/java-play-framework-petstore-server-async.sh
Executable file
@ -0,0 +1,31 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
SCRIPT="$0"
|
||||||
|
|
||||||
|
while [ -h "$SCRIPT" ] ; do
|
||||||
|
ls=`ls -ld "$SCRIPT"`
|
||||||
|
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||||
|
if expr "$link" : '/.*' > /dev/null; then
|
||||||
|
SCRIPT="$link"
|
||||||
|
else
|
||||||
|
SCRIPT=`dirname "$SCRIPT"`/"$link"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ ! -d "${APP_DIR}" ]; then
|
||||||
|
APP_DIR=`dirname "$SCRIPT"`/..
|
||||||
|
APP_DIR=`cd "${APP_DIR}"; pwd`
|
||||||
|
fi
|
||||||
|
|
||||||
|
executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar"
|
||||||
|
|
||||||
|
if [ ! -f "$executable" ]
|
||||||
|
then
|
||||||
|
mvn clean package
|
||||||
|
fi
|
||||||
|
|
||||||
|
# if you've executed sbt assembly previously it will use that instead.
|
||||||
|
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
|
||||||
|
ags="$@ generate -t modules/openapi-generator/src/main/resources/JavaPlayFramework -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -l java-play-framework -c bin/java-play-framework-petstore-server-async.json -o samples/server/petstore/java-play-framework-async -DhideGenerationTimestamp=true"
|
||||||
|
|
||||||
|
java $JAVA_OPTS -jar $executable $ags
|
@ -26,6 +26,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/undertow -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -l undertow -o samples/server/petstore/undertow --additional-properties hideGenerationTimestamp=true"
|
ags="$@ generate -t modules/openapi-generator/src/main/resources/undertow -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -l java-undertow-server -o samples/server/petstore/undertow --additional-properties hideGenerationTimestamp=true"
|
||||||
|
|
||||||
java $JAVA_OPTS -jar $executable $ags
|
java $JAVA_OPTS -jar $executable $ags
|
||||||
|
@ -26,6 +26,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 --artifact-id "jaxrs-cxf-petstore-client" -t modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/ -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -l jaxrs-cxf -o samples/client/petstore/jaxrs-cxf-client/"
|
ags="$@ generate --artifact-id "jaxrs-cxf-petstore-client" -t modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/ -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -l jaxrs-cxf-client -o samples/client/petstore/jaxrs-cxf-client/"
|
||||||
|
|
||||||
java $JAVA_OPTS -jar $executable $ags
|
java $JAVA_OPTS -jar $executable $ags
|
||||||
|
@ -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 -t modules/openapi-generator/src/main/resources/JavaJaxRS -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -l jaxrs -o samples/server/petstore/jaxrs/jersey1 -DhideGenerationTimestamp=true,serverPort=8080 --library=jersey1 --artifact-id=swagger-jaxrs-jersey1-server"
|
ags="$@ generate -t modules/openapi-generator/src/main/resources/JavaJaxRS -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -l jaxrs-jersey -o samples/server/petstore/jaxrs/jersey1 -DhideGenerationTimestamp=true,serverPort=8080 --library=jersey1 --artifact-id=swagger-jaxrs-jersey1-server"
|
||||||
|
|
||||||
echo "Removing files and folders under samples/server/petstore/jaxrs/jersey1/src/main"
|
echo "Removing files and folders under samples/server/petstore/jaxrs/jersey1/src/main"
|
||||||
rm -rf samples/server/petstore/jaxrs/jersey1/src/main
|
rm -rf samples/server/petstore/jaxrs/jersey1/src/main
|
||||||
|
@ -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 -t modules/openapi-generator/src/main/resources/JavaJaxRS -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -l jaxrs -o samples/server/petstore/jaxrs/jersey1-useTags -DhideGenerationTimestamp=true,serverPort=8080 --library=jersey1 --artifact-id=swagger-jaxrs-jersey1-useTags --additional-properties useTags=true"
|
ags="$@ generate -t modules/openapi-generator/src/main/resources/JavaJaxRS -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -l jaxrs-jersey -o samples/server/petstore/jaxrs/jersey1-useTags -DhideGenerationTimestamp=true,serverPort=8080 --library=jersey1 --artifact-id=swagger-jaxrs-jersey1-useTags --additional-properties useTags=true"
|
||||||
|
|
||||||
echo "Removing files and folders under samples/server/petstore/jaxrs/jersey1-useTags/src/main"
|
echo "Removing files and folders under samples/server/petstore/jaxrs/jersey1-useTags/src/main"
|
||||||
rm -rf samples/server/petstore/jaxrs/jersey1-useTags/src/main
|
rm -rf samples/server/petstore/jaxrs/jersey1-useTags/src/main
|
||||||
|
@ -26,6 +26,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/JavaJaxRS/ -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -l jaxrs -o samples/server/petstore/jaxrs-datelib-j8/ -c ./bin/jaxrs-datelib-j8.json -DhideGenerationTimestamp=true"
|
ags="$@ generate -t modules/openapi-generator/src/main/resources/JavaJaxRS/ -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -l jaxrs-jersey -o samples/server/petstore/jaxrs-datelib-j8/ -c ./bin/jaxrs-datelib-j8.json -DhideGenerationTimestamp=true"
|
||||||
|
|
||||||
java $JAVA_OPTS -jar $executable $ags
|
java $JAVA_OPTS -jar $executable $ags
|
||||||
|
@ -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 -t modules/openapi-generator/src/main/resources/JavaJaxRS -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -l jaxrs -o samples/server/petstore/jaxrs/jersey2 -DhideGenerationTimestamp=true,serverPort=8080"
|
ags="$@ generate -t modules/openapi-generator/src/main/resources/JavaJaxRS -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -l jaxrs-jersey -o samples/server/petstore/jaxrs/jersey2 -DhideGenerationTimestamp=true,serverPort=8080"
|
||||||
|
|
||||||
echo "Removing files and folders under samples/server/petstore/jaxrs/jersey2/src/main"
|
echo "Removing files and folders under samples/server/petstore/jaxrs/jersey2/src/main"
|
||||||
rm -rf samples/server/petstore/jaxrs/jersey2/src/main
|
rm -rf samples/server/petstore/jaxrs/jersey2/src/main
|
||||||
|
@ -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 -t modules/openapi-generator/src/main/resources/JavaJaxRS -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -l jaxrs -o samples/server/petstore/jaxrs/jersey2-useTags -DhideGenerationTimestamp=true,serverPort=8080 --artifact-id=swagger-jaxrs-jersey2-useTags --additional-properties useTags=true"
|
ags="$@ generate -t modules/openapi-generator/src/main/resources/JavaJaxRS -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -l jaxrs-jersey -o samples/server/petstore/jaxrs/jersey2-useTags -DhideGenerationTimestamp=true,serverPort=8080 --artifact-id=swagger-jaxrs-jersey2-useTags --additional-properties useTags=true"
|
||||||
|
|
||||||
echo "Removing files and folders under samples/server/petstore/jaxrs/jersey2-useTags/src/main"
|
echo "Removing files and folders under samples/server/petstore/jaxrs/jersey2-useTags/src/main"
|
||||||
rm -rf samples/server/petstore/jaxrs/jersey2-useTags/src/main
|
rm -rf samples/server/petstore/jaxrs/jersey2-useTags/src/main
|
||||||
|
@ -26,6 +26,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/lua -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -l lua -o samples/client/petstore/lua -DpackageName=petstore"
|
ags="generate -t modules/openapi-generator/src/main/resources/lua -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -l lua -o samples/client/petstore/lua -DpackageName=petstore $@"
|
||||||
|
|
||||||
java $JAVA_OPTS -jar $executable $ags
|
java $JAVA_OPTS -jar $executable $ags
|
||||||
|
@ -26,6 +26,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/lumen -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -l lumen -o samples/server/petstore/lumen"
|
ags="$@ generate -t modules/openapi-generator/src/main/resources/lumen -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -l php-lumen -o samples/server/petstore/lumen"
|
||||||
|
|
||||||
java $JAVA_OPTS -jar $executable $ags
|
java $JAVA_OPTS -jar $executable $ags
|
||||||
|
@ -26,6 +26,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/nancyfx -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -l nancyfx -o samples/server/petstore/nancyfx-async --additional-properties packageGuid={768B8DC6-54EE-4D40-9B20-7857E1D742A4},asyncServer=true"
|
ags="generate $@ -t modules/openapi-generator/src/main/resources/csharp-nancyfx -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -l csharp-nancyfx -o samples/server/petstore/nancyfx-async --additional-properties packageGuid={768B8DC6-54EE-4D40-9B20-7857E1D742A4},asyncServer=true"
|
||||||
|
|
||||||
java $JAVA_OPTS -jar $executable $ags
|
java $JAVA_OPTS -jar $executable $ags
|
||||||
|
@ -26,6 +26,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/nancyfx -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -l nancyfx -o samples/server/petstore/nancyfx --additional-properties packageGuid={768B8DC6-54EE-4D40-9B20-7857E1D742A4},asyncServer=false"
|
ags="generate $@ -t modules/openapi-generator/src/main/resources/csharp-nancyfx -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -l csharp-nancyfx -o samples/server/petstore/nancyfx --additional-properties packageGuid={768B8DC6-54EE-4D40-9B20-7857E1D742A4},asyncServer=false"
|
||||||
|
|
||||||
java $JAVA_OPTS -jar $executable $ags
|
java $JAVA_OPTS -jar $executable $ags
|
||||||
|
31
bin/openapi3/flash-petstore.sh
Executable file
31
bin/openapi3/flash-petstore.sh
Executable file
@ -0,0 +1,31 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
SCRIPT="$0"
|
||||||
|
|
||||||
|
while [ -h "$SCRIPT" ] ; do
|
||||||
|
ls=`ls -ld "$SCRIPT"`
|
||||||
|
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||||
|
if expr "$link" : '/.*' > /dev/null; then
|
||||||
|
SCRIPT="$link"
|
||||||
|
else
|
||||||
|
SCRIPT=`dirname "$SCRIPT"`/"$link"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ ! -d "${APP_DIR}" ]; then
|
||||||
|
APP_DIR=`dirname "$SCRIPT"`/..
|
||||||
|
APP_DIR=`cd "${APP_DIR}"; pwd`
|
||||||
|
fi
|
||||||
|
|
||||||
|
executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar"
|
||||||
|
|
||||||
|
if [ ! -f "$executable" ]
|
||||||
|
then
|
||||||
|
mvn clean package
|
||||||
|
fi
|
||||||
|
|
||||||
|
# if you've executed sbt assembly previously it will use that instead.
|
||||||
|
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
|
||||||
|
ags="$@ generate -t modules/openapi-generator/src/main/resources/flash -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -l flash -o samples/client/petstore/flash -c bin/flash-petstore.json"
|
||||||
|
|
||||||
|
java $JAVA_OPTS -jar $executable $ags
|
31
bin/openapi3/lua-petstore.sh
Executable file
31
bin/openapi3/lua-petstore.sh
Executable file
@ -0,0 +1,31 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
SCRIPT="$0"
|
||||||
|
|
||||||
|
while [ -h "$SCRIPT" ] ; do
|
||||||
|
ls=`ls -ld "$SCRIPT"`
|
||||||
|
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||||
|
if expr "$link" : '/.*' > /dev/null; then
|
||||||
|
SCRIPT="$link"
|
||||||
|
else
|
||||||
|
SCRIPT=`dirname "$SCRIPT"`/"$link"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ ! -d "${APP_DIR}" ]; then
|
||||||
|
APP_DIR=`dirname "$SCRIPT"`/..
|
||||||
|
APP_DIR=`cd "${APP_DIR}"; pwd`
|
||||||
|
fi
|
||||||
|
|
||||||
|
executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar"
|
||||||
|
|
||||||
|
if [ ! -f "$executable" ]
|
||||||
|
then
|
||||||
|
mvn clean package
|
||||||
|
fi
|
||||||
|
|
||||||
|
# if you've executed sbt assembly previously it will use that instead.
|
||||||
|
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
|
||||||
|
ags="generate -t modules/openapi-generator/src/main/resources/lua -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -l lua -o samples/client/petstore/lua -DpackageName=petstore $@"
|
||||||
|
|
||||||
|
java $JAVA_OPTS -jar $executable $ags
|
34
bin/openapi3/perl-petstore.sh
Executable file
34
bin/openapi3/perl-petstore.sh
Executable file
@ -0,0 +1,34 @@
|
|||||||
|
#!/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"
|
||||||
|
# complex module name used for testing
|
||||||
|
ags="$@ generate -i modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml -l perl -o samples/client/petstore/perl -DhideGenerationTimestamp=true"
|
||||||
|
|
||||||
|
java $JAVA_OPTS -jar $executable $ags
|
||||||
|
|
||||||
|
java $JAVA_OPTS -jar $executable $ags --additional-properties moduleName=Something::Deep -o samples/client/petstore/perl/deep_module_test
|
37
bin/openapi3/php-petstore.sh
Executable file
37
bin/openapi3/php-petstore.sh
Executable file
@ -0,0 +1,37 @@
|
|||||||
|
#!/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
|
||||||
|
|
||||||
|
# cleanup tests
|
||||||
|
TEST_DIR="./samples/openapi3/client/petstore/php/SwaggerClient-php/test"
|
||||||
|
if [ -d $TEST_DIR ]; then
|
||||||
|
rm -rf $TEST_DIR
|
||||||
|
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/php -i modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml -l php -o samples/openapi3/client/petstore/php $@"
|
||||||
|
|
||||||
|
java $JAVA_OPTS -jar $executable $ags
|
31
bin/openapi3/powershell-petstore.sh
Executable file
31
bin/openapi3/powershell-petstore.sh
Executable file
@ -0,0 +1,31 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
SCRIPT="$0"
|
||||||
|
|
||||||
|
while [ -h "$SCRIPT" ] ; do
|
||||||
|
ls=`ls -ld "$SCRIPT"`
|
||||||
|
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||||
|
if expr "$link" : '/.*' > /dev/null; then
|
||||||
|
SCRIPT="$link"
|
||||||
|
else
|
||||||
|
SCRIPT=`dirname "$SCRIPT"`/"$link"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ ! -d "${APP_DIR}" ]; then
|
||||||
|
APP_DIR=`dirname "$SCRIPT"`/..
|
||||||
|
APP_DIR=`cd "${APP_DIR}"; pwd`
|
||||||
|
fi
|
||||||
|
|
||||||
|
executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar"
|
||||||
|
|
||||||
|
if [ ! -f "$executable" ]
|
||||||
|
then
|
||||||
|
mvn clean package
|
||||||
|
fi
|
||||||
|
|
||||||
|
# if you've executed sbt assembly previously it will use that instead.
|
||||||
|
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
|
||||||
|
ags="generate -t modules/openapi-generator/src/main/resources/powershell -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -l powershell -o samples/client/petstore/powershell --additional-properties packageGuid=a27b908d-2a20-467f-bc32-af6f3a654ac5,csharpClientPath=\$ScriptDir\..\..\petstore\csharp\SwaggerClient $@"
|
||||||
|
|
||||||
|
java $JAVA_OPTS -jar $executable $ags
|
31
bin/openapi3/qt5-petstore.sh
Executable file
31
bin/openapi3/qt5-petstore.sh
Executable file
@ -0,0 +1,31 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
SCRIPT="$0"
|
||||||
|
|
||||||
|
while [ -h "$SCRIPT" ] ; do
|
||||||
|
ls=`ls -ld "$SCRIPT"`
|
||||||
|
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||||
|
if expr "$link" : '/.*' > /dev/null; then
|
||||||
|
SCRIPT="$link"
|
||||||
|
else
|
||||||
|
SCRIPT=`dirname "$SCRIPT"`/"$link"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ ! -d "${APP_DIR}" ]; then
|
||||||
|
APP_DIR=`dirname "$SCRIPT"`/..
|
||||||
|
APP_DIR=`cd "${APP_DIR}"; pwd`
|
||||||
|
fi
|
||||||
|
|
||||||
|
executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar"
|
||||||
|
|
||||||
|
if [ ! -f "$executable" ]
|
||||||
|
then
|
||||||
|
mvn clean package
|
||||||
|
fi
|
||||||
|
|
||||||
|
# if you've executed sbt assembly previously it will use that instead.
|
||||||
|
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
|
||||||
|
ags="$@ generate -t modules/openapi-generator/src/main/resources/qt5cpp -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -l cpp-qt5 -o samples/client/petstore/qt5cpp"
|
||||||
|
|
||||||
|
java $JAVA_OPTS -jar $executable $ags
|
31
bin/openapi3/r-petstore.sh
Executable file
31
bin/openapi3/r-petstore.sh
Executable file
@ -0,0 +1,31 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
SCRIPT="$0"
|
||||||
|
|
||||||
|
while [ -h "$SCRIPT" ] ; do
|
||||||
|
ls=`ls -ld "$SCRIPT"`
|
||||||
|
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||||
|
if expr "$link" : '/.*' > /dev/null; then
|
||||||
|
SCRIPT="$link"
|
||||||
|
else
|
||||||
|
SCRIPT=`dirname "$SCRIPT"`/"$link"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ ! -d "${APP_DIR}" ]; then
|
||||||
|
APP_DIR=`dirname "$SCRIPT"`/..
|
||||||
|
APP_DIR=`cd "${APP_DIR}"; pwd`
|
||||||
|
fi
|
||||||
|
|
||||||
|
executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar"
|
||||||
|
|
||||||
|
if [ ! -f "$executable" ]
|
||||||
|
then
|
||||||
|
mvn clean package
|
||||||
|
fi
|
||||||
|
|
||||||
|
# if you've executed sbt assembly previously it will use that instead.
|
||||||
|
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
|
||||||
|
ags="generate -t modules/openapi-generator/src/main/resources/r -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -l r -o samples/client/petstore/r_test -DpackageName=petstore $@"
|
||||||
|
|
||||||
|
java $JAVA_OPTS -jar $executable $ags
|
31
bin/openapi3/ruby-petstore.sh
Executable file
31
bin/openapi3/ruby-petstore.sh
Executable file
@ -0,0 +1,31 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
SCRIPT="$0"
|
||||||
|
|
||||||
|
while [ -h "$SCRIPT" ] ; do
|
||||||
|
ls=`ls -ld "$SCRIPT"`
|
||||||
|
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||||
|
if expr "$link" : '/.*' > /dev/null; then
|
||||||
|
SCRIPT="$link"
|
||||||
|
else
|
||||||
|
SCRIPT=`dirname "$SCRIPT"`/"$link"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ ! -d "${APP_DIR}" ]; then
|
||||||
|
APP_DIR=`dirname "$SCRIPT"`/..
|
||||||
|
APP_DIR=`cd "${APP_DIR}"; pwd`
|
||||||
|
fi
|
||||||
|
|
||||||
|
executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar"
|
||||||
|
|
||||||
|
if [ ! -f "$executable" ]
|
||||||
|
then
|
||||||
|
mvn clean package
|
||||||
|
fi
|
||||||
|
|
||||||
|
# if you've executed sbt assembly previously it will use that instead.
|
||||||
|
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
|
||||||
|
ags="generate -t modules/openapi-generator/src/main/resources/ruby -i modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml -l ruby -c bin/ruby-petstore.json -o samples/client/petstore/ruby $@"
|
||||||
|
|
||||||
|
java $JAVA_OPTS -jar $executable $ags
|
37
bin/openapi3/security/php-petstore.sh
Executable file
37
bin/openapi3/security/php-petstore.sh
Executable file
@ -0,0 +1,37 @@
|
|||||||
|
#!/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
|
||||||
|
|
||||||
|
# cleanup tests
|
||||||
|
TEST_DIR="./samples/client/petstore-security-test/php/SwaggerClient-php/test"
|
||||||
|
if [ -d $TEST_DIR ]; then
|
||||||
|
rm -rf $TEST_DIR
|
||||||
|
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/php -i modules/openapi-generator/src/test/resources/3_0/petstore-security-test.yaml -l php -o samples/client/petstore-security-test/php"
|
||||||
|
|
||||||
|
java $JAVA_OPTS -jar $executable $ags
|
31
bin/openapi3/sinatra-petstore-server.sh
Executable file
31
bin/openapi3/sinatra-petstore-server.sh
Executable file
@ -0,0 +1,31 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
SCRIPT="$0"
|
||||||
|
|
||||||
|
while [ -h "$SCRIPT" ] ; do
|
||||||
|
ls=`ls -ld "$SCRIPT"`
|
||||||
|
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||||
|
if expr "$link" : '/.*' > /dev/null; then
|
||||||
|
SCRIPT="$link"
|
||||||
|
else
|
||||||
|
SCRIPT=`dirname "$SCRIPT"`/"$link"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ ! -d "${APP_DIR}" ]; then
|
||||||
|
APP_DIR=`dirname "$SCRIPT"`/..
|
||||||
|
APP_DIR=`cd "${APP_DIR}"; pwd`
|
||||||
|
fi
|
||||||
|
|
||||||
|
executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar"
|
||||||
|
|
||||||
|
if [ ! -f "$executable" ]
|
||||||
|
then
|
||||||
|
mvn clean package
|
||||||
|
fi
|
||||||
|
|
||||||
|
# if you've executed sbt assembly previously it will use that instead.
|
||||||
|
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
|
||||||
|
ags="$@ generate -t modules/openapi-generator/src/main/resources/sinatra -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -l ruby-sinatra -o samples/server/petstore/sinatra"
|
||||||
|
|
||||||
|
java $JAVA_OPTS -jar $executable $ags
|
@ -26,6 +26,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 -l pistache-server -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -o samples/server/petstore/pistache-server"
|
ags="$@ generate -l cpp-pistache-server -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -o samples/server/petstore/pistache-server"
|
||||||
|
|
||||||
java $JAVA_OPTS -jar $executable $ags
|
java $JAVA_OPTS -jar $executable $ags
|
||||||
|
@ -21,7 +21,7 @@ executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar"
|
|||||||
|
|
||||||
if [ ! -f "$executable" ]
|
if [ ! -f "$executable" ]
|
||||||
then
|
then
|
||||||
mvn clean package
|
mvn clean package $@
|
||||||
fi
|
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.
|
||||||
|
@ -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 -t modules/openapi-generator/src/main/resources/flaskConnexion -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -l python-flask -o samples/server/petstore/flaskConnexion -Dservice"
|
ags="generate -t modules/openapi-generator/src/main/resources/flaskConnexion -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -l python-flask -o samples/server/petstore/flaskConnexion -Dservice $@"
|
||||||
|
|
||||||
rm -rf samples/server/petstore/flaskConnexion/*
|
rm -rf samples/server/petstore/flaskConnexion/*
|
||||||
java $JAVA_OPTS -jar $executable $ags
|
java $JAVA_OPTS -jar $executable $ags
|
||||||
|
@ -21,7 +21,7 @@ executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar"
|
|||||||
|
|
||||||
if [ ! -f "$executable" ]
|
if [ ! -f "$executable" ]
|
||||||
then
|
then
|
||||||
mvn clean package
|
mvn clean package $@
|
||||||
fi
|
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.
|
||||||
|
@ -21,7 +21,7 @@ executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar"
|
|||||||
|
|
||||||
if [ ! -f "$executable" ]
|
if [ ! -f "$executable" ]
|
||||||
then
|
then
|
||||||
mvn clean package
|
mvn clean package $@
|
||||||
fi
|
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.
|
||||||
|
@ -26,6 +26,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/qt5cpp -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -l qt5cpp -o samples/client/petstore/qt5cpp"
|
ags="$@ generate -t modules/openapi-generator/src/main/resources/qt5cpp -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -l cpp-qt5 -o samples/client/petstore/qt5cpp"
|
||||||
|
|
||||||
java $JAVA_OPTS -jar $executable $ags
|
java $JAVA_OPTS -jar $executable $ags
|
||||||
|
@ -26,6 +26,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/rails5 -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -l rails5 -o samples/server/petstore/rails5"
|
ags="$@ generate -t modules/openapi-generator/src/main/resources/rails5 -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -l ruby-on-rails -o samples/server/petstore/rails5"
|
||||||
|
|
||||||
java $JAVA_OPTS -jar $executable $ags
|
java $JAVA_OPTS -jar $executable $ags
|
||||||
|
@ -26,6 +26,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 -l restbed -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -o samples/server/petstore/restbed"
|
ags="$@ generate -l cpp-restbed-server -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -o samples/server/petstore/restbed"
|
||||||
|
|
||||||
java $JAVA_OPTS -jar $executable $ags
|
java $JAVA_OPTS -jar $executable $ags
|
||||||
|
@ -12,6 +12,7 @@ for SCRIPT in `ls -l ./bin/*.sh | grep -v all`
|
|||||||
do
|
do
|
||||||
if [ -f $SCRIPT -a -x $SCRIPT ]
|
if [ -f $SCRIPT -a -x $SCRIPT ]
|
||||||
then
|
then
|
||||||
|
echo "Running $SCRIPT"
|
||||||
$SCRIPT
|
$SCRIPT
|
||||||
rc=$?
|
rc=$?
|
||||||
if [[ $rc != 0 ]]
|
if [[ $rc != 0 ]]
|
||||||
|
31
bin/security/typescript-inversify.sh
Executable file
31
bin/security/typescript-inversify.sh
Executable file
@ -0,0 +1,31 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
SCRIPT="$0"
|
||||||
|
|
||||||
|
while [ -h "$SCRIPT" ] ; do
|
||||||
|
ls=`ls -ld "$SCRIPT"`
|
||||||
|
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||||
|
if expr "$link" : '/.*' > /dev/null; then
|
||||||
|
SCRIPT="$link"
|
||||||
|
else
|
||||||
|
SCRIPT=`dirname "$SCRIPT"`/"$link"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ ! -d "${APP_DIR}" ]; then
|
||||||
|
APP_DIR=`dirname "$SCRIPT"`/..
|
||||||
|
APP_DIR=`cd "${APP_DIR}"; pwd`
|
||||||
|
fi
|
||||||
|
|
||||||
|
executable="./modules/swagger-codegen-cli/target/swagger-codegen-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/swagger-codegen/src/main/resources/typescript-inversify -i modules/swagger-codegen/src/test/resources/2_0/petstore-security-test.yaml -l typescript-inversify -o samples/client/petstore-security-test/typescript-inversify"
|
||||||
|
|
||||||
|
java $JAVA_OPTS -jar $executable $ags
|
@ -26,6 +26,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/sinatra -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -l sinatra -o samples/server/petstore/sinatra"
|
ags="$@ generate -t modules/openapi-generator/src/main/resources/sinatra -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -l ruby-sinatra -o samples/server/petstore/sinatra"
|
||||||
|
|
||||||
java $JAVA_OPTS -jar $executable $ags
|
java $JAVA_OPTS -jar $executable $ags
|
||||||
|
@ -26,6 +26,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/slim -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -l slim -o samples/server/petstore/slim"
|
ags="$@ generate -t modules/openapi-generator/src/main/resources/slim -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -l php-slim -o samples/server/petstore/slim"
|
||||||
|
|
||||||
java $JAVA_OPTS -jar $executable $ags
|
java $JAVA_OPTS -jar $executable $ags
|
||||||
|
@ -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 -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 -l spring -o samples/server/petstore/springboot -DhideGenerationTimestamp=true"
|
ags="generate -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 -l spring -o samples/server/petstore/springboot -DhideGenerationTimestamp=true $@"
|
||||||
|
|
||||||
echo "Removing files and folders under samples/server/petstore/springboot/src/main"
|
echo "Removing files and folders under samples/server/petstore/springboot/src/main"
|
||||||
rm -rf samples/server/petstore/springboot/src/main
|
rm -rf samples/server/petstore/springboot/src/main
|
||||||
|
@ -26,15 +26,15 @@ 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/swift -i modules/openapi-generator/src/test/resources/2_0/petstore.json -l swift -c ./bin/swift-petstore.json -o samples/client/petstore/swift/default"
|
ags="$@ generate -t modules/openapi-generator/src/main/resources/swift -i modules/openapi-generator/src/test/resources/2_0/petstore.json -l swift2-deprecated -c ./bin/swift-petstore.json -o samples/client/petstore/swift/default"
|
||||||
|
|
||||||
echo "#### Petstore Swift API client (default) ####"
|
echo "#### Petstore Swift API client (default) ####"
|
||||||
java $JAVA_OPTS -jar $executable $ags
|
java $JAVA_OPTS -jar $executable $ags
|
||||||
|
|
||||||
ags="$@ generate -t modules/openapi-generator/src/main/resources/swift -i modules/openapi-generator/src/test/resources/2_0/petstore.json -l swift -c ./bin/swift-petstore-promisekit.json -o samples/client/petstore/swift/promisekit"
|
ags="$@ generate -t modules/openapi-generator/src/main/resources/swift -i modules/openapi-generator/src/test/resources/2_0/petstore.json -l swift2-deprecated -c ./bin/swift-petstore-promisekit.json -o samples/client/petstore/swift/promisekit"
|
||||||
echo "#### Petstore Swift API client (promisekit) ####"
|
echo "#### Petstore Swift API client (promisekit) ####"
|
||||||
java $JAVA_OPTS -jar $executable $ags
|
java $JAVA_OPTS -jar $executable $ags
|
||||||
|
|
||||||
ags="$@ generate -t modules/openapi-generator/src/main/resources/swift -i modules/openapi-generator/src/test/resources/2_0/petstore.json -l swift -c ./bin/swift-petstore-rxswift.json -o samples/client/petstore/swift/rxswift"
|
ags="$@ generate -t modules/openapi-generator/src/main/resources/swift -i modules/openapi-generator/src/test/resources/2_0/petstore.json -l swift2-deprecated -c ./bin/swift-petstore-rxswift.json -o samples/client/petstore/swift/rxswift"
|
||||||
echo "#### Petstore Swift API client (rxswift) ####"
|
echo "#### Petstore Swift API client (rxswift) ####"
|
||||||
java $JAVA_OPTS -jar $executable $ags
|
java $JAVA_OPTS -jar $executable $ags
|
||||||
|
@ -26,6 +26,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/swift -i modules/openapi-generator/src/test/resources/2_0/petstore.json -l swift -c ./bin/swift-petstore-promisekit.json -o samples/client/petstore/swift/promisekit $@"
|
ags="generate -t modules/openapi-generator/src/main/resources/swift -i modules/openapi-generator/src/test/resources/2_0/petstore.json -l swift2-deprecated -c ./bin/swift-petstore-promisekit.json -o samples/client/petstore/swift/promisekit $@"
|
||||||
|
|
||||||
java $JAVA_OPTS -jar $executable $ags
|
java $JAVA_OPTS -jar $executable $ags
|
||||||
|
@ -26,6 +26,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/swift -i modules/openapi-generator/src/test/resources/2_0/petstore.json -l swift -c ./bin/swift-petstore-rxswift.json -o samples/client/petstore/swift/rxswift $@"
|
ags="generate -t modules/openapi-generator/src/main/resources/swift -i modules/openapi-generator/src/test/resources/2_0/petstore.json -l swift2-deprecated -c ./bin/swift-petstore-rxswift.json -o samples/client/petstore/swift/rxswift $@"
|
||||||
|
|
||||||
java $JAVA_OPTS -jar $executable $ags
|
java $JAVA_OPTS -jar $executable $ags
|
||||||
|
@ -26,6 +26,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/swift -i modules/openapi-generator/src/test/resources/2_0/petstore.json -l swift -c ./bin/swift-petstore.json -o samples/client/petstore/swift/default $@"
|
ags="generate -t modules/openapi-generator/src/main/resources/swift -i modules/openapi-generator/src/test/resources/2_0/petstore.json -l swift2-deprecated -c ./bin/swift-petstore.json -o samples/client/petstore/swift/default $@"
|
||||||
|
|
||||||
java $JAVA_OPTS -jar $executable $ags
|
java $JAVA_OPTS -jar $executable $ags
|
||||||
|
@ -26,6 +26,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/swift4 -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -l swift4 -c ./bin/swift4-petstore.json -o samples/client/petstore/swift4/default"
|
ags="generate -t modules/openapi-generator/src/main/resources/swift4 -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -l swift4 -c ./bin/swift4-petstore.json -o samples/client/petstore/swift4/default $@"
|
||||||
|
|
||||||
java $JAVA_OPTS -jar $executable $ags
|
java $JAVA_OPTS -jar $executable $ags
|
||||||
|
@ -26,6 +26,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/tizen -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -l tizen -o samples/client/petstore/tizen"
|
ags="$@ generate -t modules/openapi-generator/src/main/resources/tizen -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -l cpp-tizen -o samples/client/petstore/tizen"
|
||||||
|
|
||||||
java $JAVA_OPTS -jar $executable $ags
|
java $JAVA_OPTS -jar $executable $ags
|
||||||
|
@ -26,6 +26,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 -l typescript-angular -o samples/client/petstore/typescript-angular-v2/default --additional-properties ngVersion=2"
|
ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -l typescript-angular -o samples/client/petstore/typescript-angular-v2/default --additional-properties ngVersion=2 $@"
|
||||||
|
|
||||||
java $JAVA_OPTS -jar $executable $ags
|
java $JAVA_OPTS -jar $executable $ags
|
||||||
|
@ -2,4 +2,5 @@
|
|||||||
|
|
||||||
./bin/typescript-fetch-petstore-target-es6.sh
|
./bin/typescript-fetch-petstore-target-es6.sh
|
||||||
./bin/typescript-fetch-petstore-with-npm-version.sh
|
./bin/typescript-fetch-petstore-with-npm-version.sh
|
||||||
|
./bin/typescript-fetch-petstore-interfaces.sh
|
||||||
./bin/typescript-fetch-petstore.sh
|
./bin/typescript-fetch-petstore.sh
|
||||||
|
31
bin/typescript-fetch-petstore-interfaces.sh
Executable file
31
bin/typescript-fetch-petstore-interfaces.sh
Executable file
@ -0,0 +1,31 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
SCRIPT="$0"
|
||||||
|
|
||||||
|
while [ -h "$SCRIPT" ] ; do
|
||||||
|
ls=`ls -ld "$SCRIPT"`
|
||||||
|
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||||
|
if expr "$link" : '/.*' > /dev/null; then
|
||||||
|
SCRIPT="$link"
|
||||||
|
else
|
||||||
|
SCRIPT=`dirname "$SCRIPT"`/"$link"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ ! -d "${APP_DIR}" ]; then
|
||||||
|
APP_DIR=`dirname "$SCRIPT"`/..
|
||||||
|
APP_DIR=`cd "${APP_DIR}"; pwd`
|
||||||
|
fi
|
||||||
|
|
||||||
|
executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar"
|
||||||
|
|
||||||
|
if [ ! -f "$executable" ]
|
||||||
|
then
|
||||||
|
mvn clean package
|
||||||
|
fi
|
||||||
|
|
||||||
|
# if you've executed sbt assembly previously it will use that instead.
|
||||||
|
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
|
||||||
|
ags="$@ generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -l typescript-fetch -o samples/client/petstore/typescript-fetch/builds/with-interfaces -D withInterfaces=true"
|
||||||
|
|
||||||
|
java $JAVA_OPTS -jar $executable $ags
|
31
bin/typescript-inversify-petstore.sh
Executable file
31
bin/typescript-inversify-petstore.sh
Executable file
@ -0,0 +1,31 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
SCRIPT="$0"
|
||||||
|
|
||||||
|
while [ -h "$SCRIPT" ] ; do
|
||||||
|
ls=`ls -ld "$SCRIPT"`
|
||||||
|
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||||
|
if expr "$link" : '/.*' > /dev/null; then
|
||||||
|
SCRIPT="$link"
|
||||||
|
else
|
||||||
|
SCRIPT=`dirname "$SCRIPT"`/"$link"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ ! -d "${APP_DIR}" ]; then
|
||||||
|
APP_DIR=`dirname "$SCRIPT"`/..
|
||||||
|
APP_DIR=`cd "${APP_DIR}"; pwd`
|
||||||
|
fi
|
||||||
|
|
||||||
|
executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar"
|
||||||
|
|
||||||
|
if [ ! -f "$executable" ]
|
||||||
|
then
|
||||||
|
mvn clean package
|
||||||
|
fi
|
||||||
|
|
||||||
|
# if you've executed sbt assembly previously it will use that instead.
|
||||||
|
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
|
||||||
|
ags="$@ generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -l typescript-inversify -o samples/client/petstore/typescript-inversify"
|
||||||
|
|
||||||
|
java $JAVA_OPTS -jar $executable $ags
|
@ -10,7 +10,7 @@ fi
|
|||||||
|
|
||||||
|
|
||||||
# grep for \r in the generators
|
# grep for \r in the generators
|
||||||
grep -RUIl $'\r$' modules/openapi-generator/src/main/java/io/swagger/codegen/*.java
|
grep -RUIl $'\r$' modules/openapi-generator/src/main/java/org/openapitools/codegen/*.java
|
||||||
|
|
||||||
if [ $? -ne 1 ]; then
|
if [ $? -ne 1 ]; then
|
||||||
echo "Generators contain carriage return '/r'. Please remove it and try again."
|
echo "Generators contain carriage return '/r'. Please remove it and try again."
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# grep for '<<<<<<< HEAD' in swagger codegen
|
# grep for '<<<<<<< HEAD' in openapi generator
|
||||||
grep -RUIl '<<<<<<< HEAD' modules/openapi-generator/src
|
grep -RUIl '<<<<<<< HEAD' modules/openapi-generator/src
|
||||||
|
|
||||||
if [ $? -ne 1 ]; then
|
if [ $? -ne 1 ]; then
|
||||||
|
@ -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 -l cpprest -o samples\client\petstore\cpprest
|
set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -l cpp-restsdk -o samples\client\petstore\cpprest
|
||||||
|
|
||||||
java %JAVA_OPTS% -jar %executable% %ags%
|
java %JAVA_OPTS% -jar %executable% %ags%
|
||||||
|
10
bin/windows/jaxrs-cxf-petstore-server.bat
Normal file
10
bin/windows/jaxrs-cxf-petstore-server.bat
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
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 -t modules\swagger-codegen\src\main\resources\JavaJaxRS\cxf -i modules\swagger-codegen\src\test\resources\2_0\petstore-with-fake-endpoints-models-for-testing.yaml -l jaxrs-cxf -o samples\server\petstore\jaxrs-cxf -DhideGenerationTimestamp=true
|
||||||
|
|
||||||
|
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 -l nancyfx -o samples\server\petstore\nancyfx\
|
set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -l csharp-nancyfx -o samples\server\petstore\nancyfx\
|
||||||
|
|
||||||
java %JAVA_OPTS% -jar %executable% %ags%
|
java %JAVA_OPTS% -jar %executable% %ags%
|
||||||
|
10
bin/windows/pistache-server-petstore.bat
Normal file
10
bin/windows/pistache-server-petstore.bat
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
set executable=.\modules\openapi-generator-cli\target\openapi-generator-cli.jar
|
||||||
|
|
||||||
|
If Not Exist %executable% (
|
||||||
|
mvn clean package
|
||||||
|
)
|
||||||
|
|
||||||
|
REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -DloggerPath=conf/log4j.properties
|
||||||
|
set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -l cpp-pistache-server -o samples\server\petstore\pistache-server\
|
||||||
|
|
||||||
|
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.yaml -l qt5cpp -o samples\client\petstore\qt5cpp
|
set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -l cpp-qt5 -o samples\client\petstore\qt5cpp
|
||||||
|
|
||||||
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 -l restbed -o samples\server\petstore\restbed\
|
set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -l cpp-restbed-server -o samples\server\petstore\restbed\
|
||||||
|
|
||||||
java %JAVA_OPTS% -jar %executable% %ags%
|
java %JAVA_OPTS% -jar %executable% %ags%
|
||||||
|
@ -3,3 +3,4 @@
|
|||||||
call bin\windows\typescript-fetch-petstore.bat
|
call bin\windows\typescript-fetch-petstore.bat
|
||||||
call bin\windows\typescript-fetch-petstore-target-es6.bat
|
call bin\windows\typescript-fetch-petstore-target-es6.bat
|
||||||
call bin\windows\typescript-fetch-petstore-with-npm-version.bat
|
call bin\windows\typescript-fetch-petstore-with-npm-version.bat
|
||||||
|
call bin\windows\typescript-fetch-petstore-interfaces.bat
|
||||||
|
12
bin/windows/typescript-fetch-petstore-interfaces.bat
Normal file
12
bin/windows/typescript-fetch-petstore-interfaces.bat
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
@ECHO OFF
|
||||||
|
|
||||||
|
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
|
||||||
|
set ags=generate -i modules\swagger-codegen\src\test\resources\2_0\petstore.yaml -l typescript-fetch -o samples\client\petstore\typescript-fetch\builds\with-interfaces -D withInterfaces=true
|
||||||
|
|
||||||
|
java %JAVA_OPTS% -jar %executable% %ags%
|
14
bin/windows/typescript-inversify-petstore.bat
Normal file
14
bin/windows/typescript-inversify-petstore.bat
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
@ECHO OFF
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
echo
|
||||||
|
set ags=generate -i modules\swagger-codegen\src\test\resources\2_0\petstore.yaml -l typescript-inversify -o samples\client\petstore\typescript-inversify\builds\default
|
||||||
|
|
||||||
|
java %JAVA_OPTS% -jar %executable% %ags%
|
10
bin/windows/typescript-inversify.bat
Executable file
10
bin/windows/typescript-inversify.bat
Executable file
@ -0,0 +1,10 @@
|
|||||||
|
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
|
||||||
|
set ags=generate -i modules\swagger-codegen\src\test\resources\2_0\petstore.yaml -l typescript-inversify -o samples\client\petstore\typescript-inversify
|
||||||
|
|
||||||
|
java %JAVA_OPTS% -jar %executable% %ags%
|
@ -26,6 +26,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/ze-ph -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -l ze-ph -o samples/server/petstore/ze-ph"
|
ags="$@ generate -t modules/openapi-generator/src/main/resources/ze-ph -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -l php-ze-ph -o samples/server/petstore/ze-ph"
|
||||||
|
|
||||||
java $JAVA_OPTS -jar $executable $ags
|
java $JAVA_OPTS -jar $executable $ags
|
||||||
|
@ -15,6 +15,7 @@ dependencies:
|
|||||||
cache_directories:
|
cache_directories:
|
||||||
- "~/.m2"
|
- "~/.m2"
|
||||||
- "~/.sbt"
|
- "~/.sbt"
|
||||||
|
- "~/.iv2/cache"
|
||||||
|
|
||||||
pre:
|
pre:
|
||||||
- sudo add-apt-repository ppa:duggan/bats --yes
|
- sudo add-apt-repository ppa:duggan/bats --yes
|
||||||
|
@ -3,18 +3,18 @@
|
|||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
# GEN_DIR allows to share the entrypoint between Dockerfile and run-in-docker.sh (backward compatible)
|
# GEN_DIR allows to share the entrypoint between Dockerfile and run-in-docker.sh (backward compatible)
|
||||||
GEN_DIR=${GEN_DIR:-/opt/swagger-codegen}
|
GEN_DIR=${GEN_DIR:-/opt/openapi-generator}
|
||||||
JAVA_OPTS=${JAVA_OPTS:-"-Xmx1024M -DloggerPath=conf/log4j.properties"}
|
JAVA_OPTS=${JAVA_OPTS:-"-Xmx1024M -DloggerPath=conf/log4j.properties"}
|
||||||
|
|
||||||
cli="${GEN_DIR}/modules/swagger-codegen-cli"
|
cli="${GEN_DIR}/modules/openapi-generator-cli"
|
||||||
codegen="${cli}/target/swagger-codegen-cli.jar"
|
codegen="${cli}/target/openapi-generator-cli.jar"
|
||||||
cmdsrc="${cli}/src/main/java/io/swagger/codegen/cmd"
|
cmdsrc="${cli}/src/main/java/org/openapitools/codegen/cmd"
|
||||||
|
|
||||||
pattern="@Command(name = \"$1\""
|
pattern="@Command(name = \"$1\""
|
||||||
if expr "x$1" : 'x[a-z][a-z-]*$' > /dev/null && fgrep -qe "$pattern" "$cmdsrc"/*.java || expr "$1" = 'help' > /dev/null; then
|
if expr "x$1" : 'x[a-z][a-z-]*$' > /dev/null && fgrep -qe "$pattern" "$cmdsrc"/*.java || expr "$1" = 'help' > /dev/null; then
|
||||||
# If ${GEN_DIR} has been mapped elsewhere from default, and that location has not been built
|
# If ${GEN_DIR} has been mapped elsewhere from default, and that location has not been built
|
||||||
if [[ ! -f "${codegen}" ]]; then
|
if [[ ! -f "${codegen}" ]]; then
|
||||||
(cd "${GEN_DIR}" && exec mvn -am -pl "modules/swagger-codegen-cli" -Duser.home=$(dirname MAVEN_CONFIG) package)
|
(cd "${GEN_DIR}" && exec mvn -am -pl "modules/openapi-generator-cli" -Duser.home=$(dirname MAVEN_CONFIG) package)
|
||||||
fi
|
fi
|
||||||
command=$1
|
command=$1
|
||||||
shift
|
shift
|
||||||
|
@ -11,12 +11,12 @@ import static java.util.ServiceLoader.load;
|
|||||||
/**
|
/**
|
||||||
* User: lanwen Date: 24.03.15 Time: 20:25
|
* User: lanwen Date: 24.03.15 Time: 20:25
|
||||||
*/
|
*/
|
||||||
@Command(name = "langs", description = "Shows available langs")
|
@Command(name = "langs", description = "Shows available languages (generators)")
|
||||||
public class Langs implements Runnable {
|
public class Langs implements Runnable {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
LambdaIterable<String> langs =
|
LambdaIterable<String> langs =
|
||||||
with(load(CodegenConfig.class)).extract(on(CodegenConfig.class).getName());
|
with(load(CodegenConfig.class)).extract(on(CodegenConfig.class).getName());
|
||||||
System.out.printf("Available languages: %s%n", langs);
|
System.out.printf("Available languages (generators): %s%n", langs);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1 @@
|
|||||||
|
version = ${project.version}
|
@ -1,7 +1,7 @@
|
|||||||
swagger-codegen-maven-plugin
|
openapi-generator-maven-plugin
|
||||||
============================
|
============================
|
||||||
|
|
||||||
A Maven plugin to support the [swagger](http://swagger.io) code generation project
|
A Maven plugin to support the OpenAPI generator project
|
||||||
|
|
||||||
Usage
|
Usage
|
||||||
============================
|
============================
|
||||||
@ -9,8 +9,8 @@ Usage
|
|||||||
Add to your `build->plugins` section (default phase is `generate-sources` phase)
|
Add to your `build->plugins` section (default phase is `generate-sources` phase)
|
||||||
```xml
|
```xml
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>io.swagger</groupId>
|
<groupId>org.openapitools</groupId>
|
||||||
<artifactId>swagger-codegen-maven-plugin</artifactId>
|
<artifactId>openapi-generator-maven-plugin</artifactId>
|
||||||
<version>2.3.1</version>
|
<version>2.3.1</version>
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
@ -18,7 +18,7 @@ Add to your `build->plugins` section (default phase is `generate-sources` phase)
|
|||||||
<goal>generate</goal>
|
<goal>generate</goal>
|
||||||
</goals>
|
</goals>
|
||||||
<configuration>
|
<configuration>
|
||||||
<inputSpec>src/main/resources/api.yaml</inputSpec>
|
<inputSpec>${project.basedir}/src/main/resources/api.yaml</inputSpec>
|
||||||
<language>java</language>
|
<language>java</language>
|
||||||
<configOptions>
|
<configOptions>
|
||||||
<sourceFolder>src/gen/java/main</sourceFolder>
|
<sourceFolder>src/gen/java/main</sourceFolder>
|
||||||
@ -49,7 +49,7 @@ mvn clean compile
|
|||||||
- `withXml` - enable XML annotations inside the generated models and API (only works with Java `language` and libraries that provide support for JSON and XML)
|
- `withXml` - enable XML annotations inside the generated models and API (only works with Java `language` and libraries that provide support for JSON and XML)
|
||||||
- `configOptions` - a map of language-specific parameters (see below)
|
- `configOptions` - a map of language-specific parameters (see below)
|
||||||
- `configHelp` - dumps the configuration help for the specified library (generates no sources)
|
- `configHelp` - dumps the configuration help for the specified library (generates no sources)
|
||||||
- `ignoreFileOverride` - specifies the full path to a `.swagger-codegen-ignore` used for pattern based overrides of generated outputs
|
- `ignoreFileOverride` - specifies the full path to a `.openapi-generator-ignore` used for pattern based overrides of generated outputs
|
||||||
- `generateApis` - generate the apis (`true` by default)
|
- `generateApis` - generate the apis (`true` by default)
|
||||||
- `generateApiTests` - generate the api tests (`true` by default. Only available if `generateApis` is `true`)
|
- `generateApiTests` - generate the api tests (`true` by default. Only available if `generateApis` is `true`)
|
||||||
- `generateApiDocumentation` - generate the api documentation (`true` by default. Only available if `generateApis` is `true`)
|
- `generateApiDocumentation` - generate the api documentation (`true` by default. Only available if `generateApis` is `true`)
|
||||||
@ -67,17 +67,17 @@ Specifying a custom generator is a bit different. It doesn't support the classpa
|
|||||||
|
|
||||||
```xml
|
```xml
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>io.swagger</groupId>
|
<groupId>org.openapitools</groupId>
|
||||||
<artifactId>swagger-codegen-maven-plugin</artifactId>
|
<artifactId>openapi-generator-maven-plugin</artifactId>
|
||||||
<version>${swagger-codegen-maven-plugin-version}</version>
|
<version>${openapi-generator-maven-plugin-version}</version>
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
<goals>
|
<goals>
|
||||||
<goal>generate</goal>
|
<goal>generate</goal>
|
||||||
</goals>
|
</goals>
|
||||||
<configuration>
|
<configuration>
|
||||||
<inputSpec>src/main/resources/yaml/yamlfilename.yaml</inputSpec>
|
<inputSpec>${project.basedir}/src/main/resources/yaml/yamlfilename.yaml</inputSpec>
|
||||||
<!-- language file, like e.g. JavaJaxRSCodegen shipped with swagger -->
|
<!-- language file, like e.g. JavaJaxRSCodegen -->
|
||||||
<language>com.my.package.for.GeneratorLanguage</language>
|
<language>com.my.package.for.GeneratorLanguage</language>
|
||||||
<templateDirectory>myTemplateDir</templateDirectory>
|
<templateDirectory>myTemplateDir</templateDirectory>
|
||||||
|
|
@ -1,6 +1,6 @@
|
|||||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>io.swagger</groupId>
|
<groupId>org.openapitools</groupId>
|
||||||
<artifactId>sample-project</artifactId>
|
<artifactId>sample-project</artifactId>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
<version>1.0-SNAPSHOT</version>
|
<version>1.0-SNAPSHOT</version>
|
||||||
@ -10,9 +10,9 @@
|
|||||||
<plugins>
|
<plugins>
|
||||||
<!-- activate the plugin -->
|
<!-- activate the plugin -->
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>io.swagger</groupId>
|
<groupId>org.openapitools</groupId>
|
||||||
<artifactId>swagger-codegen-maven-plugin</artifactId>
|
<artifactId>openapi-generator-maven-plugin</artifactId>
|
||||||
<version>2.2.2-SNAPSHOT</version>
|
<version>2.4.0-SNAPSHOT</version>
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
<goals>
|
<goals>
|
||||||
@ -45,7 +45,7 @@
|
|||||||
<!-- dependencies are needed for the client being generated -->
|
<!-- dependencies are needed for the client being generated -->
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>io.swagger</groupId>
|
<groupId>org.openapitools</groupId>
|
||||||
<artifactId>swagger-annotations</artifactId>
|
<artifactId>swagger-annotations</artifactId>
|
||||||
<version>${swagger-annotations-version}</version>
|
<version>${swagger-annotations-version}</version>
|
||||||
</dependency>
|
</dependency>
|
@ -2,15 +2,15 @@
|
|||||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>io.swagger</groupId>
|
<groupId>org.openapitools</groupId>
|
||||||
<artifactId>swagger-codegen-project</artifactId>
|
<artifactId>openapi-generator-project</artifactId>
|
||||||
<version>2.4.0-SNAPSHOT</version>
|
<version>3.0.0-SNAPSHOT</version>
|
||||||
<relativePath>../..</relativePath>
|
<relativePath>../..</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>swagger-codegen-maven-plugin</artifactId>
|
<artifactId>openapi-generator-maven-plugin</artifactId>
|
||||||
<name>swagger-codegen (maven-plugin)</name>
|
<name>openapi-generator (maven-plugin)</name>
|
||||||
<packaging>maven-plugin</packaging>
|
<packaging>maven-plugin</packaging>
|
||||||
<description>maven plugin to build modules from swagger codegen</description>
|
<description>maven plugin to build modules from openapi generator</description>
|
||||||
<prerequisites>
|
<prerequisites>
|
||||||
<maven>3.2.5</maven>
|
<maven>3.2.5</maven>
|
||||||
</prerequisites>
|
</prerequisites>
|
||||||
@ -45,8 +45,8 @@
|
|||||||
<version>3.4</version>
|
<version>3.4</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>io.swagger</groupId>
|
<groupId>org.openapitools</groupId>
|
||||||
<artifactId>swagger-codegen</artifactId>
|
<artifactId>openapi-generator</artifactId>
|
||||||
<version>${project.version}</version>
|
<version>${project.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
@ -89,7 +89,7 @@
|
|||||||
<groupId>net.revelc.code</groupId>
|
<groupId>net.revelc.code</groupId>
|
||||||
<artifactId>formatter-maven-plugin</artifactId>
|
<artifactId>formatter-maven-plugin</artifactId>
|
||||||
<configuration>
|
<configuration>
|
||||||
<!-- Point at the eclipse-formatter.xml in the swagger-codegen parent project directory -->
|
<!-- Point at the eclipse-formatter.xml in the parent project directory -->
|
||||||
<configFile>${project.basedir}${file.separator}${project.parent.relativePath}${file.separator}eclipse-formatter.xml</configFile>
|
<configFile>${project.basedir}${file.separator}${project.parent.relativePath}${file.separator}eclipse-formatter.xml</configFile>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
@ -1,4 +1,4 @@
|
|||||||
package io.swagger.codegen.plugin;
|
package org.openapitools.codegen.plugin;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright 2001-2005 The Apache Software Foundation.
|
* Copyright 2001-2005 The Apache Software Foundation.
|
||||||
@ -14,18 +14,18 @@ package io.swagger.codegen.plugin;
|
|||||||
* the License.
|
* the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import static io.swagger.codegen.config.CodegenConfiguratorUtils.applyAdditionalPropertiesKvp;
|
import static org.openapitools.codegen.config.CodegenConfiguratorUtils.applyAdditionalPropertiesKvp;
|
||||||
import static io.swagger.codegen.config.CodegenConfiguratorUtils.applyImportMappingsKvp;
|
import static org.openapitools.codegen.config.CodegenConfiguratorUtils.applyImportMappingsKvp;
|
||||||
import static io.swagger.codegen.config.CodegenConfiguratorUtils.applyInstantiationTypesKvp;
|
import static org.openapitools.codegen.config.CodegenConfiguratorUtils.applyInstantiationTypesKvp;
|
||||||
import static io.swagger.codegen.config.CodegenConfiguratorUtils.applyLanguageSpecificPrimitivesCsv;
|
import static org.openapitools.codegen.config.CodegenConfiguratorUtils.applyLanguageSpecificPrimitivesCsv;
|
||||||
import static io.swagger.codegen.config.CodegenConfiguratorUtils.applyTypeMappingsKvp;
|
import static org.openapitools.codegen.config.CodegenConfiguratorUtils.applyTypeMappingsKvp;
|
||||||
import static io.swagger.codegen.config.CodegenConfiguratorUtils.applyReservedWordsMappingsKvp;
|
import static org.openapitools.codegen.config.CodegenConfiguratorUtils.applyReservedWordsMappingsKvp;
|
||||||
import static io.swagger.codegen.config.CodegenConfiguratorUtils.applyAdditionalPropertiesKvpList;
|
import static org.openapitools.codegen.config.CodegenConfiguratorUtils.applyAdditionalPropertiesKvpList;
|
||||||
import static io.swagger.codegen.config.CodegenConfiguratorUtils.applyImportMappingsKvpList;
|
import static org.openapitools.codegen.config.CodegenConfiguratorUtils.applyImportMappingsKvpList;
|
||||||
import static io.swagger.codegen.config.CodegenConfiguratorUtils.applyInstantiationTypesKvpList;
|
import static org.openapitools.codegen.config.CodegenConfiguratorUtils.applyInstantiationTypesKvpList;
|
||||||
import static io.swagger.codegen.config.CodegenConfiguratorUtils.applyLanguageSpecificPrimitivesCsvList;
|
import static org.openapitools.codegen.config.CodegenConfiguratorUtils.applyLanguageSpecificPrimitivesCsvList;
|
||||||
import static io.swagger.codegen.config.CodegenConfiguratorUtils.applyTypeMappingsKvpList;
|
import static org.openapitools.codegen.config.CodegenConfiguratorUtils.applyTypeMappingsKvpList;
|
||||||
import static io.swagger.codegen.config.CodegenConfiguratorUtils.applyReservedWordsMappingsKvpList;
|
import static org.openapitools.codegen.config.CodegenConfiguratorUtils.applyReservedWordsMappingsKvpList;
|
||||||
import static org.apache.commons.lang3.StringUtils.isNotEmpty;
|
import static org.apache.commons.lang3.StringUtils.isNotEmpty;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
@ -40,15 +40,15 @@ import org.apache.maven.plugins.annotations.Mojo;
|
|||||||
import org.apache.maven.plugins.annotations.Parameter;
|
import org.apache.maven.plugins.annotations.Parameter;
|
||||||
import org.apache.maven.project.MavenProject;
|
import org.apache.maven.project.MavenProject;
|
||||||
|
|
||||||
import io.swagger.codegen.CliOption;
|
import org.openapitools.codegen.CliOption;
|
||||||
import io.swagger.codegen.ClientOptInput;
|
import org.openapitools.codegen.ClientOptInput;
|
||||||
import io.swagger.codegen.CodegenConfig;
|
import org.openapitools.codegen.CodegenConfig;
|
||||||
import io.swagger.codegen.CodegenConstants;
|
import org.openapitools.codegen.CodegenConstants;
|
||||||
import io.swagger.codegen.DefaultGenerator;
|
import org.openapitools.codegen.DefaultGenerator;
|
||||||
import io.swagger.codegen.config.CodegenConfigurator;
|
import org.openapitools.codegen.config.CodegenConfigurator;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Goal which generates client/server code from a swagger json/yaml definition.
|
* Goal which generates client/server code from a OpenAPI json/yaml definition.
|
||||||
*/
|
*/
|
||||||
@Mojo(name = "generate", defaultPhase = LifecyclePhase.GENERATE_SOURCES)
|
@Mojo(name = "generate", defaultPhase = LifecyclePhase.GENERATE_SOURCES)
|
||||||
public class CodeGenMojo extends AbstractMojo {
|
public class CodeGenMojo extends AbstractMojo {
|
||||||
@ -65,12 +65,12 @@ public class CodeGenMojo extends AbstractMojo {
|
|||||||
/**
|
/**
|
||||||
* Location of the output directory.
|
* Location of the output directory.
|
||||||
*/
|
*/
|
||||||
@Parameter(name = "output", property = "swagger.codegen.maven.plugin.output",
|
@Parameter(name = "output", property = "openapi.generator.maven.plugin.output",
|
||||||
defaultValue = "${project.build.directory}/generated-sources/swagger")
|
defaultValue = "${project.build.directory}/generated-sources/openapi")
|
||||||
private File output;
|
private File output;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Location of the swagger spec, as URL or file.
|
* Location of the OpenAPI spec, as URL or file.
|
||||||
*/
|
*/
|
||||||
@Parameter(name = "inputSpec", required = true)
|
@Parameter(name = "inputSpec", required = true)
|
||||||
private String inputSpec;
|
private String inputSpec;
|
||||||
@ -82,7 +82,7 @@ public class CodeGenMojo extends AbstractMojo {
|
|||||||
private String gitUserId;
|
private String gitUserId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Git repo ID, e.g. swagger-codegen.
|
* Git repo ID, e.g. openapi-generator.
|
||||||
*/
|
*/
|
||||||
@Parameter(name = "gitRepoId", required = false)
|
@Parameter(name = "gitRepoId", required = false)
|
||||||
private String gitRepoId;
|
private String gitRepoId;
|
@ -2,14 +2,14 @@
|
|||||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>io.swagger</groupId>
|
<groupId>org.openapitools</groupId>
|
||||||
<artifactId>swagger-codegen-project</artifactId>
|
<artifactId>openapi-generator-project</artifactId>
|
||||||
<version>2.4.0-SNAPSHOT</version>
|
<version>3.0.0-SNAPSHOT</version>
|
||||||
<relativePath>../..</relativePath>
|
<relativePath>../..</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>swagger-generator</artifactId>
|
<artifactId>openapi-generator-online</artifactId>
|
||||||
<packaging>war</packaging>
|
<packaging>war</packaging>
|
||||||
<name>swagger-generator</name>
|
<name>openapi-generator-online</name>
|
||||||
<build>
|
<build>
|
||||||
<sourceDirectory>src/main/java</sourceDirectory>
|
<sourceDirectory>src/main/java</sourceDirectory>
|
||||||
<resources>
|
<resources>
|
||||||
@ -133,16 +133,16 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>io.swagger</groupId>
|
<groupId>io.swagger</groupId>
|
||||||
<artifactId>swagger-jersey2-jaxrs</artifactId>
|
<artifactId>swagger-jersey2-jaxrs</artifactId>
|
||||||
<version>${swagger-core-version}</version>
|
<version>1.5.18</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>io.swagger</groupId>
|
<groupId>org.openapitools</groupId>
|
||||||
<artifactId>swagger-codegen</artifactId>
|
<artifactId>openapi-generator</artifactId>
|
||||||
<version>${project.parent.version}</version>
|
<version>${project.parent.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>io.swagger</groupId>
|
<groupId>org.openapitools</groupId>
|
||||||
<artifactId>swagger-codegen</artifactId>
|
<artifactId>openapi-generator</artifactId>
|
||||||
<version>${project.parent.version}</version>
|
<version>${project.parent.version}</version>
|
||||||
<type>test-jar</type>
|
<type>test-jar</type>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
@ -12,7 +12,7 @@
|
|||||||
* the License.
|
* the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package io.swagger.generator;
|
package org.openapitools.codegen.online;
|
||||||
|
|
||||||
import org.apache.commons.io.IOUtils;
|
import org.apache.commons.io.IOUtils;
|
||||||
|
|
||||||
@ -29,11 +29,11 @@ public class Bootstrap extends HttpServlet {
|
|||||||
public void init(ServletConfig config) throws ServletException {
|
public void init(ServletConfig config) throws ServletException {
|
||||||
DynamicSwaggerConfig bc = new DynamicSwaggerConfig();
|
DynamicSwaggerConfig bc = new DynamicSwaggerConfig();
|
||||||
bc.setBasePath("/api");
|
bc.setBasePath("/api");
|
||||||
bc.setTitle("Swagger Generator");
|
bc.setTitle("OpenAPI Generator");
|
||||||
bc.setDescription("This is an online swagger codegen server. You can find out more "
|
bc.setDescription("This is an online OpenAPI generator. You can find out more "
|
||||||
+ "at https://github.com/swagger-api/swagger-codegen or on [irc.freenode.net, #swagger](http://swagger.io/irc/).");
|
+ "at https://github.com/openapi-tools/openapi-generator");
|
||||||
bc.setTermsOfServiceUrl("http://swagger.io/terms/");
|
bc.setTermsOfServiceUrl("https://www.apache.org/licenses/LICENSE-2.0");
|
||||||
bc.setContact("apiteam@swagger.io");
|
bc.setContact("openapi-generator@gmail.com");
|
||||||
bc.setLicense("Apache 2.0");
|
bc.setLicense("Apache 2.0");
|
||||||
InputStream stream = getClass().getResourceAsStream("/version.prop");
|
InputStream stream = getClass().getResourceAsStream("/version.prop");
|
||||||
if (stream == null) {
|
if (stream == null) {
|
||||||
@ -48,7 +48,7 @@ public class Bootstrap extends HttpServlet {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bc.setLicenseUrl("http://www.apache.org/licenses/LICENSE-2.0.html");
|
bc.setLicenseUrl("http://www.apache.org/licenses/LICENSE-2.0.html");
|
||||||
bc.setResourcePackage("io.swagger.generator.resource");
|
bc.setResourcePackage("org.openapitools.codegen.online.resource");
|
||||||
bc.setScan(true);
|
bc.setScan(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,8 +1,8 @@
|
|||||||
package io.swagger.generator;
|
package org.openapitools.codegen.online;
|
||||||
|
|
||||||
import io.swagger.codegen.Codegen;
|
import org.openapitools.codegen.Codegen;
|
||||||
import io.swagger.codegen.CodegenConfig;
|
import org.openapitools.codegen.CodegenConfig;
|
||||||
import io.swagger.codegen.CodegenType;
|
import org.openapitools.codegen.CodegenType;
|
||||||
import io.swagger.jaxrs.config.BeanConfig;
|
import io.swagger.jaxrs.config.BeanConfig;
|
||||||
import io.swagger.models.Operation;
|
import io.swagger.models.Operation;
|
||||||
import io.swagger.models.Path;
|
import io.swagger.models.Path;
|
@ -12,7 +12,7 @@
|
|||||||
* the License.
|
* the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package io.swagger.generator.exception;
|
package org.openapitools.codegen.online.exception;
|
||||||
|
|
||||||
public class ApiException extends Exception {
|
public class ApiException extends Exception {
|
||||||
private static final long serialVersionUID = -5085112752305370687L;
|
private static final long serialVersionUID = -5085112752305370687L;
|
@ -12,7 +12,7 @@
|
|||||||
* the License.
|
* the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package io.swagger.generator.exception;
|
package org.openapitools.codegen.online.exception;
|
||||||
|
|
||||||
import org.apache.http.HttpStatus;
|
import org.apache.http.HttpStatus;
|
||||||
|
|
@ -12,7 +12,7 @@
|
|||||||
* the License.
|
* the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package io.swagger.generator.exception;
|
package org.openapitools.codegen.online.exception;
|
||||||
|
|
||||||
import org.apache.http.HttpStatus;
|
import org.apache.http.HttpStatus;
|
||||||
|
|
@ -1,12 +1,12 @@
|
|||||||
package io.swagger.generator.online;
|
package org.openapitools.codegen.online.http;
|
||||||
|
|
||||||
import com.fasterxml.jackson.databind.JsonNode;
|
import com.fasterxml.jackson.databind.JsonNode;
|
||||||
import io.swagger.codegen.*;
|
import org.openapitools.codegen.*;
|
||||||
import io.swagger.generator.exception.ApiException;
|
import org.openapitools.codegen.online.exception.ApiException;
|
||||||
import io.swagger.generator.exception.BadRequestException;
|
import org.openapitools.codegen.online.exception.BadRequestException;
|
||||||
import io.swagger.generator.model.GeneratorInput;
|
import org.openapitools.codegen.online.model.GeneratorInput;
|
||||||
import io.swagger.generator.model.InputOption;
|
import org.openapitools.codegen.online.model.InputOption;
|
||||||
import io.swagger.generator.util.ZipUtil;
|
import org.openapitools.codegen.online.util.ZipUtil;
|
||||||
import io.swagger.models.Swagger;
|
import io.swagger.models.Swagger;
|
||||||
import io.swagger.models.auth.AuthorizationValue;
|
import io.swagger.models.auth.AuthorizationValue;
|
||||||
import io.swagger.parser.SwaggerParser;
|
import io.swagger.parser.SwaggerParser;
|
||||||
@ -86,7 +86,7 @@ public class Generator {
|
|||||||
swagger = new SwaggerParser().read(opts.getSwaggerUrl());
|
swagger = new SwaggerParser().read(opts.getSwaggerUrl());
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
throw new BadRequestException("No swagger specification was supplied");
|
throw new BadRequestException("No OpenAPI specification was supplied");
|
||||||
}
|
}
|
||||||
} else if (opts.getAuthorizationValue() != null) {
|
} else if (opts.getAuthorizationValue() != null) {
|
||||||
List<AuthorizationValue> authorizationValues = new ArrayList<AuthorizationValue>();
|
List<AuthorizationValue> authorizationValues = new ArrayList<AuthorizationValue>();
|
||||||
@ -96,7 +96,7 @@ public class Generator {
|
|||||||
swagger = new SwaggerParser().read(node, true);
|
swagger = new SwaggerParser().read(node, true);
|
||||||
}
|
}
|
||||||
if (swagger == null) {
|
if (swagger == null) {
|
||||||
throw new BadRequestException("The swagger specification supplied was not valid");
|
throw new BadRequestException("The OpenAPI specification supplied was not valid");
|
||||||
}
|
}
|
||||||
|
|
||||||
String destPath = null;
|
String destPath = null;
|
||||||
@ -113,7 +113,8 @@ public class Generator {
|
|||||||
String outputFolder = getTmpFolder().getAbsolutePath() + File.separator + destPath;
|
String outputFolder = getTmpFolder().getAbsolutePath() + File.separator + destPath;
|
||||||
String outputFilename = outputFolder + "-bundle.zip";
|
String outputFilename = outputFolder + "-bundle.zip";
|
||||||
|
|
||||||
clientOptInput.opts(clientOpts).swagger(swagger);
|
// TODO revise below
|
||||||
|
//clientOptInput.opts(clientOpts).swagger(swagger);
|
||||||
|
|
||||||
CodegenConfig codegenConfig = null;
|
CodegenConfig codegenConfig = null;
|
||||||
try {
|
try {
|
@ -12,7 +12,7 @@
|
|||||||
* the License.
|
* the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package io.swagger.generator.model;
|
package org.openapitools.codegen.online.model;
|
||||||
|
|
||||||
import javax.xml.bind.annotation.XmlTransient;
|
import javax.xml.bind.annotation.XmlTransient;
|
||||||
|
|
@ -12,7 +12,7 @@
|
|||||||
* the License.
|
* the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package io.swagger.generator.model;
|
package org.openapitools.codegen.online.model;
|
||||||
|
|
||||||
public class Generated {
|
public class Generated {
|
||||||
private String filename;
|
private String filename;
|
@ -1,4 +1,4 @@
|
|||||||
package io.swagger.generator.model;
|
package org.openapitools.codegen.online.model;
|
||||||
|
|
||||||
import com.fasterxml.jackson.databind.JsonNode;
|
import com.fasterxml.jackson.databind.JsonNode;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
@ -12,7 +12,7 @@
|
|||||||
* the License.
|
* the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package io.swagger.generator.model;
|
package org.openapitools.codegen.online.model;
|
||||||
|
|
||||||
public class InputOption {
|
public class InputOption {
|
||||||
private String name;
|
private String name;
|
@ -1,4 +1,4 @@
|
|||||||
package io.swagger.generator.model;
|
package org.openapitools.codegen.online.model;
|
||||||
|
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
|
@ -1,10 +1,10 @@
|
|||||||
package io.swagger.generator.resource;
|
package org.openapitools.codegen.online.resource;
|
||||||
|
|
||||||
import io.swagger.generator.exception.ApiException;
|
import org.openapitools.codegen.online.exception.ApiException;
|
||||||
import io.swagger.generator.exception.BadRequestException;
|
import org.openapitools.codegen.online.exception.BadRequestException;
|
||||||
import io.swagger.generator.exception.NotFoundException;
|
import org.openapitools.codegen.online.exception.NotFoundException;
|
||||||
import io.swagger.generator.model.ApiResponse;
|
import org.openapitools.codegen.online.model.ApiResponse;
|
||||||
import io.swagger.generator.util.ValidationException;
|
import org.openapitools.codegen.online.util.ValidationException;
|
||||||
|
|
||||||
import javax.ws.rs.core.Response;
|
import javax.ws.rs.core.Response;
|
||||||
import javax.ws.rs.core.Response.Status;
|
import javax.ws.rs.core.Response.Status;
|
@ -1,17 +1,17 @@
|
|||||||
package io.swagger.generator.resource;
|
package org.openapitools.codegen.online.resource;
|
||||||
|
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import io.swagger.annotations.ApiParam;
|
import io.swagger.annotations.ApiParam;
|
||||||
import io.swagger.codegen.CliOption;
|
import org.openapitools.codegen.CliOption;
|
||||||
import io.swagger.codegen.Codegen;
|
import org.openapitools.codegen.Codegen;
|
||||||
import io.swagger.codegen.CodegenConfig;
|
import org.openapitools.codegen.CodegenConfig;
|
||||||
import io.swagger.codegen.CodegenType;
|
import org.openapitools.codegen.CodegenType;
|
||||||
import io.swagger.generator.exception.BadRequestException;
|
import org.openapitools.codegen.online.exception.BadRequestException;
|
||||||
import io.swagger.generator.model.Generated;
|
import org.openapitools.codegen.online.model.Generated;
|
||||||
import io.swagger.generator.model.GeneratorInput;
|
import org.openapitools.codegen.online.model.GeneratorInput;
|
||||||
import io.swagger.generator.model.ResponseCode;
|
import org.openapitools.codegen.online.model.ResponseCode;
|
||||||
import io.swagger.generator.online.Generator;
|
import org.openapitools.codegen.online.http.Generator;
|
||||||
import org.apache.commons.io.FileUtils;
|
import org.apache.commons.io.FileUtils;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
|
@ -12,7 +12,7 @@
|
|||||||
* the License.
|
* the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package io.swagger.generator.util;
|
package org.openapitools.codegen.online.util;
|
||||||
|
|
||||||
import javax.servlet.FilterChain;
|
import javax.servlet.FilterChain;
|
||||||
import javax.servlet.FilterConfig;
|
import javax.servlet.FilterConfig;
|
@ -1,4 +1,4 @@
|
|||||||
package io.swagger.generator.util;
|
package org.openapitools.codegen.online.util;
|
||||||
|
|
||||||
|
|
||||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user