Skip to content

Commit 34a0893

Browse files
authored
Merge branch 'master' into java8-instant
2 parents daf52d2 + 680b32f commit 34a0893

File tree

1,428 files changed

+49268
-22462
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,428 files changed

+49268
-22462
lines changed

README.md

Lines changed: 85 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,19 @@
22

33
[![Build Status](https://img.shields.io/jenkins/s/https/jenkins.swagger.io/view/OSS%20-%20Java/job/oss-swagger-core-master-java-8.svg)](https://jenkins.swagger.io/view/OSS%20-%20Java/job/oss-swagger-core-master-java-8)
44

5-
- Master (2.4.1): [![Build Status](https://img.shields.io/travis/swagger-api/swagger-codegen/master.svg?label=Petstore%20Integration%20Test)](https://travis-ci.org/swagger-api/swagger-codegen)
5+
[![Build Status](https://jenkins.swagger.io/view/OSS%20-%20Java/job/oss-swagger-codegen-master/badge/icon?subject=jenkins%20build)](https://jenkins.swagger.io/view/OSS%20-%20Java/job/oss-swagger-codegen-master/)
6+
7+
[![Build Status](https://jenkins.swagger.io/view/OSS%20-%20Java/job/oss-swagger-codegen-master-java7/badge/icon?subject=jenkins%20build%20-%20java%207)](https://jenkins.swagger.io/view/OSS%20-%20Java/job/oss-swagger-codegen-master-java7/)
8+
9+
- Master (2.4.8): [![Build Status](https://img.shields.io/travis/swagger-api/swagger-codegen/master.svg?label=Petstore%20Integration%20Test)](https://travis-ci.org/swagger-api/swagger-codegen)
610
[![Java Test](https://img.shields.io/jenkins/s/https/jenkins.swagger.io/view/OSS%20-%20Java/job/oss-swagger-codegen-master.svg)](https://jenkins.swagger.io/view/OSS%20-%20Java/job/oss-swagger-codegen-master)
711
[![Windows Test](https://ci.appveyor.com/api/projects/status/github/swagger-api/swagger-codegen?branch=master&svg=true&passingText=Windows%20Test%20-%20OK&failingText=Windows%20Test%20-%20Fails)](https://ci.appveyor.com/project/swaggerhub-bot/swagger-codegen)
8-
- 3.0.0: [![Build Status](https://img.shields.io/travis/swagger-api/swagger-codegen/3.0.0.svg?label=Petstore%20Integration%20Test)](https://travis-ci.org/swagger-api/swagger-codegen)
12+
- 3.0.11: [![Build Status](https://img.shields.io/travis/swagger-api/swagger-codegen/3.0.0.svg?label=Petstore%20Integration%20Test)](https://travis-ci.org/swagger-api/swagger-codegen)
913
[![Java Test](https://img.shields.io/jenkins/s/https/jenkins.swagger.io/view/OSS%20-%20Java/job/oss-swagger-codegen-3.svg)](https://jenkins.swagger.io/view/OSS%20-%20Java/job/oss-swagger-codegen-3)
1014
[![Windows Test](https://ci.appveyor.com/api/projects/status/github/swagger-api/swagger-codegen?branch=3.0.0&svg=true&passingText=Windows%20Test%20-%20OK&failingText=Windows%20Test%20-%20Fails)](https://ci.appveyor.com/project/swaggerhub-bot/swagger-codegen)
1115

1216

13-
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/io.swagger/swagger-codegen-project/badge.svg?style=plastic)](https://maven-badges.herokuapp.com/maven-central/io.swagger/swagger-codegen-project)
14-
[![PR Stats](http://issuestats.com/github/swagger-api/swagger-codegen/badge/pr)](http://issuestats.com/github/swagger-api/swagger-codegen) [![Issue Stats](http://issuestats.com/github/swagger-api/swagger-codegen/badge/issue)](http://issuestats.com/github/swagger-api/swagger-codegen)
17+
[Maven Central](https://maven-badges.herokuapp.com/maven-central/io.swagger/swagger-codegen-project)
1518

1619
:star::star::star: If you would like to contribute, please refer to [guidelines](https://github.com/swagger-api/swagger-codegen/blob/master/CONTRIBUTING.md) and a list of [open tasks](https://github.com/swagger-api/swagger-codegen/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22).:star::star::star:
1720

@@ -23,6 +26,55 @@
2326

2427
: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.
2528

29+
## Versioning
30+
31+
**NOTE:** version 2.X (`io.swagger`) and 3.X (`io.swagger.codegen.v3`) have **different** group ids.
32+
33+
2.X and 3.X version lines of Swagger Codegen are available; 2.X (`master` branch) supports Swagger/OpenAPI version 2,
34+
while 3.X ([`3.0.0` branch](https://github.com/swagger-api/swagger-codegen/tree/3.0.0)) supports OpenAPI version 3 (and version 2 via spec conversion to version 3).
35+
[Online generator of version 3.X](https://github.com/swagger-api/swagger-codegen/tree/3.0.0#online-generators) supports both generation from Swagger/OpenAPI version 2 (by using engine + generators of 2.X) and version 3 specifications.
36+
37+
38+
**NOTE:** this document refers to version 2.X, check [here](https://github.com/swagger-api/swagger-codegen/tree/3.0.0) for 3.X.
39+
40+
41+
### Swagger Codegen 2.X ([`master` branch](https://github.com/swagger-api/swagger-codegen/tree/master))
42+
43+
Swagger Codegen 2.X supports Swagger/OpenAPI version 2.
44+
45+
group id: `io.swagger`
46+
maven central (maven plugin): https://mvnrepository.com/artifact/io.swagger/swagger-codegen-maven-plugin
47+
48+
dependency example:
49+
50+
```
51+
<dependency>
52+
<groupId>io.swagger</groupId>
53+
<artifactId>swagger-codegen-maven-plugin</artifactId>
54+
<version>2.4.8</version>
55+
</dependency>
56+
```
57+
58+
### Swagger Codegen 3.X ([`3.0.0` branch](https://github.com/swagger-api/swagger-codegen/tree/3.0.0))
59+
60+
Swagger Codegen 2.X supports OpenAPI version 3 (and version 2 via spec conversion to version 3)
61+
[Online generator of version 3.X](https://github.com/swagger-api/swagger-codegen/tree/3.0.0#online-generators) supports both generation from Swagger/OpenAPI version 2 (by using engine + generators of 2.X) and version 3 specifications.
62+
63+
group id: `io.swagger.codegen.v3`
64+
maven central: https://mvnrepository.com/artifact/io.swagger.codegen.v3
65+
66+
dependency example:
67+
68+
```
69+
<dependency>
70+
<groupId>io.swagger.codegen.v3</groupId>
71+
<artifactId>swagger-codegen-maven-plugin</artifactId>
72+
<version>3.0.11</version>
73+
</dependency>
74+
```
75+
76+
77+
2678
## Overview
2779
This is the Swagger Codegen project, which allows generation of API client libraries (SDK generation), server stubs and documentation automatically given an [OpenAPI Spec](https://github.com/OAI/OpenAPI-Specification). Currently, the following languages/frameworks are supported:
2880

@@ -81,14 +133,26 @@ The OpenAPI Specification has undergone 3 revisions since initial creation in 20
81133

82134
Swagger Codegen Version | Release Date | OpenAPI Spec compatibility | Notes
83135
-------------------------- | ------------ | -------------------------- | -----
84-
3.0.5-SNAPSHOT (current 3.0.0, upcoming minor release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/io/swagger/codegen/v3/swagger-codegen-cli/3.0.5-SNAPSHOT/)| TBD | 1.0, 1.1, 1.2, 2.0, 3.0 | Minor release
85-
[3.0.4](https://github.com/swagger-api/swagger-codegen/releases/tag/v3.0.4) (**current stable**) | 2019-01-16 | 1.0, 1.1, 1.2, 2.0, 3.0 | [tag v3.0.4](https://github.com/swagger-api/swagger-codegen/tree/v3.0.4)
136+
3.0.12-SNAPSHOT (current 3.0.0, upcoming minor release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/io/swagger/codegen/v3/swagger-codegen-cli/3.0.12-SNAPSHOT/)| TBD | 1.0, 1.1, 1.2, 2.0, 3.0 | Minor release
137+
[3.0.11](https://github.com/swagger-api/swagger-codegen/releases/tag/v3.0.11) (**current stable**) | 2019-08-24 | 1.0, 1.1, 1.2, 2.0, 3.0 | [tag v3.0.11](https://github.com/swagger-api/swagger-codegen/tree/v3.0.11)
138+
[3.0.10](https://github.com/swagger-api/swagger-codegen/releases/tag/v3.0.10) | 2019-07-11 | 1.0, 1.1, 1.2, 2.0, 3.0 | [tag v3.0.10](https://github.com/swagger-api/swagger-codegen/tree/v3.0.10)
139+
[3.0.9](https://github.com/swagger-api/swagger-codegen/releases/tag/v3.0.9) | 2019-06-28 | 1.0, 1.1, 1.2, 2.0, 3.0 | [tag v3.0.9](https://github.com/swagger-api/swagger-codegen/tree/v3.0.9)
140+
[3.0.8](https://github.com/swagger-api/swagger-codegen/releases/tag/v3.0.8) | 2019-04-25 | 1.0, 1.1, 1.2, 2.0, 3.0 | [tag v3.0.8](https://github.com/swagger-api/swagger-codegen/tree/v3.0.8)
141+
[3.0.7](https://github.com/swagger-api/swagger-codegen/releases/tag/v3.0.7) | 2019-03-26 | 1.0, 1.1, 1.2, 2.0, 3.0 | [tag v3.0.7](https://github.com/swagger-api/swagger-codegen/tree/v3.0.7)
142+
[3.0.5](https://github.com/swagger-api/swagger-codegen/releases/tag/v3.0.5) | 2019-02-18 | 1.0, 1.1, 1.2, 2.0, 3.0 | [tag v3.0.5](https://github.com/swagger-api/swagger-codegen/tree/v3.0.5)
143+
[3.0.4](https://github.com/swagger-api/swagger-codegen/releases/tag/v3.0.4) | 2019-01-16 | 1.0, 1.1, 1.2, 2.0, 3.0 | [tag v3.0.4](https://github.com/swagger-api/swagger-codegen/tree/v3.0.4)
86144
[3.0.3](https://github.com/swagger-api/swagger-codegen/releases/tag/v3.0.3) | 2018-11-30 | 1.0, 1.1, 1.2, 2.0, 3.0 | [tag v3.0.3](https://github.com/swagger-api/swagger-codegen/tree/v3.0.3)
87145
[3.0.2](https://github.com/swagger-api/swagger-codegen/releases/tag/v3.0.2)| 2018-10-19 | 1.0, 1.1, 1.2, 2.0, 3.0 | Minor release
88146
[3.0.1](https://github.com/swagger-api/swagger-codegen/releases/tag/v3.0.1)| 2018-10-05 | 1.0, 1.1, 1.2, 2.0, 3.0 | Major release with breaking changes
89147
[3.0.0](https://github.com/swagger-api/swagger-codegen/releases/tag/v3.0.0)| 2018-09-06 | 1.0, 1.1, 1.2, 2.0, 3.0 | Major release with breaking changes
90-
2.4.2-SNAPSHOT (current master, upcoming minor release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/io/swagger/swagger-codegen-cli/2.4.2-SNAPSHOT/)| TBD | 1.0, 1.1, 1.2, 2.0 | Minor release
91-
[2.4.1](https://github.com/swagger-api/swagger-codegen/releases/tag/v2.4.1) (**current stable**) | 2019-01-16 | 1.0, 1.1, 1.2, 2.0 | [tag v2.4.1](https://github.com/swagger-api/swagger-codegen/tree/v2.4.1)
148+
2.4.9-SNAPSHOT (current master, upcoming minor release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/io/swagger/swagger-codegen-cli/2.4.9-SNAPSHOT/)| TBD | 1.0, 1.1, 1.2, 2.0 | Minor release
149+
[2.4.8](https://github.com/swagger-api/swagger-codegen/releases/tag/v2.4.8) (**current stable**) | 2019-08-24 | 1.0, 1.1, 1.2, 2.0 | [tag v2.4.8](https://github.com/swagger-api/swagger-codegen/tree/v2.4.8)
150+
[2.4.7](https://github.com/swagger-api/swagger-codegen/releases/tag/v2.4.7) | 2019-07-11 | 1.0, 1.1, 1.2, 2.0 | [tag v2.4.7](https://github.com/swagger-api/swagger-codegen/tree/v2.4.7)
151+
[2.4.6](https://github.com/swagger-api/swagger-codegen/releases/tag/v2.4.6) | 2019-06-28 | 1.0, 1.1, 1.2, 2.0 | [tag v2.4.6](https://github.com/swagger-api/swagger-codegen/tree/v2.4.6)
152+
[2.4.5](https://github.com/swagger-api/swagger-codegen/releases/tag/v2.4.5) | 2019-04-25 | 1.0, 1.1, 1.2, 2.0 | [tag v2.4.5](https://github.com/swagger-api/swagger-codegen/tree/v2.4.5)
153+
[2.4.4](https://github.com/swagger-api/swagger-codegen/releases/tag/v2.4.4) | 2019-03-26 | 1.0, 1.1, 1.2, 2.0 | [tag v2.4.4](https://github.com/swagger-api/swagger-codegen/tree/v2.4.4)
154+
[2.4.2](https://github.com/swagger-api/swagger-codegen/releases/tag/v2.4.2) | 2019-02-18 | 1.0, 1.1, 1.2, 2.0 | [tag v2.4.2](https://github.com/swagger-api/swagger-codegen/tree/v2.4.2)
155+
[2.4.1](https://github.com/swagger-api/swagger-codegen/releases/tag/v2.4.1) | 2019-01-16 | 1.0, 1.1, 1.2, 2.0 | [tag v2.4.1](https://github.com/swagger-api/swagger-codegen/tree/v2.4.1)
92156
[2.4.0](https://github.com/swagger-api/swagger-codegen/releases/tag/v2.4.0) | 2018-11-30 | 1.0, 1.1, 1.2, 2.0 | [tag v2.4.0](https://github.com/swagger-api/swagger-codegen/tree/v2.4.0)
93157
[2.3.1](https://github.com/swagger-api/swagger-codegen/releases/tag/v2.3.1) | 2018-01-17 | 1.0, 1.1, 1.2, 2.0 | [tag v2.3.1](https://github.com/swagger-api/swagger-codegen/tree/v2.3.1)
94158
[2.3.0](https://github.com/swagger-api/swagger-codegen/releases/tag/v2.3.0) | 2017-12-21 | 1.0, 1.1, 1.2, 2.0 | [tag v2.3.0](https://github.com/swagger-api/swagger-codegen/tree/v2.3.0)
@@ -104,12 +168,12 @@ Swagger Codegen Version | Release Date | OpenAPI Spec compatibility | Notes
104168
If you're looking for the latest stable version, you can grab it directly from Maven.org (Java 7 runtime at a minimum):
105169

106170
```sh
107-
wget http://central.maven.org/maven2/io/swagger/swagger-codegen-cli/2.3.1/swagger-codegen-cli-2.3.1.jar -O swagger-codegen-cli.jar
171+
wget http://central.maven.org/maven2/io/swagger/swagger-codegen-cli/2.4.8/swagger-codegen-cli-2.4.8.jar -O swagger-codegen-cli.jar
108172

109173
java -jar swagger-codegen-cli.jar help
110174
```
111175

112-
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 swagger-codegen-cli.jar http://central.maven.org/maven2/io/swagger/swagger-codegen-cli/2.3.1/swagger-codegen-cli-2.3.1.jar`
176+
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 swagger-codegen-cli.jar http://central.maven.org/maven2/io/swagger/swagger-codegen-cli/2.4.8/swagger-codegen-cli-2.4.8.jar`
113177

114178
On a mac, it's even easier with `brew`:
115179
```sh
@@ -254,7 +318,7 @@ java -jar modules/swagger-codegen-cli/target/swagger-codegen-cli.jar generate \
254318
```
255319
(if you're on Windows, replace the last command with `java -jar modules\swagger-codegen-cli\target\swagger-codegen-cli.jar generate -i http://petstore.swagger.io/v2/swagger.json -l php -o c:\temp\php_api_client`)
256320

257-
You can also download the JAR (latest release) directly from [maven.org](http://central.maven.org/maven2/io/swagger/swagger-codegen-cli/2.3.1/swagger-codegen-cli-2.3.1.jar)
321+
You can also download the JAR (latest release) directly from [maven.org](http://central.maven.org/maven2/io/swagger/swagger-codegen-cli/2.4.8/swagger-codegen-cli-2.4.8.jar)
258322

259323
To get a list of **general** options available, please run `java -jar modules/swagger-codegen-cli/target/swagger-codegen-cli.jar help generate`
260324

@@ -762,6 +826,7 @@ Here are some companies/projects using Swagger Codegen in production. To add you
762826
- [Activehours](https://www.activehours.com/)
763827
- [Actonica](https://www.actonica.com)
764828
- [Acunetix](https://www.acunetix.com/)
829+
- [Adaptant](https://www.adaptant.io/)
765830
- [Atlassian](https://www.atlassian.com/)
766831
- [Autodesk](http://www.autodesk.com/)
767832
- [Avenida Compras S.A.](https://www.avenida.com.ar)
@@ -818,6 +883,7 @@ Here are some companies/projects using Swagger Codegen in production. To add you
818883
- [IBM](https://www.ibm.com)
819884
- [IMS Health](http://www.imshealth.com/en/solution-areas/technology-and-applications)
820885
- [Individual Standard IVS](http://www.individual-standard.com)
886+
- [INSPIDE](http://www.inspide.com)
821887
- [Intent HQ](http://www.intenthq.com)
822888
- [Kabuku](http://www.kabuku.co.jp/en)
823889
- [Kurio](https://kurio.co.id)
@@ -836,6 +902,7 @@ Here are some companies/projects using Swagger Codegen in production. To add you
836902
- [Mindera](http://mindera.com/)
837903
- [Mporium](http://mporium.com/)
838904
- [Neverfail](https://neverfail.com/)
905+
- [NexCap](http://www.nexess-solutions.com/fr/plateforme-iot/)
839906
- [NTT DATA](http://www.nttdata.com/)
840907
- [nViso](http://www.nviso.ch/)
841908
- [Okiok](https://www.okiok.com)
@@ -1111,6 +1178,9 @@ Who is eligible? Those who want to join must have at least 3 PRs merged into a g
11111178
| Swift | @ehyche (2017/08) |
11121179
| TypeScript | |
11131180

1181+
# Security contact
1182+
1183+
Please disclose any security-related issues or vulnerabilities by emailing [[email protected]](mailto:[email protected]), instead of using the public issue tracker.
11141184

11151185
# License information on Generated Code
11161186

@@ -1121,10 +1191,10 @@ The Swagger Codegen project is intended as a benefit for users of the Swagger /
11211191

11221192
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.
11231193

1124-
License
1125-
-------
1194+
# License
11261195

1127-
Copyright 2018 SmartBear Software
1196+
```
1197+
Copyright 2019 SmartBear Software
11281198
11291199
Licensed under the Apache License, Version 2.0 (the "License");
11301200
you may not use this file except in compliance with the License.
@@ -1135,3 +1205,4 @@ distributed under the License is distributed on an "AS IS" BASIS,
11351205
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11361206
See the License for the specific language governing permissions and
11371207
limitations under the License.
1208+
```

appveyor.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,27 @@
22
# Ref: http://www.yegor256.com/2015/01/10/windows-appveyor-maven.html
33
version: '{branch}-{build}'
44
os: Windows Server 2012
5+
skip_branch_with_pr: true
56
hosts:
67
petstore.swagger.io: 127.0.0.1
78
install:
89
- ps: |
910
Add-Type -AssemblyName System.IO.Compression.FileSystem
1011
if (!(Test-Path -Path "C:\maven" )) {
1112
(new-object System.Net.WebClient).DownloadFile(
12-
'http://www.us.apache.org/dist/maven/maven-3/3.2.5/binaries/apache-maven-3.2.5-bin.zip',
13+
'http://www.us.apache.org/dist/maven/maven-3/3.5.4/binaries/apache-maven-3.5.4-bin.zip',
1314
'C:\maven-bin.zip'
1415
)
1516
[System.IO.Compression.ZipFile]::ExtractToDirectory("C:\maven-bin.zip", "C:\maven")
1617
}
17-
- cmd: SET PATH=C:\maven\apache-maven-3.2.5\bin;%JAVA_HOME%\bin;%PATH%
18+
- cmd: SET PATH=C:\maven\apache-maven-3.5.4\bin;%JAVA_HOME%\bin;%PATH%
1819
- cmd: SET MAVEN_OPTS=-XX:MaxPermSize=2g -Xmx4g
1920
- cmd: SET JAVA_OPTS=-XX:MaxPermSize=2g -Xmx4g
20-
- cmd: SET M2_HOME=C:\maven\apache-maven-3.2.5
21+
- cmd: SET M2_HOME=C:\maven\apache-maven-3.5.4
2122
- cmd: dir/w
2223
# - cmd: RMDIR "C:\projects\swagger-codegen\swagger-samples" /S /Q
2324
- git clone https://github.com/wing328/swagger-samples
24-
- ps: Start-Process -FilePath 'C:\maven\apache-maven-3.2.5\bin\mvn' -ArgumentList 'jetty:run' -WorkingDirectory "$env:appveyor_build_folder\swagger-samples\java\java-jersey-jaxrs-ci"
25+
- ps: Start-Process -FilePath 'C:\maven\apache-maven-3.5.4\bin\mvn' -ArgumentList 'jetty:run' -WorkingDirectory "$env:appveyor_build_folder\swagger-samples\java\java-jersey-jaxrs-ci"
2526
build_script:
2627
# build C# API client
2728
- nuget restore samples\client\petstore\csharp\SwaggerClient\IO.Swagger.sln
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
#!/usr/bin/env bash
2+
3+
SCRIPT="$0"
4+
5+
while [ -h "$SCRIPT" ] ; do
6+
ls=`ls -ld "$SCRIPT"`
7+
link=`expr "$ls" : '.*-> \(.*\)$'`
8+
if expr "$link" : '/.*' > /dev/null; then
9+
SCRIPT="$link"
10+
else
11+
SCRIPT=`dirname "$SCRIPT"`/"$link"
12+
fi
13+
done
14+
15+
if [ ! -d "${APP_DIR}" ]; then
16+
APP_DIR=`dirname "$SCRIPT"`/..
17+
APP_DIR=`cd "${APP_DIR}"; pwd`
18+
fi
19+
20+
executable="./modules/swagger-codegen-cli/target/swagger-codegen-cli.jar"
21+
22+
if [ ! -f "$executable" ]
23+
then
24+
mvn clean package
25+
fi
26+
27+
# if you've executed sbt assembly previously it will use that instead.
28+
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
29+
ags="$@ generate -l aspnetcore -i modules/swagger-codegen/src/test/resources/2_0/petstore.yaml -o samples/server/petstore/aspnetcore-interface-controller --additional-properties packageGuid={3C799344-F285-4669-8FD5-7ED9B795D5C5} --additional-properties interface-controller=true"
30+
31+
java $JAVA_OPTS -jar $executable $ags
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
#!/usr/bin/env bash
2+
3+
SCRIPT="$0"
4+
5+
while [ -h "$SCRIPT" ] ; do
6+
ls=`ls -ld "$SCRIPT"`
7+
link=`expr "$ls" : '.*-> \(.*\)$'`
8+
if expr "$link" : '/.*' > /dev/null; then
9+
SCRIPT="$link"
10+
else
11+
SCRIPT=`dirname "$SCRIPT"`/"$link"
12+
fi
13+
done
14+
15+
if [ ! -d "${APP_DIR}" ]; then
16+
APP_DIR=`dirname "$SCRIPT"`/..
17+
APP_DIR=`cd "${APP_DIR}"; pwd`
18+
fi
19+
20+
executable="./modules/swagger-codegen-cli/target/swagger-codegen-cli.jar"
21+
22+
if [ ! -f "$executable" ]
23+
then
24+
mvn clean package
25+
fi
26+
27+
# if you've executed sbt assembly previously it will use that instead.
28+
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
29+
ags="$@ generate -l aspnetcore -i modules/swagger-codegen/src/test/resources/2_0/petstore.yaml -o samples/server/petstore/aspnetcore-interface-only --additional-properties packageGuid={3C799344-F285-4669-8FD5-7ED9B795D5C5} --additional-properties interface-only=true"
30+
31+
java $JAVA_OPTS -jar $executable $ags

0 commit comments

Comments
 (0)