diff --git a/.travis.yml b/.travis.yml
index 87eab231b21..ec63cde0374 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -3,6 +3,7 @@ language: java
jdk:
- openjdk8
+
cache:
directories:
- $HOME/.m2
@@ -35,6 +36,7 @@ services:
# comment out the host table change to use the public petstore server
addons:
+ chrome: stable
hosts:
- petstore.swagger.io
@@ -112,7 +114,7 @@ after_success:
./gradlew -Psigning.keyId="$SIGNING_KEY" -Psigning.password="$SIGNING_PASSPHRASE" -Psigning.secretKeyRingFile="${TRAVIS_BUILD_DIR}/sec.gpg" -PossrhUsername="${SONATYPE_USERNAME}" -PossrhPassword="${SONATYPE_PASSWORD}" uploadArchives --no-daemon;
echo "Finished ./gradlew uploadArchives";
popd;
- elif ([ "$TRAVIS_BRANCH" == "3.1.x" ] || [ "$TRAVIS_BRANCH" == "4.0.x" ]) ; then
+ elif ([ "$TRAVIS_BRANCH" == "3.2.x" ] || [ "$TRAVIS_BRANCH" == "4.0.x" ]) ; then
mvn clean deploy --settings CI/settings.xml;
echo "Finished mvn clean deploy for $TRAVIS_BRANCH";
pushd .;
diff --git a/CI/pom.xml.circleci b/CI/pom.xml.circleci
index 03c4a1f68a8..9ae897e339b 100644
--- a/CI/pom.xml.circleci
+++ b/CI/pom.xml.circleci
@@ -835,6 +835,7 @@
samples/client/petstore/go
+ samples/client/petstore/typescript-angular-v6-provided-in-rootsamples/client/petstore/scala-akkasamples/client/petstore/scala-httpclient
@@ -850,6 +851,7 @@
samples/client/petstore/jaxrs-cxf-clientsamples/client/petstore/java/resttemplatesamples/client/petstore/java/resttemplate-withXml
+ samples/client/petstore/java/webclientsamples/client/petstore/java/vertxsamples/client/petstore/java/resteasysamples/client/petstore/java/google-api-client
diff --git a/CI/pom.xml.circleci.java7 b/CI/pom.xml.circleci.java7
index 618c358a71f..1d91124e804 100644
--- a/CI/pom.xml.circleci.java7
+++ b/CI/pom.xml.circleci.java7
@@ -854,6 +854,7 @@
samples/client/petstore/kotlin/
+ samples/client/petstore/typescript-angular-v6-provided-in-rootsamples/server/petstore/java-vertx/rxsamples/server/petstore/java-vertx/async
diff --git a/LICENSE b/LICENSE
index 54ed98787cd..c806b7a8474 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,12 +1,202 @@
-Copyright 2018 OpenAPI-Generator Contributors (https://openapi-generator.tech)
-Copyright 2018 SmartBear Software
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at [apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0)
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright 2018 OpenAPI-Generator Contributors (https://openapi-generator.tech)
+ Copyright 2018 SmartBear Software
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
diff --git a/README.md b/README.md
index bf9d55583e2..e26611e7773 100644
--- a/README.md
+++ b/README.md
@@ -2,15 +2,15 @@
-[Master](https://github.com/OpenAPITools/openapi-generator/tree/master) (`3.0.3-SNAPSHOT`): [](https://travis-ci.org/OpenAPITools/openapi-generator)
+[Master](https://github.com/OpenAPITools/openapi-generator/tree/master) (`3.1.1`): [](https://travis-ci.org/OpenAPITools/openapi-generator)
[](https://circleci.com/gh/OpenAPITools/openapi-generator)
[](https://app.shippable.com/github/OpenAPITools/openapi-generator)
[](https://ci.appveyor.com/project/WilliamCheng/openapi-generator-wh2wu)
-[`3.1.x`](https://github.com/OpenAPITools/openapi-generator/tree/3.1.x) branch: [](https://travis-ci.org/OpenAPITools/openapi-generator)
-[](https://circleci.com/gh/OpenAPITools/openapi-generator)
-[](https://app.shippable.com/github/OpenAPITools/openapi-generator)
-[](https://ci.appveyor.com/project/WilliamCheng/openapi-generator-wh2wu)
+[`3.2.x`](https://github.com/OpenAPITools/openapi-generator/tree/3.2.x) branch: [](https://travis-ci.org/OpenAPITools/openapi-generator)
+[](https://circleci.com/gh/OpenAPITools/openapi-generator)
+[](https://app.shippable.com/github/OpenAPITools/openapi-generator)
+[](https://ci.appveyor.com/project/WilliamCheng/openapi-generator-wh2wu)
[`4.0.x`](https://github.com/OpenAPITools/openapi-generator/tree/4.0.x) branch: [](https://travis-ci.org/OpenAPITools/openapi-generator)
[](https://circleci.com/gh/OpenAPITools/openapi-generator)
@@ -32,13 +32,12 @@
:notebook_with_decorative_cover: For more information, please refer to the [Wiki page](https://github.com/openapitools/openapi-generator/wiki) and [FAQ](https://github.com/openapitools/openapi-generator/wiki/FAQ) :notebook_with_decorative_cover:
-:notebook_with_decorative_cover: The eBook [A Beginner's Guide to Code Generation for REST APIs](https://gumroad.com/l/swagger_codegen_beginner) is a good starting point for begineers :notebook_with_decorative_cover:
+:notebook_with_decorative_cover: The eBook [A Beginner's Guide to Code Generation for REST APIs](https://gumroad.com/l/swagger_codegen_beginner) is a good starting point for beginners :notebook_with_decorative_cover:
:warning: If the OpenAPI spec is obtained from an untrusted source, please make sure you've reviewed the spec before using OpenAPI Generator to generate the API client, server stub or documentation as [code injection](https://en.wikipedia.org/wiki/Code_injection) may occur :warning:
:bangbang: Both "OpenAPI Tools" (https://OpenAPITools.org - the parent organization of OpenAPI Generator) and "OpenAPI Generator" are not affiliated with OpenAPI Initiative (OAI) :bangbang:
-
## Overview
@@ -87,8 +86,10 @@ The OpenAPI Specification has undergone 3 revisions since initial creation in 20
OpenAPI Generator Version | Release Date | OpenAPI Spec compatibility | Notes
---------------------------- | ------------ | -------------------------- | -----
4.0.0 (upcoming major release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/4.0.0-SNAPSHOT/)| TBD | 1.0, 1.1, 1.2, 2.0, 3.0 | Major release with breaking changes (no fallback)
-3.1.0 (upcoming minor release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/3.1.0-SNAPSHOT/)| TBD | 1.0, 1.1, 1.2, 2.0, 3.0 | Minor release with breaking changes (with fallbacks)
-3.0.3 (current master, upcoming release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/3.1.0-SNAPSHOT/)| TBD | 1.0, 1.1, 1.2,
+3.2.0 (upcoming minor release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/3.2.0-SNAPSHOT/)| TBD | 1.0, 1.1, 1.2, 2.0, 3.0 | Minor release with breaking changes (with fallbacks)
+3.1.1 (current master, upcoming patch release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/3.1.1-SNAPSHOT/)| TBD | 1.0, 1.1, 1.2, 2.0, 3.0 | Bugfix release
+[3.1.0](https://github.com/OpenAPITools/openapi-generator/releases/tag/v3.1.0) | 06.07.2018 | 1.0, 1.1, 1.2, 2.0, 3.0 | Minor release with breaking changes (with fallbacks)
+[3.0.3](https://github.com/OpenAPITools/openapi-generator/releases/tag/v3.0.3) | 27.06.2018 | 1.0, 1.1, 1.2, 2.0, 3.0 | Bugfix release
[3.0.2](https://github.com/OpenAPITools/openapi-generator/releases/tag/v3.0.2) | 18.06.2018 | 1.0, 1.1, 1.2, 2.0, 3.0 | Bugfix release
[3.0.1](https://github.com/OpenAPITools/openapi-generator/releases/tag/v3.0.1) | 11.06.2018 | 1.0, 1.1, 1.2, 2.0, 3.0 | Bugfix release
[3.0.0](https://github.com/OpenAPITools/openapi-generator/releases/tag/v3.0.0) | 01.06.2018 | 1.0, 1.1, 1.2, 2.0, 3.0 | First release with breaking changes
@@ -126,7 +127,7 @@ See the different versions of the [openapi-generator-cli](https://mvnrepository.
```
* See the different versions of the [openapi-generator-maven-plugin](https://mvnrepository.com/artifact/org.openapitools/openapi-generator-maven-plugin) artifact available on maven central.
-* [Readme](https://github.com/OpenAPITools/openapi-generator/blob/master/modules/openapi-generator-maven-plugin/README.adoc)
+* [Readme](https://github.com/OpenAPITools/openapi-generator/blob/master/modules/openapi-generator-maven-plugin/README.md)
**Gradle plugin:**
```xml
@@ -143,16 +144,16 @@ See the different versions of the [openapi-generator-cli](https://mvnrepository.
If you're looking for the latest stable version, you can grab it directly from Maven.org (Java 8 runtime at a minimum):
-JAR location: `http://central.maven.org/maven2/org/openapitools/openapi-generator-cli/3.0.0/openapi-generator-cli-3.0.0.jar`
+JAR location: `http://central.maven.org/maven2/org/openapitools/openapi-generator-cli/3.1.0/openapi-generator-cli-3.1.0.jar`
For **Mac/Linux** users:
```sh
-wget http://central.maven.org/maven2/org/openapitools/openapi-generator-cli/3.0.2/openapi-generator-cli-3.0.2.jar -O openapi-generator-cli.jar
+wget http://central.maven.org/maven2/org/openapitools/openapi-generator-cli/3.1.0/openapi-generator-cli-3.1.0.jar -O openapi-generator-cli.jar
```
For **Windows** users, you will need to install [wget](http://gnuwin32.sourceforge.net/packages/wget.htm) or you can use Invoke-WebRequest in PowerShell (3.0+), e.g.
```
-Invoke-WebRequest -OutFile openapi-generator-cli.jar http://central.maven.org/maven2/org/openapitools/openapi-generator-cli/3.0.2/openapi-generator-cli-3.0.2.jar
+Invoke-WebRequest -OutFile openapi-generator-cli.jar http://central.maven.org/maven2/org/openapitools/openapi-generator-cli/3.1.0/openapi-generator-cli-3.1.0.jar
```
After downloading the JAR, run `java -jar openapi-generator-cli.jar help` to show the usage.
@@ -425,8 +426,9 @@ Here are some companies/projects (alphabetical order) using OpenAPI Generator in
- 2018/05/12 - [OpenAPI Generator - community drivenで成長するコードジェネレータ](https://ackintosh.github.io/blog/2018/05/12/openapi-generator/) by [中野暁人](https://github.com/ackintosh)
- 2018/05/15 - [Starting a new open-source project](http://jmini.github.io/blog/2018/2018-05-15_new-open-source-project.html) by [Jeremie Bresson](https://github.com/jmini)
- 2018/05/15 - [REST API仕様からAPIクライアントやスタブサーバを自動生成する「OpenAPI Generator」オープンソースで公開。Swagger Codegenからのフォーク](https://www.publickey1.jp/blog/18/rest_apiapiopenapi_generatorswagger_generator.html) by [Publickey](https://www.publickey1.jp)
-- 2018/04/12 - [Generate Angular API clients with Swagger](https://angular.schule/blog/2018-04-swagger-codegen) by [JohannesHoppe](https://github.com/JohannesHoppe)
- 2018/06/08 - [Swagger Codegen is now OpenAPI Generator](https://angular.schule/blog/2018-06-swagger-codegen-is-now-openapi-generator) by [JohannesHoppe](https://github.com/JohannesHoppe)
+- 2018/06/21 - [Connect your JHipster apps to the world of APIs with OpenAPI and gRPC](https://fr.slideshare.net/chbornet/jhipster-conf-2018-connect-your-jhipster-apps-to-the-world-of-apis-with-openapi-and-grpc) by [Christophe Bornet](https://github.com/cbornet) at [JHipster Conf 2018](https://jhipster-conf.github.io/)
+- 2018/06/27 - [Lessons Learned from Leading an Open-Source Project Supporting 30+ Programming Languages](https://speakerdeck.com/wing328/lessons-learned-from-leading-an-open-source-project-supporting-30-plus-programming-languages) - [William Cheng](https://github.com/wing328) at [LinuxCon + ContainerCon + CloudOpen China 2018](https://www.lfasiallc.com/events/lc3-2018/)
## [6 - About Us](#table-of-contents)
@@ -471,6 +473,7 @@ Here is a list of template creators:
* Java (Jersey2): @xhh
* Java (okhttp-gson): @xhh
* Java (RestTemplate): @nbruno
+ * Java (Spring 5 WebClient): @daonomic
* Java (RESTEasy): @gayathrigs
* Java (Vertx): @lopesmcc
* Java (Google APIs Client Library): @charlescapps
@@ -558,14 +561,14 @@ If you want to join the committee, please kindly apply by sending an email to te
#### Members of Technical Committee
-| Languages | Member (join date) |
+| Languages | Member (join date) |
|:-------------|:-------------|
| ActionScript | |
-| Ada | @stcarrez (2018/02) @micheleISEP (2018/02) |
-| Android | @jaz-ah (2017/09) |
-| Apex | |
-| Bash | @frol (2017/07) @bkryza (2017/08) @kenjones-cisco (2017/09) |
-| C++ | @ravinikam (2017/07) @stkrwork (2017/07) @fvarose (2017/11) @etherealjoy (2018/02) @martindelille (2018/03) |
+| Ada | @stcarrez (2018/02) @micheleISEP (2018/02) |
+| Android | @jaz-ah (2017/09) |
+| Apex | |
+| Bash | @frol (2017/07) @bkryza (2017/08) @kenjones-cisco (2017/09) |
+| C++ | @ravinikam (2017/07) @stkrwork (2017/07) @fvarose (2017/11) @etherealjoy (2018/02) @martindelille (2018/03) |
| C# | @mandrean (2017/08) @jimschubert (2017/09) |
| Clojure | |
| Dart | @ircecho (2017/07) |
@@ -573,18 +576,19 @@ If you want to join the committee, please kindly apply by sending an email to te
| Elixir | |
| Elm | |
| Erlang | @tsloughter (2017/11) |
+| Go | @antihax (2017/11) @bvwells (2017/12) @grokify (2018/07) |
| Groovy | |
-| Go | @antihax (2017/11) @bvwells (2017/12) |
-| Haskell | |
+| Haskell | |
| Java | @bbdouglas (2017/07) @JFCote (2017/08) @sreeshas (2017/08) @jfiala (2017/08) @lukoyanov (2017/09) @cbornet (2017/09) @jeff9finger (2018/01) |
-| Kotlin | @jimschubert (2017/09) |
-| Lua | @daurnimator (2017/08) |
+| Kotlin | @jimschubert (2017/09) |
+| Lua | @daurnimator (2017/08) |
| NodeJS/Javascript | @CodeNinjai (2017/07) @frol (2017/07) @cliffano (2017/07) |
| ObjC | |
| Perl | @wing328 (2017/07) |
-| PHP | @jebentier (2017/07) @dkarlovi (2017/07) @mandrean (2017/08) @jfastnacht (2017/09) @ackintosh (2017/09) |
-| Python | @taxpon (2017/07) @frol (2017/07) @mbohlool (2017/07) @cbornet (2017/09) @kenjones-cisco (2017/11)|
-| R | |
+| PHP | @jebentier (2017/07) @dkarlovi (2017/07) @mandrean (2017/08) @jfastnacht (2017/09) @ackintosh (2017/09) |
+| PowerShell | |
+| Python | @taxpon (2017/07) @frol (2017/07) @mbohlool (2017/07) @cbornet (2017/09) @kenjones-cisco (2017/11)|
+| R | |
| Ruby | @cliffano (2017/07) @zlx (2017/09) |
| Rust | @frol (2017/07) @farcaller (2017/08) @bjgill (2017/12) |
| Scala | @clasnake (2017/07) @jimschubert (2017/09) @shijinkui (2018/01) @ramzimaalej (2018/03) |
@@ -665,6 +669,3 @@ See the License for the specific language governing permissions and
limitations under the License.
---
-
-
-
diff --git a/bin/go-petstore-withxml.sh b/bin/go-petstore-withxml.sh
index 7fbb44f6c12..0e5390b5fce 100755
--- a/bin/go-petstore-withxml.sh
+++ b/bin/go-petstore-withxml.sh
@@ -25,6 +25,9 @@ then
mvn -B clean package
fi
+echo "Removing files and folders under samples/client/petstore/go/go-petstore-withXml"
+rm -rf samples/client/petstore/go/go-petstore-withXml
+
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
ags="generate -t modules/openapi-generator/src/main/resources/go -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g go -o samples/client/petstore/go/go-petstore-withXml -DpackageName=petstore,withXml=true $@"
diff --git a/bin/go-petstore.sh b/bin/go-petstore.sh
index 3e5faf113f5..1ce6ab99656 100755
--- a/bin/go-petstore.sh
+++ b/bin/go-petstore.sh
@@ -25,6 +25,9 @@ then
mvn -B clean package
fi
+echo "Removing files and folders under samples/client/petstore/go/go-petstore"
+rm -rf samples/client/petstore/go/go-petstore
+
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
ags="generate -t modules/openapi-generator/src/main/resources/go -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g go -o samples/client/petstore/go/go-petstore -DpackageName=petstore $@"
diff --git a/bin/java-petstore-all.sh b/bin/java-petstore-all.sh
index 19f6c4359b0..b8cb3014e08 100755
--- a/bin/java-petstore-all.sh
+++ b/bin/java-petstore-all.sh
@@ -16,6 +16,7 @@
./bin/java-petstore-jersey2-java6.sh
./bin/java-petstore-resttemplate.sh
./bin/java-petstore-resttemplate-withxml.sh
+./bin/java-petstore-webclient.sh
./bin/java-petstore-resteasy.sh
./bin/java-petstore-google-api-client.sh
./bin/java-petstore-rest-assured.sh
diff --git a/bin/java-petstore-feign.sh b/bin/java-petstore-feign.sh
index d60d977be73..dc4eac30983 100755
--- a/bin/java-petstore-feign.sh
+++ b/bin/java-petstore-feign.sh
@@ -27,7 +27,7 @@ fi
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
-ags="generate -t modules/openapi-generator/src/main/resources/Java/libraries/feign -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin/java-petstore-feign.json -o samples/client/petstore/java/feign -DhideGenerationTimestamp=true $@"
+ags="generate -t modules/openapi-generator/src/main/resources/Java/libraries/feign -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin/java-petstore-feign.json -o samples/client/petstore/java/feign -DhideGenerationTimestamp=true -DbooleanGetterPrefix=is $@"
echo "Removing files and folders under samples/client/petstore/java/feign/src/main"
rm -rf samples/client/petstore/java/feign/src/main
diff --git a/bin/java-petstore-jersey2-java6.sh b/bin/java-petstore-jersey2-java6.sh
index c9e71d722c7..ef862ef444c 100755
--- a/bin/java-petstore-jersey2-java6.sh
+++ b/bin/java-petstore-jersey2-java6.sh
@@ -27,7 +27,7 @@ fi
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
-ags="generate --artifact-id petstore-jersey2-java6 -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin/java-petstore-jersey2.json -o samples/client/petstore/java/jersey2-java6 -DhideGenerationTimestamp=true,supportJava6=true $@"
+ags="generate --artifact-id petstore-jersey2-java6 -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin/java-petstore-jersey2.json -o samples/client/petstore/java/jersey2-java6 -DhideGenerationTimestamp=true,supportJava6=true,booleanGetterPrefix=is $@"
echo "Removing files and folders under samples/client/petstore/java/jersey2-java6/src/main"
rm -rf samples/client/petstore/java/jersey2-java6/src/main
diff --git a/bin/java-petstore-rest-assured.sh b/bin/java-petstore-rest-assured.sh
index 02bd26a4085..ffa8dab6e08 100755
--- a/bin/java-petstore-rest-assured.sh
+++ b/bin/java-petstore-rest-assured.sh
@@ -27,7 +27,7 @@ fi
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
-ags="generate -t modules/openapi-generator/src/main/resources/Java/libraries/rest-assured -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin/java-petstore-rest-assured.json -o samples/client/petstore/java/rest-assured -DhideGenerationTimestamp=true $@"
+ags="generate -t modules/openapi-generator/src/main/resources/Java/libraries/rest-assured -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin/java-petstore-rest-assured.json -o samples/client/petstore/java/rest-assured -DhideGenerationTimestamp=true --additional-properties booleanGetterPrefix=is $@"
echo "Removing files and folders under samples/client/petstore/java/rest-assured/src/main"
rm -rf samples/client/petstore/java/rest-assured/src/main
diff --git a/bin/java-petstore-webclient.json b/bin/java-petstore-webclient.json
new file mode 100644
index 00000000000..822ddccce55
--- /dev/null
+++ b/bin/java-petstore-webclient.json
@@ -0,0 +1,4 @@
+{
+ "library": "webclient",
+ "artifactId": "petstore-webclient"
+}
diff --git a/bin/java-petstore-webclient.sh b/bin/java-petstore-webclient.sh
new file mode 100755
index 00000000000..352ee4d5226
--- /dev/null
+++ b/bin/java-petstore-webclient.sh
@@ -0,0 +1,35 @@
+#!/bin/sh
+
+SCRIPT="$0"
+echo "# START SCRIPT: $SCRIPT"
+
+while [ -h "$SCRIPT" ] ; do
+ ls=`ls -ld "$SCRIPT"`
+ link=`expr "$ls" : '.*-> \(.*\)$'`
+ if expr "$link" : '/.*' > /dev/null; then
+ SCRIPT="$link"
+ else
+ SCRIPT=`dirname "$SCRIPT"`/"$link"
+ fi
+done
+
+if [ ! -d "${APP_DIR}" ]; then
+ APP_DIR=`dirname "$SCRIPT"`/..
+ APP_DIR=`cd "${APP_DIR}"; pwd`
+fi
+
+executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar"
+
+if [ ! -f "$executable" ]
+then
+ mvn -B clean package
+fi
+
+# if you've executed sbt assembly previously it will use that instead.
+export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
+ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin/java-petstore-webclient.json -o samples/client/petstore/java/webclient -DhideGenerationTimestamp=true $@"
+
+echo "Removing files and folders under samples/client/petstore/java/webclient/src/main"
+rm -rf samples/client/petstore/java/webclient/src/main
+find samples/client/petstore/java/webclient -maxdepth 1 -type f ! -name "README.md" -exec rm {} +
+java $JAVA_OPTS -jar $executable $ags
diff --git a/bin/jaxrs-cxf-petstore-server.sh b/bin/jaxrs-cxf-petstore-server.sh
index 6846f2e75ca..d09d0cb5456 100755
--- a/bin/jaxrs-cxf-petstore-server.sh
+++ b/bin/jaxrs-cxf-petstore-server.sh
@@ -25,6 +25,9 @@ then
mvn -B clean package
fi
+echo "Removing files and folders under samples/server/petstore/jaxrs-cxf"
+rm -rf samples/server/petstore/jaxrs-cxf
+
# 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/JavaJaxRS/cxf -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g jaxrs-cxf -o samples/server/petstore/jaxrs-cxf -DhideGenerationTimestamp=true --additional-properties serverPort=8082 $@"
diff --git a/bin/openapi3/slim-petstore-server.sh b/bin/openapi3/php-slim-server-petstore.sh
similarity index 78%
rename from bin/openapi3/slim-petstore-server.sh
rename to bin/openapi3/php-slim-server-petstore.sh
index 57c912ee866..b737c4f2550 100755
--- a/bin/openapi3/slim-petstore-server.sh
+++ b/bin/openapi3/php-slim-server-petstore.sh
@@ -27,6 +27,6 @@ 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/slim -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g php-slim -o samples/server/petstore/slim $@"
+ags="generate -t modules/openapi-generator/src/main/resources/php-slim-server -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g php-slim -o samples/server/petstore/php-slim $@"
java $JAVA_OPTS -jar $executable $ags
diff --git a/bin/php-slim-server-petstore.sh b/bin/php-slim-server-petstore.sh
new file mode 100755
index 00000000000..2a7179f458a
--- /dev/null
+++ b/bin/php-slim-server-petstore.sh
@@ -0,0 +1,32 @@
+#!/bin/sh
+
+SCRIPT="$0"
+echo "# START SCRIPT: $SCRIPT"
+
+while [ -h "$SCRIPT" ] ; do
+ ls=`ls -ld "$SCRIPT"`
+ link=`expr "$ls" : '.*-> \(.*\)$'`
+ if expr "$link" : '/.*' > /dev/null; then
+ SCRIPT="$link"
+ else
+ SCRIPT=`dirname "$SCRIPT"`/"$link"
+ fi
+done
+
+if [ ! -d "${APP_DIR}" ]; then
+ APP_DIR=`dirname "$SCRIPT"`/..
+ APP_DIR=`cd "${APP_DIR}"; pwd`
+fi
+
+executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar"
+
+if [ ! -f "$executable" ]
+then
+ mvn -B clean package
+fi
+
+# if you've executed sbt assembly previously it will use that instead.
+export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
+ags="generate -t modules/openapi-generator/src/main/resources/php-slim-server -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g php-slim -o samples/server/petstore/php-slim $@"
+
+java $JAVA_OPTS -jar $executable $ags
diff --git a/bin/security/slim-petstore-server.sh b/bin/security/php-slim-server-petstore.sh
similarity index 75%
rename from bin/security/slim-petstore-server.sh
rename to bin/security/php-slim-server-petstore.sh
index 8db85ea2dda..d6758284c7a 100755
--- a/bin/security/slim-petstore-server.sh
+++ b/bin/security/php-slim-server-petstore.sh
@@ -27,6 +27,6 @@ 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/slim -i modules/openapi-generator/src/test/resources/2_0/petstore-security-test.yaml -g php-slim -o samples/server/petstore-security-test/slim $@"
+ags="generate -t modules/openapi-generator/src/main/resources/php-slim-server -i modules/openapi-generator/src/test/resources/2_0/petstore-security-test.yaml -g php-slim -o samples/server/petstore-security-test/php-slim $@"
java $JAVA_OPTS -jar $executable $ags
diff --git a/bin/spring-mvc-petstore-j8-localdatetime.sh b/bin/spring-mvc-petstore-j8-localdatetime.sh
index 4046001c059..373942a0829 100755
--- a/bin/spring-mvc-petstore-j8-localdatetime.sh
+++ b/bin/spring-mvc-petstore-j8-localdatetime.sh
@@ -27,6 +27,6 @@ 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/JavaSpring -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g spring -c bin/spring-mvc-petstore-j8-localdatetime.json -o samples/server/petstore/spring-mvc-j8-localdatetime -DhideGenerationTimestamp=true --additional-properties serverPort=8002 $@"
+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 -g spring -c bin/spring-mvc-petstore-j8-localdatetime.json -o samples/server/petstore/spring-mvc-j8-localdatetime -DhideGenerationTimestamp=true -DbooleanGetterPrefix=get --additional-properties serverPort=8002 $@"
java $JAVA_OPTS -jar $executable $ags
diff --git a/bin/spring-mvc-petstore-server.sh b/bin/spring-mvc-petstore-server.sh
index a6ad7d7bff6..c339946bfb1 100755
--- a/bin/spring-mvc-petstore-server.sh
+++ b/bin/spring-mvc-petstore-server.sh
@@ -27,6 +27,6 @@ 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/JavaSpring -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g spring -c bin/spring-mvc-petstore-server.json -o samples/server/petstore/spring-mvc -DhideGenerationTimestamp=true,java8=false --additional-properties serverPort=8002 $@"
+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 -g spring -c bin/spring-mvc-petstore-server.json -o samples/server/petstore/spring-mvc -DhideGenerationTimestamp=true,java8=false --additional-properties serverPort=8002 --additional-properties booleanGetterPrefix=get $@"
java $JAVA_OPTS -jar $executable $ags
diff --git a/bin/typescript-angular-petstore-all.sh b/bin/typescript-angular-petstore-all.sh
index 6e532d840ba..eb94794cb07 100755
--- a/bin/typescript-angular-petstore-all.sh
+++ b/bin/typescript-angular-petstore-all.sh
@@ -5,3 +5,7 @@
./bin/typescript-angular-v2-petstore-interfaces.sh
./bin/typescript-angular-v4-petstore-with-npm.sh
./bin/typescript-angular-v4.3-petstore-with-npm.sh
+./bin/typescript-angular-v6-petstore-not-provided-in-root.sh
+./bin/typescript-angular-v6-petstore-not-provided-in-root-with-npm.sh
+./bin/typescript-angular-v6-petstore-provided-in-root.sh
+./bin/typescript-angular-v6-petstore-provided-in-root-with-npm.sh
diff --git a/bin/typescript-angular-v6-petstore-not-provided-in-root-with-npm.json b/bin/typescript-angular-v6-petstore-not-provided-in-root-with-npm.json
new file mode 100644
index 00000000000..999bde52439
--- /dev/null
+++ b/bin/typescript-angular-v6-petstore-not-provided-in-root-with-npm.json
@@ -0,0 +1,6 @@
+{
+ "npmName": "@swagger/typescript-angular-petstore",
+ "npmVersion": "1.0.0",
+ "npmRepository" : "https://skimdb.npmjs.com/registry",
+ "snapshot" : false
+}
diff --git a/bin/typescript-angular-v6-petstore-not-provided-in-root-with-npm.sh b/bin/typescript-angular-v6-petstore-not-provided-in-root-with-npm.sh
new file mode 100755
index 00000000000..856e56d1407
--- /dev/null
+++ b/bin/typescript-angular-v6-petstore-not-provided-in-root-with-npm.sh
@@ -0,0 +1,32 @@
+#!/bin/sh
+
+SCRIPT="$0"
+echo "# START SCRIPT: $SCRIPT"
+
+while [ -h "$SCRIPT" ] ; do
+ ls=`ls -ld "$SCRIPT"`
+ link=`expr "$ls" : '.*-> \(.*\)$'`
+ if expr "$link" : '/.*' > /dev/null; then
+ SCRIPT="$link"
+ else
+ SCRIPT=`dirname "$SCRIPT"`/"$link"
+ fi
+done
+
+if [ ! -d "${APP_DIR}" ]; then
+ APP_DIR=`dirname "$SCRIPT"`/..
+ APP_DIR=`cd "${APP_DIR}"; pwd`
+fi
+
+executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar"
+
+if [ ! -f "$executable" ]
+then
+ mvn -B clean package
+fi
+
+# if you've executed sbt assembly previously it will use that instead.
+export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
+ags="generate -i modules/openapi-generator/src/test\resources/2_0/petstore.yaml -g typescript-angular -c bin/typescript-angular-v6-petstore-not-provided-in-root-with-npm.json -o samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm -D providedInRoot=false --additional-properties ngVersion=6.0.0 $@"
+
+java $JAVA_OPTS -jar $executable $ags
diff --git a/bin/typescript-angular-v6-petstore-not-provided-in-root.sh b/bin/typescript-angular-v6-petstore-not-provided-in-root.sh
new file mode 100755
index 00000000000..c33a15d4b49
--- /dev/null
+++ b/bin/typescript-angular-v6-petstore-not-provided-in-root.sh
@@ -0,0 +1,32 @@
+#!/bin/sh
+
+SCRIPT="$0"
+echo "# START SCRIPT: $SCRIPT"
+
+while [ -h "$SCRIPT" ] ; do
+ ls=`ls -ld "$SCRIPT"`
+ link=`expr "$ls" : '.*-> \(.*\)$'`
+ if expr "$link" : '/.*' > /dev/null; then
+ SCRIPT="$link"
+ else
+ SCRIPT=`dirname "$SCRIPT"`/"$link"
+ fi
+done
+
+if [ ! -d "${APP_DIR}" ]; then
+ APP_DIR=`dirname "$SCRIPT"`/..
+ APP_DIR=`cd "${APP_DIR}"; pwd`
+fi
+
+executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar"
+
+if [ ! -f "$executable" ]
+then
+ mvn -B clean package
+fi
+
+# if you've executed sbt assembly previously it will use that instead.
+export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
+ags="generate -i modules/openapi-generator/src/test\resources/2_0/petstore.yaml -g typescript-angular -o samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default -D providedInRoot=false --additional-properties ngVersion=6.0.0 $@"
+
+java $JAVA_OPTS -jar $executable $ags
diff --git a/bin/typescript-angular-v6-petstore-provided-in-root-with-npm.json b/bin/typescript-angular-v6-petstore-provided-in-root-with-npm.json
new file mode 100644
index 00000000000..999bde52439
--- /dev/null
+++ b/bin/typescript-angular-v6-petstore-provided-in-root-with-npm.json
@@ -0,0 +1,6 @@
+{
+ "npmName": "@swagger/typescript-angular-petstore",
+ "npmVersion": "1.0.0",
+ "npmRepository" : "https://skimdb.npmjs.com/registry",
+ "snapshot" : false
+}
diff --git a/bin/typescript-angular-v6-petstore-provided-in-root-with-npm.sh b/bin/typescript-angular-v6-petstore-provided-in-root-with-npm.sh
new file mode 100755
index 00000000000..a12f62832c5
--- /dev/null
+++ b/bin/typescript-angular-v6-petstore-provided-in-root-with-npm.sh
@@ -0,0 +1,32 @@
+#!/bin/sh
+
+SCRIPT="$0"
+echo "# START SCRIPT: $SCRIPT"
+
+while [ -h "$SCRIPT" ] ; do
+ ls=`ls -ld "$SCRIPT"`
+ link=`expr "$ls" : '.*-> \(.*\)$'`
+ if expr "$link" : '/.*' > /dev/null; then
+ SCRIPT="$link"
+ else
+ SCRIPT=`dirname "$SCRIPT"`/"$link"
+ fi
+done
+
+if [ ! -d "${APP_DIR}" ]; then
+ APP_DIR=`dirname "$SCRIPT"`/..
+ APP_DIR=`cd "${APP_DIR}"; pwd`
+fi
+
+executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar"
+
+if [ ! -f "$executable" ]
+then
+ mvn -B clean package
+fi
+
+# if you've executed sbt assembly previously it will use that instead.
+export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
+ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g typescript-angular -c bin/typescript-angular-v6-petstore-provided-in-root-with-npm.json -o samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm --additional-properties ngVersion=6.0.0 $@"
+
+java $JAVA_OPTS -jar $executable $ags
diff --git a/bin/php-slim-petstore-server.sh b/bin/typescript-angular-v6-petstore-provided-in-root.sh
similarity index 75%
rename from bin/php-slim-petstore-server.sh
rename to bin/typescript-angular-v6-petstore-provided-in-root.sh
index 54624118c3b..540f233c106 100755
--- a/bin/php-slim-petstore-server.sh
+++ b/bin/typescript-angular-v6-petstore-provided-in-root.sh
@@ -27,6 +27,6 @@ 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/slim -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g php-slim -o samples/server/petstore/php-slim $@"
+ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g typescript-angular -o samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default --additional-properties ngVersion=6.0.0 $@"
java $JAVA_OPTS -jar $executable $ags
diff --git a/bin/utils/ensure-up-to-date b/bin/utils/ensure-up-to-date
index f8f84d393ef..b93d9df5fbd 100755
--- a/bin/utils/ensure-up-to-date
+++ b/bin/utils/ensure-up-to-date
@@ -25,6 +25,11 @@ sleep 5
./bin/php-slim-petstore-server.sh > /dev/null 2>&1
./bin/php-ze-ph-petstore-server.sh > /dev/null 2>&1
./bin/openapi3/php-petstore.sh > /dev/null 2>&1
+./bin/typescript-angular-petstore-all.sh > /dev/null 2>&1
+./bin/typescript-fetch-petstore-all.sh > /dev/null 2>&1
+./bin/typescript-node-petstore-all.sh > /dev/null 2>&1
+./bin/typescript-inversify-petstore.sh > /dev/null 2>&1
+
# Check:
if [ -n "$(git status --porcelain)" ]; then
@@ -34,7 +39,7 @@ if [ -n "$(git status --porcelain)" ]; then
git --no-pager diff
echo "Perform git status"
git status
- echo "Please run 'bin/ensure-up-to-date' locally and commit changes (UNCOMMITTED CHANGES ERROR)"
+ echo "Please run 'bin/utils/ensure-up-to-date' locally and commit changes (UNCOMMITTED CHANGES ERROR)"
exit 1
else
echo "Git working tree is clean"
diff --git a/bin/windows/php-slim-petstore-server.bat b/bin/windows/php-slim-server-petstore.bat
old mode 100644
new mode 100755
similarity index 100%
rename from bin/windows/php-slim-petstore-server.bat
rename to bin/windows/php-slim-server-petstore.bat
diff --git a/bin/windows/typescript-angular-petstore-all.bat b/bin/windows/typescript-angular-petstore-all.bat
index 7f153399d15..9dc20163837 100644
--- a/bin/windows/typescript-angular-petstore-all.bat
+++ b/bin/windows/typescript-angular-petstore-all.bat
@@ -4,6 +4,8 @@ call .\bin\windows\typescript-angular-v2.bat
call .\bin\windows\typescript-angular-v4-with-npm.bat
call .\bin\windows\typescript-angular-v4.3-with-npm.bat
call .\bin\windows\typescript-angular-v6-provided-in-root.bat
+call .\bin\windows\typescript-angular-v6-provided-in-root-with-npm.bat
call .\bin\windows\typescript-angular-v6-not-provided-in-root.bat
+call .\bin\windows\typescript-angular-v6-not-provided-in-root-with-npm.bat
diff --git a/bin/windows/typescript-angular-v2-interfaces.bat b/bin/windows/typescript-angular-v2-interfaces.bat
index 3fd94ca1d45..443d8eb53cd 100644
--- a/bin/windows/typescript-angular-v2-interfaces.bat
+++ b/bin/windows/typescript-angular-v2-interfaces.bat
@@ -5,6 +5,6 @@ If Not Exist %executable% (
)
REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M
-set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -c bin\typescript-petstore-npm.json -g typescript-angular -o samples\client\petstore\typescript-angular-v2\with-interfaces -D withInterfaces=true --additional-properties ngVersion=2
+set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g typescript-angular -o samples\client\petstore\typescript-angular-v2\with-interfaces -D withInterfaces=true --additional-properties ngVersion=2
java %JAVA_OPTS% -jar %executable% %ags%
diff --git a/bin/windows/typescript-inversify.bat b/bin/windows/typescript-angular-v6-not-provided-in-root-with-npm.bat
old mode 100755
new mode 100644
similarity index 51%
rename from bin/windows/typescript-inversify.bat
rename to bin/windows/typescript-angular-v6-not-provided-in-root-with-npm.bat
index e29c0dda782..a60b83960c5
--- a/bin/windows/typescript-inversify.bat
+++ b/bin/windows/typescript-angular-v6-not-provided-in-root-with-npm.bat
@@ -5,6 +5,6 @@ If Not Exist %executable% (
)
REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M
-set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g typescript-inversify -o samples\client\petstore\typescript-inversify
+set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -l typescript-angular -c bin\typescript-angular-v6-petstore-not-provided-in-root-with-npm.json -o samples\client\petstore\typescript-angular-v6-not-provided-in-root\builds\with-npm -D providedInRoot=false --additional-properties ngVersion=6.0.0
java %JAVA_OPTS% -jar %executable% %ags%
diff --git a/bin/windows/typescript-angular-v6-not-provided-in-root.bat b/bin/windows/typescript-angular-v6-not-provided-in-root.bat
index c59b71c6275..478a0905e5f 100644
--- a/bin/windows/typescript-angular-v6-not-provided-in-root.bat
+++ b/bin/windows/typescript-angular-v6-not-provided-in-root.bat
@@ -5,6 +5,6 @@ If Not Exist %executable% (
)
REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M
-set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -l typescript-angular -o samples\client\petstore\typescript-angular-v6-not-provided-in-root\default -D providedInRoot=false --additional-properties ngVersion=6.0.0
+set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -l typescript-angular -o samples\client\petstore\typescript-angular-v6-not-provided-in-root\builds\default -D providedInRoot=false --additional-properties ngVersion=6.0.0
java %JAVA_OPTS% -jar %executable% %ags%
diff --git a/bin/windows/typescript-angular-v6-provided-in-root-with-npm.bat b/bin/windows/typescript-angular-v6-provided-in-root-with-npm.bat
new file mode 100644
index 00000000000..e99095c5b76
--- /dev/null
+++ b/bin/windows/typescript-angular-v6-provided-in-root-with-npm.bat
@@ -0,0 +1,9 @@
+set executable=.\modules\openapi-generator-cli\target\openapi-generator-cli.jar
+
+If Not Exist %executable% (
+ mvn clean package
+)
+
+set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -l typescript-angular -c bin/typescript-angular-v6-petstore-provided-in-root-with-npm.json -o samples\client\petstore\typescript-angular-v6-provided-in-root\builds\with-npm --additional-properties ngVersion=6.0.0
+
+java %JAVA_OPTS% -jar %executable% %ags%
diff --git a/bin/windows/typescript-angular-v6-provided-in-root.bat b/bin/windows/typescript-angular-v6-provided-in-root.bat
index f597efabc17..18d25646e0b 100644
--- a/bin/windows/typescript-angular-v6-provided-in-root.bat
+++ b/bin/windows/typescript-angular-v6-provided-in-root.bat
@@ -4,9 +4,6 @@ If Not Exist %executable% (
mvn clean package
)
-REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M
-set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -l typescript-angular -o samples\client\petstore\typescript-angular-v6-provided-in-root\default --additional-properties ngVersion=6.0.0
-REM it is same like like setting -D providedInRoot=true
-REM set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -l typescript-angular -o samples\client\petstore\typescript-angular-v6-provided-in-root\default -D providedInRoot=true --additional-properties ngVersion=6.0.0
+set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -l typescript-angular -o samples\client\petstore\typescript-angular-v6-provided-in-root\builds\default --additional-properties ngVersion=6.0.0
java %JAVA_OPTS% -jar %executable% %ags%
diff --git a/bin/windows/typescript-inversify-petstore.bat b/bin/windows/typescript-inversify-petstore.bat
index 72e966e211a..e29c0dda782 100644
--- a/bin/windows/typescript-inversify-petstore.bat
+++ b/bin/windows/typescript-inversify-petstore.bat
@@ -1,5 +1,3 @@
-@ECHO OFF
-
set executable=.\modules\openapi-generator-cli\target\openapi-generator-cli.jar
If Not Exist %executable% (
@@ -7,8 +5,6 @@ If Not Exist %executable% (
)
REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M
-
-echo
-set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g typescript-inversify -o samples\client\petstore\typescript-inversify\builds\default
+set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g typescript-inversify -o samples\client\petstore\typescript-inversify
java %JAVA_OPTS% -jar %executable% %ags%
diff --git a/bin/windows/typescript-node-petstore-all.bat b/bin/windows/typescript-node-petstore-all.bat
new file mode 100644
index 00000000000..3a690974e9d
--- /dev/null
+++ b/bin/windows/typescript-node-petstore-all.bat
@@ -0,0 +1,2 @@
+call .\bin\windows\typescript-node-petstore.bat
+call .\bin\windows\typescript-node-petstore-with-npm.bat
diff --git a/bin/windows/typescript-node-with-npm.bat b/bin/windows/typescript-node-petstore-with-npm.bat
old mode 100755
new mode 100644
similarity index 100%
rename from bin/windows/typescript-node-with-npm.bat
rename to bin/windows/typescript-node-petstore-with-npm.bat
diff --git a/bin/windows/typescript-node.bat b/bin/windows/typescript-node-petstore.bat
old mode 100755
new mode 100644
similarity index 100%
rename from bin/windows/typescript-node.bat
rename to bin/windows/typescript-node-petstore.bat
diff --git a/circle.yml b/circle.yml
index 71da8631b7f..2cc3e707778 100644
--- a/circle.yml
+++ b/circle.yml
@@ -43,6 +43,21 @@ jobs:
- run: sudo apt-get update -qq
- run: sudo apt-get install -qq bats
- run: sudo apt-get install -qq curl
+ # Install latest stable node for angular 6
+ - run:
+ name: Install node@stable (for angular 6)
+ command: |
+ set +e
+ curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash
+ export NVM_DIR="/opt/circleci/.nvm"
+ [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
+ nvm install stable
+ nvm alias default stable
+
+ # Each step uses the same `$BASH_ENV`, so need to modify it
+ echo 'export NVM_DIR="/opt/circleci/.nvm"' >> $BASH_ENV
+ echo "[ -s \"$NVM_DIR/nvm.sh\" ] && . \"$NVM_DIR/nvm.sh\"" >> $BASH_ENV
+ - run: node --version
# - run: docker pull openapitools/openapi-petstore
# - run: docker run -d -e OPENAPI_BASE_PATH=/v3 -e DISABLE_API_KEY=1 -e DISABLE_OAUTH=1 -p 80:8080 openapitools/openapi-petstore
- run: docker pull swaggerapi/petstore
diff --git a/docs/migration-guide.adoc b/docs/migration-guide.adoc
new file mode 100644
index 00000000000..08d220cc576
--- /dev/null
+++ b/docs/migration-guide.adoc
@@ -0,0 +1,32 @@
+== Migration guide between OpenAPI-Generator versions
+
+This page summaries the important changes between major and minor version of OpenAPI-Generator.
+It does not contain a detailed list of changes, for that refer to each individual release notes.
+
+This page is written to help migration by indicating the most impacting changes.
+Do not hesitate to contribute additional notes if you discover something during your migration and think that the information might help other users.
+
+Another approach to find breaking changes is to look at issue and pull requests with following labels:
+
+* link:https://github.com/OpenAPITools/openapi-generator/labels/Breaking%20change%20%28with%20fallback%29[Breaking change (with fallback)]
+* link:https://github.com/OpenAPITools/openapi-generator/labels/Breaking%20change%20%28without%20fallback%29[Breaking change (without fallback)]
+
+=== From 3.0.x to 3.1.0
+
+Version `3.1.0` is the first minor version of OpenAPI-Generator, in comparison to `3.0.3` it contains some breaking changes, but with the possibility to fallback to the old behavior.
+The default value of some options might change.
+Projects relying on generated code might need to be adapted.
+
+==== Java
+
+A new option is introduced with link:https://github.com/OpenAPITools/openapi-generator/pull/432[#432] to specify the prefix of boolean getters: `booleanGetterPrefix`.
+Possible values:
+
+* `is`: the value used in `3.0.x`.
+* `get`: the new default value.
+
+If you use the default value you will see your generated code changing from `isActive()` to `getActive()`.
+
+=== Migrating from Swagger-Codegen
+
+Please read the specific migration guide: link:migration-from-swagger-codegen.md[From Swagger-Codegen to OpenAPI-Generator]
diff --git a/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/ConfigHelp.java b/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/ConfigHelp.java
index ce2dff5c61b..ba6c86466a2 100644
--- a/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/ConfigHelp.java
+++ b/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/ConfigHelp.java
@@ -23,18 +23,41 @@ import org.openapitools.codegen.CliOption;
import org.openapitools.codegen.CodegenConfig;
import org.openapitools.codegen.CodegenConfigLoader;
import org.openapitools.codegen.GeneratorNotFoundException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import static org.apache.commons.lang3.StringUtils.isEmpty;
+import static org.apache.commons.lang3.StringUtils.isNotEmpty;
@Command(name = "config-help", description = "Config help for chosen lang")
public class ConfigHelp implements Runnable {
- @Option(name = {"-l", "--lang"}, title = "language", required = true,
+ private static final Logger LOGGER = LoggerFactory.getLogger(Generate.class);
+
+ @Option(name = {"-l", "--lang"}, title = "language",
description = "language to get config help for")
private String lang;
+ @Option(name = {"-g", "--generator-name"}, title = "generator name",
+ description = "generator to get config help for")
+ private String generatorName;
+
@Override
public void run() {
+
+ // TODO: After 3.0.0 release (maybe for 3.1.0): Fully deprecate lang.
+ if (isEmpty(generatorName)) {
+ if (isNotEmpty(lang)) {
+ LOGGER.warn("The '--lang' and '-l' are deprecated and may reference language names only in the next major release (4.0). Please use --generator-name /-g instead.");
+ generatorName = lang;
+ } else {
+ System.err.println("[error] A generator name (--generator-name / -g) is required.");
+ System.exit(1);
+ }
+ }
+
try {
- CodegenConfig config = CodegenConfigLoader.forName(lang);
+ CodegenConfig config = CodegenConfigLoader.forName(generatorName);
System.out.println();
System.out.println("CONFIG OPTIONS");
for (CliOption langCliOption : config.cliOptions()) {
@@ -49,4 +72,4 @@ public class ConfigHelp implements Runnable {
System.exit(1);
}
}
-}
+}
\ No newline at end of file
diff --git a/modules/openapi-generator-gradle-plugin/README.adoc b/modules/openapi-generator-gradle-plugin/README.adoc
index ee2879db4b2..4441a6479e6 100644
--- a/modules/openapi-generator-gradle-plugin/README.adoc
+++ b/modules/openapi-generator-gradle-plugin/README.adoc
@@ -34,7 +34,7 @@ buildscript {
mavenCentral()
}
dependencies {
- classpath "org.openapitools:openapi-generator-gradle-plugin:3.0.2"
+ classpath "org.openapitools:openapi-generator-gradle-plugin:3.1.0"
}
}
diff --git a/modules/openapi-generator-gradle-plugin/samples/local-spec/README.md b/modules/openapi-generator-gradle-plugin/samples/local-spec/README.md
index ed9369357d8..b6c8225a2a3 100644
--- a/modules/openapi-generator-gradle-plugin/samples/local-spec/README.md
+++ b/modules/openapi-generator-gradle-plugin/samples/local-spec/README.md
@@ -16,5 +16,5 @@ gradle buildGoSdk
The samples can be tested against other versions of the plugin using the `openApiGeneratorVersion` property. For example:
```bash
-gradle -PopenApiGeneratorVersion=3.0.2 openApiValidate
+gradle -PopenApiGeneratorVersion=3.1.0 openApiValidate
```
diff --git a/modules/openapi-generator-gradle-plugin/samples/local-spec/gradle.properties b/modules/openapi-generator-gradle-plugin/samples/local-spec/gradle.properties
index b1fa253ef74..0f603047cb4 100644
--- a/modules/openapi-generator-gradle-plugin/samples/local-spec/gradle.properties
+++ b/modules/openapi-generator-gradle-plugin/samples/local-spec/gradle.properties
@@ -1 +1 @@
-openApiGeneratorVersion=3.0.1
+openApiGeneratorVersion=3.1.0
diff --git a/modules/openapi-generator-maven-plugin/README.md b/modules/openapi-generator-maven-plugin/README.md
index b544a6c8a2a..89d23c0c1e3 100644
--- a/modules/openapi-generator-maven-plugin/README.md
+++ b/modules/openapi-generator-maven-plugin/README.md
@@ -11,7 +11,7 @@ Add to your `build->plugins` section (default phase is `generate-sources` phase)
org.openapitoolsopenapi-generator-maven-plugin
- 3.0.2
+ 3.1.0
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenConfig.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenConfig.java
index fef5d1f510a..bd3f11c0eaf 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenConfig.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenConfig.java
@@ -75,6 +75,8 @@ public interface CodegenConfig {
String escapeText(String text);
+ String escapeTextWhileAllowingNewLines(String text);
+
String escapeUnsafeCharacters(String input);
String escapeReservedWord(String name);
@@ -165,6 +167,12 @@ public interface CodegenConfig {
Map postProcessModels(Map objs);
+ /**
+ * @deprecated use {@link #postProcessOperationsWithModels(Map, List)} instead. This method will be removed
+ * @param objs the objects map that will be passed to the templating engine
+ * @return the the objects map instance.
+ */
+ @Deprecated
Map postProcessOperations(Map objs);
Map postProcessOperationsWithModels(Map objs, List