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

Commit ced2f35

Browse files
committed
Merge branch 'master' into csharp-template-refactor
* master: (32 commits) Fixed date formatting in typescript node client (OpenAPITools#786) better explain usage (OpenAPITools#794) Fix float/double default value in C# generator (OpenAPITools#791) Enhancements to documentation generators (samples, default values, etc) (OpenAPITools#790) Remove duplicate variable declaration (OpenAPITools#792) Issue 758 root resource (OpenAPITools#771) Do not declare destructor as default when destructor is explicitly declared. (OpenAPITools#732) Fix C# client enum issue (OpenAPITools#774) [JavaScript] Update vulnerable dependencies (OpenAPITools#784) [Ruby] Fix method split (OpenAPITools#780) [Java][jaxrs-jersey] add sample with jaxrs-jersey + openapi v3 (OpenAPITools#778) update groupId in pom (OpenAPITools#779) [cpp-restsdk] Support multi-line descriptions (OpenAPITools#753) [Core] Resolve Inline Models (OpenAPITools#736) [gradle] Support nullable system property values (OpenAPITools#764) Correct URL for openapi-generator.cli.sh in README.md (OpenAPITools#770) Fixed the generation of model properties whose data type is a composed (allOf) schema (OpenAPITools#704) [JAX-RS][Spec] Add samples to CircleCI (OpenAPITools#759) minor update to python generator usage (OpenAPITools#762) [C++][Restbed/Pistache] Added fix for byte array (OpenAPITools#752) ...
2 parents 392cfeb + 08ca54d commit ced2f35

File tree

1,174 files changed

+34784
-3517
lines changed

Some content is hidden

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

1,174 files changed

+34784
-3517
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
- [ ] Read the [contribution guidelines](https://github.com/openapitools/openapi-generator/blob/master/CONTRIBUTING.md).
44
- [ ] 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\`.
5-
- [ ] Filed the PR against the [correct branch](https://github.com/OpenAPITools/openapi-generator/wiki/Git-Branches): `master`, `4.0.x`. Default: `master`.
5+
- [ ] Filed the PR against the [correct branch](https://github.com/OpenAPITools/openapi-generator/wiki/Git-Branches): `master`, `3.3.x`, `4.0.x`. Default: `master`.
66
- [ ] Copied the [technical committee](https://github.com/openapitools/openapi-generator/#62---openapi-generator-technical-committee) to review the pull request if your PR is targeting a particular programming language.
77

88
### Description of the PR

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.2.0-SNAPSHOT</version>
12+
<version>3.2.1-SNAPSHOT</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: 54 additions & 2 deletions
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.2.0-SNAPSHOT</version>
13+
<version>3.2.1-SNAPSHOT</version>
1414
<url>https://github.com/openapitools/openapi-generator</url>
1515
<scm>
1616
<connection>scm:git:[email protected]:openapitools/openapi-generator.git</connection>
@@ -607,6 +607,55 @@
607607
<module>samples/server/petstore/jaxrs/jersey1</module>
608608
</modules>
609609
</profile>
610+
<profile>
611+
<!-- openapi v3's one -->
612+
<id>jaxrs-jersey</id>
613+
<activation>
614+
<property>
615+
<name>env</name>
616+
<value>java</value>
617+
</property>
618+
</activation>
619+
<modules>
620+
<module>samples/server/petstore/jaxrs-jersey</module>
621+
</modules>
622+
</profile>
623+
<profile>
624+
<id>jaxrs-spec</id>
625+
<activation>
626+
<property>
627+
<name>env</name>
628+
<value>java</value>
629+
</property>
630+
</activation>
631+
<modules>
632+
<module>samples/server/petstore/jaxrs-spec</module>
633+
</modules>
634+
</profile>
635+
<profile>
636+
<id>jaxrs-spec-interface</id>
637+
<activation>
638+
<property>
639+
<name>env</name>
640+
<value>java</value>
641+
</property>
642+
</activation>
643+
<modules>
644+
<module>samples/server/petstore/jaxrs-spec-interface</module>
645+
</modules>
646+
</profile>
647+
<profile>
648+
<id>jaxrs-spec-interface-response</id>
649+
<activation>
650+
<property>
651+
<name>env</name>
652+
<value>java</value>
653+
</property>
654+
</activation>
655+
<modules>
656+
<module>samples/server/petstore/jaxrs-spec-interface-response</module>
657+
</modules>
658+
</profile>
610659
<profile>
611660
<id>typescript-fetch-client-tests-default</id>
612661
<activation>
@@ -862,6 +911,10 @@
862911
<module>samples/client/petstore/kotlin-threetenbp/</module>
863912
<module>samples/client/petstore/kotlin-string/</module>
864913
<!-- servers -->
914+
<module>samples/server/petstore/jaxrs-jersey</module>
915+
<module>samples/server/petstore/jaxrs-spec</module>
916+
<module>samples/server/petstore/jaxrs-spec-interface</module>
917+
<module>samples/server/petstore/jaxrs-spec-interface-response</module>
865918
<module>samples/server/petstore/java-vertx/rx</module>
866919
<module>samples/server/petstore/java-vertx/async</module>
867920
<module>samples/server/petstore/java-inflector</module>
@@ -901,7 +954,6 @@
901954
<module>samples/server/petstore/jaxrs-cxf-cdi</module>
902955
<module>samples/server/petstore/jaxrs-cxf-non-spring-app</module>
903956
<module>samples/server/petstore/java-msf4j</module>
904-
<module>samples/server/petstore/jaxrs-spec-interface</module>
905957
<module>samples/server/petstore/scala-lagom-server</module>
906958
<module>samples/server/petstore/scalatra</module>
907959
<module>samples/server/petstore/finch</module>

CI/pom.xml.circleci.java7

Lines changed: 54 additions & 2 deletions
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.2.0-SNAPSHOT</version>
13+
<version>3.2.1-SNAPSHOT</version>
1414
<url>https://github.com/openapitools/openapi-generator</url>
1515
<scm>
1616
<connection>scm:git:[email protected]:openapitools/openapi-generator.git</connection>
@@ -607,6 +607,55 @@
607607
<module>samples/server/petstore/jaxrs/jersey1</module>
608608
</modules>
609609
</profile>
610+
<profile>
611+
<!-- openapi v3's one -->
612+
<id>jaxrs-jersey</id>
613+
<activation>
614+
<property>
615+
<name>env</name>
616+
<value>java</value>
617+
</property>
618+
</activation>
619+
<modules>
620+
<module>samples/server/petstore/jaxrs-jersey</module>
621+
</modules>
622+
</profile>
623+
<profile>
624+
<id>jaxrs-spec</id>
625+
<activation>
626+
<property>
627+
<name>env</name>
628+
<value>java</value>
629+
</property>
630+
</activation>
631+
<modules>
632+
<module>samples/server/petstore/jaxrs-spec</module>
633+
</modules>
634+
</profile>
635+
<profile>
636+
<id>jaxrs-spec-interface</id>
637+
<activation>
638+
<property>
639+
<name>env</name>
640+
<value>java</value>
641+
</property>
642+
</activation>
643+
<modules>
644+
<module>samples/server/petstore/jaxrs-spec-interface</module>
645+
</modules>
646+
</profile>
647+
<profile>
648+
<id>jaxrs-spec-interface-response</id>
649+
<activation>
650+
<property>
651+
<name>env</name>
652+
<value>java</value>
653+
</property>
654+
</activation>
655+
<modules>
656+
<module>samples/server/petstore/jaxrs-spec-interface-response</module>
657+
</modules>
658+
</profile>
610659
<profile>
611660
<id>typescript-fetch-client-tests-default</id>
612661
<activation>
@@ -853,6 +902,10 @@
853902
<module>samples/client/petstore/java/google-api-client</module>
854903
<module>samples/client/petstore/kotlin/</module>
855904
<!-- servers -->
905+
<module>samples/server/petstore/jaxrs-jersey</module>
906+
<module>samples/server/petstore/jaxrs-spec</module>
907+
<module>samples/server/petstore/jaxrs-spec-interface</module>
908+
<module>samples/server/petstore/jaxrs-spec-interface-response</module>
856909
<module>samples/server/petstore/java-vertx/rx</module>
857910
<module>samples/server/petstore/java-vertx/async</module>
858911
<module>samples/server/petstore/java-inflector</module>
@@ -876,7 +929,6 @@
876929
<module>samples/server/petstore/jaxrs-cxf-cdi</module>
877930
<module>samples/server/petstore/jaxrs-cxf-non-spring-app</module>
878931
<module>samples/server/petstore/java-msf4j</module>
879-
<module>samples/server/petstore/jaxrs-spec-interface</module>
880932
</modules>
881933
</profile>
882934
</profiles>

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.2.0-SNAPSHOT</version>
12+
<version>3.2.1-SNAPSHOT</version>
1313
<url>https://github.com/openapitools/openapi-generator</url>
1414
<scm>
1515
<connection>scm:git:[email protected]:openapitools/openapi-generator.git</connection>

README.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<div align="center">
44

5-
[Master](https://github.com/OpenAPITools/openapi-generator/tree/master) (`3.2.0`): [![Build Status](https://img.shields.io/travis/OpenAPITools/openapi-generator/master.svg?label=Integration%20Test)](https://travis-ci.org/OpenAPITools/openapi-generator)
5+
[Master](https://github.com/OpenAPITools/openapi-generator/tree/master) (`3.2.1`): [![Build Status](https://img.shields.io/travis/OpenAPITools/openapi-generator/master.svg?label=Integration%20Test)](https://travis-ci.org/OpenAPITools/openapi-generator)
66
[![Integration Test2](https://circleci.com/gh/OpenAPITools/openapi-generator.svg?style=shield)](https://circleci.com/gh/OpenAPITools/openapi-generator)
77
[![Run Status](https://api.shippable.com/projects/5af6bf74e790f4070084a115/badge?branch=master)](https://app.shippable.com/github/OpenAPITools/openapi-generator)
88
[![Windows Test](https://ci.appveyor.com/api/projects/status/github/openapitools/openapi-generator?branch=master&svg=true&passingText=Windows%20Test%20-%20OK&failingText=Windows%20Test%20-%20Fails)](https://ci.appveyor.com/project/WilliamCheng/openapi-generator-wh2wu)
@@ -83,10 +83,12 @@ The OpenAPI Specification has undergone 3 revisions since initial creation in 20
8383
OpenAPI Generator Version | Release Date | OpenAPI Spec compatibility | Notes
8484
---------------------------- | ------------ | -------------------------- | -----
8585
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)
86-
3.2.0 (current master, 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)
86+
3.3.0 (upcoming minor release)| TBD | 1.0, 1.1, 1.2, 2.0, 3.0 | Minor release (breaking changes with fallbacks)
87+
3.2.1 (current master, upcoming patch release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/3.2.1-SNAPSHOT/)| TBD | 1.0, 1.1, 1.2, 2.0, 3.0 | Bugfix release
88+
[3.2.0](https://github.com/OpenAPITools/openapi-generator/releases/tag/v3.2.0) | 06.08.2018 | 1.0, 1.1, 1.2, 2.0, 3.0 | Bugfix release
8789
[3.1.2](https://github.com/OpenAPITools/openapi-generator/releases/tag/v3.1.2) | 25.07.2018 | 1.0, 1.1, 1.2, 2.0, 3.0 | Bugfix release
8890
[3.1.1](https://github.com/OpenAPITools/openapi-generator/releases/tag/v3.1.1) | 18.07.2018 | 1.0, 1.1, 1.2, 2.0, 3.0 | Bugfix release
89-
[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)
91+
[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 (breaking changes with fallbacks)
9092
[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
9193
[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
9294
[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
@@ -142,16 +144,16 @@ See the different versions of the [openapi-generator-cli](https://mvnrepository.
142144

143145
If you're looking for the latest stable version, you can grab it directly from Maven.org (Java 8 runtime at a minimum):
144146

145-
JAR location: `http://central.maven.org/maven2/org/openapitools/openapi-generator-cli/3.1.2/openapi-generator-cli-3.1.2.jar`
147+
JAR location: `http://central.maven.org/maven2/org/openapitools/openapi-generator-cli/3.2.0/openapi-generator-cli-3.2.0.jar`
146148

147149
For **Mac/Linux** users:
148150
```sh
149-
wget http://central.maven.org/maven2/org/openapitools/openapi-generator-cli/3.1.2/openapi-generator-cli-3.1.2.jar -O openapi-generator-cli.jar
151+
wget http://central.maven.org/maven2/org/openapitools/openapi-generator-cli/3.2.0/openapi-generator-cli-3.2.0.jar -O openapi-generator-cli.jar
150152
```
151153

152154
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.
153155
```
154-
Invoke-WebRequest -OutFile openapi-generator-cli.jar http://central.maven.org/maven2/org/openapitools/openapi-generator-cli/3.1.2/openapi-generator-cli-3.1.2.jar
156+
Invoke-WebRequest -OutFile openapi-generator-cli.jar http://central.maven.org/maven2/org/openapitools/openapi-generator-cli/3.2.0/openapi-generator-cli-3.2.0.jar
155157
```
156158

157159
After downloading the JAR, run `java -jar openapi-generator-cli.jar help` to show the usage.
@@ -172,7 +174,7 @@ An example of setting this up (NOTE: Always evaluate scripts curled from externa
172174

173175
```
174176
mkdir -p ~/bin/openapitools
175-
curl https://raw.githubusercontent.com/OpenAPITools/openapi-generator/master/bin/utils/openapi-generator.cli.sh > ~/bin/openapitools/openapi-generator-cli
177+
curl https://raw.githubusercontent.com/OpenAPITools/openapi-generator/master/bin/utils/openapi-generator-cli.sh > ~/bin/openapitools/openapi-generator-cli
176178
chmod u+x ~/bin/openapitools/openapi-generator-cli
177179
export PATH=$PATH:~/bin/openapitools/
178180
```

appveyor.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,19 @@ build_script:
3535
# install openapi-generator locally
3636
- mvn clean install --quiet
3737
test_script:
38+
# restore test-related files
39+
- copy /b/v/y CI\samples.ci\client\petstore\csharp\OpenAPIClient\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj samples\client\petstore\csharp\OpenAPIClient\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
3840
# test c# API client
3941
- nunit-console samples\client\petstore\csharp\OpenAPIClient\src\Org.OpenAPITools.Test\bin\Debug\Org.OpenAPITools.Test.dll --result=myresults.xml;format=AppVeyor
4042
# test c# API client (with PropertyChanged)
4143
- nunit-console samples\client\petstore\csharp\OpenAPIClientWithPropertyChanged\src\Org.OpenAPITools.Test\bin\Debug\Org.OpenAPITools.Test.dll --result=myresults.xml;format=AppVeyor
4244

4345
# generate all petstore clients
4446
- .\bin\windows\run-all-petstore.cmd
47+
48+
# generate all petstore clients (openapi3)
49+
- .\bin\openapi3\windows\run-all-petstore.cmd
50+
4551
cache:
4652
- C:\maven\
4753
- C:\Users\appveyor\.m2

bin/csharp-petstore.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,9 @@ fi
2929
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
3030
ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g csharp -o samples/client/petstore/csharp/OpenAPIClient --additional-properties packageGuid={321C8C3F-0156-40C1-AE42-D59761FB9B6C} $@"
3131

32+
java $JAVA_OPTS -jar $executable $ags
33+
3234
# restore csproj file
3335
echo "restore csproject file: CI/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj"
34-
cp ./CI/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj ./samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/
36+
cp ./CI/samples.ci/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj ./samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/
3537

36-
java $JAVA_OPTS -jar $executable $ags

bin/dynamic-html.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 -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g dynamic-html -o samples/dynamic-html $@"
30+
ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g dynamic-html -o samples/documentation/dynamic-html $@"
3131

3232
java $JAVA_OPTS -jar $executable $ags

bin/elm-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 -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g elm -o samples/client/petstore/elm $@"
30+
ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g elm -t modules/openapi-generator/src/main/resources/elm -o samples/client/petstore/elm $@"
3131

3232
java $JAVA_OPTS -jar $executable $ags

bin/html-markdown.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 -i modules/openapi-generator/src/test/resources/2_0/markdown.yaml -g html -o samples/html.md $@"
30+
ags="generate -i modules/openapi-generator/src/test/resources/2_0/markdown.yaml -g html -o samples/documentation/html.md $@"
3131

3232
java $JAVA_OPTS -jar $executable $ags

bin/html-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 -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g html -o samples/html $@"
30+
ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g html -o samples/documentation/html $@"
3131

3232
java $JAVA_OPTS -jar $executable $ags

bin/html2-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 -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g html2 -o samples/html2 --additional-properties hideGenerationTimestamp=true $@"
30+
ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g html2 -o samples/documentation/html2 --additional-properties hideGenerationTimestamp=true $@"
3131

3232
java $JAVA_OPTS -jar $executable $ags

bin/openapi3/csharp-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 $@ -i modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml -g csharp -o samples/client/petstore/csharp/OpenAPIClient --additional-properties packageGuid={321C8C3F-0156-40C1-AE42-D59761FB9B6C}"
30+
ags="generate $@ -i modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml -g csharp -o samples/openapi3/client/petstore/csharp/OpenAPIClient --additional-properties packageGuid={321C8C3F-0156-40C1-AE42-D59761FB9B6C}"
3131

3232
java $JAVA_OPTS -jar $executable $ags

bin/openapi3/jaxrs-jersey-petstore.sh

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
#!/bin/sh
2+
3+
SCRIPT="$0"
4+
echo "# START SCRIPT: $SCRIPT"
5+
6+
while [ -h "$SCRIPT" ] ; do
7+
ls=`ls -ld "$SCRIPT"`
8+
link=`expr "$ls" : '.*-> \(.*\)$'`
9+
if expr "$link" : '/.*' > /dev/null; then
10+
SCRIPT="$link"
11+
else
12+
SCRIPT=`dirname "$SCRIPT"`/"$link"
13+
fi
14+
done
15+
16+
if [ ! -d "${APP_DIR}" ]; then
17+
APP_DIR=`dirname "$SCRIPT"`/..
18+
APP_DIR=`cd "${APP_DIR}"; pwd`
19+
fi
20+
21+
executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar"
22+
23+
if [ ! -f "$executable" ]
24+
then
25+
mvn clean package
26+
fi
27+
28+
# if you've executed sbt assembly previously it will use that instead.
29+
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
30+
ags="generate --artifact-id "openapiv3-jaxrs-jersey-petstore-server" -t modules/openapi-generator/src/main/resources/JavaJaxRS/ -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g jaxrs-jersey -o samples/server/petstore/jaxrs-jersey $@"
31+
32+
java $JAVA_OPTS -jar $executable $ags

0 commit comments

Comments
 (0)