forked from loafle/openapi-generator-original
Decommission Retrofit play24, play25 (#6665)
* deco play24, play25 in retrofit * update pom.xml * update doc
This commit is contained in:
parent
c094effd90
commit
6f2e84db04
@ -1,12 +0,0 @@
|
|||||||
generatorName: java
|
|
||||||
outputDir: samples/client/petstore/java/retrofit2-play24
|
|
||||||
library: retrofit2
|
|
||||||
inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml
|
|
||||||
additionalProperties:
|
|
||||||
usePlayWS: "true"
|
|
||||||
enableBuilderSupport: "true"
|
|
||||||
useBeanValidation: "true"
|
|
||||||
playVersion: play24
|
|
||||||
artifactId: petstore-java-client-retrofit2-play24
|
|
||||||
hideGenerationTimestamp: "true"
|
|
||||||
dateLibrary: java8
|
|
@ -1,11 +0,0 @@
|
|||||||
generatorName: java
|
|
||||||
outputDir: samples/client/petstore/java/retrofit2-play25
|
|
||||||
library: retrofit2
|
|
||||||
inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml
|
|
||||||
additionalProperties:
|
|
||||||
usePlayWS: "true"
|
|
||||||
enableBuilderSupport: "true"
|
|
||||||
useBeanValidation: "true"
|
|
||||||
playVersion: play25
|
|
||||||
artifactId: petstore-java-client-retrofit2-play25
|
|
||||||
hideGenerationTimestamp: "true"
|
|
@ -41,7 +41,7 @@ sidebar_label: java
|
|||||||
|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|
|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|
||||||
|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|
|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|
||||||
|performBeanValidation|Perform BeanValidation| |false|
|
|performBeanValidation|Perform BeanValidation| |false|
|
||||||
|playVersion|Version of Play! Framework (possible values "play24", "play25" (default), "play26")| |null|
|
|playVersion|Version of Play! Framework (possible values "play24" (Deprecated), "play25" (Deprecated), "play26" (Default))| |null|
|
||||||
|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false|
|
|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false|
|
||||||
|scmConnection|SCM connection in generated pom.xml| |scm:git:git@github.com:openapitools/openapi-generator.git|
|
|scmConnection|SCM connection in generated pom.xml| |scm:git:git@github.com:openapitools/openapi-generator.git|
|
||||||
|scmDeveloperConnection|SCM developer connection in generated pom.xml| |scm:git:git@github.com:openapitools/openapi-generator.git|
|
|scmDeveloperConnection|SCM developer connection in generated pom.xml| |scm:git:git@github.com:openapitools/openapi-generator.git|
|
||||||
|
@ -94,7 +94,7 @@ public class JavaClientCodegen extends AbstractJavaCodegen
|
|||||||
// (mustache does not allow for boolean operators so we need this extra field)
|
// (mustache does not allow for boolean operators so we need this extra field)
|
||||||
protected boolean doNotUseRx = true;
|
protected boolean doNotUseRx = true;
|
||||||
protected boolean usePlayWS = false;
|
protected boolean usePlayWS = false;
|
||||||
protected String playVersion = PLAY_25;
|
protected String playVersion = PLAY_26;
|
||||||
protected String feignVersion = FEIGN_10;
|
protected String feignVersion = FEIGN_10;
|
||||||
protected boolean asyncNative = false;
|
protected boolean asyncNative = false;
|
||||||
protected boolean parcelableModel = false;
|
protected boolean parcelableModel = false;
|
||||||
@ -136,7 +136,7 @@ public class JavaClientCodegen extends AbstractJavaCodegen
|
|||||||
cliOptions.add(CliOption.newBoolean(USE_RX_JAVA3, "Whether to use the RxJava3 adapter with the retrofit2 library."));
|
cliOptions.add(CliOption.newBoolean(USE_RX_JAVA3, "Whether to use the RxJava3 adapter with the retrofit2 library."));
|
||||||
cliOptions.add(CliOption.newBoolean(PARCELABLE_MODEL, "Whether to generate models for Android that implement Parcelable with the okhttp-gson library."));
|
cliOptions.add(CliOption.newBoolean(PARCELABLE_MODEL, "Whether to generate models for Android that implement Parcelable with the okhttp-gson library."));
|
||||||
cliOptions.add(CliOption.newBoolean(USE_PLAY_WS, "Use Play! Async HTTP client (Play WS API)"));
|
cliOptions.add(CliOption.newBoolean(USE_PLAY_WS, "Use Play! Async HTTP client (Play WS API)"));
|
||||||
cliOptions.add(CliOption.newString(PLAY_VERSION, "Version of Play! Framework (possible values \"play24\", \"play25\" (default), \"play26\")"));
|
cliOptions.add(CliOption.newString(PLAY_VERSION, "Version of Play! Framework (possible values \"play24\" (Deprecated), \"play25\" (Deprecated), \"play26\" (Default))"));
|
||||||
cliOptions.add(CliOption.newBoolean(SUPPORT_JAVA6, "Whether to support Java6 with the Jersey1 library. This option has been deprecated and will be removed in the 5.x release"));
|
cliOptions.add(CliOption.newBoolean(SUPPORT_JAVA6, "Whether to support Java6 with the Jersey1 library. This option has been deprecated and will be removed in the 5.x release"));
|
||||||
cliOptions.add(CliOption.newBoolean(USE_BEANVALIDATION, "Use BeanValidation API annotations"));
|
cliOptions.add(CliOption.newBoolean(USE_BEANVALIDATION, "Use BeanValidation API annotations"));
|
||||||
cliOptions.add(CliOption.newBoolean(PERFORM_BEANVALIDATION, "Perform BeanValidation"));
|
cliOptions.add(CliOption.newBoolean(PERFORM_BEANVALIDATION, "Perform BeanValidation"));
|
||||||
@ -470,6 +470,7 @@ public class JavaClientCodegen extends AbstractJavaCodegen
|
|||||||
apiTemplateFiles.remove("api.mustache");
|
apiTemplateFiles.remove("api.mustache");
|
||||||
|
|
||||||
if (PLAY_24.equals(playVersion)) {
|
if (PLAY_24.equals(playVersion)) {
|
||||||
|
LOGGER.warn("`play24` option has been deprecated and will be removed in the 5.x release. Please use `play26` instead.");
|
||||||
additionalProperties.put(PLAY_24, true);
|
additionalProperties.put(PLAY_24, true);
|
||||||
apiTemplateFiles.put("play24/api.mustache", ".java");
|
apiTemplateFiles.put("play24/api.mustache", ".java");
|
||||||
|
|
||||||
@ -480,6 +481,7 @@ public class JavaClientCodegen extends AbstractJavaCodegen
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (PLAY_25.equals(playVersion)) {
|
if (PLAY_25.equals(playVersion)) {
|
||||||
|
LOGGER.warn("`play25` option has been deprecated and will be removed in the 5.x release. Please use `play26` instead.");
|
||||||
additionalProperties.put(PLAY_25, true);
|
additionalProperties.put(PLAY_25, true);
|
||||||
apiTemplateFiles.put("play25/api.mustache", ".java");
|
apiTemplateFiles.put("play25/api.mustache", ".java");
|
||||||
|
|
||||||
|
1
pom.xml
1
pom.xml
@ -1262,7 +1262,6 @@
|
|||||||
<module>samples/client/petstore/java/retrofit2</module>
|
<module>samples/client/petstore/java/retrofit2</module>
|
||||||
<module>samples/client/petstore/java/retrofit2rx2</module>
|
<module>samples/client/petstore/java/retrofit2rx2</module>
|
||||||
<module>samples/client/petstore/java/retrofit2rx3</module>
|
<module>samples/client/petstore/java/retrofit2rx3</module>
|
||||||
<module>samples/client/petstore/java/retrofit2-play25</module>
|
|
||||||
<module>samples/client/petstore/java/retrofit2-play26</module>
|
<module>samples/client/petstore/java/retrofit2-play26</module>
|
||||||
<module>samples/client/petstore/jaxrs-cxf-client</module>
|
<module>samples/client/petstore/jaxrs-cxf-client</module>
|
||||||
<module>samples/client/petstore/java/resttemplate</module>
|
<module>samples/client/petstore/java/resttemplate</module>
|
||||||
|
@ -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
|
|
@ -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
|
|
@ -1,131 +0,0 @@
|
|||||||
.gitignore
|
|
||||||
.travis.yml
|
|
||||||
README.md
|
|
||||||
api/openapi.yaml
|
|
||||||
build.gradle
|
|
||||||
build.sbt
|
|
||||||
docs/AdditionalPropertiesAnyType.md
|
|
||||||
docs/AdditionalPropertiesArray.md
|
|
||||||
docs/AdditionalPropertiesBoolean.md
|
|
||||||
docs/AdditionalPropertiesClass.md
|
|
||||||
docs/AdditionalPropertiesInteger.md
|
|
||||||
docs/AdditionalPropertiesNumber.md
|
|
||||||
docs/AdditionalPropertiesObject.md
|
|
||||||
docs/AdditionalPropertiesString.md
|
|
||||||
docs/Animal.md
|
|
||||||
docs/AnotherFakeApi.md
|
|
||||||
docs/ArrayOfArrayOfNumberOnly.md
|
|
||||||
docs/ArrayOfNumberOnly.md
|
|
||||||
docs/ArrayTest.md
|
|
||||||
docs/BigCat.md
|
|
||||||
docs/BigCatAllOf.md
|
|
||||||
docs/Capitalization.md
|
|
||||||
docs/Cat.md
|
|
||||||
docs/CatAllOf.md
|
|
||||||
docs/Category.md
|
|
||||||
docs/ClassModel.md
|
|
||||||
docs/Client.md
|
|
||||||
docs/Dog.md
|
|
||||||
docs/DogAllOf.md
|
|
||||||
docs/EnumArrays.md
|
|
||||||
docs/EnumClass.md
|
|
||||||
docs/EnumTest.md
|
|
||||||
docs/FakeApi.md
|
|
||||||
docs/FakeClassnameTags123Api.md
|
|
||||||
docs/FileSchemaTestClass.md
|
|
||||||
docs/FormatTest.md
|
|
||||||
docs/HasOnlyReadOnly.md
|
|
||||||
docs/MapTest.md
|
|
||||||
docs/MixedPropertiesAndAdditionalPropertiesClass.md
|
|
||||||
docs/Model200Response.md
|
|
||||||
docs/ModelApiResponse.md
|
|
||||||
docs/ModelReturn.md
|
|
||||||
docs/Name.md
|
|
||||||
docs/NumberOnly.md
|
|
||||||
docs/Order.md
|
|
||||||
docs/OuterComposite.md
|
|
||||||
docs/OuterEnum.md
|
|
||||||
docs/Pet.md
|
|
||||||
docs/PetApi.md
|
|
||||||
docs/ReadOnlyFirst.md
|
|
||||||
docs/SpecialModelName.md
|
|
||||||
docs/StoreApi.md
|
|
||||||
docs/Tag.md
|
|
||||||
docs/TypeHolderDefault.md
|
|
||||||
docs/TypeHolderExample.md
|
|
||||||
docs/User.md
|
|
||||||
docs/UserApi.md
|
|
||||||
docs/XmlItem.md
|
|
||||||
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/ApiClient.java
|
|
||||||
src/main/java/org/openapitools/client/CollectionFormats.java
|
|
||||||
src/main/java/org/openapitools/client/Pair.java
|
|
||||||
src/main/java/org/openapitools/client/Play24CallAdapterFactory.java
|
|
||||||
src/main/java/org/openapitools/client/Play24CallFactory.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/Authentication.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
|
|
@ -1 +0,0 @@
|
|||||||
5.0.0-SNAPSHOT
|
|
@ -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
|
|
@ -1,39 +0,0 @@
|
|||||||
# petstore-java-client-retrofit2-play24
|
|
||||||
|
|
||||||
## 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
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.openapitools</groupId>
|
|
||||||
<artifactId>petstore-java-client-retrofit2-play24</artifactId>
|
|
||||||
<version>1.0.0</version>
|
|
||||||
<scope>compile</scope>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
```
|
|
||||||
|
|
||||||
## Author
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
@ -1,126 +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_8
|
|
||||||
targetCompatibility JavaVersion.VERSION_1_8
|
|
||||||
}
|
|
||||||
|
|
||||||
// Rename the aar correctly
|
|
||||||
libraryVariants.all { variant ->
|
|
||||||
variant.outputs.each { output ->
|
|
||||||
def outputFile = output.outputFile
|
|
||||||
if (outputFile != null && outputFile.name.endsWith('.aar')) {
|
|
||||||
def fileName = "${project.name}-${variant.baseName}-${version}.aar"
|
|
||||||
output.outputFile = new File(outputFile.parent, fileName)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
dependencies {
|
|
||||||
provided 'javax.annotation:jsr250-api:1.0'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
afterEvaluate {
|
|
||||||
android.libraryVariants.all { variant ->
|
|
||||||
def task = project.tasks.create "jar${variant.name.capitalize()}", Jar
|
|
||||||
task.description = "Create jar artifact for ${variant.name}"
|
|
||||||
task.dependsOn variant.javaCompile
|
|
||||||
task.from variant.javaCompile.destinationDir
|
|
||||||
task.destinationDir = project.file("${project.buildDir}/outputs/jar")
|
|
||||||
task.archiveName = "${project.name}-${variant.baseName}-${version}.jar"
|
|
||||||
artifacts.add('archives', task);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
task sourcesJar(type: Jar) {
|
|
||||||
from android.sourceSets.main.java.srcDirs
|
|
||||||
classifier = 'sources'
|
|
||||||
}
|
|
||||||
|
|
||||||
artifacts {
|
|
||||||
archives sourcesJar
|
|
||||||
}
|
|
||||||
|
|
||||||
} else {
|
|
||||||
|
|
||||||
apply plugin: 'java'
|
|
||||||
apply plugin: 'maven'
|
|
||||||
|
|
||||||
sourceCompatibility = JavaVersion.VERSION_1_8
|
|
||||||
targetCompatibility = JavaVersion.VERSION_1_8
|
|
||||||
|
|
||||||
install {
|
|
||||||
repositories.mavenInstaller {
|
|
||||||
pom.artifactId = 'petstore-java-client-retrofit2-play24'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
task execute(type:JavaExec) {
|
|
||||||
main = System.getProperty('mainClass')
|
|
||||||
classpath = sourceSets.main.runtimeClasspath
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ext {
|
|
||||||
oltu_version = "1.0.1"
|
|
||||||
retrofit_version = "2.3.0"
|
|
||||||
jackson_version = "2.6.6"
|
|
||||||
play_version = "2.4.11"
|
|
||||||
swagger_annotations_version = "1.5.22"
|
|
||||||
junit_version = "4.13"
|
|
||||||
json_fire_version = "1.8.0"
|
|
||||||
}
|
|
||||||
|
|
||||||
dependencies {
|
|
||||||
compile "com.squareup.retrofit2:retrofit:$retrofit_version"
|
|
||||||
compile "com.squareup.retrofit2:converter-scalars:$retrofit_version"
|
|
||||||
compile "com.squareup.retrofit2:converter-gson:$retrofit_version"
|
|
||||||
compile "io.swagger:swagger-annotations:$swagger_annotations_version"
|
|
||||||
compile "com.google.code.findbugs:jsr305:3.0.2"
|
|
||||||
compile ("org.apache.oltu.oauth2:org.apache.oltu.oauth2.client:$oltu_version"){
|
|
||||||
exclude group:'org.apache.oltu.oauth2' , module: 'org.apache.oltu.oauth2.common'
|
|
||||||
}
|
|
||||||
compile "io.gsonfire:gson-fire:$json_fire_version"
|
|
||||||
compile "com.typesafe.play:play-java-ws_2.11:$play_version"
|
|
||||||
compile "com.squareup.retrofit2:converter-jackson:$retrofit_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.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jackson_version"
|
|
||||||
compile 'javax.annotation:javax.annotation-api:1.3.2'
|
|
||||||
testCompile "junit:junit:$junit_version"
|
|
||||||
}
|
|
@ -1,26 +0,0 @@
|
|||||||
lazy val root = (project in file(".")).
|
|
||||||
settings(
|
|
||||||
organization := "org.openapitools",
|
|
||||||
name := "petstore-java-client-retrofit2-play24",
|
|
||||||
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(
|
|
||||||
"com.squareup.retrofit2" % "retrofit" % "2.3.0" % "compile",
|
|
||||||
"com.squareup.retrofit2" % "converter-scalars" % "2.3.0" % "compile",
|
|
||||||
"com.typesafe.play" % "play-java-ws_2.11" % "2.4.11" % "compile",
|
|
||||||
"com.fasterxml.jackson.core" % "jackson-core" % "2.6.6" % "compile",
|
|
||||||
"com.fasterxml.jackson.core" % "jackson-annotations" % "2.6.6" % "compile",
|
|
||||||
"com.fasterxml.jackson.core" % "jackson-databind" % "2.6.6" % "compile",
|
|
||||||
"com.squareup.retrofit2" % "converter-jackson" % "2.3.0" % "compile",
|
|
||||||
"io.swagger" % "swagger-annotations" % "1.5.21" % "compile",
|
|
||||||
"org.apache.oltu.oauth2" % "org.apache.oltu.oauth2.client" % "1.0.1" % "compile",
|
|
||||||
"io.gsonfire" % "gson-fire" % "1.8.0" % "compile",
|
|
||||||
"javax.annotation" % "javax.annotation-api" % "1.3.2" % "compile",
|
|
||||||
"junit" % "junit" % "4.13" % "test",
|
|
||||||
"com.novocode" % "junit-interface" % "0.11" % "test"
|
|
||||||
)
|
|
||||||
)
|
|
@ -1,12 +0,0 @@
|
|||||||
|
|
||||||
|
|
||||||
# AdditionalPropertiesAnyType
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
**name** | **String** | | [optional]
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1,12 +0,0 @@
|
|||||||
|
|
||||||
|
|
||||||
# AdditionalPropertiesArray
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
**name** | **String** | | [optional]
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1,12 +0,0 @@
|
|||||||
|
|
||||||
|
|
||||||
# AdditionalPropertiesBoolean
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
**name** | **String** | | [optional]
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1,22 +0,0 @@
|
|||||||
|
|
||||||
|
|
||||||
# AdditionalPropertiesClass
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
**mapString** | **Map<String, String>** | | [optional]
|
|
||||||
**mapNumber** | [**Map<String, BigDecimal>**](BigDecimal.md) | | [optional]
|
|
||||||
**mapInteger** | **Map<String, Integer>** | | [optional]
|
|
||||||
**mapBoolean** | **Map<String, Boolean>** | | [optional]
|
|
||||||
**mapArrayInteger** | [**Map<String, List<Integer>>**](List.md) | | [optional]
|
|
||||||
**mapArrayAnytype** | [**Map<String, List<Object>>**](List.md) | | [optional]
|
|
||||||
**mapMapString** | [**Map<String, Map<String, String>>**](Map.md) | | [optional]
|
|
||||||
**mapMapAnytype** | [**Map<String, Map<String, Object>>**](Map.md) | | [optional]
|
|
||||||
**anytype1** | **Object** | | [optional]
|
|
||||||
**anytype2** | **Object** | | [optional]
|
|
||||||
**anytype3** | **Object** | | [optional]
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1,12 +0,0 @@
|
|||||||
|
|
||||||
|
|
||||||
# AdditionalPropertiesInteger
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
**name** | **String** | | [optional]
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1,12 +0,0 @@
|
|||||||
|
|
||||||
|
|
||||||
# AdditionalPropertiesNumber
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
**name** | **String** | | [optional]
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1,12 +0,0 @@
|
|||||||
|
|
||||||
|
|
||||||
# AdditionalPropertiesObject
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
**name** | **String** | | [optional]
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1,12 +0,0 @@
|
|||||||
|
|
||||||
|
|
||||||
# AdditionalPropertiesString
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
**name** | **String** | | [optional]
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1,13 +0,0 @@
|
|||||||
|
|
||||||
|
|
||||||
# Animal
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
**className** | **String** | |
|
|
||||||
**color** | **String** | | [optional]
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1,9 +0,0 @@
|
|||||||
|
|
||||||
# AnimalFarm
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1,74 +0,0 @@
|
|||||||
# AnotherFakeApi
|
|
||||||
|
|
||||||
All URIs are relative to *http://petstore.swagger.io:80/v2*
|
|
||||||
|
|
||||||
Method | HTTP request | Description
|
|
||||||
------------- | ------------- | -------------
|
|
||||||
[**call123testSpecialTags**](AnotherFakeApi.md#call123testSpecialTags) | **PATCH** another-fake/dummy | To test special tags
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## call123testSpecialTags
|
|
||||||
|
|
||||||
> Client call123testSpecialTags(body)
|
|
||||||
|
|
||||||
To test special tags
|
|
||||||
|
|
||||||
To test special tags and operation ID starting with number
|
|
||||||
|
|
||||||
### Example
|
|
||||||
|
|
||||||
```java
|
|
||||||
// Import classes:
|
|
||||||
import org.openapitools.client.ApiClient;
|
|
||||||
import org.openapitools.client.ApiException;
|
|
||||||
import org.openapitools.client.Configuration;
|
|
||||||
import org.openapitools.client.models.*;
|
|
||||||
import org.openapitools.client.api.AnotherFakeApi;
|
|
||||||
|
|
||||||
public class Example {
|
|
||||||
public static void main(String[] args) {
|
|
||||||
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
|
||||||
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
|
|
||||||
|
|
||||||
AnotherFakeApi apiInstance = new AnotherFakeApi(defaultClient);
|
|
||||||
Client body = new Client(); // Client | client model
|
|
||||||
try {
|
|
||||||
Client result = apiInstance.call123testSpecialTags(body);
|
|
||||||
System.out.println(result);
|
|
||||||
} catch (ApiException e) {
|
|
||||||
System.err.println("Exception when calling AnotherFakeApi#call123testSpecialTags");
|
|
||||||
System.err.println("Status code: " + e.getCode());
|
|
||||||
System.err.println("Reason: " + e.getResponseBody());
|
|
||||||
System.err.println("Response headers: " + e.getResponseHeaders());
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
### Parameters
|
|
||||||
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------- | ------------- | ------------- | -------------
|
|
||||||
**body** | [**Client**](Client.md)| client model |
|
|
||||||
|
|
||||||
### Return type
|
|
||||||
|
|
||||||
[**Client**](Client.md)
|
|
||||||
|
|
||||||
### Authorization
|
|
||||||
|
|
||||||
No authorization required
|
|
||||||
|
|
||||||
### HTTP request headers
|
|
||||||
|
|
||||||
- **Content-Type**: application/json
|
|
||||||
- **Accept**: application/json
|
|
||||||
|
|
||||||
### HTTP response details
|
|
||||||
| Status code | Description | Response headers |
|
|
||||||
|-------------|-------------|------------------|
|
|
||||||
| **200** | successful operation | - |
|
|
||||||
|
|
@ -1,12 +0,0 @@
|
|||||||
|
|
||||||
|
|
||||||
# ArrayOfArrayOfNumberOnly
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
**arrayArrayNumber** | [**List<List<BigDecimal>>**](List.md) | | [optional]
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1,12 +0,0 @@
|
|||||||
|
|
||||||
|
|
||||||
# ArrayOfNumberOnly
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
**arrayNumber** | [**List<BigDecimal>**](BigDecimal.md) | | [optional]
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1,14 +0,0 @@
|
|||||||
|
|
||||||
|
|
||||||
# ArrayTest
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
**arrayOfString** | **List<String>** | | [optional]
|
|
||||||
**arrayArrayOfInteger** | [**List<List<Long>>**](List.md) | | [optional]
|
|
||||||
**arrayArrayOfModel** | [**List<List<ReadOnlyFirst>>**](List.md) | | [optional]
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1,23 +0,0 @@
|
|||||||
|
|
||||||
|
|
||||||
# BigCat
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
**kind** | [**KindEnum**](#KindEnum) | | [optional]
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Enum: KindEnum
|
|
||||||
|
|
||||||
Name | Value
|
|
||||||
---- | -----
|
|
||||||
LIONS | "lions"
|
|
||||||
TIGERS | "tigers"
|
|
||||||
LEOPARDS | "leopards"
|
|
||||||
JAGUARS | "jaguars"
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1,23 +0,0 @@
|
|||||||
|
|
||||||
|
|
||||||
# BigCatAllOf
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
**kind** | [**KindEnum**](#KindEnum) | | [optional]
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Enum: KindEnum
|
|
||||||
|
|
||||||
Name | Value
|
|
||||||
---- | -----
|
|
||||||
LIONS | "lions"
|
|
||||||
TIGERS | "tigers"
|
|
||||||
LEOPARDS | "leopards"
|
|
||||||
JAGUARS | "jaguars"
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1,17 +0,0 @@
|
|||||||
|
|
||||||
|
|
||||||
# Capitalization
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
**smallCamel** | **String** | | [optional]
|
|
||||||
**capitalCamel** | **String** | | [optional]
|
|
||||||
**smallSnake** | **String** | | [optional]
|
|
||||||
**capitalSnake** | **String** | | [optional]
|
|
||||||
**scAETHFlowPoints** | **String** | | [optional]
|
|
||||||
**ATT_NAME** | **String** | Name of the pet | [optional]
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1,12 +0,0 @@
|
|||||||
|
|
||||||
|
|
||||||
# Cat
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
**declawed** | **Boolean** | | [optional]
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1,12 +0,0 @@
|
|||||||
|
|
||||||
|
|
||||||
# CatAllOf
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
**declawed** | **Boolean** | | [optional]
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1,13 +0,0 @@
|
|||||||
|
|
||||||
|
|
||||||
# Category
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
**id** | **Long** | | [optional]
|
|
||||||
**name** | **String** | |
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1,13 +0,0 @@
|
|||||||
|
|
||||||
|
|
||||||
# ClassModel
|
|
||||||
|
|
||||||
Model for testing model with \"_class\" property
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
**propertyClass** | **String** | | [optional]
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1,12 +0,0 @@
|
|||||||
|
|
||||||
|
|
||||||
# Client
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
**client** | **String** | | [optional]
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1,12 +0,0 @@
|
|||||||
|
|
||||||
|
|
||||||
# Dog
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
**breed** | **String** | | [optional]
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1,12 +0,0 @@
|
|||||||
|
|
||||||
|
|
||||||
# DogAllOf
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
**breed** | **String** | | [optional]
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1,31 +0,0 @@
|
|||||||
|
|
||||||
|
|
||||||
# EnumArrays
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
**justSymbol** | [**JustSymbolEnum**](#JustSymbolEnum) | | [optional]
|
|
||||||
**arrayEnum** | [**List<ArrayEnumEnum>**](#List<ArrayEnumEnum>) | | [optional]
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Enum: JustSymbolEnum
|
|
||||||
|
|
||||||
Name | Value
|
|
||||||
---- | -----
|
|
||||||
GREATER_THAN_OR_EQUAL_TO | ">="
|
|
||||||
DOLLAR | "$"
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Enum: List<ArrayEnumEnum>
|
|
||||||
|
|
||||||
Name | Value
|
|
||||||
---- | -----
|
|
||||||
FISH | "fish"
|
|
||||||
CRAB | "crab"
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1,15 +0,0 @@
|
|||||||
|
|
||||||
|
|
||||||
# EnumClass
|
|
||||||
|
|
||||||
## Enum
|
|
||||||
|
|
||||||
|
|
||||||
* `_ABC` (value: `"_abc"`)
|
|
||||||
|
|
||||||
* `_EFG` (value: `"-efg"`)
|
|
||||||
|
|
||||||
* `_XYZ_` (value: `"(xyz)"`)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1,54 +0,0 @@
|
|||||||
|
|
||||||
|
|
||||||
# EnumTest
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
**enumString** | [**EnumStringEnum**](#EnumStringEnum) | | [optional]
|
|
||||||
**enumStringRequired** | [**EnumStringRequiredEnum**](#EnumStringRequiredEnum) | |
|
|
||||||
**enumInteger** | [**EnumIntegerEnum**](#EnumIntegerEnum) | | [optional]
|
|
||||||
**enumNumber** | [**EnumNumberEnum**](#EnumNumberEnum) | | [optional]
|
|
||||||
**outerEnum** | [**OuterEnum**](OuterEnum.md) | | [optional]
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Enum: EnumStringEnum
|
|
||||||
|
|
||||||
Name | Value
|
|
||||||
---- | -----
|
|
||||||
UPPER | "UPPER"
|
|
||||||
LOWER | "lower"
|
|
||||||
EMPTY | ""
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Enum: EnumStringRequiredEnum
|
|
||||||
|
|
||||||
Name | Value
|
|
||||||
---- | -----
|
|
||||||
UPPER | "UPPER"
|
|
||||||
LOWER | "lower"
|
|
||||||
EMPTY | ""
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Enum: EnumIntegerEnum
|
|
||||||
|
|
||||||
Name | Value
|
|
||||||
---- | -----
|
|
||||||
NUMBER_1 | 1
|
|
||||||
NUMBER_MINUS_1 | -1
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Enum: EnumNumberEnum
|
|
||||||
|
|
||||||
Name | Value
|
|
||||||
---- | -----
|
|
||||||
NUMBER_1_DOT_1 | 1.1
|
|
||||||
NUMBER_MINUS_1_DOT_2 | -1.2
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1,987 +0,0 @@
|
|||||||
# FakeApi
|
|
||||||
|
|
||||||
All URIs are relative to *http://petstore.swagger.io:80/v2*
|
|
||||||
|
|
||||||
Method | HTTP request | Description
|
|
||||||
------------- | ------------- | -------------
|
|
||||||
[**createXmlItem**](FakeApi.md#createXmlItem) | **POST** fake/create_xml_item | creates an XmlItem
|
|
||||||
[**fakeOuterBooleanSerialize**](FakeApi.md#fakeOuterBooleanSerialize) | **POST** fake/outer/boolean |
|
|
||||||
[**fakeOuterCompositeSerialize**](FakeApi.md#fakeOuterCompositeSerialize) | **POST** fake/outer/composite |
|
|
||||||
[**fakeOuterNumberSerialize**](FakeApi.md#fakeOuterNumberSerialize) | **POST** fake/outer/number |
|
|
||||||
[**fakeOuterStringSerialize**](FakeApi.md#fakeOuterStringSerialize) | **POST** fake/outer/string |
|
|
||||||
[**testBodyWithFileSchema**](FakeApi.md#testBodyWithFileSchema) | **PUT** fake/body-with-file-schema |
|
|
||||||
[**testBodyWithQueryParams**](FakeApi.md#testBodyWithQueryParams) | **PUT** fake/body-with-query-params |
|
|
||||||
[**testClientModel**](FakeApi.md#testClientModel) | **PATCH** fake | To test \"client\" model
|
|
||||||
[**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
|
||||||
[**testEnumParameters**](FakeApi.md#testEnumParameters) | **GET** fake | To test enum parameters
|
|
||||||
[**testGroupParameters**](FakeApi.md#testGroupParameters) | **DELETE** fake | Fake endpoint to test group parameters (optional)
|
|
||||||
[**testInlineAdditionalProperties**](FakeApi.md#testInlineAdditionalProperties) | **POST** fake/inline-additionalProperties | test inline additionalProperties
|
|
||||||
[**testJsonFormData**](FakeApi.md#testJsonFormData) | **GET** fake/jsonFormData | test json serialization of form data
|
|
||||||
[**testQueryParameterCollectionFormat**](FakeApi.md#testQueryParameterCollectionFormat) | **PUT** fake/test-query-paramters |
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## createXmlItem
|
|
||||||
|
|
||||||
> createXmlItem(xmlItem)
|
|
||||||
|
|
||||||
creates an XmlItem
|
|
||||||
|
|
||||||
this route creates an XmlItem
|
|
||||||
|
|
||||||
### Example
|
|
||||||
|
|
||||||
```java
|
|
||||||
// Import classes:
|
|
||||||
import org.openapitools.client.ApiClient;
|
|
||||||
import org.openapitools.client.ApiException;
|
|
||||||
import org.openapitools.client.Configuration;
|
|
||||||
import org.openapitools.client.models.*;
|
|
||||||
import org.openapitools.client.api.FakeApi;
|
|
||||||
|
|
||||||
public class Example {
|
|
||||||
public static void main(String[] args) {
|
|
||||||
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
|
||||||
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
|
|
||||||
|
|
||||||
FakeApi apiInstance = new FakeApi(defaultClient);
|
|
||||||
XmlItem xmlItem = new XmlItem(); // XmlItem | XmlItem Body
|
|
||||||
try {
|
|
||||||
apiInstance.createXmlItem(xmlItem);
|
|
||||||
} catch (ApiException e) {
|
|
||||||
System.err.println("Exception when calling FakeApi#createXmlItem");
|
|
||||||
System.err.println("Status code: " + e.getCode());
|
|
||||||
System.err.println("Reason: " + e.getResponseBody());
|
|
||||||
System.err.println("Response headers: " + e.getResponseHeaders());
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
### Parameters
|
|
||||||
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------- | ------------- | ------------- | -------------
|
|
||||||
**xmlItem** | [**XmlItem**](XmlItem.md)| XmlItem Body |
|
|
||||||
|
|
||||||
### Return type
|
|
||||||
|
|
||||||
null (empty response body)
|
|
||||||
|
|
||||||
### Authorization
|
|
||||||
|
|
||||||
No authorization required
|
|
||||||
|
|
||||||
### HTTP request headers
|
|
||||||
|
|
||||||
- **Content-Type**: application/xml, application/xml; charset=utf-8, application/xml; charset=utf-16, text/xml, text/xml; charset=utf-8, text/xml; charset=utf-16
|
|
||||||
- **Accept**: Not defined
|
|
||||||
|
|
||||||
### HTTP response details
|
|
||||||
| Status code | Description | Response headers |
|
|
||||||
|-------------|-------------|------------------|
|
|
||||||
| **200** | successful operation | - |
|
|
||||||
|
|
||||||
|
|
||||||
## fakeOuterBooleanSerialize
|
|
||||||
|
|
||||||
> Boolean fakeOuterBooleanSerialize(body)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Test serialization of outer boolean types
|
|
||||||
|
|
||||||
### Example
|
|
||||||
|
|
||||||
```java
|
|
||||||
// Import classes:
|
|
||||||
import org.openapitools.client.ApiClient;
|
|
||||||
import org.openapitools.client.ApiException;
|
|
||||||
import org.openapitools.client.Configuration;
|
|
||||||
import org.openapitools.client.models.*;
|
|
||||||
import org.openapitools.client.api.FakeApi;
|
|
||||||
|
|
||||||
public class Example {
|
|
||||||
public static void main(String[] args) {
|
|
||||||
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
|
||||||
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
|
|
||||||
|
|
||||||
FakeApi apiInstance = new FakeApi(defaultClient);
|
|
||||||
Boolean body = true; // Boolean | Input boolean as post body
|
|
||||||
try {
|
|
||||||
Boolean result = apiInstance.fakeOuterBooleanSerialize(body);
|
|
||||||
System.out.println(result);
|
|
||||||
} catch (ApiException e) {
|
|
||||||
System.err.println("Exception when calling FakeApi#fakeOuterBooleanSerialize");
|
|
||||||
System.err.println("Status code: " + e.getCode());
|
|
||||||
System.err.println("Reason: " + e.getResponseBody());
|
|
||||||
System.err.println("Response headers: " + e.getResponseHeaders());
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
### Parameters
|
|
||||||
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------- | ------------- | ------------- | -------------
|
|
||||||
**body** | **Boolean**| Input boolean as post body | [optional]
|
|
||||||
|
|
||||||
### Return type
|
|
||||||
|
|
||||||
**Boolean**
|
|
||||||
|
|
||||||
### Authorization
|
|
||||||
|
|
||||||
No authorization required
|
|
||||||
|
|
||||||
### HTTP request headers
|
|
||||||
|
|
||||||
- **Content-Type**: Not defined
|
|
||||||
- **Accept**: */*
|
|
||||||
|
|
||||||
### HTTP response details
|
|
||||||
| Status code | Description | Response headers |
|
|
||||||
|-------------|-------------|------------------|
|
|
||||||
| **200** | Output boolean | - |
|
|
||||||
|
|
||||||
|
|
||||||
## fakeOuterCompositeSerialize
|
|
||||||
|
|
||||||
> OuterComposite fakeOuterCompositeSerialize(body)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Test serialization of object with outer number type
|
|
||||||
|
|
||||||
### Example
|
|
||||||
|
|
||||||
```java
|
|
||||||
// Import classes:
|
|
||||||
import org.openapitools.client.ApiClient;
|
|
||||||
import org.openapitools.client.ApiException;
|
|
||||||
import org.openapitools.client.Configuration;
|
|
||||||
import org.openapitools.client.models.*;
|
|
||||||
import org.openapitools.client.api.FakeApi;
|
|
||||||
|
|
||||||
public class Example {
|
|
||||||
public static void main(String[] args) {
|
|
||||||
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
|
||||||
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
|
|
||||||
|
|
||||||
FakeApi apiInstance = new FakeApi(defaultClient);
|
|
||||||
OuterComposite body = new OuterComposite(); // OuterComposite | Input composite as post body
|
|
||||||
try {
|
|
||||||
OuterComposite result = apiInstance.fakeOuterCompositeSerialize(body);
|
|
||||||
System.out.println(result);
|
|
||||||
} catch (ApiException e) {
|
|
||||||
System.err.println("Exception when calling FakeApi#fakeOuterCompositeSerialize");
|
|
||||||
System.err.println("Status code: " + e.getCode());
|
|
||||||
System.err.println("Reason: " + e.getResponseBody());
|
|
||||||
System.err.println("Response headers: " + e.getResponseHeaders());
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
### Parameters
|
|
||||||
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------- | ------------- | ------------- | -------------
|
|
||||||
**body** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional]
|
|
||||||
|
|
||||||
### Return type
|
|
||||||
|
|
||||||
[**OuterComposite**](OuterComposite.md)
|
|
||||||
|
|
||||||
### Authorization
|
|
||||||
|
|
||||||
No authorization required
|
|
||||||
|
|
||||||
### HTTP request headers
|
|
||||||
|
|
||||||
- **Content-Type**: Not defined
|
|
||||||
- **Accept**: */*
|
|
||||||
|
|
||||||
### HTTP response details
|
|
||||||
| Status code | Description | Response headers |
|
|
||||||
|-------------|-------------|------------------|
|
|
||||||
| **200** | Output composite | - |
|
|
||||||
|
|
||||||
|
|
||||||
## fakeOuterNumberSerialize
|
|
||||||
|
|
||||||
> BigDecimal fakeOuterNumberSerialize(body)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Test serialization of outer number types
|
|
||||||
|
|
||||||
### Example
|
|
||||||
|
|
||||||
```java
|
|
||||||
// Import classes:
|
|
||||||
import org.openapitools.client.ApiClient;
|
|
||||||
import org.openapitools.client.ApiException;
|
|
||||||
import org.openapitools.client.Configuration;
|
|
||||||
import org.openapitools.client.models.*;
|
|
||||||
import org.openapitools.client.api.FakeApi;
|
|
||||||
|
|
||||||
public class Example {
|
|
||||||
public static void main(String[] args) {
|
|
||||||
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
|
||||||
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
|
|
||||||
|
|
||||||
FakeApi apiInstance = new FakeApi(defaultClient);
|
|
||||||
BigDecimal body = new BigDecimal(); // BigDecimal | Input number as post body
|
|
||||||
try {
|
|
||||||
BigDecimal result = apiInstance.fakeOuterNumberSerialize(body);
|
|
||||||
System.out.println(result);
|
|
||||||
} catch (ApiException e) {
|
|
||||||
System.err.println("Exception when calling FakeApi#fakeOuterNumberSerialize");
|
|
||||||
System.err.println("Status code: " + e.getCode());
|
|
||||||
System.err.println("Reason: " + e.getResponseBody());
|
|
||||||
System.err.println("Response headers: " + e.getResponseHeaders());
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
### Parameters
|
|
||||||
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------- | ------------- | ------------- | -------------
|
|
||||||
**body** | **BigDecimal**| Input number as post body | [optional]
|
|
||||||
|
|
||||||
### Return type
|
|
||||||
|
|
||||||
[**BigDecimal**](BigDecimal.md)
|
|
||||||
|
|
||||||
### Authorization
|
|
||||||
|
|
||||||
No authorization required
|
|
||||||
|
|
||||||
### HTTP request headers
|
|
||||||
|
|
||||||
- **Content-Type**: Not defined
|
|
||||||
- **Accept**: */*
|
|
||||||
|
|
||||||
### HTTP response details
|
|
||||||
| Status code | Description | Response headers |
|
|
||||||
|-------------|-------------|------------------|
|
|
||||||
| **200** | Output number | - |
|
|
||||||
|
|
||||||
|
|
||||||
## fakeOuterStringSerialize
|
|
||||||
|
|
||||||
> String fakeOuterStringSerialize(body)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Test serialization of outer string types
|
|
||||||
|
|
||||||
### Example
|
|
||||||
|
|
||||||
```java
|
|
||||||
// Import classes:
|
|
||||||
import org.openapitools.client.ApiClient;
|
|
||||||
import org.openapitools.client.ApiException;
|
|
||||||
import org.openapitools.client.Configuration;
|
|
||||||
import org.openapitools.client.models.*;
|
|
||||||
import org.openapitools.client.api.FakeApi;
|
|
||||||
|
|
||||||
public class Example {
|
|
||||||
public static void main(String[] args) {
|
|
||||||
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
|
||||||
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
|
|
||||||
|
|
||||||
FakeApi apiInstance = new FakeApi(defaultClient);
|
|
||||||
String body = "body_example"; // String | Input string as post body
|
|
||||||
try {
|
|
||||||
String result = apiInstance.fakeOuterStringSerialize(body);
|
|
||||||
System.out.println(result);
|
|
||||||
} catch (ApiException e) {
|
|
||||||
System.err.println("Exception when calling FakeApi#fakeOuterStringSerialize");
|
|
||||||
System.err.println("Status code: " + e.getCode());
|
|
||||||
System.err.println("Reason: " + e.getResponseBody());
|
|
||||||
System.err.println("Response headers: " + e.getResponseHeaders());
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
### Parameters
|
|
||||||
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------- | ------------- | ------------- | -------------
|
|
||||||
**body** | **String**| Input string as post body | [optional]
|
|
||||||
|
|
||||||
### Return type
|
|
||||||
|
|
||||||
**String**
|
|
||||||
|
|
||||||
### Authorization
|
|
||||||
|
|
||||||
No authorization required
|
|
||||||
|
|
||||||
### HTTP request headers
|
|
||||||
|
|
||||||
- **Content-Type**: Not defined
|
|
||||||
- **Accept**: */*
|
|
||||||
|
|
||||||
### HTTP response details
|
|
||||||
| Status code | Description | Response headers |
|
|
||||||
|-------------|-------------|------------------|
|
|
||||||
| **200** | Output string | - |
|
|
||||||
|
|
||||||
|
|
||||||
## testBodyWithFileSchema
|
|
||||||
|
|
||||||
> testBodyWithFileSchema(body)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
For this test, the body for this request much reference a schema named `File`.
|
|
||||||
|
|
||||||
### Example
|
|
||||||
|
|
||||||
```java
|
|
||||||
// Import classes:
|
|
||||||
import org.openapitools.client.ApiClient;
|
|
||||||
import org.openapitools.client.ApiException;
|
|
||||||
import org.openapitools.client.Configuration;
|
|
||||||
import org.openapitools.client.models.*;
|
|
||||||
import org.openapitools.client.api.FakeApi;
|
|
||||||
|
|
||||||
public class Example {
|
|
||||||
public static void main(String[] args) {
|
|
||||||
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
|
||||||
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
|
|
||||||
|
|
||||||
FakeApi apiInstance = new FakeApi(defaultClient);
|
|
||||||
FileSchemaTestClass body = new FileSchemaTestClass(); // FileSchemaTestClass |
|
|
||||||
try {
|
|
||||||
apiInstance.testBodyWithFileSchema(body);
|
|
||||||
} catch (ApiException e) {
|
|
||||||
System.err.println("Exception when calling FakeApi#testBodyWithFileSchema");
|
|
||||||
System.err.println("Status code: " + e.getCode());
|
|
||||||
System.err.println("Reason: " + e.getResponseBody());
|
|
||||||
System.err.println("Response headers: " + e.getResponseHeaders());
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
### Parameters
|
|
||||||
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------- | ------------- | ------------- | -------------
|
|
||||||
**body** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| |
|
|
||||||
|
|
||||||
### Return type
|
|
||||||
|
|
||||||
null (empty response body)
|
|
||||||
|
|
||||||
### Authorization
|
|
||||||
|
|
||||||
No authorization required
|
|
||||||
|
|
||||||
### HTTP request headers
|
|
||||||
|
|
||||||
- **Content-Type**: application/json
|
|
||||||
- **Accept**: Not defined
|
|
||||||
|
|
||||||
### HTTP response details
|
|
||||||
| Status code | Description | Response headers |
|
|
||||||
|-------------|-------------|------------------|
|
|
||||||
| **200** | Success | - |
|
|
||||||
|
|
||||||
|
|
||||||
## testBodyWithQueryParams
|
|
||||||
|
|
||||||
> testBodyWithQueryParams(query, body)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
### Example
|
|
||||||
|
|
||||||
```java
|
|
||||||
// Import classes:
|
|
||||||
import org.openapitools.client.ApiClient;
|
|
||||||
import org.openapitools.client.ApiException;
|
|
||||||
import org.openapitools.client.Configuration;
|
|
||||||
import org.openapitools.client.models.*;
|
|
||||||
import org.openapitools.client.api.FakeApi;
|
|
||||||
|
|
||||||
public class Example {
|
|
||||||
public static void main(String[] args) {
|
|
||||||
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
|
||||||
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
|
|
||||||
|
|
||||||
FakeApi apiInstance = new FakeApi(defaultClient);
|
|
||||||
String query = "query_example"; // String |
|
|
||||||
User body = new User(); // User |
|
|
||||||
try {
|
|
||||||
apiInstance.testBodyWithQueryParams(query, body);
|
|
||||||
} catch (ApiException e) {
|
|
||||||
System.err.println("Exception when calling FakeApi#testBodyWithQueryParams");
|
|
||||||
System.err.println("Status code: " + e.getCode());
|
|
||||||
System.err.println("Reason: " + e.getResponseBody());
|
|
||||||
System.err.println("Response headers: " + e.getResponseHeaders());
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
### Parameters
|
|
||||||
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------- | ------------- | ------------- | -------------
|
|
||||||
**query** | **String**| |
|
|
||||||
**body** | [**User**](User.md)| |
|
|
||||||
|
|
||||||
### Return type
|
|
||||||
|
|
||||||
null (empty response body)
|
|
||||||
|
|
||||||
### Authorization
|
|
||||||
|
|
||||||
No authorization required
|
|
||||||
|
|
||||||
### HTTP request headers
|
|
||||||
|
|
||||||
- **Content-Type**: application/json
|
|
||||||
- **Accept**: Not defined
|
|
||||||
|
|
||||||
### HTTP response details
|
|
||||||
| Status code | Description | Response headers |
|
|
||||||
|-------------|-------------|------------------|
|
|
||||||
| **200** | Success | - |
|
|
||||||
|
|
||||||
|
|
||||||
## testClientModel
|
|
||||||
|
|
||||||
> Client testClientModel(body)
|
|
||||||
|
|
||||||
To test \"client\" model
|
|
||||||
|
|
||||||
To test \"client\" model
|
|
||||||
|
|
||||||
### Example
|
|
||||||
|
|
||||||
```java
|
|
||||||
// Import classes:
|
|
||||||
import org.openapitools.client.ApiClient;
|
|
||||||
import org.openapitools.client.ApiException;
|
|
||||||
import org.openapitools.client.Configuration;
|
|
||||||
import org.openapitools.client.models.*;
|
|
||||||
import org.openapitools.client.api.FakeApi;
|
|
||||||
|
|
||||||
public class Example {
|
|
||||||
public static void main(String[] args) {
|
|
||||||
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
|
||||||
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
|
|
||||||
|
|
||||||
FakeApi apiInstance = new FakeApi(defaultClient);
|
|
||||||
Client body = new Client(); // Client | client model
|
|
||||||
try {
|
|
||||||
Client result = apiInstance.testClientModel(body);
|
|
||||||
System.out.println(result);
|
|
||||||
} catch (ApiException e) {
|
|
||||||
System.err.println("Exception when calling FakeApi#testClientModel");
|
|
||||||
System.err.println("Status code: " + e.getCode());
|
|
||||||
System.err.println("Reason: " + e.getResponseBody());
|
|
||||||
System.err.println("Response headers: " + e.getResponseHeaders());
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
### Parameters
|
|
||||||
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------- | ------------- | ------------- | -------------
|
|
||||||
**body** | [**Client**](Client.md)| client model |
|
|
||||||
|
|
||||||
### Return type
|
|
||||||
|
|
||||||
[**Client**](Client.md)
|
|
||||||
|
|
||||||
### Authorization
|
|
||||||
|
|
||||||
No authorization required
|
|
||||||
|
|
||||||
### HTTP request headers
|
|
||||||
|
|
||||||
- **Content-Type**: application/json
|
|
||||||
- **Accept**: application/json
|
|
||||||
|
|
||||||
### HTTP response details
|
|
||||||
| Status code | Description | Response headers |
|
|
||||||
|-------------|-------------|------------------|
|
|
||||||
| **200** | successful operation | - |
|
|
||||||
|
|
||||||
|
|
||||||
## testEndpointParameters
|
|
||||||
|
|
||||||
> testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback)
|
|
||||||
|
|
||||||
Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
|
||||||
|
|
||||||
Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
|
||||||
|
|
||||||
### Example
|
|
||||||
|
|
||||||
```java
|
|
||||||
// Import classes:
|
|
||||||
import org.openapitools.client.ApiClient;
|
|
||||||
import org.openapitools.client.ApiException;
|
|
||||||
import org.openapitools.client.Configuration;
|
|
||||||
import org.openapitools.client.auth.*;
|
|
||||||
import org.openapitools.client.models.*;
|
|
||||||
import org.openapitools.client.api.FakeApi;
|
|
||||||
|
|
||||||
public class Example {
|
|
||||||
public static void main(String[] args) {
|
|
||||||
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
|
||||||
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
|
|
||||||
|
|
||||||
// Configure HTTP basic authorization: http_basic_test
|
|
||||||
HttpBasicAuth http_basic_test = (HttpBasicAuth) defaultClient.getAuthentication("http_basic_test");
|
|
||||||
http_basic_test.setUsername("YOUR USERNAME");
|
|
||||||
http_basic_test.setPassword("YOUR PASSWORD");
|
|
||||||
|
|
||||||
FakeApi apiInstance = new FakeApi(defaultClient);
|
|
||||||
BigDecimal number = new BigDecimal(); // BigDecimal | None
|
|
||||||
Double _double = 3.4D; // Double | None
|
|
||||||
String patternWithoutDelimiter = "patternWithoutDelimiter_example"; // String | None
|
|
||||||
byte[] _byte = null; // byte[] | None
|
|
||||||
Integer integer = 56; // Integer | None
|
|
||||||
Integer int32 = 56; // Integer | None
|
|
||||||
Long int64 = 56L; // Long | None
|
|
||||||
Float _float = 3.4F; // Float | None
|
|
||||||
String string = "string_example"; // String | None
|
|
||||||
File binary = new File("/path/to/file"); // File | None
|
|
||||||
LocalDate date = new LocalDate(); // LocalDate | None
|
|
||||||
OffsetDateTime dateTime = new OffsetDateTime(); // OffsetDateTime | None
|
|
||||||
String password = "password_example"; // String | None
|
|
||||||
String paramCallback = "paramCallback_example"; // String | None
|
|
||||||
try {
|
|
||||||
apiInstance.testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback);
|
|
||||||
} catch (ApiException e) {
|
|
||||||
System.err.println("Exception when calling FakeApi#testEndpointParameters");
|
|
||||||
System.err.println("Status code: " + e.getCode());
|
|
||||||
System.err.println("Reason: " + e.getResponseBody());
|
|
||||||
System.err.println("Response headers: " + e.getResponseHeaders());
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
### Parameters
|
|
||||||
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------- | ------------- | ------------- | -------------
|
|
||||||
**number** | **BigDecimal**| None |
|
|
||||||
**_double** | **Double**| None |
|
|
||||||
**patternWithoutDelimiter** | **String**| None |
|
|
||||||
**_byte** | **byte[]**| None |
|
|
||||||
**integer** | **Integer**| None | [optional]
|
|
||||||
**int32** | **Integer**| None | [optional]
|
|
||||||
**int64** | **Long**| None | [optional]
|
|
||||||
**_float** | **Float**| None | [optional]
|
|
||||||
**string** | **String**| None | [optional]
|
|
||||||
**binary** | **File**| None | [optional]
|
|
||||||
**date** | **LocalDate**| None | [optional]
|
|
||||||
**dateTime** | **OffsetDateTime**| None | [optional]
|
|
||||||
**password** | **String**| None | [optional]
|
|
||||||
**paramCallback** | **String**| None | [optional]
|
|
||||||
|
|
||||||
### Return type
|
|
||||||
|
|
||||||
null (empty response body)
|
|
||||||
|
|
||||||
### Authorization
|
|
||||||
|
|
||||||
[http_basic_test](../README.md#http_basic_test)
|
|
||||||
|
|
||||||
### HTTP request headers
|
|
||||||
|
|
||||||
- **Content-Type**: application/x-www-form-urlencoded
|
|
||||||
- **Accept**: Not defined
|
|
||||||
|
|
||||||
### HTTP response details
|
|
||||||
| Status code | Description | Response headers |
|
|
||||||
|-------------|-------------|------------------|
|
|
||||||
| **400** | Invalid username supplied | - |
|
|
||||||
| **404** | User not found | - |
|
|
||||||
|
|
||||||
|
|
||||||
## testEnumParameters
|
|
||||||
|
|
||||||
> testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString)
|
|
||||||
|
|
||||||
To test enum parameters
|
|
||||||
|
|
||||||
To test enum parameters
|
|
||||||
|
|
||||||
### Example
|
|
||||||
|
|
||||||
```java
|
|
||||||
// Import classes:
|
|
||||||
import org.openapitools.client.ApiClient;
|
|
||||||
import org.openapitools.client.ApiException;
|
|
||||||
import org.openapitools.client.Configuration;
|
|
||||||
import org.openapitools.client.models.*;
|
|
||||||
import org.openapitools.client.api.FakeApi;
|
|
||||||
|
|
||||||
public class Example {
|
|
||||||
public static void main(String[] args) {
|
|
||||||
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
|
||||||
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
|
|
||||||
|
|
||||||
FakeApi apiInstance = new FakeApi(defaultClient);
|
|
||||||
List<String> enumHeaderStringArray = Arrays.asList("$"); // List<String> | Header parameter enum test (string array)
|
|
||||||
String enumHeaderString = "-efg"; // String | Header parameter enum test (string)
|
|
||||||
List<String> enumQueryStringArray = Arrays.asList("$"); // List<String> | Query parameter enum test (string array)
|
|
||||||
String enumQueryString = "-efg"; // String | Query parameter enum test (string)
|
|
||||||
Integer enumQueryInteger = 56; // Integer | Query parameter enum test (double)
|
|
||||||
Double enumQueryDouble = 3.4D; // Double | Query parameter enum test (double)
|
|
||||||
List<String> enumFormStringArray = "$"; // List<String> | Form parameter enum test (string array)
|
|
||||||
String enumFormString = "-efg"; // String | Form parameter enum test (string)
|
|
||||||
try {
|
|
||||||
apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString);
|
|
||||||
} catch (ApiException e) {
|
|
||||||
System.err.println("Exception when calling FakeApi#testEnumParameters");
|
|
||||||
System.err.println("Status code: " + e.getCode());
|
|
||||||
System.err.println("Reason: " + e.getResponseBody());
|
|
||||||
System.err.println("Response headers: " + e.getResponseHeaders());
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
### Parameters
|
|
||||||
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------- | ------------- | ------------- | -------------
|
|
||||||
**enumHeaderStringArray** | [**List<String>**](String.md)| Header parameter enum test (string array) | [optional] [enum: >, $]
|
|
||||||
**enumHeaderString** | **String**| Header parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)]
|
|
||||||
**enumQueryStringArray** | [**List<String>**](String.md)| Query parameter enum test (string array) | [optional] [enum: >, $]
|
|
||||||
**enumQueryString** | **String**| Query parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)]
|
|
||||||
**enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, -2]
|
|
||||||
**enumQueryDouble** | **Double**| Query parameter enum test (double) | [optional] [enum: 1.1, -1.2]
|
|
||||||
**enumFormStringArray** | [**List<String>**](String.md)| Form parameter enum test (string array) | [optional] [enum: >, $]
|
|
||||||
**enumFormString** | **String**| Form parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)]
|
|
||||||
|
|
||||||
### Return type
|
|
||||||
|
|
||||||
null (empty response body)
|
|
||||||
|
|
||||||
### Authorization
|
|
||||||
|
|
||||||
No authorization required
|
|
||||||
|
|
||||||
### HTTP request headers
|
|
||||||
|
|
||||||
- **Content-Type**: application/x-www-form-urlencoded
|
|
||||||
- **Accept**: Not defined
|
|
||||||
|
|
||||||
### HTTP response details
|
|
||||||
| Status code | Description | Response headers |
|
|
||||||
|-------------|-------------|------------------|
|
|
||||||
| **400** | Invalid request | - |
|
|
||||||
| **404** | Not found | - |
|
|
||||||
|
|
||||||
|
|
||||||
## testGroupParameters
|
|
||||||
|
|
||||||
> testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group)
|
|
||||||
|
|
||||||
Fake endpoint to test group parameters (optional)
|
|
||||||
|
|
||||||
Fake endpoint to test group parameters (optional)
|
|
||||||
|
|
||||||
### Example
|
|
||||||
|
|
||||||
```java
|
|
||||||
// Import classes:
|
|
||||||
import org.openapitools.client.ApiClient;
|
|
||||||
import org.openapitools.client.ApiException;
|
|
||||||
import org.openapitools.client.Configuration;
|
|
||||||
import org.openapitools.client.models.*;
|
|
||||||
import org.openapitools.client.api.FakeApi;
|
|
||||||
|
|
||||||
public class Example {
|
|
||||||
public static void main(String[] args) {
|
|
||||||
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
|
||||||
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
|
|
||||||
|
|
||||||
FakeApi apiInstance = new FakeApi(defaultClient);
|
|
||||||
Integer requiredStringGroup = 56; // Integer | Required String in group parameters
|
|
||||||
Boolean requiredBooleanGroup = true; // Boolean | Required Boolean in group parameters
|
|
||||||
Long requiredInt64Group = 56L; // Long | Required Integer in group parameters
|
|
||||||
Integer stringGroup = 56; // Integer | String in group parameters
|
|
||||||
Boolean booleanGroup = true; // Boolean | Boolean in group parameters
|
|
||||||
Long int64Group = 56L; // Long | Integer in group parameters
|
|
||||||
try {
|
|
||||||
apiInstance.testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group);
|
|
||||||
} catch (ApiException e) {
|
|
||||||
System.err.println("Exception when calling FakeApi#testGroupParameters");
|
|
||||||
System.err.println("Status code: " + e.getCode());
|
|
||||||
System.err.println("Reason: " + e.getResponseBody());
|
|
||||||
System.err.println("Response headers: " + e.getResponseHeaders());
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
### Parameters
|
|
||||||
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------- | ------------- | ------------- | -------------
|
|
||||||
**requiredStringGroup** | **Integer**| Required String in group parameters |
|
|
||||||
**requiredBooleanGroup** | **Boolean**| Required Boolean in group parameters |
|
|
||||||
**requiredInt64Group** | **Long**| Required Integer in group parameters |
|
|
||||||
**stringGroup** | **Integer**| String in group parameters | [optional]
|
|
||||||
**booleanGroup** | **Boolean**| Boolean in group parameters | [optional]
|
|
||||||
**int64Group** | **Long**| Integer in group parameters | [optional]
|
|
||||||
|
|
||||||
### Return type
|
|
||||||
|
|
||||||
null (empty response body)
|
|
||||||
|
|
||||||
### Authorization
|
|
||||||
|
|
||||||
No authorization required
|
|
||||||
|
|
||||||
### HTTP request headers
|
|
||||||
|
|
||||||
- **Content-Type**: Not defined
|
|
||||||
- **Accept**: Not defined
|
|
||||||
|
|
||||||
### HTTP response details
|
|
||||||
| Status code | Description | Response headers |
|
|
||||||
|-------------|-------------|------------------|
|
|
||||||
| **400** | Someting wrong | - |
|
|
||||||
|
|
||||||
|
|
||||||
## testInlineAdditionalProperties
|
|
||||||
|
|
||||||
> testInlineAdditionalProperties(param)
|
|
||||||
|
|
||||||
test inline additionalProperties
|
|
||||||
|
|
||||||
### Example
|
|
||||||
|
|
||||||
```java
|
|
||||||
// Import classes:
|
|
||||||
import org.openapitools.client.ApiClient;
|
|
||||||
import org.openapitools.client.ApiException;
|
|
||||||
import org.openapitools.client.Configuration;
|
|
||||||
import org.openapitools.client.models.*;
|
|
||||||
import org.openapitools.client.api.FakeApi;
|
|
||||||
|
|
||||||
public class Example {
|
|
||||||
public static void main(String[] args) {
|
|
||||||
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
|
||||||
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
|
|
||||||
|
|
||||||
FakeApi apiInstance = new FakeApi(defaultClient);
|
|
||||||
Map<String, String> param = new HashMap(); // Map<String, String> | request body
|
|
||||||
try {
|
|
||||||
apiInstance.testInlineAdditionalProperties(param);
|
|
||||||
} catch (ApiException e) {
|
|
||||||
System.err.println("Exception when calling FakeApi#testInlineAdditionalProperties");
|
|
||||||
System.err.println("Status code: " + e.getCode());
|
|
||||||
System.err.println("Reason: " + e.getResponseBody());
|
|
||||||
System.err.println("Response headers: " + e.getResponseHeaders());
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
### Parameters
|
|
||||||
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------- | ------------- | ------------- | -------------
|
|
||||||
**param** | [**Map<String, String>**](String.md)| request body |
|
|
||||||
|
|
||||||
### Return type
|
|
||||||
|
|
||||||
null (empty response body)
|
|
||||||
|
|
||||||
### Authorization
|
|
||||||
|
|
||||||
No authorization required
|
|
||||||
|
|
||||||
### HTTP request headers
|
|
||||||
|
|
||||||
- **Content-Type**: application/json
|
|
||||||
- **Accept**: Not defined
|
|
||||||
|
|
||||||
### HTTP response details
|
|
||||||
| Status code | Description | Response headers |
|
|
||||||
|-------------|-------------|------------------|
|
|
||||||
| **200** | successful operation | - |
|
|
||||||
|
|
||||||
|
|
||||||
## testJsonFormData
|
|
||||||
|
|
||||||
> testJsonFormData(param, param2)
|
|
||||||
|
|
||||||
test json serialization of form data
|
|
||||||
|
|
||||||
### Example
|
|
||||||
|
|
||||||
```java
|
|
||||||
// Import classes:
|
|
||||||
import org.openapitools.client.ApiClient;
|
|
||||||
import org.openapitools.client.ApiException;
|
|
||||||
import org.openapitools.client.Configuration;
|
|
||||||
import org.openapitools.client.models.*;
|
|
||||||
import org.openapitools.client.api.FakeApi;
|
|
||||||
|
|
||||||
public class Example {
|
|
||||||
public static void main(String[] args) {
|
|
||||||
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
|
||||||
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
|
|
||||||
|
|
||||||
FakeApi apiInstance = new FakeApi(defaultClient);
|
|
||||||
String param = "param_example"; // String | field1
|
|
||||||
String param2 = "param2_example"; // String | field2
|
|
||||||
try {
|
|
||||||
apiInstance.testJsonFormData(param, param2);
|
|
||||||
} catch (ApiException e) {
|
|
||||||
System.err.println("Exception when calling FakeApi#testJsonFormData");
|
|
||||||
System.err.println("Status code: " + e.getCode());
|
|
||||||
System.err.println("Reason: " + e.getResponseBody());
|
|
||||||
System.err.println("Response headers: " + e.getResponseHeaders());
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
### Parameters
|
|
||||||
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------- | ------------- | ------------- | -------------
|
|
||||||
**param** | **String**| field1 |
|
|
||||||
**param2** | **String**| field2 |
|
|
||||||
|
|
||||||
### Return type
|
|
||||||
|
|
||||||
null (empty response body)
|
|
||||||
|
|
||||||
### Authorization
|
|
||||||
|
|
||||||
No authorization required
|
|
||||||
|
|
||||||
### HTTP request headers
|
|
||||||
|
|
||||||
- **Content-Type**: application/x-www-form-urlencoded
|
|
||||||
- **Accept**: Not defined
|
|
||||||
|
|
||||||
### HTTP response details
|
|
||||||
| Status code | Description | Response headers |
|
|
||||||
|-------------|-------------|------------------|
|
|
||||||
| **200** | successful operation | - |
|
|
||||||
|
|
||||||
|
|
||||||
## testQueryParameterCollectionFormat
|
|
||||||
|
|
||||||
> testQueryParameterCollectionFormat(pipe, ioutil, http, url, context)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
To test the collection format in query parameters
|
|
||||||
|
|
||||||
### Example
|
|
||||||
|
|
||||||
```java
|
|
||||||
// Import classes:
|
|
||||||
import org.openapitools.client.ApiClient;
|
|
||||||
import org.openapitools.client.ApiException;
|
|
||||||
import org.openapitools.client.Configuration;
|
|
||||||
import org.openapitools.client.models.*;
|
|
||||||
import org.openapitools.client.api.FakeApi;
|
|
||||||
|
|
||||||
public class Example {
|
|
||||||
public static void main(String[] args) {
|
|
||||||
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
|
||||||
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
|
|
||||||
|
|
||||||
FakeApi apiInstance = new FakeApi(defaultClient);
|
|
||||||
List<String> pipe = Arrays.asList(); // List<String> |
|
|
||||||
List<String> ioutil = Arrays.asList(); // List<String> |
|
|
||||||
List<String> http = Arrays.asList(); // List<String> |
|
|
||||||
List<String> url = Arrays.asList(); // List<String> |
|
|
||||||
List<String> context = Arrays.asList(); // List<String> |
|
|
||||||
try {
|
|
||||||
apiInstance.testQueryParameterCollectionFormat(pipe, ioutil, http, url, context);
|
|
||||||
} catch (ApiException e) {
|
|
||||||
System.err.println("Exception when calling FakeApi#testQueryParameterCollectionFormat");
|
|
||||||
System.err.println("Status code: " + e.getCode());
|
|
||||||
System.err.println("Reason: " + e.getResponseBody());
|
|
||||||
System.err.println("Response headers: " + e.getResponseHeaders());
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
### Parameters
|
|
||||||
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------- | ------------- | ------------- | -------------
|
|
||||||
**pipe** | [**List<String>**](String.md)| |
|
|
||||||
**ioutil** | [**List<String>**](String.md)| |
|
|
||||||
**http** | [**List<String>**](String.md)| |
|
|
||||||
**url** | [**List<String>**](String.md)| |
|
|
||||||
**context** | [**List<String>**](String.md)| |
|
|
||||||
|
|
||||||
### Return type
|
|
||||||
|
|
||||||
null (empty response body)
|
|
||||||
|
|
||||||
### Authorization
|
|
||||||
|
|
||||||
No authorization required
|
|
||||||
|
|
||||||
### HTTP request headers
|
|
||||||
|
|
||||||
- **Content-Type**: Not defined
|
|
||||||
- **Accept**: Not defined
|
|
||||||
|
|
||||||
### HTTP response details
|
|
||||||
| Status code | Description | Response headers |
|
|
||||||
|-------------|-------------|------------------|
|
|
||||||
| **200** | Success | - |
|
|
||||||
|
|
@ -1,81 +0,0 @@
|
|||||||
# FakeClassnameTags123Api
|
|
||||||
|
|
||||||
All URIs are relative to *http://petstore.swagger.io:80/v2*
|
|
||||||
|
|
||||||
Method | HTTP request | Description
|
|
||||||
------------- | ------------- | -------------
|
|
||||||
[**testClassname**](FakeClassnameTags123Api.md#testClassname) | **PATCH** fake_classname_test | To test class name in snake case
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## testClassname
|
|
||||||
|
|
||||||
> Client testClassname(body)
|
|
||||||
|
|
||||||
To test class name in snake case
|
|
||||||
|
|
||||||
To test class name in snake case
|
|
||||||
|
|
||||||
### Example
|
|
||||||
|
|
||||||
```java
|
|
||||||
// Import classes:
|
|
||||||
import org.openapitools.client.ApiClient;
|
|
||||||
import org.openapitools.client.ApiException;
|
|
||||||
import org.openapitools.client.Configuration;
|
|
||||||
import org.openapitools.client.auth.*;
|
|
||||||
import org.openapitools.client.models.*;
|
|
||||||
import org.openapitools.client.api.FakeClassnameTags123Api;
|
|
||||||
|
|
||||||
public class Example {
|
|
||||||
public static void main(String[] args) {
|
|
||||||
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
|
||||||
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
|
|
||||||
|
|
||||||
// Configure API key authorization: api_key_query
|
|
||||||
ApiKeyAuth api_key_query = (ApiKeyAuth) defaultClient.getAuthentication("api_key_query");
|
|
||||||
api_key_query.setApiKey("YOUR API KEY");
|
|
||||||
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
|
||||||
//api_key_query.setApiKeyPrefix("Token");
|
|
||||||
|
|
||||||
FakeClassnameTags123Api apiInstance = new FakeClassnameTags123Api(defaultClient);
|
|
||||||
Client body = new Client(); // Client | client model
|
|
||||||
try {
|
|
||||||
Client result = apiInstance.testClassname(body);
|
|
||||||
System.out.println(result);
|
|
||||||
} catch (ApiException e) {
|
|
||||||
System.err.println("Exception when calling FakeClassnameTags123Api#testClassname");
|
|
||||||
System.err.println("Status code: " + e.getCode());
|
|
||||||
System.err.println("Reason: " + e.getResponseBody());
|
|
||||||
System.err.println("Response headers: " + e.getResponseHeaders());
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
### Parameters
|
|
||||||
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------- | ------------- | ------------- | -------------
|
|
||||||
**body** | [**Client**](Client.md)| client model |
|
|
||||||
|
|
||||||
### Return type
|
|
||||||
|
|
||||||
[**Client**](Client.md)
|
|
||||||
|
|
||||||
### Authorization
|
|
||||||
|
|
||||||
[api_key_query](../README.md#api_key_query)
|
|
||||||
|
|
||||||
### HTTP request headers
|
|
||||||
|
|
||||||
- **Content-Type**: application/json
|
|
||||||
- **Accept**: application/json
|
|
||||||
|
|
||||||
### HTTP response details
|
|
||||||
| Status code | Description | Response headers |
|
|
||||||
|-------------|-------------|------------------|
|
|
||||||
| **200** | successful operation | - |
|
|
||||||
|
|
@ -1,13 +0,0 @@
|
|||||||
|
|
||||||
|
|
||||||
# FileSchemaTestClass
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
**file** | [**java.io.File**](java.io.File.md) | | [optional]
|
|
||||||
**files** | [**List<java.io.File>**](java.io.File.md) | | [optional]
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1,25 +0,0 @@
|
|||||||
|
|
||||||
|
|
||||||
# FormatTest
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
**integer** | **Integer** | | [optional]
|
|
||||||
**int32** | **Integer** | | [optional]
|
|
||||||
**int64** | **Long** | | [optional]
|
|
||||||
**number** | [**BigDecimal**](BigDecimal.md) | |
|
|
||||||
**_float** | **Float** | | [optional]
|
|
||||||
**_double** | **Double** | | [optional]
|
|
||||||
**string** | **String** | | [optional]
|
|
||||||
**_byte** | **byte[]** | |
|
|
||||||
**binary** | [**File**](File.md) | | [optional]
|
|
||||||
**date** | [**LocalDate**](LocalDate.md) | |
|
|
||||||
**dateTime** | [**OffsetDateTime**](OffsetDateTime.md) | | [optional]
|
|
||||||
**uuid** | [**UUID**](UUID.md) | | [optional]
|
|
||||||
**password** | **String** | |
|
|
||||||
**bigDecimal** | [**BigDecimal**](BigDecimal.md) | | [optional]
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1,13 +0,0 @@
|
|||||||
|
|
||||||
|
|
||||||
# HasOnlyReadOnly
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
**bar** | **String** | | [optional] [readonly]
|
|
||||||
**foo** | **String** | | [optional] [readonly]
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1,24 +0,0 @@
|
|||||||
|
|
||||||
|
|
||||||
# MapTest
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
**mapMapOfString** | [**Map<String, Map<String, String>>**](Map.md) | | [optional]
|
|
||||||
**mapOfEnumString** | [**Map<String, InnerEnum>**](#Map<String, InnerEnum>) | | [optional]
|
|
||||||
**directMap** | **Map<String, Boolean>** | | [optional]
|
|
||||||
**indirectMap** | **Map<String, Boolean>** | | [optional]
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Enum: Map<String, InnerEnum>
|
|
||||||
|
|
||||||
Name | Value
|
|
||||||
---- | -----
|
|
||||||
UPPER | "UPPER"
|
|
||||||
LOWER | "lower"
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1,14 +0,0 @@
|
|||||||
|
|
||||||
|
|
||||||
# MixedPropertiesAndAdditionalPropertiesClass
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
**uuid** | [**UUID**](UUID.md) | | [optional]
|
|
||||||
**dateTime** | [**OffsetDateTime**](OffsetDateTime.md) | | [optional]
|
|
||||||
**map** | [**Map<String, Animal>**](Animal.md) | | [optional]
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1,14 +0,0 @@
|
|||||||
|
|
||||||
|
|
||||||
# Model200Response
|
|
||||||
|
|
||||||
Model for testing model name starting with number
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
**name** | **Integer** | | [optional]
|
|
||||||
**propertyClass** | **String** | | [optional]
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1,14 +0,0 @@
|
|||||||
|
|
||||||
|
|
||||||
# ModelApiResponse
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
**code** | **Integer** | | [optional]
|
|
||||||
**type** | **String** | | [optional]
|
|
||||||
**message** | **String** | | [optional]
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1,13 +0,0 @@
|
|||||||
|
|
||||||
|
|
||||||
# ModelReturn
|
|
||||||
|
|
||||||
Model for testing reserved words
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
**_return** | **Integer** | | [optional]
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1,16 +0,0 @@
|
|||||||
|
|
||||||
|
|
||||||
# Name
|
|
||||||
|
|
||||||
Model for testing model name same as property name
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
**name** | **Integer** | |
|
|
||||||
**snakeCase** | **Integer** | | [optional] [readonly]
|
|
||||||
**property** | **String** | | [optional]
|
|
||||||
**_123number** | **Integer** | | [optional] [readonly]
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1,12 +0,0 @@
|
|||||||
|
|
||||||
|
|
||||||
# NumberOnly
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
**justNumber** | [**BigDecimal**](BigDecimal.md) | | [optional]
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1,27 +0,0 @@
|
|||||||
|
|
||||||
|
|
||||||
# Order
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
**id** | **Long** | | [optional]
|
|
||||||
**petId** | **Long** | | [optional]
|
|
||||||
**quantity** | **Integer** | | [optional]
|
|
||||||
**shipDate** | [**OffsetDateTime**](OffsetDateTime.md) | | [optional]
|
|
||||||
**status** | [**StatusEnum**](#StatusEnum) | Order Status | [optional]
|
|
||||||
**complete** | **Boolean** | | [optional]
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Enum: StatusEnum
|
|
||||||
|
|
||||||
Name | Value
|
|
||||||
---- | -----
|
|
||||||
PLACED | "placed"
|
|
||||||
APPROVED | "approved"
|
|
||||||
DELIVERED | "delivered"
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1,14 +0,0 @@
|
|||||||
|
|
||||||
|
|
||||||
# OuterComposite
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
**myNumber** | [**BigDecimal**](BigDecimal.md) | | [optional]
|
|
||||||
**myString** | **String** | | [optional]
|
|
||||||
**myBoolean** | **Boolean** | | [optional]
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1,15 +0,0 @@
|
|||||||
|
|
||||||
|
|
||||||
# OuterEnum
|
|
||||||
|
|
||||||
## Enum
|
|
||||||
|
|
||||||
|
|
||||||
* `PLACED` (value: `"placed"`)
|
|
||||||
|
|
||||||
* `APPROVED` (value: `"approved"`)
|
|
||||||
|
|
||||||
* `DELIVERED` (value: `"delivered"`)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1,27 +0,0 @@
|
|||||||
|
|
||||||
|
|
||||||
# Pet
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
**id** | **Long** | | [optional]
|
|
||||||
**category** | [**Category**](Category.md) | | [optional]
|
|
||||||
**name** | **String** | |
|
|
||||||
**photoUrls** | **Set<String>** | |
|
|
||||||
**tags** | [**List<Tag>**](Tag.md) | | [optional]
|
|
||||||
**status** | [**StatusEnum**](#StatusEnum) | pet status in the store | [optional]
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Enum: StatusEnum
|
|
||||||
|
|
||||||
Name | Value
|
|
||||||
---- | -----
|
|
||||||
AVAILABLE | "available"
|
|
||||||
PENDING | "pending"
|
|
||||||
SOLD | "sold"
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1,656 +0,0 @@
|
|||||||
# PetApi
|
|
||||||
|
|
||||||
All URIs are relative to *http://petstore.swagger.io:80/v2*
|
|
||||||
|
|
||||||
Method | HTTP request | Description
|
|
||||||
------------- | ------------- | -------------
|
|
||||||
[**addPet**](PetApi.md#addPet) | **POST** pet | Add a new pet to the store
|
|
||||||
[**deletePet**](PetApi.md#deletePet) | **DELETE** pet/{petId} | Deletes a pet
|
|
||||||
[**findPetsByStatus**](PetApi.md#findPetsByStatus) | **GET** pet/findByStatus | Finds Pets by status
|
|
||||||
[**findPetsByTags**](PetApi.md#findPetsByTags) | **GET** pet/findByTags | Finds Pets by tags
|
|
||||||
[**getPetById**](PetApi.md#getPetById) | **GET** pet/{petId} | Find pet by ID
|
|
||||||
[**updatePet**](PetApi.md#updatePet) | **PUT** pet | Update an existing pet
|
|
||||||
[**updatePetWithForm**](PetApi.md#updatePetWithForm) | **POST** pet/{petId} | Updates a pet in the store with form data
|
|
||||||
[**uploadFile**](PetApi.md#uploadFile) | **POST** pet/{petId}/uploadImage | uploads an image
|
|
||||||
[**uploadFileWithRequiredFile**](PetApi.md#uploadFileWithRequiredFile) | **POST** fake/{petId}/uploadImageWithRequiredFile | uploads an image (required)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## addPet
|
|
||||||
|
|
||||||
> addPet(body)
|
|
||||||
|
|
||||||
Add a new pet to the store
|
|
||||||
|
|
||||||
### Example
|
|
||||||
|
|
||||||
```java
|
|
||||||
// Import classes:
|
|
||||||
import org.openapitools.client.ApiClient;
|
|
||||||
import org.openapitools.client.ApiException;
|
|
||||||
import org.openapitools.client.Configuration;
|
|
||||||
import org.openapitools.client.auth.*;
|
|
||||||
import org.openapitools.client.models.*;
|
|
||||||
import org.openapitools.client.api.PetApi;
|
|
||||||
|
|
||||||
public class Example {
|
|
||||||
public static void main(String[] args) {
|
|
||||||
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
|
||||||
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
|
|
||||||
|
|
||||||
// Configure OAuth2 access token for authorization: petstore_auth
|
|
||||||
OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth");
|
|
||||||
petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
|
|
||||||
|
|
||||||
PetApi apiInstance = new PetApi(defaultClient);
|
|
||||||
Pet body = new Pet(); // Pet | Pet object that needs to be added to the store
|
|
||||||
try {
|
|
||||||
apiInstance.addPet(body);
|
|
||||||
} catch (ApiException e) {
|
|
||||||
System.err.println("Exception when calling PetApi#addPet");
|
|
||||||
System.err.println("Status code: " + e.getCode());
|
|
||||||
System.err.println("Reason: " + e.getResponseBody());
|
|
||||||
System.err.println("Response headers: " + e.getResponseHeaders());
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
### Parameters
|
|
||||||
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------- | ------------- | ------------- | -------------
|
|
||||||
**body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
|
|
||||||
|
|
||||||
### Return type
|
|
||||||
|
|
||||||
null (empty response body)
|
|
||||||
|
|
||||||
### Authorization
|
|
||||||
|
|
||||||
[petstore_auth](../README.md#petstore_auth)
|
|
||||||
|
|
||||||
### HTTP request headers
|
|
||||||
|
|
||||||
- **Content-Type**: application/json, application/xml
|
|
||||||
- **Accept**: Not defined
|
|
||||||
|
|
||||||
### HTTP response details
|
|
||||||
| Status code | Description | Response headers |
|
|
||||||
|-------------|-------------|------------------|
|
|
||||||
| **200** | successful operation | - |
|
|
||||||
| **405** | Invalid input | - |
|
|
||||||
|
|
||||||
|
|
||||||
## deletePet
|
|
||||||
|
|
||||||
> deletePet(petId, apiKey)
|
|
||||||
|
|
||||||
Deletes a pet
|
|
||||||
|
|
||||||
### Example
|
|
||||||
|
|
||||||
```java
|
|
||||||
// Import classes:
|
|
||||||
import org.openapitools.client.ApiClient;
|
|
||||||
import org.openapitools.client.ApiException;
|
|
||||||
import org.openapitools.client.Configuration;
|
|
||||||
import org.openapitools.client.auth.*;
|
|
||||||
import org.openapitools.client.models.*;
|
|
||||||
import org.openapitools.client.api.PetApi;
|
|
||||||
|
|
||||||
public class Example {
|
|
||||||
public static void main(String[] args) {
|
|
||||||
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
|
||||||
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
|
|
||||||
|
|
||||||
// Configure OAuth2 access token for authorization: petstore_auth
|
|
||||||
OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth");
|
|
||||||
petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
|
|
||||||
|
|
||||||
PetApi apiInstance = new PetApi(defaultClient);
|
|
||||||
Long petId = 56L; // Long | Pet id to delete
|
|
||||||
String apiKey = "apiKey_example"; // String |
|
|
||||||
try {
|
|
||||||
apiInstance.deletePet(petId, apiKey);
|
|
||||||
} catch (ApiException e) {
|
|
||||||
System.err.println("Exception when calling PetApi#deletePet");
|
|
||||||
System.err.println("Status code: " + e.getCode());
|
|
||||||
System.err.println("Reason: " + e.getResponseBody());
|
|
||||||
System.err.println("Response headers: " + e.getResponseHeaders());
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
### Parameters
|
|
||||||
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------- | ------------- | ------------- | -------------
|
|
||||||
**petId** | **Long**| Pet id to delete |
|
|
||||||
**apiKey** | **String**| | [optional]
|
|
||||||
|
|
||||||
### Return type
|
|
||||||
|
|
||||||
null (empty response body)
|
|
||||||
|
|
||||||
### Authorization
|
|
||||||
|
|
||||||
[petstore_auth](../README.md#petstore_auth)
|
|
||||||
|
|
||||||
### HTTP request headers
|
|
||||||
|
|
||||||
- **Content-Type**: Not defined
|
|
||||||
- **Accept**: Not defined
|
|
||||||
|
|
||||||
### HTTP response details
|
|
||||||
| Status code | Description | Response headers |
|
|
||||||
|-------------|-------------|------------------|
|
|
||||||
| **200** | successful operation | - |
|
|
||||||
| **400** | Invalid pet value | - |
|
|
||||||
|
|
||||||
|
|
||||||
## findPetsByStatus
|
|
||||||
|
|
||||||
> List<Pet> findPetsByStatus(status)
|
|
||||||
|
|
||||||
Finds Pets by status
|
|
||||||
|
|
||||||
Multiple status values can be provided with comma separated strings
|
|
||||||
|
|
||||||
### Example
|
|
||||||
|
|
||||||
```java
|
|
||||||
// Import classes:
|
|
||||||
import org.openapitools.client.ApiClient;
|
|
||||||
import org.openapitools.client.ApiException;
|
|
||||||
import org.openapitools.client.Configuration;
|
|
||||||
import org.openapitools.client.auth.*;
|
|
||||||
import org.openapitools.client.models.*;
|
|
||||||
import org.openapitools.client.api.PetApi;
|
|
||||||
|
|
||||||
public class Example {
|
|
||||||
public static void main(String[] args) {
|
|
||||||
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
|
||||||
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
|
|
||||||
|
|
||||||
// Configure OAuth2 access token for authorization: petstore_auth
|
|
||||||
OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth");
|
|
||||||
petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
|
|
||||||
|
|
||||||
PetApi apiInstance = new PetApi(defaultClient);
|
|
||||||
List<String> status = Arrays.asList("available"); // List<String> | Status values that need to be considered for filter
|
|
||||||
try {
|
|
||||||
List<Pet> result = apiInstance.findPetsByStatus(status);
|
|
||||||
System.out.println(result);
|
|
||||||
} catch (ApiException e) {
|
|
||||||
System.err.println("Exception when calling PetApi#findPetsByStatus");
|
|
||||||
System.err.println("Status code: " + e.getCode());
|
|
||||||
System.err.println("Reason: " + e.getResponseBody());
|
|
||||||
System.err.println("Response headers: " + e.getResponseHeaders());
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
### Parameters
|
|
||||||
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------- | ------------- | ------------- | -------------
|
|
||||||
**status** | [**List<String>**](String.md)| Status values that need to be considered for filter | [enum: available, pending, sold]
|
|
||||||
|
|
||||||
### Return type
|
|
||||||
|
|
||||||
[**List<Pet>**](Pet.md)
|
|
||||||
|
|
||||||
### Authorization
|
|
||||||
|
|
||||||
[petstore_auth](../README.md#petstore_auth)
|
|
||||||
|
|
||||||
### HTTP request headers
|
|
||||||
|
|
||||||
- **Content-Type**: Not defined
|
|
||||||
- **Accept**: application/xml, application/json
|
|
||||||
|
|
||||||
### HTTP response details
|
|
||||||
| Status code | Description | Response headers |
|
|
||||||
|-------------|-------------|------------------|
|
|
||||||
| **200** | successful operation | - |
|
|
||||||
| **400** | Invalid status value | - |
|
|
||||||
|
|
||||||
|
|
||||||
## findPetsByTags
|
|
||||||
|
|
||||||
> Set<Pet> findPetsByTags(tags)
|
|
||||||
|
|
||||||
Finds Pets by tags
|
|
||||||
|
|
||||||
Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
|
|
||||||
|
|
||||||
### Example
|
|
||||||
|
|
||||||
```java
|
|
||||||
// Import classes:
|
|
||||||
import org.openapitools.client.ApiClient;
|
|
||||||
import org.openapitools.client.ApiException;
|
|
||||||
import org.openapitools.client.Configuration;
|
|
||||||
import org.openapitools.client.auth.*;
|
|
||||||
import org.openapitools.client.models.*;
|
|
||||||
import org.openapitools.client.api.PetApi;
|
|
||||||
|
|
||||||
public class Example {
|
|
||||||
public static void main(String[] args) {
|
|
||||||
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
|
||||||
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
|
|
||||||
|
|
||||||
// Configure OAuth2 access token for authorization: petstore_auth
|
|
||||||
OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth");
|
|
||||||
petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
|
|
||||||
|
|
||||||
PetApi apiInstance = new PetApi(defaultClient);
|
|
||||||
Set<String> tags = Arrays.asList(); // Set<String> | Tags to filter by
|
|
||||||
try {
|
|
||||||
Set<Pet> result = apiInstance.findPetsByTags(tags);
|
|
||||||
System.out.println(result);
|
|
||||||
} catch (ApiException e) {
|
|
||||||
System.err.println("Exception when calling PetApi#findPetsByTags");
|
|
||||||
System.err.println("Status code: " + e.getCode());
|
|
||||||
System.err.println("Reason: " + e.getResponseBody());
|
|
||||||
System.err.println("Response headers: " + e.getResponseHeaders());
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
### Parameters
|
|
||||||
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------- | ------------- | ------------- | -------------
|
|
||||||
**tags** | [**Set<String>**](String.md)| Tags to filter by |
|
|
||||||
|
|
||||||
### Return type
|
|
||||||
|
|
||||||
[**Set<Pet>**](Pet.md)
|
|
||||||
|
|
||||||
### Authorization
|
|
||||||
|
|
||||||
[petstore_auth](../README.md#petstore_auth)
|
|
||||||
|
|
||||||
### HTTP request headers
|
|
||||||
|
|
||||||
- **Content-Type**: Not defined
|
|
||||||
- **Accept**: application/xml, application/json
|
|
||||||
|
|
||||||
### HTTP response details
|
|
||||||
| Status code | Description | Response headers |
|
|
||||||
|-------------|-------------|------------------|
|
|
||||||
| **200** | successful operation | - |
|
|
||||||
| **400** | Invalid tag value | - |
|
|
||||||
|
|
||||||
|
|
||||||
## getPetById
|
|
||||||
|
|
||||||
> Pet getPetById(petId)
|
|
||||||
|
|
||||||
Find pet by ID
|
|
||||||
|
|
||||||
Returns a single pet
|
|
||||||
|
|
||||||
### Example
|
|
||||||
|
|
||||||
```java
|
|
||||||
// Import classes:
|
|
||||||
import org.openapitools.client.ApiClient;
|
|
||||||
import org.openapitools.client.ApiException;
|
|
||||||
import org.openapitools.client.Configuration;
|
|
||||||
import org.openapitools.client.auth.*;
|
|
||||||
import org.openapitools.client.models.*;
|
|
||||||
import org.openapitools.client.api.PetApi;
|
|
||||||
|
|
||||||
public class Example {
|
|
||||||
public static void main(String[] args) {
|
|
||||||
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
|
||||||
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
|
|
||||||
|
|
||||||
// Configure API key authorization: api_key
|
|
||||||
ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
|
|
||||||
api_key.setApiKey("YOUR API KEY");
|
|
||||||
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
|
||||||
//api_key.setApiKeyPrefix("Token");
|
|
||||||
|
|
||||||
PetApi apiInstance = new PetApi(defaultClient);
|
|
||||||
Long petId = 56L; // Long | ID of pet to return
|
|
||||||
try {
|
|
||||||
Pet result = apiInstance.getPetById(petId);
|
|
||||||
System.out.println(result);
|
|
||||||
} catch (ApiException e) {
|
|
||||||
System.err.println("Exception when calling PetApi#getPetById");
|
|
||||||
System.err.println("Status code: " + e.getCode());
|
|
||||||
System.err.println("Reason: " + e.getResponseBody());
|
|
||||||
System.err.println("Response headers: " + e.getResponseHeaders());
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
### Parameters
|
|
||||||
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------- | ------------- | ------------- | -------------
|
|
||||||
**petId** | **Long**| ID of pet to return |
|
|
||||||
|
|
||||||
### Return type
|
|
||||||
|
|
||||||
[**Pet**](Pet.md)
|
|
||||||
|
|
||||||
### Authorization
|
|
||||||
|
|
||||||
[api_key](../README.md#api_key)
|
|
||||||
|
|
||||||
### HTTP request headers
|
|
||||||
|
|
||||||
- **Content-Type**: Not defined
|
|
||||||
- **Accept**: application/xml, application/json
|
|
||||||
|
|
||||||
### HTTP response details
|
|
||||||
| Status code | Description | Response headers |
|
|
||||||
|-------------|-------------|------------------|
|
|
||||||
| **200** | successful operation | - |
|
|
||||||
| **400** | Invalid ID supplied | - |
|
|
||||||
| **404** | Pet not found | - |
|
|
||||||
|
|
||||||
|
|
||||||
## updatePet
|
|
||||||
|
|
||||||
> updatePet(body)
|
|
||||||
|
|
||||||
Update an existing pet
|
|
||||||
|
|
||||||
### Example
|
|
||||||
|
|
||||||
```java
|
|
||||||
// Import classes:
|
|
||||||
import org.openapitools.client.ApiClient;
|
|
||||||
import org.openapitools.client.ApiException;
|
|
||||||
import org.openapitools.client.Configuration;
|
|
||||||
import org.openapitools.client.auth.*;
|
|
||||||
import org.openapitools.client.models.*;
|
|
||||||
import org.openapitools.client.api.PetApi;
|
|
||||||
|
|
||||||
public class Example {
|
|
||||||
public static void main(String[] args) {
|
|
||||||
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
|
||||||
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
|
|
||||||
|
|
||||||
// Configure OAuth2 access token for authorization: petstore_auth
|
|
||||||
OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth");
|
|
||||||
petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
|
|
||||||
|
|
||||||
PetApi apiInstance = new PetApi(defaultClient);
|
|
||||||
Pet body = new Pet(); // Pet | Pet object that needs to be added to the store
|
|
||||||
try {
|
|
||||||
apiInstance.updatePet(body);
|
|
||||||
} catch (ApiException e) {
|
|
||||||
System.err.println("Exception when calling PetApi#updatePet");
|
|
||||||
System.err.println("Status code: " + e.getCode());
|
|
||||||
System.err.println("Reason: " + e.getResponseBody());
|
|
||||||
System.err.println("Response headers: " + e.getResponseHeaders());
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
### Parameters
|
|
||||||
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------- | ------------- | ------------- | -------------
|
|
||||||
**body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
|
|
||||||
|
|
||||||
### Return type
|
|
||||||
|
|
||||||
null (empty response body)
|
|
||||||
|
|
||||||
### Authorization
|
|
||||||
|
|
||||||
[petstore_auth](../README.md#petstore_auth)
|
|
||||||
|
|
||||||
### HTTP request headers
|
|
||||||
|
|
||||||
- **Content-Type**: application/json, application/xml
|
|
||||||
- **Accept**: Not defined
|
|
||||||
|
|
||||||
### HTTP response details
|
|
||||||
| Status code | Description | Response headers |
|
|
||||||
|-------------|-------------|------------------|
|
|
||||||
| **200** | successful operation | - |
|
|
||||||
| **400** | Invalid ID supplied | - |
|
|
||||||
| **404** | Pet not found | - |
|
|
||||||
| **405** | Validation exception | - |
|
|
||||||
|
|
||||||
|
|
||||||
## updatePetWithForm
|
|
||||||
|
|
||||||
> updatePetWithForm(petId, name, status)
|
|
||||||
|
|
||||||
Updates a pet in the store with form data
|
|
||||||
|
|
||||||
### Example
|
|
||||||
|
|
||||||
```java
|
|
||||||
// Import classes:
|
|
||||||
import org.openapitools.client.ApiClient;
|
|
||||||
import org.openapitools.client.ApiException;
|
|
||||||
import org.openapitools.client.Configuration;
|
|
||||||
import org.openapitools.client.auth.*;
|
|
||||||
import org.openapitools.client.models.*;
|
|
||||||
import org.openapitools.client.api.PetApi;
|
|
||||||
|
|
||||||
public class Example {
|
|
||||||
public static void main(String[] args) {
|
|
||||||
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
|
||||||
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
|
|
||||||
|
|
||||||
// Configure OAuth2 access token for authorization: petstore_auth
|
|
||||||
OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth");
|
|
||||||
petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
|
|
||||||
|
|
||||||
PetApi apiInstance = new PetApi(defaultClient);
|
|
||||||
Long petId = 56L; // Long | ID of pet that needs to be updated
|
|
||||||
String name = "name_example"; // String | Updated name of the pet
|
|
||||||
String status = "status_example"; // String | Updated status of the pet
|
|
||||||
try {
|
|
||||||
apiInstance.updatePetWithForm(petId, name, status);
|
|
||||||
} catch (ApiException e) {
|
|
||||||
System.err.println("Exception when calling PetApi#updatePetWithForm");
|
|
||||||
System.err.println("Status code: " + e.getCode());
|
|
||||||
System.err.println("Reason: " + e.getResponseBody());
|
|
||||||
System.err.println("Response headers: " + e.getResponseHeaders());
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
### Parameters
|
|
||||||
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------- | ------------- | ------------- | -------------
|
|
||||||
**petId** | **Long**| ID of pet that needs to be updated |
|
|
||||||
**name** | **String**| Updated name of the pet | [optional]
|
|
||||||
**status** | **String**| Updated status of the pet | [optional]
|
|
||||||
|
|
||||||
### Return type
|
|
||||||
|
|
||||||
null (empty response body)
|
|
||||||
|
|
||||||
### Authorization
|
|
||||||
|
|
||||||
[petstore_auth](../README.md#petstore_auth)
|
|
||||||
|
|
||||||
### HTTP request headers
|
|
||||||
|
|
||||||
- **Content-Type**: application/x-www-form-urlencoded
|
|
||||||
- **Accept**: Not defined
|
|
||||||
|
|
||||||
### HTTP response details
|
|
||||||
| Status code | Description | Response headers |
|
|
||||||
|-------------|-------------|------------------|
|
|
||||||
| **405** | Invalid input | - |
|
|
||||||
|
|
||||||
|
|
||||||
## uploadFile
|
|
||||||
|
|
||||||
> ModelApiResponse uploadFile(petId, additionalMetadata, file)
|
|
||||||
|
|
||||||
uploads an image
|
|
||||||
|
|
||||||
### Example
|
|
||||||
|
|
||||||
```java
|
|
||||||
// Import classes:
|
|
||||||
import org.openapitools.client.ApiClient;
|
|
||||||
import org.openapitools.client.ApiException;
|
|
||||||
import org.openapitools.client.Configuration;
|
|
||||||
import org.openapitools.client.auth.*;
|
|
||||||
import org.openapitools.client.models.*;
|
|
||||||
import org.openapitools.client.api.PetApi;
|
|
||||||
|
|
||||||
public class Example {
|
|
||||||
public static void main(String[] args) {
|
|
||||||
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
|
||||||
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
|
|
||||||
|
|
||||||
// Configure OAuth2 access token for authorization: petstore_auth
|
|
||||||
OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth");
|
|
||||||
petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
|
|
||||||
|
|
||||||
PetApi apiInstance = new PetApi(defaultClient);
|
|
||||||
Long petId = 56L; // Long | ID of pet to update
|
|
||||||
String additionalMetadata = "additionalMetadata_example"; // String | Additional data to pass to server
|
|
||||||
File file = new File("/path/to/file"); // File | file to upload
|
|
||||||
try {
|
|
||||||
ModelApiResponse result = apiInstance.uploadFile(petId, additionalMetadata, file);
|
|
||||||
System.out.println(result);
|
|
||||||
} catch (ApiException e) {
|
|
||||||
System.err.println("Exception when calling PetApi#uploadFile");
|
|
||||||
System.err.println("Status code: " + e.getCode());
|
|
||||||
System.err.println("Reason: " + e.getResponseBody());
|
|
||||||
System.err.println("Response headers: " + e.getResponseHeaders());
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
### Parameters
|
|
||||||
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------- | ------------- | ------------- | -------------
|
|
||||||
**petId** | **Long**| ID of pet to update |
|
|
||||||
**additionalMetadata** | **String**| Additional data to pass to server | [optional]
|
|
||||||
**file** | **File**| file to upload | [optional]
|
|
||||||
|
|
||||||
### Return type
|
|
||||||
|
|
||||||
[**ModelApiResponse**](ModelApiResponse.md)
|
|
||||||
|
|
||||||
### Authorization
|
|
||||||
|
|
||||||
[petstore_auth](../README.md#petstore_auth)
|
|
||||||
|
|
||||||
### HTTP request headers
|
|
||||||
|
|
||||||
- **Content-Type**: multipart/form-data
|
|
||||||
- **Accept**: application/json
|
|
||||||
|
|
||||||
### HTTP response details
|
|
||||||
| Status code | Description | Response headers |
|
|
||||||
|-------------|-------------|------------------|
|
|
||||||
| **200** | successful operation | - |
|
|
||||||
|
|
||||||
|
|
||||||
## uploadFileWithRequiredFile
|
|
||||||
|
|
||||||
> ModelApiResponse uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata)
|
|
||||||
|
|
||||||
uploads an image (required)
|
|
||||||
|
|
||||||
### Example
|
|
||||||
|
|
||||||
```java
|
|
||||||
// Import classes:
|
|
||||||
import org.openapitools.client.ApiClient;
|
|
||||||
import org.openapitools.client.ApiException;
|
|
||||||
import org.openapitools.client.Configuration;
|
|
||||||
import org.openapitools.client.auth.*;
|
|
||||||
import org.openapitools.client.models.*;
|
|
||||||
import org.openapitools.client.api.PetApi;
|
|
||||||
|
|
||||||
public class Example {
|
|
||||||
public static void main(String[] args) {
|
|
||||||
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
|
||||||
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
|
|
||||||
|
|
||||||
// Configure OAuth2 access token for authorization: petstore_auth
|
|
||||||
OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth");
|
|
||||||
petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
|
|
||||||
|
|
||||||
PetApi apiInstance = new PetApi(defaultClient);
|
|
||||||
Long petId = 56L; // Long | ID of pet to update
|
|
||||||
File requiredFile = new File("/path/to/file"); // File | file to upload
|
|
||||||
String additionalMetadata = "additionalMetadata_example"; // String | Additional data to pass to server
|
|
||||||
try {
|
|
||||||
ModelApiResponse result = apiInstance.uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata);
|
|
||||||
System.out.println(result);
|
|
||||||
} catch (ApiException e) {
|
|
||||||
System.err.println("Exception when calling PetApi#uploadFileWithRequiredFile");
|
|
||||||
System.err.println("Status code: " + e.getCode());
|
|
||||||
System.err.println("Reason: " + e.getResponseBody());
|
|
||||||
System.err.println("Response headers: " + e.getResponseHeaders());
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
### Parameters
|
|
||||||
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------- | ------------- | ------------- | -------------
|
|
||||||
**petId** | **Long**| ID of pet to update |
|
|
||||||
**requiredFile** | **File**| file to upload |
|
|
||||||
**additionalMetadata** | **String**| Additional data to pass to server | [optional]
|
|
||||||
|
|
||||||
### Return type
|
|
||||||
|
|
||||||
[**ModelApiResponse**](ModelApiResponse.md)
|
|
||||||
|
|
||||||
### Authorization
|
|
||||||
|
|
||||||
[petstore_auth](../README.md#petstore_auth)
|
|
||||||
|
|
||||||
### HTTP request headers
|
|
||||||
|
|
||||||
- **Content-Type**: multipart/form-data
|
|
||||||
- **Accept**: application/json
|
|
||||||
|
|
||||||
### HTTP response details
|
|
||||||
| Status code | Description | Response headers |
|
|
||||||
|-------------|-------------|------------------|
|
|
||||||
| **200** | successful operation | - |
|
|
||||||
|
|
@ -1,13 +0,0 @@
|
|||||||
|
|
||||||
|
|
||||||
# ReadOnlyFirst
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
**bar** | **String** | | [optional] [readonly]
|
|
||||||
**baz** | **String** | | [optional]
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1,12 +0,0 @@
|
|||||||
|
|
||||||
|
|
||||||
# SpecialModelName
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
**$specialPropertyName** | **Long** | | [optional]
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1,276 +0,0 @@
|
|||||||
# StoreApi
|
|
||||||
|
|
||||||
All URIs are relative to *http://petstore.swagger.io:80/v2*
|
|
||||||
|
|
||||||
Method | HTTP request | Description
|
|
||||||
------------- | ------------- | -------------
|
|
||||||
[**deleteOrder**](StoreApi.md#deleteOrder) | **DELETE** store/order/{order_id} | Delete purchase order by ID
|
|
||||||
[**getInventory**](StoreApi.md#getInventory) | **GET** store/inventory | Returns pet inventories by status
|
|
||||||
[**getOrderById**](StoreApi.md#getOrderById) | **GET** store/order/{order_id} | Find purchase order by ID
|
|
||||||
[**placeOrder**](StoreApi.md#placeOrder) | **POST** store/order | Place an order for a pet
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## deleteOrder
|
|
||||||
|
|
||||||
> deleteOrder(orderId)
|
|
||||||
|
|
||||||
Delete purchase order by ID
|
|
||||||
|
|
||||||
For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
|
||||||
|
|
||||||
### Example
|
|
||||||
|
|
||||||
```java
|
|
||||||
// Import classes:
|
|
||||||
import org.openapitools.client.ApiClient;
|
|
||||||
import org.openapitools.client.ApiException;
|
|
||||||
import org.openapitools.client.Configuration;
|
|
||||||
import org.openapitools.client.models.*;
|
|
||||||
import org.openapitools.client.api.StoreApi;
|
|
||||||
|
|
||||||
public class Example {
|
|
||||||
public static void main(String[] args) {
|
|
||||||
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
|
||||||
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
|
|
||||||
|
|
||||||
StoreApi apiInstance = new StoreApi(defaultClient);
|
|
||||||
String orderId = "orderId_example"; // String | ID of the order that needs to be deleted
|
|
||||||
try {
|
|
||||||
apiInstance.deleteOrder(orderId);
|
|
||||||
} catch (ApiException e) {
|
|
||||||
System.err.println("Exception when calling StoreApi#deleteOrder");
|
|
||||||
System.err.println("Status code: " + e.getCode());
|
|
||||||
System.err.println("Reason: " + e.getResponseBody());
|
|
||||||
System.err.println("Response headers: " + e.getResponseHeaders());
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
### Parameters
|
|
||||||
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------- | ------------- | ------------- | -------------
|
|
||||||
**orderId** | **String**| ID of the order that needs to be deleted |
|
|
||||||
|
|
||||||
### Return type
|
|
||||||
|
|
||||||
null (empty response body)
|
|
||||||
|
|
||||||
### Authorization
|
|
||||||
|
|
||||||
No authorization required
|
|
||||||
|
|
||||||
### HTTP request headers
|
|
||||||
|
|
||||||
- **Content-Type**: Not defined
|
|
||||||
- **Accept**: Not defined
|
|
||||||
|
|
||||||
### HTTP response details
|
|
||||||
| Status code | Description | Response headers |
|
|
||||||
|-------------|-------------|------------------|
|
|
||||||
| **400** | Invalid ID supplied | - |
|
|
||||||
| **404** | Order not found | - |
|
|
||||||
|
|
||||||
|
|
||||||
## getInventory
|
|
||||||
|
|
||||||
> Map<String, Integer> getInventory()
|
|
||||||
|
|
||||||
Returns pet inventories by status
|
|
||||||
|
|
||||||
Returns a map of status codes to quantities
|
|
||||||
|
|
||||||
### Example
|
|
||||||
|
|
||||||
```java
|
|
||||||
// Import classes:
|
|
||||||
import org.openapitools.client.ApiClient;
|
|
||||||
import org.openapitools.client.ApiException;
|
|
||||||
import org.openapitools.client.Configuration;
|
|
||||||
import org.openapitools.client.auth.*;
|
|
||||||
import org.openapitools.client.models.*;
|
|
||||||
import org.openapitools.client.api.StoreApi;
|
|
||||||
|
|
||||||
public class Example {
|
|
||||||
public static void main(String[] args) {
|
|
||||||
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
|
||||||
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
|
|
||||||
|
|
||||||
// Configure API key authorization: api_key
|
|
||||||
ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
|
|
||||||
api_key.setApiKey("YOUR API KEY");
|
|
||||||
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
|
||||||
//api_key.setApiKeyPrefix("Token");
|
|
||||||
|
|
||||||
StoreApi apiInstance = new StoreApi(defaultClient);
|
|
||||||
try {
|
|
||||||
Map<String, Integer> result = apiInstance.getInventory();
|
|
||||||
System.out.println(result);
|
|
||||||
} catch (ApiException e) {
|
|
||||||
System.err.println("Exception when calling StoreApi#getInventory");
|
|
||||||
System.err.println("Status code: " + e.getCode());
|
|
||||||
System.err.println("Reason: " + e.getResponseBody());
|
|
||||||
System.err.println("Response headers: " + e.getResponseHeaders());
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
### Parameters
|
|
||||||
|
|
||||||
This endpoint does not need any parameter.
|
|
||||||
|
|
||||||
### Return type
|
|
||||||
|
|
||||||
**Map<String, Integer>**
|
|
||||||
|
|
||||||
### Authorization
|
|
||||||
|
|
||||||
[api_key](../README.md#api_key)
|
|
||||||
|
|
||||||
### HTTP request headers
|
|
||||||
|
|
||||||
- **Content-Type**: Not defined
|
|
||||||
- **Accept**: application/json
|
|
||||||
|
|
||||||
### HTTP response details
|
|
||||||
| Status code | Description | Response headers |
|
|
||||||
|-------------|-------------|------------------|
|
|
||||||
| **200** | successful operation | - |
|
|
||||||
|
|
||||||
|
|
||||||
## getOrderById
|
|
||||||
|
|
||||||
> Order getOrderById(orderId)
|
|
||||||
|
|
||||||
Find purchase order by ID
|
|
||||||
|
|
||||||
For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
|
||||||
|
|
||||||
### Example
|
|
||||||
|
|
||||||
```java
|
|
||||||
// Import classes:
|
|
||||||
import org.openapitools.client.ApiClient;
|
|
||||||
import org.openapitools.client.ApiException;
|
|
||||||
import org.openapitools.client.Configuration;
|
|
||||||
import org.openapitools.client.models.*;
|
|
||||||
import org.openapitools.client.api.StoreApi;
|
|
||||||
|
|
||||||
public class Example {
|
|
||||||
public static void main(String[] args) {
|
|
||||||
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
|
||||||
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
|
|
||||||
|
|
||||||
StoreApi apiInstance = new StoreApi(defaultClient);
|
|
||||||
Long orderId = 56L; // Long | ID of pet that needs to be fetched
|
|
||||||
try {
|
|
||||||
Order result = apiInstance.getOrderById(orderId);
|
|
||||||
System.out.println(result);
|
|
||||||
} catch (ApiException e) {
|
|
||||||
System.err.println("Exception when calling StoreApi#getOrderById");
|
|
||||||
System.err.println("Status code: " + e.getCode());
|
|
||||||
System.err.println("Reason: " + e.getResponseBody());
|
|
||||||
System.err.println("Response headers: " + e.getResponseHeaders());
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
### Parameters
|
|
||||||
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------- | ------------- | ------------- | -------------
|
|
||||||
**orderId** | **Long**| ID of pet that needs to be fetched |
|
|
||||||
|
|
||||||
### Return type
|
|
||||||
|
|
||||||
[**Order**](Order.md)
|
|
||||||
|
|
||||||
### Authorization
|
|
||||||
|
|
||||||
No authorization required
|
|
||||||
|
|
||||||
### HTTP request headers
|
|
||||||
|
|
||||||
- **Content-Type**: Not defined
|
|
||||||
- **Accept**: application/xml, application/json
|
|
||||||
|
|
||||||
### HTTP response details
|
|
||||||
| Status code | Description | Response headers |
|
|
||||||
|-------------|-------------|------------------|
|
|
||||||
| **200** | successful operation | - |
|
|
||||||
| **400** | Invalid ID supplied | - |
|
|
||||||
| **404** | Order not found | - |
|
|
||||||
|
|
||||||
|
|
||||||
## placeOrder
|
|
||||||
|
|
||||||
> Order placeOrder(body)
|
|
||||||
|
|
||||||
Place an order for a pet
|
|
||||||
|
|
||||||
### Example
|
|
||||||
|
|
||||||
```java
|
|
||||||
// Import classes:
|
|
||||||
import org.openapitools.client.ApiClient;
|
|
||||||
import org.openapitools.client.ApiException;
|
|
||||||
import org.openapitools.client.Configuration;
|
|
||||||
import org.openapitools.client.models.*;
|
|
||||||
import org.openapitools.client.api.StoreApi;
|
|
||||||
|
|
||||||
public class Example {
|
|
||||||
public static void main(String[] args) {
|
|
||||||
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
|
||||||
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
|
|
||||||
|
|
||||||
StoreApi apiInstance = new StoreApi(defaultClient);
|
|
||||||
Order body = new Order(); // Order | order placed for purchasing the pet
|
|
||||||
try {
|
|
||||||
Order result = apiInstance.placeOrder(body);
|
|
||||||
System.out.println(result);
|
|
||||||
} catch (ApiException e) {
|
|
||||||
System.err.println("Exception when calling StoreApi#placeOrder");
|
|
||||||
System.err.println("Status code: " + e.getCode());
|
|
||||||
System.err.println("Reason: " + e.getResponseBody());
|
|
||||||
System.err.println("Response headers: " + e.getResponseHeaders());
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
### Parameters
|
|
||||||
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------- | ------------- | ------------- | -------------
|
|
||||||
**body** | [**Order**](Order.md)| order placed for purchasing the pet |
|
|
||||||
|
|
||||||
### Return type
|
|
||||||
|
|
||||||
[**Order**](Order.md)
|
|
||||||
|
|
||||||
### Authorization
|
|
||||||
|
|
||||||
No authorization required
|
|
||||||
|
|
||||||
### HTTP request headers
|
|
||||||
|
|
||||||
- **Content-Type**: Not defined
|
|
||||||
- **Accept**: application/xml, application/json
|
|
||||||
|
|
||||||
### HTTP response details
|
|
||||||
| Status code | Description | Response headers |
|
|
||||||
|-------------|-------------|------------------|
|
|
||||||
| **200** | successful operation | - |
|
|
||||||
| **400** | Invalid Order | - |
|
|
||||||
|
|
@ -1,9 +0,0 @@
|
|||||||
|
|
||||||
# StringBooleanMap
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1,13 +0,0 @@
|
|||||||
|
|
||||||
|
|
||||||
# Tag
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
**id** | **Long** | | [optional]
|
|
||||||
**name** | **String** | | [optional]
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1,16 +0,0 @@
|
|||||||
|
|
||||||
|
|
||||||
# TypeHolderDefault
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
**stringItem** | **String** | |
|
|
||||||
**numberItem** | [**BigDecimal**](BigDecimal.md) | |
|
|
||||||
**integerItem** | **Integer** | |
|
|
||||||
**boolItem** | **Boolean** | |
|
|
||||||
**arrayItem** | **List<Integer>** | |
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1,17 +0,0 @@
|
|||||||
|
|
||||||
|
|
||||||
# TypeHolderExample
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
**stringItem** | **String** | |
|
|
||||||
**numberItem** | [**BigDecimal**](BigDecimal.md) | |
|
|
||||||
**floatItem** | **Float** | |
|
|
||||||
**integerItem** | **Integer** | |
|
|
||||||
**boolItem** | **Boolean** | |
|
|
||||||
**arrayItem** | **List<Integer>** | |
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1,19 +0,0 @@
|
|||||||
|
|
||||||
|
|
||||||
# User
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
**id** | **Long** | | [optional]
|
|
||||||
**username** | **String** | | [optional]
|
|
||||||
**firstName** | **String** | | [optional]
|
|
||||||
**lastName** | **String** | | [optional]
|
|
||||||
**email** | **String** | | [optional]
|
|
||||||
**password** | **String** | | [optional]
|
|
||||||
**phone** | **String** | | [optional]
|
|
||||||
**userStatus** | **Integer** | User Status | [optional]
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1,525 +0,0 @@
|
|||||||
# UserApi
|
|
||||||
|
|
||||||
All URIs are relative to *http://petstore.swagger.io:80/v2*
|
|
||||||
|
|
||||||
Method | HTTP request | Description
|
|
||||||
------------- | ------------- | -------------
|
|
||||||
[**createUser**](UserApi.md#createUser) | **POST** user | Create user
|
|
||||||
[**createUsersWithArrayInput**](UserApi.md#createUsersWithArrayInput) | **POST** user/createWithArray | Creates list of users with given input array
|
|
||||||
[**createUsersWithListInput**](UserApi.md#createUsersWithListInput) | **POST** user/createWithList | Creates list of users with given input array
|
|
||||||
[**deleteUser**](UserApi.md#deleteUser) | **DELETE** user/{username} | Delete user
|
|
||||||
[**getUserByName**](UserApi.md#getUserByName) | **GET** user/{username} | Get user by user name
|
|
||||||
[**loginUser**](UserApi.md#loginUser) | **GET** user/login | Logs user into the system
|
|
||||||
[**logoutUser**](UserApi.md#logoutUser) | **GET** user/logout | Logs out current logged in user session
|
|
||||||
[**updateUser**](UserApi.md#updateUser) | **PUT** user/{username} | Updated user
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## createUser
|
|
||||||
|
|
||||||
> createUser(body)
|
|
||||||
|
|
||||||
Create user
|
|
||||||
|
|
||||||
This can only be done by the logged in user.
|
|
||||||
|
|
||||||
### Example
|
|
||||||
|
|
||||||
```java
|
|
||||||
// Import classes:
|
|
||||||
import org.openapitools.client.ApiClient;
|
|
||||||
import org.openapitools.client.ApiException;
|
|
||||||
import org.openapitools.client.Configuration;
|
|
||||||
import org.openapitools.client.models.*;
|
|
||||||
import org.openapitools.client.api.UserApi;
|
|
||||||
|
|
||||||
public class Example {
|
|
||||||
public static void main(String[] args) {
|
|
||||||
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
|
||||||
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
|
|
||||||
|
|
||||||
UserApi apiInstance = new UserApi(defaultClient);
|
|
||||||
User body = new User(); // User | Created user object
|
|
||||||
try {
|
|
||||||
apiInstance.createUser(body);
|
|
||||||
} catch (ApiException e) {
|
|
||||||
System.err.println("Exception when calling UserApi#createUser");
|
|
||||||
System.err.println("Status code: " + e.getCode());
|
|
||||||
System.err.println("Reason: " + e.getResponseBody());
|
|
||||||
System.err.println("Response headers: " + e.getResponseHeaders());
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
### Parameters
|
|
||||||
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------- | ------------- | ------------- | -------------
|
|
||||||
**body** | [**User**](User.md)| Created user object |
|
|
||||||
|
|
||||||
### Return type
|
|
||||||
|
|
||||||
null (empty response body)
|
|
||||||
|
|
||||||
### Authorization
|
|
||||||
|
|
||||||
No authorization required
|
|
||||||
|
|
||||||
### HTTP request headers
|
|
||||||
|
|
||||||
- **Content-Type**: Not defined
|
|
||||||
- **Accept**: Not defined
|
|
||||||
|
|
||||||
### HTTP response details
|
|
||||||
| Status code | Description | Response headers |
|
|
||||||
|-------------|-------------|------------------|
|
|
||||||
| **0** | successful operation | - |
|
|
||||||
|
|
||||||
|
|
||||||
## createUsersWithArrayInput
|
|
||||||
|
|
||||||
> createUsersWithArrayInput(body)
|
|
||||||
|
|
||||||
Creates list of users with given input array
|
|
||||||
|
|
||||||
### Example
|
|
||||||
|
|
||||||
```java
|
|
||||||
// Import classes:
|
|
||||||
import org.openapitools.client.ApiClient;
|
|
||||||
import org.openapitools.client.ApiException;
|
|
||||||
import org.openapitools.client.Configuration;
|
|
||||||
import org.openapitools.client.models.*;
|
|
||||||
import org.openapitools.client.api.UserApi;
|
|
||||||
|
|
||||||
public class Example {
|
|
||||||
public static void main(String[] args) {
|
|
||||||
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
|
||||||
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
|
|
||||||
|
|
||||||
UserApi apiInstance = new UserApi(defaultClient);
|
|
||||||
List<User> body = Arrays.asList(); // List<User> | List of user object
|
|
||||||
try {
|
|
||||||
apiInstance.createUsersWithArrayInput(body);
|
|
||||||
} catch (ApiException e) {
|
|
||||||
System.err.println("Exception when calling UserApi#createUsersWithArrayInput");
|
|
||||||
System.err.println("Status code: " + e.getCode());
|
|
||||||
System.err.println("Reason: " + e.getResponseBody());
|
|
||||||
System.err.println("Response headers: " + e.getResponseHeaders());
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
### Parameters
|
|
||||||
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------- | ------------- | ------------- | -------------
|
|
||||||
**body** | [**List<User>**](User.md)| List of user object |
|
|
||||||
|
|
||||||
### Return type
|
|
||||||
|
|
||||||
null (empty response body)
|
|
||||||
|
|
||||||
### Authorization
|
|
||||||
|
|
||||||
No authorization required
|
|
||||||
|
|
||||||
### HTTP request headers
|
|
||||||
|
|
||||||
- **Content-Type**: Not defined
|
|
||||||
- **Accept**: Not defined
|
|
||||||
|
|
||||||
### HTTP response details
|
|
||||||
| Status code | Description | Response headers |
|
|
||||||
|-------------|-------------|------------------|
|
|
||||||
| **0** | successful operation | - |
|
|
||||||
|
|
||||||
|
|
||||||
## createUsersWithListInput
|
|
||||||
|
|
||||||
> createUsersWithListInput(body)
|
|
||||||
|
|
||||||
Creates list of users with given input array
|
|
||||||
|
|
||||||
### Example
|
|
||||||
|
|
||||||
```java
|
|
||||||
// Import classes:
|
|
||||||
import org.openapitools.client.ApiClient;
|
|
||||||
import org.openapitools.client.ApiException;
|
|
||||||
import org.openapitools.client.Configuration;
|
|
||||||
import org.openapitools.client.models.*;
|
|
||||||
import org.openapitools.client.api.UserApi;
|
|
||||||
|
|
||||||
public class Example {
|
|
||||||
public static void main(String[] args) {
|
|
||||||
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
|
||||||
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
|
|
||||||
|
|
||||||
UserApi apiInstance = new UserApi(defaultClient);
|
|
||||||
List<User> body = Arrays.asList(); // List<User> | List of user object
|
|
||||||
try {
|
|
||||||
apiInstance.createUsersWithListInput(body);
|
|
||||||
} catch (ApiException e) {
|
|
||||||
System.err.println("Exception when calling UserApi#createUsersWithListInput");
|
|
||||||
System.err.println("Status code: " + e.getCode());
|
|
||||||
System.err.println("Reason: " + e.getResponseBody());
|
|
||||||
System.err.println("Response headers: " + e.getResponseHeaders());
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
### Parameters
|
|
||||||
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------- | ------------- | ------------- | -------------
|
|
||||||
**body** | [**List<User>**](User.md)| List of user object |
|
|
||||||
|
|
||||||
### Return type
|
|
||||||
|
|
||||||
null (empty response body)
|
|
||||||
|
|
||||||
### Authorization
|
|
||||||
|
|
||||||
No authorization required
|
|
||||||
|
|
||||||
### HTTP request headers
|
|
||||||
|
|
||||||
- **Content-Type**: Not defined
|
|
||||||
- **Accept**: Not defined
|
|
||||||
|
|
||||||
### HTTP response details
|
|
||||||
| Status code | Description | Response headers |
|
|
||||||
|-------------|-------------|------------------|
|
|
||||||
| **0** | successful operation | - |
|
|
||||||
|
|
||||||
|
|
||||||
## deleteUser
|
|
||||||
|
|
||||||
> deleteUser(username)
|
|
||||||
|
|
||||||
Delete user
|
|
||||||
|
|
||||||
This can only be done by the logged in user.
|
|
||||||
|
|
||||||
### Example
|
|
||||||
|
|
||||||
```java
|
|
||||||
// Import classes:
|
|
||||||
import org.openapitools.client.ApiClient;
|
|
||||||
import org.openapitools.client.ApiException;
|
|
||||||
import org.openapitools.client.Configuration;
|
|
||||||
import org.openapitools.client.models.*;
|
|
||||||
import org.openapitools.client.api.UserApi;
|
|
||||||
|
|
||||||
public class Example {
|
|
||||||
public static void main(String[] args) {
|
|
||||||
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
|
||||||
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
|
|
||||||
|
|
||||||
UserApi apiInstance = new UserApi(defaultClient);
|
|
||||||
String username = "username_example"; // String | The name that needs to be deleted
|
|
||||||
try {
|
|
||||||
apiInstance.deleteUser(username);
|
|
||||||
} catch (ApiException e) {
|
|
||||||
System.err.println("Exception when calling UserApi#deleteUser");
|
|
||||||
System.err.println("Status code: " + e.getCode());
|
|
||||||
System.err.println("Reason: " + e.getResponseBody());
|
|
||||||
System.err.println("Response headers: " + e.getResponseHeaders());
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
### Parameters
|
|
||||||
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------- | ------------- | ------------- | -------------
|
|
||||||
**username** | **String**| The name that needs to be deleted |
|
|
||||||
|
|
||||||
### Return type
|
|
||||||
|
|
||||||
null (empty response body)
|
|
||||||
|
|
||||||
### Authorization
|
|
||||||
|
|
||||||
No authorization required
|
|
||||||
|
|
||||||
### HTTP request headers
|
|
||||||
|
|
||||||
- **Content-Type**: Not defined
|
|
||||||
- **Accept**: Not defined
|
|
||||||
|
|
||||||
### HTTP response details
|
|
||||||
| Status code | Description | Response headers |
|
|
||||||
|-------------|-------------|------------------|
|
|
||||||
| **400** | Invalid username supplied | - |
|
|
||||||
| **404** | User not found | - |
|
|
||||||
|
|
||||||
|
|
||||||
## getUserByName
|
|
||||||
|
|
||||||
> User getUserByName(username)
|
|
||||||
|
|
||||||
Get user by user name
|
|
||||||
|
|
||||||
### Example
|
|
||||||
|
|
||||||
```java
|
|
||||||
// Import classes:
|
|
||||||
import org.openapitools.client.ApiClient;
|
|
||||||
import org.openapitools.client.ApiException;
|
|
||||||
import org.openapitools.client.Configuration;
|
|
||||||
import org.openapitools.client.models.*;
|
|
||||||
import org.openapitools.client.api.UserApi;
|
|
||||||
|
|
||||||
public class Example {
|
|
||||||
public static void main(String[] args) {
|
|
||||||
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
|
||||||
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
|
|
||||||
|
|
||||||
UserApi apiInstance = new UserApi(defaultClient);
|
|
||||||
String username = "username_example"; // String | The name that needs to be fetched. Use user1 for testing.
|
|
||||||
try {
|
|
||||||
User result = apiInstance.getUserByName(username);
|
|
||||||
System.out.println(result);
|
|
||||||
} catch (ApiException e) {
|
|
||||||
System.err.println("Exception when calling UserApi#getUserByName");
|
|
||||||
System.err.println("Status code: " + e.getCode());
|
|
||||||
System.err.println("Reason: " + e.getResponseBody());
|
|
||||||
System.err.println("Response headers: " + e.getResponseHeaders());
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
### Parameters
|
|
||||||
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------- | ------------- | ------------- | -------------
|
|
||||||
**username** | **String**| The name that needs to be fetched. Use user1 for testing. |
|
|
||||||
|
|
||||||
### Return type
|
|
||||||
|
|
||||||
[**User**](User.md)
|
|
||||||
|
|
||||||
### Authorization
|
|
||||||
|
|
||||||
No authorization required
|
|
||||||
|
|
||||||
### HTTP request headers
|
|
||||||
|
|
||||||
- **Content-Type**: Not defined
|
|
||||||
- **Accept**: application/xml, application/json
|
|
||||||
|
|
||||||
### HTTP response details
|
|
||||||
| Status code | Description | Response headers |
|
|
||||||
|-------------|-------------|------------------|
|
|
||||||
| **200** | successful operation | - |
|
|
||||||
| **400** | Invalid username supplied | - |
|
|
||||||
| **404** | User not found | - |
|
|
||||||
|
|
||||||
|
|
||||||
## loginUser
|
|
||||||
|
|
||||||
> String loginUser(username, password)
|
|
||||||
|
|
||||||
Logs user into the system
|
|
||||||
|
|
||||||
### Example
|
|
||||||
|
|
||||||
```java
|
|
||||||
// Import classes:
|
|
||||||
import org.openapitools.client.ApiClient;
|
|
||||||
import org.openapitools.client.ApiException;
|
|
||||||
import org.openapitools.client.Configuration;
|
|
||||||
import org.openapitools.client.models.*;
|
|
||||||
import org.openapitools.client.api.UserApi;
|
|
||||||
|
|
||||||
public class Example {
|
|
||||||
public static void main(String[] args) {
|
|
||||||
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
|
||||||
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
|
|
||||||
|
|
||||||
UserApi apiInstance = new UserApi(defaultClient);
|
|
||||||
String username = "username_example"; // String | The user name for login
|
|
||||||
String password = "password_example"; // String | The password for login in clear text
|
|
||||||
try {
|
|
||||||
String result = apiInstance.loginUser(username, password);
|
|
||||||
System.out.println(result);
|
|
||||||
} catch (ApiException e) {
|
|
||||||
System.err.println("Exception when calling UserApi#loginUser");
|
|
||||||
System.err.println("Status code: " + e.getCode());
|
|
||||||
System.err.println("Reason: " + e.getResponseBody());
|
|
||||||
System.err.println("Response headers: " + e.getResponseHeaders());
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
### Parameters
|
|
||||||
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------- | ------------- | ------------- | -------------
|
|
||||||
**username** | **String**| The user name for login |
|
|
||||||
**password** | **String**| The password for login in clear text |
|
|
||||||
|
|
||||||
### Return type
|
|
||||||
|
|
||||||
**String**
|
|
||||||
|
|
||||||
### Authorization
|
|
||||||
|
|
||||||
No authorization required
|
|
||||||
|
|
||||||
### HTTP request headers
|
|
||||||
|
|
||||||
- **Content-Type**: Not defined
|
|
||||||
- **Accept**: application/xml, application/json
|
|
||||||
|
|
||||||
### HTTP response details
|
|
||||||
| Status code | Description | Response headers |
|
|
||||||
|-------------|-------------|------------------|
|
|
||||||
| **200** | successful operation | * X-Rate-Limit - calls per hour allowed by the user <br> * X-Expires-After - date in UTC when token expires <br> |
|
|
||||||
| **400** | Invalid username/password supplied | - |
|
|
||||||
|
|
||||||
|
|
||||||
## logoutUser
|
|
||||||
|
|
||||||
> logoutUser()
|
|
||||||
|
|
||||||
Logs out current logged in user session
|
|
||||||
|
|
||||||
### Example
|
|
||||||
|
|
||||||
```java
|
|
||||||
// Import classes:
|
|
||||||
import org.openapitools.client.ApiClient;
|
|
||||||
import org.openapitools.client.ApiException;
|
|
||||||
import org.openapitools.client.Configuration;
|
|
||||||
import org.openapitools.client.models.*;
|
|
||||||
import org.openapitools.client.api.UserApi;
|
|
||||||
|
|
||||||
public class Example {
|
|
||||||
public static void main(String[] args) {
|
|
||||||
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
|
||||||
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
|
|
||||||
|
|
||||||
UserApi apiInstance = new UserApi(defaultClient);
|
|
||||||
try {
|
|
||||||
apiInstance.logoutUser();
|
|
||||||
} catch (ApiException e) {
|
|
||||||
System.err.println("Exception when calling UserApi#logoutUser");
|
|
||||||
System.err.println("Status code: " + e.getCode());
|
|
||||||
System.err.println("Reason: " + e.getResponseBody());
|
|
||||||
System.err.println("Response headers: " + e.getResponseHeaders());
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
### Parameters
|
|
||||||
|
|
||||||
This endpoint does not need any parameter.
|
|
||||||
|
|
||||||
### Return type
|
|
||||||
|
|
||||||
null (empty response body)
|
|
||||||
|
|
||||||
### Authorization
|
|
||||||
|
|
||||||
No authorization required
|
|
||||||
|
|
||||||
### HTTP request headers
|
|
||||||
|
|
||||||
- **Content-Type**: Not defined
|
|
||||||
- **Accept**: Not defined
|
|
||||||
|
|
||||||
### HTTP response details
|
|
||||||
| Status code | Description | Response headers |
|
|
||||||
|-------------|-------------|------------------|
|
|
||||||
| **0** | successful operation | - |
|
|
||||||
|
|
||||||
|
|
||||||
## updateUser
|
|
||||||
|
|
||||||
> updateUser(username, body)
|
|
||||||
|
|
||||||
Updated user
|
|
||||||
|
|
||||||
This can only be done by the logged in user.
|
|
||||||
|
|
||||||
### Example
|
|
||||||
|
|
||||||
```java
|
|
||||||
// Import classes:
|
|
||||||
import org.openapitools.client.ApiClient;
|
|
||||||
import org.openapitools.client.ApiException;
|
|
||||||
import org.openapitools.client.Configuration;
|
|
||||||
import org.openapitools.client.models.*;
|
|
||||||
import org.openapitools.client.api.UserApi;
|
|
||||||
|
|
||||||
public class Example {
|
|
||||||
public static void main(String[] args) {
|
|
||||||
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
|
||||||
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
|
|
||||||
|
|
||||||
UserApi apiInstance = new UserApi(defaultClient);
|
|
||||||
String username = "username_example"; // String | name that need to be deleted
|
|
||||||
User body = new User(); // User | Updated user object
|
|
||||||
try {
|
|
||||||
apiInstance.updateUser(username, body);
|
|
||||||
} catch (ApiException e) {
|
|
||||||
System.err.println("Exception when calling UserApi#updateUser");
|
|
||||||
System.err.println("Status code: " + e.getCode());
|
|
||||||
System.err.println("Reason: " + e.getResponseBody());
|
|
||||||
System.err.println("Response headers: " + e.getResponseHeaders());
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
### Parameters
|
|
||||||
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------- | ------------- | ------------- | -------------
|
|
||||||
**username** | **String**| name that need to be deleted |
|
|
||||||
**body** | [**User**](User.md)| Updated user object |
|
|
||||||
|
|
||||||
### Return type
|
|
||||||
|
|
||||||
null (empty response body)
|
|
||||||
|
|
||||||
### Authorization
|
|
||||||
|
|
||||||
No authorization required
|
|
||||||
|
|
||||||
### HTTP request headers
|
|
||||||
|
|
||||||
- **Content-Type**: Not defined
|
|
||||||
- **Accept**: Not defined
|
|
||||||
|
|
||||||
### HTTP response details
|
|
||||||
| Status code | Description | Response headers |
|
|
||||||
|-------------|-------------|------------------|
|
|
||||||
| **400** | Invalid user supplied | - |
|
|
||||||
| **404** | User not found | - |
|
|
||||||
|
|
@ -1,40 +0,0 @@
|
|||||||
|
|
||||||
|
|
||||||
# XmlItem
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
**attributeString** | **String** | | [optional]
|
|
||||||
**attributeNumber** | [**BigDecimal**](BigDecimal.md) | | [optional]
|
|
||||||
**attributeInteger** | **Integer** | | [optional]
|
|
||||||
**attributeBoolean** | **Boolean** | | [optional]
|
|
||||||
**wrappedArray** | **List<Integer>** | | [optional]
|
|
||||||
**nameString** | **String** | | [optional]
|
|
||||||
**nameNumber** | [**BigDecimal**](BigDecimal.md) | | [optional]
|
|
||||||
**nameInteger** | **Integer** | | [optional]
|
|
||||||
**nameBoolean** | **Boolean** | | [optional]
|
|
||||||
**nameArray** | **List<Integer>** | | [optional]
|
|
||||||
**nameWrappedArray** | **List<Integer>** | | [optional]
|
|
||||||
**prefixString** | **String** | | [optional]
|
|
||||||
**prefixNumber** | [**BigDecimal**](BigDecimal.md) | | [optional]
|
|
||||||
**prefixInteger** | **Integer** | | [optional]
|
|
||||||
**prefixBoolean** | **Boolean** | | [optional]
|
|
||||||
**prefixArray** | **List<Integer>** | | [optional]
|
|
||||||
**prefixWrappedArray** | **List<Integer>** | | [optional]
|
|
||||||
**namespaceString** | **String** | | [optional]
|
|
||||||
**namespaceNumber** | [**BigDecimal**](BigDecimal.md) | | [optional]
|
|
||||||
**namespaceInteger** | **Integer** | | [optional]
|
|
||||||
**namespaceBoolean** | **Boolean** | | [optional]
|
|
||||||
**namespaceArray** | **List<Integer>** | | [optional]
|
|
||||||
**namespaceWrappedArray** | **List<Integer>** | | [optional]
|
|
||||||
**prefixNsString** | **String** | | [optional]
|
|
||||||
**prefixNsNumber** | [**BigDecimal**](BigDecimal.md) | | [optional]
|
|
||||||
**prefixNsInteger** | **Integer** | | [optional]
|
|
||||||
**prefixNsBoolean** | **Boolean** | | [optional]
|
|
||||||
**prefixNsArray** | **List<Integer>** | | [optional]
|
|
||||||
**prefixNsWrappedArray** | **List<Integer>** | | [optional]
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -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'
|
|
||||||
|
|
@ -1,2 +0,0 @@
|
|||||||
# Uncomment to build for Android
|
|
||||||
#target = android
|
|
Binary file not shown.
@ -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
|
|
@ -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" "$@"
|
|
@ -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
|
|
@ -1,300 +0,0 @@
|
|||||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
||||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
|
||||||
<groupId>org.openapitools</groupId>
|
|
||||||
<artifactId>petstore-java-client-retrofit2-play24</artifactId>
|
|
||||||
<packaging>jar</packaging>
|
|
||||||
<name>petstore-java-client-retrofit2-play24</name>
|
|
||||||
<version>1.0.0</version>
|
|
||||||
<url>https://github.com/openapitools/openapi-generator</url>
|
|
||||||
<description>OpenAPI Java</description>
|
|
||||||
<scm>
|
|
||||||
<connection>scm:git:git@github.com:openapitools/openapi-generator.git</connection>
|
|
||||||
<developerConnection>scm:git:git@github.com:openapitools/openapi-generator.git</developerConnection>
|
|
||||||
<url>https://github.com/openapitools/openapi-generator</url>
|
|
||||||
</scm>
|
|
||||||
|
|
||||||
<licenses>
|
|
||||||
<license>
|
|
||||||
<name>Unlicense</name>
|
|
||||||
<url>https://www.apache.org/licenses/LICENSE-2.0.html</url>
|
|
||||||
<distribution>repo</distribution>
|
|
||||||
</license>
|
|
||||||
</licenses>
|
|
||||||
|
|
||||||
<developers>
|
|
||||||
<developer>
|
|
||||||
<name>OpenAPI-Generator Contributors</name>
|
|
||||||
<email>team@openapitools.org</email>
|
|
||||||
<organization>OpenAPITools.org</organization>
|
|
||||||
<organizationUrl>http://openapitools.org</organizationUrl>
|
|
||||||
</developer>
|
|
||||||
</developers>
|
|
||||||
|
|
||||||
<build>
|
|
||||||
<plugins>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-enforcer-plugin</artifactId>
|
|
||||||
<version>3.0.0-M1</version>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<id>enforce-maven</id>
|
|
||||||
<goals>
|
|
||||||
<goal>enforce</goal>
|
|
||||||
</goals>
|
|
||||||
<configuration>
|
|
||||||
<rules>
|
|
||||||
<requireMavenVersion>
|
|
||||||
<version>2.2.0</version>
|
|
||||||
</requireMavenVersion>
|
|
||||||
</rules>
|
|
||||||
</configuration>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-surefire-plugin</artifactId>
|
|
||||||
<version>2.12</version>
|
|
||||||
<configuration>
|
|
||||||
<systemProperties>
|
|
||||||
<property>
|
|
||||||
<name>loggerPath</name>
|
|
||||||
<value>conf/log4j.properties</value>
|
|
||||||
</property>
|
|
||||||
</systemProperties>
|
|
||||||
<argLine>-Xms512m -Xmx1500m</argLine>
|
|
||||||
<parallel>methods</parallel>
|
|
||||||
<forkMode>pertest</forkMode>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<artifactId>maven-dependency-plugin</artifactId>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<phase>package</phase>
|
|
||||||
<goals>
|
|
||||||
<goal>copy-dependencies</goal>
|
|
||||||
</goals>
|
|
||||||
<configuration>
|
|
||||||
<outputDirectory>${project.build.directory}/lib</outputDirectory>
|
|
||||||
</configuration>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
|
|
||||||
<!-- attach test jar -->
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-jar-plugin</artifactId>
|
|
||||||
<version>2.2</version>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<goals>
|
|
||||||
<goal>jar</goal>
|
|
||||||
<goal>test-jar</goal>
|
|
||||||
</goals>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
<configuration>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
|
||||||
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.codehaus.mojo</groupId>
|
|
||||||
<artifactId>build-helper-maven-plugin</artifactId>
|
|
||||||
<version>1.10</version>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<id>add_sources</id>
|
|
||||||
<phase>generate-sources</phase>
|
|
||||||
<goals>
|
|
||||||
<goal>add-source</goal>
|
|
||||||
</goals>
|
|
||||||
<configuration>
|
|
||||||
<sources>
|
|
||||||
<source>src/main/java</source>
|
|
||||||
</sources>
|
|
||||||
</configuration>
|
|
||||||
</execution>
|
|
||||||
<execution>
|
|
||||||
<id>add_test_sources</id>
|
|
||||||
<phase>generate-test-sources</phase>
|
|
||||||
<goals>
|
|
||||||
<goal>add-test-source</goal>
|
|
||||||
</goals>
|
|
||||||
<configuration>
|
|
||||||
<sources>
|
|
||||||
<source>src/test/java</source>
|
|
||||||
</sources>
|
|
||||||
</configuration>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-javadoc-plugin</artifactId>
|
|
||||||
<version>3.1.1</version>
|
|
||||||
<configuration>
|
|
||||||
<doclint>none</doclint>
|
|
||||||
</configuration>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<id>attach-javadocs</id>
|
|
||||||
<goals>
|
|
||||||
<goal>jar</goal>
|
|
||||||
</goals>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-source-plugin</artifactId>
|
|
||||||
<version>2.2.1</version>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<id>attach-sources</id>
|
|
||||||
<goals>
|
|
||||||
<goal>jar-no-fork</goal>
|
|
||||||
</goals>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
|
||||||
</build>
|
|
||||||
|
|
||||||
<profiles>
|
|
||||||
<profile>
|
|
||||||
<id>sign-artifacts</id>
|
|
||||||
<build>
|
|
||||||
<plugins>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-gpg-plugin</artifactId>
|
|
||||||
<version>1.5</version>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<id>sign-artifacts</id>
|
|
||||||
<phase>verify</phase>
|
|
||||||
<goals>
|
|
||||||
<goal>sign</goal>
|
|
||||||
</goals>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
|
||||||
</build>
|
|
||||||
</profile>
|
|
||||||
</profiles>
|
|
||||||
|
|
||||||
<dependencies>
|
|
||||||
<dependency>
|
|
||||||
<groupId>io.swagger</groupId>
|
|
||||||
<artifactId>swagger-annotations</artifactId>
|
|
||||||
<version>${swagger-annotations-version}</version>
|
|
||||||
</dependency>
|
|
||||||
<!-- @Nullable annotation -->
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.google.code.findbugs</groupId>
|
|
||||||
<artifactId>jsr305</artifactId>
|
|
||||||
<version>3.0.2</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.squareup.retrofit2</groupId>
|
|
||||||
<artifactId>converter-gson</artifactId>
|
|
||||||
<version>${retrofit-version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.squareup.retrofit2</groupId>
|
|
||||||
<artifactId>retrofit</artifactId>
|
|
||||||
<version>${retrofit-version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.squareup.retrofit2</groupId>
|
|
||||||
<artifactId>converter-scalars</artifactId>
|
|
||||||
<version>${retrofit-version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.apache.oltu.oauth2</groupId>
|
|
||||||
<artifactId>org.apache.oltu.oauth2.client</artifactId>
|
|
||||||
<version>${oltu-version}</version>
|
|
||||||
<exclusions>
|
|
||||||
<exclusion>
|
|
||||||
<groupId>org.apache.oltu.oauth2</groupId>
|
|
||||||
<artifactId>common</artifactId>
|
|
||||||
</exclusion>
|
|
||||||
</exclusions>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>io.gsonfire</groupId>
|
|
||||||
<artifactId>gson-fire</artifactId>
|
|
||||||
<version>${gson-fire-version}</version>
|
|
||||||
</dependency>
|
|
||||||
<!-- JSON processing: jackson -->
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.squareup.retrofit2</groupId>
|
|
||||||
<artifactId>converter-jackson</artifactId>
|
|
||||||
<version>${retrofit-version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.fasterxml.jackson.core</groupId>
|
|
||||||
<artifactId>jackson-core</artifactId>
|
|
||||||
<version>${jackson-version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.fasterxml.jackson.core</groupId>
|
|
||||||
<artifactId>jackson-annotations</artifactId>
|
|
||||||
<version>${jackson-version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.fasterxml.jackson.core</groupId>
|
|
||||||
<artifactId>jackson-databind</artifactId>
|
|
||||||
<version>${jackson-databind-version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.fasterxml.jackson.datatype</groupId>
|
|
||||||
<artifactId>jackson-datatype-jsr310</artifactId>
|
|
||||||
<version>${jackson-version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.typesafe.play</groupId>
|
|
||||||
<artifactId>play-java-ws_2.11</artifactId>
|
|
||||||
<version>${play-version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.openapitools</groupId>
|
|
||||||
<artifactId>jackson-databind-nullable</artifactId>
|
|
||||||
<version>${jackson-databind-nullable-version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>javax.annotation</groupId>
|
|
||||||
<artifactId>javax.annotation-api</artifactId>
|
|
||||||
<version>${javax-annotation-version}</version>
|
|
||||||
<scope>provided</scope>
|
|
||||||
</dependency>
|
|
||||||
<!-- test dependencies -->
|
|
||||||
<dependency>
|
|
||||||
<groupId>junit</groupId>
|
|
||||||
<artifactId>junit</artifactId>
|
|
||||||
<version>${junit-version}</version>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
|
||||||
<properties>
|
|
||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
|
||||||
<java.version>1.8</java.version>
|
|
||||||
<maven.compiler.source>${java.version}</maven.compiler.source>
|
|
||||||
<maven.compiler.target>${java.version}</maven.compiler.target>
|
|
||||||
<gson-fire-version>1.8.3</gson-fire-version>
|
|
||||||
<swagger-annotations-version>1.5.22</swagger-annotations-version>
|
|
||||||
<jackson-databind-version>2.10.3</jackson-databind-version>
|
|
||||||
<jackson-version>2.6.6</jackson-version>
|
|
||||||
<play-version>2.4.11</play-version>
|
|
||||||
<jackson-databind-nullable-version>0.2.1</jackson-databind-nullable-version>
|
|
||||||
<retrofit-version>2.5.0</retrofit-version>
|
|
||||||
<javax-annotation-version>1.3.2</javax-annotation-version>
|
|
||||||
<oltu-version>1.0.1</oltu-version>
|
|
||||||
<junit-version>4.13</junit-version>
|
|
||||||
</properties>
|
|
||||||
</project>
|
|
@ -1 +0,0 @@
|
|||||||
rootProject.name = "petstore-java-client-retrofit2-play24"
|
|
@ -1,3 +0,0 @@
|
|||||||
<manifest package="org.openapitools.client" xmlns:android="http://schemas.android.com/apk/res/android">
|
|
||||||
<application />
|
|
||||||
</manifest>
|
|
@ -1,142 +0,0 @@
|
|||||||
package org.openapitools.client;
|
|
||||||
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.lang.annotation.Annotation;
|
|
||||||
import java.lang.reflect.Type;
|
|
||||||
import java.util.*;
|
|
||||||
|
|
||||||
import retrofit2.Retrofit;
|
|
||||||
import retrofit2.converter.scalars.ScalarsConverterFactory;
|
|
||||||
import retrofit2.converter.jackson.JacksonConverterFactory;
|
|
||||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
|
||||||
import org.openapitools.jackson.nullable.JsonNullableModule;
|
|
||||||
|
|
||||||
import play.libs.Json;
|
|
||||||
import play.libs.ws.WSClient;
|
|
||||||
|
|
||||||
import org.openapitools.client.Play24CallAdapterFactory;
|
|
||||||
import org.openapitools.client.Play24CallFactory;
|
|
||||||
|
|
||||||
import okhttp3.Interceptor;
|
|
||||||
import org.openapitools.client.auth.ApiKeyAuth;
|
|
||||||
import org.openapitools.client.auth.Authentication;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* API client
|
|
||||||
*/
|
|
||||||
public class ApiClient {
|
|
||||||
|
|
||||||
/** Underlying HTTP-client */
|
|
||||||
private WSClient wsClient;
|
|
||||||
|
|
||||||
/** Supported auths */
|
|
||||||
private Map<String, Authentication> authentications;
|
|
||||||
|
|
||||||
/** API base path */
|
|
||||||
private String basePath = "http://petstore.swagger.io:80/v2";
|
|
||||||
|
|
||||||
public ApiClient(WSClient wsClient) {
|
|
||||||
this();
|
|
||||||
this.wsClient = wsClient;
|
|
||||||
}
|
|
||||||
|
|
||||||
public ApiClient() {
|
|
||||||
// Setup authentications (key: authentication name, value: authentication).
|
|
||||||
authentications = new HashMap<>();
|
|
||||||
authentications.put("api_key", new ApiKeyAuth("header", "api_key"));
|
|
||||||
authentications.put("api_key_query", new ApiKeyAuth("query", "api_key_query"));
|
|
||||||
// authentications.put("http_basic_test", new HttpBasicAuth());
|
|
||||||
// authentications.put("petstore_auth", new OAuth());
|
|
||||||
// Prevent the authentications from being modified.
|
|
||||||
authentications = Collections.unmodifiableMap(authentications);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Creates a retrofit2 client for given API interface
|
|
||||||
*/
|
|
||||||
public <S> S createService(Class<S> serviceClass) {
|
|
||||||
if(!basePath.endsWith("/")) {
|
|
||||||
basePath = basePath + "/";
|
|
||||||
}
|
|
||||||
|
|
||||||
Map<String, String> extraHeaders = new HashMap<>();
|
|
||||||
Map<String, String> extraCookies = new HashMap<>();
|
|
||||||
List<Pair> extraQueryParams = new ArrayList<>();
|
|
||||||
|
|
||||||
for (String authName : authentications.keySet()) {
|
|
||||||
Authentication auth = authentications.get(authName);
|
|
||||||
if (auth == null) throw new RuntimeException("Authentication undefined: " + authName);
|
|
||||||
|
|
||||||
auth.applyToParams(extraQueryParams, extraHeaders, extraCookies);
|
|
||||||
}
|
|
||||||
|
|
||||||
ObjectMapper mapper = Json.mapper();
|
|
||||||
JsonNullableModule jnm = new JsonNullableModule();
|
|
||||||
mapper.registerModule(jnm);
|
|
||||||
|
|
||||||
return new Retrofit.Builder()
|
|
||||||
.baseUrl(basePath)
|
|
||||||
.addConverterFactory(ScalarsConverterFactory.create())
|
|
||||||
.addConverterFactory(JacksonConverterFactory.create(mapper))
|
|
||||||
.callFactory(new Play24CallFactory(wsClient, extraHeaders, extraCookies, extraQueryParams))
|
|
||||||
.addCallAdapterFactory(new Play24CallAdapterFactory())
|
|
||||||
.build()
|
|
||||||
.create(serviceClass);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Helper method to set API base path
|
|
||||||
*/
|
|
||||||
public ApiClient setBasePath(String basePath) {
|
|
||||||
this.basePath = basePath;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get authentications (key: authentication name, value: authentication).
|
|
||||||
*/
|
|
||||||
public Map<String, Authentication> getAuthentications() {
|
|
||||||
return authentications;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get authentication for the given name.
|
|
||||||
*
|
|
||||||
* @param authName The authentication name
|
|
||||||
* @return The authentication, null if not found
|
|
||||||
*/
|
|
||||||
public Authentication getAuthentication(String authName) {
|
|
||||||
return authentications.get(authName);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Helper method to set API key value for the first API key authentication.
|
|
||||||
*/
|
|
||||||
public ApiClient setApiKey(String apiKey) {
|
|
||||||
for (Authentication auth : authentications.values()) {
|
|
||||||
if (auth instanceof ApiKeyAuth) {
|
|
||||||
((ApiKeyAuth) auth).setApiKey(apiKey);
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
throw new RuntimeException("No API key authentication configured!");
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Helper method to set API key prefix for the first API key authentication.
|
|
||||||
*/
|
|
||||||
public ApiClient setApiKeyPrefix(String apiKeyPrefix) {
|
|
||||||
for (Authentication auth : authentications.values()) {
|
|
||||||
if (auth instanceof ApiKeyAuth) {
|
|
||||||
((ApiKeyAuth) auth).setApiKeyPrefix(apiKeyPrefix);
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
throw new RuntimeException("No API key authentication configured!");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
@ -1,99 +0,0 @@
|
|||||||
package org.openapitools.client;
|
|
||||||
|
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
public class CollectionFormats {
|
|
||||||
|
|
||||||
public static class CSVParams {
|
|
||||||
|
|
||||||
protected List<String> params;
|
|
||||||
|
|
||||||
public CSVParams() {
|
|
||||||
}
|
|
||||||
|
|
||||||
public CSVParams(List<String> params) {
|
|
||||||
this.params = params;
|
|
||||||
}
|
|
||||||
|
|
||||||
public CSVParams(String... params) {
|
|
||||||
this.params = Arrays.asList(params);
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<String> getParams() {
|
|
||||||
return params;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setParams(List<String> params) {
|
|
||||||
this.params = params;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String toString() {
|
|
||||||
return StringUtil.join(params.toArray(new String[0]), ",");
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public static class SPACEParams extends SSVParams {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public static class SSVParams extends CSVParams {
|
|
||||||
|
|
||||||
public SSVParams() {
|
|
||||||
}
|
|
||||||
|
|
||||||
public SSVParams(List<String> params) {
|
|
||||||
super(params);
|
|
||||||
}
|
|
||||||
|
|
||||||
public SSVParams(String... params) {
|
|
||||||
super(params);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String toString() {
|
|
||||||
return StringUtil.join(params.toArray(new String[0]), " ");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static class TSVParams extends CSVParams {
|
|
||||||
|
|
||||||
public TSVParams() {
|
|
||||||
}
|
|
||||||
|
|
||||||
public TSVParams(List<String> params) {
|
|
||||||
super(params);
|
|
||||||
}
|
|
||||||
|
|
||||||
public TSVParams(String... params) {
|
|
||||||
super(params);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String toString() {
|
|
||||||
return StringUtil.join( params.toArray(new String[0]), "\t");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static class PIPESParams extends CSVParams {
|
|
||||||
|
|
||||||
public PIPESParams() {
|
|
||||||
}
|
|
||||||
|
|
||||||
public PIPESParams(List<String> params) {
|
|
||||||
super(params);
|
|
||||||
}
|
|
||||||
|
|
||||||
public PIPESParams(String... params) {
|
|
||||||
super(params);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String toString() {
|
|
||||||
return StringUtil.join(params.toArray(new String[0]), "|");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -1,61 +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;
|
|
||||||
|
|
||||||
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
|
|
||||||
public class Pair {
|
|
||||||
private String name = "";
|
|
||||||
private String value = "";
|
|
||||||
|
|
||||||
public Pair (String name, String value) {
|
|
||||||
setName(name);
|
|
||||||
setValue(value);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void setName(String name) {
|
|
||||||
if (!isValidString(name)) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
this.name = name;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void setValue(String value) {
|
|
||||||
if (!isValidString(value)) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
this.value = value;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getName() {
|
|
||||||
return this.name;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getValue() {
|
|
||||||
return this.value;
|
|
||||||
}
|
|
||||||
|
|
||||||
private boolean isValidString(String arg) {
|
|
||||||
if (arg == null) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (arg.trim().isEmpty()) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,100 +0,0 @@
|
|||||||
package org.openapitools.client;
|
|
||||||
|
|
||||||
import play.libs.F;
|
|
||||||
import retrofit2.*;
|
|
||||||
|
|
||||||
import java.lang.annotation.Annotation;
|
|
||||||
import java.lang.reflect.ParameterizedType;
|
|
||||||
import java.lang.reflect.Type;
|
|
||||||
import java.lang.reflect.WildcardType;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Creates {@link CallAdapter} instances that convert {@link Call} into {@link play.libs.F.Promise}
|
|
||||||
*/
|
|
||||||
public class Play24CallAdapterFactory extends CallAdapter.Factory {
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public CallAdapter<?, ?> get(Type returnType, Annotation[] annotations, Retrofit retrofit) {
|
|
||||||
if (!(returnType instanceof ParameterizedType)) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
ParameterizedType type = (ParameterizedType) returnType;
|
|
||||||
if (type.getRawType() != F.Promise.class) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
return createAdapter((ParameterizedType) returnType);
|
|
||||||
}
|
|
||||||
|
|
||||||
private CallAdapter<?, F.Promise<?>> createAdapter(ParameterizedType returnType) {
|
|
||||||
Type[] types = returnType.getActualTypeArguments();
|
|
||||||
if (types.length != 1) {
|
|
||||||
throw new IllegalStateException("Must be exactly one type parameter");
|
|
||||||
}
|
|
||||||
|
|
||||||
Type resultType = types[0];
|
|
||||||
Class<?> rawTypeParam = getRawType(resultType);
|
|
||||||
|
|
||||||
boolean includeResponse = false;
|
|
||||||
if (rawTypeParam == Response.class) {
|
|
||||||
if (!(resultType instanceof ParameterizedType)) {
|
|
||||||
throw new IllegalStateException("Response must be parameterized"
|
|
||||||
+ " as Response<T>");
|
|
||||||
}
|
|
||||||
resultType = ((ParameterizedType) resultType).getActualTypeArguments()[0];
|
|
||||||
includeResponse = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
return new ValueAdapter(resultType, includeResponse);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Adapter that coverts values returned by API interface into CompletionStage
|
|
||||||
*/
|
|
||||||
private static final class ValueAdapter<R> implements CallAdapter<R, F.Promise<R>> {
|
|
||||||
|
|
||||||
private final Type responseType;
|
|
||||||
private final boolean includeResponse;
|
|
||||||
|
|
||||||
ValueAdapter(Type responseType, boolean includeResponse) {
|
|
||||||
this.responseType = responseType;
|
|
||||||
this.includeResponse = includeResponse;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Type responseType() {
|
|
||||||
return responseType;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public F.Promise<R> adapt(final Call<R> call) {
|
|
||||||
final F.RedeemablePromise<R> promise = F.RedeemablePromise.empty();
|
|
||||||
|
|
||||||
call.enqueue(new Callback<R>() {
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onResponse(Call<R> call, Response<R> response) {
|
|
||||||
if (response.isSuccessful()) {
|
|
||||||
if (includeResponse) {
|
|
||||||
promise.success((R) response);
|
|
||||||
} else {
|
|
||||||
promise.success(response.body());
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
promise.failure(new HttpException(response));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onFailure(Call<R> call, Throwable t) {
|
|
||||||
promise.failure(t);
|
|
||||||
}
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
return promise;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -1,245 +0,0 @@
|
|||||||
package org.openapitools.client;
|
|
||||||
|
|
||||||
import okhttp3.*;
|
|
||||||
import okio.Buffer;
|
|
||||||
import okio.BufferedSource;
|
|
||||||
import play.libs.F;
|
|
||||||
import play.libs.ws.WSClient;
|
|
||||||
import play.libs.ws.WSRequest;
|
|
||||||
import play.libs.ws.WSResponse;
|
|
||||||
import play.libs.ws.WSCookie;
|
|
||||||
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.net.MalformedURLException;
|
|
||||||
import java.net.URI;
|
|
||||||
import java.net.URISyntaxException;
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.Optional;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Creates {@link Call} instances that invoke underlying {@link WSClient}
|
|
||||||
*/
|
|
||||||
public class Play24CallFactory implements okhttp3.Call.Factory {
|
|
||||||
|
|
||||||
/** PlayWS http client */
|
|
||||||
private final WSClient wsClient;
|
|
||||||
|
|
||||||
/** Extra headers to add to request */
|
|
||||||
private Map<String, String> extraHeaders = new HashMap<>();
|
|
||||||
|
|
||||||
/** Extra cookies to add to request */
|
|
||||||
private Map<String, String> extraCookies = new HashMap<>();
|
|
||||||
|
|
||||||
/** Extra query parameters to add to request */
|
|
||||||
private List<Pair> extraQueryParams = new ArrayList<>();
|
|
||||||
|
|
||||||
public Play24CallFactory(WSClient wsClient) {
|
|
||||||
this.wsClient = wsClient;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Play24CallFactory(WSClient wsClient, Map<String, String> extraHeaders,
|
|
||||||
Map<String, String> extraCookies,
|
|
||||||
List<Pair> extraQueryParams) {
|
|
||||||
this.wsClient = wsClient;
|
|
||||||
|
|
||||||
this.extraHeaders.putAll(extraHeaders);
|
|
||||||
this.extraCookies.putAll(extraCookies);
|
|
||||||
this.extraQueryParams.addAll(extraQueryParams);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Call newCall(Request request) {
|
|
||||||
// add extra headers
|
|
||||||
Request.Builder rb = request.newBuilder();
|
|
||||||
for (Map.Entry<String, String> header : this.extraHeaders.entrySet()) {
|
|
||||||
rb.addHeader(header.getKey(), header.getValue());
|
|
||||||
}
|
|
||||||
for (Map.Entry<String, String> cookie : this.extraCookies.entrySet()) {
|
|
||||||
rb.addHeader("Cookie", String.format("%s=%s", cookie.getKey(), cookie.getValue()));
|
|
||||||
}
|
|
||||||
|
|
||||||
// add extra query params
|
|
||||||
if (!this.extraQueryParams.isEmpty()) {
|
|
||||||
String newQuery = request.url().uri().getQuery();
|
|
||||||
for (Pair queryParam : this.extraQueryParams) {
|
|
||||||
String param = String.format("%s=%s", queryParam.getName(), queryParam.getValue());
|
|
||||||
if (newQuery == null) {
|
|
||||||
newQuery = param;
|
|
||||||
} else {
|
|
||||||
newQuery += "&" + param;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
URI newUri;
|
|
||||||
try {
|
|
||||||
newUri = new URI(request.url().uri().getScheme(), request.url().uri().getAuthority(),
|
|
||||||
request.url().uri().getPath(), newQuery, request.url().uri().getFragment());
|
|
||||||
rb.url(newUri.toURL());
|
|
||||||
} catch (MalformedURLException | URISyntaxException e) {
|
|
||||||
throw new RuntimeException("Error while updating an url", e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return new PlayWSCall(wsClient, rb.build());
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Call implementation that delegates to Play WS Client
|
|
||||||
*/
|
|
||||||
static class PlayWSCall implements Call {
|
|
||||||
|
|
||||||
private final WSClient wsClient;
|
|
||||||
private WSRequest wsRequest;
|
|
||||||
|
|
||||||
private final Request request;
|
|
||||||
|
|
||||||
public PlayWSCall(WSClient wsClient, Request request) {
|
|
||||||
this.wsClient = wsClient;
|
|
||||||
this.request = request;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Request request() {
|
|
||||||
return request;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void enqueue(final okhttp3.Callback responseCallback) {
|
|
||||||
final Call call = this;
|
|
||||||
final F.Promise<WSResponse> promise = executeAsync();
|
|
||||||
|
|
||||||
promise.onRedeem(new F.Callback<WSResponse>() {
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void invoke(WSResponse wsResponse) throws Throwable {
|
|
||||||
responseCallback.onResponse(call, PlayWSCall.this.toWSResponse(wsResponse));
|
|
||||||
}
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
promise.onFailure(new F.Callback<Throwable>() {
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void invoke(Throwable throwable) throws Throwable {
|
|
||||||
if (throwable instanceof IOException) {
|
|
||||||
responseCallback.onFailure(call, (IOException) throwable);
|
|
||||||
} else {
|
|
||||||
responseCallback.onFailure(call, new IOException(throwable));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
F.Promise<WSResponse> executeAsync() {
|
|
||||||
try {
|
|
||||||
wsRequest = wsClient.url(request.url().uri().toString());
|
|
||||||
addHeaders(wsRequest);
|
|
||||||
addCookies(wsRequest);
|
|
||||||
if (request.body() != null) {
|
|
||||||
addBody(wsRequest);
|
|
||||||
}
|
|
||||||
|
|
||||||
return wsRequest.execute(request.method());
|
|
||||||
} catch (Exception e) {
|
|
||||||
throw new RuntimeException(e.getMessage(), e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void addHeaders(WSRequest wsRequest) {
|
|
||||||
for(Map.Entry<String, List<String>> entry : request.headers().toMultimap().entrySet()) {
|
|
||||||
List<String> values = entry.getValue();
|
|
||||||
for (String value : values) {
|
|
||||||
wsRequest.setHeader(entry.getKey(), value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void addCookies(WSRequest wsRequest) {
|
|
||||||
final List<String> cookies = request.headers("Cookie");
|
|
||||||
if (!cookies.isEmpty()) {
|
|
||||||
String delimiter = "";
|
|
||||||
final StringBuilder cookieHeader = new StringBuilder();
|
|
||||||
for (final String cookie : cookies) {
|
|
||||||
cookieHeader.append(String.format("%s%s", delimiter, cookie));
|
|
||||||
delimiter = "; ";
|
|
||||||
}
|
|
||||||
wsRequest.setHeader("Cookie", cookieHeader.toString());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void addBody(WSRequest wsRequest) throws IOException {
|
|
||||||
Buffer buffer = new Buffer();
|
|
||||||
request.body().writeTo(buffer);
|
|
||||||
wsRequest.setBody(buffer.inputStream());
|
|
||||||
wsRequest.setContentType(request.body().contentType().toString());
|
|
||||||
}
|
|
||||||
|
|
||||||
private Response toWSResponse(final WSResponse r) {
|
|
||||||
final Response.Builder builder = new Response.Builder();
|
|
||||||
builder.request(request)
|
|
||||||
.code(r.getStatus())
|
|
||||||
.body(new ResponseBody() {
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public MediaType contentType() {
|
|
||||||
return Optional.ofNullable(r.getHeader("Content-Type"))
|
|
||||||
.map(MediaType::parse)
|
|
||||||
.orElse(null);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public long contentLength() {
|
|
||||||
return r.asByteArray().length;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public BufferedSource source() {
|
|
||||||
return new Buffer().write(r.asByteArray());
|
|
||||||
}
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
for (Map.Entry<String, List<String>> entry : r.getAllHeaders().entrySet()) {
|
|
||||||
for (String value : entry.getValue()) {
|
|
||||||
builder.addHeader(entry.getKey(), value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
for (final WSCookie cookie : r.getCookies()) {
|
|
||||||
builder.addHeader("Cookie", String.format("%s=%s", cookie.getName(), cookie.getValue()));
|
|
||||||
}
|
|
||||||
|
|
||||||
builder.protocol(Protocol.HTTP_1_1);
|
|
||||||
return builder.build();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Response execute() throws IOException {
|
|
||||||
throw new UnsupportedOperationException("Not supported");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void cancel() {
|
|
||||||
throw new UnsupportedOperationException("Not supported");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public PlayWSCall clone() {
|
|
||||||
throw new UnsupportedOperationException("Not supported");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isExecuted() {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isCanceled() {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -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;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -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<String, ServerVariable> 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<String, ServerVariable> 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<String, String> variables) {
|
|
||||||
String url = this.URL;
|
|
||||||
|
|
||||||
// go through variables and replace placeholders
|
|
||||||
for (Map.Entry<String, ServerVariable> 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);
|
|
||||||
}
|
|
||||||
}
|
|
@ -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<String> 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<String> enumValues) {
|
|
||||||
this.description = description;
|
|
||||||
this.defaultValue = defaultValue;
|
|
||||||
this.enumValues = enumValues;
|
|
||||||
}
|
|
||||||
}
|
|
@ -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;
|
|
||||||
|
|
||||||
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
|
|
||||||
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.
|
|
||||||
* <p>
|
|
||||||
* Note: This might be replaced by utility method from commons-lang or guava someday
|
|
||||||
* if one of those libraries is added as dependency.
|
|
||||||
* </p>
|
|
||||||
*
|
|
||||||
* @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<String> list, String separator) {
|
|
||||||
Iterator<String> 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();
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,39 +0,0 @@
|
|||||||
package org.openapitools.client.api;
|
|
||||||
|
|
||||||
import org.openapitools.client.CollectionFormats.*;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
import retrofit2.Call;
|
|
||||||
import retrofit2.http.*;
|
|
||||||
|
|
||||||
import okhttp3.RequestBody;
|
|
||||||
import okhttp3.ResponseBody;
|
|
||||||
import okhttp3.MultipartBody;
|
|
||||||
|
|
||||||
import org.openapitools.client.model.Client;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
import play.libs.F;
|
|
||||||
import retrofit2.Response;
|
|
||||||
|
|
||||||
public interface AnotherFakeApi {
|
|
||||||
/**
|
|
||||||
* To test special tags
|
|
||||||
* To test special tags and operation ID starting with number
|
|
||||||
* @param body client model (required)
|
|
||||||
* @return Call<Client>
|
|
||||||
*/
|
|
||||||
@Headers({
|
|
||||||
"Content-Type:application/json"
|
|
||||||
})
|
|
||||||
@PATCH("another-fake/dummy")
|
|
||||||
F.Promise<Response<Client>> call123testSpecialTags(
|
|
||||||
@retrofit2.http.Body Client body
|
|
||||||
);
|
|
||||||
|
|
||||||
}
|
|
@ -1,236 +0,0 @@
|
|||||||
package org.openapitools.client.api;
|
|
||||||
|
|
||||||
import org.openapitools.client.CollectionFormats.*;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
import retrofit2.Call;
|
|
||||||
import retrofit2.http.*;
|
|
||||||
|
|
||||||
import okhttp3.RequestBody;
|
|
||||||
import okhttp3.ResponseBody;
|
|
||||||
import okhttp3.MultipartBody;
|
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
import org.openapitools.client.model.Client;
|
|
||||||
import java.io.File;
|
|
||||||
import org.openapitools.client.model.FileSchemaTestClass;
|
|
||||||
import java.time.LocalDate;
|
|
||||||
import java.time.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 play.libs.F;
|
|
||||||
import retrofit2.Response;
|
|
||||||
|
|
||||||
public interface FakeApi {
|
|
||||||
/**
|
|
||||||
* creates an XmlItem
|
|
||||||
* this route creates an XmlItem
|
|
||||||
* @param xmlItem XmlItem Body (required)
|
|
||||||
* @return Call<Void>
|
|
||||||
*/
|
|
||||||
@Headers({
|
|
||||||
"Content-Type:application/xml"
|
|
||||||
})
|
|
||||||
@POST("fake/create_xml_item")
|
|
||||||
F.Promise<Response<Void>> createXmlItem(
|
|
||||||
@retrofit2.http.Body XmlItem xmlItem
|
|
||||||
);
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* Test serialization of outer boolean types
|
|
||||||
* @param body Input boolean as post body (optional)
|
|
||||||
* @return Call<Boolean>
|
|
||||||
*/
|
|
||||||
@POST("fake/outer/boolean")
|
|
||||||
F.Promise<Response<Boolean>> fakeOuterBooleanSerialize(
|
|
||||||
@retrofit2.http.Body Boolean body
|
|
||||||
);
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* Test serialization of object with outer number type
|
|
||||||
* @param body Input composite as post body (optional)
|
|
||||||
* @return Call<OuterComposite>
|
|
||||||
*/
|
|
||||||
@POST("fake/outer/composite")
|
|
||||||
F.Promise<Response<OuterComposite>> fakeOuterCompositeSerialize(
|
|
||||||
@retrofit2.http.Body OuterComposite body
|
|
||||||
);
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* Test serialization of outer number types
|
|
||||||
* @param body Input number as post body (optional)
|
|
||||||
* @return Call<BigDecimal>
|
|
||||||
*/
|
|
||||||
@POST("fake/outer/number")
|
|
||||||
F.Promise<Response<BigDecimal>> fakeOuterNumberSerialize(
|
|
||||||
@retrofit2.http.Body BigDecimal body
|
|
||||||
);
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* Test serialization of outer string types
|
|
||||||
* @param body Input string as post body (optional)
|
|
||||||
* @return Call<String>
|
|
||||||
*/
|
|
||||||
@POST("fake/outer/string")
|
|
||||||
F.Promise<Response<String>> fakeOuterStringSerialize(
|
|
||||||
@retrofit2.http.Body String body
|
|
||||||
);
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* For this test, the body for this request much reference a schema named `File`.
|
|
||||||
* @param body (required)
|
|
||||||
* @return Call<Void>
|
|
||||||
*/
|
|
||||||
@Headers({
|
|
||||||
"Content-Type:application/json"
|
|
||||||
})
|
|
||||||
@PUT("fake/body-with-file-schema")
|
|
||||||
F.Promise<Response<Void>> testBodyWithFileSchema(
|
|
||||||
@retrofit2.http.Body FileSchemaTestClass body
|
|
||||||
);
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* @param query (required)
|
|
||||||
* @param body (required)
|
|
||||||
* @return Call<Void>
|
|
||||||
*/
|
|
||||||
@Headers({
|
|
||||||
"Content-Type:application/json"
|
|
||||||
})
|
|
||||||
@PUT("fake/body-with-query-params")
|
|
||||||
F.Promise<Response<Void>> testBodyWithQueryParams(
|
|
||||||
@retrofit2.http.Query("query") String query, @retrofit2.http.Body User body
|
|
||||||
);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* To test \"client\" model
|
|
||||||
* To test \"client\" model
|
|
||||||
* @param body client model (required)
|
|
||||||
* @return Call<Client>
|
|
||||||
*/
|
|
||||||
@Headers({
|
|
||||||
"Content-Type:application/json"
|
|
||||||
})
|
|
||||||
@PATCH("fake")
|
|
||||||
F.Promise<Response<Client>> testClientModel(
|
|
||||||
@retrofit2.http.Body 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)
|
|
||||||
* @return Call<Void>
|
|
||||||
*/
|
|
||||||
@retrofit2.http.FormUrlEncoded
|
|
||||||
@POST("fake")
|
|
||||||
F.Promise<Response<Void>> testEndpointParameters(
|
|
||||||
@retrofit2.http.Field("number") BigDecimal number, @retrofit2.http.Field("double") Double _double, @retrofit2.http.Field("pattern_without_delimiter") String patternWithoutDelimiter, @retrofit2.http.Field("byte") byte[] _byte, @retrofit2.http.Field("integer") Integer integer, @retrofit2.http.Field("int32") Integer int32, @retrofit2.http.Field("int64") Long int64, @retrofit2.http.Field("float") Float _float, @retrofit2.http.Field("string") String string, @retrofit2.http.Field("binary") MultipartBody.Part binary, @retrofit2.http.Field("date") LocalDate date, @retrofit2.http.Field("dateTime") OffsetDateTime dateTime, @retrofit2.http.Field("password") String password, @retrofit2.http.Field("callback") String paramCallback
|
|
||||||
);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* To test enum parameters
|
|
||||||
* To test enum parameters
|
|
||||||
* @param enumHeaderStringArray Header parameter enum test (string array) (optional, default to new ArrayList<>())
|
|
||||||
* @param enumHeaderString Header parameter enum test (string) (optional, default to -efg)
|
|
||||||
* @param enumQueryStringArray Query parameter enum test (string array) (optional, default to new ArrayList<>())
|
|
||||||
* @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, default to $)
|
|
||||||
* @param enumFormString Form parameter enum test (string) (optional, default to -efg)
|
|
||||||
* @return Call<Void>
|
|
||||||
*/
|
|
||||||
@retrofit2.http.FormUrlEncoded
|
|
||||||
@GET("fake")
|
|
||||||
F.Promise<Response<Void>> testEnumParameters(
|
|
||||||
@retrofit2.http.Header("enum_header_string_array") List<String> enumHeaderStringArray, @retrofit2.http.Header("enum_header_string") String enumHeaderString, @retrofit2.http.Query("enum_query_string_array") CSVParams enumQueryStringArray, @retrofit2.http.Query("enum_query_string") String enumQueryString, @retrofit2.http.Query("enum_query_integer") Integer enumQueryInteger, @retrofit2.http.Query("enum_query_double") Double enumQueryDouble, @retrofit2.http.Field("enum_form_string_array") List<String> enumFormStringArray, @retrofit2.http.Field("enum_form_string") String enumFormString
|
|
||||||
);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 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)
|
|
||||||
* @return Call<Void>
|
|
||||||
*/
|
|
||||||
@DELETE("fake")
|
|
||||||
F.Promise<Response<Void>> testGroupParameters(
|
|
||||||
@retrofit2.http.Query("required_string_group") Integer requiredStringGroup, @retrofit2.http.Header("required_boolean_group") Boolean requiredBooleanGroup, @retrofit2.http.Query("required_int64_group") Long requiredInt64Group, @retrofit2.http.Query("string_group") Integer stringGroup, @retrofit2.http.Header("boolean_group") Boolean booleanGroup, @retrofit2.http.Query("int64_group") Long int64Group
|
|
||||||
);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* test inline additionalProperties
|
|
||||||
*
|
|
||||||
* @param param request body (required)
|
|
||||||
* @return Call<Void>
|
|
||||||
*/
|
|
||||||
@Headers({
|
|
||||||
"Content-Type:application/json"
|
|
||||||
})
|
|
||||||
@POST("fake/inline-additionalProperties")
|
|
||||||
F.Promise<Response<Void>> testInlineAdditionalProperties(
|
|
||||||
@retrofit2.http.Body Map<String, String> param
|
|
||||||
);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* test json serialization of form data
|
|
||||||
*
|
|
||||||
* @param param field1 (required)
|
|
||||||
* @param param2 field2 (required)
|
|
||||||
* @return Call<Void>
|
|
||||||
*/
|
|
||||||
@retrofit2.http.FormUrlEncoded
|
|
||||||
@GET("fake/jsonFormData")
|
|
||||||
F.Promise<Response<Void>> testJsonFormData(
|
|
||||||
@retrofit2.http.Field("param") String param, @retrofit2.http.Field("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)
|
|
||||||
* @return Call<Void>
|
|
||||||
*/
|
|
||||||
@PUT("fake/test-query-paramters")
|
|
||||||
F.Promise<Response<Void>> testQueryParameterCollectionFormat(
|
|
||||||
@retrofit2.http.Query("pipe") CSVParams pipe, @retrofit2.http.Query("ioutil") CSVParams ioutil, @retrofit2.http.Query("http") SSVParams http, @retrofit2.http.Query("url") CSVParams url, @retrofit2.http.Query("context") List<String> context
|
|
||||||
);
|
|
||||||
|
|
||||||
}
|
|
@ -1,39 +0,0 @@
|
|||||||
package org.openapitools.client.api;
|
|
||||||
|
|
||||||
import org.openapitools.client.CollectionFormats.*;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
import retrofit2.Call;
|
|
||||||
import retrofit2.http.*;
|
|
||||||
|
|
||||||
import okhttp3.RequestBody;
|
|
||||||
import okhttp3.ResponseBody;
|
|
||||||
import okhttp3.MultipartBody;
|
|
||||||
|
|
||||||
import org.openapitools.client.model.Client;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
import play.libs.F;
|
|
||||||
import retrofit2.Response;
|
|
||||||
|
|
||||||
public interface FakeClassnameTags123Api {
|
|
||||||
/**
|
|
||||||
* To test class name in snake case
|
|
||||||
* To test class name in snake case
|
|
||||||
* @param body client model (required)
|
|
||||||
* @return Call<Client>
|
|
||||||
*/
|
|
||||||
@Headers({
|
|
||||||
"Content-Type:application/json"
|
|
||||||
})
|
|
||||||
@PATCH("fake_classname_test")
|
|
||||||
F.Promise<Response<Client>> testClassname(
|
|
||||||
@retrofit2.http.Body Client body
|
|
||||||
);
|
|
||||||
|
|
||||||
}
|
|
@ -1,143 +0,0 @@
|
|||||||
package org.openapitools.client.api;
|
|
||||||
|
|
||||||
import org.openapitools.client.CollectionFormats.*;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
import retrofit2.Call;
|
|
||||||
import retrofit2.http.*;
|
|
||||||
|
|
||||||
import okhttp3.RequestBody;
|
|
||||||
import okhttp3.ResponseBody;
|
|
||||||
import okhttp3.MultipartBody;
|
|
||||||
|
|
||||||
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 play.libs.F;
|
|
||||||
import retrofit2.Response;
|
|
||||||
|
|
||||||
public interface PetApi {
|
|
||||||
/**
|
|
||||||
* Add a new pet to the store
|
|
||||||
*
|
|
||||||
* @param body Pet object that needs to be added to the store (required)
|
|
||||||
* @return Call<Void>
|
|
||||||
*/
|
|
||||||
@Headers({
|
|
||||||
"Content-Type:application/json"
|
|
||||||
})
|
|
||||||
@POST("pet")
|
|
||||||
F.Promise<Response<Void>> addPet(
|
|
||||||
@retrofit2.http.Body Pet body
|
|
||||||
);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Deletes a pet
|
|
||||||
*
|
|
||||||
* @param petId Pet id to delete (required)
|
|
||||||
* @param apiKey (optional)
|
|
||||||
* @return Call<Void>
|
|
||||||
*/
|
|
||||||
@DELETE("pet/{petId}")
|
|
||||||
F.Promise<Response<Void>> deletePet(
|
|
||||||
@retrofit2.http.Path("petId") Long petId, @retrofit2.http.Header("api_key") 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 Call<List<Pet>>
|
|
||||||
*/
|
|
||||||
@GET("pet/findByStatus")
|
|
||||||
F.Promise<Response<List<Pet>>> findPetsByStatus(
|
|
||||||
@retrofit2.http.Query("status") CSVParams status
|
|
||||||
);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 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 Call<Set<Pet>>
|
|
||||||
*/
|
|
||||||
@GET("pet/findByTags")
|
|
||||||
F.Promise<Response<Set<Pet>>> findPetsByTags(
|
|
||||||
@retrofit2.http.Query("tags") CSVParams tags
|
|
||||||
);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Find pet by ID
|
|
||||||
* Returns a single pet
|
|
||||||
* @param petId ID of pet to return (required)
|
|
||||||
* @return Call<Pet>
|
|
||||||
*/
|
|
||||||
@GET("pet/{petId}")
|
|
||||||
F.Promise<Response<Pet>> getPetById(
|
|
||||||
@retrofit2.http.Path("petId") Long petId
|
|
||||||
);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Update an existing pet
|
|
||||||
*
|
|
||||||
* @param body Pet object that needs to be added to the store (required)
|
|
||||||
* @return Call<Void>
|
|
||||||
*/
|
|
||||||
@Headers({
|
|
||||||
"Content-Type:application/json"
|
|
||||||
})
|
|
||||||
@PUT("pet")
|
|
||||||
F.Promise<Response<Void>> updatePet(
|
|
||||||
@retrofit2.http.Body 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)
|
|
||||||
* @return Call<Void>
|
|
||||||
*/
|
|
||||||
@retrofit2.http.FormUrlEncoded
|
|
||||||
@POST("pet/{petId}")
|
|
||||||
F.Promise<Response<Void>> updatePetWithForm(
|
|
||||||
@retrofit2.http.Path("petId") Long petId, @retrofit2.http.Field("name") String name, @retrofit2.http.Field("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 Call<ModelApiResponse>
|
|
||||||
*/
|
|
||||||
@retrofit2.http.Multipart
|
|
||||||
@POST("pet/{petId}/uploadImage")
|
|
||||||
F.Promise<Response<ModelApiResponse>> uploadFile(
|
|
||||||
@retrofit2.http.Path("petId") Long petId, @retrofit2.http.Part("additionalMetadata") String additionalMetadata, @retrofit2.http.Part MultipartBody.Part 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 Call<ModelApiResponse>
|
|
||||||
*/
|
|
||||||
@retrofit2.http.Multipart
|
|
||||||
@POST("fake/{petId}/uploadImageWithRequiredFile")
|
|
||||||
F.Promise<Response<ModelApiResponse>> uploadFileWithRequiredFile(
|
|
||||||
@retrofit2.http.Path("petId") Long petId, @retrofit2.http.Part MultipartBody.Part requiredFile, @retrofit2.http.Part("additionalMetadata") String additionalMetadata
|
|
||||||
);
|
|
||||||
|
|
||||||
}
|
|
@ -1,67 +0,0 @@
|
|||||||
package org.openapitools.client.api;
|
|
||||||
|
|
||||||
import org.openapitools.client.CollectionFormats.*;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
import retrofit2.Call;
|
|
||||||
import retrofit2.http.*;
|
|
||||||
|
|
||||||
import okhttp3.RequestBody;
|
|
||||||
import okhttp3.ResponseBody;
|
|
||||||
import okhttp3.MultipartBody;
|
|
||||||
|
|
||||||
import org.openapitools.client.model.Order;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
import play.libs.F;
|
|
||||||
import retrofit2.Response;
|
|
||||||
|
|
||||||
public interface StoreApi {
|
|
||||||
/**
|
|
||||||
* 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)
|
|
||||||
* @return Call<Void>
|
|
||||||
*/
|
|
||||||
@DELETE("store/order/{order_id}")
|
|
||||||
F.Promise<Response<Void>> deleteOrder(
|
|
||||||
@retrofit2.http.Path("order_id") String orderId
|
|
||||||
);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns pet inventories by status
|
|
||||||
* Returns a map of status codes to quantities
|
|
||||||
* @return Call<Map<String, Integer>>
|
|
||||||
*/
|
|
||||||
@GET("store/inventory")
|
|
||||||
F.Promise<Response<Map<String, Integer>>> 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 Call<Order>
|
|
||||||
*/
|
|
||||||
@GET("store/order/{order_id}")
|
|
||||||
F.Promise<Response<Order>> getOrderById(
|
|
||||||
@retrofit2.http.Path("order_id") Long orderId
|
|
||||||
);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Place an order for a pet
|
|
||||||
*
|
|
||||||
* @param body order placed for purchasing the pet (required)
|
|
||||||
* @return Call<Order>
|
|
||||||
*/
|
|
||||||
@POST("store/order")
|
|
||||||
F.Promise<Response<Order>> placeOrder(
|
|
||||||
@retrofit2.http.Body Order body
|
|
||||||
);
|
|
||||||
|
|
||||||
}
|
|
@ -1,113 +0,0 @@
|
|||||||
package org.openapitools.client.api;
|
|
||||||
|
|
||||||
import org.openapitools.client.CollectionFormats.*;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
import retrofit2.Call;
|
|
||||||
import retrofit2.http.*;
|
|
||||||
|
|
||||||
import okhttp3.RequestBody;
|
|
||||||
import okhttp3.ResponseBody;
|
|
||||||
import okhttp3.MultipartBody;
|
|
||||||
|
|
||||||
import org.openapitools.client.model.User;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
import play.libs.F;
|
|
||||||
import retrofit2.Response;
|
|
||||||
|
|
||||||
public interface UserApi {
|
|
||||||
/**
|
|
||||||
* Create user
|
|
||||||
* This can only be done by the logged in user.
|
|
||||||
* @param body Created user object (required)
|
|
||||||
* @return Call<Void>
|
|
||||||
*/
|
|
||||||
@POST("user")
|
|
||||||
F.Promise<Response<Void>> createUser(
|
|
||||||
@retrofit2.http.Body User body
|
|
||||||
);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Creates list of users with given input array
|
|
||||||
*
|
|
||||||
* @param body List of user object (required)
|
|
||||||
* @return Call<Void>
|
|
||||||
*/
|
|
||||||
@POST("user/createWithArray")
|
|
||||||
F.Promise<Response<Void>> createUsersWithArrayInput(
|
|
||||||
@retrofit2.http.Body List<User> body
|
|
||||||
);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Creates list of users with given input array
|
|
||||||
*
|
|
||||||
* @param body List of user object (required)
|
|
||||||
* @return Call<Void>
|
|
||||||
*/
|
|
||||||
@POST("user/createWithList")
|
|
||||||
F.Promise<Response<Void>> createUsersWithListInput(
|
|
||||||
@retrofit2.http.Body List<User> body
|
|
||||||
);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Delete user
|
|
||||||
* This can only be done by the logged in user.
|
|
||||||
* @param username The name that needs to be deleted (required)
|
|
||||||
* @return Call<Void>
|
|
||||||
*/
|
|
||||||
@DELETE("user/{username}")
|
|
||||||
F.Promise<Response<Void>> deleteUser(
|
|
||||||
@retrofit2.http.Path("username") String username
|
|
||||||
);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get user by user name
|
|
||||||
*
|
|
||||||
* @param username The name that needs to be fetched. Use user1 for testing. (required)
|
|
||||||
* @return Call<User>
|
|
||||||
*/
|
|
||||||
@GET("user/{username}")
|
|
||||||
F.Promise<Response<User>> getUserByName(
|
|
||||||
@retrofit2.http.Path("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 Call<String>
|
|
||||||
*/
|
|
||||||
@GET("user/login")
|
|
||||||
F.Promise<Response<String>> loginUser(
|
|
||||||
@retrofit2.http.Query("username") String username, @retrofit2.http.Query("password") String password
|
|
||||||
);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Logs out current logged in user session
|
|
||||||
*
|
|
||||||
* @return Call<Void>
|
|
||||||
*/
|
|
||||||
@GET("user/logout")
|
|
||||||
F.Promise<Response<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)
|
|
||||||
* @return Call<Void>
|
|
||||||
*/
|
|
||||||
@PUT("user/{username}")
|
|
||||||
F.Promise<Response<Void>> updateUser(
|
|
||||||
@retrofit2.http.Path("username") String username, @retrofit2.http.Body User body
|
|
||||||
);
|
|
||||||
|
|
||||||
}
|
|
@ -1,80 +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;
|
|
||||||
|
|
||||||
import org.openapitools.client.Pair;
|
|
||||||
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Holds ApiKey auth info
|
|
||||||
*/
|
|
||||||
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
|
|
||||||
public class ApiKeyAuth implements Authentication {
|
|
||||||
private final String location;
|
|
||||||
private final String paramName;
|
|
||||||
|
|
||||||
private String apiKey;
|
|
||||||
private String apiKeyPrefix;
|
|
||||||
|
|
||||||
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getApiKeyPrefix() {
|
|
||||||
return apiKeyPrefix;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setApiKeyPrefix(String apiKeyPrefix) {
|
|
||||||
this.apiKeyPrefix = apiKeyPrefix;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void applyToParams(List<Pair> queryParams, Map<String, String> headerParams, Map<String, String> cookieParams) {
|
|
||||||
if (apiKey == null) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
String value;
|
|
||||||
if (apiKeyPrefix != null) {
|
|
||||||
value = apiKeyPrefix + " " + apiKey;
|
|
||||||
} else {
|
|
||||||
value = apiKey;
|
|
||||||
}
|
|
||||||
if ("query".equals(location)) {
|
|
||||||
queryParams.add(new Pair(paramName, value));
|
|
||||||
} else if ("header".equals(location)) {
|
|
||||||
headerParams.put(paramName, value);
|
|
||||||
} else if ("cookie".equals(location)) {
|
|
||||||
cookieParams.put(paramName, value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,30 +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;
|
|
||||||
|
|
||||||
import org.openapitools.client.Pair;
|
|
||||||
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
public interface Authentication {
|
|
||||||
/**
|
|
||||||
* Apply authentication settings to header and query params.
|
|
||||||
*
|
|
||||||
* @param queryParams List of query parameters
|
|
||||||
* @param headerParams Map of header parameters
|
|
||||||
* @param cookieParams Map of cookie parameters
|
|
||||||
*/
|
|
||||||
void applyToParams(List<Pair> queryParams, Map<String, String> headerParams, Map<String, String> cookieParams);
|
|
||||||
}
|
|
@ -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.Map;
|
|
||||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
|
||||||
import javax.validation.constraints.*;
|
|
||||||
import javax.validation.Valid;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* AdditionalPropertiesAnyType
|
|
||||||
*/
|
|
||||||
@JsonPropertyOrder({
|
|
||||||
AdditionalPropertiesAnyType.JSON_PROPERTY_NAME
|
|
||||||
})
|
|
||||||
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
|
|
||||||
public class AdditionalPropertiesAnyType extends HashMap<String, Object> {
|
|
||||||
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 ");
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
@ -1,109 +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;
|
|
||||||
import javax.validation.constraints.*;
|
|
||||||
import javax.validation.Valid;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* AdditionalPropertiesArray
|
|
||||||
*/
|
|
||||||
@JsonPropertyOrder({
|
|
||||||
AdditionalPropertiesArray.JSON_PROPERTY_NAME
|
|
||||||
})
|
|
||||||
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
|
|
||||||
public class AdditionalPropertiesArray extends HashMap<String, List> {
|
|
||||||
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 ");
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
@ -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.Map;
|
|
||||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
|
||||||
import javax.validation.constraints.*;
|
|
||||||
import javax.validation.Valid;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* AdditionalPropertiesBoolean
|
|
||||||
*/
|
|
||||||
@JsonPropertyOrder({
|
|
||||||
AdditionalPropertiesBoolean.JSON_PROPERTY_NAME
|
|
||||||
})
|
|
||||||
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
|
|
||||||
public class AdditionalPropertiesBoolean extends HashMap<String, Boolean> {
|
|
||||||
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 ");
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
@ -1,487 +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;
|
|
||||||
import javax.validation.constraints.*;
|
|
||||||
import javax.validation.Valid;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 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.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
|
|
||||||
public class AdditionalPropertiesClass {
|
|
||||||
public static final String JSON_PROPERTY_MAP_STRING = "map_string";
|
|
||||||
private Map<String, String> mapString = null;
|
|
||||||
|
|
||||||
public static final String JSON_PROPERTY_MAP_NUMBER = "map_number";
|
|
||||||
private Map<String, BigDecimal> mapNumber = null;
|
|
||||||
|
|
||||||
public static final String JSON_PROPERTY_MAP_INTEGER = "map_integer";
|
|
||||||
private Map<String, Integer> mapInteger = null;
|
|
||||||
|
|
||||||
public static final String JSON_PROPERTY_MAP_BOOLEAN = "map_boolean";
|
|
||||||
private Map<String, Boolean> mapBoolean = null;
|
|
||||||
|
|
||||||
public static final String JSON_PROPERTY_MAP_ARRAY_INTEGER = "map_array_integer";
|
|
||||||
private Map<String, List<Integer>> mapArrayInteger = null;
|
|
||||||
|
|
||||||
public static final String JSON_PROPERTY_MAP_ARRAY_ANYTYPE = "map_array_anytype";
|
|
||||||
private Map<String, List<Object>> mapArrayAnytype = null;
|
|
||||||
|
|
||||||
public static final String JSON_PROPERTY_MAP_MAP_STRING = "map_map_string";
|
|
||||||
private Map<String, Map<String, String>> mapMapString = null;
|
|
||||||
|
|
||||||
public static final String JSON_PROPERTY_MAP_MAP_ANYTYPE = "map_map_anytype";
|
|
||||||
private Map<String, Map<String, Object>> 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<String, String> 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<String, String> getMapString() {
|
|
||||||
return mapString;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public void setMapString(Map<String, String> mapString) {
|
|
||||||
this.mapString = mapString;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public AdditionalPropertiesClass mapNumber(Map<String, BigDecimal> 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
|
|
||||||
@Valid
|
|
||||||
@ApiModelProperty(value = "")
|
|
||||||
@JsonProperty(JSON_PROPERTY_MAP_NUMBER)
|
|
||||||
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
|
||||||
|
|
||||||
public Map<String, BigDecimal> getMapNumber() {
|
|
||||||
return mapNumber;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public void setMapNumber(Map<String, BigDecimal> mapNumber) {
|
|
||||||
this.mapNumber = mapNumber;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public AdditionalPropertiesClass mapInteger(Map<String, Integer> 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<String, Integer> getMapInteger() {
|
|
||||||
return mapInteger;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public void setMapInteger(Map<String, Integer> mapInteger) {
|
|
||||||
this.mapInteger = mapInteger;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public AdditionalPropertiesClass mapBoolean(Map<String, Boolean> 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<String, Boolean> getMapBoolean() {
|
|
||||||
return mapBoolean;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public void setMapBoolean(Map<String, Boolean> mapBoolean) {
|
|
||||||
this.mapBoolean = mapBoolean;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public AdditionalPropertiesClass mapArrayInteger(Map<String, List<Integer>> mapArrayInteger) {
|
|
||||||
|
|
||||||
this.mapArrayInteger = mapArrayInteger;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public AdditionalPropertiesClass putMapArrayIntegerItem(String key, List<Integer> mapArrayIntegerItem) {
|
|
||||||
if (this.mapArrayInteger == null) {
|
|
||||||
this.mapArrayInteger = new HashMap<>();
|
|
||||||
}
|
|
||||||
this.mapArrayInteger.put(key, mapArrayIntegerItem);
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get mapArrayInteger
|
|
||||||
* @return mapArrayInteger
|
|
||||||
**/
|
|
||||||
@javax.annotation.Nullable
|
|
||||||
@Valid
|
|
||||||
@ApiModelProperty(value = "")
|
|
||||||
@JsonProperty(JSON_PROPERTY_MAP_ARRAY_INTEGER)
|
|
||||||
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
|
||||||
|
|
||||||
public Map<String, List<Integer>> getMapArrayInteger() {
|
|
||||||
return mapArrayInteger;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public void setMapArrayInteger(Map<String, List<Integer>> mapArrayInteger) {
|
|
||||||
this.mapArrayInteger = mapArrayInteger;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public AdditionalPropertiesClass mapArrayAnytype(Map<String, List<Object>> mapArrayAnytype) {
|
|
||||||
|
|
||||||
this.mapArrayAnytype = mapArrayAnytype;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public AdditionalPropertiesClass putMapArrayAnytypeItem(String key, List<Object> mapArrayAnytypeItem) {
|
|
||||||
if (this.mapArrayAnytype == null) {
|
|
||||||
this.mapArrayAnytype = new HashMap<>();
|
|
||||||
}
|
|
||||||
this.mapArrayAnytype.put(key, mapArrayAnytypeItem);
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get mapArrayAnytype
|
|
||||||
* @return mapArrayAnytype
|
|
||||||
**/
|
|
||||||
@javax.annotation.Nullable
|
|
||||||
@Valid
|
|
||||||
@ApiModelProperty(value = "")
|
|
||||||
@JsonProperty(JSON_PROPERTY_MAP_ARRAY_ANYTYPE)
|
|
||||||
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
|
||||||
|
|
||||||
public Map<String, List<Object>> getMapArrayAnytype() {
|
|
||||||
return mapArrayAnytype;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public void setMapArrayAnytype(Map<String, List<Object>> mapArrayAnytype) {
|
|
||||||
this.mapArrayAnytype = mapArrayAnytype;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public AdditionalPropertiesClass mapMapString(Map<String, Map<String, String>> mapMapString) {
|
|
||||||
|
|
||||||
this.mapMapString = mapMapString;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public AdditionalPropertiesClass putMapMapStringItem(String key, Map<String, String> mapMapStringItem) {
|
|
||||||
if (this.mapMapString == null) {
|
|
||||||
this.mapMapString = new HashMap<>();
|
|
||||||
}
|
|
||||||
this.mapMapString.put(key, mapMapStringItem);
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get mapMapString
|
|
||||||
* @return mapMapString
|
|
||||||
**/
|
|
||||||
@javax.annotation.Nullable
|
|
||||||
@Valid
|
|
||||||
@ApiModelProperty(value = "")
|
|
||||||
@JsonProperty(JSON_PROPERTY_MAP_MAP_STRING)
|
|
||||||
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
|
||||||
|
|
||||||
public Map<String, Map<String, String>> getMapMapString() {
|
|
||||||
return mapMapString;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public void setMapMapString(Map<String, Map<String, String>> mapMapString) {
|
|
||||||
this.mapMapString = mapMapString;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public AdditionalPropertiesClass mapMapAnytype(Map<String, Map<String, Object>> mapMapAnytype) {
|
|
||||||
|
|
||||||
this.mapMapAnytype = mapMapAnytype;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public AdditionalPropertiesClass putMapMapAnytypeItem(String key, Map<String, Object> mapMapAnytypeItem) {
|
|
||||||
if (this.mapMapAnytype == null) {
|
|
||||||
this.mapMapAnytype = new HashMap<>();
|
|
||||||
}
|
|
||||||
this.mapMapAnytype.put(key, mapMapAnytypeItem);
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get mapMapAnytype
|
|
||||||
* @return mapMapAnytype
|
|
||||||
**/
|
|
||||||
@javax.annotation.Nullable
|
|
||||||
@Valid
|
|
||||||
@ApiModelProperty(value = "")
|
|
||||||
@JsonProperty(JSON_PROPERTY_MAP_MAP_ANYTYPE)
|
|
||||||
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
|
||||||
|
|
||||||
public Map<String, Map<String, Object>> getMapMapAnytype() {
|
|
||||||
return mapMapAnytype;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public void setMapMapAnytype(Map<String, Map<String, Object>> mapMapAnytype) {
|
|
||||||
this.mapMapAnytype = mapMapAnytype;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public AdditionalPropertiesClass anytype1(Object anytype1) {
|
|
||||||
|
|
||||||
this.anytype1 = anytype1;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get anytype1
|
|
||||||
* @return anytype1
|
|
||||||
**/
|
|
||||||
@javax.annotation.Nullable
|
|
||||||
@ApiModelProperty(value = "")
|
|
||||||
@JsonProperty(JSON_PROPERTY_ANYTYPE1)
|
|
||||||
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
|
||||||
|
|
||||||
public Object getAnytype1() {
|
|
||||||
return anytype1;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public void setAnytype1(Object anytype1) {
|
|
||||||
this.anytype1 = anytype1;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public AdditionalPropertiesClass anytype2(Object anytype2) {
|
|
||||||
|
|
||||||
this.anytype2 = anytype2;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get anytype2
|
|
||||||
* @return anytype2
|
|
||||||
**/
|
|
||||||
@javax.annotation.Nullable
|
|
||||||
@ApiModelProperty(value = "")
|
|
||||||
@JsonProperty(JSON_PROPERTY_ANYTYPE2)
|
|
||||||
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
|
||||||
|
|
||||||
public Object getAnytype2() {
|
|
||||||
return anytype2;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public void setAnytype2(Object anytype2) {
|
|
||||||
this.anytype2 = anytype2;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public AdditionalPropertiesClass anytype3(Object anytype3) {
|
|
||||||
|
|
||||||
this.anytype3 = anytype3;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get anytype3
|
|
||||||
* @return anytype3
|
|
||||||
**/
|
|
||||||
@javax.annotation.Nullable
|
|
||||||
@ApiModelProperty(value = "")
|
|
||||||
@JsonProperty(JSON_PROPERTY_ANYTYPE3)
|
|
||||||
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
|
||||||
|
|
||||||
public Object getAnytype3() {
|
|
||||||
return anytype3;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public void setAnytype3(Object anytype3) {
|
|
||||||
this.anytype3 = anytype3;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean equals(java.lang.Object o) {
|
|
||||||
if (this == o) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
if (o == null || getClass() != o.getClass()) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
AdditionalPropertiesClass additionalPropertiesClass = (AdditionalPropertiesClass) o;
|
|
||||||
return Objects.equals(this.mapString, additionalPropertiesClass.mapString) &&
|
|
||||||
Objects.equals(this.mapNumber, additionalPropertiesClass.mapNumber) &&
|
|
||||||
Objects.equals(this.mapInteger, additionalPropertiesClass.mapInteger) &&
|
|
||||||
Objects.equals(this.mapBoolean, additionalPropertiesClass.mapBoolean) &&
|
|
||||||
Objects.equals(this.mapArrayInteger, additionalPropertiesClass.mapArrayInteger) &&
|
|
||||||
Objects.equals(this.mapArrayAnytype, additionalPropertiesClass.mapArrayAnytype) &&
|
|
||||||
Objects.equals(this.mapMapString, additionalPropertiesClass.mapMapString) &&
|
|
||||||
Objects.equals(this.mapMapAnytype, additionalPropertiesClass.mapMapAnytype) &&
|
|
||||||
Objects.equals(this.anytype1, additionalPropertiesClass.anytype1) &&
|
|
||||||
Objects.equals(this.anytype2, additionalPropertiesClass.anytype2) &&
|
|
||||||
Objects.equals(this.anytype3, additionalPropertiesClass.anytype3);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int hashCode() {
|
|
||||||
return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, anytype1, anytype2, anytype3);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String toString() {
|
|
||||||
StringBuilder sb = new StringBuilder();
|
|
||||||
sb.append("class AdditionalPropertiesClass {\n");
|
|
||||||
sb.append(" mapString: ").append(toIndentedString(mapString)).append("\n");
|
|
||||||
sb.append(" mapNumber: ").append(toIndentedString(mapNumber)).append("\n");
|
|
||||||
sb.append(" mapInteger: ").append(toIndentedString(mapInteger)).append("\n");
|
|
||||||
sb.append(" mapBoolean: ").append(toIndentedString(mapBoolean)).append("\n");
|
|
||||||
sb.append(" mapArrayInteger: ").append(toIndentedString(mapArrayInteger)).append("\n");
|
|
||||||
sb.append(" mapArrayAnytype: ").append(toIndentedString(mapArrayAnytype)).append("\n");
|
|
||||||
sb.append(" mapMapString: ").append(toIndentedString(mapMapString)).append("\n");
|
|
||||||
sb.append(" mapMapAnytype: ").append(toIndentedString(mapMapAnytype)).append("\n");
|
|
||||||
sb.append(" anytype1: ").append(toIndentedString(anytype1)).append("\n");
|
|
||||||
sb.append(" anytype2: ").append(toIndentedString(anytype2)).append("\n");
|
|
||||||
sb.append(" anytype3: ").append(toIndentedString(anytype3)).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 ");
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
@ -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.Map;
|
|
||||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
|
||||||
import javax.validation.constraints.*;
|
|
||||||
import javax.validation.Valid;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* AdditionalPropertiesInteger
|
|
||||||
*/
|
|
||||||
@JsonPropertyOrder({
|
|
||||||
AdditionalPropertiesInteger.JSON_PROPERTY_NAME
|
|
||||||
})
|
|
||||||
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
|
|
||||||
public class AdditionalPropertiesInteger extends HashMap<String, Integer> {
|
|
||||||
public static final String JSON_PROPERTY_NAME = "name";
|
|
||||||
private String name;
|
|
||||||
|
|
||||||
|
|
||||||
public AdditionalPropertiesInteger 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;
|
|
||||||
}
|
|
||||||
AdditionalPropertiesInteger additionalPropertiesInteger = (AdditionalPropertiesInteger) o;
|
|
||||||
return Objects.equals(this.name, additionalPropertiesInteger.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 AdditionalPropertiesInteger {\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 ");
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
@ -1,109 +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.Map;
|
|
||||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
|
||||||
import javax.validation.constraints.*;
|
|
||||||
import javax.validation.Valid;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* AdditionalPropertiesNumber
|
|
||||||
*/
|
|
||||||
@JsonPropertyOrder({
|
|
||||||
AdditionalPropertiesNumber.JSON_PROPERTY_NAME
|
|
||||||
})
|
|
||||||
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
|
|
||||||
public class AdditionalPropertiesNumber extends HashMap<String, BigDecimal> {
|
|
||||||
public static final String JSON_PROPERTY_NAME = "name";
|
|
||||||
private String name;
|
|
||||||
|
|
||||||
|
|
||||||
public AdditionalPropertiesNumber 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;
|
|
||||||
}
|
|
||||||
AdditionalPropertiesNumber additionalPropertiesNumber = (AdditionalPropertiesNumber) o;
|
|
||||||
return Objects.equals(this.name, additionalPropertiesNumber.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 AdditionalPropertiesNumber {\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 ");
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user