Skip to content

Commit 3c436a8

Browse files
authored
Merge branch 'master' into resolve_issue727
2 parents 3733249 + 31149a5 commit 3c436a8

File tree

652 files changed

+7056
-1280
lines changed

Some content is hidden

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

652 files changed

+7056
-1280
lines changed

CI/circle_parallel.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ if [ "$NODE_INDEX" = "1" ]; then
88
cp CI/pom.xml.circleci pom.xml
99
java -version
1010
mvn --quiet verify -Psamples
11+
elif [ "$NODE_INDEX" = "2" ]; then
12+
echo "Running node $NODE_INDEX to test ensure-up-to-date"
13+
./bin/utils/ensure-up-to-date
1114
else
1215
echo "Running node $NODE_INDEX to test CI/pom.xml.circleci.java7 ..."
1316
sudo update-java-alternatives -s java-1.7.0-openjdk-amd64

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.3-SNAPSHOT</version>
12+
<version>3.3.0-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: 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.2.3-SNAPSHOT</version>
13+
<version>3.3.0-SNAPSHOT</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.2.3-SNAPSHOT</version>
13+
<version>3.3.0-SNAPSHOT</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.2.3-SNAPSHOT</version>
12+
<version>3.3.0-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: 6 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.3`): [![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.3.0`): [![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,9 +83,8 @@ The OpenAPI Specification has undergone 3 revisions since initial creation in 20
8383
OpenAPI Generator Version | Release Date | 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 | Major release with breaking changes (no fallback)
86-
3.3.0 (upcoming minor release)| TBD | Minor release (breaking changes with fallbacks)
87-
3.2.3 (current master, upcoming patch release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/3.2.3-SNAPSHOT/)| TBD | Bugfix release
88-
[3.2.2](https://github.com/OpenAPITools/openapi-generator/releases/tag/v3.2.2) (latest stable release) | 22.08.2018 | Bugfix release
86+
3.3.0 (current master, upcoming minor release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/3.3.0-SNAPSHOT/) | 07.09.2018 | Minor release (breaking changes with fallbacks)
87+
[3.2.3](https://github.com/OpenAPITools/openapi-generator/releases/tag/v3.2.3) (latest stable release) | 30.08.2018 | Bugfix release
8988

9089
OpenAPI Spec compatibility: 1.0, 1.1, 1.2, 2.0, 3.0
9190

@@ -141,16 +140,16 @@ See the different versions of the [openapi-generator-cli](https://mvnrepository.
141140

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

144-
JAR location: `http://central.maven.org/maven2/org/openapitools/openapi-generator-cli/3.2.2/openapi-generator-cli-3.2.2.jar`
143+
JAR location: `http://central.maven.org/maven2/org/openapitools/openapi-generator-cli/3.2.3/openapi-generator-cli-3.2.3.jar`
145144

146145
For **Mac/Linux** users:
147146
```sh
148-
wget http://central.maven.org/maven2/org/openapitools/openapi-generator-cli/3.2.2/openapi-generator-cli-3.2.2.jar -O openapi-generator-cli.jar
147+
wget http://central.maven.org/maven2/org/openapitools/openapi-generator-cli/3.2.3/openapi-generator-cli-3.2.3.jar -O openapi-generator-cli.jar
149148
```
150149

151150
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.
152151
```
153-
Invoke-WebRequest -OutFile openapi-generator-cli.jar http://central.maven.org/maven2/org/openapitools/openapi-generator-cli/3.2.2/openapi-generator-cli-3.2.2.jar
152+
Invoke-WebRequest -OutFile openapi-generator-cli.jar http://central.maven.org/maven2/org/openapitools/openapi-generator-cli/3.2.3/openapi-generator-cli-3.2.3.jar
154153
```
155154

156155
After downloading the JAR, run `java -jar openapi-generator-cli.jar help` to show the usage.

bin/openapi3/jaxrs-jersey-petstore.sh

100644100755
File mode changed.

bin/utils/ensure-up-to-date

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ sleep 5
3333
./bin/openapi3/haskell-http-client-petstore.sh > /dev/null 2>&1
3434
./bin/csharp-petstore.sh > /dev/null 2>&1
3535
./bin/meta-codegen.sh > /dev/null 2>&1
36+
./bin/utils/export_docs_generators.sh > /dev/null 2>&1
3637

3738
# Check:
3839
if [ -n "$(git status --porcelain)" ]; then

bin/utils/export_docs_generators.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/bin/sh
2+
3+
SCRIPT="$0"
4+
echo "# START SCRIPT: $SCRIPT"
5+
6+
executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar"
7+
8+
for GENERATOR in $(java -jar $executable list --short | sed -e 's/,/\'$'\n''/g')
9+
do
10+
./bin/utils/export_generator.sh $GENERATOR
11+
done

bin/utils/export_generator.sh

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/bin/sh
2+
3+
SCRIPT="$0"
4+
echo "# START SCRIPT: $SCRIPT"
5+
6+
if [[ "$1" != "" ]]; then
7+
NAME="$1"
8+
else
9+
echo "Missing argument. Usage e.g.: ./bin/utils/export-generator.sh jaxrs-jersey"
10+
exit 1;
11+
fi
12+
13+
executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar"
14+
15+
java -jar $executable config-help -g $NAME | sed -e 's/CONFIG OPTIONS/CONFIG OPTIONS for \'$NAME'\'$'\n''/g' > docs/generators/$NAME.md
16+
17+
echo "Back to the [generators list](README.md)" >> docs/generators/$NAME.md

bin/utils/export_generators_readme.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/bin/sh
2+
3+
SCRIPT="$0"
4+
echo "# START SCRIPT: $SCRIPT"
5+
6+
executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar"
7+
8+
java -jar $executable list | sed -e 's/\([A-Z]*\) generators:/* \1 generators:/g' -e 's/- \([a-z0-9\-]*\)/- [\1]\(\1.md\)/g' > docs/generators/README.md

bin/utils/release_version_update.sh

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,6 @@ else
3131
exit 1;
3232
fi
3333

34-
35-
echo "IMPORTANT: this script works on Mac only"
3634
echo "Release preparation: replacing $FROM with $TO in different files"
3735

3836
declare -a files=("CI/pom.xml.bash"
@@ -45,12 +43,18 @@ declare -a files=("CI/pom.xml.bash"
4543
"modules/openapi-generator-maven-plugin/pom.xml"
4644
"modules/openapi-generator-online/pom.xml"
4745
"modules/openapi-generator/pom.xml"
46+
"samples/meta-codegen/lib/pom.xml"
4847
"pom.xml")
4948

49+
sedi () {
50+
# Cross-platform version of sed -i that works both on Mac and Linux
51+
sed --version >/dev/null 2>&1 && sed -i -e "$@" || sed -i "" "$@"
52+
}
53+
5054
for filename in "${files[@]}"; do
5155
# e.g. sed -i '' "s/3.0.1-SNAPSHOT/3.0.1/g" CI/pom.xml.bash
5256
#echo "Running command: sed -i '' "s/$FROM/$TO/g" $filename"
53-
if sed -i '' "s/$FROM/$TO/g" $filename; then
57+
if sedi "s/$FROM/$TO/g" $filename; then
5458
echo "Updated $filename successfully!"
5559
else
5660
echo "ERROR: Failed to update $filename with the following command"

bin/utils/release_version_update_docs.sh

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,6 @@ else
3131
exit 1;
3232
fi
3333

34-
35-
echo "IMPORTANT: this script works on Mac only"
3634
echo "Release preparation: replacing $FROM with $TO in different files"
3735

3836
declare -a files=("modules/openapi-generator-maven-plugin/README.md"
@@ -45,10 +43,15 @@ declare -a files=("modules/openapi-generator-maven-plugin/README.md"
4543
"modules/openapi-generator-gradle-plugin/samples/local-spec/README.md"
4644
"README.md")
4745

46+
sedi () {
47+
# Cross-platform version of sed -i that works both on Mac and Linux
48+
sed --version >/dev/null 2>&1 && sed -i -e "$@" || sed -i "" "$@"
49+
}
50+
4851
for filename in "${files[@]}"; do
4952
# e.g. sed -i '' "s/3.0.1-SNAPSHOT/3.0.1/g" CI/pom.xml.bash
5053
#echo "Running command: sed -i '' "s/$FROM/$TO/g" $filename"
51-
if sed -i '' "s/$FROM/$TO/g" $filename; then
54+
if sedi "s/$FROM/$TO/g" $filename; then
5255
echo "Updated $filename successfully!"
5356
else
5457
echo "ERROR: Failed to update $filename with the following command"

circle.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
machine:
1111
docker_layer_caching: true
1212
working_directory: ~/OpenAPITools/openapi-generator
13-
parallelism: 2
13+
parallelism: 3
1414
shell: /bin/bash --login
1515
environment:
1616
CIRCLE_ARTIFACTS: /tmp/circleci-artifacts

docs/generators/README.md

Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
The following generators are available:
2+
3+
* CLIENT generators:
4+
- [ada](ada.md)
5+
- [android](android.md)
6+
- [apex](apex.md)
7+
- [bash](bash.md)
8+
- [clojure](clojure.md)
9+
- [cpp-qt5](cpp-qt5.md)
10+
- [cpp-restsdk](cpp-restsdk.md)
11+
- [cpp-tizen](cpp-tizen.md)
12+
- [csharp](csharp.md)
13+
- [csharp-dotnet2](csharp-dotnet2.md)
14+
- [dart](dart.md)
15+
- [eiffel](eiffel.md)
16+
- [elixir](elixir.md)
17+
- [elm](elm.md)
18+
- [erlang-client](erlang-client.md)
19+
- [flash](flash.md)
20+
- [go](go.md)
21+
- [groovy](groovy.md)
22+
- [haskell-http-client](haskell-http-client.md)
23+
- [java](java.md)
24+
- [javascript](javascript.md)
25+
- [javascript-closure-angular](javascript-closure-angular.md)
26+
- [javascript-flowtyped](javascript-flowtyped.md)
27+
- [jaxrs-cxf-client](jaxrs-cxf-client.md)
28+
- [jmeter](jmeter.md)
29+
- [kotlin](kotlin.md)
30+
- [lua](lua.md)
31+
- [objc](objc.md)
32+
- [perl](perl.md)
33+
- [php](php.md)
34+
- [powershell](powershell.md)
35+
- [python](python.md)
36+
- [r](r.md)
37+
- [ruby](ruby.md)
38+
- [rust](rust.md)
39+
- [scala-akka](scala-akka.md)
40+
- [scala-gatling](scala-gatling.md)
41+
- [scala-httpclient](scala-httpclient.md)
42+
- [scalaz](scalaz.md)
43+
- [swift2-deprecated](swift2-deprecated.md)
44+
- [swift3](swift3.md)
45+
- [swift4](swift4.md)
46+
- [typescript-angular](typescript-angular.md)
47+
- [typescript-angularjs](typescript-angularjs.md)
48+
- [typescript-aurelia](typescript-aurelia.md)
49+
- [typescript-fetch](typescript-fetch.md)
50+
- [typescript-inversify](typescript-inversify.md)
51+
- [typescript-jquery](typescript-jquery.md)
52+
- [typescript-node](typescript-node.md)
53+
54+
55+
* SERVER generators:
56+
- [ada-server](ada-server.md)
57+
- [aspnetcore](aspnetcore.md)
58+
- [cpp-pistache-server](cpp-pistache-server.md)
59+
- [cpp-qt5-qhttpengine-server](cpp-qt5-qhttpengine-server.md)
60+
- [cpp-restbed-server](cpp-restbed-server.md)
61+
- [csharp-nancyfx](csharp-nancyfx.md)
62+
- [erlang-server](erlang-server.md)
63+
- [go-server](go-server.md)
64+
- [haskell](haskell.md)
65+
- [java-inflector](java-inflector.md)
66+
- [java-msf4j](java-msf4j.md)
67+
- [java-pkmst](java-pkmst.md)
68+
- [java-play-framework](java-play-framework.md)
69+
- [java-undertow-server](java-undertow-server.md)
70+
- [java-vertx](java-vertx.md)
71+
- [jaxrs-cxf](jaxrs-cxf.md)
72+
- [jaxrs-cxf-cdi](jaxrs-cxf-cdi.md)
73+
- [jaxrs-jersey](jaxrs-jersey.md)
74+
- [jaxrs-resteasy](jaxrs-resteasy.md)
75+
- [jaxrs-resteasy-eap](jaxrs-resteasy-eap.md)
76+
- [jaxrs-spec](jaxrs-spec.md)
77+
- [kotlin-server](kotlin-server.md)
78+
- [kotlin-spring](kotlin-spring.md)
79+
- [nodejs-server](nodejs-server.md)
80+
- [php-laravel](php-laravel.md)
81+
- [php-lumen](php-lumen.md)
82+
- [php-silex](php-silex.md)
83+
- [php-slim](php-slim.md)
84+
- [php-symfony](php-symfony.md)
85+
- [php-ze-ph](php-ze-ph.md)
86+
- [python-flask](python-flask.md)
87+
- [ruby-on-rails](ruby-on-rails.md)
88+
- [ruby-sinatra](ruby-sinatra.md)
89+
- [rust-server](rust-server.md)
90+
- [scala-finch](scala-finch.md)
91+
- [scala-lagom-server](scala-lagom-server.md)
92+
- [scalatra](scalatra.md)
93+
- [spring](spring.md)
94+
95+
96+
* DOCUMENTATION generators:
97+
- [cwiki](cwiki.md)
98+
- [dynamic-html](dynamic-html.md)
99+
- [html](html.md)
100+
- [html2](html2.md)
101+
- [openapi](openapi.md)
102+
- [openapi-yaml](openapi-yaml.md)
103+
104+
105+
* CONFIG generators:
106+
- [apache2](apache2.md)
107+
108+
109+

docs/generators/ada-server.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
2+
CONFIG OPTIONS for ada-server
3+
4+
sortParamsByRequiredFlag
5+
Sort method arguments to place required parameters before optional parameters. (Default: true)
6+
7+
ensureUniqueParams
8+
Whether to ensure parameter names are unique in an operation (rename parameters that are not). (Default: true)
9+
10+
allowUnicodeIdentifiers
11+
boolean, toggles whether unicode identifiers are allowed in names or not, default is false (Default: false)
12+
13+
prependFormOrBodyParameters
14+
Add form or body parameters to the beginning of the parameter list. (Default: false)
15+
16+
projectName
17+
GNAT project name (Default: defaultProject)
18+
19+
Back to the [generators list](README.md)

docs/generators/ada.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
2+
CONFIG OPTIONS for ada
3+
4+
sortParamsByRequiredFlag
5+
Sort method arguments to place required parameters before optional parameters. (Default: true)
6+
7+
ensureUniqueParams
8+
Whether to ensure parameter names are unique in an operation (rename parameters that are not). (Default: true)
9+
10+
allowUnicodeIdentifiers
11+
boolean, toggles whether unicode identifiers are allowed in names or not, default is false (Default: false)
12+
13+
prependFormOrBodyParameters
14+
Add form or body parameters to the beginning of the parameter list. (Default: false)
15+
16+
projectName
17+
GNAT project name (Default: defaultProject)
18+
19+
Back to the [generators list](README.md)

0 commit comments

Comments
 (0)