diff --git a/spring-swagger-codegen/pom.xml b/spring-swagger-codegen/pom.xml
index dee9415679..39d8902956 100644
--- a/spring-swagger-codegen/pom.xml
+++ b/spring-swagger-codegen/pom.xml
@@ -15,6 +15,7 @@
spring-swagger-codegen-api-client
+ spring-openapi-generator-api-clientspring-swagger-codegen-app
diff --git a/spring-swagger-codegen/spring-openapi-generator-api-client/.openapi-generator-ignore b/spring-swagger-codegen/spring-openapi-generator-api-client/.openapi-generator-ignore
new file mode 100644
index 0000000000..7484ee590a
--- /dev/null
+++ b/spring-swagger-codegen/spring-openapi-generator-api-client/.openapi-generator-ignore
@@ -0,0 +1,23 @@
+# OpenAPI Generator Ignore
+# Generated by openapi-generator https://github.com/openapitools/openapi-generator
+
+# Use this file to prevent files from being overwritten by the generator.
+# The patterns follow closely to .gitignore or .dockerignore.
+
+# As an example, the C# client generator defines ApiClient.cs.
+# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
+#ApiClient.cs
+
+# You can match any string of characters against a directory, file or extension with a single asterisk (*):
+#foo/*/qux
+# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
+
+# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
+#foo/**/qux
+# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
+
+# You can also negate patterns with an exclamation (!).
+# For example, you can ignore all files in a docs folder with the file extension .md:
+#docs/*.md
+# Then explicitly reverse the ignore rule for a single file:
+#!docs/README.md
diff --git a/spring-swagger-codegen/spring-openapi-generator-api-client/.openapi-generator/VERSION b/spring-swagger-codegen/spring-openapi-generator-api-client/.openapi-generator/VERSION
new file mode 100644
index 0000000000..ec87108d82
--- /dev/null
+++ b/spring-swagger-codegen/spring-openapi-generator-api-client/.openapi-generator/VERSION
@@ -0,0 +1 @@
+4.2.3
\ No newline at end of file
diff --git a/spring-swagger-codegen/spring-openapi-generator-api-client/.travis.yml b/spring-swagger-codegen/spring-openapi-generator-api-client/.travis.yml
new file mode 100644
index 0000000000..e3bdf2af1b
--- /dev/null
+++ b/spring-swagger-codegen/spring-openapi-generator-api-client/.travis.yml
@@ -0,0 +1,22 @@
+#
+# Generated by OpenAPI Generator: https://openapi-generator.tech
+#
+# Ref: https://docs.travis-ci.com/user/languages/java/
+#
+language: java
+jdk:
+ - openjdk12
+ - openjdk11
+ - openjdk10
+ - openjdk9
+ - openjdk8
+before_install:
+ # ensure gradlew has proper permission
+ - chmod a+x ./gradlew
+script:
+ # test using maven
+ #- mvn test
+ # test using gradle
+ - gradle test
+ # test using sbt
+ # - sbt test
diff --git a/spring-swagger-codegen/spring-openapi-generator-api-client/README.md b/spring-swagger-codegen/spring-openapi-generator-api-client/README.md
new file mode 100644
index 0000000000..01fd596268
--- /dev/null
+++ b/spring-swagger-codegen/spring-openapi-generator-api-client/README.md
@@ -0,0 +1,174 @@
+# spring-openapi-generator-api-client
+
+Swagger Petstore
+
+- API version: 1.0.3
+
+- Build date: 2020-03-15T06:14:01.568992-05:00[America/Chicago]
+
+This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
+
+
+*Automatically generated by the [OpenAPI Generator](https://openapi-generator.tech)*
+
+## Requirements
+
+Building the API client library requires:
+
+1. Java 1.8+
+2. Maven/Gradle
+
+## Installation
+
+To install the API client library to your local Maven repository, simply execute:
+
+```shell
+mvn clean install
+```
+
+To deploy it to a remote Maven repository instead, configure the settings of the repository and execute:
+
+```shell
+mvn clean deploy
+```
+
+Refer to the [OSSRH Guide](http://central.sonatype.org/pages/ossrh-guide.html) for more information.
+
+### Maven users
+
+Add this dependency to your project's POM:
+
+```xml
+
+ com.baeldung
+ spring-openapi-generator-api-client
+ 0.0.1-SNAPSHOT
+ compile
+
+```
+
+### Gradle users
+
+Add this dependency to your project's build file:
+
+```groovy
+compile "com.baeldung:spring-openapi-generator-api-client:0.0.1-SNAPSHOT"
+```
+
+### Others
+
+At first generate the JAR by executing:
+
+```shell
+mvn clean package
+```
+
+Then manually install the following JARs:
+
+- `target/spring-openapi-generator-api-client-0.0.1-SNAPSHOT.jar`
+- `target/lib/*.jar`
+
+## Getting Started
+
+Please follow the [installation](#installation) instruction and execute the following Java code:
+
+```java
+
+import com.baeldung.petstore.client.invoker.*;
+import com.baeldung.petstore.client.invoker.auth.*;
+import com.baeldung.petstore.client.model.*;
+import com.baeldung.petstore.client.api.PetApi;
+
+public class PetApiExample {
+
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("https://petstore.swagger.io/v2");
+
+ // Configure OAuth2 access token for authorization: petstore_auth
+ OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth");
+ petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
+
+ PetApi apiInstance = new PetApi(defaultClient);
+ Pet body = new Pet(); // Pet | Pet object that needs to be added to the store
+ try {
+ apiInstance.addPet(body);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PetApi#addPet");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
+
+```
+
+## Documentation for API Endpoints
+
+All URIs are relative to *https://petstore.swagger.io/v2*
+
+Class | Method | HTTP request | Description
+------------ | ------------- | ------------- | -------------
+*PetApi* | [**addPet**](docs/PetApi.md#addPet) | **POST** /pet | Add a new pet to the store
+*PetApi* | [**deletePet**](docs/PetApi.md#deletePet) | **DELETE** /pet/{petId} | Deletes a pet
+*PetApi* | [**findPetsByStatus**](docs/PetApi.md#findPetsByStatus) | **GET** /pet/findByStatus | Finds Pets by status
+*PetApi* | [**findPetsByTags**](docs/PetApi.md#findPetsByTags) | **GET** /pet/findByTags | Finds Pets by tags
+*PetApi* | [**getPetById**](docs/PetApi.md#getPetById) | **GET** /pet/{petId} | Find pet by ID
+*PetApi* | [**updatePet**](docs/PetApi.md#updatePet) | **PUT** /pet | Update an existing pet
+*PetApi* | [**updatePetWithForm**](docs/PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data
+*PetApi* | [**uploadFile**](docs/PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image
+*StoreApi* | [**deleteOrder**](docs/StoreApi.md#deleteOrder) | **DELETE** /store/order/{orderId} | Delete purchase order by ID
+*StoreApi* | [**getInventory**](docs/StoreApi.md#getInventory) | **GET** /store/inventory | Returns pet inventories by status
+*StoreApi* | [**getOrderById**](docs/StoreApi.md#getOrderById) | **GET** /store/order/{orderId} | Find purchase order by ID
+*StoreApi* | [**placeOrder**](docs/StoreApi.md#placeOrder) | **POST** /store/order | Place an order for a pet
+*UserApi* | [**createUser**](docs/UserApi.md#createUser) | **POST** /user | Create user
+*UserApi* | [**createUsersWithArrayInput**](docs/UserApi.md#createUsersWithArrayInput) | **POST** /user/createWithArray | Creates list of users with given input array
+*UserApi* | [**createUsersWithListInput**](docs/UserApi.md#createUsersWithListInput) | **POST** /user/createWithList | Creates list of users with given input array
+*UserApi* | [**deleteUser**](docs/UserApi.md#deleteUser) | **DELETE** /user/{username} | Delete user
+*UserApi* | [**getUserByName**](docs/UserApi.md#getUserByName) | **GET** /user/{username} | Get user by user name
+*UserApi* | [**loginUser**](docs/UserApi.md#loginUser) | **GET** /user/login | Logs user into the system
+*UserApi* | [**logoutUser**](docs/UserApi.md#logoutUser) | **GET** /user/logout | Logs out current logged in user session
+*UserApi* | [**updateUser**](docs/UserApi.md#updateUser) | **PUT** /user/{username} | Updated user
+
+
+## Documentation for Models
+
+ - [Category](docs/Category.md)
+ - [ModelApiResponse](docs/ModelApiResponse.md)
+ - [Order](docs/Order.md)
+ - [Pet](docs/Pet.md)
+ - [Tag](docs/Tag.md)
+ - [User](docs/User.md)
+
+
+## Documentation for Authorization
+
+Authentication schemes defined for the API:
+### api_key
+
+
+- **Type**: API key
+- **API key parameter name**: api_key
+- **Location**: HTTP header
+
+### petstore_auth
+
+
+- **Type**: OAuth
+- **Flow**: implicit
+- **Authorization URL**: https://petstore.swagger.io/oauth/authorize
+- **Scopes**:
+ - read:pets: read your pets
+ - write:pets: modify pets in your account
+
+
+## Recommendation
+
+It's recommended to create an instance of `ApiClient` per thread in a multithreaded environment to avoid any potential issues.
+
+## Author
+
+apiteam@swagger.io
+
diff --git a/spring-swagger-codegen/spring-openapi-generator-api-client/build.gradle b/spring-swagger-codegen/spring-openapi-generator-api-client/build.gradle
new file mode 100644
index 0000000000..d86deb75b8
--- /dev/null
+++ b/spring-swagger-codegen/spring-openapi-generator-api-client/build.gradle
@@ -0,0 +1,120 @@
+apply plugin: 'idea'
+apply plugin: 'eclipse'
+
+group = 'com.baeldung'
+version = '0.0.1-SNAPSHOT'
+
+buildscript {
+ repositories {
+ maven { url "https://repo1.maven.org/maven2" }
+ jcenter()
+ }
+ dependencies {
+ classpath 'com.android.tools.build:gradle:1.5.+'
+ classpath 'com.github.dcendents:android-maven-gradle-plugin:1.3'
+ }
+}
+
+repositories {
+ jcenter()
+}
+
+
+if(hasProperty('target') && target == 'android') {
+
+ apply plugin: 'com.android.library'
+ apply plugin: 'com.github.dcendents.android-maven'
+
+ android {
+ compileSdkVersion 23
+ buildToolsVersion '23.0.2'
+ defaultConfig {
+ minSdkVersion 14
+ targetSdkVersion 22
+ }
+ compileOptions {
+ sourceCompatibility JavaVersion.VERSION_1_8
+ targetCompatibility JavaVersion.VERSION_1_8
+ }
+
+ // Rename the aar correctly
+ libraryVariants.all { variant ->
+ variant.outputs.each { output ->
+ def outputFile = output.outputFile
+ if (outputFile != null && outputFile.name.endsWith('.aar')) {
+ def fileName = "${project.name}-${variant.baseName}-${version}.aar"
+ output.outputFile = new File(outputFile.parent, fileName)
+ }
+ }
+ }
+
+ dependencies {
+ provided 'javax.annotation:jsr250-api:1.0'
+ }
+ }
+
+ afterEvaluate {
+ android.libraryVariants.all { variant ->
+ def task = project.tasks.create "jar${variant.name.capitalize()}", Jar
+ task.description = "Create jar artifact for ${variant.name}"
+ task.dependsOn variant.javaCompile
+ task.from variant.javaCompile.destinationDir
+ task.destinationDir = project.file("${project.buildDir}/outputs/jar")
+ task.archiveName = "${project.name}-${variant.baseName}-${version}.jar"
+ artifacts.add('archives', task);
+ }
+ }
+
+ task sourcesJar(type: Jar) {
+ from android.sourceSets.main.java.srcDirs
+ classifier = 'sources'
+ }
+
+ artifacts {
+ archives sourcesJar
+ }
+
+} else {
+
+ apply plugin: 'java'
+ apply plugin: 'maven'
+
+ sourceCompatibility = JavaVersion.VERSION_1_8
+ targetCompatibility = JavaVersion.VERSION_1_8
+
+ install {
+ repositories.mavenInstaller {
+ pom.artifactId = 'spring-openapi-generator-api-client'
+ }
+ }
+
+ task execute(type:JavaExec) {
+ main = System.getProperty('mainClass')
+ classpath = sourceSets.main.runtimeClasspath
+ }
+}
+
+ext {
+ swagger_annotations_version = "1.5.22"
+ jackson_version = "2.10.1"
+ jackson_databind_version = "2.10.1"
+ jackson_databind_nullable_version = "0.2.1"
+ spring_web_version = "4.3.9.RELEASE"
+ jodatime_version = "2.9.9"
+ junit_version = "4.13"
+ jackson_threeten_version = "2.9.10"
+}
+
+dependencies {
+ compile "io.swagger:swagger-annotations:$swagger_annotations_version"
+ compile "com.google.code.findbugs:jsr305:3.0.2"
+ compile "org.springframework:spring-web:$spring_web_version"
+ compile "com.fasterxml.jackson.core:jackson-core:$jackson_version"
+ compile "com.fasterxml.jackson.core:jackson-annotations:$jackson_version"
+ compile "com.fasterxml.jackson.core:jackson-databind:$jackson_databind_version"
+ compile "com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:$jackson_version"
+ compile "org.openapitools:jackson-databind-nullable:$jackson_databind_nullable_version"
+ compile "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jackson_version"
+ compile "com.github.joschi.jackson:jackson-datatype-threetenbp:$jackson_threeten_version"
+ testCompile "junit:junit:$junit_version"
+}
diff --git a/spring-swagger-codegen/spring-openapi-generator-api-client/build.sbt b/spring-swagger-codegen/spring-openapi-generator-api-client/build.sbt
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/spring-swagger-codegen/spring-openapi-generator-api-client/docs/Category.md b/spring-swagger-codegen/spring-openapi-generator-api-client/docs/Category.md
new file mode 100644
index 0000000000..848fb61818
--- /dev/null
+++ b/spring-swagger-codegen/spring-openapi-generator-api-client/docs/Category.md
@@ -0,0 +1,13 @@
+
+
+# Category
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**id** | **Long** | | [optional]
+**name** | **String** | | [optional]
+
+
+
diff --git a/spring-swagger-codegen/spring-openapi-generator-api-client/docs/ModelApiResponse.md b/spring-swagger-codegen/spring-openapi-generator-api-client/docs/ModelApiResponse.md
new file mode 100644
index 0000000000..14fb7f1ed2
--- /dev/null
+++ b/spring-swagger-codegen/spring-openapi-generator-api-client/docs/ModelApiResponse.md
@@ -0,0 +1,14 @@
+
+
+# ModelApiResponse
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**code** | **Integer** | | [optional]
+**type** | **String** | | [optional]
+**message** | **String** | | [optional]
+
+
+
diff --git a/spring-swagger-codegen/spring-openapi-generator-api-client/docs/Order.md b/spring-swagger-codegen/spring-openapi-generator-api-client/docs/Order.md
new file mode 100644
index 0000000000..409fc4cc96
--- /dev/null
+++ b/spring-swagger-codegen/spring-openapi-generator-api-client/docs/Order.md
@@ -0,0 +1,27 @@
+
+
+# Order
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**id** | **Long** | | [optional]
+**petId** | **Long** | | [optional]
+**quantity** | **Integer** | | [optional]
+**shipDate** | [**OffsetDateTime**](OffsetDateTime.md) | | [optional]
+**status** | [**StatusEnum**](#StatusEnum) | Order Status | [optional]
+**complete** | **Boolean** | | [optional]
+
+
+
+## Enum: StatusEnum
+
+Name | Value
+---- | -----
+PLACED | "placed"
+APPROVED | "approved"
+DELIVERED | "delivered"
+
+
+
diff --git a/spring-swagger-codegen/spring-openapi-generator-api-client/docs/Pet.md b/spring-swagger-codegen/spring-openapi-generator-api-client/docs/Pet.md
new file mode 100644
index 0000000000..37ac007b79
--- /dev/null
+++ b/spring-swagger-codegen/spring-openapi-generator-api-client/docs/Pet.md
@@ -0,0 +1,27 @@
+
+
+# Pet
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**id** | **Long** | | [optional]
+**category** | [**Category**](Category.md) | | [optional]
+**name** | **String** | |
+**photoUrls** | **List<String>** | |
+**tags** | [**List<Tag>**](Tag.md) | | [optional]
+**status** | [**StatusEnum**](#StatusEnum) | pet status in the store | [optional]
+
+
+
+## Enum: StatusEnum
+
+Name | Value
+---- | -----
+AVAILABLE | "available"
+PENDING | "pending"
+SOLD | "sold"
+
+
+
diff --git a/spring-swagger-codegen/spring-openapi-generator-api-client/docs/PetApi.md b/spring-swagger-codegen/spring-openapi-generator-api-client/docs/PetApi.md
new file mode 100644
index 0000000000..56e81ea3aa
--- /dev/null
+++ b/spring-swagger-codegen/spring-openapi-generator-api-client/docs/PetApi.md
@@ -0,0 +1,581 @@
+# PetApi
+
+All URIs are relative to *https://petstore.swagger.io/v2*
+
+Method | HTTP request | Description
+------------- | ------------- | -------------
+[**addPet**](PetApi.md#addPet) | **POST** /pet | Add a new pet to the store
+[**deletePet**](PetApi.md#deletePet) | **DELETE** /pet/{petId} | Deletes a pet
+[**findPetsByStatus**](PetApi.md#findPetsByStatus) | **GET** /pet/findByStatus | Finds Pets by status
+[**findPetsByTags**](PetApi.md#findPetsByTags) | **GET** /pet/findByTags | Finds Pets by tags
+[**getPetById**](PetApi.md#getPetById) | **GET** /pet/{petId} | Find pet by ID
+[**updatePet**](PetApi.md#updatePet) | **PUT** /pet | Update an existing pet
+[**updatePetWithForm**](PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data
+[**uploadFile**](PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image
+
+
+
+## addPet
+
+> addPet(body)
+
+Add a new pet to the store
+
+### Example
+
+```java
+// Import classes:
+import com.baeldung.petstore.client.invoker.ApiClient;
+import com.baeldung.petstore.client.invoker.ApiException;
+import com.baeldung.petstore.client.invoker.Configuration;
+import com.baeldung.petstore.client.invoker.auth.*;
+import com.baeldung.petstore.client.invoker.models.*;
+import com.baeldung.petstore.client.api.PetApi;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("https://petstore.swagger.io/v2");
+
+ // Configure OAuth2 access token for authorization: petstore_auth
+ OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth");
+ petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
+
+ PetApi apiInstance = new PetApi(defaultClient);
+ Pet body = new Pet(); // Pet | Pet object that needs to be added to the store
+ try {
+ apiInstance.addPet(body);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PetApi#addPet");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
+```
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
+
+### Return type
+
+null (empty response body)
+
+### Authorization
+
+[petstore_auth](../README.md#petstore_auth)
+
+### HTTP request headers
+
+- **Content-Type**: application/json, application/xml
+- **Accept**: Not defined
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **405** | Invalid input | - |
+
+
+## deletePet
+
+> deletePet(petId, apiKey)
+
+Deletes a pet
+
+### Example
+
+```java
+// Import classes:
+import com.baeldung.petstore.client.invoker.ApiClient;
+import com.baeldung.petstore.client.invoker.ApiException;
+import com.baeldung.petstore.client.invoker.Configuration;
+import com.baeldung.petstore.client.invoker.auth.*;
+import com.baeldung.petstore.client.invoker.models.*;
+import com.baeldung.petstore.client.api.PetApi;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("https://petstore.swagger.io/v2");
+
+ // Configure OAuth2 access token for authorization: petstore_auth
+ OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth");
+ petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
+
+ PetApi apiInstance = new PetApi(defaultClient);
+ Long petId = 56L; // Long | Pet id to delete
+ String apiKey = "apiKey_example"; // String |
+ try {
+ apiInstance.deletePet(petId, apiKey);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PetApi#deletePet");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
+```
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **petId** | **Long**| Pet id to delete |
+ **apiKey** | **String**| | [optional]
+
+### Return type
+
+null (empty response body)
+
+### Authorization
+
+[petstore_auth](../README.md#petstore_auth)
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: Not defined
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **400** | Invalid ID supplied | - |
+| **404** | Pet not found | - |
+
+
+## findPetsByStatus
+
+> List<Pet> findPetsByStatus(status)
+
+Finds Pets by status
+
+Multiple status values can be provided with comma separated strings
+
+### Example
+
+```java
+// Import classes:
+import com.baeldung.petstore.client.invoker.ApiClient;
+import com.baeldung.petstore.client.invoker.ApiException;
+import com.baeldung.petstore.client.invoker.Configuration;
+import com.baeldung.petstore.client.invoker.auth.*;
+import com.baeldung.petstore.client.invoker.models.*;
+import com.baeldung.petstore.client.api.PetApi;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("https://petstore.swagger.io/v2");
+
+ // Configure OAuth2 access token for authorization: petstore_auth
+ OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth");
+ petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
+
+ PetApi apiInstance = new PetApi(defaultClient);
+ List status = Arrays.asList("available"); // List | Status values that need to be considered for filter
+ try {
+ List result = apiInstance.findPetsByStatus(status);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PetApi#findPetsByStatus");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
+```
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **status** | [**List<String>**](String.md)| Status values that need to be considered for filter | [enum: available, pending, sold]
+
+### Return type
+
+[**List<Pet>**](Pet.md)
+
+### Authorization
+
+[petstore_auth](../README.md#petstore_auth)
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: application/json, application/xml
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | successful operation | - |
+| **400** | Invalid status value | - |
+
+
+## findPetsByTags
+
+> List<Pet> findPetsByTags(tags)
+
+Finds Pets by tags
+
+Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
+
+### Example
+
+```java
+// Import classes:
+import com.baeldung.petstore.client.invoker.ApiClient;
+import com.baeldung.petstore.client.invoker.ApiException;
+import com.baeldung.petstore.client.invoker.Configuration;
+import com.baeldung.petstore.client.invoker.auth.*;
+import com.baeldung.petstore.client.invoker.models.*;
+import com.baeldung.petstore.client.api.PetApi;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("https://petstore.swagger.io/v2");
+
+ // Configure OAuth2 access token for authorization: petstore_auth
+ OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth");
+ petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
+
+ PetApi apiInstance = new PetApi(defaultClient);
+ List tags = Arrays.asList(); // List | Tags to filter by
+ try {
+ List result = apiInstance.findPetsByTags(tags);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PetApi#findPetsByTags");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
+```
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **tags** | [**List<String>**](String.md)| Tags to filter by |
+
+### Return type
+
+[**List<Pet>**](Pet.md)
+
+### Authorization
+
+[petstore_auth](../README.md#petstore_auth)
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: application/json, application/xml
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | successful operation | - |
+| **400** | Invalid tag value | - |
+
+
+## getPetById
+
+> Pet getPetById(petId)
+
+Find pet by ID
+
+Returns a single pet
+
+### Example
+
+```java
+// Import classes:
+import com.baeldung.petstore.client.invoker.ApiClient;
+import com.baeldung.petstore.client.invoker.ApiException;
+import com.baeldung.petstore.client.invoker.Configuration;
+import com.baeldung.petstore.client.invoker.auth.*;
+import com.baeldung.petstore.client.invoker.models.*;
+import com.baeldung.petstore.client.api.PetApi;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("https://petstore.swagger.io/v2");
+
+ // Configure API key authorization: api_key
+ ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
+ api_key.setApiKey("YOUR API KEY");
+ // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
+ //api_key.setApiKeyPrefix("Token");
+
+ PetApi apiInstance = new PetApi(defaultClient);
+ Long petId = 56L; // Long | ID of pet to return
+ try {
+ Pet result = apiInstance.getPetById(petId);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PetApi#getPetById");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
+```
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **petId** | **Long**| ID of pet to return |
+
+### Return type
+
+[**Pet**](Pet.md)
+
+### Authorization
+
+[api_key](../README.md#api_key)
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: application/json, application/xml
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | successful operation | - |
+| **400** | Invalid ID supplied | - |
+| **404** | Pet not found | - |
+
+
+## updatePet
+
+> updatePet(body)
+
+Update an existing pet
+
+### Example
+
+```java
+// Import classes:
+import com.baeldung.petstore.client.invoker.ApiClient;
+import com.baeldung.petstore.client.invoker.ApiException;
+import com.baeldung.petstore.client.invoker.Configuration;
+import com.baeldung.petstore.client.invoker.auth.*;
+import com.baeldung.petstore.client.invoker.models.*;
+import com.baeldung.petstore.client.api.PetApi;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("https://petstore.swagger.io/v2");
+
+ // Configure OAuth2 access token for authorization: petstore_auth
+ OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth");
+ petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
+
+ PetApi apiInstance = new PetApi(defaultClient);
+ Pet body = new Pet(); // Pet | Pet object that needs to be added to the store
+ try {
+ apiInstance.updatePet(body);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PetApi#updatePet");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
+```
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
+
+### Return type
+
+null (empty response body)
+
+### Authorization
+
+[petstore_auth](../README.md#petstore_auth)
+
+### HTTP request headers
+
+- **Content-Type**: application/json, application/xml
+- **Accept**: Not defined
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **400** | Invalid ID supplied | - |
+| **404** | Pet not found | - |
+| **405** | Validation exception | - |
+
+
+## updatePetWithForm
+
+> updatePetWithForm(petId, name, status)
+
+Updates a pet in the store with form data
+
+### Example
+
+```java
+// Import classes:
+import com.baeldung.petstore.client.invoker.ApiClient;
+import com.baeldung.petstore.client.invoker.ApiException;
+import com.baeldung.petstore.client.invoker.Configuration;
+import com.baeldung.petstore.client.invoker.auth.*;
+import com.baeldung.petstore.client.invoker.models.*;
+import com.baeldung.petstore.client.api.PetApi;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("https://petstore.swagger.io/v2");
+
+ // Configure OAuth2 access token for authorization: petstore_auth
+ OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth");
+ petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
+
+ PetApi apiInstance = new PetApi(defaultClient);
+ Long petId = 56L; // Long | ID of pet that needs to be updated
+ String name = "name_example"; // String | Updated name of the pet
+ String status = "status_example"; // String | Updated status of the pet
+ try {
+ apiInstance.updatePetWithForm(petId, name, status);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PetApi#updatePetWithForm");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
+```
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **petId** | **Long**| ID of pet that needs to be updated |
+ **name** | **String**| Updated name of the pet | [optional]
+ **status** | **String**| Updated status of the pet | [optional]
+
+### Return type
+
+null (empty response body)
+
+### Authorization
+
+[petstore_auth](../README.md#petstore_auth)
+
+### HTTP request headers
+
+- **Content-Type**: application/x-www-form-urlencoded
+- **Accept**: Not defined
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **405** | Invalid input | - |
+
+
+## uploadFile
+
+> ModelApiResponse uploadFile(petId, additionalMetadata, file)
+
+uploads an image
+
+### Example
+
+```java
+// Import classes:
+import com.baeldung.petstore.client.invoker.ApiClient;
+import com.baeldung.petstore.client.invoker.ApiException;
+import com.baeldung.petstore.client.invoker.Configuration;
+import com.baeldung.petstore.client.invoker.auth.*;
+import com.baeldung.petstore.client.invoker.models.*;
+import com.baeldung.petstore.client.api.PetApi;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("https://petstore.swagger.io/v2");
+
+ // Configure OAuth2 access token for authorization: petstore_auth
+ OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth");
+ petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
+
+ PetApi apiInstance = new PetApi(defaultClient);
+ Long petId = 56L; // Long | ID of pet to update
+ String additionalMetadata = "additionalMetadata_example"; // String | Additional data to pass to server
+ File file = new File("/path/to/file"); // File | file to upload
+ try {
+ ModelApiResponse result = apiInstance.uploadFile(petId, additionalMetadata, file);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PetApi#uploadFile");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
+```
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **petId** | **Long**| ID of pet to update |
+ **additionalMetadata** | **String**| Additional data to pass to server | [optional]
+ **file** | **File**| file to upload | [optional]
+
+### Return type
+
+[**ModelApiResponse**](ModelApiResponse.md)
+
+### Authorization
+
+[petstore_auth](../README.md#petstore_auth)
+
+### HTTP request headers
+
+- **Content-Type**: multipart/form-data
+- **Accept**: application/json
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | successful operation | - |
+
diff --git a/spring-swagger-codegen/spring-openapi-generator-api-client/docs/StoreApi.md b/spring-swagger-codegen/spring-openapi-generator-api-client/docs/StoreApi.md
new file mode 100644
index 0000000000..7a70c0bdbc
--- /dev/null
+++ b/spring-swagger-codegen/spring-openapi-generator-api-client/docs/StoreApi.md
@@ -0,0 +1,276 @@
+# StoreApi
+
+All URIs are relative to *https://petstore.swagger.io/v2*
+
+Method | HTTP request | Description
+------------- | ------------- | -------------
+[**deleteOrder**](StoreApi.md#deleteOrder) | **DELETE** /store/order/{orderId} | Delete purchase order by ID
+[**getInventory**](StoreApi.md#getInventory) | **GET** /store/inventory | Returns pet inventories by status
+[**getOrderById**](StoreApi.md#getOrderById) | **GET** /store/order/{orderId} | Find purchase order by ID
+[**placeOrder**](StoreApi.md#placeOrder) | **POST** /store/order | Place an order for a pet
+
+
+
+## deleteOrder
+
+> deleteOrder(orderId)
+
+Delete purchase order by ID
+
+For valid response try integer IDs with positive integer value. Negative or non-integer values will generate API errors
+
+### Example
+
+```java
+// Import classes:
+import com.baeldung.petstore.client.invoker.ApiClient;
+import com.baeldung.petstore.client.invoker.ApiException;
+import com.baeldung.petstore.client.invoker.Configuration;
+import com.baeldung.petstore.client.invoker.models.*;
+import com.baeldung.petstore.client.api.StoreApi;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("https://petstore.swagger.io/v2");
+
+ StoreApi apiInstance = new StoreApi(defaultClient);
+ Long orderId = 56L; // Long | ID of the order that needs to be deleted
+ try {
+ apiInstance.deleteOrder(orderId);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling StoreApi#deleteOrder");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
+```
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **orderId** | **Long**| ID of the order that needs to be deleted |
+
+### Return type
+
+null (empty response body)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: Not defined
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **400** | Invalid ID supplied | - |
+| **404** | Order not found | - |
+
+
+## getInventory
+
+> Map<String, Integer> getInventory()
+
+Returns pet inventories by status
+
+Returns a map of status codes to quantities
+
+### Example
+
+```java
+// Import classes:
+import com.baeldung.petstore.client.invoker.ApiClient;
+import com.baeldung.petstore.client.invoker.ApiException;
+import com.baeldung.petstore.client.invoker.Configuration;
+import com.baeldung.petstore.client.invoker.auth.*;
+import com.baeldung.petstore.client.invoker.models.*;
+import com.baeldung.petstore.client.api.StoreApi;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("https://petstore.swagger.io/v2");
+
+ // Configure API key authorization: api_key
+ ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
+ api_key.setApiKey("YOUR API KEY");
+ // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
+ //api_key.setApiKeyPrefix("Token");
+
+ StoreApi apiInstance = new StoreApi(defaultClient);
+ try {
+ Map result = apiInstance.getInventory();
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling StoreApi#getInventory");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
+```
+
+### Parameters
+
+This endpoint does not need any parameter.
+
+### Return type
+
+**Map<String, Integer>**
+
+### Authorization
+
+[api_key](../README.md#api_key)
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: application/json
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | successful operation | - |
+
+
+## getOrderById
+
+> Order getOrderById(orderId)
+
+Find purchase order by ID
+
+For valid response try integer IDs with value >= 1 and <= 10. Other values will generated exceptions
+
+### Example
+
+```java
+// Import classes:
+import com.baeldung.petstore.client.invoker.ApiClient;
+import com.baeldung.petstore.client.invoker.ApiException;
+import com.baeldung.petstore.client.invoker.Configuration;
+import com.baeldung.petstore.client.invoker.models.*;
+import com.baeldung.petstore.client.api.StoreApi;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("https://petstore.swagger.io/v2");
+
+ StoreApi apiInstance = new StoreApi(defaultClient);
+ Long orderId = 56L; // Long | ID of pet that needs to be fetched
+ try {
+ Order result = apiInstance.getOrderById(orderId);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling StoreApi#getOrderById");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
+```
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **orderId** | **Long**| ID of pet that needs to be fetched |
+
+### Return type
+
+[**Order**](Order.md)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: application/json, application/xml
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | successful operation | - |
+| **400** | Invalid ID supplied | - |
+| **404** | Order not found | - |
+
+
+## placeOrder
+
+> Order placeOrder(body)
+
+Place an order for a pet
+
+### Example
+
+```java
+// Import classes:
+import com.baeldung.petstore.client.invoker.ApiClient;
+import com.baeldung.petstore.client.invoker.ApiException;
+import com.baeldung.petstore.client.invoker.Configuration;
+import com.baeldung.petstore.client.invoker.models.*;
+import com.baeldung.petstore.client.api.StoreApi;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("https://petstore.swagger.io/v2");
+
+ StoreApi apiInstance = new StoreApi(defaultClient);
+ Order body = new Order(); // Order | order placed for purchasing the pet
+ try {
+ Order result = apiInstance.placeOrder(body);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling StoreApi#placeOrder");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
+```
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **body** | [**Order**](Order.md)| order placed for purchasing the pet |
+
+### Return type
+
+[**Order**](Order.md)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+- **Content-Type**: application/json
+- **Accept**: application/json, application/xml
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | successful operation | - |
+| **400** | Invalid Order | - |
+
diff --git a/spring-swagger-codegen/spring-openapi-generator-api-client/docs/Tag.md b/spring-swagger-codegen/spring-openapi-generator-api-client/docs/Tag.md
new file mode 100644
index 0000000000..f24eba7d22
--- /dev/null
+++ b/spring-swagger-codegen/spring-openapi-generator-api-client/docs/Tag.md
@@ -0,0 +1,13 @@
+
+
+# Tag
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**id** | **Long** | | [optional]
+**name** | **String** | | [optional]
+
+
+
diff --git a/spring-swagger-codegen/spring-openapi-generator-api-client/docs/User.md b/spring-swagger-codegen/spring-openapi-generator-api-client/docs/User.md
new file mode 100644
index 0000000000..c4ea94b7fc
--- /dev/null
+++ b/spring-swagger-codegen/spring-openapi-generator-api-client/docs/User.md
@@ -0,0 +1,19 @@
+
+
+# User
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**id** | **Long** | | [optional]
+**username** | **String** | | [optional]
+**firstName** | **String** | | [optional]
+**lastName** | **String** | | [optional]
+**email** | **String** | | [optional]
+**password** | **String** | | [optional]
+**phone** | **String** | | [optional]
+**userStatus** | **Integer** | User Status | [optional]
+
+
+
diff --git a/spring-swagger-codegen/spring-openapi-generator-api-client/docs/UserApi.md b/spring-swagger-codegen/spring-openapi-generator-api-client/docs/UserApi.md
new file mode 100644
index 0000000000..ff3815e352
--- /dev/null
+++ b/spring-swagger-codegen/spring-openapi-generator-api-client/docs/UserApi.md
@@ -0,0 +1,525 @@
+# UserApi
+
+All URIs are relative to *https://petstore.swagger.io/v2*
+
+Method | HTTP request | Description
+------------- | ------------- | -------------
+[**createUser**](UserApi.md#createUser) | **POST** /user | Create user
+[**createUsersWithArrayInput**](UserApi.md#createUsersWithArrayInput) | **POST** /user/createWithArray | Creates list of users with given input array
+[**createUsersWithListInput**](UserApi.md#createUsersWithListInput) | **POST** /user/createWithList | Creates list of users with given input array
+[**deleteUser**](UserApi.md#deleteUser) | **DELETE** /user/{username} | Delete user
+[**getUserByName**](UserApi.md#getUserByName) | **GET** /user/{username} | Get user by user name
+[**loginUser**](UserApi.md#loginUser) | **GET** /user/login | Logs user into the system
+[**logoutUser**](UserApi.md#logoutUser) | **GET** /user/logout | Logs out current logged in user session
+[**updateUser**](UserApi.md#updateUser) | **PUT** /user/{username} | Updated user
+
+
+
+## createUser
+
+> createUser(body)
+
+Create user
+
+This can only be done by the logged in user.
+
+### Example
+
+```java
+// Import classes:
+import com.baeldung.petstore.client.invoker.ApiClient;
+import com.baeldung.petstore.client.invoker.ApiException;
+import com.baeldung.petstore.client.invoker.Configuration;
+import com.baeldung.petstore.client.invoker.models.*;
+import com.baeldung.petstore.client.api.UserApi;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("https://petstore.swagger.io/v2");
+
+ UserApi apiInstance = new UserApi(defaultClient);
+ User body = new User(); // User | Created user object
+ try {
+ apiInstance.createUser(body);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling UserApi#createUser");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
+```
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **body** | [**User**](User.md)| Created user object |
+
+### Return type
+
+null (empty response body)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+- **Content-Type**: application/json
+- **Accept**: Not defined
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **0** | successful operation | - |
+
+
+## createUsersWithArrayInput
+
+> createUsersWithArrayInput(body)
+
+Creates list of users with given input array
+
+### Example
+
+```java
+// Import classes:
+import com.baeldung.petstore.client.invoker.ApiClient;
+import com.baeldung.petstore.client.invoker.ApiException;
+import com.baeldung.petstore.client.invoker.Configuration;
+import com.baeldung.petstore.client.invoker.models.*;
+import com.baeldung.petstore.client.api.UserApi;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("https://petstore.swagger.io/v2");
+
+ UserApi apiInstance = new UserApi(defaultClient);
+ List body = Arrays.asList(); // List | List of user object
+ try {
+ apiInstance.createUsersWithArrayInput(body);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling UserApi#createUsersWithArrayInput");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
+```
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **body** | [**List<User>**](User.md)| List of user object |
+
+### Return type
+
+null (empty response body)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+- **Content-Type**: application/json
+- **Accept**: Not defined
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **0** | successful operation | - |
+
+
+## createUsersWithListInput
+
+> createUsersWithListInput(body)
+
+Creates list of users with given input array
+
+### Example
+
+```java
+// Import classes:
+import com.baeldung.petstore.client.invoker.ApiClient;
+import com.baeldung.petstore.client.invoker.ApiException;
+import com.baeldung.petstore.client.invoker.Configuration;
+import com.baeldung.petstore.client.invoker.models.*;
+import com.baeldung.petstore.client.api.UserApi;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("https://petstore.swagger.io/v2");
+
+ UserApi apiInstance = new UserApi(defaultClient);
+ List body = Arrays.asList(); // List | List of user object
+ try {
+ apiInstance.createUsersWithListInput(body);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling UserApi#createUsersWithListInput");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
+```
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **body** | [**List<User>**](User.md)| List of user object |
+
+### Return type
+
+null (empty response body)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+- **Content-Type**: application/json
+- **Accept**: Not defined
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **0** | successful operation | - |
+
+
+## deleteUser
+
+> deleteUser(username)
+
+Delete user
+
+This can only be done by the logged in user.
+
+### Example
+
+```java
+// Import classes:
+import com.baeldung.petstore.client.invoker.ApiClient;
+import com.baeldung.petstore.client.invoker.ApiException;
+import com.baeldung.petstore.client.invoker.Configuration;
+import com.baeldung.petstore.client.invoker.models.*;
+import com.baeldung.petstore.client.api.UserApi;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("https://petstore.swagger.io/v2");
+
+ UserApi apiInstance = new UserApi(defaultClient);
+ String username = "username_example"; // String | The name that needs to be deleted
+ try {
+ apiInstance.deleteUser(username);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling UserApi#deleteUser");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
+```
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **username** | **String**| The name that needs to be deleted |
+
+### Return type
+
+null (empty response body)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: Not defined
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **400** | Invalid username supplied | - |
+| **404** | User not found | - |
+
+
+## getUserByName
+
+> User getUserByName(username)
+
+Get user by user name
+
+### Example
+
+```java
+// Import classes:
+import com.baeldung.petstore.client.invoker.ApiClient;
+import com.baeldung.petstore.client.invoker.ApiException;
+import com.baeldung.petstore.client.invoker.Configuration;
+import com.baeldung.petstore.client.invoker.models.*;
+import com.baeldung.petstore.client.api.UserApi;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("https://petstore.swagger.io/v2");
+
+ UserApi apiInstance = new UserApi(defaultClient);
+ String username = "username_example"; // String | The name that needs to be fetched. Use user1 for testing.
+ try {
+ User result = apiInstance.getUserByName(username);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling UserApi#getUserByName");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
+```
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **username** | **String**| The name that needs to be fetched. Use user1 for testing. |
+
+### Return type
+
+[**User**](User.md)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: application/json, application/xml
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | successful operation | - |
+| **400** | Invalid username supplied | - |
+| **404** | User not found | - |
+
+
+## loginUser
+
+> String loginUser(username, password)
+
+Logs user into the system
+
+### Example
+
+```java
+// Import classes:
+import com.baeldung.petstore.client.invoker.ApiClient;
+import com.baeldung.petstore.client.invoker.ApiException;
+import com.baeldung.petstore.client.invoker.Configuration;
+import com.baeldung.petstore.client.invoker.models.*;
+import com.baeldung.petstore.client.api.UserApi;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("https://petstore.swagger.io/v2");
+
+ UserApi apiInstance = new UserApi(defaultClient);
+ String username = "username_example"; // String | The user name for login
+ String password = "password_example"; // String | The password for login in clear text
+ try {
+ String result = apiInstance.loginUser(username, password);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling UserApi#loginUser");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
+```
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **username** | **String**| The user name for login |
+ **password** | **String**| The password for login in clear text |
+
+### Return type
+
+**String**
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: application/json, application/xml
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | successful operation | * X-Rate-Limit - calls per hour allowed by the user * X-Expires-After - date in UTC when token expires |
+| **400** | Invalid username/password supplied | - |
+
+
+## logoutUser
+
+> logoutUser()
+
+Logs out current logged in user session
+
+### Example
+
+```java
+// Import classes:
+import com.baeldung.petstore.client.invoker.ApiClient;
+import com.baeldung.petstore.client.invoker.ApiException;
+import com.baeldung.petstore.client.invoker.Configuration;
+import com.baeldung.petstore.client.invoker.models.*;
+import com.baeldung.petstore.client.api.UserApi;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("https://petstore.swagger.io/v2");
+
+ UserApi apiInstance = new UserApi(defaultClient);
+ try {
+ apiInstance.logoutUser();
+ } catch (ApiException e) {
+ System.err.println("Exception when calling UserApi#logoutUser");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
+```
+
+### Parameters
+
+This endpoint does not need any parameter.
+
+### Return type
+
+null (empty response body)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: Not defined
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **0** | successful operation | - |
+
+
+## updateUser
+
+> updateUser(username, body)
+
+Updated user
+
+This can only be done by the logged in user.
+
+### Example
+
+```java
+// Import classes:
+import com.baeldung.petstore.client.invoker.ApiClient;
+import com.baeldung.petstore.client.invoker.ApiException;
+import com.baeldung.petstore.client.invoker.Configuration;
+import com.baeldung.petstore.client.invoker.models.*;
+import com.baeldung.petstore.client.api.UserApi;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("https://petstore.swagger.io/v2");
+
+ UserApi apiInstance = new UserApi(defaultClient);
+ String username = "username_example"; // String | name that need to be updated
+ User body = new User(); // User | Updated user object
+ try {
+ apiInstance.updateUser(username, body);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling UserApi#updateUser");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
+```
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **username** | **String**| name that need to be updated |
+ **body** | [**User**](User.md)| Updated user object |
+
+### Return type
+
+null (empty response body)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+- **Content-Type**: application/json
+- **Accept**: Not defined
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **400** | Invalid user supplied | - |
+| **404** | User not found | - |
+
diff --git a/spring-swagger-codegen/spring-openapi-generator-api-client/git_push.sh b/spring-swagger-codegen/spring-openapi-generator-api-client/git_push.sh
new file mode 100644
index 0000000000..ced3be2b0c
--- /dev/null
+++ b/spring-swagger-codegen/spring-openapi-generator-api-client/git_push.sh
@@ -0,0 +1,58 @@
+#!/bin/sh
+# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
+#
+# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" "gitlab.com"
+
+git_user_id=$1
+git_repo_id=$2
+release_note=$3
+git_host=$4
+
+if [ "$git_host" = "" ]; then
+ git_host="github.com"
+ echo "[INFO] No command line input provided. Set \$git_host to $git_host"
+fi
+
+if [ "$git_user_id" = "" ]; then
+ git_user_id="GIT_USER_ID"
+ echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
+fi
+
+if [ "$git_repo_id" = "" ]; then
+ git_repo_id="GIT_REPO_ID"
+ echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
+fi
+
+if [ "$release_note" = "" ]; then
+ release_note="Minor update"
+ echo "[INFO] No command line input provided. Set \$release_note to $release_note"
+fi
+
+# Initialize the local directory as a Git repository
+git init
+
+# Adds the files in the local repository and stages them for commit.
+git add .
+
+# Commits the tracked changes and prepares them to be pushed to a remote repository.
+git commit -m "$release_note"
+
+# Sets the new remote
+git_remote=`git remote`
+if [ "$git_remote" = "" ]; then # git remote not defined
+
+ if [ "$GIT_TOKEN" = "" ]; then
+ echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
+ git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git
+ else
+ git remote add origin https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git
+ fi
+
+fi
+
+git pull origin master
+
+# Pushes (Forces) the changes in the local repository up to the remote repository
+echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git"
+git push origin master 2>&1 | grep -v 'To https'
+
diff --git a/spring-swagger-codegen/spring-openapi-generator-api-client/gradle.properties b/spring-swagger-codegen/spring-openapi-generator-api-client/gradle.properties
new file mode 100644
index 0000000000..05644f0754
--- /dev/null
+++ b/spring-swagger-codegen/spring-openapi-generator-api-client/gradle.properties
@@ -0,0 +1,2 @@
+# Uncomment to build for Android
+#target = android
\ No newline at end of file
diff --git a/spring-swagger-codegen/spring-openapi-generator-api-client/gradle/wrapper/gradle-wrapper.jar b/spring-swagger-codegen/spring-openapi-generator-api-client/gradle/wrapper/gradle-wrapper.jar
new file mode 100644
index 0000000000..cc4fdc293d
Binary files /dev/null and b/spring-swagger-codegen/spring-openapi-generator-api-client/gradle/wrapper/gradle-wrapper.jar differ
diff --git a/spring-swagger-codegen/spring-openapi-generator-api-client/gradle/wrapper/gradle-wrapper.properties b/spring-swagger-codegen/spring-openapi-generator-api-client/gradle/wrapper/gradle-wrapper.properties
new file mode 100644
index 0000000000..94920145f3
--- /dev/null
+++ b/spring-swagger-codegen/spring-openapi-generator-api-client/gradle/wrapper/gradle-wrapper.properties
@@ -0,0 +1,5 @@
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-6.0.1-bin.zip
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
diff --git a/spring-swagger-codegen/spring-openapi-generator-api-client/gradlew b/spring-swagger-codegen/spring-openapi-generator-api-client/gradlew
new file mode 100644
index 0000000000..2fe81a7d95
--- /dev/null
+++ b/spring-swagger-codegen/spring-openapi-generator-api-client/gradlew
@@ -0,0 +1,183 @@
+#!/usr/bin/env sh
+
+#
+# Copyright 2015 the original author or authors.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+##############################################################################
+##
+## Gradle start up script for UN*X
+##
+##############################################################################
+
+# Attempt to set APP_HOME
+# Resolve links: $0 may be a link
+PRG="$0"
+# Need this for relative symlinks.
+while [ -h "$PRG" ] ; do
+ ls=`ls -ld "$PRG"`
+ link=`expr "$ls" : '.*-> \(.*\)$'`
+ if expr "$link" : '/.*' > /dev/null; then
+ PRG="$link"
+ else
+ PRG=`dirname "$PRG"`"/$link"
+ fi
+done
+SAVED="`pwd`"
+cd "`dirname \"$PRG\"`/" >/dev/null
+APP_HOME="`pwd -P`"
+cd "$SAVED" >/dev/null
+
+APP_NAME="Gradle"
+APP_BASE_NAME=`basename "$0"`
+
+# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
+
+# Use the maximum available, or set MAX_FD != -1 to use that value.
+MAX_FD="maximum"
+
+warn () {
+ echo "$*"
+}
+
+die () {
+ echo
+ echo "$*"
+ echo
+ exit 1
+}
+
+# OS specific support (must be 'true' or 'false').
+cygwin=false
+msys=false
+darwin=false
+nonstop=false
+case "`uname`" in
+ CYGWIN* )
+ cygwin=true
+ ;;
+ Darwin* )
+ darwin=true
+ ;;
+ MINGW* )
+ msys=true
+ ;;
+ NONSTOP* )
+ nonstop=true
+ ;;
+esac
+
+CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
+
+# Determine the Java command to use to start the JVM.
+if [ -n "$JAVA_HOME" ] ; then
+ if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+ # IBM's JDK on AIX uses strange locations for the executables
+ JAVACMD="$JAVA_HOME/jre/sh/java"
+ else
+ JAVACMD="$JAVA_HOME/bin/java"
+ fi
+ if [ ! -x "$JAVACMD" ] ; then
+ die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+ fi
+else
+ JAVACMD="java"
+ which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+fi
+
+# Increase the maximum file descriptors if we can.
+if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
+ MAX_FD_LIMIT=`ulimit -H -n`
+ if [ $? -eq 0 ] ; then
+ if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
+ MAX_FD="$MAX_FD_LIMIT"
+ fi
+ ulimit -n $MAX_FD
+ if [ $? -ne 0 ] ; then
+ warn "Could not set maximum file descriptor limit: $MAX_FD"
+ fi
+ else
+ warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
+ fi
+fi
+
+# For Darwin, add options to specify how the application appears in the dock
+if $darwin; then
+ GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
+fi
+
+# For Cygwin or MSYS, switch paths to Windows format before running java
+if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
+ APP_HOME=`cygpath --path --mixed "$APP_HOME"`
+ CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
+ JAVACMD=`cygpath --unix "$JAVACMD"`
+
+ # We build the pattern for arguments to be converted via cygpath
+ ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
+ SEP=""
+ for dir in $ROOTDIRSRAW ; do
+ ROOTDIRS="$ROOTDIRS$SEP$dir"
+ SEP="|"
+ done
+ OURCYGPATTERN="(^($ROOTDIRS))"
+ # Add a user-defined pattern to the cygpath arguments
+ if [ "$GRADLE_CYGPATTERN" != "" ] ; then
+ OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
+ fi
+ # Now convert the arguments - kludge to limit ourselves to /bin/sh
+ i=0
+ for arg in "$@" ; do
+ CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
+ CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
+
+ if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
+ eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
+ else
+ eval `echo args$i`="\"$arg\""
+ fi
+ i=`expr $i + 1`
+ done
+ case $i in
+ 0) set -- ;;
+ 1) set -- "$args0" ;;
+ 2) set -- "$args0" "$args1" ;;
+ 3) set -- "$args0" "$args1" "$args2" ;;
+ 4) set -- "$args0" "$args1" "$args2" "$args3" ;;
+ 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
+ 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
+ 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
+ 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
+ 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
+ esac
+fi
+
+# Escape application args
+save () {
+ for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
+ echo " "
+}
+APP_ARGS=`save "$@"`
+
+# Collect all arguments for the java command, following the shell quoting and substitution rules
+eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
+
+exec "$JAVACMD" "$@"
diff --git a/spring-swagger-codegen/spring-openapi-generator-api-client/gradlew.bat b/spring-swagger-codegen/spring-openapi-generator-api-client/gradlew.bat
new file mode 100644
index 0000000000..9618d8d960
--- /dev/null
+++ b/spring-swagger-codegen/spring-openapi-generator-api-client/gradlew.bat
@@ -0,0 +1,100 @@
+@rem
+@rem Copyright 2015 the original author or authors.
+@rem
+@rem Licensed under the Apache License, Version 2.0 (the "License");
+@rem you may not use this file except in compliance with the License.
+@rem You may obtain a copy of the License at
+@rem
+@rem https://www.apache.org/licenses/LICENSE-2.0
+@rem
+@rem Unless required by applicable law or agreed to in writing, software
+@rem distributed under the License is distributed on an "AS IS" BASIS,
+@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+@rem See the License for the specific language governing permissions and
+@rem limitations under the License.
+@rem
+
+@if "%DEBUG%" == "" @echo off
+@rem ##########################################################################
+@rem
+@rem Gradle startup script for Windows
+@rem
+@rem ##########################################################################
+
+@rem Set local scope for the variables with windows NT shell
+if "%OS%"=="Windows_NT" setlocal
+
+set DIRNAME=%~dp0
+if "%DIRNAME%" == "" set DIRNAME=.
+set APP_BASE_NAME=%~n0
+set APP_HOME=%DIRNAME%
+
+@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
+
+@rem Find java.exe
+if defined JAVA_HOME goto findJavaFromJavaHome
+
+set JAVA_EXE=java.exe
+%JAVA_EXE% -version >NUL 2>&1
+if "%ERRORLEVEL%" == "0" goto init
+
+echo.
+echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:findJavaFromJavaHome
+set JAVA_HOME=%JAVA_HOME:"=%
+set JAVA_EXE=%JAVA_HOME%/bin/java.exe
+
+if exist "%JAVA_EXE%" goto init
+
+echo.
+echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:init
+@rem Get command-line arguments, handling Windows variants
+
+if not "%OS%" == "Windows_NT" goto win9xME_args
+
+:win9xME_args
+@rem Slurp the command line arguments.
+set CMD_LINE_ARGS=
+set _SKIP=2
+
+:win9xME_args_slurp
+if "x%~1" == "x" goto execute
+
+set CMD_LINE_ARGS=%*
+
+:execute
+@rem Setup the command line
+
+set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
+
+@rem Execute Gradle
+"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
+
+:end
+@rem End local scope for the variables with windows NT shell
+if "%ERRORLEVEL%"=="0" goto mainEnd
+
+:fail
+rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
+rem the _cmd.exe /c_ return code!
+if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
+exit /b 1
+
+:mainEnd
+if "%OS%"=="Windows_NT" endlocal
+
+:omega
diff --git a/spring-swagger-codegen/spring-openapi-generator-api-client/pom.xml b/spring-swagger-codegen/spring-openapi-generator-api-client/pom.xml
new file mode 100644
index 0000000000..cc70a9f654
--- /dev/null
+++ b/spring-swagger-codegen/spring-openapi-generator-api-client/pom.xml
@@ -0,0 +1,274 @@
+
+ 4.0.0
+ com.baeldung
+ spring-openapi-generator-api-client
+ jar
+ spring-openapi-generator-api-client
+ 0.0.1-SNAPSHOT
+ https://github.com/openapitools/openapi-generator
+ OpenAPI Java
+
+ scm:git:git@github.com:openapitools/openapi-generator.git
+ scm:git:git@github.com:openapitools/openapi-generator.git
+ https://github.com/openapitools/openapi-generator
+
+
+
+
+ Unlicense
+ http://www.apache.org/licenses/LICENSE-2.0.html
+ repo
+
+
+
+
+
+ OpenAPI-Generator Contributors
+ team@openapitools.org
+ OpenAPITools.org
+ http://openapitools.org
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-enforcer-plugin
+ 3.0.0-M1
+
+
+ enforce-maven
+
+ enforce
+
+
+
+
+ 2.2.0
+
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-surefire-plugin
+ 2.12
+
+
+
+ loggerPath
+ conf/log4j.properties
+
+
+ -Xms512m -Xmx1500m
+ methods
+ pertest
+
+
+
+ maven-dependency-plugin
+
+
+ package
+
+ copy-dependencies
+
+
+ ${project.build.directory}/lib
+
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-jar-plugin
+ 2.2
+
+
+
+ jar
+ test-jar
+
+
+
+
+
+
+
+
+ org.codehaus.mojo
+ build-helper-maven-plugin
+ 1.10
+
+
+ add_sources
+ generate-sources
+
+ add-source
+
+
+
+
+
+
+
+
+ add_test_sources
+ generate-test-sources
+
+ add-test-source
+
+
+
+
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+ 3.6.1
+
+
+ 1.8
+
+
+
+ org.apache.maven.plugins
+ maven-javadoc-plugin
+ 2.10.4
+
+
+ attach-javadocs
+
+ jar
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-source-plugin
+ 2.2.1
+
+
+ attach-sources
+
+ jar-no-fork
+
+
+
+
+
+
+
+
+
+ sign-artifacts
+
+
+
+ org.apache.maven.plugins
+ maven-gpg-plugin
+ 1.5
+
+
+ sign-artifacts
+ verify
+
+ sign
+
+
+
+
+
+
+
+
+
+
+
+ io.swagger
+ swagger-annotations
+ ${swagger-annotations-version}
+
+
+
+
+ com.google.code.findbugs
+ jsr305
+ 3.0.2
+
+
+
+
+ org.springframework
+ spring-web
+ ${spring-web-version}
+
+
+
+
+ com.fasterxml.jackson.core
+ jackson-core
+ ${jackson-version}
+
+
+ com.fasterxml.jackson.core
+ jackson-annotations
+ ${jackson-version}
+
+
+ com.fasterxml.jackson.core
+ jackson-databind
+ ${jackson-databind-version}
+
+
+ com.fasterxml.jackson.jaxrs
+ jackson-jaxrs-json-provider
+ ${jackson-version}
+
+
+ org.openapitools
+ jackson-databind-nullable
+ ${jackson-databind-nullable-version}
+
+
+ com.fasterxml.jackson.datatype
+ jackson-datatype-jsr310
+ ${jackson-version}
+
+
+ com.github.joschi.jackson
+ jackson-datatype-threetenbp
+ ${jackson-threetenbp-version}
+
+
+
+
+ junit
+ junit
+ ${junit-version}
+ test
+
+
+
+ UTF-8
+ 1.5.22
+ 4.3.9.RELEASE
+ 2.10.1
+ 2.10.1
+ 0.2.1
+ 2.9.10
+ 1.0.0
+ 4.13
+
+
diff --git a/spring-swagger-codegen/spring-openapi-generator-api-client/settings.gradle b/spring-swagger-codegen/spring-openapi-generator-api-client/settings.gradle
new file mode 100644
index 0000000000..06a087cb49
--- /dev/null
+++ b/spring-swagger-codegen/spring-openapi-generator-api-client/settings.gradle
@@ -0,0 +1 @@
+rootProject.name = "spring-openapi-generator-api-client"
\ No newline at end of file
diff --git a/spring-swagger-codegen/spring-openapi-generator-api-client/src/main/AndroidManifest.xml b/spring-swagger-codegen/spring-openapi-generator-api-client/src/main/AndroidManifest.xml
new file mode 100644
index 0000000000..cd581f9f78
--- /dev/null
+++ b/spring-swagger-codegen/spring-openapi-generator-api-client/src/main/AndroidManifest.xml
@@ -0,0 +1,3 @@
+
+
+
diff --git a/spring-swagger-codegen/spring-openapi-generator-api-client/src/main/java/com/baeldung/petstore/client/api/PetApi.java b/spring-swagger-codegen/spring-openapi-generator-api-client/src/main/java/com/baeldung/petstore/client/api/PetApi.java
new file mode 100644
index 0000000000..b7256c81fb
--- /dev/null
+++ b/spring-swagger-codegen/spring-openapi-generator-api-client/src/main/java/com/baeldung/petstore/client/api/PetApi.java
@@ -0,0 +1,477 @@
+package com.baeldung.petstore.client.api;
+
+import com.baeldung.petstore.client.invoker.ApiClient;
+import com.baeldung.petstore.client.model.ModelApiResponse;
+import com.baeldung.petstore.client.model.Pet;
+
+import java.io.File;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Locale;
+import java.util.Map;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.core.ParameterizedTypeReference;
+import org.springframework.core.io.FileSystemResource;
+import org.springframework.http.HttpHeaders;
+import org.springframework.http.HttpMethod;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.MediaType;
+import org.springframework.http.ResponseEntity;
+import org.springframework.stereotype.Component;
+import org.springframework.util.LinkedMultiValueMap;
+import org.springframework.util.MultiValueMap;
+import org.springframework.web.client.HttpClientErrorException;
+import org.springframework.web.client.RestClientException;
+
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2020-03-15T06:14:01.568992-05:00[America/Chicago]")
+@Component("com.baeldung.petstore.client.api.PetApi")
+public class PetApi {
+ private ApiClient apiClient;
+
+ public PetApi() {
+ this(new ApiClient());
+ }
+
+ @Autowired
+ public PetApi(ApiClient apiClient) {
+ this.apiClient = apiClient;
+ }
+
+ public ApiClient getApiClient() {
+ return apiClient;
+ }
+
+ public void setApiClient(ApiClient apiClient) {
+ this.apiClient = apiClient;
+ }
+
+ /**
+ * Add a new pet to the store
+ *
+ *
405 - Invalid input
+ * @param body Pet object that needs to be added to the store (required)
+ * @throws RestClientException if an error occurs while attempting to invoke the API
+ */
+ public void addPet(Pet body) throws RestClientException {
+ addPetWithHttpInfo(body);
+ }
+
+ /**
+ * Add a new pet to the store
+ *
+ *
405 - Invalid input
+ * @param body Pet object that needs to be added to the store (required)
+ * @return ResponseEntity<Void>
+ * @throws RestClientException if an error occurs while attempting to invoke the API
+ */
+ public ResponseEntity addPetWithHttpInfo(Pet body) throws RestClientException {
+ Object postBody = body;
+
+ // verify the required parameter 'body' is set
+ if (body == null) {
+ throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'body' when calling addPet");
+ }
+
+ String path = apiClient.expandPath("/pet", Collections.emptyMap());
+
+ final MultiValueMap queryParams = new LinkedMultiValueMap();
+ final HttpHeaders headerParams = new HttpHeaders();
+ final MultiValueMap cookieParams = new LinkedMultiValueMap();
+ final MultiValueMap formParams = new LinkedMultiValueMap();
+
+ final String[] accepts = { };
+ final List accept = apiClient.selectHeaderAccept(accepts);
+ final String[] contentTypes = {
+ "application/json", "application/xml"
+ };
+ final MediaType contentType = apiClient.selectHeaderContentType(contentTypes);
+
+ String[] authNames = new String[] { "petstore_auth" };
+
+ ParameterizedTypeReference returnType = new ParameterizedTypeReference() {};
+ return apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, cookieParams, formParams, accept, contentType, authNames, returnType);
+ }
+ /**
+ * Deletes a pet
+ *
+ *
400 - Invalid ID supplied
+ *
404 - Pet not found
+ * @param petId Pet id to delete (required)
+ * @param apiKey (optional)
+ * @throws RestClientException if an error occurs while attempting to invoke the API
+ */
+ public void deletePet(Long petId, String apiKey) throws RestClientException {
+ deletePetWithHttpInfo(petId, apiKey);
+ }
+
+ /**
+ * Deletes a pet
+ *
+ *
400 - Invalid ID supplied
+ *
404 - Pet not found
+ * @param petId Pet id to delete (required)
+ * @param apiKey (optional)
+ * @return ResponseEntity<Void>
+ * @throws RestClientException if an error occurs while attempting to invoke the API
+ */
+ public ResponseEntity deletePetWithHttpInfo(Long petId, String apiKey) throws RestClientException {
+ Object postBody = null;
+
+ // verify the required parameter 'petId' is set
+ if (petId == null) {
+ throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'petId' when calling deletePet");
+ }
+
+ // create path and map variables
+ final Map uriVariables = new HashMap();
+ uriVariables.put("petId", petId);
+ String path = apiClient.expandPath("/pet/{petId}", uriVariables);
+
+ final MultiValueMap queryParams = new LinkedMultiValueMap();
+ final HttpHeaders headerParams = new HttpHeaders();
+ final MultiValueMap cookieParams = new LinkedMultiValueMap();
+ final MultiValueMap formParams = new LinkedMultiValueMap();
+
+ if (apiKey != null)
+ headerParams.add("api_key", apiClient.parameterToString(apiKey));
+
+ final String[] accepts = { };
+ final List accept = apiClient.selectHeaderAccept(accepts);
+ final String[] contentTypes = { };
+ final MediaType contentType = apiClient.selectHeaderContentType(contentTypes);
+
+ String[] authNames = new String[] { "petstore_auth" };
+
+ ParameterizedTypeReference returnType = new ParameterizedTypeReference() {};
+ return apiClient.invokeAPI(path, HttpMethod.DELETE, queryParams, postBody, headerParams, cookieParams, formParams, accept, contentType, authNames, returnType);
+ }
+ /**
+ * Finds Pets by status
+ * Multiple status values can be provided with comma separated strings
+ *
200 - successful operation
+ *
400 - Invalid status value
+ * @param status Status values that need to be considered for filter (required)
+ * @return List<Pet>
+ * @throws RestClientException if an error occurs while attempting to invoke the API
+ */
+ public List findPetsByStatus(List status) throws RestClientException {
+ return findPetsByStatusWithHttpInfo(status).getBody();
+ }
+
+ /**
+ * Finds Pets by status
+ * Multiple status values can be provided with comma separated strings
+ *
200 - successful operation
+ *
400 - Invalid status value
+ * @param status Status values that need to be considered for filter (required)
+ * @return ResponseEntity<List<Pet>>
+ * @throws RestClientException if an error occurs while attempting to invoke the API
+ */
+ public ResponseEntity> findPetsByStatusWithHttpInfo(List status) throws RestClientException {
+ Object postBody = null;
+
+ // verify the required parameter 'status' is set
+ if (status == null) {
+ throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'status' when calling findPetsByStatus");
+ }
+
+ String path = apiClient.expandPath("/pet/findByStatus", Collections.emptyMap());
+
+ final MultiValueMap queryParams = new LinkedMultiValueMap();
+ final HttpHeaders headerParams = new HttpHeaders();
+ final MultiValueMap cookieParams = new LinkedMultiValueMap();
+ final MultiValueMap formParams = new LinkedMultiValueMap();
+
+ queryParams.putAll(apiClient.parameterToMultiValueMap(ApiClient.CollectionFormat.valueOf("multi".toUpperCase(Locale.ROOT)), "status", status));
+
+ final String[] accepts = {
+ "application/json", "application/xml"
+ };
+ final List accept = apiClient.selectHeaderAccept(accepts);
+ final String[] contentTypes = { };
+ final MediaType contentType = apiClient.selectHeaderContentType(contentTypes);
+
+ String[] authNames = new String[] { "petstore_auth" };
+
+ ParameterizedTypeReference> returnType = new ParameterizedTypeReference>() {};
+ return apiClient.invokeAPI(path, HttpMethod.GET, queryParams, postBody, headerParams, cookieParams, formParams, accept, contentType, authNames, returnType);
+ }
+ /**
+ * Finds Pets by tags
+ * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
+ *
200 - successful operation
+ *
400 - Invalid tag value
+ * @param tags Tags to filter by (required)
+ * @return List<Pet>
+ * @throws RestClientException if an error occurs while attempting to invoke the API
+ */
+ @Deprecated
+ public List findPetsByTags(List tags) throws RestClientException {
+ return findPetsByTagsWithHttpInfo(tags).getBody();
+ }
+
+ /**
+ * Finds Pets by tags
+ * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
+ *
200 - successful operation
+ *
400 - Invalid tag value
+ * @param tags Tags to filter by (required)
+ * @return ResponseEntity<List<Pet>>
+ * @throws RestClientException if an error occurs while attempting to invoke the API
+ */
+ @Deprecated
+ public ResponseEntity> findPetsByTagsWithHttpInfo(List tags) throws RestClientException {
+ Object postBody = null;
+
+ // verify the required parameter 'tags' is set
+ if (tags == null) {
+ throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'tags' when calling findPetsByTags");
+ }
+
+ String path = apiClient.expandPath("/pet/findByTags", Collections.emptyMap());
+
+ final MultiValueMap queryParams = new LinkedMultiValueMap();
+ final HttpHeaders headerParams = new HttpHeaders();
+ final MultiValueMap cookieParams = new LinkedMultiValueMap();
+ final MultiValueMap formParams = new LinkedMultiValueMap();
+
+ queryParams.putAll(apiClient.parameterToMultiValueMap(ApiClient.CollectionFormat.valueOf("multi".toUpperCase(Locale.ROOT)), "tags", tags));
+
+ final String[] accepts = {
+ "application/json", "application/xml"
+ };
+ final List accept = apiClient.selectHeaderAccept(accepts);
+ final String[] contentTypes = { };
+ final MediaType contentType = apiClient.selectHeaderContentType(contentTypes);
+
+ String[] authNames = new String[] { "petstore_auth" };
+
+ ParameterizedTypeReference> returnType = new ParameterizedTypeReference>() {};
+ return apiClient.invokeAPI(path, HttpMethod.GET, queryParams, postBody, headerParams, cookieParams, formParams, accept, contentType, authNames, returnType);
+ }
+ /**
+ * Find pet by ID
+ * Returns a single pet
+ *
200 - successful operation
+ *
400 - Invalid ID supplied
+ *
404 - Pet not found
+ * @param petId ID of pet to return (required)
+ * @return Pet
+ * @throws RestClientException if an error occurs while attempting to invoke the API
+ */
+ public Pet getPetById(Long petId) throws RestClientException {
+ return getPetByIdWithHttpInfo(petId).getBody();
+ }
+
+ /**
+ * Find pet by ID
+ * Returns a single pet
+ *
200 - successful operation
+ *
400 - Invalid ID supplied
+ *
404 - Pet not found
+ * @param petId ID of pet to return (required)
+ * @return ResponseEntity<Pet>
+ * @throws RestClientException if an error occurs while attempting to invoke the API
+ */
+ public ResponseEntity getPetByIdWithHttpInfo(Long petId) throws RestClientException {
+ Object postBody = null;
+
+ // verify the required parameter 'petId' is set
+ if (petId == null) {
+ throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'petId' when calling getPetById");
+ }
+
+ // create path and map variables
+ final Map uriVariables = new HashMap();
+ uriVariables.put("petId", petId);
+ String path = apiClient.expandPath("/pet/{petId}", uriVariables);
+
+ final MultiValueMap queryParams = new LinkedMultiValueMap();
+ final HttpHeaders headerParams = new HttpHeaders();
+ final MultiValueMap cookieParams = new LinkedMultiValueMap();
+ final MultiValueMap formParams = new LinkedMultiValueMap();
+
+ final String[] accepts = {
+ "application/json", "application/xml"
+ };
+ final List accept = apiClient.selectHeaderAccept(accepts);
+ final String[] contentTypes = { };
+ final MediaType contentType = apiClient.selectHeaderContentType(contentTypes);
+
+ String[] authNames = new String[] { "api_key" };
+
+ ParameterizedTypeReference returnType = new ParameterizedTypeReference() {};
+ return apiClient.invokeAPI(path, HttpMethod.GET, queryParams, postBody, headerParams, cookieParams, formParams, accept, contentType, authNames, returnType);
+ }
+ /**
+ * Update an existing pet
+ *
+ *
400 - Invalid ID supplied
+ *
404 - Pet not found
+ *
405 - Validation exception
+ * @param body Pet object that needs to be added to the store (required)
+ * @throws RestClientException if an error occurs while attempting to invoke the API
+ */
+ public void updatePet(Pet body) throws RestClientException {
+ updatePetWithHttpInfo(body);
+ }
+
+ /**
+ * Update an existing pet
+ *
+ *
400 - Invalid ID supplied
+ *
404 - Pet not found
+ *
405 - Validation exception
+ * @param body Pet object that needs to be added to the store (required)
+ * @return ResponseEntity<Void>
+ * @throws RestClientException if an error occurs while attempting to invoke the API
+ */
+ public ResponseEntity updatePetWithHttpInfo(Pet body) throws RestClientException {
+ Object postBody = body;
+
+ // verify the required parameter 'body' is set
+ if (body == null) {
+ throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'body' when calling updatePet");
+ }
+
+ String path = apiClient.expandPath("/pet", Collections.emptyMap());
+
+ final MultiValueMap queryParams = new LinkedMultiValueMap();
+ final HttpHeaders headerParams = new HttpHeaders();
+ final MultiValueMap cookieParams = new LinkedMultiValueMap();
+ final MultiValueMap formParams = new LinkedMultiValueMap();
+
+ final String[] accepts = { };
+ final List accept = apiClient.selectHeaderAccept(accepts);
+ final String[] contentTypes = {
+ "application/json", "application/xml"
+ };
+ final MediaType contentType = apiClient.selectHeaderContentType(contentTypes);
+
+ String[] authNames = new String[] { "petstore_auth" };
+
+ ParameterizedTypeReference returnType = new ParameterizedTypeReference() {};
+ return apiClient.invokeAPI(path, HttpMethod.PUT, queryParams, postBody, headerParams, cookieParams, formParams, accept, contentType, authNames, returnType);
+ }
+ /**
+ * Updates a pet in the store with form data
+ *
+ *
405 - Invalid input
+ * @param petId ID of pet that needs to be updated (required)
+ * @param name Updated name of the pet (optional)
+ * @param status Updated status of the pet (optional)
+ * @throws RestClientException if an error occurs while attempting to invoke the API
+ */
+ public void updatePetWithForm(Long petId, String name, String status) throws RestClientException {
+ updatePetWithFormWithHttpInfo(petId, name, status);
+ }
+
+ /**
+ * Updates a pet in the store with form data
+ *
+ *
405 - Invalid input
+ * @param petId ID of pet that needs to be updated (required)
+ * @param name Updated name of the pet (optional)
+ * @param status Updated status of the pet (optional)
+ * @return ResponseEntity<Void>
+ * @throws RestClientException if an error occurs while attempting to invoke the API
+ */
+ public ResponseEntity updatePetWithFormWithHttpInfo(Long petId, String name, String status) throws RestClientException {
+ Object postBody = null;
+
+ // verify the required parameter 'petId' is set
+ if (petId == null) {
+ throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'petId' when calling updatePetWithForm");
+ }
+
+ // create path and map variables
+ final Map uriVariables = new HashMap();
+ uriVariables.put("petId", petId);
+ String path = apiClient.expandPath("/pet/{petId}", uriVariables);
+
+ final MultiValueMap queryParams = new LinkedMultiValueMap();
+ final HttpHeaders headerParams = new HttpHeaders();
+ final MultiValueMap cookieParams = new LinkedMultiValueMap();
+ final MultiValueMap formParams = new LinkedMultiValueMap();
+
+ if (name != null)
+ formParams.add("name", name);
+ if (status != null)
+ formParams.add("status", status);
+
+ final String[] accepts = { };
+ final List accept = apiClient.selectHeaderAccept(accepts);
+ final String[] contentTypes = {
+ "application/x-www-form-urlencoded"
+ };
+ final MediaType contentType = apiClient.selectHeaderContentType(contentTypes);
+
+ String[] authNames = new String[] { "petstore_auth" };
+
+ ParameterizedTypeReference returnType = new ParameterizedTypeReference() {};
+ return apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, cookieParams, formParams, accept, contentType, authNames, returnType);
+ }
+ /**
+ * uploads an image
+ *
+ *
200 - successful operation
+ * @param petId ID of pet to update (required)
+ * @param additionalMetadata Additional data to pass to server (optional)
+ * @param file file to upload (optional)
+ * @return ModelApiResponse
+ * @throws RestClientException if an error occurs while attempting to invoke the API
+ */
+ public ModelApiResponse uploadFile(Long petId, String additionalMetadata, File file) throws RestClientException {
+ return uploadFileWithHttpInfo(petId, additionalMetadata, file).getBody();
+ }
+
+ /**
+ * uploads an image
+ *
+ *
200 - successful operation
+ * @param petId ID of pet to update (required)
+ * @param additionalMetadata Additional data to pass to server (optional)
+ * @param file file to upload (optional)
+ * @return ResponseEntity<ModelApiResponse>
+ * @throws RestClientException if an error occurs while attempting to invoke the API
+ */
+ public ResponseEntity uploadFileWithHttpInfo(Long petId, String additionalMetadata, File file) throws RestClientException {
+ Object postBody = null;
+
+ // verify the required parameter 'petId' is set
+ if (petId == null) {
+ throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'petId' when calling uploadFile");
+ }
+
+ // create path and map variables
+ final Map uriVariables = new HashMap();
+ uriVariables.put("petId", petId);
+ String path = apiClient.expandPath("/pet/{petId}/uploadImage", uriVariables);
+
+ final MultiValueMap queryParams = new LinkedMultiValueMap();
+ final HttpHeaders headerParams = new HttpHeaders();
+ final MultiValueMap cookieParams = new LinkedMultiValueMap();
+ final MultiValueMap formParams = new LinkedMultiValueMap();
+
+ if (additionalMetadata != null)
+ formParams.add("additionalMetadata", additionalMetadata);
+ if (file != null)
+ formParams.add("file", new FileSystemResource(file));
+
+ final String[] accepts = {
+ "application/json"
+ };
+ final List accept = apiClient.selectHeaderAccept(accepts);
+ final String[] contentTypes = {
+ "multipart/form-data"
+ };
+ final MediaType contentType = apiClient.selectHeaderContentType(contentTypes);
+
+ String[] authNames = new String[] { "petstore_auth" };
+
+ ParameterizedTypeReference returnType = new ParameterizedTypeReference() {};
+ return apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, cookieParams, formParams, accept, contentType, authNames, returnType);
+ }
+}
diff --git a/spring-swagger-codegen/spring-openapi-generator-api-client/src/main/java/com/baeldung/petstore/client/api/StoreApi.java b/spring-swagger-codegen/spring-openapi-generator-api-client/src/main/java/com/baeldung/petstore/client/api/StoreApi.java
new file mode 100644
index 0000000000..792617bc28
--- /dev/null
+++ b/spring-swagger-codegen/spring-openapi-generator-api-client/src/main/java/com/baeldung/petstore/client/api/StoreApi.java
@@ -0,0 +1,240 @@
+package com.baeldung.petstore.client.api;
+
+import com.baeldung.petstore.client.invoker.ApiClient;
+import com.baeldung.petstore.client.model.Order;
+
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.core.ParameterizedTypeReference;
+import org.springframework.http.HttpHeaders;
+import org.springframework.http.HttpMethod;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.MediaType;
+import org.springframework.http.ResponseEntity;
+import org.springframework.stereotype.Component;
+import org.springframework.util.LinkedMultiValueMap;
+import org.springframework.util.MultiValueMap;
+import org.springframework.web.client.HttpClientErrorException;
+import org.springframework.web.client.RestClientException;
+
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2020-03-15T06:14:01.568992-05:00[America/Chicago]")
+@Component("com.baeldung.petstore.client.api.StoreApi")
+public class StoreApi {
+ private ApiClient apiClient;
+
+ public StoreApi() {
+ this(new ApiClient());
+ }
+
+ @Autowired
+ public StoreApi(ApiClient apiClient) {
+ this.apiClient = apiClient;
+ }
+
+ public ApiClient getApiClient() {
+ return apiClient;
+ }
+
+ public void setApiClient(ApiClient apiClient) {
+ this.apiClient = apiClient;
+ }
+
+ /**
+ * Delete purchase order by ID
+ * For valid response try integer IDs with positive integer value. Negative or non-integer values will generate API errors
+ *
400 - Invalid ID supplied
+ *
404 - Order not found
+ * @param orderId ID of the order that needs to be deleted (required)
+ * @throws RestClientException if an error occurs while attempting to invoke the API
+ */
+ public void deleteOrder(Long orderId) throws RestClientException {
+ deleteOrderWithHttpInfo(orderId);
+ }
+
+ /**
+ * Delete purchase order by ID
+ * For valid response try integer IDs with positive integer value. Negative or non-integer values will generate API errors
+ *
400 - Invalid ID supplied
+ *
404 - Order not found
+ * @param orderId ID of the order that needs to be deleted (required)
+ * @return ResponseEntity<Void>
+ * @throws RestClientException if an error occurs while attempting to invoke the API
+ */
+ public ResponseEntity deleteOrderWithHttpInfo(Long orderId) throws RestClientException {
+ Object postBody = null;
+
+ // verify the required parameter 'orderId' is set
+ if (orderId == null) {
+ throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'orderId' when calling deleteOrder");
+ }
+
+ // create path and map variables
+ final Map uriVariables = new HashMap();
+ uriVariables.put("orderId", orderId);
+ String path = apiClient.expandPath("/store/order/{orderId}", uriVariables);
+
+ final MultiValueMap queryParams = new LinkedMultiValueMap();
+ final HttpHeaders headerParams = new HttpHeaders();
+ final MultiValueMap cookieParams = new LinkedMultiValueMap();
+ final MultiValueMap formParams = new LinkedMultiValueMap();
+
+ final String[] accepts = { };
+ final List accept = apiClient.selectHeaderAccept(accepts);
+ final String[] contentTypes = { };
+ final MediaType contentType = apiClient.selectHeaderContentType(contentTypes);
+
+ String[] authNames = new String[] { };
+
+ ParameterizedTypeReference returnType = new ParameterizedTypeReference() {};
+ return apiClient.invokeAPI(path, HttpMethod.DELETE, queryParams, postBody, headerParams, cookieParams, formParams, accept, contentType, authNames, returnType);
+ }
+ /**
+ * Returns pet inventories by status
+ * Returns a map of status codes to quantities
+ *
200 - successful operation
+ * @return Map<String, Integer>
+ * @throws RestClientException if an error occurs while attempting to invoke the API
+ */
+ public Map getInventory() throws RestClientException {
+ return getInventoryWithHttpInfo().getBody();
+ }
+
+ /**
+ * Returns pet inventories by status
+ * Returns a map of status codes to quantities
+ *
200 - successful operation
+ * @return ResponseEntity<Map<String, Integer>>
+ * @throws RestClientException if an error occurs while attempting to invoke the API
+ */
+ public ResponseEntity