diff --git a/bin/java-petstore-all.sh b/bin/java-petstore-all.sh
index e57e60c3311..1bfd4a9ff22 100755
--- a/bin/java-petstore-all.sh
+++ b/bin/java-petstore-all.sh
@@ -2,7 +2,6 @@
# update java petstore clients for all supported http libraries
./bin/java-petstore-feign-10x.sh
-./bin/java-petstore-feign.sh
./bin/java-petstore-google-api-client.sh
./bin/java-petstore-jersey1.sh
./bin/java-petstore-jersey2-java8.sh
diff --git a/bin/java-petstore-feign-9x.json b/bin/java-petstore-feign-9x.json
deleted file mode 100644
index 3508a4521ce..00000000000
--- a/bin/java-petstore-feign-9x.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "library": "feign",
- "artifactId": "petstore-feign",
- "feignVersion": "9.x"
-}
diff --git a/bin/java-petstore-feign.json b/bin/java-petstore-feign.json
deleted file mode 100644
index 187612c699c..00000000000
--- a/bin/java-petstore-feign.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "library": "feign",
- "artifactId": "petstore-feign",
- "feignVersion": "10.x"
-}
diff --git a/bin/java-petstore-feign.sh b/bin/java-petstore-feign.sh
deleted file mode 100755
index 48038613a82..00000000000
--- a/bin/java-petstore-feign.sh
+++ /dev/null
@@ -1,40 +0,0 @@
-#!/bin/sh
-
-SCRIPT="$0"
-echo "# START SCRIPT: $SCRIPT"
-
-while [ -h "$SCRIPT" ] ; do
- ls=`ls -ld "$SCRIPT"`
- link=`expr "$ls" : '.*-> \(.*\)$'`
- if expr "$link" : '/.*' > /dev/null; then
- SCRIPT="$link"
- else
- SCRIPT=`dirname "$SCRIPT"`/"$link"
- fi
-done
-
-if [ ! -d "${APP_DIR}" ]; then
- APP_DIR=`dirname "$SCRIPT"`/..
- APP_DIR=`cd "${APP_DIR}"; pwd`
-fi
-
-executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar"
-
-if [ ! -f "$executable" ]
-then
- mvn -B clean package
-fi
-
-# if you've executed sbt assembly previously it will use that instead.
-export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
-ags="generate -t modules/openapi-generator/src/main/resources/Java/libraries/feign -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin/java-petstore-feign-9x.json -o samples/client/petstore/java/feign --additional-properties hideGenerationTimestamp=true,booleanGetterPrefix=is,additionalModelTypeAnnotations=@javax.annotation.concurrent.Immutable $@"
-
-echo "Removing files and folders under samples/client/petstore/java/feign/src/main"
-rm -rf samples/client/petstore/java/feign/src/main
-find samples/client/petstore/java/feign -maxdepth 1 -type f ! -name "README.md" -exec rm {} +
-java $JAVA_OPTS -jar $executable $ags
-
-# copy additional manually written unit-tests
-mkdir samples/client/petstore/java/feign/src/test/java/org/openapitools/client
-
-cp CI/samples.ci/client/petstore/java/test-manual/common/StringUtilTest.java samples/client/petstore/java/feign/src/test/java/org/openapitools/client/StringUtilTest.java
diff --git a/bin/windows/java-petstore-all.bat b/bin/windows/java-petstore-all.bat
index 6bff30955cd..11ae82918b3 100644
--- a/bin/windows/java-petstore-all.bat
+++ b/bin/windows/java-petstore-all.bat
@@ -1,5 +1,4 @@
call .\bin\windows\java-petstore-feign-10x.bat
-call .\bin\windows\java-petstore-feign.bat
call .\bin\windows\java-petstore-google-api-client.bat
call .\bin\windows\java-petstore-jersey1.bat
call .\bin\windows\java-petstore-jersey2-java8.bat
diff --git a/bin/windows/java-petstore-feign.bat b/bin/windows/java-petstore-feign.bat
deleted file mode 100644
index 261965dcb6f..00000000000
--- a/bin/windows/java-petstore-feign.bat
+++ /dev/null
@@ -1,10 +0,0 @@
-set executable=.\modules\openapi-generator-cli\target\openapi-generator-cli.jar
-
-If Not Exist %executable% (
- mvn clean package
-)
-
-REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M
-set ags=generate -t modules\openapi-generator\src\main\resources\Java\libraries\feign -i modules\openapi-generator\src\test\resources\2_0\petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin\java-petstore-feign-9x.json -o samples\client\petstore\java\feign --additional-properties hideGenerationTimestamp=true,booleanGetterPrefix=is,additionalModelTypeAnnotations=@javax.annotation.concurrent.Immutable
-
-java %JAVA_OPTS% -jar %executable% %ags%
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaClientCodegen.java
index b7d84d43466..ebedabbf895 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaClientCodegen.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaClientCodegen.java
@@ -237,21 +237,9 @@ public class JavaClientCodegen extends AbstractJavaCodegen
}
additionalProperties.put(PLAY_VERSION, playVersion);
- // OpenFeign
+ // default to feign 10.x
if (additionalProperties.containsKey(FEIGN_VERSION)) {
- this.setFeignVersion(additionalProperties.get(FEIGN_VERSION).toString());
-
- if ("10.x".equals(feignVersion)) {
- additionalProperties.put("useFeign10", true);
- } else if ("9.x".equals(feignVersion)) {
- additionalProperties.put("useFeign10", false);
- once(LOGGER).warn("Feign 9.x support has been deprecated. Please use 10.x (default) instead.");
- } else {
- throw new RuntimeException("Ivalid feignOoption '{}'. Must be '10.x' or '9.x' (deprecated).");
- }
- } else {
- // default to feign 10.x
- additionalProperties.put("useFeign10", true);
+ once(LOGGER).warn("feignVersion has been deprecated. 10.x is the default.");
}
additionalProperties.put(FEIGN_VERSION, feignVersion);
diff --git a/pom.xml b/pom.xml
index 7f3fde37808..8b2dbb2046f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -772,7 +772,7 @@
- samples/client/petstore/java/feign
+ samples/client/petstore/java/feign10x
@@ -1261,7 +1261,6 @@
samples/client/petstore/scala-httpclientsamples/client/petstore/scalazsamples/client/petstore/clojure
- samples/client/petstore/java/feignsamples/client/petstore/java/feign10xsamples/client/petstore/java/jersey1samples/client/petstore/java/jersey2-java8
@@ -1355,7 +1354,6 @@
samples/client/petstore/dart-jaguar/flutter_petstore/openapisamples/client/petstore/scala-akkasamples/client/petstore/scala-httpclient
- samples/client/petstore/java/feignsamples/client/petstore/java/jersey1samples/client/petstore/java/okhttp-gsonsamples/client/petstore/java/retrofit
diff --git a/samples/client/petstore/java/feign/.gitignore b/samples/client/petstore/java/feign/.gitignore
deleted file mode 100644
index a530464afa1..00000000000
--- a/samples/client/petstore/java/feign/.gitignore
+++ /dev/null
@@ -1,21 +0,0 @@
-*.class
-
-# Mobile Tools for Java (J2ME)
-.mtj.tmp/
-
-# Package Files #
-*.jar
-*.war
-*.ear
-
-# exclude jar for gradle wrapper
-!gradle/wrapper/*.jar
-
-# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
-hs_err_pid*
-
-# build files
-**/target
-target
-.gradle
-build
diff --git a/samples/client/petstore/java/feign/.openapi-generator-ignore b/samples/client/petstore/java/feign/.openapi-generator-ignore
deleted file mode 100644
index 7484ee590a3..00000000000
--- a/samples/client/petstore/java/feign/.openapi-generator-ignore
+++ /dev/null
@@ -1,23 +0,0 @@
-# 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/samples/client/petstore/java/feign/.openapi-generator/FILES b/samples/client/petstore/java/feign/.openapi-generator/FILES
deleted file mode 100644
index 4fa1d13eeb8..00000000000
--- a/samples/client/petstore/java/feign/.openapi-generator/FILES
+++ /dev/null
@@ -1,81 +0,0 @@
-.gitignore
-.openapi-generator-ignore
-.travis.yml
-README.md
-api/openapi.yaml
-build.gradle
-build.sbt
-git_push.sh
-gradle.properties
-gradle/wrapper/gradle-wrapper.jar
-gradle/wrapper/gradle-wrapper.properties
-gradlew
-gradlew.bat
-pom.xml
-settings.gradle
-src/main/AndroidManifest.xml
-src/main/java/org/openapitools/client/ApiClient.java
-src/main/java/org/openapitools/client/CustomInstantDeserializer.java
-src/main/java/org/openapitools/client/EncodingUtils.java
-src/main/java/org/openapitools/client/ParamExpander.java
-src/main/java/org/openapitools/client/RFC3339DateFormat.java
-src/main/java/org/openapitools/client/ServerConfiguration.java
-src/main/java/org/openapitools/client/ServerVariable.java
-src/main/java/org/openapitools/client/StringUtil.java
-src/main/java/org/openapitools/client/api/AnotherFakeApi.java
-src/main/java/org/openapitools/client/api/FakeApi.java
-src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java
-src/main/java/org/openapitools/client/api/PetApi.java
-src/main/java/org/openapitools/client/api/StoreApi.java
-src/main/java/org/openapitools/client/api/UserApi.java
-src/main/java/org/openapitools/client/auth/ApiKeyAuth.java
-src/main/java/org/openapitools/client/auth/HttpBasicAuth.java
-src/main/java/org/openapitools/client/auth/HttpBearerAuth.java
-src/main/java/org/openapitools/client/auth/OAuth.java
-src/main/java/org/openapitools/client/auth/OAuthFlow.java
-src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java
-src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java
-src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java
-src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java
-src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java
-src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java
-src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java
-src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java
-src/main/java/org/openapitools/client/model/Animal.java
-src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java
-src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java
-src/main/java/org/openapitools/client/model/ArrayTest.java
-src/main/java/org/openapitools/client/model/BigCat.java
-src/main/java/org/openapitools/client/model/BigCatAllOf.java
-src/main/java/org/openapitools/client/model/Capitalization.java
-src/main/java/org/openapitools/client/model/Cat.java
-src/main/java/org/openapitools/client/model/CatAllOf.java
-src/main/java/org/openapitools/client/model/Category.java
-src/main/java/org/openapitools/client/model/ClassModel.java
-src/main/java/org/openapitools/client/model/Client.java
-src/main/java/org/openapitools/client/model/Dog.java
-src/main/java/org/openapitools/client/model/DogAllOf.java
-src/main/java/org/openapitools/client/model/EnumArrays.java
-src/main/java/org/openapitools/client/model/EnumClass.java
-src/main/java/org/openapitools/client/model/EnumTest.java
-src/main/java/org/openapitools/client/model/FileSchemaTestClass.java
-src/main/java/org/openapitools/client/model/FormatTest.java
-src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java
-src/main/java/org/openapitools/client/model/MapTest.java
-src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java
-src/main/java/org/openapitools/client/model/Model200Response.java
-src/main/java/org/openapitools/client/model/ModelApiResponse.java
-src/main/java/org/openapitools/client/model/ModelReturn.java
-src/main/java/org/openapitools/client/model/Name.java
-src/main/java/org/openapitools/client/model/NumberOnly.java
-src/main/java/org/openapitools/client/model/Order.java
-src/main/java/org/openapitools/client/model/OuterComposite.java
-src/main/java/org/openapitools/client/model/OuterEnum.java
-src/main/java/org/openapitools/client/model/Pet.java
-src/main/java/org/openapitools/client/model/ReadOnlyFirst.java
-src/main/java/org/openapitools/client/model/SpecialModelName.java
-src/main/java/org/openapitools/client/model/Tag.java
-src/main/java/org/openapitools/client/model/TypeHolderDefault.java
-src/main/java/org/openapitools/client/model/TypeHolderExample.java
-src/main/java/org/openapitools/client/model/User.java
-src/main/java/org/openapitools/client/model/XmlItem.java
diff --git a/samples/client/petstore/java/feign/.openapi-generator/VERSION b/samples/client/petstore/java/feign/.openapi-generator/VERSION
deleted file mode 100644
index d99e7162d01..00000000000
--- a/samples/client/petstore/java/feign/.openapi-generator/VERSION
+++ /dev/null
@@ -1 +0,0 @@
-5.0.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/java/feign/.travis.yml b/samples/client/petstore/java/feign/.travis.yml
deleted file mode 100644
index e3bdf2af1be..00000000000
--- a/samples/client/petstore/java/feign/.travis.yml
+++ /dev/null
@@ -1,22 +0,0 @@
-#
-# 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/samples/client/petstore/java/feign/README.md b/samples/client/petstore/java/feign/README.md
deleted file mode 100644
index 646dfdc4e2b..00000000000
--- a/samples/client/petstore/java/feign/README.md
+++ /dev/null
@@ -1,43 +0,0 @@
-# petstore-feign
-
-## Requirements
-
-Building the API client library requires [Maven](https://maven.apache.org/) to be installed.
-
-## Installation & Usage
-
-To install the API client library to your local Maven repository, simply execute:
-
-```shell
-mvn install
-```
-
-To deploy it to a remote Maven repository instead, configure the settings of the repository and execute:
-
-```shell
-mvn deploy
-```
-
-Refer to the [official documentation](https://maven.apache.org/plugins/maven-deploy-plugin/usage.html) for more information.
-
-After the client library is installed/deployed, you can use it in your Maven project by adding the following to your *pom.xml*:
-
-```xml
-
- org.openapitools
- petstore-feign
- 1.0.0
- compile
-
-
-```
-
-## Recommendation
-
-It's recommended to create an instance of `ApiClient` per thread in a multithreaded environment to avoid any potential issues.
-
-## Author
-
-
-
-
diff --git a/samples/client/petstore/java/feign/api/openapi.yaml b/samples/client/petstore/java/feign/api/openapi.yaml
deleted file mode 100644
index a49359fd348..00000000000
--- a/samples/client/petstore/java/feign/api/openapi.yaml
+++ /dev/null
@@ -1,2187 +0,0 @@
-openapi: 3.0.1
-info:
- description: 'This spec is mainly for testing Petstore server and contains fake
- endpoints, models. Please do not use this for any other purpose. Special characters:
- " \'
- license:
- name: Apache-2.0
- url: https://www.apache.org/licenses/LICENSE-2.0.html
- title: OpenAPI Petstore
- version: 1.0.0
-servers:
-- url: http://petstore.swagger.io:80/v2
-tags:
-- description: Everything about your Pets
- name: pet
-- description: Access to Petstore orders
- name: store
-- description: Operations about user
- name: user
-paths:
- /pet:
- post:
- operationId: addPet
- requestBody:
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Pet'
- application/xml:
- schema:
- $ref: '#/components/schemas/Pet'
- description: Pet object that needs to be added to the store
- required: true
- responses:
- "200":
- content: {}
- description: successful operation
- "405":
- content: {}
- description: Invalid input
- security:
- - petstore_auth:
- - write:pets
- - read:pets
- summary: Add a new pet to the store
- tags:
- - pet
- x-codegen-request-body-name: body
- x-contentType: application/json
- x-accepts: application/json
- put:
- operationId: updatePet
- requestBody:
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Pet'
- application/xml:
- schema:
- $ref: '#/components/schemas/Pet'
- description: Pet object that needs to be added to the store
- required: true
- responses:
- "200":
- content: {}
- description: successful operation
- "400":
- content: {}
- description: Invalid ID supplied
- "404":
- content: {}
- description: Pet not found
- "405":
- content: {}
- description: Validation exception
- security:
- - petstore_auth:
- - write:pets
- - read:pets
- summary: Update an existing pet
- tags:
- - pet
- x-codegen-request-body-name: body
- x-contentType: application/json
- x-accepts: application/json
- /pet/findByStatus:
- get:
- description: Multiple status values can be provided with comma separated strings
- operationId: findPetsByStatus
- parameters:
- - description: Status values that need to be considered for filter
- explode: false
- in: query
- name: status
- required: true
- schema:
- items:
- default: available
- enum:
- - available
- - pending
- - sold
- type: string
- type: array
- style: form
- responses:
- "200":
- content:
- application/xml:
- schema:
- items:
- $ref: '#/components/schemas/Pet'
- type: array
- application/json:
- schema:
- items:
- $ref: '#/components/schemas/Pet'
- type: array
- description: successful operation
- "400":
- content: {}
- description: Invalid status value
- security:
- - petstore_auth:
- - write:pets
- - read:pets
- summary: Finds Pets by status
- tags:
- - pet
- x-accepts: application/json
- /pet/findByTags:
- get:
- deprecated: true
- description: Multiple tags can be provided with comma separated strings. Use
- tag1, tag2, tag3 for testing.
- operationId: findPetsByTags
- parameters:
- - description: Tags to filter by
- explode: false
- in: query
- name: tags
- required: true
- schema:
- items:
- type: string
- type: array
- uniqueItems: true
- style: form
- responses:
- "200":
- content:
- application/xml:
- schema:
- items:
- $ref: '#/components/schemas/Pet'
- type: array
- uniqueItems: true
- application/json:
- schema:
- items:
- $ref: '#/components/schemas/Pet'
- type: array
- uniqueItems: true
- description: successful operation
- "400":
- content: {}
- description: Invalid tag value
- security:
- - petstore_auth:
- - write:pets
- - read:pets
- summary: Finds Pets by tags
- tags:
- - pet
- x-accepts: application/json
- /pet/{petId}:
- delete:
- operationId: deletePet
- parameters:
- - in: header
- name: api_key
- schema:
- type: string
- - description: Pet id to delete
- in: path
- name: petId
- required: true
- schema:
- format: int64
- type: integer
- responses:
- "200":
- content: {}
- description: successful operation
- "400":
- content: {}
- description: Invalid pet value
- security:
- - petstore_auth:
- - write:pets
- - read:pets
- summary: Deletes a pet
- tags:
- - pet
- x-accepts: application/json
- get:
- description: Returns a single pet
- operationId: getPetById
- parameters:
- - description: ID of pet to return
- in: path
- name: petId
- required: true
- schema:
- format: int64
- type: integer
- responses:
- "200":
- content:
- application/xml:
- schema:
- $ref: '#/components/schemas/Pet'
- application/json:
- schema:
- $ref: '#/components/schemas/Pet'
- description: successful operation
- "400":
- content: {}
- description: Invalid ID supplied
- "404":
- content: {}
- description: Pet not found
- security:
- - api_key: []
- summary: Find pet by ID
- tags:
- - pet
- x-accepts: application/json
- post:
- operationId: updatePetWithForm
- parameters:
- - description: ID of pet that needs to be updated
- in: path
- name: petId
- required: true
- schema:
- format: int64
- type: integer
- requestBody:
- content:
- application/x-www-form-urlencoded:
- schema:
- properties:
- name:
- description: Updated name of the pet
- type: string
- status:
- description: Updated status of the pet
- type: string
- responses:
- "405":
- content: {}
- description: Invalid input
- security:
- - petstore_auth:
- - write:pets
- - read:pets
- summary: Updates a pet in the store with form data
- tags:
- - pet
- x-contentType: application/x-www-form-urlencoded
- x-accepts: application/json
- /pet/{petId}/uploadImage:
- post:
- operationId: uploadFile
- parameters:
- - description: ID of pet to update
- in: path
- name: petId
- required: true
- schema:
- format: int64
- type: integer
- requestBody:
- content:
- multipart/form-data:
- schema:
- properties:
- additionalMetadata:
- description: Additional data to pass to server
- type: string
- file:
- description: file to upload
- format: binary
- type: string
- responses:
- "200":
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ApiResponse'
- description: successful operation
- security:
- - petstore_auth:
- - write:pets
- - read:pets
- summary: uploads an image
- tags:
- - pet
- x-contentType: multipart/form-data
- x-accepts: application/json
- /store/inventory:
- get:
- description: Returns a map of status codes to quantities
- operationId: getInventory
- responses:
- "200":
- content:
- application/json:
- schema:
- additionalProperties:
- format: int32
- type: integer
- type: object
- description: successful operation
- security:
- - api_key: []
- summary: Returns pet inventories by status
- tags:
- - store
- x-accepts: application/json
- /store/order:
- post:
- operationId: placeOrder
- requestBody:
- content:
- '*/*':
- schema:
- $ref: '#/components/schemas/Order'
- description: order placed for purchasing the pet
- required: true
- responses:
- "200":
- content:
- application/xml:
- schema:
- $ref: '#/components/schemas/Order'
- application/json:
- schema:
- $ref: '#/components/schemas/Order'
- description: successful operation
- "400":
- content: {}
- description: Invalid Order
- summary: Place an order for a pet
- tags:
- - store
- x-codegen-request-body-name: body
- x-contentType: '*/*'
- x-accepts: application/json
- /store/order/{order_id}:
- delete:
- description: For valid response try integer IDs with value < 1000. Anything
- above 1000 or nonintegers will generate API errors
- operationId: deleteOrder
- parameters:
- - description: ID of the order that needs to be deleted
- in: path
- name: order_id
- required: true
- schema:
- type: string
- responses:
- "400":
- content: {}
- description: Invalid ID supplied
- "404":
- content: {}
- description: Order not found
- summary: Delete purchase order by ID
- tags:
- - store
- x-accepts: application/json
- get:
- description: For valid response try integer IDs with value <= 5 or > 10. Other
- values will generated exceptions
- operationId: getOrderById
- parameters:
- - description: ID of pet that needs to be fetched
- in: path
- name: order_id
- required: true
- schema:
- format: int64
- maximum: 5
- minimum: 1
- type: integer
- responses:
- "200":
- content:
- application/xml:
- schema:
- $ref: '#/components/schemas/Order'
- application/json:
- schema:
- $ref: '#/components/schemas/Order'
- description: successful operation
- "400":
- content: {}
- description: Invalid ID supplied
- "404":
- content: {}
- description: Order not found
- summary: Find purchase order by ID
- tags:
- - store
- x-accepts: application/json
- /user:
- post:
- description: This can only be done by the logged in user.
- operationId: createUser
- requestBody:
- content:
- '*/*':
- schema:
- $ref: '#/components/schemas/User'
- description: Created user object
- required: true
- responses:
- default:
- content: {}
- description: successful operation
- summary: Create user
- tags:
- - user
- x-codegen-request-body-name: body
- x-contentType: '*/*'
- x-accepts: application/json
- /user/createWithArray:
- post:
- operationId: createUsersWithArrayInput
- requestBody:
- content:
- '*/*':
- schema:
- items:
- $ref: '#/components/schemas/User'
- type: array
- description: List of user object
- required: true
- responses:
- default:
- content: {}
- description: successful operation
- summary: Creates list of users with given input array
- tags:
- - user
- x-codegen-request-body-name: body
- x-contentType: '*/*'
- x-accepts: application/json
- /user/createWithList:
- post:
- operationId: createUsersWithListInput
- requestBody:
- content:
- '*/*':
- schema:
- items:
- $ref: '#/components/schemas/User'
- type: array
- description: List of user object
- required: true
- responses:
- default:
- content: {}
- description: successful operation
- summary: Creates list of users with given input array
- tags:
- - user
- x-codegen-request-body-name: body
- x-contentType: '*/*'
- x-accepts: application/json
- /user/login:
- get:
- operationId: loginUser
- parameters:
- - description: The user name for login
- in: query
- name: username
- required: true
- schema:
- type: string
- - description: The password for login in clear text
- in: query
- name: password
- required: true
- schema:
- type: string
- responses:
- "200":
- content:
- application/xml:
- schema:
- type: string
- application/json:
- schema:
- type: string
- description: successful operation
- headers:
- X-Rate-Limit:
- description: calls per hour allowed by the user
- schema:
- format: int32
- type: integer
- X-Expires-After:
- description: date in UTC when token expires
- schema:
- format: date-time
- type: string
- "400":
- content: {}
- description: Invalid username/password supplied
- summary: Logs user into the system
- tags:
- - user
- x-accepts: application/json
- /user/logout:
- get:
- operationId: logoutUser
- responses:
- default:
- content: {}
- description: successful operation
- summary: Logs out current logged in user session
- tags:
- - user
- x-accepts: application/json
- /user/{username}:
- delete:
- description: This can only be done by the logged in user.
- operationId: deleteUser
- parameters:
- - description: The name that needs to be deleted
- in: path
- name: username
- required: true
- schema:
- type: string
- responses:
- "400":
- content: {}
- description: Invalid username supplied
- "404":
- content: {}
- description: User not found
- summary: Delete user
- tags:
- - user
- x-accepts: application/json
- get:
- operationId: getUserByName
- parameters:
- - description: The name that needs to be fetched. Use user1 for testing.
- in: path
- name: username
- required: true
- schema:
- type: string
- responses:
- "200":
- content:
- application/xml:
- schema:
- $ref: '#/components/schemas/User'
- application/json:
- schema:
- $ref: '#/components/schemas/User'
- description: successful operation
- "400":
- content: {}
- description: Invalid username supplied
- "404":
- content: {}
- description: User not found
- summary: Get user by user name
- tags:
- - user
- x-accepts: application/json
- put:
- description: This can only be done by the logged in user.
- operationId: updateUser
- parameters:
- - description: name that need to be deleted
- in: path
- name: username
- required: true
- schema:
- type: string
- requestBody:
- content:
- '*/*':
- schema:
- $ref: '#/components/schemas/User'
- description: Updated user object
- required: true
- responses:
- "400":
- content: {}
- description: Invalid user supplied
- "404":
- content: {}
- description: User not found
- summary: Updated user
- tags:
- - user
- x-codegen-request-body-name: body
- x-contentType: '*/*'
- x-accepts: application/json
- /fake_classname_test:
- patch:
- description: To test class name in snake case
- operationId: testClassname
- requestBody:
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Client'
- description: client model
- required: true
- responses:
- "200":
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Client'
- description: successful operation
- security:
- - api_key_query: []
- summary: To test class name in snake case
- tags:
- - fake_classname_tags 123#$%^
- x-codegen-request-body-name: body
- x-contentType: application/json
- x-accepts: application/json
- /fake:
- delete:
- description: Fake endpoint to test group parameters (optional)
- operationId: testGroupParameters
- parameters:
- - description: Required String in group parameters
- in: query
- name: required_string_group
- required: true
- schema:
- type: integer
- - description: Required Boolean in group parameters
- in: header
- name: required_boolean_group
- required: true
- schema:
- type: boolean
- - description: Required Integer in group parameters
- in: query
- name: required_int64_group
- required: true
- schema:
- format: int64
- type: integer
- - description: String in group parameters
- in: query
- name: string_group
- schema:
- type: integer
- - description: Boolean in group parameters
- in: header
- name: boolean_group
- schema:
- type: boolean
- - description: Integer in group parameters
- in: query
- name: int64_group
- schema:
- format: int64
- type: integer
- responses:
- "400":
- content: {}
- description: Someting wrong
- summary: Fake endpoint to test group parameters (optional)
- tags:
- - fake
- x-group-parameters: true
- x-accepts: application/json
- get:
- description: To test enum parameters
- operationId: testEnumParameters
- parameters:
- - description: Header parameter enum test (string array)
- explode: false
- in: header
- name: enum_header_string_array
- schema:
- items:
- default: $
- enum:
- - '>'
- - $
- type: string
- type: array
- style: simple
- - description: Header parameter enum test (string)
- in: header
- name: enum_header_string
- schema:
- default: -efg
- enum:
- - _abc
- - -efg
- - (xyz)
- type: string
- - description: Query parameter enum test (string array)
- explode: false
- in: query
- name: enum_query_string_array
- schema:
- items:
- default: $
- enum:
- - '>'
- - $
- type: string
- type: array
- style: form
- - description: Query parameter enum test (string)
- in: query
- name: enum_query_string
- schema:
- default: -efg
- enum:
- - _abc
- - -efg
- - (xyz)
- type: string
- - description: Query parameter enum test (double)
- in: query
- name: enum_query_integer
- schema:
- enum:
- - 1
- - -2
- format: int32
- type: integer
- - description: Query parameter enum test (double)
- in: query
- name: enum_query_double
- schema:
- enum:
- - 1.1
- - -1.2
- format: double
- type: number
- requestBody:
- content:
- application/x-www-form-urlencoded:
- schema:
- properties:
- enum_form_string_array:
- description: Form parameter enum test (string array)
- items:
- default: $
- enum:
- - '>'
- - $
- type: string
- type: array
- enum_form_string:
- default: -efg
- description: Form parameter enum test (string)
- enum:
- - _abc
- - -efg
- - (xyz)
- type: string
- responses:
- "400":
- content: {}
- description: Invalid request
- "404":
- content: {}
- description: Not found
- summary: To test enum parameters
- tags:
- - fake
- x-contentType: application/x-www-form-urlencoded
- x-accepts: application/json
- patch:
- description: To test "client" model
- operationId: testClientModel
- requestBody:
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Client'
- description: client model
- required: true
- responses:
- "200":
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Client'
- description: successful operation
- summary: To test "client" model
- tags:
- - fake
- x-codegen-request-body-name: body
- x-contentType: application/json
- x-accepts: application/json
- post:
- description: |-
- Fake endpoint for testing various parameters
- 假端點
- 偽のエンドポイント
- 가짜 엔드 포인트
- operationId: testEndpointParameters
- requestBody:
- content:
- application/x-www-form-urlencoded:
- schema:
- properties:
- integer:
- description: None
- format: int32
- maximum: 100
- minimum: 10
- type: integer
- int32:
- description: None
- format: int32
- maximum: 200
- minimum: 20
- type: integer
- int64:
- description: None
- format: int64
- type: integer
- number:
- description: None
- maximum: 543.2
- minimum: 32.1
- type: number
- float:
- description: None
- format: float
- maximum: 987.6
- type: number
- double:
- description: None
- format: double
- maximum: 123.4
- minimum: 67.8
- type: number
- string:
- description: None
- pattern: /[a-z]/i
- type: string
- pattern_without_delimiter:
- description: None
- pattern: ^[A-Z].*
- type: string
- byte:
- description: None
- format: byte
- type: string
- binary:
- description: None
- format: binary
- type: string
- date:
- description: None
- format: date
- type: string
- dateTime:
- description: None
- format: date-time
- type: string
- password:
- description: None
- format: password
- maxLength: 64
- minLength: 10
- type: string
- callback:
- description: None
- type: string
- required:
- - byte
- - double
- - number
- - pattern_without_delimiter
- required: true
- responses:
- "400":
- content: {}
- description: Invalid username supplied
- "404":
- content: {}
- description: User not found
- security:
- - http_basic_test: []
- summary: |-
- Fake endpoint for testing various parameters
- 假端點
- 偽のエンドポイント
- 가짜 엔드 포인트
- tags:
- - fake
- x-contentType: application/x-www-form-urlencoded
- x-accepts: application/json
- /fake/outer/number:
- post:
- description: Test serialization of outer number types
- operationId: fakeOuterNumberSerialize
- requestBody:
- content:
- '*/*':
- schema:
- $ref: '#/components/schemas/OuterNumber'
- description: Input number as post body
- required: false
- responses:
- "200":
- content:
- '*/*':
- schema:
- $ref: '#/components/schemas/OuterNumber'
- description: Output number
- tags:
- - fake
- x-codegen-request-body-name: body
- x-contentType: '*/*'
- x-accepts: '*/*'
- /fake/outer/string:
- post:
- description: Test serialization of outer string types
- operationId: fakeOuterStringSerialize
- requestBody:
- content:
- '*/*':
- schema:
- $ref: '#/components/schemas/OuterString'
- description: Input string as post body
- required: false
- responses:
- "200":
- content:
- '*/*':
- schema:
- $ref: '#/components/schemas/OuterString'
- description: Output string
- tags:
- - fake
- x-codegen-request-body-name: body
- x-contentType: '*/*'
- x-accepts: '*/*'
- /fake/outer/boolean:
- post:
- description: Test serialization of outer boolean types
- operationId: fakeOuterBooleanSerialize
- requestBody:
- content:
- '*/*':
- schema:
- $ref: '#/components/schemas/OuterBoolean'
- description: Input boolean as post body
- required: false
- responses:
- "200":
- content:
- '*/*':
- schema:
- $ref: '#/components/schemas/OuterBoolean'
- description: Output boolean
- tags:
- - fake
- x-codegen-request-body-name: body
- x-contentType: '*/*'
- x-accepts: '*/*'
- /fake/outer/composite:
- post:
- description: Test serialization of object with outer number type
- operationId: fakeOuterCompositeSerialize
- requestBody:
- content:
- '*/*':
- schema:
- $ref: '#/components/schemas/OuterComposite'
- description: Input composite as post body
- required: false
- responses:
- "200":
- content:
- '*/*':
- schema:
- $ref: '#/components/schemas/OuterComposite'
- description: Output composite
- tags:
- - fake
- x-codegen-request-body-name: body
- x-contentType: '*/*'
- x-accepts: '*/*'
- /fake/jsonFormData:
- get:
- operationId: testJsonFormData
- requestBody:
- content:
- application/x-www-form-urlencoded:
- schema:
- properties:
- param:
- description: field1
- type: string
- param2:
- description: field2
- type: string
- required:
- - param
- - param2
- required: true
- responses:
- "200":
- content: {}
- description: successful operation
- summary: test json serialization of form data
- tags:
- - fake
- x-contentType: application/x-www-form-urlencoded
- x-accepts: application/json
- /fake/inline-additionalProperties:
- post:
- operationId: testInlineAdditionalProperties
- requestBody:
- content:
- application/json:
- schema:
- additionalProperties:
- type: string
- type: object
- description: request body
- required: true
- responses:
- "200":
- content: {}
- description: successful operation
- summary: test inline additionalProperties
- tags:
- - fake
- x-codegen-request-body-name: param
- x-contentType: application/json
- x-accepts: application/json
- /fake/body-with-query-params:
- put:
- operationId: testBodyWithQueryParams
- parameters:
- - in: query
- name: query
- required: true
- schema:
- type: string
- requestBody:
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/User'
- required: true
- responses:
- "200":
- content: {}
- description: Success
- tags:
- - fake
- x-codegen-request-body-name: body
- x-contentType: application/json
- x-accepts: application/json
- /fake/create_xml_item:
- post:
- description: this route creates an XmlItem
- operationId: createXmlItem
- requestBody:
- content:
- application/xml:
- schema:
- $ref: '#/components/schemas/XmlItem'
- application/xml; charset=utf-8:
- schema:
- $ref: '#/components/schemas/XmlItem'
- application/xml; charset=utf-16:
- schema:
- $ref: '#/components/schemas/XmlItem'
- text/xml:
- schema:
- $ref: '#/components/schemas/XmlItem'
- text/xml; charset=utf-8:
- schema:
- $ref: '#/components/schemas/XmlItem'
- text/xml; charset=utf-16:
- schema:
- $ref: '#/components/schemas/XmlItem'
- description: XmlItem Body
- required: true
- responses:
- "200":
- content: {}
- description: successful operation
- summary: creates an XmlItem
- tags:
- - fake
- x-codegen-request-body-name: XmlItem
- x-contentType: application/xml
- x-accepts: application/json
- /another-fake/dummy:
- patch:
- description: To test special tags and operation ID starting with number
- operationId: 123_test_@#$%_special_tags
- requestBody:
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Client'
- description: client model
- required: true
- responses:
- "200":
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Client'
- description: successful operation
- summary: To test special tags
- tags:
- - $another-fake?
- x-codegen-request-body-name: body
- x-contentType: application/json
- x-accepts: application/json
- /fake/body-with-file-schema:
- put:
- description: For this test, the body for this request much reference a schema
- named `File`.
- operationId: testBodyWithFileSchema
- requestBody:
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/FileSchemaTestClass'
- required: true
- responses:
- "200":
- content: {}
- description: Success
- tags:
- - fake
- x-codegen-request-body-name: body
- x-contentType: application/json
- x-accepts: application/json
- /fake/test-query-paramters:
- put:
- description: To test the collection format in query parameters
- operationId: testQueryParameterCollectionFormat
- parameters:
- - explode: false
- in: query
- name: pipe
- required: true
- schema:
- items:
- type: string
- type: array
- style: form
- - in: query
- name: ioutil
- required: true
- schema:
- items:
- type: string
- type: array
- - in: query
- name: http
- required: true
- schema:
- items:
- type: string
- type: array
- style: spaceDelimited
- - explode: false
- in: query
- name: url
- required: true
- schema:
- items:
- type: string
- type: array
- style: form
- - explode: true
- in: query
- name: context
- required: true
- schema:
- items:
- type: string
- type: array
- style: form
- responses:
- "200":
- content: {}
- description: Success
- tags:
- - fake
- x-accepts: application/json
- /fake/{petId}/uploadImageWithRequiredFile:
- post:
- operationId: uploadFileWithRequiredFile
- parameters:
- - description: ID of pet to update
- in: path
- name: petId
- required: true
- schema:
- format: int64
- type: integer
- requestBody:
- content:
- multipart/form-data:
- schema:
- properties:
- additionalMetadata:
- description: Additional data to pass to server
- type: string
- requiredFile:
- description: file to upload
- format: binary
- type: string
- required:
- - requiredFile
- required: true
- responses:
- "200":
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ApiResponse'
- description: successful operation
- security:
- - petstore_auth:
- - write:pets
- - read:pets
- summary: uploads an image (required)
- tags:
- - pet
- x-contentType: multipart/form-data
- x-accepts: application/json
-components:
- schemas:
- Order:
- example:
- petId: 6
- quantity: 1
- id: 0
- shipDate: 2000-01-23T04:56:07.000+00:00
- complete: false
- status: placed
- properties:
- id:
- format: int64
- type: integer
- petId:
- format: int64
- type: integer
- quantity:
- format: int32
- type: integer
- shipDate:
- format: date-time
- type: string
- status:
- description: Order Status
- enum:
- - placed
- - approved
- - delivered
- type: string
- complete:
- default: false
- type: boolean
- type: object
- xml:
- name: Order
- Category:
- example:
- name: default-name
- id: 6
- properties:
- id:
- format: int64
- type: integer
- name:
- default: default-name
- type: string
- required:
- - name
- type: object
- xml:
- name: Category
- User:
- example:
- firstName: firstName
- lastName: lastName
- password: password
- userStatus: 6
- phone: phone
- id: 0
- email: email
- username: username
- properties:
- id:
- format: int64
- type: integer
- x-is-unique: true
- username:
- type: string
- firstName:
- type: string
- lastName:
- type: string
- email:
- type: string
- password:
- type: string
- phone:
- type: string
- userStatus:
- description: User Status
- format: int32
- type: integer
- type: object
- xml:
- name: User
- Tag:
- example:
- name: name
- id: 1
- properties:
- id:
- format: int64
- type: integer
- name:
- type: string
- type: object
- xml:
- name: Tag
- Pet:
- example:
- photoUrls:
- - photoUrls
- - photoUrls
- name: doggie
- id: 0
- category:
- name: default-name
- id: 6
- tags:
- - name: name
- id: 1
- - name: name
- id: 1
- status: available
- properties:
- id:
- format: int64
- type: integer
- x-is-unique: true
- category:
- $ref: '#/components/schemas/Category'
- name:
- example: doggie
- type: string
- photoUrls:
- items:
- type: string
- type: array
- uniqueItems: true
- xml:
- name: photoUrl
- wrapped: true
- tags:
- items:
- $ref: '#/components/schemas/Tag'
- type: array
- xml:
- name: tag
- wrapped: true
- status:
- description: pet status in the store
- enum:
- - available
- - pending
- - sold
- type: string
- required:
- - name
- - photoUrls
- type: object
- xml:
- name: Pet
- ApiResponse:
- example:
- code: 0
- type: type
- message: message
- properties:
- code:
- format: int32
- type: integer
- type:
- type: string
- message:
- type: string
- type: object
- $special[model.name]:
- properties:
- $special[property.name]:
- format: int64
- type: integer
- type: object
- xml:
- name: $special[model.name]
- Return:
- description: Model for testing reserved words
- properties:
- return:
- format: int32
- type: integer
- type: object
- xml:
- name: Return
- Name:
- description: Model for testing model name same as property name
- properties:
- name:
- format: int32
- type: integer
- snake_case:
- format: int32
- readOnly: true
- type: integer
- property:
- type: string
- "123Number":
- readOnly: true
- type: integer
- required:
- - name
- type: object
- xml:
- name: Name
- "200_response":
- description: Model for testing model name starting with number
- properties:
- name:
- format: int32
- type: integer
- class:
- type: string
- type: object
- xml:
- name: Name
- ClassModel:
- description: Model for testing model with "_class" property
- properties:
- _class:
- type: string
- type: object
- Dog:
- allOf:
- - $ref: '#/components/schemas/Animal'
- - $ref: '#/components/schemas/Dog_allOf'
- Cat:
- allOf:
- - $ref: '#/components/schemas/Animal'
- - $ref: '#/components/schemas/Cat_allOf'
- BigCat:
- allOf:
- - $ref: '#/components/schemas/Cat'
- - $ref: '#/components/schemas/BigCat_allOf'
- Animal:
- discriminator:
- propertyName: className
- properties:
- className:
- type: string
- color:
- default: red
- type: string
- required:
- - className
- type: object
- AnimalFarm:
- items:
- $ref: '#/components/schemas/Animal'
- type: array
- format_test:
- properties:
- integer:
- maximum: 1E+2
- minimum: 1E+1
- type: integer
- int32:
- format: int32
- maximum: 2E+2
- minimum: 2E+1
- type: integer
- int64:
- format: int64
- type: integer
- number:
- maximum: 543.2
- minimum: 32.1
- type: number
- float:
- format: float
- maximum: 987.6
- minimum: 54.3
- type: number
- double:
- format: double
- maximum: 123.4
- minimum: 67.8
- type: number
- string:
- pattern: /[a-z]/i
- type: string
- byte:
- format: byte
- pattern: ^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$
- type: string
- binary:
- format: binary
- type: string
- date:
- format: date
- type: string
- dateTime:
- format: date-time
- type: string
- uuid:
- example: 72f98069-206d-4f12-9f12-3d1e525a8e84
- format: uuid
- type: string
- password:
- format: password
- maxLength: 64
- minLength: 10
- type: string
- BigDecimal:
- format: number
- type: string
- required:
- - byte
- - date
- - number
- - password
- type: object
- EnumClass:
- default: -efg
- enum:
- - _abc
- - -efg
- - (xyz)
- type: string
- Enum_Test:
- properties:
- enum_string:
- enum:
- - UPPER
- - lower
- - ""
- type: string
- enum_string_required:
- enum:
- - UPPER
- - lower
- - ""
- type: string
- enum_integer:
- enum:
- - 1
- - -1
- format: int32
- type: integer
- enum_number:
- enum:
- - 1.1
- - -1.2
- format: double
- type: number
- outerEnum:
- $ref: '#/components/schemas/OuterEnum'
- required:
- - enum_string_required
- type: object
- AdditionalPropertiesClass:
- properties:
- map_string:
- additionalProperties:
- type: string
- type: object
- map_number:
- additionalProperties:
- type: number
- type: object
- map_integer:
- additionalProperties:
- type: integer
- type: object
- map_boolean:
- additionalProperties:
- type: boolean
- type: object
- map_array_integer:
- additionalProperties:
- items:
- type: integer
- type: array
- type: object
- map_array_anytype:
- additionalProperties:
- items:
- properties: {}
- type: object
- type: array
- type: object
- map_map_string:
- additionalProperties:
- additionalProperties:
- type: string
- type: object
- type: object
- map_map_anytype:
- additionalProperties:
- additionalProperties:
- properties: {}
- type: object
- type: object
- type: object
- anytype_1:
- properties: {}
- type: object
- anytype_2:
- type: object
- anytype_3:
- properties: {}
- type: object
- type: object
- AdditionalPropertiesString:
- additionalProperties:
- type: string
- properties:
- name:
- type: string
- type: object
- AdditionalPropertiesInteger:
- additionalProperties:
- type: integer
- properties:
- name:
- type: string
- type: object
- AdditionalPropertiesNumber:
- additionalProperties:
- type: number
- properties:
- name:
- type: string
- type: object
- AdditionalPropertiesBoolean:
- additionalProperties:
- type: boolean
- properties:
- name:
- type: string
- type: object
- AdditionalPropertiesArray:
- additionalProperties:
- items:
- properties: {}
- type: object
- type: array
- properties:
- name:
- type: string
- type: object
- AdditionalPropertiesObject:
- additionalProperties:
- additionalProperties:
- properties: {}
- type: object
- type: object
- properties:
- name:
- type: string
- type: object
- AdditionalPropertiesAnyType:
- additionalProperties:
- properties: {}
- type: object
- properties:
- name:
- type: string
- type: object
- MixedPropertiesAndAdditionalPropertiesClass:
- properties:
- uuid:
- format: uuid
- type: string
- dateTime:
- format: date-time
- type: string
- map:
- additionalProperties:
- $ref: '#/components/schemas/Animal'
- type: object
- type: object
- List:
- properties:
- "123-list":
- type: string
- type: object
- Client:
- example:
- client: client
- properties:
- client:
- type: string
- type: object
- ReadOnlyFirst:
- properties:
- bar:
- readOnly: true
- type: string
- baz:
- type: string
- type: object
- hasOnlyReadOnly:
- properties:
- bar:
- readOnly: true
- type: string
- foo:
- readOnly: true
- type: string
- type: object
- Capitalization:
- properties:
- smallCamel:
- type: string
- CapitalCamel:
- type: string
- small_Snake:
- type: string
- Capital_Snake:
- type: string
- SCA_ETH_Flow_Points:
- type: string
- ATT_NAME:
- description: |
- Name of the pet
- type: string
- type: object
- MapTest:
- properties:
- map_map_of_string:
- additionalProperties:
- additionalProperties:
- type: string
- type: object
- type: object
- map_of_enum_string:
- additionalProperties:
- enum:
- - UPPER
- - lower
- type: string
- type: object
- direct_map:
- additionalProperties:
- type: boolean
- type: object
- indirect_map:
- additionalProperties:
- type: boolean
- type: object
- type: object
- ArrayTest:
- properties:
- array_of_string:
- items:
- type: string
- type: array
- array_array_of_integer:
- items:
- items:
- format: int64
- type: integer
- type: array
- type: array
- array_array_of_model:
- items:
- items:
- $ref: '#/components/schemas/ReadOnlyFirst'
- type: array
- type: array
- type: object
- NumberOnly:
- properties:
- JustNumber:
- type: number
- type: object
- ArrayOfNumberOnly:
- properties:
- ArrayNumber:
- items:
- type: number
- type: array
- type: object
- ArrayOfArrayOfNumberOnly:
- properties:
- ArrayArrayNumber:
- items:
- items:
- type: number
- type: array
- type: array
- type: object
- EnumArrays:
- properties:
- just_symbol:
- enum:
- - '>='
- - $
- type: string
- array_enum:
- items:
- enum:
- - fish
- - crab
- type: string
- type: array
- type: object
- OuterEnum:
- enum:
- - placed
- - approved
- - delivered
- type: string
- OuterComposite:
- example:
- my_string: my_string
- my_number: 0.8008281904610115
- my_boolean: true
- properties:
- my_number:
- type: number
- my_string:
- type: string
- my_boolean:
- type: boolean
- x-codegen-body-parameter-name: boolean_post_body
- type: object
- OuterNumber:
- type: number
- OuterString:
- type: string
- OuterBoolean:
- type: boolean
- x-codegen-body-parameter-name: boolean_post_body
- StringBooleanMap:
- additionalProperties:
- type: boolean
- type: object
- FileSchemaTestClass:
- example:
- file:
- sourceURI: sourceURI
- files:
- - sourceURI: sourceURI
- - sourceURI: sourceURI
- properties:
- file:
- $ref: '#/components/schemas/File'
- files:
- items:
- $ref: '#/components/schemas/File'
- type: array
- type: object
- File:
- description: Must be named `File` for test.
- example:
- sourceURI: sourceURI
- properties:
- sourceURI:
- description: Test capitalization
- type: string
- type: object
- TypeHolderDefault:
- properties:
- string_item:
- default: what
- type: string
- number_item:
- type: number
- integer_item:
- type: integer
- bool_item:
- default: true
- type: boolean
- array_item:
- items:
- type: integer
- type: array
- required:
- - array_item
- - bool_item
- - integer_item
- - number_item
- - string_item
- type: object
- TypeHolderExample:
- properties:
- string_item:
- example: what
- type: string
- number_item:
- example: 1.234
- type: number
- float_item:
- example: 1.234
- format: float
- type: number
- integer_item:
- example: -2
- type: integer
- bool_item:
- example: true
- type: boolean
- array_item:
- example:
- - 0
- - 1
- - 2
- - 3
- items:
- type: integer
- type: array
- required:
- - array_item
- - bool_item
- - float_item
- - integer_item
- - number_item
- - string_item
- type: object
- XmlItem:
- properties:
- attribute_string:
- example: string
- type: string
- xml:
- attribute: true
- attribute_number:
- example: 1.234
- type: number
- xml:
- attribute: true
- attribute_integer:
- example: -2
- type: integer
- xml:
- attribute: true
- attribute_boolean:
- example: true
- type: boolean
- xml:
- attribute: true
- wrapped_array:
- items:
- type: integer
- type: array
- xml:
- wrapped: true
- name_string:
- example: string
- type: string
- xml:
- name: xml_name_string
- name_number:
- example: 1.234
- type: number
- xml:
- name: xml_name_number
- name_integer:
- example: -2
- type: integer
- xml:
- name: xml_name_integer
- name_boolean:
- example: true
- type: boolean
- xml:
- name: xml_name_boolean
- name_array:
- items:
- type: integer
- xml:
- name: xml_name_array_item
- type: array
- name_wrapped_array:
- items:
- type: integer
- xml:
- name: xml_name_wrapped_array_item
- type: array
- xml:
- name: xml_name_wrapped_array
- wrapped: true
- prefix_string:
- example: string
- type: string
- xml:
- prefix: ab
- prefix_number:
- example: 1.234
- type: number
- xml:
- prefix: cd
- prefix_integer:
- example: -2
- type: integer
- xml:
- prefix: ef
- prefix_boolean:
- example: true
- type: boolean
- xml:
- prefix: gh
- prefix_array:
- items:
- type: integer
- xml:
- prefix: ij
- type: array
- prefix_wrapped_array:
- items:
- type: integer
- xml:
- prefix: mn
- type: array
- xml:
- prefix: kl
- wrapped: true
- namespace_string:
- example: string
- type: string
- xml:
- namespace: http://a.com/schema
- namespace_number:
- example: 1.234
- type: number
- xml:
- namespace: http://b.com/schema
- namespace_integer:
- example: -2
- type: integer
- xml:
- namespace: http://c.com/schema
- namespace_boolean:
- example: true
- type: boolean
- xml:
- namespace: http://d.com/schema
- namespace_array:
- items:
- type: integer
- xml:
- namespace: http://e.com/schema
- type: array
- namespace_wrapped_array:
- items:
- type: integer
- xml:
- namespace: http://g.com/schema
- type: array
- xml:
- namespace: http://f.com/schema
- wrapped: true
- prefix_ns_string:
- example: string
- type: string
- xml:
- namespace: http://a.com/schema
- prefix: a
- prefix_ns_number:
- example: 1.234
- type: number
- xml:
- namespace: http://b.com/schema
- prefix: b
- prefix_ns_integer:
- example: -2
- type: integer
- xml:
- namespace: http://c.com/schema
- prefix: c
- prefix_ns_boolean:
- example: true
- type: boolean
- xml:
- namespace: http://d.com/schema
- prefix: d
- prefix_ns_array:
- items:
- type: integer
- xml:
- namespace: http://e.com/schema
- prefix: e
- type: array
- prefix_ns_wrapped_array:
- items:
- type: integer
- xml:
- namespace: http://g.com/schema
- prefix: g
- type: array
- xml:
- namespace: http://f.com/schema
- prefix: f
- wrapped: true
- type: object
- xml:
- namespace: http://a.com/schema
- prefix: pre
- Dog_allOf:
- properties:
- breed:
- type: string
- Cat_allOf:
- properties:
- declawed:
- type: boolean
- BigCat_allOf:
- properties:
- kind:
- enum:
- - lions
- - tigers
- - leopards
- - jaguars
- type: string
- securitySchemes:
- petstore_auth:
- flows:
- implicit:
- authorizationUrl: http://petstore.swagger.io/api/oauth/dialog
- scopes:
- write:pets: modify pets in your account
- read:pets: read your pets
- type: oauth2
- api_key:
- in: header
- name: api_key
- type: apiKey
- api_key_query:
- in: query
- name: api_key_query
- type: apiKey
- http_basic_test:
- scheme: basic
- type: http
-
diff --git a/samples/client/petstore/java/feign/build.gradle b/samples/client/petstore/java/feign/build.gradle
deleted file mode 100644
index 4768524c68d..00000000000
--- a/samples/client/petstore/java/feign/build.gradle
+++ /dev/null
@@ -1,124 +0,0 @@
-apply plugin: 'idea'
-apply plugin: 'eclipse'
-
-group = 'org.openapitools'
-version = '1.0.0'
-
-buildscript {
- repositories {
- maven { url "https://repo1.maven.org/maven2" }
- jcenter()
- }
- dependencies {
- classpath 'com.android.tools.build:gradle:2.3.+'
- classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
- }
-}
-
-repositories {
- jcenter()
-}
-
-
-if(hasProperty('target') && target == 'android') {
-
- apply plugin: 'com.android.library'
- apply plugin: 'com.github.dcendents.android-maven'
-
- android {
- compileSdkVersion 25
- buildToolsVersion '25.0.2'
- defaultConfig {
- minSdkVersion 14
- targetSdkVersion 25
- }
- compileOptions {
- sourceCompatibility JavaVersion.VERSION_1_7
- targetCompatibility JavaVersion.VERSION_1_7
- }
-
- // 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_7
- targetCompatibility = JavaVersion.VERSION_1_7
-
- install {
- repositories.mavenInstaller {
- pom.artifactId = 'petstore-feign'
- }
- }
-
- task execute(type:JavaExec) {
- main = System.getProperty('mainClass')
- classpath = sourceSets.main.runtimeClasspath
- }
-}
-
-ext {
- swagger_annotations_version = "1.5.24"
- jackson_version = "2.10.3"
- jackson_databind_version = "2.10.3"
- jackson_databind_nullable_version = "0.2.1"
- jackson_threetenbp_version = "2.9.10"
- feign_version = "9.7.0"
- feign_form_version = "2.1.0"
- junit_version = "4.13"
- oltu_version = "1.0.1"
-}
-
-dependencies {
- compile "io.swagger:swagger-annotations:$swagger_annotations_version"
- compile "com.google.code.findbugs:jsr305:3.0.2"
- compile "io.github.openfeign:feign-core:$feign_version"
- compile "io.github.openfeign:feign-jackson:$feign_version"
- compile "io.github.openfeign:feign-slf4j:$feign_version"
- compile "io.github.openfeign.form:feign-form:$feign_form_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 "org.openapitools:jackson-databind-nullable:$jackson_databind_nullable_version"
- compile "com.github.joschi.jackson:jackson-datatype-threetenbp:$jackson_threetenbp_version"
- compile "org.apache.oltu.oauth2:org.apache.oltu.oauth2.client:$oltu_version"
- compile "com.brsanthu:migbase64:2.2"
- testCompile "junit:junit:$junit_version"
-}
diff --git a/samples/client/petstore/java/feign/build.sbt b/samples/client/petstore/java/feign/build.sbt
deleted file mode 100644
index f706a6d4860..00000000000
--- a/samples/client/petstore/java/feign/build.sbt
+++ /dev/null
@@ -1,27 +0,0 @@
-lazy val root = (project in file(".")).
- settings(
- organization := "org.openapitools",
- name := "petstore-feign",
- version := "1.0.0",
- scalaVersion := "2.11.4",
- scalacOptions ++= Seq("-feature"),
- javacOptions in compile ++= Seq("-Xlint:deprecation"),
- publishArtifact in (Compile, packageDoc) := false,
- resolvers += Resolver.mavenLocal,
- libraryDependencies ++= Seq(
- "io.swagger" % "swagger-annotations" % "1.5.24" % "compile",
- "io.github.openfeign" % "feign-core" % "9.7.0" % "compile",
- "io.github.openfeign" % "feign-jackson" % "9.7.0" % "compile",
- "io.github.openfeign" % "feign-slf4j" % "9.7.0" % "compile",
- "io.github.openfeign.form" % "feign-form" % "2.1.0" % "compile",
- "com.fasterxml.jackson.core" % "jackson-core" % "2.10.3" % "compile",
- "com.fasterxml.jackson.core" % "jackson-annotations" % "2.10.3" % "compile",
- "com.fasterxml.jackson.core" % "jackson-databind" % "2.10.3" % "compile",
- "com.fasterxml.jackson.datatype" % "jackson-datatype-joda" % "2.9.10" % "compile",
- "com.github.joschi.jackson" % "jackson-datatype-threetenbp" % "2.9.10" % "compile",
- "org.apache.oltu.oauth2" % "org.apache.oltu.oauth2.client" % "1.0.1" % "compile",
- "com.brsanthu" % "migbase64" % "2.2" % "compile",
- "junit" % "junit" % "4.13" % "test",
- "com.novocode" % "junit-interface" % "0.10" % "test"
- )
- )
diff --git a/samples/client/petstore/java/feign/git_push.sh b/samples/client/petstore/java/feign/git_push.sh
deleted file mode 100644
index ced3be2b0c7..00000000000
--- a/samples/client/petstore/java/feign/git_push.sh
+++ /dev/null
@@ -1,58 +0,0 @@
-#!/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/samples/client/petstore/java/feign/gradle.properties b/samples/client/petstore/java/feign/gradle.properties
deleted file mode 100644
index 05644f0754a..00000000000
--- a/samples/client/petstore/java/feign/gradle.properties
+++ /dev/null
@@ -1,2 +0,0 @@
-# Uncomment to build for Android
-#target = android
\ No newline at end of file
diff --git a/samples/client/petstore/java/feign/gradle/wrapper/gradle-wrapper.jar b/samples/client/petstore/java/feign/gradle/wrapper/gradle-wrapper.jar
deleted file mode 100644
index cc4fdc293d0..00000000000
Binary files a/samples/client/petstore/java/feign/gradle/wrapper/gradle-wrapper.jar and /dev/null differ
diff --git a/samples/client/petstore/java/feign/gradle/wrapper/gradle-wrapper.properties b/samples/client/petstore/java/feign/gradle/wrapper/gradle-wrapper.properties
deleted file mode 100644
index 94920145f34..00000000000
--- a/samples/client/petstore/java/feign/gradle/wrapper/gradle-wrapper.properties
+++ /dev/null
@@ -1,5 +0,0 @@
-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/samples/client/petstore/java/feign/gradlew b/samples/client/petstore/java/feign/gradlew
deleted file mode 100644
index 2fe81a7d95e..00000000000
--- a/samples/client/petstore/java/feign/gradlew
+++ /dev/null
@@ -1,183 +0,0 @@
-#!/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/samples/client/petstore/java/feign/gradlew.bat b/samples/client/petstore/java/feign/gradlew.bat
deleted file mode 100644
index 9618d8d9607..00000000000
--- a/samples/client/petstore/java/feign/gradlew.bat
+++ /dev/null
@@ -1,100 +0,0 @@
-@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/samples/client/petstore/java/feign/pom.xml b/samples/client/petstore/java/feign/pom.xml
deleted file mode 100644
index 5e288b31a45..00000000000
--- a/samples/client/petstore/java/feign/pom.xml
+++ /dev/null
@@ -1,311 +0,0 @@
-
- 4.0.0
- org.openapitools
- petstore-feign
- jar
- petstore-feign
- 1.0.0
- 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
- https://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
- 3.0.0-M4
-
-
-
- loggerPath
- conf/log4j.properties
-
-
- -Xms512m -Xmx1500m
- methods
- 10
-
-
-
- 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
-
-
-
- src/main/java
-
-
-
-
- add_test_sources
- generate-test-sources
-
- add-test-source
-
-
-
- src/test/java
-
-
-
-
-
-
- org.apache.maven.plugins
- maven-compiler-plugin
- 3.8.1
-
- 1.8
- 1.8
- true
- 128m
- 512m
-
- -Xlint:all
- -J-Xss4m
-
-
-
-
- org.apache.maven.plugins
- maven-javadoc-plugin
- 3.1.1
-
- none
-
-
-
- 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
-
-
-
-
- io.github.openfeign
- feign-core
- ${feign-version}
-
-
- io.github.openfeign
- feign-jackson
- ${feign-version}
-
-
- io.github.openfeign
- feign-slf4j
- ${feign-version}
-
-
- io.github.openfeign.form
- feign-form
- ${feign-form-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}
-
-
- org.openapitools
- jackson-databind-nullable
- ${jackson-databind-nullable-version}
-
-
- com.github.joschi.jackson
- jackson-datatype-threetenbp
- ${jackson-threetenbp-version}
-
-
- org.apache.oltu.oauth2
- org.apache.oltu.oauth2.client
- ${oltu-version}
-
-
-
-
- junit
- junit
- ${junit-version}
- test
-
-
- com.squareup.okhttp3
- mockwebserver
- 3.6.0
- test
-
-
- org.assertj
- assertj-core
- 1.7.1
- test
-
-
-
- UTF-8
- 1.7
- ${java.version}
- ${java.version}
- 1.5.24
- 9.7.0
- 2.1.0
- 2.10.3
- 0.2.1
- 2.10.3
- 2.9.10
- 4.13
- 1.0.0
- 1.0.1
-
-
diff --git a/samples/client/petstore/java/feign/settings.gradle b/samples/client/petstore/java/feign/settings.gradle
deleted file mode 100644
index 56240d66842..00000000000
--- a/samples/client/petstore/java/feign/settings.gradle
+++ /dev/null
@@ -1 +0,0 @@
-rootProject.name = "petstore-feign"
\ No newline at end of file
diff --git a/samples/client/petstore/java/feign/src/main/AndroidManifest.xml b/samples/client/petstore/java/feign/src/main/AndroidManifest.xml
deleted file mode 100644
index 54fbcb3da1e..00000000000
--- a/samples/client/petstore/java/feign/src/main/AndroidManifest.xml
+++ /dev/null
@@ -1,3 +0,0 @@
-
-
-
diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/ApiClient.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/ApiClient.java
deleted file mode 100644
index 738307efaf7..00000000000
--- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/ApiClient.java
+++ /dev/null
@@ -1,355 +0,0 @@
-package org.openapitools.client;
-
-import java.util.LinkedHashMap;
-import java.util.Map;
-
-import org.apache.oltu.oauth2.client.request.OAuthClientRequest.AuthenticationRequestBuilder;
-import org.apache.oltu.oauth2.client.request.OAuthClientRequest.TokenRequestBuilder;
-
-import org.threeten.bp.*;
-
-import com.fasterxml.jackson.databind.DeserializationFeature;
-import com.fasterxml.jackson.databind.ObjectMapper;
-import com.fasterxml.jackson.databind.SerializationFeature;
-import org.openapitools.jackson.nullable.JsonNullableModule;
-import com.fasterxml.jackson.datatype.threetenbp.ThreeTenModule;
-
-import feign.Feign;
-import feign.RequestInterceptor;
-import feign.form.FormEncoder;
-import feign.jackson.JacksonDecoder;
-import feign.jackson.JacksonEncoder;
-import feign.slf4j.Slf4jLogger;
-import org.openapitools.client.auth.*;
-import org.openapitools.client.auth.OAuth.AccessTokenListener;
-
-
-public class ApiClient {
- public interface Api {}
-
- protected ObjectMapper objectMapper;
- private String basePath = "http://petstore.swagger.io:80/v2";
- private Map apiAuthorizations;
- private Feign.Builder feignBuilder;
-
- public ApiClient() {
- objectMapper = createObjectMapper();
- apiAuthorizations = new LinkedHashMap();
- feignBuilder = Feign.builder()
- .encoder(new FormEncoder(new JacksonEncoder(objectMapper)))
- .decoder(new JacksonDecoder(objectMapper))
- .logger(new Slf4jLogger());
- }
-
- public ApiClient(String[] authNames) {
- this();
- for(String authName : authNames) {
- RequestInterceptor auth;
- if ("api_key".equals(authName)) {
- auth = new ApiKeyAuth("header", "api_key");
- } else if ("api_key_query".equals(authName)) {
- auth = new ApiKeyAuth("query", "api_key_query");
- } else if ("http_basic_test".equals(authName)) {
- auth = new HttpBasicAuth();
- } else if ("petstore_auth".equals(authName)) {
- auth = new OAuth(OAuthFlow.implicit, "http://petstore.swagger.io/api/oauth/dialog", "", "write:pets, read:pets");
- } else {
- throw new RuntimeException("auth name \"" + authName + "\" not found in available auth names");
- }
- addAuthorization(authName, auth);
- }
- }
-
- /**
- * Basic constructor for single auth name
- * @param authName
- */
- public ApiClient(String authName) {
- this(new String[]{authName});
- }
-
- /**
- * Helper constructor for single api key
- * @param authName
- * @param apiKey
- */
- public ApiClient(String authName, String apiKey) {
- this(authName);
- this.setApiKey(apiKey);
- }
-
- /**
- * Helper constructor for single basic auth or password oauth2
- * @param authName
- * @param username
- * @param password
- */
- public ApiClient(String authName, String username, String password) {
- this(authName);
- this.setCredentials(username, password);
- }
-
- /**
- * Helper constructor for single password oauth2
- * @param authName
- * @param clientId
- * @param secret
- * @param username
- * @param password
- */
- public ApiClient(String authName, String clientId, String secret, String username, String password) {
- this(authName);
- this.getTokenEndPoint()
- .setClientId(clientId)
- .setClientSecret(secret)
- .setUsername(username)
- .setPassword(password);
- }
-
- public String getBasePath() {
- return basePath;
- }
-
- public ApiClient setBasePath(String basePath) {
- this.basePath = basePath;
- return this;
- }
-
- public Map getApiAuthorizations() {
- return apiAuthorizations;
- }
-
- public void setApiAuthorizations(Map apiAuthorizations) {
- this.apiAuthorizations = apiAuthorizations;
- }
-
- public Feign.Builder getFeignBuilder() {
- return feignBuilder;
- }
-
- public ApiClient setFeignBuilder(Feign.Builder feignBuilder) {
- this.feignBuilder = feignBuilder;
- return this;
- }
-
- private ObjectMapper createObjectMapper() {
- ObjectMapper objectMapper = new ObjectMapper();
- objectMapper.enable(SerializationFeature.WRITE_ENUMS_USING_TO_STRING);
- objectMapper.enable(DeserializationFeature.READ_ENUMS_USING_TO_STRING);
- objectMapper.disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES);
- objectMapper.disable(DeserializationFeature.FAIL_ON_INVALID_SUBTYPE);
- objectMapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS);
- objectMapper.setDateFormat(new RFC3339DateFormat());
- ThreeTenModule module = new ThreeTenModule();
- module.addDeserializer(Instant.class, CustomInstantDeserializer.INSTANT);
- module.addDeserializer(OffsetDateTime.class, CustomInstantDeserializer.OFFSET_DATE_TIME);
- module.addDeserializer(ZonedDateTime.class, CustomInstantDeserializer.ZONED_DATE_TIME);
- objectMapper.registerModule(module);
- JsonNullableModule jnm = new JsonNullableModule();
- objectMapper.registerModule(jnm);
- return objectMapper;
- }
-
- public ObjectMapper getObjectMapper(){
- return objectMapper;
- }
-
- /**
- * Creates a feign client for given API interface.
- *
- * Usage:
- * ApiClient apiClient = new ApiClient();
- * apiClient.setBasePath("http://localhost:8080");
- * XYZApi api = apiClient.buildClient(XYZApi.class);
- * XYZResponse response = api.someMethod(...);
- * @param Type
- * @param clientClass Client class
- * @return The Client
- */
- public T buildClient(Class clientClass) {
- return feignBuilder.target(clientClass, basePath);
- }
-
- /**
- * Select the Accept header's value from the given accepts array:
- * if JSON exists in the given array, use it;
- * otherwise use all of them (joining into a string)
- *
- * @param accepts The accepts array to select from
- * @return The Accept header to use. If the given array is empty,
- * null will be returned (not to set the Accept header explicitly).
- */
- public String selectHeaderAccept(String[] accepts) {
- if (accepts.length == 0) return null;
- if (StringUtil.containsIgnoreCase(accepts, "application/json")) return "application/json";
- return StringUtil.join(accepts, ",");
- }
-
- /**
- * Select the Content-Type header's value from the given array:
- * if JSON exists in the given array, use it;
- * otherwise use the first one of the array.
- *
- * @param contentTypes The Content-Type array to select from
- * @return The Content-Type header to use. If the given array is empty,
- * JSON will be used.
- */
- public String selectHeaderContentType(String[] contentTypes) {
- if (contentTypes.length == 0) return "application/json";
- if (StringUtil.containsIgnoreCase(contentTypes, "application/json")) return "application/json";
- return contentTypes[0];
- }
-
-
- /**
- * Helper method to configure the bearer token.
- * @param bearerToken the bearer token.
- */
- public void setBearerToken(String bearerToken) {
- for(RequestInterceptor apiAuthorization : apiAuthorizations.values()) {
- if (apiAuthorization instanceof HttpBearerAuth) {
- ((HttpBearerAuth) apiAuthorization).setBearerToken(bearerToken);
- return;
- }
- }
- throw new RuntimeException("No Bearer authentication configured!");
- }
-
- /**
- * Helper method to configure the first api key found
- * @param apiKey API key
- */
- public void setApiKey(String apiKey) {
- for(RequestInterceptor apiAuthorization : apiAuthorizations.values()) {
- if (apiAuthorization instanceof ApiKeyAuth) {
- ApiKeyAuth keyAuth = (ApiKeyAuth) apiAuthorization;
- keyAuth.setApiKey(apiKey);
- return ;
- }
- }
- throw new RuntimeException("No API key authentication configured!");
- }
-
- /**
- * Helper method to configure the username/password for basic auth or password OAuth
- * @param username Username
- * @param password Password
- */
- public void setCredentials(String username, String password) {
- for(RequestInterceptor apiAuthorization : apiAuthorizations.values()) {
- if (apiAuthorization instanceof HttpBasicAuth) {
- HttpBasicAuth basicAuth = (HttpBasicAuth) apiAuthorization;
- basicAuth.setCredentials(username, password);
- return;
- }
- if (apiAuthorization instanceof OAuth) {
- OAuth oauth = (OAuth) apiAuthorization;
- oauth.getTokenRequestBuilder().setUsername(username).setPassword(password);
- return;
- }
- }
- throw new RuntimeException("No Basic authentication or OAuth configured!");
- }
-
- /**
- * Helper method to configure the token endpoint of the first oauth found in the apiAuthorizations (there should be only one)
- * @return Token request builder
- */
- public TokenRequestBuilder getTokenEndPoint() {
- for(RequestInterceptor apiAuthorization : apiAuthorizations.values()) {
- if (apiAuthorization instanceof OAuth) {
- OAuth oauth = (OAuth) apiAuthorization;
- return oauth.getTokenRequestBuilder();
- }
- }
- return null;
- }
-
- /**
- * Helper method to configure authorization endpoint of the first oauth found in the apiAuthorizations (there should be only one)
- * @return Authentication request builder
- */
- public AuthenticationRequestBuilder getAuthorizationEndPoint() {
- for(RequestInterceptor apiAuthorization : apiAuthorizations.values()) {
- if (apiAuthorization instanceof OAuth) {
- OAuth oauth = (OAuth) apiAuthorization;
- return oauth.getAuthenticationRequestBuilder();
- }
- }
- return null;
- }
-
- /**
- * Helper method to pre-set the oauth access token of the first oauth found in the apiAuthorizations (there should be only one)
- * @param accessToken Access Token
- * @param expiresIn Validity period in seconds
- */
- public void setAccessToken(String accessToken, Long expiresIn) {
- for(RequestInterceptor apiAuthorization : apiAuthorizations.values()) {
- if (apiAuthorization instanceof OAuth) {
- OAuth oauth = (OAuth) apiAuthorization;
- oauth.setAccessToken(accessToken, expiresIn);
- return;
- }
- }
- }
-
- /**
- * Helper method to configure the oauth accessCode/implicit flow parameters
- * @param clientId Client ID
- * @param clientSecret Client secret
- * @param redirectURI Redirect URI
- */
- public void configureAuthorizationFlow(String clientId, String clientSecret, String redirectURI) {
- for(RequestInterceptor apiAuthorization : apiAuthorizations.values()) {
- if (apiAuthorization instanceof OAuth) {
- OAuth oauth = (OAuth) apiAuthorization;
- oauth.getTokenRequestBuilder()
- .setClientId(clientId)
- .setClientSecret(clientSecret)
- .setRedirectURI(redirectURI);
- oauth.getAuthenticationRequestBuilder()
- .setClientId(clientId)
- .setRedirectURI(redirectURI);
- return;
- }
- }
- }
-
- /**
- * Configures a listener which is notified when a new access token is received.
- * @param accessTokenListener Acesss token listener
- */
- public void registerAccessTokenListener(AccessTokenListener accessTokenListener) {
- for(RequestInterceptor apiAuthorization : apiAuthorizations.values()) {
- if (apiAuthorization instanceof OAuth) {
- OAuth oauth = (OAuth) apiAuthorization;
- oauth.registerAccessTokenListener(accessTokenListener);
- return;
- }
- }
- }
-
- /**
- * Gets request interceptor based on authentication name
- * @param authName Authentiation name
- * @return Request Interceptor
- */
- public RequestInterceptor getAuthorization(String authName) {
- return apiAuthorizations.get(authName);
- }
-
- /**
- * Adds an authorization to be used by the client
- * @param authName Authentication name
- * @param authorization Request interceptor
- */
- public void addAuthorization(String authName, RequestInterceptor authorization) {
- if (apiAuthorizations.containsKey(authName)) {
- throw new RuntimeException("auth name \"" + authName + "\" already in api authorizations");
- }
- apiAuthorizations.put(authName, authorization);
- feignBuilder.requestInterceptor(authorization);
- }
-
-}
diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/CustomInstantDeserializer.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/CustomInstantDeserializer.java
deleted file mode 100644
index 83d4514b071..00000000000
--- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/CustomInstantDeserializer.java
+++ /dev/null
@@ -1,232 +0,0 @@
-package org.openapitools.client;
-
-import com.fasterxml.jackson.core.JsonParser;
-import com.fasterxml.jackson.core.JsonTokenId;
-import com.fasterxml.jackson.databind.DeserializationContext;
-import com.fasterxml.jackson.databind.DeserializationFeature;
-import com.fasterxml.jackson.databind.JsonDeserializer;
-import com.fasterxml.jackson.datatype.threetenbp.DecimalUtils;
-import com.fasterxml.jackson.datatype.threetenbp.deser.ThreeTenDateTimeDeserializerBase;
-import com.fasterxml.jackson.datatype.threetenbp.function.BiFunction;
-import com.fasterxml.jackson.datatype.threetenbp.function.Function;
-import org.threeten.bp.DateTimeException;
-import org.threeten.bp.DateTimeUtils;
-import org.threeten.bp.Instant;
-import org.threeten.bp.OffsetDateTime;
-import org.threeten.bp.ZoneId;
-import org.threeten.bp.ZonedDateTime;
-import org.threeten.bp.format.DateTimeFormatter;
-import org.threeten.bp.temporal.Temporal;
-import org.threeten.bp.temporal.TemporalAccessor;
-
-import java.io.IOException;
-import java.math.BigDecimal;
-
-/**
- * Deserializer for ThreeTen temporal {@link Instant}s, {@link OffsetDateTime}, and {@link ZonedDateTime}s.
- * Adapted from the jackson threetenbp InstantDeserializer to add support for deserializing rfc822 format.
- *
- * @author Nick Williams
- */
-public class CustomInstantDeserializer
- extends ThreeTenDateTimeDeserializerBase {
- private static final long serialVersionUID = 1L;
-
- public static final CustomInstantDeserializer INSTANT = new CustomInstantDeserializer(
- Instant.class, DateTimeFormatter.ISO_INSTANT,
- new Function() {
- @Override
- public Instant apply(TemporalAccessor temporalAccessor) {
- return Instant.from(temporalAccessor);
- }
- },
- new Function() {
- @Override
- public Instant apply(FromIntegerArguments a) {
- return Instant.ofEpochMilli(a.value);
- }
- },
- new Function() {
- @Override
- public Instant apply(FromDecimalArguments a) {
- return Instant.ofEpochSecond(a.integer, a.fraction);
- }
- },
- null
- );
-
- public static final CustomInstantDeserializer OFFSET_DATE_TIME = new CustomInstantDeserializer(
- OffsetDateTime.class, DateTimeFormatter.ISO_OFFSET_DATE_TIME,
- new Function() {
- @Override
- public OffsetDateTime apply(TemporalAccessor temporalAccessor) {
- return OffsetDateTime.from(temporalAccessor);
- }
- },
- new Function() {
- @Override
- public OffsetDateTime apply(FromIntegerArguments a) {
- return OffsetDateTime.ofInstant(Instant.ofEpochMilli(a.value), a.zoneId);
- }
- },
- new Function() {
- @Override
- public OffsetDateTime apply(FromDecimalArguments a) {
- return OffsetDateTime.ofInstant(Instant.ofEpochSecond(a.integer, a.fraction), a.zoneId);
- }
- },
- new BiFunction() {
- @Override
- public OffsetDateTime apply(OffsetDateTime d, ZoneId z) {
- return d.withOffsetSameInstant(z.getRules().getOffset(d.toLocalDateTime()));
- }
- }
- );
-
- public static final CustomInstantDeserializer ZONED_DATE_TIME = new CustomInstantDeserializer(
- ZonedDateTime.class, DateTimeFormatter.ISO_ZONED_DATE_TIME,
- new Function() {
- @Override
- public ZonedDateTime apply(TemporalAccessor temporalAccessor) {
- return ZonedDateTime.from(temporalAccessor);
- }
- },
- new Function() {
- @Override
- public ZonedDateTime apply(FromIntegerArguments a) {
- return ZonedDateTime.ofInstant(Instant.ofEpochMilli(a.value), a.zoneId);
- }
- },
- new Function() {
- @Override
- public ZonedDateTime apply(FromDecimalArguments a) {
- return ZonedDateTime.ofInstant(Instant.ofEpochSecond(a.integer, a.fraction), a.zoneId);
- }
- },
- new BiFunction() {
- @Override
- public ZonedDateTime apply(ZonedDateTime zonedDateTime, ZoneId zoneId) {
- return zonedDateTime.withZoneSameInstant(zoneId);
- }
- }
- );
-
- protected final Function fromMilliseconds;
-
- protected final Function fromNanoseconds;
-
- protected final Function parsedToValue;
-
- protected final BiFunction adjust;
-
- protected CustomInstantDeserializer(Class supportedType,
- DateTimeFormatter parser,
- Function parsedToValue,
- Function fromMilliseconds,
- Function fromNanoseconds,
- BiFunction adjust) {
- super(supportedType, parser);
- this.parsedToValue = parsedToValue;
- this.fromMilliseconds = fromMilliseconds;
- this.fromNanoseconds = fromNanoseconds;
- this.adjust = adjust == null ? new BiFunction() {
- @Override
- public T apply(T t, ZoneId zoneId) {
- return t;
- }
- } : adjust;
- }
-
- @SuppressWarnings("unchecked")
- protected CustomInstantDeserializer(CustomInstantDeserializer base, DateTimeFormatter f) {
- super((Class) base.handledType(), f);
- parsedToValue = base.parsedToValue;
- fromMilliseconds = base.fromMilliseconds;
- fromNanoseconds = base.fromNanoseconds;
- adjust = base.adjust;
- }
-
- @Override
- protected JsonDeserializer withDateFormat(DateTimeFormatter dtf) {
- if (dtf == _formatter) {
- return this;
- }
- return new CustomInstantDeserializer(this, dtf);
- }
-
- @Override
- public T deserialize(JsonParser parser, DeserializationContext context) throws IOException {
- //NOTE: Timestamps contain no timezone info, and are always in configured TZ. Only
- //string values have to be adjusted to the configured TZ.
- switch (parser.getCurrentTokenId()) {
- case JsonTokenId.ID_NUMBER_FLOAT: {
- BigDecimal value = parser.getDecimalValue();
- long seconds = value.longValue();
- int nanoseconds = DecimalUtils.extractNanosecondDecimal(value, seconds);
- return fromNanoseconds.apply(new FromDecimalArguments(
- seconds, nanoseconds, getZone(context)));
- }
-
- case JsonTokenId.ID_NUMBER_INT: {
- long timestamp = parser.getLongValue();
- if (context.isEnabled(DeserializationFeature.READ_DATE_TIMESTAMPS_AS_NANOSECONDS)) {
- return this.fromNanoseconds.apply(new FromDecimalArguments(
- timestamp, 0, this.getZone(context)
- ));
- }
- return this.fromMilliseconds.apply(new FromIntegerArguments(
- timestamp, this.getZone(context)
- ));
- }
-
- case JsonTokenId.ID_STRING: {
- String string = parser.getText().trim();
- if (string.length() == 0) {
- return null;
- }
- if (string.endsWith("+0000")) {
- string = string.substring(0, string.length() - 5) + "Z";
- }
- T value;
- try {
- TemporalAccessor acc = _formatter.parse(string);
- value = parsedToValue.apply(acc);
- if (context.isEnabled(DeserializationFeature.ADJUST_DATES_TO_CONTEXT_TIME_ZONE)) {
- return adjust.apply(value, this.getZone(context));
- }
- } catch (DateTimeException e) {
- throw _peelDTE(e);
- }
- return value;
- }
- }
- throw context.mappingException("Expected type float, integer, or string.");
- }
-
- private ZoneId getZone(DeserializationContext context) {
- // Instants are always in UTC, so don't waste compute cycles
- return (_valueClass == Instant.class) ? null : DateTimeUtils.toZoneId(context.getTimeZone());
- }
-
- private static class FromIntegerArguments {
- public final long value;
- public final ZoneId zoneId;
-
- private FromIntegerArguments(long value, ZoneId zoneId) {
- this.value = value;
- this.zoneId = zoneId;
- }
- }
-
- private static class FromDecimalArguments {
- public final long integer;
- public final int fraction;
- public final ZoneId zoneId;
-
- private FromDecimalArguments(long integer, int fraction, ZoneId zoneId) {
- this.integer = integer;
- this.fraction = fraction;
- this.zoneId = zoneId;
- }
- }
-}
diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/EncodingUtils.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/EncodingUtils.java
deleted file mode 100644
index c5a76a97857..00000000000
--- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/EncodingUtils.java
+++ /dev/null
@@ -1,86 +0,0 @@
-package org.openapitools.client;
-
-import java.io.UnsupportedEncodingException;
-import java.net.URLEncoder;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-
-/**
-* Utilities to support Swagger encoding formats in Feign.
-*/
-public final class EncodingUtils {
-
- /**
- * Private constructor. Do not construct this class.
- */
- private EncodingUtils() {}
-
- /**
- *
Encodes a collection of query parameters according to the Swagger
- * collection format.
- *
- *
Of the various collection formats defined by Swagger ("csv", "tsv",
- * etc), Feign only natively supports "multi". This utility generates the
- * other format types so it will be properly processed by Feign.
- *
- *
Note, as part of reformatting, it URL encodes the parameters as
- * well.
- * @param parameters The collection object to be formatted. This object will
- * not be changed.
- * @param collectionFormat The Swagger collection format (eg, "csv", "tsv",
- * "pipes"). See the
- *
- * OpenAPI Spec for more details.
- * @return An object that will be correctly formatted by Feign.
- */
- public static Object encodeCollection(Collection> parameters,
- String collectionFormat) {
- if (parameters == null) {
- return parameters;
- }
- List stringValues = new ArrayList<>(parameters.size());
- for (Object parameter : parameters) {
- // ignore null values (same behavior as Feign)
- if (parameter != null) {
- stringValues.add(encode(parameter));
- }
- }
- // Feign natively handles single-element lists and the "multi" format.
- if (stringValues.size() < 2 || "multi".equals(collectionFormat)) {
- return stringValues;
- }
- // Otherwise return a formatted String
- String[] stringArray = stringValues.toArray(new String[0]);
- switch (collectionFormat) {
- case "csv":
- default:
- return StringUtil.join(stringArray, ",");
- case "ssv":
- return StringUtil.join(stringArray, " ");
- case "tsv":
- return StringUtil.join(stringArray, "\t");
- case "pipes":
- return StringUtil.join(stringArray, "|");
- }
- }
-
- /**
- * URL encode a single query parameter.
- * @param parameter The query parameter to encode. This object will not be
- * changed.
- * @return The URL encoded string representation of the parameter. If the
- * parameter is null, returns null.
- */
- public static String encode(Object parameter) {
- if (parameter == null) {
- return null;
- }
- try {
- return URLEncoder.encode(parameter.toString(), "UTF-8").replaceAll("\\+", "%20");
- } catch (UnsupportedEncodingException e) {
- // Should never happen, UTF-8 is always supported
- throw new RuntimeException(e);
- }
- }
-}
diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/ParamExpander.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/ParamExpander.java
deleted file mode 100644
index 2331d87fdbd..00000000000
--- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/ParamExpander.java
+++ /dev/null
@@ -1,22 +0,0 @@
-package org.openapitools.client;
-
-import feign.Param;
-
-import java.text.DateFormat;
-import java.util.Date;
-
-/**
- * Param Expander to convert {@link Date} to RFC3339
- */
-public class ParamExpander implements Param.Expander {
-
- private static final DateFormat dateformat = new RFC3339DateFormat();
-
- @Override
- public String expand(Object value) {
- if (value instanceof Date) {
- return dateformat.format(value);
- }
- return value.toString();
- }
-}
diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/RFC3339DateFormat.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/RFC3339DateFormat.java
deleted file mode 100644
index 9509fd08981..00000000000
--- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/RFC3339DateFormat.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * OpenAPI Petstore
- * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
- *
- * The version of the OpenAPI document: 1.0.0
- *
- *
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
- * https://openapi-generator.tech
- * Do not edit the class manually.
- */
-
-package org.openapitools.client;
-
-import com.fasterxml.jackson.databind.util.ISO8601DateFormat;
-import com.fasterxml.jackson.databind.util.ISO8601Utils;
-
-import java.text.FieldPosition;
-import java.util.Date;
-
-
-public class RFC3339DateFormat extends ISO8601DateFormat {
-
- // Same as ISO8601DateFormat but serializing milliseconds.
- @Override
- public StringBuffer format(Date date, StringBuffer toAppendTo, FieldPosition fieldPosition) {
- String value = ISO8601Utils.format(date, true);
- toAppendTo.append(value);
- return toAppendTo;
- }
-
-}
\ No newline at end of file
diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/ServerConfiguration.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/ServerConfiguration.java
deleted file mode 100644
index a1107a8690e..00000000000
--- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/ServerConfiguration.java
+++ /dev/null
@@ -1,58 +0,0 @@
-package org.openapitools.client;
-
-import java.util.Map;
-
-/**
- * Representing a Server configuration.
- */
-public class ServerConfiguration {
- public String URL;
- public String description;
- public Map variables;
-
- /**
- * @param URL A URL to the target host.
- * @param description A describtion of the host designated by the URL.
- * @param variables A map between a variable name and its value. The value is used for substitution in the server's URL template.
- */
- public ServerConfiguration(String URL, String description, Map variables) {
- this.URL = URL;
- this.description = description;
- this.variables = variables;
- }
-
- /**
- * Format URL template using given variables.
- *
- * @param variables A map between a variable name and its value.
- * @return Formatted URL.
- */
- public String URL(Map variables) {
- String url = this.URL;
-
- // go through variables and replace placeholders
- for (Map.Entry variable: this.variables.entrySet()) {
- String name = variable.getKey();
- ServerVariable serverVariable = variable.getValue();
- String value = serverVariable.defaultValue;
-
- if (variables != null && variables.containsKey(name)) {
- value = variables.get(name);
- if (serverVariable.enumValues.size() > 0 && !serverVariable.enumValues.contains(value)) {
- throw new RuntimeException("The variable " + name + " in the server URL has invalid value " + value + ".");
- }
- }
- url = url.replaceAll("\\{" + name + "\\}", value);
- }
- return url;
- }
-
- /**
- * Format URL template using default server variables.
- *
- * @return Formatted URL.
- */
- public String URL() {
- return URL(null);
- }
-}
diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/ServerVariable.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/ServerVariable.java
deleted file mode 100644
index c2f13e21666..00000000000
--- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/ServerVariable.java
+++ /dev/null
@@ -1,23 +0,0 @@
-package org.openapitools.client;
-
-import java.util.HashSet;
-
-/**
- * Representing a Server Variable for server URL template substitution.
- */
-public class ServerVariable {
- public String description;
- public String defaultValue;
- public HashSet enumValues = null;
-
- /**
- * @param description A description for the server variable.
- * @param defaultValue The default value to use for substitution.
- * @param enumValues An enumeration of string values to be used if the substitution options are from a limited set.
- */
- public ServerVariable(String description, String defaultValue, HashSet enumValues) {
- this.description = description;
- this.defaultValue = defaultValue;
- this.enumValues = enumValues;
- }
-}
diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/StringUtil.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/StringUtil.java
deleted file mode 100644
index 747a23f5bf2..00000000000
--- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/StringUtil.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * OpenAPI Petstore
- * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
- *
- * The version of the OpenAPI document: 1.0.0
- *
- *
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
- * https://openapi-generator.tech
- * Do not edit the class manually.
- */
-
-
-package org.openapitools.client;
-
-import java.util.Collection;
-import java.util.Iterator;
-
-
-public class StringUtil {
- /**
- * Check if the given array contains the given value (with case-insensitive comparison).
- *
- * @param array The array
- * @param value The value to search
- * @return true if the array contains the value
- */
- public static boolean containsIgnoreCase(String[] array, String value) {
- for (String str : array) {
- if (value == null && str == null) {
- return true;
- }
- if (value != null && value.equalsIgnoreCase(str)) {
- return true;
- }
- }
- return false;
- }
-
- /**
- * Join an array of strings with the given separator.
- *
- * Note: This might be replaced by utility method from commons-lang or guava someday
- * if one of those libraries is added as dependency.
- *
- *
- * @param array The array of strings
- * @param separator The separator
- * @return the resulting string
- */
- public static String join(String[] array, String separator) {
- int len = array.length;
- if (len == 0) {
- return "";
- }
-
- StringBuilder out = new StringBuilder();
- out.append(array[0]);
- for (int i = 1; i < len; i++) {
- out.append(separator).append(array[i]);
- }
- return out.toString();
- }
-
- /**
- * Join a list of strings with the given separator.
- *
- * @param list The list of strings
- * @param separator The separator
- * @return the resulting string
- */
- public static String join(Collection list, String separator) {
- Iterator iterator = list.iterator();
- StringBuilder out = new StringBuilder();
- if (iterator.hasNext()) {
- out.append(iterator.next());
- }
- while (iterator.hasNext()) {
- out.append(separator).append(iterator.next());
- }
- return out.toString();
- }
-}
diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/api/AnotherFakeApi.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/api/AnotherFakeApi.java
deleted file mode 100644
index bd4cd7e1fe7..00000000000
--- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/api/AnotherFakeApi.java
+++ /dev/null
@@ -1,30 +0,0 @@
-package org.openapitools.client.api;
-
-import org.openapitools.client.ApiClient;
-import org.openapitools.client.EncodingUtils;
-
-import org.openapitools.client.model.Client;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import feign.*;
-
-
-public interface AnotherFakeApi extends ApiClient.Api {
-
-
- /**
- * To test special tags
- * To test special tags and operation ID starting with number
- * @param body client model (required)
- * @return Client
- */
- @RequestLine("PATCH /another-fake/dummy")
- @Headers({
- "Content-Type: application/json",
- "Accept: application/json",
- })
- Client call123testSpecialTags(Client body);
-}
diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/api/FakeApi.java
deleted file mode 100644
index 69cc2a9064f..00000000000
--- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/api/FakeApi.java
+++ /dev/null
@@ -1,422 +0,0 @@
-package org.openapitools.client.api;
-
-import org.openapitools.client.ApiClient;
-import org.openapitools.client.EncodingUtils;
-
-import java.math.BigDecimal;
-import org.openapitools.client.model.Client;
-import java.io.File;
-import org.openapitools.client.model.FileSchemaTestClass;
-import org.threeten.bp.LocalDate;
-import org.threeten.bp.OffsetDateTime;
-import org.openapitools.client.model.OuterComposite;
-import org.openapitools.client.model.User;
-import org.openapitools.client.model.XmlItem;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import feign.*;
-
-
-public interface FakeApi extends ApiClient.Api {
-
-
- /**
- * creates an XmlItem
- * this route creates an XmlItem
- * @param xmlItem XmlItem Body (required)
- */
- @RequestLine("POST /fake/create_xml_item")
- @Headers({
- "Content-Type: application/xml",
- "Accept: application/json",
- })
- void createXmlItem(XmlItem xmlItem);
-
- /**
- *
- * Test serialization of outer boolean types
- * @param body Input boolean as post body (optional)
- * @return Boolean
- */
- @RequestLine("POST /fake/outer/boolean")
- @Headers({
- "Content-Type: */*",
- "Accept: */*",
- })
- Boolean fakeOuterBooleanSerialize(Boolean body);
-
- /**
- *
- * Test serialization of object with outer number type
- * @param body Input composite as post body (optional)
- * @return OuterComposite
- */
- @RequestLine("POST /fake/outer/composite")
- @Headers({
- "Content-Type: */*",
- "Accept: */*",
- })
- OuterComposite fakeOuterCompositeSerialize(OuterComposite body);
-
- /**
- *
- * Test serialization of outer number types
- * @param body Input number as post body (optional)
- * @return BigDecimal
- */
- @RequestLine("POST /fake/outer/number")
- @Headers({
- "Content-Type: */*",
- "Accept: */*",
- })
- BigDecimal fakeOuterNumberSerialize(BigDecimal body);
-
- /**
- *
- * Test serialization of outer string types
- * @param body Input string as post body (optional)
- * @return String
- */
- @RequestLine("POST /fake/outer/string")
- @Headers({
- "Content-Type: */*",
- "Accept: */*",
- })
- String fakeOuterStringSerialize(String body);
-
- /**
- *
- * For this test, the body for this request much reference a schema named `File`.
- * @param body (required)
- */
- @RequestLine("PUT /fake/body-with-file-schema")
- @Headers({
- "Content-Type: application/json",
- "Accept: application/json",
- })
- void testBodyWithFileSchema(FileSchemaTestClass body);
-
- /**
- *
- *
- * @param query (required)
- * @param body (required)
- */
- @RequestLine("PUT /fake/body-with-query-params?query={query}")
- @Headers({
- "Content-Type: application/json",
- "Accept: application/json",
- })
- void testBodyWithQueryParams(@Param("query") String query, User body);
-
- /**
- *
- *
- * Note, this is equivalent to the other testBodyWithQueryParams method,
- * but with the query parameters collected into a single Map parameter. This
- * is convenient for services with optional query parameters, especially when
- * used with the {@link TestBodyWithQueryParamsQueryParams} class that allows for
- * building up this map in a fluent style.
- * @param body (required)
- * @param queryParams Map of query parameters as name-value pairs
- *
The following elements may be specified in the query map:
- *
- *
query - (required)
- *
- */
- @RequestLine("PUT /fake/body-with-query-params?query={query}")
- @Headers({
- "Content-Type: application/json",
- "Accept: application/json",
- })
- void testBodyWithQueryParams(User body, @QueryMap(encoded=true) Map queryParams);
-
- /**
- * A convenience class for generating query parameters for the
- * testBodyWithQueryParams method in a fluent style.
- */
- public static class TestBodyWithQueryParamsQueryParams extends HashMap {
- public TestBodyWithQueryParamsQueryParams query(final String value) {
- put("query", EncodingUtils.encode(value));
- return this;
- }
- }
-
- /**
- * To test \"client\" model
- * To test \"client\" model
- * @param body client model (required)
- * @return Client
- */
- @RequestLine("PATCH /fake")
- @Headers({
- "Content-Type: application/json",
- "Accept: application/json",
- })
- Client testClientModel(Client body);
-
- /**
- * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
- * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
- * @param number None (required)
- * @param _double None (required)
- * @param patternWithoutDelimiter None (required)
- * @param _byte None (required)
- * @param integer None (optional)
- * @param int32 None (optional)
- * @param int64 None (optional)
- * @param _float None (optional)
- * @param string None (optional)
- * @param binary None (optional)
- * @param date None (optional)
- * @param dateTime None (optional)
- * @param password None (optional)
- * @param paramCallback None (optional)
- */
- @RequestLine("POST /fake")
- @Headers({
- "Content-Type: application/x-www-form-urlencoded",
- "Accept: application/json",
- })
- void testEndpointParameters(@Param("number") BigDecimal number, @Param("_double") Double _double, @Param("patternWithoutDelimiter") String patternWithoutDelimiter, @Param("_byte") byte[] _byte, @Param("integer") Integer integer, @Param("int32") Integer int32, @Param("int64") Long int64, @Param("_float") Float _float, @Param("string") String string, @Param("binary") File binary, @Param("date") LocalDate date, @Param("dateTime") OffsetDateTime dateTime, @Param("password") String password, @Param("paramCallback") String paramCallback);
-
- /**
- * To test enum parameters
- * To test enum parameters
- * @param enumHeaderStringArray Header parameter enum test (string array) (optional)
- * @param enumHeaderString Header parameter enum test (string) (optional, default to -efg)
- * @param enumQueryStringArray Query parameter enum test (string array) (optional)
- * @param enumQueryString Query parameter enum test (string) (optional, default to -efg)
- * @param enumQueryInteger Query parameter enum test (double) (optional)
- * @param enumQueryDouble Query parameter enum test (double) (optional)
- * @param enumFormStringArray Form parameter enum test (string array) (optional)
- * @param enumFormString Form parameter enum test (string) (optional, default to -efg)
- */
- @RequestLine("GET /fake?enum_query_string_array={enumQueryStringArray}&enum_query_string={enumQueryString}&enum_query_integer={enumQueryInteger}&enum_query_double={enumQueryDouble}")
- @Headers({
- "Content-Type: application/x-www-form-urlencoded",
- "Accept: application/json",
- "enum_header_string_array: {enumHeaderStringArray}",
-
- "enum_header_string: {enumHeaderString}"
- })
- void testEnumParameters(@Param("enumHeaderStringArray") List enumHeaderStringArray, @Param("enumHeaderString") String enumHeaderString, @Param("enumQueryStringArray") List enumQueryStringArray, @Param("enumQueryString") String enumQueryString, @Param("enumQueryInteger") Integer enumQueryInteger, @Param("enumQueryDouble") Double enumQueryDouble, @Param("enumFormStringArray") List enumFormStringArray, @Param("enumFormString") String enumFormString);
-
- /**
- * To test enum parameters
- * To test enum parameters
- * Note, this is equivalent to the other testEnumParameters method,
- * but with the query parameters collected into a single Map parameter. This
- * is convenient for services with optional query parameters, especially when
- * used with the {@link TestEnumParametersQueryParams} class that allows for
- * building up this map in a fluent style.
- * @param enumHeaderStringArray Header parameter enum test (string array) (optional)
- * @param enumHeaderString Header parameter enum test (string) (optional, default to -efg)
- * @param enumFormStringArray Form parameter enum test (string array) (optional)
- * @param enumFormString Form parameter enum test (string) (optional, default to -efg)
- * @param queryParams Map of query parameters as name-value pairs
- *
The following elements may be specified in the query map:
- *
- *
enumQueryStringArray - Query parameter enum test (string array) (optional)
- *
enumQueryString - Query parameter enum test (string) (optional, default to -efg)
- *
enumQueryInteger - Query parameter enum test (double) (optional)
- *
enumQueryDouble - Query parameter enum test (double) (optional)
- *
- */
- @RequestLine("GET /fake?enum_query_string_array={enumQueryStringArray}&enum_query_string={enumQueryString}&enum_query_integer={enumQueryInteger}&enum_query_double={enumQueryDouble}")
- @Headers({
- "Content-Type: application/x-www-form-urlencoded",
- "Accept: application/json",
- "enum_header_string_array: {enumHeaderStringArray}",
-
- "enum_header_string: {enumHeaderString}"
- })
- void testEnumParameters(@Param("enumHeaderStringArray") List enumHeaderStringArray, @Param("enumHeaderString") String enumHeaderString, @Param("enumFormStringArray") List enumFormStringArray, @Param("enumFormString") String enumFormString, @QueryMap(encoded=true) Map queryParams);
-
- /**
- * A convenience class for generating query parameters for the
- * testEnumParameters method in a fluent style.
- */
- public static class TestEnumParametersQueryParams extends HashMap {
- public TestEnumParametersQueryParams enumQueryStringArray(final List value) {
- put("enum_query_string_array", EncodingUtils.encodeCollection(value, "csv"));
- return this;
- }
- public TestEnumParametersQueryParams enumQueryString(final String value) {
- put("enum_query_string", EncodingUtils.encode(value));
- return this;
- }
- public TestEnumParametersQueryParams enumQueryInteger(final Integer value) {
- put("enum_query_integer", EncodingUtils.encode(value));
- return this;
- }
- public TestEnumParametersQueryParams enumQueryDouble(final Double value) {
- put("enum_query_double", EncodingUtils.encode(value));
- return this;
- }
- }
-
- /**
- * Fake endpoint to test group parameters (optional)
- * Fake endpoint to test group parameters (optional)
- * @param requiredStringGroup Required String in group parameters (required)
- * @param requiredBooleanGroup Required Boolean in group parameters (required)
- * @param requiredInt64Group Required Integer in group parameters (required)
- * @param stringGroup String in group parameters (optional)
- * @param booleanGroup Boolean in group parameters (optional)
- * @param int64Group Integer in group parameters (optional)
- */
- @RequestLine("DELETE /fake?required_string_group={requiredStringGroup}&required_int64_group={requiredInt64Group}&string_group={stringGroup}&int64_group={int64Group}")
- @Headers({
- "Accept: application/json",
- "required_boolean_group: {requiredBooleanGroup}",
-
- "boolean_group: {booleanGroup}"
- })
- void testGroupParameters(@Param("requiredStringGroup") Integer requiredStringGroup, @Param("requiredBooleanGroup") Boolean requiredBooleanGroup, @Param("requiredInt64Group") Long requiredInt64Group, @Param("stringGroup") Integer stringGroup, @Param("booleanGroup") Boolean booleanGroup, @Param("int64Group") Long int64Group);
-
- /**
- * Fake endpoint to test group parameters (optional)
- * Fake endpoint to test group parameters (optional)
- * Note, this is equivalent to the other testGroupParameters method,
- * but with the query parameters collected into a single Map parameter. This
- * is convenient for services with optional query parameters, especially when
- * used with the {@link TestGroupParametersQueryParams} class that allows for
- * building up this map in a fluent style.
- * @param requiredBooleanGroup Required Boolean in group parameters (required)
- * @param booleanGroup Boolean in group parameters (optional)
- * @param queryParams Map of query parameters as name-value pairs
- *
The following elements may be specified in the query map:
- *
- *
requiredStringGroup - Required String in group parameters (required)
- *
requiredInt64Group - Required Integer in group parameters (required)
- *
stringGroup - String in group parameters (optional)
- *
int64Group - Integer in group parameters (optional)
- *
- */
- @RequestLine("DELETE /fake?required_string_group={requiredStringGroup}&required_int64_group={requiredInt64Group}&string_group={stringGroup}&int64_group={int64Group}")
- @Headers({
- "Accept: application/json",
- "required_boolean_group: {requiredBooleanGroup}",
-
- "boolean_group: {booleanGroup}"
- })
- void testGroupParameters(@Param("requiredBooleanGroup") Boolean requiredBooleanGroup, @Param("booleanGroup") Boolean booleanGroup, @QueryMap(encoded=true) Map queryParams);
-
- /**
- * A convenience class for generating query parameters for the
- * testGroupParameters method in a fluent style.
- */
- public static class TestGroupParametersQueryParams extends HashMap {
- public TestGroupParametersQueryParams requiredStringGroup(final Integer value) {
- put("required_string_group", EncodingUtils.encode(value));
- return this;
- }
- public TestGroupParametersQueryParams requiredInt64Group(final Long value) {
- put("required_int64_group", EncodingUtils.encode(value));
- return this;
- }
- public TestGroupParametersQueryParams stringGroup(final Integer value) {
- put("string_group", EncodingUtils.encode(value));
- return this;
- }
- public TestGroupParametersQueryParams int64Group(final Long value) {
- put("int64_group", EncodingUtils.encode(value));
- return this;
- }
- }
-
- /**
- * test inline additionalProperties
- *
- * @param param request body (required)
- */
- @RequestLine("POST /fake/inline-additionalProperties")
- @Headers({
- "Content-Type: application/json",
- "Accept: application/json",
- })
- void testInlineAdditionalProperties(Map param);
-
- /**
- * test json serialization of form data
- *
- * @param param field1 (required)
- * @param param2 field2 (required)
- */
- @RequestLine("GET /fake/jsonFormData")
- @Headers({
- "Content-Type: application/x-www-form-urlencoded",
- "Accept: application/json",
- })
- void testJsonFormData(@Param("param") String param, @Param("param2") String param2);
-
- /**
- *
- * To test the collection format in query parameters
- * @param pipe (required)
- * @param ioutil (required)
- * @param http (required)
- * @param url (required)
- * @param context (required)
- */
- @RequestLine("PUT /fake/test-query-paramters?pipe={pipe}&ioutil={ioutil}&http={http}&url={url}&context={context}")
- @Headers({
- "Accept: application/json",
- })
- void testQueryParameterCollectionFormat(@Param("pipe") List pipe, @Param("ioutil") List ioutil, @Param("http") List http, @Param("url") List url, @Param("context") List context);
-
- /**
- *
- * To test the collection format in query parameters
- * Note, this is equivalent to the other testQueryParameterCollectionFormat method,
- * but with the query parameters collected into a single Map parameter. This
- * is convenient for services with optional query parameters, especially when
- * used with the {@link TestQueryParameterCollectionFormatQueryParams} class that allows for
- * building up this map in a fluent style.
- * @param queryParams Map of query parameters as name-value pairs
- *
The following elements may be specified in the query map:
- *
- *
pipe - (required)
- *
ioutil - (required)
- *
http - (required)
- *
url - (required)
- *
context - (required)
- *
- */
- @RequestLine("PUT /fake/test-query-paramters?pipe={pipe}&ioutil={ioutil}&http={http}&url={url}&context={context}")
- @Headers({
- "Accept: application/json",
- })
- void testQueryParameterCollectionFormat(@QueryMap(encoded=true) Map queryParams);
-
- /**
- * A convenience class for generating query parameters for the
- * testQueryParameterCollectionFormat method in a fluent style.
- */
- public static class TestQueryParameterCollectionFormatQueryParams extends HashMap {
- public TestQueryParameterCollectionFormatQueryParams pipe(final List value) {
- put("pipe", EncodingUtils.encodeCollection(value, "csv"));
- return this;
- }
- public TestQueryParameterCollectionFormatQueryParams ioutil(final List value) {
- put("ioutil", EncodingUtils.encodeCollection(value, "csv"));
- return this;
- }
- public TestQueryParameterCollectionFormatQueryParams http(final List value) {
- put("http", EncodingUtils.encodeCollection(value, "space"));
- return this;
- }
- public TestQueryParameterCollectionFormatQueryParams url(final List value) {
- put("url", EncodingUtils.encodeCollection(value, "csv"));
- return this;
- }
- public TestQueryParameterCollectionFormatQueryParams context(final List value) {
- put("context", EncodingUtils.encodeCollection(value, "multi"));
- return this;
- }
- }
-}
diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java
deleted file mode 100644
index 2df21ad9b96..00000000000
--- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java
+++ /dev/null
@@ -1,30 +0,0 @@
-package org.openapitools.client.api;
-
-import org.openapitools.client.ApiClient;
-import org.openapitools.client.EncodingUtils;
-
-import org.openapitools.client.model.Client;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import feign.*;
-
-
-public interface FakeClassnameTags123Api extends ApiClient.Api {
-
-
- /**
- * To test class name in snake case
- * To test class name in snake case
- * @param body client model (required)
- * @return Client
- */
- @RequestLine("PATCH /fake_classname_test")
- @Headers({
- "Content-Type: application/json",
- "Accept: application/json",
- })
- Client testClassname(Client body);
-}
diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/api/PetApi.java
deleted file mode 100644
index 48ecf31fd3f..00000000000
--- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/api/PetApi.java
+++ /dev/null
@@ -1,201 +0,0 @@
-package org.openapitools.client.api;
-
-import org.openapitools.client.ApiClient;
-import org.openapitools.client.EncodingUtils;
-
-import java.io.File;
-import org.openapitools.client.model.ModelApiResponse;
-import org.openapitools.client.model.Pet;
-import java.util.Set;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import feign.*;
-
-
-public interface PetApi extends ApiClient.Api {
-
-
- /**
- * Add a new pet to the store
- *
- * @param body Pet object that needs to be added to the store (required)
- */
- @RequestLine("POST /pet")
- @Headers({
- "Content-Type: application/json",
- "Accept: application/json",
- })
- void addPet(Pet body);
-
- /**
- * Deletes a pet
- *
- * @param petId Pet id to delete (required)
- * @param apiKey (optional)
- */
- @RequestLine("DELETE /pet/{petId}")
- @Headers({
- "Accept: application/json",
- "api_key: {apiKey}"
- })
- void deletePet(@Param("petId") Long petId, @Param("apiKey") String apiKey);
-
- /**
- * Finds Pets by status
- * Multiple status values can be provided with comma separated strings
- * @param status Status values that need to be considered for filter (required)
- * @return List<Pet>
- */
- @RequestLine("GET /pet/findByStatus?status={status}")
- @Headers({
- "Accept: application/json",
- })
- List findPetsByStatus(@Param("status") List status);
-
- /**
- * Finds Pets by status
- * Multiple status values can be provided with comma separated strings
- * Note, this is equivalent to the other findPetsByStatus method,
- * but with the query parameters collected into a single Map parameter. This
- * is convenient for services with optional query parameters, especially when
- * used with the {@link FindPetsByStatusQueryParams} class that allows for
- * building up this map in a fluent style.
- * @param queryParams Map of query parameters as name-value pairs
- *
The following elements may be specified in the query map:
- *
- *
status - Status values that need to be considered for filter (required)
- *
- * @return List<Pet>
- */
- @RequestLine("GET /pet/findByStatus?status={status}")
- @Headers({
- "Accept: application/json",
- })
- List findPetsByStatus(@QueryMap(encoded=true) Map queryParams);
-
- /**
- * A convenience class for generating query parameters for the
- * findPetsByStatus method in a fluent style.
- */
- public static class FindPetsByStatusQueryParams extends HashMap {
- public FindPetsByStatusQueryParams status(final List value) {
- put("status", EncodingUtils.encodeCollection(value, "csv"));
- return this;
- }
- }
-
- /**
- * Finds Pets by tags
- * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
- * @param tags Tags to filter by (required)
- * @return Set<Pet>
- */
- @RequestLine("GET /pet/findByTags?tags={tags}")
- @Headers({
- "Accept: application/json",
- })
- Set findPetsByTags(@Param("tags") Set tags);
-
- /**
- * Finds Pets by tags
- * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
- * Note, this is equivalent to the other findPetsByTags method,
- * but with the query parameters collected into a single Map parameter. This
- * is convenient for services with optional query parameters, especially when
- * used with the {@link FindPetsByTagsQueryParams} class that allows for
- * building up this map in a fluent style.
- * @param queryParams Map of query parameters as name-value pairs
- *
The following elements may be specified in the query map:
- *
- *
tags - Tags to filter by (required)
- *
- * @return Set<Pet>
- */
- @RequestLine("GET /pet/findByTags?tags={tags}")
- @Headers({
- "Accept: application/json",
- })
- Set findPetsByTags(@QueryMap(encoded=true) Map queryParams);
-
- /**
- * A convenience class for generating query parameters for the
- * findPetsByTags method in a fluent style.
- */
- public static class FindPetsByTagsQueryParams extends HashMap {
- public FindPetsByTagsQueryParams tags(final Set value) {
- put("tags", EncodingUtils.encodeCollection(value, "csv"));
- return this;
- }
- }
-
- /**
- * Find pet by ID
- * Returns a single pet
- * @param petId ID of pet to return (required)
- * @return Pet
- */
- @RequestLine("GET /pet/{petId}")
- @Headers({
- "Accept: application/json",
- })
- Pet getPetById(@Param("petId") Long petId);
-
- /**
- * Update an existing pet
- *
- * @param body Pet object that needs to be added to the store (required)
- */
- @RequestLine("PUT /pet")
- @Headers({
- "Content-Type: application/json",
- "Accept: application/json",
- })
- void updatePet(Pet body);
-
- /**
- * Updates a pet in the store with form data
- *
- * @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)
- */
- @RequestLine("POST /pet/{petId}")
- @Headers({
- "Content-Type: application/x-www-form-urlencoded",
- "Accept: application/json",
- })
- void updatePetWithForm(@Param("petId") Long petId, @Param("name") String name, @Param("status") String status);
-
- /**
- * uploads an image
- *
- * @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
- */
- @RequestLine("POST /pet/{petId}/uploadImage")
- @Headers({
- "Content-Type: multipart/form-data",
- "Accept: application/json",
- })
- ModelApiResponse uploadFile(@Param("petId") Long petId, @Param("additionalMetadata") String additionalMetadata, @Param("file") File file);
-
- /**
- * uploads an image (required)
- *
- * @param petId ID of pet to update (required)
- * @param requiredFile file to upload (required)
- * @param additionalMetadata Additional data to pass to server (optional)
- * @return ModelApiResponse
- */
- @RequestLine("POST /fake/{petId}/uploadImageWithRequiredFile")
- @Headers({
- "Content-Type: multipart/form-data",
- "Accept: application/json",
- })
- ModelApiResponse uploadFileWithRequiredFile(@Param("petId") Long petId, @Param("requiredFile") File requiredFile, @Param("additionalMetadata") String additionalMetadata);
-}
diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/api/StoreApi.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/api/StoreApi.java
deleted file mode 100644
index 30757ed5731..00000000000
--- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/api/StoreApi.java
+++ /dev/null
@@ -1,64 +0,0 @@
-package org.openapitools.client.api;
-
-import org.openapitools.client.ApiClient;
-import org.openapitools.client.EncodingUtils;
-
-import org.openapitools.client.model.Order;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import feign.*;
-
-
-public interface StoreApi extends ApiClient.Api {
-
-
- /**
- * Delete purchase order by ID
- * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
- * @param orderId ID of the order that needs to be deleted (required)
- */
- @RequestLine("DELETE /store/order/{orderId}")
- @Headers({
- "Accept: application/json",
- })
- void deleteOrder(@Param("orderId") String orderId);
-
- /**
- * Returns pet inventories by status
- * Returns a map of status codes to quantities
- * @return Map<String, Integer>
- */
- @RequestLine("GET /store/inventory")
- @Headers({
- "Accept: application/json",
- })
- Map getInventory();
-
- /**
- * Find purchase order by ID
- * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
- * @param orderId ID of pet that needs to be fetched (required)
- * @return Order
- */
- @RequestLine("GET /store/order/{orderId}")
- @Headers({
- "Accept: application/json",
- })
- Order getOrderById(@Param("orderId") Long orderId);
-
- /**
- * Place an order for a pet
- *
- * @param body order placed for purchasing the pet (required)
- * @return Order
- */
- @RequestLine("POST /store/order")
- @Headers({
- "Content-Type: */*",
- "Accept: application/json",
- })
- Order placeOrder(Order body);
-}
diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/api/UserApi.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/api/UserApi.java
deleted file mode 100644
index d74a9a2f809..00000000000
--- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/api/UserApi.java
+++ /dev/null
@@ -1,149 +0,0 @@
-package org.openapitools.client.api;
-
-import org.openapitools.client.ApiClient;
-import org.openapitools.client.EncodingUtils;
-
-import org.openapitools.client.model.User;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import feign.*;
-
-
-public interface UserApi extends ApiClient.Api {
-
-
- /**
- * Create user
- * This can only be done by the logged in user.
- * @param body Created user object (required)
- */
- @RequestLine("POST /user")
- @Headers({
- "Content-Type: */*",
- "Accept: application/json",
- })
- void createUser(User body);
-
- /**
- * Creates list of users with given input array
- *
- * @param body List of user object (required)
- */
- @RequestLine("POST /user/createWithArray")
- @Headers({
- "Content-Type: */*",
- "Accept: application/json",
- })
- void createUsersWithArrayInput(List body);
-
- /**
- * Creates list of users with given input array
- *
- * @param body List of user object (required)
- */
- @RequestLine("POST /user/createWithList")
- @Headers({
- "Content-Type: */*",
- "Accept: application/json",
- })
- void createUsersWithListInput(List body);
-
- /**
- * Delete user
- * This can only be done by the logged in user.
- * @param username The name that needs to be deleted (required)
- */
- @RequestLine("DELETE /user/{username}")
- @Headers({
- "Accept: application/json",
- })
- void deleteUser(@Param("username") String username);
-
- /**
- * Get user by user name
- *
- * @param username The name that needs to be fetched. Use user1 for testing. (required)
- * @return User
- */
- @RequestLine("GET /user/{username}")
- @Headers({
- "Accept: application/json",
- })
- User getUserByName(@Param("username") String username);
-
- /**
- * Logs user into the system
- *
- * @param username The user name for login (required)
- * @param password The password for login in clear text (required)
- * @return String
- */
- @RequestLine("GET /user/login?username={username}&password={password}")
- @Headers({
- "Accept: application/json",
- })
- String loginUser(@Param("username") String username, @Param("password") String password);
-
- /**
- * Logs user into the system
- *
- * Note, this is equivalent to the other loginUser method,
- * but with the query parameters collected into a single Map parameter. This
- * is convenient for services with optional query parameters, especially when
- * used with the {@link LoginUserQueryParams} class that allows for
- * building up this map in a fluent style.
- * @param queryParams Map of query parameters as name-value pairs
- *
The following elements may be specified in the query map:
- *
- *
username - The user name for login (required)
- *
password - The password for login in clear text (required)
- *
- * @return String
- */
- @RequestLine("GET /user/login?username={username}&password={password}")
- @Headers({
- "Accept: application/json",
- })
- String loginUser(@QueryMap(encoded=true) Map queryParams);
-
- /**
- * A convenience class for generating query parameters for the
- * loginUser method in a fluent style.
- */
- public static class LoginUserQueryParams extends HashMap {
- public LoginUserQueryParams username(final String value) {
- put("username", EncodingUtils.encode(value));
- return this;
- }
- public LoginUserQueryParams password(final String value) {
- put("password", EncodingUtils.encode(value));
- return this;
- }
- }
-
- /**
- * Logs out current logged in user session
- *
- */
- @RequestLine("GET /user/logout")
- @Headers({
- "Accept: application/json",
- })
- void logoutUser();
-
- /**
- * Updated user
- * This can only be done by the logged in user.
- * @param username name that need to be deleted (required)
- * @param body Updated user object (required)
- */
- @RequestLine("PUT /user/{username}")
- @Headers({
- "Content-Type: */*",
- "Accept: application/json",
- })
- void updateUser(@Param("username") String username, User body);
-}
diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java
deleted file mode 100644
index 44511e4641c..00000000000
--- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java
+++ /dev/null
@@ -1,43 +0,0 @@
-package org.openapitools.client.auth;
-
-import feign.RequestInterceptor;
-import feign.RequestTemplate;
-
-public class ApiKeyAuth implements RequestInterceptor {
- private final String location;
- private final String paramName;
-
- private String apiKey;
-
- public ApiKeyAuth(String location, String paramName) {
- this.location = location;
- this.paramName = paramName;
- }
-
- public String getLocation() {
- return location;
- }
-
- public String getParamName() {
- return paramName;
- }
-
- public String getApiKey() {
- return apiKey;
- }
-
- public void setApiKey(String apiKey) {
- this.apiKey = apiKey;
- }
-
- @Override
- public void apply(RequestTemplate template) {
- if ("query".equals(location)) {
- template.query(paramName, apiKey);
- } else if ("header".equals(location)) {
- template.header(paramName, apiKey);
- } else if ("cookie".equals(location)) {
- template.header("Cookie", String.format("%s=%s", paramName, apiKey));
- }
- }
-}
diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/auth/HttpBasicAuth.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/auth/HttpBasicAuth.java
deleted file mode 100644
index b275826472a..00000000000
--- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/auth/HttpBasicAuth.java
+++ /dev/null
@@ -1,41 +0,0 @@
-package org.openapitools.client.auth;
-
-import feign.RequestInterceptor;
-import feign.RequestTemplate;
-import feign.auth.BasicAuthRequestInterceptor;
-
-/**
- * An interceptor that adds the request header needed to use HTTP basic authentication.
- */
-public class HttpBasicAuth implements RequestInterceptor {
-
- private String username;
- private String password;
-
- public String getUsername() {
- return username;
- }
-
- public void setUsername(String username) {
- this.username = username;
- }
-
- public String getPassword() {
- return password;
- }
-
- public void setPassword(String password) {
- this.password = password;
- }
-
- public void setCredentials(String username, String password) {
- this.username = username;
- this.password = password;
- }
-
- @Override
- public void apply(RequestTemplate template) {
- RequestInterceptor requestInterceptor = new BasicAuthRequestInterceptor(username, password);
- requestInterceptor.apply(template);
- }
-}
diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/auth/HttpBearerAuth.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/auth/HttpBearerAuth.java
deleted file mode 100644
index d4c9cbe6361..00000000000
--- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/auth/HttpBearerAuth.java
+++ /dev/null
@@ -1,43 +0,0 @@
-package org.openapitools.client.auth;
-
-import feign.RequestInterceptor;
-import feign.RequestTemplate;
-
-/**
- * An interceptor that adds the request header needed to use HTTP bearer authentication.
- */
-public class HttpBearerAuth implements RequestInterceptor {
- private final String scheme;
- private String bearerToken;
-
- public HttpBearerAuth(String scheme) {
- this.scheme = scheme;
- }
-
- /**
- * Gets the token, which together with the scheme, will be sent as the value of the Authorization header.
- */
- public String getBearerToken() {
- return bearerToken;
- }
-
- /**
- * Sets the token, which together with the scheme, will be sent as the value of the Authorization header.
- */
- public void setBearerToken(String bearerToken) {
- this.bearerToken = bearerToken;
- }
-
- @Override
- public void apply(RequestTemplate template) {
- if(bearerToken == null) {
- return;
- }
-
- template.header("Authorization", (scheme != null ? upperCaseBearer(scheme) + " " : "") + bearerToken);
- }
-
- private static String upperCaseBearer(String scheme) {
- return ("bearer".equalsIgnoreCase(scheme)) ? "Bearer" : scheme;
- }
-}
diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/auth/OAuth.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/auth/OAuth.java
deleted file mode 100644
index d6d6fae57fb..00000000000
--- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/auth/OAuth.java
+++ /dev/null
@@ -1,197 +0,0 @@
-package org.openapitools.client.auth;
-
-import java.io.IOException;
-import java.util.Collection;
-import java.util.Map;
-import java.util.Map.Entry;
-
-import org.apache.oltu.oauth2.client.HttpClient;
-import org.apache.oltu.oauth2.client.OAuthClient;
-import org.apache.oltu.oauth2.client.request.OAuthClientRequest;
-import org.apache.oltu.oauth2.client.request.OAuthClientRequest.AuthenticationRequestBuilder;
-import org.apache.oltu.oauth2.client.request.OAuthClientRequest.TokenRequestBuilder;
-import org.apache.oltu.oauth2.client.response.OAuthClientResponse;
-import org.apache.oltu.oauth2.client.response.OAuthClientResponseFactory;
-import org.apache.oltu.oauth2.client.response.OAuthJSONAccessTokenResponse;
-import org.apache.oltu.oauth2.common.exception.OAuthProblemException;
-import org.apache.oltu.oauth2.common.exception.OAuthSystemException;
-import org.apache.oltu.oauth2.common.message.types.GrantType;
-import org.apache.oltu.oauth2.common.token.BasicOAuthToken;
-
-import feign.Client;
-import feign.Request.Options;
-import feign.RequestInterceptor;
-import feign.RequestTemplate;
-import feign.Response;
-import feign.RetryableException;
-import feign.Util;
-import org.openapitools.client.StringUtil;
-
-
-public class OAuth implements RequestInterceptor {
-
- static final int MILLIS_PER_SECOND = 1000;
-
- public interface AccessTokenListener {
- void notify(BasicOAuthToken token);
- }
-
- private volatile String accessToken;
- private Long expirationTimeMillis;
- private OAuthClient oauthClient;
- private TokenRequestBuilder tokenRequestBuilder;
- private AuthenticationRequestBuilder authenticationRequestBuilder;
- private AccessTokenListener accessTokenListener;
-
- public OAuth(Client client, TokenRequestBuilder requestBuilder) {
- this.oauthClient = new OAuthClient(new OAuthFeignClient(client));
- this.tokenRequestBuilder = requestBuilder;
- }
-
- public OAuth(Client client, OAuthFlow flow, String authorizationUrl, String tokenUrl, String scopes) {
- this(client, OAuthClientRequest.tokenLocation(tokenUrl).setScope(scopes));
-
- switch(flow) {
- case accessCode:
- case implicit:
- tokenRequestBuilder.setGrantType(GrantType.AUTHORIZATION_CODE);
- break;
- case password:
- tokenRequestBuilder.setGrantType(GrantType.PASSWORD);
- break;
- case application:
- tokenRequestBuilder.setGrantType(GrantType.CLIENT_CREDENTIALS);
- break;
- default:
- break;
- }
- authenticationRequestBuilder = OAuthClientRequest.authorizationLocation(authorizationUrl);
- }
-
- public OAuth(OAuthFlow flow, String authorizationUrl, String tokenUrl, String scopes) {
- this(new Client.Default(null, null), flow, authorizationUrl, tokenUrl, scopes);
- }
-
- @Override
- public void apply(RequestTemplate template) {
- // If the request already have an authorization (eg. Basic auth), do nothing
- if (template.headers().containsKey("Authorization")) {
- return;
- }
- // If first time, get the token
- if (expirationTimeMillis == null || System.currentTimeMillis() >= expirationTimeMillis) {
- updateAccessToken(template);
- }
- if (getAccessToken() != null) {
- template.header("Authorization", "Bearer " + getAccessToken());
- }
- }
-
- public synchronized void updateAccessToken(RequestTemplate template) {
- OAuthJSONAccessTokenResponse accessTokenResponse;
- try {
- accessTokenResponse = oauthClient.accessToken(tokenRequestBuilder.buildBodyMessage());
- } catch (Exception e) {
- throw new RetryableException(e.getMessage(), e,null);
- }
- if (accessTokenResponse != null && accessTokenResponse.getAccessToken() != null) {
- setAccessToken(accessTokenResponse.getAccessToken(), accessTokenResponse.getExpiresIn());
- if (accessTokenListener != null) {
- accessTokenListener.notify((BasicOAuthToken) accessTokenResponse.getOAuthToken());
- }
- }
- }
-
- public synchronized void registerAccessTokenListener(AccessTokenListener accessTokenListener) {
- this.accessTokenListener = accessTokenListener;
- }
-
- public synchronized String getAccessToken() {
- return accessToken;
- }
-
- public synchronized void setAccessToken(String accessToken, Long expiresIn) {
- this.accessToken = accessToken;
- this.expirationTimeMillis = expiresIn == null ? null : System.currentTimeMillis() + expiresIn * MILLIS_PER_SECOND;
- }
-
- public TokenRequestBuilder getTokenRequestBuilder() {
- return tokenRequestBuilder;
- }
-
- public void setTokenRequestBuilder(TokenRequestBuilder tokenRequestBuilder) {
- this.tokenRequestBuilder = tokenRequestBuilder;
- }
-
- public AuthenticationRequestBuilder getAuthenticationRequestBuilder() {
- return authenticationRequestBuilder;
- }
-
- public void setAuthenticationRequestBuilder(AuthenticationRequestBuilder authenticationRequestBuilder) {
- this.authenticationRequestBuilder = authenticationRequestBuilder;
- }
-
- public OAuthClient getOauthClient() {
- return oauthClient;
- }
-
- public void setOauthClient(OAuthClient oauthClient) {
- this.oauthClient = oauthClient;
- }
-
- public void setOauthClient(Client client) {
- this.oauthClient = new OAuthClient( new OAuthFeignClient(client));
- }
-
- public static class OAuthFeignClient implements HttpClient {
-
- private Client client;
-
- public OAuthFeignClient() {
- this.client = new Client.Default(null, null);
- }
-
- public OAuthFeignClient(Client client) {
- this.client = client;
- }
-
- public T execute(OAuthClientRequest request, Map headers,
- String requestMethod, Class responseClass)
- throws OAuthSystemException, OAuthProblemException {
-
- RequestTemplate req = new RequestTemplate()
- .append(request.getLocationUri())
- .method(requestMethod)
- .body(request.getBody());
-
- for (Entry entry : headers.entrySet()) {
- req.header(entry.getKey(), entry.getValue());
- }
- Response feignResponse;
- String body = "";
- try {
- feignResponse = client.execute(req.request(), new Options());
- body = Util.toString(feignResponse.body().asReader());
- } catch (IOException e) {
- throw new OAuthSystemException(e);
- }
-
- String contentType = null;
- Collection contentTypeHeader = feignResponse.headers().get("Content-Type");
- if(contentTypeHeader != null) {
- contentType = StringUtil.join(contentTypeHeader.toArray(new String[0]), ";");
- }
-
- return OAuthClientResponseFactory.createCustomResponse(
- body,
- contentType,
- feignResponse.status(),
- responseClass
- );
- }
-
- public void shutdown() {
- // Nothing to do here
- }
- }
-}
diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/auth/OAuthFlow.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/auth/OAuthFlow.java
deleted file mode 100644
index b2d11ff0c4f..00000000000
--- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/auth/OAuthFlow.java
+++ /dev/null
@@ -1,18 +0,0 @@
-/*
- * OpenAPI Petstore
- * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
- *
- * The version of the OpenAPI document: 1.0.0
- *
- *
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
- * https://openapi-generator.tech
- * Do not edit the class manually.
- */
-
-
-package org.openapitools.client.auth;
-
-public enum OAuthFlow {
- accessCode, implicit, password, application
-}
diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java
deleted file mode 100644
index b3b18538873..00000000000
--- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/*
- * OpenAPI Petstore
- * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
- *
- * The version of the OpenAPI document: 1.0.0
- *
- *
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
- * https://openapi-generator.tech
- * Do not edit the class manually.
- */
-
-
-package org.openapitools.client.model;
-
-import java.util.Objects;
-import java.util.Arrays;
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.fasterxml.jackson.annotation.JsonCreator;
-import com.fasterxml.jackson.annotation.JsonValue;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import java.util.HashMap;
-import java.util.Map;
-import com.fasterxml.jackson.annotation.JsonPropertyOrder;
-
-/**
- * AdditionalPropertiesAnyType
- */
-@JsonPropertyOrder({
- AdditionalPropertiesAnyType.JSON_PROPERTY_NAME
-})
-@javax.annotation.concurrent.Immutable
-
-public class AdditionalPropertiesAnyType extends HashMap {
- public static final String JSON_PROPERTY_NAME = "name";
- private String name;
-
-
- public AdditionalPropertiesAnyType name(String name) {
-
- this.name = name;
- return this;
- }
-
- /**
- * Get name
- * @return name
- **/
- @javax.annotation.Nullable
- @ApiModelProperty(value = "")
- @JsonProperty(JSON_PROPERTY_NAME)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
-
- public String getName() {
- return name;
- }
-
-
- public void setName(String name) {
- this.name = name;
- }
-
-
- @Override
- public boolean equals(java.lang.Object o) {
- if (this == o) {
- return true;
- }
- if (o == null || getClass() != o.getClass()) {
- return false;
- }
- AdditionalPropertiesAnyType additionalPropertiesAnyType = (AdditionalPropertiesAnyType) o;
- return Objects.equals(this.name, additionalPropertiesAnyType.name) &&
- super.equals(o);
- }
-
- @Override
- public int hashCode() {
- return Objects.hash(name, super.hashCode());
- }
-
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder();
- sb.append("class AdditionalPropertiesAnyType {\n");
- sb.append(" ").append(toIndentedString(super.toString())).append("\n");
- sb.append(" name: ").append(toIndentedString(name)).append("\n");
- sb.append("}");
- return sb.toString();
- }
-
- /**
- * Convert the given object to string with each line indented by 4 spaces
- * (except the first line).
- */
- private String toIndentedString(java.lang.Object o) {
- if (o == null) {
- return "null";
- }
- return o.toString().replace("\n", "\n ");
- }
-
-}
-
diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java
deleted file mode 100644
index b096a099e9d..00000000000
--- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
- * OpenAPI Petstore
- * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
- *
- * The version of the OpenAPI document: 1.0.0
- *
- *
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
- * https://openapi-generator.tech
- * Do not edit the class manually.
- */
-
-
-package org.openapitools.client.model;
-
-import java.util.Objects;
-import java.util.Arrays;
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.fasterxml.jackson.annotation.JsonCreator;
-import com.fasterxml.jackson.annotation.JsonValue;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import com.fasterxml.jackson.annotation.JsonPropertyOrder;
-
-/**
- * AdditionalPropertiesArray
- */
-@JsonPropertyOrder({
- AdditionalPropertiesArray.JSON_PROPERTY_NAME
-})
-@javax.annotation.concurrent.Immutable
-
-public class AdditionalPropertiesArray extends HashMap {
- public static final String JSON_PROPERTY_NAME = "name";
- private String name;
-
-
- public AdditionalPropertiesArray name(String name) {
-
- this.name = name;
- return this;
- }
-
- /**
- * Get name
- * @return name
- **/
- @javax.annotation.Nullable
- @ApiModelProperty(value = "")
- @JsonProperty(JSON_PROPERTY_NAME)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
-
- public String getName() {
- return name;
- }
-
-
- public void setName(String name) {
- this.name = name;
- }
-
-
- @Override
- public boolean equals(java.lang.Object o) {
- if (this == o) {
- return true;
- }
- if (o == null || getClass() != o.getClass()) {
- return false;
- }
- AdditionalPropertiesArray additionalPropertiesArray = (AdditionalPropertiesArray) o;
- return Objects.equals(this.name, additionalPropertiesArray.name) &&
- super.equals(o);
- }
-
- @Override
- public int hashCode() {
- return Objects.hash(name, super.hashCode());
- }
-
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder();
- sb.append("class AdditionalPropertiesArray {\n");
- sb.append(" ").append(toIndentedString(super.toString())).append("\n");
- sb.append(" name: ").append(toIndentedString(name)).append("\n");
- sb.append("}");
- return sb.toString();
- }
-
- /**
- * Convert the given object to string with each line indented by 4 spaces
- * (except the first line).
- */
- private String toIndentedString(java.lang.Object o) {
- if (o == null) {
- return "null";
- }
- return o.toString().replace("\n", "\n ");
- }
-
-}
-
diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java
deleted file mode 100644
index cb08b798a87..00000000000
--- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/*
- * OpenAPI Petstore
- * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
- *
- * The version of the OpenAPI document: 1.0.0
- *
- *
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
- * https://openapi-generator.tech
- * Do not edit the class manually.
- */
-
-
-package org.openapitools.client.model;
-
-import java.util.Objects;
-import java.util.Arrays;
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.fasterxml.jackson.annotation.JsonCreator;
-import com.fasterxml.jackson.annotation.JsonValue;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import java.util.HashMap;
-import java.util.Map;
-import com.fasterxml.jackson.annotation.JsonPropertyOrder;
-
-/**
- * AdditionalPropertiesBoolean
- */
-@JsonPropertyOrder({
- AdditionalPropertiesBoolean.JSON_PROPERTY_NAME
-})
-@javax.annotation.concurrent.Immutable
-
-public class AdditionalPropertiesBoolean extends HashMap {
- public static final String JSON_PROPERTY_NAME = "name";
- private String name;
-
-
- public AdditionalPropertiesBoolean name(String name) {
-
- this.name = name;
- return this;
- }
-
- /**
- * Get name
- * @return name
- **/
- @javax.annotation.Nullable
- @ApiModelProperty(value = "")
- @JsonProperty(JSON_PROPERTY_NAME)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
-
- public String getName() {
- return name;
- }
-
-
- public void setName(String name) {
- this.name = name;
- }
-
-
- @Override
- public boolean equals(java.lang.Object o) {
- if (this == o) {
- return true;
- }
- if (o == null || getClass() != o.getClass()) {
- return false;
- }
- AdditionalPropertiesBoolean additionalPropertiesBoolean = (AdditionalPropertiesBoolean) o;
- return Objects.equals(this.name, additionalPropertiesBoolean.name) &&
- super.equals(o);
- }
-
- @Override
- public int hashCode() {
- return Objects.hash(name, super.hashCode());
- }
-
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder();
- sb.append("class AdditionalPropertiesBoolean {\n");
- sb.append(" ").append(toIndentedString(super.toString())).append("\n");
- sb.append(" name: ").append(toIndentedString(name)).append("\n");
- sb.append("}");
- return sb.toString();
- }
-
- /**
- * Convert the given object to string with each line indented by 4 spaces
- * (except the first line).
- */
- private String toIndentedString(java.lang.Object o) {
- if (o == null) {
- return "null";
- }
- return o.toString().replace("\n", "\n ");
- }
-
-}
-
diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java
deleted file mode 100644
index e35f2cca9ab..00000000000
--- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java
+++ /dev/null
@@ -1,481 +0,0 @@
-/*
- * OpenAPI Petstore
- * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
- *
- * The version of the OpenAPI document: 1.0.0
- *
- *
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
- * https://openapi-generator.tech
- * Do not edit the class manually.
- */
-
-
-package org.openapitools.client.model;
-
-import java.util.Objects;
-import java.util.Arrays;
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.fasterxml.jackson.annotation.JsonCreator;
-import com.fasterxml.jackson.annotation.JsonValue;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import java.math.BigDecimal;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import com.fasterxml.jackson.annotation.JsonPropertyOrder;
-
-/**
- * AdditionalPropertiesClass
- */
-@JsonPropertyOrder({
- AdditionalPropertiesClass.JSON_PROPERTY_MAP_STRING,
- AdditionalPropertiesClass.JSON_PROPERTY_MAP_NUMBER,
- AdditionalPropertiesClass.JSON_PROPERTY_MAP_INTEGER,
- AdditionalPropertiesClass.JSON_PROPERTY_MAP_BOOLEAN,
- AdditionalPropertiesClass.JSON_PROPERTY_MAP_ARRAY_INTEGER,
- AdditionalPropertiesClass.JSON_PROPERTY_MAP_ARRAY_ANYTYPE,
- AdditionalPropertiesClass.JSON_PROPERTY_MAP_MAP_STRING,
- AdditionalPropertiesClass.JSON_PROPERTY_MAP_MAP_ANYTYPE,
- AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE1,
- AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE2,
- AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE3
-})
-@javax.annotation.concurrent.Immutable
-
-public class AdditionalPropertiesClass {
- public static final String JSON_PROPERTY_MAP_STRING = "map_string";
- private Map mapString = null;
-
- public static final String JSON_PROPERTY_MAP_NUMBER = "map_number";
- private Map mapNumber = null;
-
- public static final String JSON_PROPERTY_MAP_INTEGER = "map_integer";
- private Map mapInteger = null;
-
- public static final String JSON_PROPERTY_MAP_BOOLEAN = "map_boolean";
- private Map mapBoolean = null;
-
- public static final String JSON_PROPERTY_MAP_ARRAY_INTEGER = "map_array_integer";
- private Map> mapArrayInteger = null;
-
- public static final String JSON_PROPERTY_MAP_ARRAY_ANYTYPE = "map_array_anytype";
- private Map> mapArrayAnytype = null;
-
- public static final String JSON_PROPERTY_MAP_MAP_STRING = "map_map_string";
- private Map> mapMapString = null;
-
- public static final String JSON_PROPERTY_MAP_MAP_ANYTYPE = "map_map_anytype";
- private Map> mapMapAnytype = null;
-
- public static final String JSON_PROPERTY_ANYTYPE1 = "anytype_1";
- private Object anytype1;
-
- public static final String JSON_PROPERTY_ANYTYPE2 = "anytype_2";
- private Object anytype2;
-
- public static final String JSON_PROPERTY_ANYTYPE3 = "anytype_3";
- private Object anytype3;
-
-
- public AdditionalPropertiesClass mapString(Map mapString) {
-
- this.mapString = mapString;
- return this;
- }
-
- public AdditionalPropertiesClass putMapStringItem(String key, String mapStringItem) {
- if (this.mapString == null) {
- this.mapString = new HashMap();
- }
- this.mapString.put(key, mapStringItem);
- return this;
- }
-
- /**
- * Get mapString
- * @return mapString
- **/
- @javax.annotation.Nullable
- @ApiModelProperty(value = "")
- @JsonProperty(JSON_PROPERTY_MAP_STRING)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
-
- public Map getMapString() {
- return mapString;
- }
-
-
- public void setMapString(Map mapString) {
- this.mapString = mapString;
- }
-
-
- public AdditionalPropertiesClass mapNumber(Map mapNumber) {
-
- this.mapNumber = mapNumber;
- return this;
- }
-
- public AdditionalPropertiesClass putMapNumberItem(String key, BigDecimal mapNumberItem) {
- if (this.mapNumber == null) {
- this.mapNumber = new HashMap();
- }
- this.mapNumber.put(key, mapNumberItem);
- return this;
- }
-
- /**
- * Get mapNumber
- * @return mapNumber
- **/
- @javax.annotation.Nullable
- @ApiModelProperty(value = "")
- @JsonProperty(JSON_PROPERTY_MAP_NUMBER)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
-
- public Map getMapNumber() {
- return mapNumber;
- }
-
-
- public void setMapNumber(Map mapNumber) {
- this.mapNumber = mapNumber;
- }
-
-
- public AdditionalPropertiesClass mapInteger(Map mapInteger) {
-
- this.mapInteger = mapInteger;
- return this;
- }
-
- public AdditionalPropertiesClass putMapIntegerItem(String key, Integer mapIntegerItem) {
- if (this.mapInteger == null) {
- this.mapInteger = new HashMap();
- }
- this.mapInteger.put(key, mapIntegerItem);
- return this;
- }
-
- /**
- * Get mapInteger
- * @return mapInteger
- **/
- @javax.annotation.Nullable
- @ApiModelProperty(value = "")
- @JsonProperty(JSON_PROPERTY_MAP_INTEGER)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
-
- public Map getMapInteger() {
- return mapInteger;
- }
-
-
- public void setMapInteger(Map mapInteger) {
- this.mapInteger = mapInteger;
- }
-
-
- public AdditionalPropertiesClass mapBoolean(Map mapBoolean) {
-
- this.mapBoolean = mapBoolean;
- return this;
- }
-
- public AdditionalPropertiesClass putMapBooleanItem(String key, Boolean mapBooleanItem) {
- if (this.mapBoolean == null) {
- this.mapBoolean = new HashMap();
- }
- this.mapBoolean.put(key, mapBooleanItem);
- return this;
- }
-
- /**
- * Get mapBoolean
- * @return mapBoolean
- **/
- @javax.annotation.Nullable
- @ApiModelProperty(value = "")
- @JsonProperty(JSON_PROPERTY_MAP_BOOLEAN)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
-
- public Map getMapBoolean() {
- return mapBoolean;
- }
-
-
- public void setMapBoolean(Map mapBoolean) {
- this.mapBoolean = mapBoolean;
- }
-
-
- public AdditionalPropertiesClass mapArrayInteger(Map> mapArrayInteger) {
-
- this.mapArrayInteger = mapArrayInteger;
- return this;
- }
-
- public AdditionalPropertiesClass putMapArrayIntegerItem(String key, List mapArrayIntegerItem) {
- if (this.mapArrayInteger == null) {
- this.mapArrayInteger = new HashMap>();
- }
- this.mapArrayInteger.put(key, mapArrayIntegerItem);
- return this;
- }
-
- /**
- * Get mapArrayInteger
- * @return mapArrayInteger
- **/
- @javax.annotation.Nullable
- @ApiModelProperty(value = "")
- @JsonProperty(JSON_PROPERTY_MAP_ARRAY_INTEGER)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
-
- public Map> getMapArrayInteger() {
- return mapArrayInteger;
- }
-
-
- public void setMapArrayInteger(Map> mapArrayInteger) {
- this.mapArrayInteger = mapArrayInteger;
- }
-
-
- public AdditionalPropertiesClass mapArrayAnytype(Map> mapArrayAnytype) {
-
- this.mapArrayAnytype = mapArrayAnytype;
- return this;
- }
-
- public AdditionalPropertiesClass putMapArrayAnytypeItem(String key, List