Skip to content

Commit 4c70390

Browse files
authored
Merge branch 'master' into master
2 parents cd65ce6 + 7cc9f9a commit 4c70390

File tree

12 files changed

+37
-27
lines changed

12 files changed

+37
-27
lines changed

README.md

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66

77
[![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/)
88

9-
- Master (2.4.24-SNAPSHOT): [![Java Test](https://img.shields.io/jenkins/build.svg?jobUrl=https://jenkins.swagger.io/job/oss-swagger-codegen-master)](https://jenkins.swagger.io/view/OSS%20-%20Java/job/oss-swagger-codegen-master)
9+
- Master (2.4.25-SNAPSHOT): [![Java Test](https://img.shields.io/jenkins/build.svg?jobUrl=https://jenkins.swagger.io/job/oss-swagger-codegen-master)](https://jenkins.swagger.io/view/OSS%20-%20Java/job/oss-swagger-codegen-master)
1010
[![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)
1111

12-
- 3.0.30-SNAPSHOT: [![Java Test](https://img.shields.io/jenkins/build.svg?jobUrl=https://jenkins.swagger.io/job/oss-swagger-codegen-3)](https://jenkins.swagger.io/view/OSS%20-%20Java/job/oss-swagger-codegen-3)
12+
- 3.0.31-SNAPSHOT: [![Java Test](https://img.shields.io/jenkins/build.svg?jobUrl=https://jenkins.swagger.io/job/oss-swagger-codegen-3)](https://jenkins.swagger.io/view/OSS%20-%20Java/job/oss-swagger-codegen-3)
1313
[![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)
1414

1515

@@ -50,7 +50,7 @@ dependency example:
5050
<dependency>
5151
<groupId>io.swagger</groupId>
5252
<artifactId>swagger-codegen-maven-plugin</artifactId>
53-
<version>2.4.23</version>
53+
<version>2.4.24</version>
5454
</dependency>
5555
```
5656

@@ -68,7 +68,7 @@ dependency example:
6868
<dependency>
6969
<groupId>io.swagger.codegen.v3</groupId>
7070
<artifactId>swagger-codegen-maven-plugin</artifactId>
71-
<version>3.0.29</version>
71+
<version>3.0.30</version>
7272
</dependency>
7373
```
7474

@@ -132,8 +132,9 @@ The OpenAPI Specification has undergone 3 revisions since initial creation in 20
132132

133133
Swagger Codegen Version | Release Date | OpenAPI Spec compatibility | Notes
134134
-------------------------- | ------------ | -------------------------- | -----
135-
3.0.30-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.30-SNAPSHOT/)| TBD | 1.0, 1.1, 1.2, 2.0, 3.0 | Minor release
136-
[3.0.29](https://github.com/swagger-api/swagger-codegen/releases/tag/v3.0.29) (**current stable**) | 2021-10-05 | 1.0, 1.1, 1.2, 2.0, 3.0 | [tag v3.0.29](https://github.com/swagger-api/swagger-codegen/tree/v3.0.29)
135+
3.0.31-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.31-SNAPSHOT/)| TBD | 1.0, 1.1, 1.2, 2.0, 3.0 | Minor release
136+
[3.0.30](https://github.com/swagger-api/swagger-codegen/releases/tag/v3.0.30) (**current stable**) | 2021-11-18 | 1.0, 1.1, 1.2, 2.0, 3.0 | [tag v3.0.30](https://github.com/swagger-api/swagger-codegen/tree/v3.0.30)
137+
[3.0.29](https://github.com/swagger-api/swagger-codegen/releases/tag/v3.0.29) | 2021-10-05 | 1.0, 1.1, 1.2, 2.0, 3.0 | [tag v3.0.29](https://github.com/swagger-api/swagger-codegen/tree/v3.0.29)
137138
[3.0.28](https://github.com/swagger-api/swagger-codegen/releases/tag/v3.0.28) | 2021-09-30 | 1.0, 1.1, 1.2, 2.0, 3.0 | [tag v3.0.28](https://github.com/swagger-api/swagger-codegen/tree/v3.0.28)
138139
[3.0.27](https://github.com/swagger-api/swagger-codegen/releases/tag/v3.0.27) | 2021-06-28 | 1.0, 1.1, 1.2, 2.0, 3.0 | [tag v3.0.27](https://github.com/swagger-api/swagger-codegen/tree/v3.0.27)
139140
[3.0.26](https://github.com/swagger-api/swagger-codegen/releases/tag/v3.0.26) | 2021-05-28 | 1.0, 1.1, 1.2, 2.0, 3.0 | [tag v3.0.26](https://github.com/swagger-api/swagger-codegen/tree/v3.0.26)
@@ -162,8 +163,9 @@ Swagger Codegen Version | Release Date | OpenAPI Spec compatibility | Notes
162163
[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
163164
[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
164165
[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
165-
2.4.24-SNAPSHOT (current master, upcoming minor release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/io/swagger/swagger-codegen-cli/2.4.24-SNAPSHOT/)| TBD | 1.0, 1.1, 1.2, 2.0 | Minor release
166-
[2.4.23](https://github.com/swagger-api/swagger-codegen/releases/tag/v2.4.23) (**current stable**) | 2021-10-08 | 1.0, 1.1, 1.2, 2.0 | [tag v2.4.23](https://github.com/swagger-api/swagger-codegen/tree/v2.4.23)
166+
2.4.25-SNAPSHOT (current master, upcoming minor release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/io/swagger/swagger-codegen-cli/2.4.25-SNAPSHOT/)| TBD | 1.0, 1.1, 1.2, 2.0 | Minor release
167+
[2.4.24](https://github.com/swagger-api/swagger-codegen/releases/tag/v2.4.24) (**current stable**) | 2021-11-18 | 1.0, 1.1, 1.2, 2.0 | [tag v2.4.24](https://github.com/swagger-api/swagger-codegen/tree/v2.4.24)
168+
[2.4.23](https://github.com/swagger-api/swagger-codegen/releases/tag/v2.4.23) | 2021-10-08 | 1.0, 1.1, 1.2, 2.0 | [tag v2.4.23](https://github.com/swagger-api/swagger-codegen/tree/v2.4.23)
167169
[2.4.22](https://github.com/swagger-api/swagger-codegen/releases/tag/v2.4.22) | 2021-09-30 | 1.0, 1.1, 1.2, 2.0 | [tag v2.4.22](https://github.com/swagger-api/swagger-codegen/tree/v2.4.22)
168170
[2.4.21](https://github.com/swagger-api/swagger-codegen/releases/tag/v2.4.21) | 2021-06-28 | 1.0, 1.1, 1.2, 2.0 | [tag v2.4.21](https://github.com/swagger-api/swagger-codegen/tree/v2.4.21)
169171
[2.4.20](https://github.com/swagger-api/swagger-codegen/releases/tag/v2.4.20) | 2021-05-28 | 1.0, 1.1, 1.2, 2.0 | [tag v2.4.20](https://github.com/swagger-api/swagger-codegen/tree/v2.4.20)
@@ -200,17 +202,17 @@ If you're looking for the latest stable version, you can grab it directly from M
200202

201203
```sh
202204
# Download current stable 2.x.x branch (Swagger and OpenAPI version 2)
203-
wget https://repo1.maven.org/maven2/io/swagger/swagger-codegen-cli/2.4.23/swagger-codegen-cli-2.4.23.jar -O swagger-codegen-cli.jar
205+
wget https://repo1.maven.org/maven2/io/swagger/swagger-codegen-cli/2.4.24/swagger-codegen-cli-2.4.24.jar -O swagger-codegen-cli.jar
204206

205207
java -jar swagger-codegen-cli.jar help
206208

207209
# Download current stable 3.x.x branch (OpenAPI version 3)
208-
wget https://repo1.maven.org/maven2/io/swagger/codegen/v3/swagger-codegen-cli/3.0.29/swagger-codegen-cli-3.0.29.jar -O swagger-codegen-cli.jar
210+
wget https://repo1.maven.org/maven2/io/swagger/codegen/v3/swagger-codegen-cli/3.0.30/swagger-codegen-cli-3.0.30.jar -O swagger-codegen-cli.jar
209211

210212
java -jar swagger-codegen-cli.jar --help
211213
```
212214

213-
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 https://repo1.maven.org/maven2/io/swagger/swagger-codegen-cli/2.4.23/swagger-codegen-cli-2.4.23.jar`
215+
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 https://repo1.maven.org/maven2/io/swagger/swagger-codegen-cli/2.4.24/swagger-codegen-cli-2.4.24.jar`
214216

215217
On a mac, it's even easier with `brew`:
216218
```sh
@@ -358,7 +360,7 @@ java -jar modules/swagger-codegen-cli/target/swagger-codegen-cli.jar generate \
358360
```
359361
(if you're on Windows, replace the last command with `java -jar modules\swagger-codegen-cli\target\swagger-codegen-cli.jar generate -i https://petstore.swagger.io/v2/swagger.json -l php -o c:\temp\php_api_client`)
360362

361-
You can also download the JAR (latest release) directly from [maven.org](https://repo1.maven.org/maven2/io/swagger/swagger-codegen-cli/2.4.23/swagger-codegen-cli-2.4.23.jar)
363+
You can also download the JAR (latest release) directly from [maven.org](https://repo1.maven.org/maven2/io/swagger/swagger-codegen-cli/2.4.24/swagger-codegen-cli-2.4.24.jar)
362364

363365
To get a list of **general** options available, please run `java -jar modules/swagger-codegen-cli/target/swagger-codegen-cli.jar help generate` (for version 3.x check [3.0.0 branch](https://github.com/swagger-api/swagger-codegen/tree/3.0.0))
364366

modules/swagger-codegen-cli/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<parent>
44
<groupId>io.swagger</groupId>
55
<artifactId>swagger-codegen-project</artifactId>
6-
<version>2.4.24-SNAPSHOT</version>
6+
<version>2.4.25-SNAPSHOT</version>
77
<relativePath>../..</relativePath>
88
</parent>
99
<modelVersion>4.0.0</modelVersion>

modules/swagger-codegen-maven-plugin/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<parent>
55
<groupId>io.swagger</groupId>
66
<artifactId>swagger-codegen-project</artifactId>
7-
<version>2.4.24-SNAPSHOT</version>
7+
<version>2.4.25-SNAPSHOT</version>
88
<relativePath>../..</relativePath>
99
</parent>
1010
<artifactId>swagger-codegen-maven-plugin</artifactId>

modules/swagger-codegen/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<parent>
44
<groupId>io.swagger</groupId>
55
<artifactId>swagger-codegen-project</artifactId>
6-
<version>2.4.24-SNAPSHOT</version>
6+
<version>2.4.25-SNAPSHOT</version>
77
<relativePath>../..</relativePath>
88
</parent>
99
<modelVersion>4.0.0</modelVersion>

modules/swagger-codegen/src/main/java/io/swagger/codegen/DefaultCodegen.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ public class DefaultCodegen {
103103
protected Boolean sortParamsByRequiredFlag = true;
104104
protected Boolean ensureUniqueParams = true;
105105
protected Boolean allowUnicodeIdentifiers = false;
106-
protected String gitUserId, gitRepoId, releaseNote, gitRepoBaseURL /*= "github"*/;
106+
protected String gitUserId, gitRepoId, releaseNote, gitRepoBaseURL;
107107
protected String httpUserAgent;
108108
protected Boolean hideGenerationTimestamp = true;
109109
protected Boolean skipAliasGeneration;

modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/PhpClientCodegen.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ public void processOpts() {
276276
this.setGitRepoBaseURL((String) additionalProperties.get(CodegenConstants.GIT_REPO_BASE_URL));
277277
} else {
278278
if (gitRepoBaseURL == null) {
279-
gitRepoBaseURL = "github";
279+
gitRepoBaseURL = "https://github.com";
280280
}
281281
additionalProperties.put(CodegenConstants.GIT_REPO_BASE_URL, gitRepoBaseURL);
282282

modules/swagger-codegen/src/main/resources/php/README.mustache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ To install the bindings via [Composer](http://getcomposer.org/), add the followi
3131
"repositories": [
3232
{
3333
"type": "git",
34-
"url": "https://{{gitRepoBaseURL}}.com/{{#composerVendorName}}{{.}}{{/composerVendorName}}{{^composerVendorName}}{{gitUserId}}{{/composerVendorName}}/{{#composerProjectName}}{{.}}{{/composerProjectName}}{{^composerProjectName}}{{gitRepoId}}{{/composerProjectName}}.git"
34+
"url": "{{gitRepoBaseURL}}/{{#composerVendorName}}{{.}}{{/composerVendorName}}{{^composerVendorName}}{{gitUserId}}{{/composerVendorName}}/{{#composerProjectName}}{{.}}{{/composerProjectName}}{{^composerProjectName}}{{gitRepoId}}{{/composerProjectName}}.git"
3535
}
3636
],
3737
"require": {

modules/swagger-codegen/src/main/resources/php/git_push.sh.mustache

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
git_user_id=$1
77
git_repo_id=$2
88
release_note=$3
9+
git_repo_base_url=$4
910

1011
if [ "$git_user_id" = "" ]; then
1112
git_user_id="{{{gitUserId}}}"
@@ -22,6 +23,11 @@ if [ "$release_note" = "" ]; then
2223
echo "[INFO] No command line input provided. Set \$release_note to $release_note"
2324
fi
2425

26+
if [ "$git_repo_base_url" = "" ]; then
27+
git_repo_base_url="{{{gitRepoBaseURL}}}"
28+
echo "[INFO] No command line input provided. Set \$git_repo_base_url to $git_repo_base_url"
29+
fi
30+
2531
# Initialize the local directory as a Git repository
2632
git init
2733

@@ -37,8 +43,10 @@ if [ "$git_remote" = "" ]; then # git remote not defined
3743

3844
if [ "$GIT_TOKEN" = "" ]; then
3945
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
40-
git remote add origin https://${git_repo_base_url}.com/${git_user_id}/${git_repo_id}.git
46+
git remote add origin ${git_repo_base_url}/${git_user_id}/${git_repo_id}.git
4147
else
48+
git_repo_base_url=${git_repo_base_url#*//}
49+
git_repo_base_url=${git_repo_base_url%%.*}
4250
git remote add origin https://${git_user_id}:${GIT_TOKEN}@${git_repo_base_url}.com/${git_user_id}/${git_repo_id}.git
4351
fi
4452

modules/swagger-codegen/src/test/java/io/swagger/codegen/DefaultGeneratorTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public void testPHPRepositoryBaseURLOption() throws Exception {
6565
codegenConfig.setOutputDir(output.getAbsolutePath());
6666
codegenConfig.setGitRepoId("test_repository");
6767
codegenConfig.setGitUserId("user");
68-
codegenConfig.setGitRepoBaseURL("gitlab");
68+
codegenConfig.setGitRepoBaseURL("https://gitlab.com");
6969

7070
ClientOptInput clientOptInput = new ClientOptInput().opts(new ClientOpts()).swagger(swagger).config(codegenConfig);
7171

@@ -103,7 +103,7 @@ public void testPHPRepositoryBaseURLOption_NoOption() throws Exception {
103103

104104
final File gitPush = new File(output, "/SwaggerClient-php/git_push.sh");
105105
assertTrue(gitPush.exists());
106-
assertFalse(FileUtils.readFileToString(gitPush).contains("https://github.com"));
106+
assertTrue(FileUtils.readFileToString(gitPush).contains("https://github.com"));
107107
}
108108

109109
@Test

modules/swagger-generator/pom.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<parent>
55
<groupId>io.swagger</groupId>
66
<artifactId>swagger-codegen-project</artifactId>
7-
<version>2.4.24-SNAPSHOT</version>
7+
<version>2.4.25-SNAPSHOT</version>
88
<relativePath>../..</relativePath>
99
</parent>
1010
<artifactId>swagger-generator</artifactId>
@@ -271,7 +271,7 @@
271271
<artifactId>jetty-deploy</artifactId>
272272
<version>${jetty-version}</version>
273273
</dependency>
274-
274+
275275
<dependency>
276276
<groupId>javax.xml.bind</groupId>
277277
<artifactId>jaxb-api</artifactId>
@@ -286,8 +286,8 @@
286286
<groupId>com.sun.xml.bind</groupId>
287287
<artifactId>jaxb-impl</artifactId>
288288
<version>2.3.0</version>
289-
</dependency>
290-
289+
</dependency>
290+
291291
<dependency>
292292
<groupId>org.eclipse.jetty</groupId>
293293
<artifactId>jetty-runner</artifactId>

0 commit comments

Comments
 (0)