Skip to content

Commit 87117ec

Browse files
committed
add versioning section to readme v3
1 parent cadae62 commit 87117ec

File tree

1 file changed

+61
-2
lines changed

1 file changed

+61
-2
lines changed

README.md

Lines changed: 61 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,64 @@
11
# <img src="https://raw.githubusercontent.com/swagger-api/swagger.io/wordpress/images/assets/SWC-logo-clr.png" height="80">
22

3+
[![Build Status](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)
4+
5+
- 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)
6+
[![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)
7+
[![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)
8+
- Master (2.4.4): [![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)
9+
[![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)
10+
[![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)
11+
12+
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/io.swagger.codegen.v3/swagger-codegen-project/badge.svg?style=plastic)](https://maven-badges.herokuapp.com/maven-central/io.swagger.codegen.v3/swagger-codegen-project)
13+
14+
:warning: If the OpenAPI/Swagger spec is obtained from an untrusted source, please make sure you've reviewed the spec before using Swagger Codegen to generate the API client, server stub or documentation as [code injection](https://en.wikipedia.org/wiki/Code_injection) may occur :warning:
15+
16+
## Versioning
17+
18+
**NOTE:** version 2.X (`io.swagger`) and 3.X (`io.swagger.codegen.v3`) have **different** group ids.
19+
20+
2.X and 3.X version lines of Swagger Codegen are available; 2.X ([`master` branch](https://github.com/swagger-api/swagger-codegen/tree/master)) supports Swagger/OpenAPI version 2,
21+
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).
22+
[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.
23+
24+
25+
**NOTE:** this document refers to version 3.X, check [here](https://github.com/swagger-api/swagger-codegen/tree/master) for 2.X.
26+
27+
### Swagger Codegen 3.X ([`3.0.0` branch](https://github.com/swagger-api/swagger-codegen/tree/3.0.0))
28+
29+
Swagger Codegen 2.X supports OpenAPI version 3 (and version 2 via spec conversion to version 3)
30+
[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.
31+
32+
group id: `io.swagger.codegen.v3`
33+
maven central: https://mvnrepository.com/artifact/io.swagger.codegen.v3
34+
35+
dependency example:
36+
37+
```
38+
<dependency>
39+
<groupId>io.swagger.codegen.v3</groupId>
40+
<artifactId>swagger-codegen-maven-plugin</artifactId>
41+
<version>3.0.7</version>
42+
</dependency>
43+
```
44+
45+
### Swagger Codegen 2.X ([`master` branch](https://github.com/swagger-api/swagger-codegen/tree/master))
46+
47+
Swagger Codegen 2.X supports Swagger/OpenAPI version 2.
48+
49+
group id: `io.swagger`
50+
maven central (maven plugin): https://mvnrepository.com/artifact/io.swagger/swagger-codegen-maven-plugin
51+
52+
dependency example:
53+
54+
```
55+
<dependency>
56+
<groupId>io.swagger</groupId>
57+
<artifactId>swagger-codegen-maven-plugin</artifactId>
58+
<version>2.4.4</version>
59+
</dependency>
60+
```
61+
362
## Overview
463
This is the Swagger Codegen project, which allows generation of API client libraries (SDK generation), server stubs and documentation automatically given an [OpenAPI Definition](https://github.com/OAI/OpenAPI-Specification). Currently, the following languages/frameworks are supported:
564

@@ -81,12 +140,12 @@ Swagger Codegen Version | Release Date | OpenAPI Spec compatibility | Notes
81140
If you're looking for the latest stable version, you can grab it directly from Maven.org (Java 8 runtime at a minimum):
82141

83142
```sh
84-
wget http://central.maven.org/maven2/io/swagger/codegen/v3/swagger-codegen-cli/3.0.0/swagger-codegen-cli-3.0.0.jar -O swagger-codegen-cli.jar
143+
wget http://central.maven.org/maven2/io/swagger/codegen/v3/swagger-codegen-cli/3.0.7/swagger-codegen-cli-3.0.7.jar -O swagger-codegen-cli.jar
85144

86145
java -jar swagger-codegen-cli.jar --help
87146
```
88147

89-
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/codegen/v3/swagger-codegen-cli/3.0.0/swagger-codegen-cli-3.0.0.jar`
148+
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/codegen/v3/swagger-codegen-cli/3.0.7/swagger-codegen-cli-3.0.7.jar`
90149

91150
On a mac, it's even easier with `brew`:
92151
```sh

0 commit comments

Comments
 (0)