Skip to content
This repository was archived by the owner on May 9, 2025. It is now read-only.

Commit 269bb0d

Browse files
committed
Merge branch 'master' into generator-validation-option
* master: (26 commits) Prepare 3.0.1 release (OpenAPITools#280) [typescript-angular] strict type checking (OpenAPITools#218) [C++ server] Adjust the names (script, sample folder, generator) to lang option (OpenAPITools#250) Removed warnings for packages included in SDK for Net Core 2.0 (OpenAPITools#269) [cli] Completions command for suggestions (OpenAPITools#213) [Java][RestTemplate] Fix query parameter URL encoding (OpenAPITools#260) [cpp-qt5] Remove std::shared_ptr from Qt5 (OpenAPITools#267) Adds some links to the README (OpenAPITools#261) Update sec.gpg.enc to binary encoded secret Add gpg --check-trustdb, limit gpg to master Re-do encrypted gpg and reference in settings.xml Fix trailing semicolons in after_success Travis CI scripts Use ubuntu keyserver instead of mit (due to timeout) [gradle] Plugin release management (OpenAPITools#201) Updates small typo in qna.md (OpenAPITools#262) Fix ModelUtils.getUnusedSchema() (OpenAPITools#253) Add JaxRS to bin/ensure-up-to-date (OpenAPITools#248) feat(security): add cookie-auth support (OpenAPITools#240) Add 'unblu inc.' to company list (OpenAPITools#246) put company list in alphabetical order (OpenAPITools#244) ...
2 parents 4e6ece5 + 0453e64 commit 269bb0d

File tree

450 files changed

+8396
-1801
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

450 files changed

+8396
-1801
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
out/
44
*.ipr
55
*.iws
6+
*.gpg
67
classpath.txt
78
version.properties
89
!modules/openapi-generator-cli/src/main/resources/version.properties

.travis.yml

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,9 @@ cache:
99
- $HOME/.ivy2
1010
- $HOME/.gradle/caches/
1111
- $HOME/.gradle/wrapper/
12+
- $HOME/samples/client/petstore/javascript/node_modules
1213
- $HOME/samples/client/petstore/php/OpenAPIToolsClient-php/vendor
13-
- $HOME/samples/client/petstore/ruby/venodr/bundle
14+
- $HOME/samples/client/petstore/ruby/vendor/bundle
1415
- $HOME/samples/client/petstore/python/.venv/
1516
- $HOME/samples/client/petstore/typescript-node/npm/node_modules
1617
- $HOME/samples/client/petstore/typescript-node/npm/typings/
@@ -72,6 +73,11 @@ before_install:
7273
- cat /etc/hosts
7374
# show java version
7475
- java -version
76+
- if [ "$TRAVIS_BRANCH" = "master" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
77+
openssl aes-256-cbc -K $encrypted_6e2c8bba47c6_key -iv $encrypted_6e2c8bba47c6_iv -in sec.gpg.enc -out sec.gpg -d ;
78+
gpg --keyserver keyserver.ubuntu.com --recv-key $SIGNING_KEY ;
79+
gpg --check-trustdb ;
80+
fi;
7581

7682
install:
7783
# Add Godeps dependencies to GOPATH and PATH
@@ -93,10 +99,15 @@ script:
9399
- mvn --quiet clean install
94100
- mvn --quiet verify -Psamples
95101
after_success:
96-
# push a snapshot version to maven repo
97-
- if [ $SONATYPE_USERNAME ] && [ -z $TRAVIS_TAG ] && [ "$TRAVIS_BRANCH" = "master" ]; then
98-
mvn clean deploy --settings CI/settings.xml;
102+
# push to maven repo
103+
- if [ $SONATYPE_USERNAME ] && [ -z $TRAVIS_TAG ] && [ "$TRAVIS_BRANCH" = "master" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
104+
mvn clean deploy -DskipTests=true -B -U -P release --settings CI/settings.xml;
99105
echo "Finished mvn clean deploy for $TRAVIS_BRANCH";
106+
pushd .;
107+
cd modules/openapi-generator-gradle-plugin;
108+
./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;
109+
echo "Finished ./gradlew uploadArchives";
110+
popd;
100111
fi;
101112
## docker: build and push openapi-generator-online to DockerHub
102113
- if [ $DOCKER_HUB_USERNAME ]; then echo "$DOCKER_HUB_PASSWORD" | docker login --username=$DOCKER_HUB_USERNAME --password-stdin && docker build -t $DOCKER_GENERATOR_IMAGE_NAME ./modules/openapi-generator-online && if [ ! -z "$TRAVIS_TAG" ]; then docker tag $DOCKER_GENERATOR_IMAGE_NAME:latest $DOCKER_GENERATOR_IMAGE_NAME:$TRAVIS_TAG; fi && if [ ! -z "$TRAVIS_TAG" ] || [ "$TRAVIS_BRANCH" = "master" ]; then docker push $DOCKER_GENERATOR_IMAGE_NAME && echo "Pushed to $DOCKER_GENERATOR_IMAGE_NAME"; fi; fi

CI/pom.xml.bash

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<artifactId>openapi-generator-project</artifactId>
1010
<packaging>pom</packaging>
1111
<name>openapi-generator-project</name>
12-
<version>3.0.1-SNAPSHOT</version>
12+
<version>3.0.1</version>
1313
<url>https://github.com/openapi-tools/openapi-generator</url>
1414
<scm>
1515
<connection>scm:git:[email protected]:openapi-tools/openapi-generator.git</connection>

CI/pom.xml.circleci

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<artifactId>openapi-generator-project</artifactId>
1111
<packaging>pom</packaging>
1212
<name>openapi-generator-project</name>
13-
<version>3.0.1-SNAPSHOT</version>
13+
<version>3.0.1</version>
1414
<url>https://github.com/openapitools/openapi-generator</url>
1515
<scm>
1616
<connection>scm:git:[email protected]:openapitools/openapi-generator.git</connection>

CI/pom.xml.circleci.java7

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<artifactId>openapi-generator-project</artifactId>
1111
<packaging>pom</packaging>
1212
<name>openapi-generator-project</name>
13-
<version>3.0.1-SNAPSHOT</version>
13+
<version>3.0.1</version>
1414
<url>https://github.com/openapitools/openapi-generator</url>
1515
<scm>
1616
<connection>scm:git:[email protected]:openapitools/openapi-generator.git</connection>

CI/pom.xml.ios

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<artifactId>openapi-generator-project</artifactId>
1010
<packaging>pom</packaging>
1111
<name>openapi-generator-project</name>
12-
<version>3.0.1-SNAPSHOT</version>
12+
<version>3.0.1</version>
1313
<url>https://github.com/openapitools/openapi-generator</url>
1414
<scm>
1515
<connection>scm:git:[email protected]:openapitools/openapi-generator.git</connection>

CI/pom.xml.shippable

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66
</parent>
77
<modelVersion>4.0.0</modelVersion>
88
<groupId>org.openapitools</groupId>
9-
<artifactId>openapi-generator-project</artifactId>
9+
<artifactId>openapi-generator-shippable-pom</artifactId>
1010
<packaging>pom</packaging>
11-
<name>openapi-generator-project</name>
12-
<version>3.0.1-SNAPSHOT</version>
11+
<name>openapi-generator-shippable-pom</name>
12+
<version>3.0.1</version>
1313
<url>https://github.com/openapitools/openapi-generator</url>
1414
<scm>
1515
<connection>scm:git:[email protected]:openapitools/openapi-generator.git</connection>
@@ -858,10 +858,7 @@
858858
</profile>
859859
</profiles>
860860
<modules>
861-
<module>../modules/openapi-generator</module>
862-
<module>../modules/openapi-generator-cli</module>
863-
<module>../modules/openapi-generator-maven-plugin</module>
864-
<module>../modules/openapi-generator-online</module>
861+
<module>../</module>
865862
</modules>
866863
<reporting>
867864
<outputDirectory>target/site</outputDirectory>

CI/settings.xml

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,27 @@
1010
<username>${env.SONATYPE_USERNAME}</username>
1111
<password>${env.SONATYPE_PASSWORD}</password>
1212
</server>
13+
<server>
14+
<id>ossrh</id>
15+
<username>${env.SONATYPE_USERNAME}</username>
16+
<password>${env.SONATYPE_PASSWORD}</password>
17+
</server>
1318
</servers>
1419
<mirrors/>
1520
<proxies/>
16-
<profiles/>
21+
<profiles>
22+
<profile>
23+
<id>release</id>
24+
<activation>
25+
<activeByDefault>true</activeByDefault>
26+
</activation>
27+
<properties>
28+
<gpg.executable>gpg</gpg.executable>
29+
<gpg.keyname>${env.SIGNING_KEY}</gpg.keyname>
30+
<gpg.passphrase>${env.SIGNING_PASSPHRASE}</gpg.passphrase>
31+
<gpg.secretKeyring>${env.TRAVIS_BUILD_DIR}/sec.gpg</gpg.secretKeyring>
32+
</properties>
33+
</profile>
34+
</profiles>
1735
<activeProfiles/>
1836
</settings>

README.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ OpenAPI Generator Version | Release Date | OpenAPI Spec compatibility | Notes
7676
---------------------------- | ------------ | -------------------------- | -----
7777
4.0.0 (upcoming major release) | TBD | 1.0, 1.1, 1.2, 2.0, 3.0 | Major release with breaking changes (no fallback)
7878
3.1.0 (upcoming minor release) | TBD | 1.0, 1.1, 1.2, 2.0, 3.0 | Minor release with breaking changes (with fallbacks)
79-
3.0.1 (current master, upcoming release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/3.0.1-SNAPSHOT/)| TBD | 1.0, 1.1, 1.2, 2.0, 3.0 | Bug fixes release
79+
3.0.1 (current master, upcoming release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/3.0.1/)| TBD | 1.0, 1.1, 1.2, 2.0, 3.0 | Bug fixes release
8080
3.0.0 | 01.06.2018 | 1.0, 1.1, 1.2, 2.0, 3.0 | First release with breaking changes
8181

8282
### [1.2 - Artifacts on Maven Central](#table-of-contents)
@@ -393,17 +393,23 @@ The OpenAPI Generator project is intended as a benefit for users of the Open API
393393
When code is generated from this project, it shall be considered **AS IS** and owned by the user of the software. There are no warranties--expressed or implied--for generated code. You can do what you wish with it, and once generated, the code is your responsibility and subject to the licensing terms that you deem appropriate.
394394

395395
## [4 - Companies/Projects using OpenAPI Generator](#table-of-contents)
396-
Here are some companies/projects using OpenAPI Generator in production. To add your company/project to the list, please visit [README.md](README.md) and click on the icon to edit the page.
396+
Here are some companies/projects (alphabetical order) using OpenAPI Generator in production. To add your company/project to the list, please visit [README.md](README.md) and click on the icon to edit the page.
397397

398-
- [REST United](https://restunited.com)
399-
- [Raiffeisen Schweiz Genossenschaft](https://www.raiffeisen.ch)
398+
- [Angular.Schule](https://angular.schule/)
400399
- [Bithost GmbH](https://www.bithost.ch)
400+
- [GMO Pepabo](https://pepabo.com/en/)
401+
- [Raiffeisen Schweiz Genossenschaft](https://www.raiffeisen.ch)
402+
- [REST United](https://restunited.com)
403+
- [unblu inc.](https://www.unblu.com/)
404+
401405

402406
## [5 - Presentations/Videos/Tutorials/Books](#table-of-contents)
403407

404408
- 2018/05/12 - [OpenAPI Generator - community drivenで成長するコードジェネレータ](https://ackintosh.github.io/blog/2018/05/12/openapi-generator/) by [中野暁人](https://github.com/ackintosh)
405409
- 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)
406410
- 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)
411+
- 2018/04/12 - [Generate Angular API clients with Swagger](https://angular.schule/blog/2018-04-swagger-codegen) by [JohannesHoppe](https://github.com/JohannesHoppe)
412+
- 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)
407413

408414
## [6 - About Us](#table-of-contents)
409415

bin/pistache-server-petstore.sh renamed to bin/cpp-pistache-server-petstore.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,6 @@ fi
2727

2828
# if you've executed sbt assembly previously it will use that instead.
2929
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
30-
ags="generate -g cpp-pistache-server -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -o samples/server/petstore/pistache-server $@"
30+
ags="generate -g cpp-pistache-server -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -o samples/server/petstore/cpp-pistache $@"
3131

3232
java $JAVA_OPTS -jar $executable $ags

bin/qt5-petstore.sh renamed to bin/cpp-qt5-petstore.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,6 @@ fi
2727

2828
# if you've executed sbt assembly previously it will use that instead.
2929
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
30-
ags="generate -t modules/openapi-generator/src/main/resources/qt5cpp -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g cpp-qt5 -o samples/client/petstore/qt5cpp $@"
30+
ags="generate -t modules/openapi-generator/src/main/resources/qt5cpp -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g cpp-qt5 -o samples/client/petstore/cpp-qt5 $@"
3131

3232
java $JAVA_OPTS -jar $executable $ags

bin/restbed-petstore-server.sh renamed to bin/cpp-restbed-petstore-server.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,6 @@ fi
2727

2828
# if you've executed sbt assembly previously it will use that instead.
2929
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
30-
ags="generate -g cpp-restbed-server -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -o samples/server/petstore/restbed $@"
30+
ags="generate -g cpp-restbed-server -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -o samples/server/petstore/cpp-restbed $@"
3131

3232
java $JAVA_OPTS -jar $executable $ags

bin/cpprest-petstore.sh renamed to bin/cpp-restsdk-petstore.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,6 @@ fi
2727

2828
# if you've executed sbt assembly previously it will use that instead.
2929
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
30-
ags="generate -t modules/openapi-generator/src/main/resources/cpprest -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g cpp-restsdk -o samples/client/petstore/cpprest $@"
30+
ags="generate -t modules/openapi-generator/src/main/resources/cpprest -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g cpp-restsdk -o samples/client/petstore/cpp-restsdk $@"
3131

3232
java $JAVA_OPTS -jar $executable $ags

bin/tizen-petstore.sh renamed to bin/cpp-tizen-petstore.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,6 @@ fi
2727

2828
# if you've executed sbt assembly previously it will use that instead.
2929
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
30-
ags="generate -t modules/openapi-generator/src/main/resources/tizen -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g cpp-tizen -o samples/client/petstore/tizen $@"
30+
ags="generate -t modules/openapi-generator/src/main/resources/tizen -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g cpp-tizen -o samples/client/petstore/cpp-tizen $@"
3131

3232
java $JAVA_OPTS -jar $executable $ags

bin/ensure-up-to-date

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ sleep 5
1212
# LIST OF SCRIPTS:
1313
./bin/ruby-petstore.sh
1414
./bin/java-petstore-all.sh
15+
./bin/java-jaxrs-petstore-server-all.sh
1516
./bin/spring-all-pestore.sh
1617
./bin/kotlin-client-petstore.sh
1718
./bin/kotlin-client-string.sh
@@ -29,8 +30,11 @@ sleep 5
2930
if [ -n "$(git status --porcelain)" ]; then
3031
echo "UNCOMMITTED CHANGES ERROR"
3132
echo "There are uncommitted changes in working tree after execution of 'bin/ensure-up-to-date'"
33+
echo "Perform git diff"
34+
git --no-pager diff
35+
echo "Perform git status"
3236
git status
33-
echo "Please run 'bin/ensure-up-to-date' locally and commit changes"
37+
echo "Please run 'bin/ensure-up-to-date' locally and commit changes (UNCOMMITTED CHANGES ERROR)"
3438
exit 1
3539
else
3640
echo "Git working tree is clean"

bin/java-jaxrs-petstore-server-all.sh

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#!/bin/sh
2+
# script to run all generators extending AbstractJavaJAXRSServerCodegen
3+
4+
./bin/jaxrs-petstore-server-datelib-j8.sh
5+
./bin/jaxrs-cxf-cdi-petstore-server.sh
6+
./bin/jaxrs-cxf-petstore-server-annotated-base-path.sh
7+
./bin/jaxrs-cxf-petstore-server-non-spring-application.sh
8+
./bin/jaxrs-cxf-petstore-server.sh
9+
./bin/jaxrs-jersey1-petstore-server.sh
10+
./bin/jaxrs-jersey1-usetags-petstore-server.sh
11+
./bin/jaxrs-petstore-server.sh
12+
./bin/jaxrs-resteasy-eap-java8-petstore-server.sh
13+
./bin/jaxrs-resteasy-eap-joda-petstore-server.sh
14+
./bin/jaxrs-resteasy-eap-petstore-server.sh
15+
./bin/jaxrs-resteasy-joda-petstore-server.sh
16+
./bin/jaxrs-resteasy-petstore-server.sh
17+
./bin/jaxrs-spec-petstore-server-interface.sh
18+
./bin/jaxrs-spec-petstore-server.sh
19+
./bin/jaxrs-usetags-petstore-server.sh

bin/openapi3/qt5-petstore.sh renamed to bin/openapi3/cpp-qt5-petstore.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,6 @@ fi
2727

2828
# if you've executed sbt assembly previously it will use that instead.
2929
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
30-
ags="generate -t modules/openapi-generator/src/main/resources/qt5cpp -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g cpp-qt5 -o samples/client/petstore/qt5cpp $@"
30+
ags="generate -t modules/openapi-generator/src/main/resources/qt5cpp -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g cpp-qt5 -o samples/client/petstore/cpp-qt5 $@"
3131

3232
java $JAVA_OPTS -jar $executable $ags

bin/openapi3/tizen-petstore.sh renamed to bin/openapi3/cpp-tizen-petstore.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,6 @@ fi
2727

2828
# if you've executed sbt assembly previously it will use that instead.
2929
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
30-
ags="generate -t modules/openapi-generator/src/main/resources/tizen -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g cpp-tizen -o samples/client/petstore/tizen $@"
30+
ags="generate -t modules/openapi-generator/src/main/resources/tizen -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g cpp-tizen -o samples/client/petstore/cpp-tizen $@"
3131

3232
java $JAVA_OPTS -jar $executable $ags

bin/security/qt5cpp-petstore.sh renamed to bin/security/cpp-qt5-petstore.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,6 @@ fi
2727

2828
# if you've executed sbt assembly previously it will use that instead.
2929
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
30-
ags="generate -t modules/openapi-generator/src/main/resources/qt5cpp -i modules/openapi-generator/src/test/resources/2_0/petstore-security-test.yaml -g cpp-qt5 -o samples/client/petstore-security-test/qt5cpp $@"
30+
ags="generate -t modules/openapi-generator/src/main/resources/qt5cpp -i modules/openapi-generator/src/test/resources/2_0/petstore-security-test.yaml -g cpp-qt5 -o samples/client/petstore-security-test/cpp-qt5 $@"
3131

3232
java $JAVA_OPTS -jar $executable $ags

bin/utils/release_version_update.sh

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
#!/bin/bash
2+
#
3+
# usage: ./bin/utils/release_version_update.sh 3.0.1-SNAPSHOT 3.0.1
4+
#
5+
# Copyright 2018 OpenAPI-Generator Contributors (https://openapi-generator.tech)
6+
#
7+
# Licensed under the Apache License, Version 2.0 (the "License");
8+
# you may not use this file except in compliance with the License.
9+
# You may obtain a copy of the License at
10+
#
11+
# http://www.apache.org/licenses/LICENSE-2.0
12+
#
13+
# Unless required by applicable law or agreed to in writing, software
14+
# distributed under the License is distributed on an "AS IS" BASIS,
15+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16+
# See the License for the specific language governing permissions and
17+
# limitations under the License.
18+
#
19+
20+
if [[ "$1" != "" ]]; then
21+
FROM="$1"
22+
else
23+
echo "Missing argument. Usage e.g.: ./bin/utils/release_version_update.sh 3.0.1-SNAPSHOT 3.0.1"
24+
exit 1;
25+
fi
26+
27+
if [[ "$2" != "" ]]; then
28+
TO="$2"
29+
else
30+
echo "Missing argument. Usage e.g.: ./bin/utils/release_version_update.sh 3.0.1-SNAPSHOT 3.0.1"
31+
exit 1;
32+
fi
33+
34+
35+
echo "IMPORTANT: this script works on Mac only"
36+
echo "Release preparation: replacing $FROM with $TO in different files"
37+
38+
declare -a files=("CI/pom.xml.bash"
39+
"CI/pom.xml.circleci"
40+
"CI/pom.xml.circleci.java7"
41+
"CI/pom.xml.ios"
42+
"CI/pom.xml.shippable"
43+
"modules/openapi-generator-cli/pom.xml"
44+
"modules/openapi-generator-gradle-plugin/README.adoc"
45+
"modules/openapi-generator-gradle-plugin/gradle.properties"
46+
"modules/openapi-generator-gradle-plugin/pom.xml"
47+
"modules/openapi-generator-gradle-plugin/samples/local-spec/build.gradle"
48+
"modules/openapi-generator-maven-plugin/pom.xml"
49+
"modules/openapi-generator-online/pom.xml"
50+
"modules/openapi-generator/pom.xml"
51+
"modules/openapi-generator-online/Dockerfile"
52+
"pom.xml"
53+
"README.md")
54+
55+
for filename in "${files[@]}"; do
56+
# e.g. sed -i '' "s/3.0.1-SNAPSHOT/3.0.1/g" CI/pom.xml.bash
57+
#echo "Running command: sed -i '' "s/$FROM/$TO/g" $filename"
58+
if sed -i '' "s/$FROM/$TO/g" $filename; then
59+
echo "Updated $filename successfully!"
60+
else
61+
echo "ERROR: Failed to update $filename with the following command"
62+
echo "sed -i '' \"s/$FROM/$TO/g\" $filename"
63+
fi
64+
done

bin/windows/qt5cpp-petstore.bat renamed to bin/windows/cpp-qt5-petstore.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ If Not Exist %executable% (
55
)
66

77
REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M
8-
set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g cpp-qt5 -o samples\client\petstore\qt5cpp
8+
set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g cpp-qt5 -o samples\client\petstore\cpp-qt5
99

1010
java %JAVA_OPTS% -jar %executable% %ags%

bin/windows/cpprest-petstore.bat renamed to bin/windows/cpp-restsdk-petstore.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ If Not Exist %executable% (
55
)
66

77
REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -DloggerPath=conf/log4j.properties
8-
set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g cpp-restsdk -o samples\client\petstore\cpprest
8+
set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g cpp-restsdk -o samples\client\petstore\cpp-restsdk
99

1010
java %JAVA_OPTS% -jar %executable% %ags%

bin/windows/tizen-petstore.bat renamed to bin/windows/cpp-tizen-petstore.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ If Not Exist %executable% (
55
)
66

77
REM set JAVA_OPTS=%JAVA_OPTS% Xmx1024M
8-
set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g cpp-tizen -o samples\client\petstore\tizen
8+
set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g cpp-tizen -o samples\client\petstore\cpp-tizen
99

1010
java %JAVA_OPTS% -jar %executable% %ags%

0 commit comments

Comments
 (0)