Skip to content
This repository was archived by the owner on Dec 25, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ modules/openapi-generator-gradle-plugin/bin/
.classpath
lib/*
build/*
.flattened-pom.xml
generated-files/*
generated-sources/*
generated-code/*
Expand Down
2 changes: 0 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ COPY ./LICENSE ${GEN_DIR}
COPY ./google_checkstyle.xml ${GEN_DIR}

# Modules are copied individually here to allow for caching of docker layers between major.minor versions
COPY ./modules/openapi-json-schema-generator-gradle-plugin ${GEN_DIR}/modules/openapi-json-schema-generator-gradle-plugin
COPY ./modules/openapi-json-schema-generator-maven-plugin ${GEN_DIR}/modules/openapi-json-schema-generator-maven-plugin
COPY ./modules/openapi-json-schema-generator-online ${GEN_DIR}/modules/openapi-json-schema-generator-online
COPY ./modules/openapi-json-schema-generator-cli ${GEN_DIR}/modules/openapi-json-schema-generator-cli
COPY ./modules/openapi-json-schema-generator-core ${GEN_DIR}/modules/openapi-json-schema-generator-core
Expand Down
105 changes: 18 additions & 87 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,8 @@ Definitely!
- [Table of Contents](#table-of-contents)
- [1 - Installation](#1---installation)
- [1.1 - Compatibility](#11---compatibility)
- [1.2 - Artifacts on Maven Central](#12---artifacts-on-maven-central)
- [1.3 - Download JAR](#13---download-jar)
- [1.4 - Build Projects](#14---build-projects)
- [1.5 - Docker](#15---docker)
- [1.2 - Build Projects](#12---build-projects)
- [1.3 - Docker](#13---docker)
- [2 - Getting Started](#2---getting-started)
- [3 - Usage](#3---usage)
- [3.1 - Customization](#31---customization)
Expand All @@ -56,7 +54,7 @@ Definitely!
- [3.5 - IDE Integration](#35---ide-integration)
- [4 - Companies/Projects using OpenAPI JSON Schema Generator](#4---companiesprojects-using-openapi-json-schema-generator)
- [5 - About Us](#5---about-us)
- [5.3 - History of OpenAPI JSON Schema Generator](#53---history-of-openapi-json-schema-generator)
- [5.1 - History of OpenAPI JSON Schema Generator](#53---history-of-openapi-json-schema-generator)
- [6 - License](#6---license)

## [1 - Installation](#table-of-contents)
Expand All @@ -70,79 +68,7 @@ The OpenAPI Specification has undergone 3 revisions since initial creation in 20
| 1.0.0 (first stable release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-json-schema-generator-cli/1.0.0-SNAPSHOT/) | TBD | First release |
OpenAPI Spec compatibility: 3.0


## [1.2 - Artifacts on Maven Central](#table-of-contents)

You can find our released artifacts on maven central:

**Core:**
```xml
<dependency>
<groupId>org.openapitools</groupId>
<artifactId>openapi-json-schema-generator</artifactId>
<version>${openapi-json-schema-generator-version}</version>
</dependency>
```
See the different versions of the [openapi-json-schema-generator](https://search.maven.org/artifact/org.openapitools/openapi-json-schema-generator) artifact available on maven central.

**Cli:**
```xml
<dependency>
<groupId>org.openapitools</groupId>
<artifactId>openapi-json-schema-generator-cli</artifactId>
<version>${openapi-json-schema-generator-version}</version>
</dependency>
```
See the different versions of the [openapi-json-schema-generator-cli](https://search.maven.org/artifact/org.openapitools/openapi-json-schema-generator-cli) artifact available on maven central.

**Maven plugin:**
```xml
<dependency>
<groupId>org.openapitools</groupId>
<artifactId>openapi-json-schema-generator-maven-plugin</artifactId>
<version>${openapi-json-schema-generator-version}</version>
</dependency>
```
* See the different versions of the [openapi-json-schema-generator-maven-plugin](https://search.maven.org/artifact/org.openapitools/openapi-json-schema-generator-maven-plugin) artifact available on maven central.
* [Readme](https://github.com/OpenAPITools/openapi-json-schema-generator/blob/master/modules/openapi-json-schema-generator-maven-plugin/README.md)

**Gradle plugin:**
```xml
<dependency>
<groupId>org.openapitools</groupId>
<artifactId>openapi-json-schema-generator-gradle-plugin</artifactId>
<version>${openapi-json-schema-generator-version}</version>
</dependency>
```
* See the different versions of the [openapi-json-schema-generator-gradle-plugin](https://search.maven.org/artifact/org.openapitools/openapi-json-schema-generator-gradle-plugin) artifact available on maven central.
* [Readme](https://github.com/OpenAPITools/openapi-json-schema-generator/blob/master/modules/openapi-json-schema-generator-gradle-plugin/README.adoc)

### [1.3 - Download JAR](#table-of-contents)
<!-- RELEASE_VERSION -->
If you're looking for the latest stable version, you can grab it directly from Maven.org (Java 8 runtime at a minimum):

JAR location: `https://repo1.maven.org/maven2/org/openapitools/openapi-json-schema-generator-cli/6.1.0/openapi-json-schema-generator-cli-6.1.0.jar`

For **Mac/Linux** users:
```sh
wget https://repo1.maven.org/maven2/org/openapitools/openapi-json-schema-generator-cli/6.1.0/openapi-json-schema-generator-cli-6.1.0.jar -O openapi-json-schema-generator-cli.jar
```

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 openapi-json-schema-generator-cli.jar https://repo1.maven.org/maven2/org/openapitools/openapi-json-schema-generator-cli/6.1.0/openapi-json-schema-generator-cli-6.1.0.jar
```

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

For Mac users, please make sure Java 8 is installed (Tips: run `java -version` to check the version), and export `JAVA_HOME` in order to use the supported Java version:
```sh
export JAVA_HOME=`/usr/libexec/java_home -v 1.8`
export PATH=${JAVA_HOME}/bin:$PATH
```
<!-- /RELEASE_VERSION -->

### [1.4 - Build Projects](#table-of-contents)
### [1.2 - Build Projects](#table-of-contents)

To build from source, you need the following installed and available in your `$PATH:`

Expand All @@ -166,7 +92,7 @@ The default build contains minimal static analysis (via CheckStyle). To run your
mvn -Pstatic-analysis clean install
```

### [1.5 - Docker](#table-of-contents)
### [1.3 - Docker](#table-of-contents)

#### Public Pre-built Docker images

Expand All @@ -182,7 +108,7 @@ Example:

```sh
docker run --rm -v "${PWD}:/local" openapjsonschematools/openapi-json-schema-generator-cli generate \
-i https://raw.githubusercontent.com/openapjsonschematools/openapi-json-schema-generator/master/modules/openapi-json-schema-generator/src/test/resources/3_0/petstore.yaml \
-i https://raw.githubusercontent.com/openapi-json-schema-tools/openapi-json-schema-generator/master/modules/openapi-json-schema-generator/src/test/resources/3_0/petstore.yaml \
-g python \
-o /local/out/python
```
Expand Down Expand Up @@ -275,17 +201,17 @@ cd /vagrant
<!-- /RELEASE_VERSION -->
## [2 - Getting Started](#table-of-contents)

To generate a PHP client for [petstore.yaml](https://raw.githubusercontent.com/openapitools/openapi-json-schema-generator/master/modules/openapi-json-schema-generator/src/test/resources/3_0/petstore.yaml), please run the following
To generate a python client for [petstore.yaml](https://raw.githubusercontent.com/openapi-json-schema-tools/openapi-json-schema-generator/master/modules/openapi-json-schema-generator/src/test/resources/3_0/petstore.yaml), please run the following
```sh
git clone https://github.com/openapitools/openapi-json-schema-generator
git clone https://github.com/openapi-json-schema-tools/openapi-json-schema-generator
cd openapi-json-schema-generator
mvn clean package
java -jar modules/openapi-json-schema-generator-cli/target/openapi-json-schema-generator-cli.jar generate \
-i https://raw.githubusercontent.com/openapitools/openapi-json-schema-generator/master/modules/openapi-json-schema-generator/src/test/resources/3_0/petstore.yaml \
-g php \
-o /var/tmp/php_api_client
-i https://raw.githubusercontent.com/openapi-json-schema-tools/openapi-json-schema-generator/master/modules/openapi-json-schema-generator/src/test/resources/3_0/petstore.yaml \
-g python \
-o /var/tmp/python_api_client
```
(if you're on Windows, replace the last command with `java -jar modules\openapi-json-schema-generator-cli\target\openapi-json-schema-generator-cli.jar generate -i https://raw.githubusercontent.com/openapitools/openapi-json-schema-generator/master/modules/openapi-json-schema-generator/src/test/resources/3_0/petstore.yaml -g php -o c:\temp\php_api_client`)
(if you're on Windows, replace the last command with `java -jar modules\openapi-json-schema-generator-cli\target\openapi-json-schema-generator-cli.jar generate -i https://raw.githubusercontent.com/openapi-json-schema-tools/openapi-json-schema-generator/master/modules/openapi-json-schema-generator/src/test/resources/3_0/petstore.yaml -g python -o c:\temp\python_api_client`)

<!-- RELEASE_VERSION -->
You can also download the JAR (latest release) directly from [maven.org](https://repo1.maven.org/maven2/org/openapitools/openapi-json-schema-generator-cli/6.1.0/openapi-json-schema-generator-cli-6.1.0.jar)
Expand Down Expand Up @@ -397,11 +323,16 @@ The OpenAPI JSON Schema Generator project is intended as a benefit for users of

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.

### [6 - History of OpenAPI JSON Schema Generator](#table-of-contents)
## [4 - Companies/Projects using OpenAPI JSON Schema Generator](#table-of-contents)

## [5 - About Us](#table-of-contents)

## [6 - History of OpenAPI JSON Schema Generator](#table-of-contents)

OpenAPI JSON Schema Generator is based on OpenAPI Generator v6.2.0. It focuses on JSON schema support and the output is designed to be 100% compliance with JSON Schema.

## [7 - License](#table-of-contents)

-------

Copyright 2018 OpenAPI-Generator Contributors (https://openapi-generator.tech)
Expand Down
4 changes: 1 addition & 3 deletions modules/openapi-json-schema-generator-cli/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@
<parent>
<groupId>org.openapitools</groupId>
<artifactId>openapi-json-schema-generator-project</artifactId>
<!-- RELEASE_VERSION -->
<version>1.0.0-SNAPSHOT</version>
<!-- /RELEASE_VERSION -->
<version>${revision}</version>
<relativePath>../..</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public class BuildInfo {
}
} catch (IOException ignored) {
}
try (InputStream is = BuildInfo.class.getResourceAsStream("/openapi-generator-git.properties")) {
try (InputStream is = BuildInfo.class.getResourceAsStream("/openapi-json-schema-generator-git.properties")) {
if (is != null) {
Properties gitProps = new Properties();
gitProps.load(is);
Expand Down
4 changes: 1 addition & 3 deletions modules/openapi-json-schema-generator-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@
<parent>
<artifactId>openapi-json-schema-generator-project</artifactId>
<groupId>org.openapitools</groupId>
<!-- RELEASE_VERSION -->
<version>1.0.0-SNAPSHOT</version>
<!-- /RELEASE_VERSION -->
<version>${revision}</version>
<relativePath>../..</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down
149 changes: 0 additions & 149 deletions modules/openapi-json-schema-generator-gradle-plugin/.gitignore

This file was deleted.

Loading