forked from loafle/openapi-generator-original
Merge remote-tracking branch 'origin/master' into 2.3.0
This commit is contained in:
commit
f7cbb2c0e6
@ -794,6 +794,7 @@ Here are some companies/projects using Swagger Codegen in production. To add you
|
|||||||
- [Stingray](http://www.stingray.com)
|
- [Stingray](http://www.stingray.com)
|
||||||
- [StyleRecipe](http://stylerecipe.co.jp)
|
- [StyleRecipe](http://stylerecipe.co.jp)
|
||||||
- [Svenska Spel AB](https://www.svenskaspel.se/)
|
- [Svenska Spel AB](https://www.svenskaspel.se/)
|
||||||
|
- [Switch Database](https://www.switchdatabase.com/)
|
||||||
- [TaskData](http://www.taskdata.com/)
|
- [TaskData](http://www.taskdata.com/)
|
||||||
- [ThoughtWorks](https://www.thoughtworks.com)
|
- [ThoughtWorks](https://www.thoughtworks.com)
|
||||||
- [Trexle](https://trexle.com/)
|
- [Trexle](https://trexle.com/)
|
||||||
@ -804,6 +805,7 @@ Here are some companies/projects using Swagger Codegen in production. To add you
|
|||||||
- [Wealthfront](https://www.wealthfront.com/)
|
- [Wealthfront](https://www.wealthfront.com/)
|
||||||
- [Webever GmbH](https://www.webever.de/)
|
- [Webever GmbH](https://www.webever.de/)
|
||||||
- [WEXO A/S](https://www.wexo.dk/)
|
- [WEXO A/S](https://www.wexo.dk/)
|
||||||
|
- [XSky](http://www.xsky.com/)
|
||||||
- [Zalando](https://tech.zalando.com)
|
- [Zalando](https://tech.zalando.com)
|
||||||
- [ZEEF.com](https://zeef.com/)
|
- [ZEEF.com](https://zeef.com/)
|
||||||
|
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
{
|
{
|
||||||
|
"artifactId": "spring-boot-beanvalidation",
|
||||||
"library": "spring-boot",
|
"library": "spring-boot",
|
||||||
"useBeanValidation": true
|
"useBeanValidation": true
|
||||||
}
|
}
|
||||||
|
@ -27,6 +27,7 @@ public class JavaClientCodegen extends AbstractJavaCodegen
|
|||||||
public static final String DO_NOT_USE_RX = "doNotUseRx";
|
public static final String DO_NOT_USE_RX = "doNotUseRx";
|
||||||
public static final String USE_PLAY24_WS = "usePlay24WS";
|
public static final String USE_PLAY24_WS = "usePlay24WS";
|
||||||
public static final String PARCELABLE_MODEL = "parcelableModel";
|
public static final String PARCELABLE_MODEL = "parcelableModel";
|
||||||
|
public static final String USE_RUNTIME_EXCEPTION = "useRuntimeException";
|
||||||
|
|
||||||
public static final String RETROFIT_1 = "retrofit";
|
public static final String RETROFIT_1 = "retrofit";
|
||||||
public static final String RETROFIT_2 = "retrofit2";
|
public static final String RETROFIT_2 = "retrofit2";
|
||||||
@ -40,6 +41,7 @@ public class JavaClientCodegen extends AbstractJavaCodegen
|
|||||||
protected boolean useBeanValidation = false;
|
protected boolean useBeanValidation = false;
|
||||||
protected boolean performBeanValidation = false;
|
protected boolean performBeanValidation = false;
|
||||||
protected boolean useGzipFeature = false;
|
protected boolean useGzipFeature = false;
|
||||||
|
protected boolean useRuntimeException = false;
|
||||||
|
|
||||||
public JavaClientCodegen() {
|
public JavaClientCodegen() {
|
||||||
super();
|
super();
|
||||||
@ -58,6 +60,7 @@ public class JavaClientCodegen extends AbstractJavaCodegen
|
|||||||
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"));
|
||||||
cliOptions.add(CliOption.newBoolean(USE_GZIP_FEATURE, "Send gzip-encoded requests"));
|
cliOptions.add(CliOption.newBoolean(USE_GZIP_FEATURE, "Send gzip-encoded requests"));
|
||||||
|
cliOptions.add(CliOption.newBoolean(USE_RUNTIME_EXCEPTION, "Use RuntimeException instead of Exception"));
|
||||||
|
|
||||||
supportedLibraries.put("jersey1", "HTTP client: Jersey client 1.19.1. JSON processing: Jackson 2.7.0. Enable Java6 support using '-DsupportJava6=true'. Enable gzip request encoding using '-DuseGzipFeature=true'.");
|
supportedLibraries.put("jersey1", "HTTP client: Jersey client 1.19.1. JSON processing: Jackson 2.7.0. Enable Java6 support using '-DsupportJava6=true'. Enable gzip request encoding using '-DuseGzipFeature=true'.");
|
||||||
supportedLibraries.put("feign", "HTTP client: OpenFeign 9.4.0. JSON processing: Jackson 2.8.7");
|
supportedLibraries.put("feign", "HTTP client: OpenFeign 9.4.0. JSON processing: Jackson 2.8.7");
|
||||||
@ -128,6 +131,10 @@ public class JavaClientCodegen extends AbstractJavaCodegen
|
|||||||
this.setUseGzipFeature(convertPropertyToBooleanAndWriteBack(USE_GZIP_FEATURE));
|
this.setUseGzipFeature(convertPropertyToBooleanAndWriteBack(USE_GZIP_FEATURE));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (additionalProperties.containsKey(USE_RUNTIME_EXCEPTION)) {
|
||||||
|
this.setUseRuntimeException(convertPropertyToBooleanAndWriteBack(USE_RUNTIME_EXCEPTION));
|
||||||
|
}
|
||||||
|
|
||||||
final String invokerFolder = (sourceFolder + '/' + invokerPackage).replace(".", "/");
|
final String invokerFolder = (sourceFolder + '/' + invokerPackage).replace(".", "/");
|
||||||
final String authFolder = (sourceFolder + '/' + invokerPackage + ".auth").replace(".", "/");
|
final String authFolder = (sourceFolder + '/' + invokerPackage + ".auth").replace(".", "/");
|
||||||
|
|
||||||
@ -295,22 +302,22 @@ public class JavaClientCodegen extends AbstractJavaCodegen
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Prioritizes consumes mime-type list by moving json-vendor and json mime-types up front, but
|
* Prioritizes consumes mime-type list by moving json-vendor and json mime-types up front, but
|
||||||
* otherwise preserves original consumes definition order.
|
* otherwise preserves original consumes definition order.
|
||||||
* [application/vnd...+json,... application/json, ..as is..]
|
* [application/vnd...+json,... application/json, ..as is..]
|
||||||
*
|
*
|
||||||
* @param consumes consumes mime-type list
|
* @param consumes consumes mime-type list
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
static List<Map<String, String>> prioritizeContentTypes(List<Map<String, String>> consumes) {
|
static List<Map<String, String>> prioritizeContentTypes(List<Map<String, String>> consumes) {
|
||||||
if ( consumes.size() <= 1 )
|
if ( consumes.size() <= 1 )
|
||||||
return consumes;
|
return consumes;
|
||||||
|
|
||||||
List<Map<String, String>> prioritizedContentTypes = new ArrayList<>(consumes.size());
|
List<Map<String, String>> prioritizedContentTypes = new ArrayList<>(consumes.size());
|
||||||
|
|
||||||
List<Map<String, String>> jsonVendorMimeTypes = new ArrayList<>(consumes.size());
|
List<Map<String, String>> jsonVendorMimeTypes = new ArrayList<>(consumes.size());
|
||||||
List<Map<String, String>> jsonMimeTypes = new ArrayList<>(consumes.size());
|
List<Map<String, String>> jsonMimeTypes = new ArrayList<>(consumes.size());
|
||||||
|
|
||||||
for ( Map<String, String> consume : consumes) {
|
for ( Map<String, String> consume : consumes) {
|
||||||
if ( isJsonVendorMimeType(consume.get(MEDIA_TYPE))) {
|
if ( isJsonVendorMimeType(consume.get(MEDIA_TYPE))) {
|
||||||
jsonVendorMimeTypes.add(consume);
|
jsonVendorMimeTypes.add(consume);
|
||||||
@ -320,18 +327,18 @@ public class JavaClientCodegen extends AbstractJavaCodegen
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
prioritizedContentTypes.add(consume);
|
prioritizedContentTypes.add(consume);
|
||||||
|
|
||||||
consume.put("hasMore", "true");
|
consume.put("hasMore", "true");
|
||||||
}
|
}
|
||||||
|
|
||||||
prioritizedContentTypes.addAll(0, jsonMimeTypes);
|
prioritizedContentTypes.addAll(0, jsonMimeTypes);
|
||||||
prioritizedContentTypes.addAll(0, jsonVendorMimeTypes);
|
prioritizedContentTypes.addAll(0, jsonVendorMimeTypes);
|
||||||
|
|
||||||
prioritizedContentTypes.get(prioritizedContentTypes.size()-1).put("hasMore", null);
|
prioritizedContentTypes.get(prioritizedContentTypes.size()-1).put("hasMore", null);
|
||||||
|
|
||||||
return prioritizedContentTypes;
|
return prioritizedContentTypes;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static boolean isMultipartType(List<Map<String, String>> consumes) {
|
private static boolean isMultipartType(List<Map<String, String>> consumes) {
|
||||||
Map<String, String> firstType = consumes.get(0);
|
Map<String, String> firstType = consumes.get(0);
|
||||||
if (firstType != null) {
|
if (firstType != null) {
|
||||||
@ -419,8 +426,12 @@ public class JavaClientCodegen extends AbstractJavaCodegen
|
|||||||
this.useGzipFeature = useGzipFeature;
|
this.useGzipFeature = useGzipFeature;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setUseRuntimeException(boolean useRuntimeException) {
|
||||||
|
this.useRuntimeException = useRuntimeException;
|
||||||
|
}
|
||||||
|
|
||||||
final private static Pattern JSON_MIME_PATTERN = Pattern.compile("(?i)application\\/json(;.*)?");
|
final private static Pattern JSON_MIME_PATTERN = Pattern.compile("(?i)application\\/json(;.*)?");
|
||||||
final private static Pattern JSON_VENDOR_MIME_PATTERN = Pattern.compile("(?i)application\\/vnd.(.*)+json(;.*)?");
|
final private static Pattern JSON_VENDOR_MIME_PATTERN = Pattern.compile("(?i)application\\/vnd.(.*)+json(;.*)?");
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check if the given MIME is a JSON MIME.
|
* Check if the given MIME is a JSON MIME.
|
||||||
|
@ -673,6 +673,11 @@ public class PhpClientCodegen extends DefaultCodegen implements CodegenConfig {
|
|||||||
return varName;
|
return varName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// for symbol, e.g. $, #
|
||||||
|
if (getSymbolName(name) != null) {
|
||||||
|
return getSymbolName(name).toUpperCase();
|
||||||
|
}
|
||||||
|
|
||||||
// string
|
// string
|
||||||
String enumName = sanitizeName(underscore(name).toUpperCase());
|
String enumName = sanitizeName(underscore(name).toUpperCase());
|
||||||
enumName = enumName.replaceFirst("^_", "");
|
enumName = enumName.replaceFirst("^_", "");
|
||||||
|
@ -196,6 +196,13 @@ public class PythonClientCodegen extends DefaultCodegen implements CodegenConfig
|
|||||||
return str.replaceAll("\\.", "_");
|
return str.replaceAll("\\.", "_");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Map<String, Object> postProcessModels(Map<String, Object> objs) {
|
||||||
|
// process enum in models
|
||||||
|
return postProcessModelsEnum(objs);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void postProcessParameter(CodegenParameter parameter){
|
public void postProcessParameter(CodegenParameter parameter){
|
||||||
postProcessPattern(parameter.pattern, parameter.vendorExtensions);
|
postProcessPattern(parameter.pattern, parameter.vendorExtensions);
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
package io.swagger.codegen.languages;
|
package io.swagger.codegen.languages;
|
||||||
|
|
||||||
|
import com.samskivert.mustache.Mustache;
|
||||||
|
import com.samskivert.mustache.Template;
|
||||||
import io.swagger.codegen.*;
|
import io.swagger.codegen.*;
|
||||||
import io.swagger.codegen.languages.features.BeanValidationFeatures;
|
import io.swagger.codegen.languages.features.BeanValidationFeatures;
|
||||||
import io.swagger.models.Operation;
|
import io.swagger.models.Operation;
|
||||||
@ -7,7 +9,12 @@ import io.swagger.models.Path;
|
|||||||
import io.swagger.models.Swagger;
|
import io.swagger.models.Swagger;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.io.Writer;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
import java.util.regex.Matcher;
|
||||||
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
|
|
||||||
public class SpringCodegen extends AbstractJavaCodegen implements BeanValidationFeatures {
|
public class SpringCodegen extends AbstractJavaCodegen implements BeanValidationFeatures {
|
||||||
public static final String DEFAULT_LIBRARY = "spring-boot";
|
public static final String DEFAULT_LIBRARY = "spring-boot";
|
||||||
@ -170,6 +177,9 @@ public class SpringCodegen extends AbstractJavaCodegen implements BeanValidation
|
|||||||
this.setImplicitHeaders(Boolean.valueOf(additionalProperties.get(IMPLICIT_HEADERS).toString()));
|
this.setImplicitHeaders(Boolean.valueOf(additionalProperties.get(IMPLICIT_HEADERS).toString()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
typeMapping.put("file", "Resource");
|
||||||
|
importMapping.put("Resource", "org.springframework.core.io.Resource");
|
||||||
|
|
||||||
supportingFiles.add(new SupportingFile("pom.mustache", "", "pom.xml"));
|
supportingFiles.add(new SupportingFile("pom.mustache", "", "pom.xml"));
|
||||||
supportingFiles.add(new SupportingFile("README.mustache", "", "README.md"));
|
supportingFiles.add(new SupportingFile("README.mustache", "", "README.md"));
|
||||||
|
|
||||||
@ -287,6 +297,19 @@ public class SpringCodegen extends AbstractJavaCodegen implements BeanValidation
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// add lamda for mustache templates
|
||||||
|
additionalProperties.put("lamdaEscapeDoubleQuote", new Mustache.Lambda() {
|
||||||
|
@Override
|
||||||
|
public void execute(Template.Fragment fragment, Writer writer) throws IOException {
|
||||||
|
writer.write(fragment.execute().replaceAll("\"", Matcher.quoteReplacement("\\\"")));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
additionalProperties.put("lamdaRemoveLineBreak", new Mustache.Lambda() {
|
||||||
|
@Override
|
||||||
|
public void execute(Template.Fragment fragment, Writer writer) throws IOException {
|
||||||
|
writer.write(fragment.execute().replaceAll("\\r|\\n", ""));
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -470,6 +493,32 @@ public class SpringCodegen extends AbstractJavaCodegen implements BeanValidation
|
|||||||
return camelize(name) + "Api";
|
return camelize(name) + "Api";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setParameterExampleValue(CodegenParameter p) {
|
||||||
|
String type = p.baseType;
|
||||||
|
if (type == null) {
|
||||||
|
type = p.dataType;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ("File".equals(type)) {
|
||||||
|
String example;
|
||||||
|
|
||||||
|
if (p.defaultValue == null) {
|
||||||
|
example = p.example;
|
||||||
|
} else {
|
||||||
|
example = p.defaultValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (example == null) {
|
||||||
|
example = "/path/to/file";
|
||||||
|
}
|
||||||
|
example = "new org.springframework.core.io.FileSystemResource(new java.io.File(\"" + escapeText(example) + "\"))";
|
||||||
|
p.example = example;
|
||||||
|
} else {
|
||||||
|
super.setParameterExampleValue(p);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void setTitle(String title) {
|
public void setTitle(String title) {
|
||||||
this.title = title;
|
this.title = title;
|
||||||
}
|
}
|
||||||
|
@ -6,7 +6,7 @@ import java.util.Map;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
{{>generatedAnnotation}}
|
{{>generatedAnnotation}}
|
||||||
public class ApiException extends Exception {
|
public class ApiException extends{{#useRuntimeException}} RuntimeException {{/useRuntimeException}}{{^useRuntimeException}} Exception {{/useRuntimeException}}{
|
||||||
private int code = 0;
|
private int code = 0;
|
||||||
private Map<String, List<String>> responseHeaders = null;
|
private Map<String, List<String>> responseHeaders = null;
|
||||||
private String responseBody = null;
|
private String responseBody = null;
|
||||||
|
@ -9,8 +9,8 @@ buildscript {
|
|||||||
jcenter()
|
jcenter()
|
||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath 'com.android.tools.build:gradle:1.5.+'
|
classpath 'com.android.tools.build:gradle:2.3.+'
|
||||||
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.3'
|
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -23,13 +23,13 @@ if(hasProperty('target') && target == 'android') {
|
|||||||
|
|
||||||
apply plugin: 'com.android.library'
|
apply plugin: 'com.android.library'
|
||||||
apply plugin: 'com.github.dcendents.android-maven'
|
apply plugin: 'com.github.dcendents.android-maven'
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion 23
|
compileSdkVersion 25
|
||||||
buildToolsVersion '23.0.2'
|
buildToolsVersion '25.0.2'
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
minSdkVersion 14
|
minSdkVersion 14
|
||||||
targetSdkVersion 23
|
targetSdkVersion 25
|
||||||
}
|
}
|
||||||
compileOptions {
|
compileOptions {
|
||||||
{{#java8}}
|
{{#java8}}
|
||||||
@ -41,7 +41,7 @@ if(hasProperty('target') && target == 'android') {
|
|||||||
targetCompatibility JavaVersion.VERSION_1_7
|
targetCompatibility JavaVersion.VERSION_1_7
|
||||||
{{/java8}}
|
{{/java8}}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Rename the aar correctly
|
// Rename the aar correctly
|
||||||
libraryVariants.all { variant ->
|
libraryVariants.all { variant ->
|
||||||
variant.outputs.each { output ->
|
variant.outputs.each { output ->
|
||||||
@ -57,7 +57,7 @@ if(hasProperty('target') && target == 'android') {
|
|||||||
provided 'javax.annotation:jsr250-api:1.0'
|
provided 'javax.annotation:jsr250-api:1.0'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
afterEvaluate {
|
afterEvaluate {
|
||||||
android.libraryVariants.all { variant ->
|
android.libraryVariants.all { variant ->
|
||||||
def task = project.tasks.create "jar${variant.name.capitalize()}", Jar
|
def task = project.tasks.create "jar${variant.name.capitalize()}", Jar
|
||||||
@ -69,12 +69,12 @@ if(hasProperty('target') && target == 'android') {
|
|||||||
artifacts.add('archives', task);
|
artifacts.add('archives', task);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
task sourcesJar(type: Jar) {
|
task sourcesJar(type: Jar) {
|
||||||
from android.sourceSets.main.java.srcDirs
|
from android.sourceSets.main.java.srcDirs
|
||||||
classifier = 'sources'
|
classifier = 'sources'
|
||||||
}
|
}
|
||||||
|
|
||||||
artifacts {
|
artifacts {
|
||||||
archives sourcesJar
|
archives sourcesJar
|
||||||
}
|
}
|
||||||
@ -92,13 +92,13 @@ if(hasProperty('target') && target == 'android') {
|
|||||||
sourceCompatibility = JavaVersion.VERSION_1_7
|
sourceCompatibility = JavaVersion.VERSION_1_7
|
||||||
targetCompatibility = JavaVersion.VERSION_1_7
|
targetCompatibility = JavaVersion.VERSION_1_7
|
||||||
{{/java8}}
|
{{/java8}}
|
||||||
|
|
||||||
install {
|
install {
|
||||||
repositories.mavenInstaller {
|
repositories.mavenInstaller {
|
||||||
pom.artifactId = '{{artifactId}}'
|
pom.artifactId = '{{artifactId}}'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
task execute(type:JavaExec) {
|
task execute(type:JavaExec) {
|
||||||
main = System.getProperty('mainClass')
|
main = System.getProperty('mainClass')
|
||||||
classpath = sourceSets.main.runtimeClasspath
|
classpath = sourceSets.main.runtimeClasspath
|
||||||
|
@ -9,8 +9,8 @@ buildscript {
|
|||||||
jcenter()
|
jcenter()
|
||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath 'com.android.tools.build:gradle:1.5.+'
|
classpath 'com.android.tools.build:gradle:2.3.+'
|
||||||
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.3'
|
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -23,19 +23,19 @@ if(hasProperty('target') && target == 'android') {
|
|||||||
|
|
||||||
apply plugin: 'com.android.library'
|
apply plugin: 'com.android.library'
|
||||||
apply plugin: 'com.github.dcendents.android-maven'
|
apply plugin: 'com.github.dcendents.android-maven'
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion 23
|
compileSdkVersion 25
|
||||||
buildToolsVersion '23.0.2'
|
buildToolsVersion '25.0.2'
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
minSdkVersion 14
|
minSdkVersion 14
|
||||||
targetSdkVersion 23
|
targetSdkVersion 25
|
||||||
}
|
}
|
||||||
compileOptions {
|
compileOptions {
|
||||||
sourceCompatibility JavaVersion.VERSION_1_7
|
sourceCompatibility JavaVersion.VERSION_1_7
|
||||||
targetCompatibility JavaVersion.VERSION_1_7
|
targetCompatibility JavaVersion.VERSION_1_7
|
||||||
}
|
}
|
||||||
|
|
||||||
// Rename the aar correctly
|
// Rename the aar correctly
|
||||||
libraryVariants.all { variant ->
|
libraryVariants.all { variant ->
|
||||||
variant.outputs.each { output ->
|
variant.outputs.each { output ->
|
||||||
@ -51,7 +51,7 @@ if(hasProperty('target') && target == 'android') {
|
|||||||
provided 'javax.annotation:jsr250-api:1.0'
|
provided 'javax.annotation:jsr250-api:1.0'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
afterEvaluate {
|
afterEvaluate {
|
||||||
android.libraryVariants.all { variant ->
|
android.libraryVariants.all { variant ->
|
||||||
def task = project.tasks.create "jar${variant.name.capitalize()}", Jar
|
def task = project.tasks.create "jar${variant.name.capitalize()}", Jar
|
||||||
@ -63,12 +63,12 @@ if(hasProperty('target') && target == 'android') {
|
|||||||
artifacts.add('archives', task);
|
artifacts.add('archives', task);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
task sourcesJar(type: Jar) {
|
task sourcesJar(type: Jar) {
|
||||||
from android.sourceSets.main.java.srcDirs
|
from android.sourceSets.main.java.srcDirs
|
||||||
classifier = 'sources'
|
classifier = 'sources'
|
||||||
}
|
}
|
||||||
|
|
||||||
artifacts {
|
artifacts {
|
||||||
archives sourcesJar
|
archives sourcesJar
|
||||||
}
|
}
|
||||||
@ -77,16 +77,16 @@ if(hasProperty('target') && target == 'android') {
|
|||||||
|
|
||||||
apply plugin: 'java'
|
apply plugin: 'java'
|
||||||
apply plugin: 'maven'
|
apply plugin: 'maven'
|
||||||
|
|
||||||
sourceCompatibility = JavaVersion.VERSION_{{^java8}}1_7{{/java8}}{{#java8}}1_8{{/java8}}
|
sourceCompatibility = JavaVersion.VERSION_{{^java8}}1_7{{/java8}}{{#java8}}1_8{{/java8}}
|
||||||
targetCompatibility = JavaVersion.VERSION_{{^java8}}1_7{{/java8}}{{#java8}}1_8{{/java8}}
|
targetCompatibility = JavaVersion.VERSION_{{^java8}}1_7{{/java8}}{{#java8}}1_8{{/java8}}
|
||||||
|
|
||||||
install {
|
install {
|
||||||
repositories.mavenInstaller {
|
repositories.mavenInstaller {
|
||||||
pom.artifactId = '{{artifactId}}'
|
pom.artifactId = '{{artifactId}}'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
task execute(type:JavaExec) {
|
task execute(type:JavaExec) {
|
||||||
main = System.getProperty('mainClass')
|
main = System.getProperty('mainClass')
|
||||||
classpath = sourceSets.main.runtimeClasspath
|
classpath = sourceSets.main.runtimeClasspath
|
||||||
|
@ -9,8 +9,8 @@ buildscript {
|
|||||||
jcenter()
|
jcenter()
|
||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath 'com.android.tools.build:gradle:1.5.+'
|
classpath 'com.android.tools.build:gradle:2.3.+'
|
||||||
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.3'
|
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -25,11 +25,11 @@ if(hasProperty('target') && target == 'android') {
|
|||||||
apply plugin: 'com.github.dcendents.android-maven'
|
apply plugin: 'com.github.dcendents.android-maven'
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion 23
|
compileSdkVersion 25
|
||||||
buildToolsVersion '23.0.2'
|
buildToolsVersion '25.0.2'
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
minSdkVersion 14
|
minSdkVersion 14
|
||||||
targetSdkVersion 23
|
targetSdkVersion 25
|
||||||
}
|
}
|
||||||
compileOptions {
|
compileOptions {
|
||||||
{{#java8}}
|
{{#java8}}
|
||||||
|
@ -9,8 +9,8 @@ buildscript {
|
|||||||
jcenter()
|
jcenter()
|
||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath 'com.android.tools.build:gradle:1.5.+'
|
classpath 'com.android.tools.build:gradle:2.3.+'
|
||||||
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.3'
|
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -25,11 +25,11 @@ if(hasProperty('target') && target == 'android') {
|
|||||||
apply plugin: 'com.github.dcendents.android-maven'
|
apply plugin: 'com.github.dcendents.android-maven'
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion 23
|
compileSdkVersion 25
|
||||||
buildToolsVersion '23.0.2'
|
buildToolsVersion '25.0.2'
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
minSdkVersion 14
|
minSdkVersion 14
|
||||||
targetSdkVersion 23
|
targetSdkVersion 25
|
||||||
}
|
}
|
||||||
compileOptions {
|
compileOptions {
|
||||||
sourceCompatibility JavaVersion.VERSION_1_7
|
sourceCompatibility JavaVersion.VERSION_1_7
|
||||||
|
@ -9,8 +9,8 @@ buildscript {
|
|||||||
jcenter()
|
jcenter()
|
||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath 'com.android.tools.build:gradle:1.5.+'
|
classpath 'com.android.tools.build:gradle:2.3.+'
|
||||||
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.3'
|
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -23,19 +23,19 @@ if(hasProperty('target') && target == 'android') {
|
|||||||
|
|
||||||
apply plugin: 'com.android.library'
|
apply plugin: 'com.android.library'
|
||||||
apply plugin: 'com.github.dcendents.android-maven'
|
apply plugin: 'com.github.dcendents.android-maven'
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion 23
|
compileSdkVersion 25
|
||||||
buildToolsVersion '23.0.2'
|
buildToolsVersion '25.0.2'
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
minSdkVersion 14
|
minSdkVersion 14
|
||||||
targetSdkVersion 23
|
targetSdkVersion 25
|
||||||
}
|
}
|
||||||
compileOptions {
|
compileOptions {
|
||||||
sourceCompatibility JavaVersion.VERSION_1_7
|
sourceCompatibility JavaVersion.VERSION_1_7
|
||||||
targetCompatibility JavaVersion.VERSION_1_7
|
targetCompatibility JavaVersion.VERSION_1_7
|
||||||
}
|
}
|
||||||
|
|
||||||
// Rename the aar correctly
|
// Rename the aar correctly
|
||||||
libraryVariants.all { variant ->
|
libraryVariants.all { variant ->
|
||||||
variant.outputs.each { output ->
|
variant.outputs.each { output ->
|
||||||
@ -51,7 +51,7 @@ if(hasProperty('target') && target == 'android') {
|
|||||||
provided 'javax.annotation:jsr250-api:1.0'
|
provided 'javax.annotation:jsr250-api:1.0'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
afterEvaluate {
|
afterEvaluate {
|
||||||
android.libraryVariants.all { variant ->
|
android.libraryVariants.all { variant ->
|
||||||
def task = project.tasks.create "jar${variant.name.capitalize()}", Jar
|
def task = project.tasks.create "jar${variant.name.capitalize()}", Jar
|
||||||
@ -63,12 +63,12 @@ if(hasProperty('target') && target == 'android') {
|
|||||||
artifacts.add('archives', task);
|
artifacts.add('archives', task);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
task sourcesJar(type: Jar) {
|
task sourcesJar(type: Jar) {
|
||||||
from android.sourceSets.main.java.srcDirs
|
from android.sourceSets.main.java.srcDirs
|
||||||
classifier = 'sources'
|
classifier = 'sources'
|
||||||
}
|
}
|
||||||
|
|
||||||
artifacts {
|
artifacts {
|
||||||
archives sourcesJar
|
archives sourcesJar
|
||||||
}
|
}
|
||||||
@ -77,16 +77,16 @@ if(hasProperty('target') && target == 'android') {
|
|||||||
|
|
||||||
apply plugin: 'java'
|
apply plugin: 'java'
|
||||||
apply plugin: 'maven'
|
apply plugin: 'maven'
|
||||||
|
|
||||||
sourceCompatibility = JavaVersion.VERSION_1_7
|
sourceCompatibility = JavaVersion.VERSION_1_7
|
||||||
targetCompatibility = JavaVersion.VERSION_1_7
|
targetCompatibility = JavaVersion.VERSION_1_7
|
||||||
|
|
||||||
install {
|
install {
|
||||||
repositories.mavenInstaller {
|
repositories.mavenInstaller {
|
||||||
pom.artifactId = '{{artifactId}}'
|
pom.artifactId = '{{artifactId}}'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
task execute(type:JavaExec) {
|
task execute(type:JavaExec) {
|
||||||
main = System.getProperty('mainClass')
|
main = System.getProperty('mainClass')
|
||||||
classpath = sourceSets.main.runtimeClasspath
|
classpath = sourceSets.main.runtimeClasspath
|
||||||
|
@ -9,8 +9,8 @@ buildscript {
|
|||||||
jcenter()
|
jcenter()
|
||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath 'com.android.tools.build:gradle:1.5.+'
|
classpath 'com.android.tools.build:gradle:2.3.+'
|
||||||
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.3'
|
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -21,76 +21,76 @@ repositories {
|
|||||||
|
|
||||||
if(hasProperty('target') && target == 'android') {
|
if(hasProperty('target') && target == 'android') {
|
||||||
|
|
||||||
apply plugin: 'com.android.library'
|
apply plugin: 'com.android.library'
|
||||||
apply plugin: 'com.github.dcendents.android-maven'
|
apply plugin: 'com.github.dcendents.android-maven'
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion 23
|
compileSdkVersion 25
|
||||||
buildToolsVersion '23.0.2'
|
buildToolsVersion '25.0.2'
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
minSdkVersion 14
|
minSdkVersion 14
|
||||||
targetSdkVersion 23
|
targetSdkVersion 25
|
||||||
}
|
}
|
||||||
compileOptions {
|
compileOptions {
|
||||||
sourceCompatibility JavaVersion.VERSION_1_7
|
sourceCompatibility JavaVersion.VERSION_1_7
|
||||||
targetCompatibility JavaVersion.VERSION_1_7
|
targetCompatibility JavaVersion.VERSION_1_7
|
||||||
}
|
}
|
||||||
|
|
||||||
// Rename the aar correctly
|
// Rename the aar correctly
|
||||||
libraryVariants.all { variant ->
|
libraryVariants.all { variant ->
|
||||||
variant.outputs.each { output ->
|
variant.outputs.each { output ->
|
||||||
def outputFile = output.outputFile
|
def outputFile = output.outputFile
|
||||||
if (outputFile != null && outputFile.name.endsWith('.aar')) {
|
if (outputFile != null && outputFile.name.endsWith('.aar')) {
|
||||||
def fileName = "${project.name}-${variant.baseName}-${version}.aar"
|
def fileName = "${project.name}-${variant.baseName}-${version}.aar"
|
||||||
output.outputFile = new File(outputFile.parent, fileName)
|
output.outputFile = new File(outputFile.parent, fileName)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
provided 'javax.annotation:jsr250-api:1.0'
|
provided 'javax.annotation:jsr250-api:1.0'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
afterEvaluate {
|
afterEvaluate {
|
||||||
android.libraryVariants.all { variant ->
|
android.libraryVariants.all { variant ->
|
||||||
def task = project.tasks.create "jar${variant.name.capitalize()}", Jar
|
def task = project.tasks.create "jar${variant.name.capitalize()}", Jar
|
||||||
task.description = "Create jar artifact for ${variant.name}"
|
task.description = "Create jar artifact for ${variant.name}"
|
||||||
task.dependsOn variant.javaCompile
|
task.dependsOn variant.javaCompile
|
||||||
task.from variant.javaCompile.destinationDir
|
task.from variant.javaCompile.destinationDir
|
||||||
task.destinationDir = project.file("${project.buildDir}/outputs/jar")
|
task.destinationDir = project.file("${project.buildDir}/outputs/jar")
|
||||||
task.archiveName = "${project.name}-${variant.baseName}-${version}.jar"
|
task.archiveName = "${project.name}-${variant.baseName}-${version}.jar"
|
||||||
artifacts.add('archives', task);
|
artifacts.add('archives', task);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
task sourcesJar(type: Jar) {
|
task sourcesJar(type: Jar) {
|
||||||
from android.sourceSets.main.java.srcDirs
|
from android.sourceSets.main.java.srcDirs
|
||||||
classifier = 'sources'
|
classifier = 'sources'
|
||||||
}
|
}
|
||||||
|
|
||||||
artifacts {
|
artifacts {
|
||||||
archives sourcesJar
|
archives sourcesJar
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
apply plugin: 'java'
|
apply plugin: 'java'
|
||||||
apply plugin: 'maven'
|
apply plugin: 'maven'
|
||||||
|
|
||||||
sourceCompatibility = JavaVersion.VERSION_{{^java8}}1_7{{/java8}}{{#java8}}1_8{{/java8}}
|
sourceCompatibility = JavaVersion.VERSION_{{^java8}}1_7{{/java8}}{{#java8}}1_8{{/java8}}
|
||||||
targetCompatibility = JavaVersion.VERSION_{{^java8}}1_7{{/java8}}{{#java8}}1_8{{/java8}}
|
targetCompatibility = JavaVersion.VERSION_{{^java8}}1_7{{/java8}}{{#java8}}1_8{{/java8}}
|
||||||
|
|
||||||
install {
|
install {
|
||||||
repositories.mavenInstaller {
|
repositories.mavenInstaller {
|
||||||
pom.artifactId = '{{artifactId}}'
|
pom.artifactId = '{{artifactId}}'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
task execute(type:JavaExec) {
|
task execute(type:JavaExec) {
|
||||||
main = System.getProperty('mainClass')
|
main = System.getProperty('mainClass')
|
||||||
classpath = sourceSets.main.runtimeClasspath
|
classpath = sourceSets.main.runtimeClasspath
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ext {
|
ext {
|
||||||
|
@ -16,6 +16,7 @@ import org.springframework.web.bind.annotation.RequestMethod;
|
|||||||
import org.springframework.web.bind.annotation.RequestParam;
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
import org.springframework.web.bind.annotation.RequestPart;
|
import org.springframework.web.bind.annotation.RequestPart;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
import java.io.IOException;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
{{#async}}
|
{{#async}}
|
||||||
@ -40,16 +41,18 @@ public interface {{classname}} {
|
|||||||
}{{/hasAuthMethods}}, tags={ {{#vendorExtensions.x-tags}}"{{tag}}",{{/vendorExtensions.x-tags}} })
|
}{{/hasAuthMethods}}, tags={ {{#vendorExtensions.x-tags}}"{{tag}}",{{/vendorExtensions.x-tags}} })
|
||||||
@ApiResponses(value = { {{#responses}}
|
@ApiResponses(value = { {{#responses}}
|
||||||
@ApiResponse(code = {{{code}}}, message = "{{{message}}}", response = {{{returnType}}}.class){{#hasMore}},{{/hasMore}}{{/responses}} })
|
@ApiResponse(code = {{{code}}}, message = "{{{message}}}", response = {{{returnType}}}.class){{#hasMore}},{{/hasMore}}{{/responses}} })
|
||||||
{{#implicitHeaders}}@ApiImplicitParams({
|
{{#implicitHeaders}}
|
||||||
|
@ApiImplicitParams({
|
||||||
{{#headerParams}}{{>implicitHeader}}{{/headerParams}}
|
{{#headerParams}}{{>implicitHeader}}{{/headerParams}}
|
||||||
}){{/implicitHeaders}}
|
})
|
||||||
|
{{/implicitHeaders}}
|
||||||
@RequestMapping(value = "{{{path}}}",{{#singleContentTypes}}
|
@RequestMapping(value = "{{{path}}}",{{#singleContentTypes}}
|
||||||
produces = "{{{vendorExtensions.x-accepts}}}",
|
produces = "{{{vendorExtensions.x-accepts}}}",
|
||||||
consumes = "{{{vendorExtensions.x-contentType}}}",{{/singleContentTypes}}{{^singleContentTypes}}{{#hasProduces}}
|
consumes = "{{{vendorExtensions.x-contentType}}}",{{/singleContentTypes}}{{^singleContentTypes}}{{#hasProduces}}
|
||||||
produces = { {{#produces}}"{{{mediaType}}}"{{#hasMore}}, {{/hasMore}}{{/produces}} }, {{/hasProduces}}{{#hasConsumes}}
|
produces = { {{#produces}}"{{{mediaType}}}"{{#hasMore}}, {{/hasMore}}{{/produces}} }, {{/hasProduces}}{{#hasConsumes}}
|
||||||
consumes = { {{#consumes}}"{{{mediaType}}}"{{#hasMore}}, {{/hasMore}}{{/consumes}} },{{/hasConsumes}}{{/singleContentTypes}}
|
consumes = { {{#consumes}}"{{{mediaType}}}"{{#hasMore}}, {{/hasMore}}{{/consumes}} },{{/hasConsumes}}{{/singleContentTypes}}
|
||||||
method = RequestMethod.{{httpMethod}})
|
method = RequestMethod.{{httpMethod}})
|
||||||
{{#jdk8}}default {{/jdk8}}{{#responseWrapper}}{{.}}<{{/responseWrapper}}ResponseEntity<{{>returnTypes}}>{{#responseWrapper}}>{{/responseWrapper}} {{operationId}}({{#allParams}}{{>queryParams}}{{>pathParams}}{{>headerParams}}{{>bodyParams}}{{>formParams}}{{#hasMore}},{{/hasMore}}{{/allParams}}){{^jdk8}};{{/jdk8}}{{#jdk8}} {
|
{{#jdk8}}default {{/jdk8}}{{#responseWrapper}}{{.}}<{{/responseWrapper}}ResponseEntity<{{>returnTypes}}>{{#responseWrapper}}>{{/responseWrapper}} {{operationId}}({{#allParams}}{{>queryParams}}{{>pathParams}}{{>headerParams}}{{>bodyParams}}{{>formParams}},{{/allParams}} @RequestHeader("Accept") String accept){{#examples}}{{#-first}} throws IOException{{/-first}}{{/examples}}{{^jdk8}};{{/jdk8}}{{#jdk8}} {
|
||||||
// do some magic!
|
// do some magic!
|
||||||
return {{#async}}CompletableFuture.completedFuture({{/async}}new ResponseEntity<{{>returnTypes}}>(HttpStatus.OK){{#async}}){{/async}};
|
return {{#async}}CompletableFuture.completedFuture({{/async}}new ResponseEntity<{{>returnTypes}}>(HttpStatus.OK){{#async}}){{/async}};
|
||||||
}{{/jdk8}}
|
}{{/jdk8}}
|
||||||
|
@ -17,6 +17,8 @@ import org.springframework.web.bind.annotation.RequestHeader;
|
|||||||
import org.springframework.web.bind.annotation.RequestParam;
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
import org.springframework.web.bind.annotation.RequestPart;
|
import org.springframework.web.bind.annotation.RequestPart;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
|
import java.io.IOException;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
{{#async}}
|
{{#async}}
|
||||||
@ -36,21 +38,44 @@ public class {{classname}}Controller implements {{classname}} {
|
|||||||
@org.springframework.beans.factory.annotation.Autowired
|
@org.springframework.beans.factory.annotation.Autowired
|
||||||
public {{classname}}Controller({{classname}}Delegate delegate) {
|
public {{classname}}Controller({{classname}}Delegate delegate) {
|
||||||
this.delegate = delegate;
|
this.delegate = delegate;
|
||||||
}{{/isDelegate}}
|
}
|
||||||
|
|
||||||
{{^jdk8-no-delegate}}{{#operation}}
|
{{/isDelegate}}
|
||||||
public {{#async}}Callable<{{/async}}ResponseEntity<{{>returnTypes}}>{{#async}}>{{/async}} {{operationId}}({{#allParams}}{{>queryParams}}{{>pathParams}}{{>headerParams}}{{>bodyParams}}{{>formParams}}{{#hasMore}},
|
{{^jdk8-no-delegate}}
|
||||||
{{/hasMore}}{{/allParams}}) {
|
{{#operation}}
|
||||||
// do some magic!{{^isDelegate}}{{^async}}
|
public {{#async}}Callable<{{/async}}ResponseEntity<{{>returnTypes}}>{{#async}}>{{/async}} {{operationId}}({{#allParams}}{{>queryParams}}{{>pathParams}}{{>headerParams}}{{>bodyParams}}{{>formParams}},
|
||||||
return new ResponseEntity<{{>returnTypes}}>(HttpStatus.OK);{{/async}}{{#async}}
|
{{/allParams}}@RequestHeader("Accept") String accept){{#examples}}{{#-first}} throws IOException{{/-first}}{{/examples}} {
|
||||||
|
// do some magic!
|
||||||
|
{{^isDelegate}}
|
||||||
|
{{^async}}
|
||||||
|
{{#examples}}
|
||||||
|
{{#-first}}
|
||||||
|
|
||||||
|
ObjectMapper objectMapper = new ObjectMapper();
|
||||||
|
|
||||||
|
{{/-first}}
|
||||||
|
if (accept != null && accept.contains("{{{contentType}}}")) {
|
||||||
|
return new ResponseEntity<{{>returnTypes}}>(objectMapper.readValue("{{#lamdaRemoveLineBreak}}{{#lamdaEscapeDoubleQuote}}{{{example}}}{{/lamdaEscapeDoubleQuote}}{{/lamdaRemoveLineBreak}}", {{>exampleReturnTypes}}.class), HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
{{/examples}}
|
||||||
|
return new ResponseEntity<{{>returnTypes}}>(HttpStatus.OK);
|
||||||
|
{{/async}}
|
||||||
|
{{#async}}
|
||||||
return new Callable<ResponseEntity<{{>returnTypes}}>>() {
|
return new Callable<ResponseEntity<{{>returnTypes}}>>() {
|
||||||
@Override
|
@Override
|
||||||
public ResponseEntity<{{>returnTypes}}> call() throws Exception {
|
public ResponseEntity<{{>returnTypes}}> call() throws Exception {
|
||||||
return new ResponseEntity<{{>returnTypes}}>(HttpStatus.OK);
|
return new ResponseEntity<{{>returnTypes}}>(HttpStatus.OK);
|
||||||
}
|
}
|
||||||
};{{/async}}{{/isDelegate}}{{#isDelegate}}
|
};
|
||||||
return delegate.{{operationId}}({{#allParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}});{{/isDelegate}}
|
{{/async}}
|
||||||
|
{{/isDelegate}}
|
||||||
|
{{#isDelegate}}
|
||||||
|
return delegate.{{operationId}}({{#allParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}});
|
||||||
|
{{/isDelegate}}
|
||||||
}
|
}
|
||||||
{{/operation}}{{/jdk8-no-delegate}}
|
|
||||||
|
{{/operation}}
|
||||||
|
{{/jdk8-no-delegate}}
|
||||||
}
|
}
|
||||||
{{/operations}}
|
{{/operations}}
|
||||||
|
@ -0,0 +1 @@
|
|||||||
|
{{#returnContainer}}{{#isMapContainer}}Map{{/isMapContainer}}{{#isListContainer}}List{{/isListContainer}}{{/returnContainer}}{{^returnContainer}}{{{returnType}}}{{/returnContainer}}
|
@ -8,9 +8,9 @@ buildscript {
|
|||||||
jcenter()
|
jcenter()
|
||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath 'com.android.tools.build:gradle:1.5.+'
|
classpath 'com.android.tools.build:gradle:2.3.+'
|
||||||
{{#useAndroidMavenGradlePlugin}}
|
{{#useAndroidMavenGradlePlugin}}
|
||||||
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.3'
|
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
|
||||||
{{/useAndroidMavenGradlePlugin}}
|
{{/useAndroidMavenGradlePlugin}}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -28,12 +28,12 @@ apply plugin: 'com.github.dcendents.android-maven'
|
|||||||
{{/useAndroidMavenGradlePlugin}}
|
{{/useAndroidMavenGradlePlugin}}
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion 23
|
compileSdkVersion 25
|
||||||
buildToolsVersion '23.0.2'
|
buildToolsVersion '25.0.2'
|
||||||
useLibrary 'org.apache.http.legacy'
|
useLibrary 'org.apache.http.legacy'
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
minSdkVersion 14
|
minSdkVersion 14
|
||||||
targetSdkVersion 23
|
targetSdkVersion 25
|
||||||
}
|
}
|
||||||
compileOptions {
|
compileOptions {
|
||||||
sourceCompatibility JavaVersion.VERSION_1_7
|
sourceCompatibility JavaVersion.VERSION_1_7
|
||||||
|
@ -8,9 +8,9 @@ buildscript {
|
|||||||
jcenter()
|
jcenter()
|
||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath 'com.android.tools.build:gradle:1.5.+'
|
classpath 'com.android.tools.build:gradle:2.3.+'
|
||||||
{{#useAndroidMavenGradlePlugin}}
|
{{#useAndroidMavenGradlePlugin}}
|
||||||
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.3'
|
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
|
||||||
{{/useAndroidMavenGradlePlugin}}
|
{{/useAndroidMavenGradlePlugin}}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -28,11 +28,11 @@ apply plugin: 'com.github.dcendents.android-maven'
|
|||||||
{{/useAndroidMavenGradlePlugin}}
|
{{/useAndroidMavenGradlePlugin}}
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion 23
|
compileSdkVersion 25
|
||||||
buildToolsVersion '23.0.2'
|
buildToolsVersion '25.0.2'
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
minSdkVersion 14
|
minSdkVersion 14
|
||||||
targetSdkVersion 23
|
targetSdkVersion 25
|
||||||
}
|
}
|
||||||
compileOptions {
|
compileOptions {
|
||||||
sourceCompatibility JavaVersion.VERSION_1_7
|
sourceCompatibility JavaVersion.VERSION_1_7
|
||||||
|
@ -113,12 +113,24 @@ pplx::task<web::http::http_response> ApiClient::callApi(
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
web::http::uri_builder formData;
|
if (contentType == U("application/json"))
|
||||||
for (auto& kvp : formParams)
|
|
||||||
{
|
{
|
||||||
formData.append_query(kvp.first, kvp.second);
|
web::json::value body_data = web::json::value::object();
|
||||||
|
for (auto& kvp : formParams)
|
||||||
|
{
|
||||||
|
body_data[U(kvp.first)] = ModelBase::toJson(kvp.second);
|
||||||
|
}
|
||||||
|
request.set_body(body_data);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
web::http::uri_builder formData;
|
||||||
|
for (auto& kvp : formParams)
|
||||||
|
{
|
||||||
|
formData.append_query(kvp.first, kvp.second);
|
||||||
|
}
|
||||||
|
request.set_body(formData.query(), U("application/x-www-form-urlencoded"));
|
||||||
}
|
}
|
||||||
request.set_body(formData.query(), U("application/x-www-form-urlencoded"));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -40,6 +40,7 @@ public:
|
|||||||
static web::json::value toJson( int32_t value );
|
static web::json::value toJson( int32_t value );
|
||||||
static web::json::value toJson( int64_t value );
|
static web::json::value toJson( int64_t value );
|
||||||
static web::json::value toJson( double value );
|
static web::json::value toJson( double value );
|
||||||
|
static web::json::value toJson( bool value );
|
||||||
|
|
||||||
static int64_t int64_tFromJson(web::json::value& val);
|
static int64_t int64_tFromJson(web::json::value& val);
|
||||||
static int32_t int32_tFromJson(web::json::value& val);
|
static int32_t int32_tFromJson(web::json::value& val);
|
||||||
|
@ -31,6 +31,9 @@ web::json::value ModelBase::toJson( int64_t value )
|
|||||||
web::json::value ModelBase::toJson( double value )
|
web::json::value ModelBase::toJson( double value )
|
||||||
{
|
{
|
||||||
return web::json::value::number(value);
|
return web::json::value::number(value);
|
||||||
|
}
|
||||||
|
web::json::value ModelBase::toJson(bool value) {
|
||||||
|
return web::json::value::boolean(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
web::json::value ModelBase::toJson( std::shared_ptr<HttpContent> content )
|
web::json::value ModelBase::toJson( std::shared_ptr<HttpContent> content )
|
||||||
|
@ -132,9 +132,12 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}}imple
|
|||||||
{{/required}}
|
{{/required}}
|
||||||
{{#isEnum}}
|
{{#isEnum}}
|
||||||
{{^isContainer}}
|
{{^isContainer}}
|
||||||
$allowed_values = [{{#allowableValues}}{{#values}}"{{{this}}}"{{^-last}}, {{/-last}}{{/values}}{{/allowableValues}}];
|
$allowed_values = $this->{{getter}}AllowableValues();
|
||||||
if (!in_array($this->container['{{name}}'], $allowed_values)) {
|
if (!in_array($this->container['{{name}}'], $allowed_values)) {
|
||||||
$invalid_properties[] = "invalid value for '{{name}}', must be one of {{#allowableValues}}{{#values}}'{{{this}}}'{{^-last}}, {{/-last}}{{/values}}{{/allowableValues}}.";
|
$invalid_properties[] = sprintf(
|
||||||
|
"invalid value for '{{name}}', must be one of '%s'",
|
||||||
|
implode("', '", $allowed_values)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
{{/isContainer}}
|
{{/isContainer}}
|
||||||
@ -209,7 +212,7 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}}imple
|
|||||||
{{/required}}
|
{{/required}}
|
||||||
{{#isEnum}}
|
{{#isEnum}}
|
||||||
{{^isContainer}}
|
{{^isContainer}}
|
||||||
$allowed_values = [{{#allowableValues}}{{#values}}"{{{this}}}"{{^-last}}, {{/-last}}{{/values}}{{/allowableValues}}];
|
$allowed_values = $this->{{getter}}AllowableValues();
|
||||||
if (!in_array($this->container['{{name}}'], $allowed_values)) {
|
if (!in_array($this->container['{{name}}'], $allowed_values)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -275,15 +278,25 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}}imple
|
|||||||
public function {{setter}}(${{name}})
|
public function {{setter}}(${{name}})
|
||||||
{
|
{
|
||||||
{{#isEnum}}
|
{{#isEnum}}
|
||||||
$allowed_values = array({{#allowableValues}}{{#values}}'{{{this}}}'{{^-last}}, {{/-last}}{{/values}}{{/allowableValues}});
|
$allowed_values = $this->{{getter}}AllowableValues();
|
||||||
{{^isContainer}}
|
{{^isContainer}}
|
||||||
if ({{^required}}!is_null(${{name}}) && {{/required}}(!in_array(${{{name}}}, $allowed_values))) {
|
if ({{^required}}!is_null(${{name}}) && {{/required}}!in_array(${{{name}}}, $allowed_values)) {
|
||||||
throw new \InvalidArgumentException("Invalid value for '{{name}}', must be one of {{#allowableValues}}{{#values}}'{{{this}}}'{{^-last}}, {{/-last}}{{/values}}{{/allowableValues}}");
|
throw new \InvalidArgumentException(
|
||||||
|
sprintf(
|
||||||
|
"Invalid value for '{{name}}', must be one of '%s'",
|
||||||
|
implode("', '", $allowed_values)
|
||||||
|
)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
{{/isContainer}}
|
{{/isContainer}}
|
||||||
{{#isContainer}}
|
{{#isContainer}}
|
||||||
if ({{^required}}!is_null(${{name}}) && {{/required}}(array_diff(${{{name}}}, $allowed_values))) {
|
if ({{^required}}!is_null(${{name}}) && {{/required}}array_diff(${{{name}}}, $allowed_values)) {
|
||||||
throw new \InvalidArgumentException("Invalid value for '{{name}}', must be one of {{#allowableValues}}{{#values}}'{{{this}}}'{{^-last}}, {{/-last}}{{/values}}{{/allowableValues}}");
|
throw new \InvalidArgumentException(
|
||||||
|
sprintf(
|
||||||
|
"Invalid value for '{{name}}', must be one of '%s'",
|
||||||
|
implode("', '", $allowed_values)
|
||||||
|
)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
{{/isContainer}}
|
{{/isContainer}}
|
||||||
{{/isEnum}}
|
{{/isEnum}}
|
||||||
|
@ -14,6 +14,13 @@ class {{classname}}(object):
|
|||||||
NOTE: This class is auto generated by the swagger code generator program.
|
NOTE: This class is auto generated by the swagger code generator program.
|
||||||
Do not edit the class manually.
|
Do not edit the class manually.
|
||||||
"""
|
"""
|
||||||
|
{{#allowableValues}}
|
||||||
|
|
||||||
|
{{#enumVars}}
|
||||||
|
{{name}} = {{{value}}}
|
||||||
|
{{/enumVars}}
|
||||||
|
|
||||||
|
{{/allowableValues}}
|
||||||
def __init__(self{{#vars}}, {{name}}={{#defaultValue}}{{{defaultValue}}}{{/defaultValue}}{{^defaultValue}}None{{/defaultValue}}{{/vars}}):
|
def __init__(self{{#vars}}, {{name}}={{#defaultValue}}{{{defaultValue}}}{{/defaultValue}}{{^defaultValue}}None{{/defaultValue}}{{/vars}}):
|
||||||
"""
|
"""
|
||||||
{{classname}} - a model defined in Swagger
|
{{classname}} - a model defined in Swagger
|
||||||
@ -34,7 +41,15 @@ class {{classname}}(object):
|
|||||||
}
|
}
|
||||||
|
|
||||||
{{#vars}}
|
{{#vars}}
|
||||||
self._{{name}} = {{name}}
|
self._{{name}} = None
|
||||||
|
{{/vars}}
|
||||||
|
|
||||||
|
# TODO: let required properties as mandatory parameter in the constructor.
|
||||||
|
# - to check if required property is not None (e.g. by calling setter)
|
||||||
|
# - ApiClient.__deserialize_model has to be adapted as well
|
||||||
|
{{#vars}}
|
||||||
|
if {{name}} is not None:
|
||||||
|
self.{{name}} = {{name}}
|
||||||
{{/vars}}
|
{{/vars}}
|
||||||
|
|
||||||
{{#vars}}
|
{{#vars}}
|
||||||
@ -62,9 +77,13 @@ class {{classname}}(object):
|
|||||||
:param {{name}}: The {{name}} of this {{classname}}.
|
:param {{name}}: The {{name}} of this {{classname}}.
|
||||||
:type: {{datatype}}
|
:type: {{datatype}}
|
||||||
"""
|
"""
|
||||||
|
{{#required}}
|
||||||
|
if {{name}} is None:
|
||||||
|
raise ValueError("Invalid value for `{{name}}`, must not be `None`")
|
||||||
|
{{/required}}
|
||||||
{{#isEnum}}
|
{{#isEnum}}
|
||||||
allowed_values = [{{#allowableValues}}{{#values}}"{{{this}}}"{{^-last}}, {{/-last}}{{/values}}{{/allowableValues}}]
|
|
||||||
{{#isContainer}}
|
{{#isContainer}}
|
||||||
|
allowed_values = [{{#allowableValues}}{{#values}}{{#items.isString}}"{{/items.isString}}{{{this}}}{{#items.isString}}"{{/items.isString}}{{^-last}}, {{/-last}}{{/values}}{{/allowableValues}}]
|
||||||
{{#isListContainer}}
|
{{#isListContainer}}
|
||||||
if not set({{{name}}}).issubset(set(allowed_values)):
|
if not set({{{name}}}).issubset(set(allowed_values)):
|
||||||
raise ValueError(
|
raise ValueError(
|
||||||
@ -83,6 +102,7 @@ class {{classname}}(object):
|
|||||||
{{/isMapContainer}}
|
{{/isMapContainer}}
|
||||||
{{/isContainer}}
|
{{/isContainer}}
|
||||||
{{^isContainer}}
|
{{^isContainer}}
|
||||||
|
allowed_values = [{{#allowableValues}}{{#values}}{{#isString}}"{{/isString}}{{{this}}}{{#isString}}"{{/isString}}{{^-last}}, {{/-last}}{{/values}}{{/allowableValues}}]
|
||||||
if {{{name}}} not in allowed_values:
|
if {{{name}}} not in allowed_values:
|
||||||
raise ValueError(
|
raise ValueError(
|
||||||
"Invalid value for `{{{name}}}` ({0}), must be one of {1}"
|
"Invalid value for `{{{name}}}` ({0}), must be one of {1}"
|
||||||
@ -91,10 +111,6 @@ class {{classname}}(object):
|
|||||||
{{/isContainer}}
|
{{/isContainer}}
|
||||||
{{/isEnum}}
|
{{/isEnum}}
|
||||||
{{^isEnum}}
|
{{^isEnum}}
|
||||||
{{#required}}
|
|
||||||
if {{name}} is None:
|
|
||||||
raise ValueError("Invalid value for `{{name}}`, must not be `None`")
|
|
||||||
{{/required}}
|
|
||||||
{{#hasValidation}}
|
{{#hasValidation}}
|
||||||
{{#maxLength}}
|
{{#maxLength}}
|
||||||
if {{name}} is not None and len({{name}}) > {{maxLength}}:
|
if {{name}} is not None and len({{name}}) > {{maxLength}}:
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
[tox]
|
[tox]
|
||||||
envlist = py27, py34
|
envlist = py27, py3
|
||||||
|
|
||||||
[testenv]
|
[testenv]
|
||||||
deps=-r{toxinidir}/requirements.txt
|
deps=-r{toxinidir}/requirements.txt
|
||||||
|
@ -253,7 +253,6 @@ class Decoders {
|
|||||||
|
|
||||||
{{^isArrayModel}}
|
{{^isArrayModel}}
|
||||||
// Decoder for [{{{classname}}}]
|
// Decoder for [{{{classname}}}]
|
||||||
Decoders.addDecoder(clazz: [{{{classname}}}].self) { (source: AnyObject, instance: AnyObject?) -> Decoded<[{{{classname}}}]> in
|
|
||||||
return Decoders.decode(clazz: [{{{classname}}}].self, source: source, instance: instance)
|
return Decoders.decode(clazz: [{{{classname}}}].self, source: source, instance: instance)
|
||||||
}
|
}
|
||||||
// Decoder for {{{classname}}}
|
// Decoder for {{{classname}}}
|
||||||
|
@ -24,7 +24,7 @@ public class JavaClientOptionsProvider extends JavaOptionsProvider {
|
|||||||
options.put(JavaClientCodegen.USE_BEANVALIDATION, "false");
|
options.put(JavaClientCodegen.USE_BEANVALIDATION, "false");
|
||||||
options.put(JavaClientCodegen.PERFORM_BEANVALIDATION, PERFORM_BEANVALIDATION);
|
options.put(JavaClientCodegen.PERFORM_BEANVALIDATION, PERFORM_BEANVALIDATION);
|
||||||
options.put(JavaClientCodegen.USE_GZIP_FEATURE, "false");
|
options.put(JavaClientCodegen.USE_GZIP_FEATURE, "false");
|
||||||
|
options.put(JavaClientCodegen.USE_RUNTIME_EXCEPTION, "false");
|
||||||
return options;
|
return options;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -114,7 +114,7 @@
|
|||||||
<configuration>
|
<configuration>
|
||||||
<url>https://github.com/swagger-api/swagger-ui/archive/master.tar.gz</url>
|
<url>https://github.com/swagger-api/swagger-ui/archive/master.tar.gz</url>
|
||||||
<unpack>true</unpack>
|
<unpack>true</unpack>
|
||||||
<skipCache>true</skipCache>
|
<skipCache>true</skipCache>
|
||||||
<outputDirectory>${project.build.directory}</outputDirectory>
|
<outputDirectory>${project.build.directory}</outputDirectory>
|
||||||
</configuration>
|
</configuration>
|
||||||
</execution>
|
</execution>
|
||||||
|
3
pom.xml
3
pom.xml
@ -830,7 +830,8 @@
|
|||||||
<module>samples/server/petstore/jaxrs-resteasy/joda</module>
|
<module>samples/server/petstore/jaxrs-resteasy/joda</module>
|
||||||
<module>samples/server/petstore/scalatra</module>
|
<module>samples/server/petstore/scalatra</module>
|
||||||
<module>samples/server/petstore/spring-mvc</module>
|
<module>samples/server/petstore/spring-mvc</module>
|
||||||
<module>samples/client/petstore/spring-cloud</module>
|
<!-- comment out due to change in method signature
|
||||||
|
<module>samples/client/petstore/spring-cloud</module> -->
|
||||||
<module>samples/server/petstore/springboot</module>
|
<module>samples/server/petstore/springboot</module>
|
||||||
<module>samples/server/petstore/springboot-beanvalidation</module>
|
<module>samples/server/petstore/springboot-beanvalidation</module>
|
||||||
<module>samples/server/petstore/jaxrs-cxf</module>
|
<module>samples/server/petstore/jaxrs-cxf</module>
|
||||||
|
@ -38,7 +38,13 @@ class ModelReturn(object):
|
|||||||
'_return': 'return'
|
'_return': 'return'
|
||||||
}
|
}
|
||||||
|
|
||||||
self.__return = _return
|
self.__return = None
|
||||||
|
|
||||||
|
# TODO: let required properties as mandatory parameter in the constructor.
|
||||||
|
# - to check if required property is not None (e.g. by calling setter)
|
||||||
|
# - ApiClient.__deserialize_model has to be adapted as well
|
||||||
|
if _return is not None:
|
||||||
|
self._return = _return
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def _return(self):
|
def _return(self):
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
[tox]
|
[tox]
|
||||||
envlist = py27, py34
|
envlist = py27, py3
|
||||||
|
|
||||||
[testenv]
|
[testenv]
|
||||||
deps=-r{toxinidir}/requirements.txt
|
deps=-r{toxinidir}/requirements.txt
|
||||||
|
@ -43,6 +43,9 @@ web::json::value ModelBase::toJson( int64_t value )
|
|||||||
web::json::value ModelBase::toJson( double value )
|
web::json::value ModelBase::toJson( double value )
|
||||||
{
|
{
|
||||||
return web::json::value::number(value);
|
return web::json::value::number(value);
|
||||||
|
}
|
||||||
|
web::json::value ModelBase::toJson(bool value) {
|
||||||
|
return web::json::value::boolean(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
web::json::value ModelBase::toJson( std::shared_ptr<HttpContent> content )
|
web::json::value ModelBase::toJson( std::shared_ptr<HttpContent> content )
|
||||||
|
@ -52,6 +52,7 @@ public:
|
|||||||
static web::json::value toJson( int32_t value );
|
static web::json::value toJson( int32_t value );
|
||||||
static web::json::value toJson( int64_t value );
|
static web::json::value toJson( int64_t value );
|
||||||
static web::json::value toJson( double value );
|
static web::json::value toJson( double value );
|
||||||
|
static web::json::value toJson( bool value );
|
||||||
|
|
||||||
static int64_t int64_tFromJson(web::json::value& val);
|
static int64_t int64_tFromJson(web::json::value& val);
|
||||||
static int32_t int32_tFromJson(web::json::value& val);
|
static int32_t int32_tFromJson(web::json::value& val);
|
||||||
|
@ -107,8 +107,8 @@ class EnumArrays implements ArrayAccess
|
|||||||
return self::$getters;
|
return self::$getters;
|
||||||
}
|
}
|
||||||
|
|
||||||
const JUST_SYMBOL_ = '>=';
|
const JUST_SYMBOL_GREATER_THAN_OR_EQUAL_TO = '>=';
|
||||||
const JUST_SYMBOL_ = '$';
|
const JUST_SYMBOL_DOLLAR = '$';
|
||||||
const ARRAY_ENUM_FISH = 'fish';
|
const ARRAY_ENUM_FISH = 'fish';
|
||||||
const ARRAY_ENUM_CRAB = 'crab';
|
const ARRAY_ENUM_CRAB = 'crab';
|
||||||
|
|
||||||
@ -121,8 +121,8 @@ class EnumArrays implements ArrayAccess
|
|||||||
public function getJustSymbolAllowableValues()
|
public function getJustSymbolAllowableValues()
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
self::JUST_SYMBOL_,
|
self::JUST_SYMBOL_GREATER_THAN_OR_EQUAL_TO,
|
||||||
self::JUST_SYMBOL_,
|
self::JUST_SYMBOL_DOLLAR,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -164,9 +164,12 @@ class EnumArrays implements ArrayAccess
|
|||||||
{
|
{
|
||||||
$invalid_properties = [];
|
$invalid_properties = [];
|
||||||
|
|
||||||
$allowed_values = [">=", "$"];
|
$allowed_values = $this->getJustSymbolAllowableValues();
|
||||||
if (!in_array($this->container['just_symbol'], $allowed_values)) {
|
if (!in_array($this->container['just_symbol'], $allowed_values)) {
|
||||||
$invalid_properties[] = "invalid value for 'just_symbol', must be one of '>=', '$'.";
|
$invalid_properties[] = sprintf(
|
||||||
|
"invalid value for 'just_symbol', must be one of '%s'",
|
||||||
|
implode("', '", $allowed_values)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
return $invalid_properties;
|
return $invalid_properties;
|
||||||
@ -181,7 +184,7 @@ class EnumArrays implements ArrayAccess
|
|||||||
public function valid()
|
public function valid()
|
||||||
{
|
{
|
||||||
|
|
||||||
$allowed_values = [">=", "$"];
|
$allowed_values = $this->getJustSymbolAllowableValues();
|
||||||
if (!in_array($this->container['just_symbol'], $allowed_values)) {
|
if (!in_array($this->container['just_symbol'], $allowed_values)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -205,9 +208,14 @@ class EnumArrays implements ArrayAccess
|
|||||||
*/
|
*/
|
||||||
public function setJustSymbol($just_symbol)
|
public function setJustSymbol($just_symbol)
|
||||||
{
|
{
|
||||||
$allowed_values = array('>=', '$');
|
$allowed_values = $this->getJustSymbolAllowableValues();
|
||||||
if (!is_null($just_symbol) && (!in_array($just_symbol, $allowed_values))) {
|
if (!is_null($just_symbol) && !in_array($just_symbol, $allowed_values)) {
|
||||||
throw new \InvalidArgumentException("Invalid value for 'just_symbol', must be one of '>=', '$'");
|
throw new \InvalidArgumentException(
|
||||||
|
sprintf(
|
||||||
|
"Invalid value for 'just_symbol', must be one of '%s'",
|
||||||
|
implode("', '", $allowed_values)
|
||||||
|
)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
$this->container['just_symbol'] = $just_symbol;
|
$this->container['just_symbol'] = $just_symbol;
|
||||||
|
|
||||||
@ -230,9 +238,14 @@ class EnumArrays implements ArrayAccess
|
|||||||
*/
|
*/
|
||||||
public function setArrayEnum($array_enum)
|
public function setArrayEnum($array_enum)
|
||||||
{
|
{
|
||||||
$allowed_values = array('fish', 'crab');
|
$allowed_values = $this->getArrayEnumAllowableValues();
|
||||||
if (!is_null($array_enum) && (array_diff($array_enum, $allowed_values))) {
|
if (!is_null($array_enum) && array_diff($array_enum, $allowed_values)) {
|
||||||
throw new \InvalidArgumentException("Invalid value for 'array_enum', must be one of 'fish', 'crab'");
|
throw new \InvalidArgumentException(
|
||||||
|
sprintf(
|
||||||
|
"Invalid value for 'array_enum', must be one of '%s'",
|
||||||
|
implode("', '", $allowed_values)
|
||||||
|
)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
$this->container['array_enum'] = $array_enum;
|
$this->container['array_enum'] = $array_enum;
|
||||||
|
|
||||||
|
@ -190,19 +190,28 @@ class EnumTest implements ArrayAccess
|
|||||||
{
|
{
|
||||||
$invalid_properties = [];
|
$invalid_properties = [];
|
||||||
|
|
||||||
$allowed_values = ["UPPER", "lower", ""];
|
$allowed_values = $this->getEnumStringAllowableValues();
|
||||||
if (!in_array($this->container['enum_string'], $allowed_values)) {
|
if (!in_array($this->container['enum_string'], $allowed_values)) {
|
||||||
$invalid_properties[] = "invalid value for 'enum_string', must be one of 'UPPER', 'lower', ''.";
|
$invalid_properties[] = sprintf(
|
||||||
|
"invalid value for 'enum_string', must be one of '%s'",
|
||||||
|
implode("', '", $allowed_values)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
$allowed_values = ["1", "-1"];
|
$allowed_values = $this->getEnumIntegerAllowableValues();
|
||||||
if (!in_array($this->container['enum_integer'], $allowed_values)) {
|
if (!in_array($this->container['enum_integer'], $allowed_values)) {
|
||||||
$invalid_properties[] = "invalid value for 'enum_integer', must be one of '1', '-1'.";
|
$invalid_properties[] = sprintf(
|
||||||
|
"invalid value for 'enum_integer', must be one of '%s'",
|
||||||
|
implode("', '", $allowed_values)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
$allowed_values = ["1.1", "-1.2"];
|
$allowed_values = $this->getEnumNumberAllowableValues();
|
||||||
if (!in_array($this->container['enum_number'], $allowed_values)) {
|
if (!in_array($this->container['enum_number'], $allowed_values)) {
|
||||||
$invalid_properties[] = "invalid value for 'enum_number', must be one of '1.1', '-1.2'.";
|
$invalid_properties[] = sprintf(
|
||||||
|
"invalid value for 'enum_number', must be one of '%s'",
|
||||||
|
implode("', '", $allowed_values)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
return $invalid_properties;
|
return $invalid_properties;
|
||||||
@ -217,15 +226,15 @@ class EnumTest implements ArrayAccess
|
|||||||
public function valid()
|
public function valid()
|
||||||
{
|
{
|
||||||
|
|
||||||
$allowed_values = ["UPPER", "lower", ""];
|
$allowed_values = $this->getEnumStringAllowableValues();
|
||||||
if (!in_array($this->container['enum_string'], $allowed_values)) {
|
if (!in_array($this->container['enum_string'], $allowed_values)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
$allowed_values = ["1", "-1"];
|
$allowed_values = $this->getEnumIntegerAllowableValues();
|
||||||
if (!in_array($this->container['enum_integer'], $allowed_values)) {
|
if (!in_array($this->container['enum_integer'], $allowed_values)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
$allowed_values = ["1.1", "-1.2"];
|
$allowed_values = $this->getEnumNumberAllowableValues();
|
||||||
if (!in_array($this->container['enum_number'], $allowed_values)) {
|
if (!in_array($this->container['enum_number'], $allowed_values)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -249,9 +258,14 @@ class EnumTest implements ArrayAccess
|
|||||||
*/
|
*/
|
||||||
public function setEnumString($enum_string)
|
public function setEnumString($enum_string)
|
||||||
{
|
{
|
||||||
$allowed_values = array('UPPER', 'lower', '');
|
$allowed_values = $this->getEnumStringAllowableValues();
|
||||||
if (!is_null($enum_string) && (!in_array($enum_string, $allowed_values))) {
|
if (!is_null($enum_string) && !in_array($enum_string, $allowed_values)) {
|
||||||
throw new \InvalidArgumentException("Invalid value for 'enum_string', must be one of 'UPPER', 'lower', ''");
|
throw new \InvalidArgumentException(
|
||||||
|
sprintf(
|
||||||
|
"Invalid value for 'enum_string', must be one of '%s'",
|
||||||
|
implode("', '", $allowed_values)
|
||||||
|
)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
$this->container['enum_string'] = $enum_string;
|
$this->container['enum_string'] = $enum_string;
|
||||||
|
|
||||||
@ -274,9 +288,14 @@ class EnumTest implements ArrayAccess
|
|||||||
*/
|
*/
|
||||||
public function setEnumInteger($enum_integer)
|
public function setEnumInteger($enum_integer)
|
||||||
{
|
{
|
||||||
$allowed_values = array('1', '-1');
|
$allowed_values = $this->getEnumIntegerAllowableValues();
|
||||||
if (!is_null($enum_integer) && (!in_array($enum_integer, $allowed_values))) {
|
if (!is_null($enum_integer) && !in_array($enum_integer, $allowed_values)) {
|
||||||
throw new \InvalidArgumentException("Invalid value for 'enum_integer', must be one of '1', '-1'");
|
throw new \InvalidArgumentException(
|
||||||
|
sprintf(
|
||||||
|
"Invalid value for 'enum_integer', must be one of '%s'",
|
||||||
|
implode("', '", $allowed_values)
|
||||||
|
)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
$this->container['enum_integer'] = $enum_integer;
|
$this->container['enum_integer'] = $enum_integer;
|
||||||
|
|
||||||
@ -299,9 +318,14 @@ class EnumTest implements ArrayAccess
|
|||||||
*/
|
*/
|
||||||
public function setEnumNumber($enum_number)
|
public function setEnumNumber($enum_number)
|
||||||
{
|
{
|
||||||
$allowed_values = array('1.1', '-1.2');
|
$allowed_values = $this->getEnumNumberAllowableValues();
|
||||||
if (!is_null($enum_number) && (!in_array($enum_number, $allowed_values))) {
|
if (!is_null($enum_number) && !in_array($enum_number, $allowed_values)) {
|
||||||
throw new \InvalidArgumentException("Invalid value for 'enum_number', must be one of '1.1', '-1.2'");
|
throw new \InvalidArgumentException(
|
||||||
|
sprintf(
|
||||||
|
"Invalid value for 'enum_number', must be one of '%s'",
|
||||||
|
implode("', '", $allowed_values)
|
||||||
|
)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
$this->container['enum_number'] = $enum_number;
|
$this->container['enum_number'] = $enum_number;
|
||||||
|
|
||||||
|
@ -203,9 +203,14 @@ class MapTest implements ArrayAccess
|
|||||||
*/
|
*/
|
||||||
public function setMapOfEnumString($map_of_enum_string)
|
public function setMapOfEnumString($map_of_enum_string)
|
||||||
{
|
{
|
||||||
$allowed_values = array('UPPER', 'lower');
|
$allowed_values = $this->getMapOfEnumStringAllowableValues();
|
||||||
if (!is_null($map_of_enum_string) && (array_diff($map_of_enum_string, $allowed_values))) {
|
if (!is_null($map_of_enum_string) && array_diff($map_of_enum_string, $allowed_values)) {
|
||||||
throw new \InvalidArgumentException("Invalid value for 'map_of_enum_string', must be one of 'UPPER', 'lower'");
|
throw new \InvalidArgumentException(
|
||||||
|
sprintf(
|
||||||
|
"Invalid value for 'map_of_enum_string', must be one of '%s'",
|
||||||
|
implode("', '", $allowed_values)
|
||||||
|
)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
$this->container['map_of_enum_string'] = $map_of_enum_string;
|
$this->container['map_of_enum_string'] = $map_of_enum_string;
|
||||||
|
|
||||||
|
@ -172,9 +172,12 @@ class Order implements ArrayAccess
|
|||||||
{
|
{
|
||||||
$invalid_properties = [];
|
$invalid_properties = [];
|
||||||
|
|
||||||
$allowed_values = ["placed", "approved", "delivered"];
|
$allowed_values = $this->getStatusAllowableValues();
|
||||||
if (!in_array($this->container['status'], $allowed_values)) {
|
if (!in_array($this->container['status'], $allowed_values)) {
|
||||||
$invalid_properties[] = "invalid value for 'status', must be one of 'placed', 'approved', 'delivered'.";
|
$invalid_properties[] = sprintf(
|
||||||
|
"invalid value for 'status', must be one of '%s'",
|
||||||
|
implode("', '", $allowed_values)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
return $invalid_properties;
|
return $invalid_properties;
|
||||||
@ -189,7 +192,7 @@ class Order implements ArrayAccess
|
|||||||
public function valid()
|
public function valid()
|
||||||
{
|
{
|
||||||
|
|
||||||
$allowed_values = ["placed", "approved", "delivered"];
|
$allowed_values = $this->getStatusAllowableValues();
|
||||||
if (!in_array($this->container['status'], $allowed_values)) {
|
if (!in_array($this->container['status'], $allowed_values)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -297,9 +300,14 @@ class Order implements ArrayAccess
|
|||||||
*/
|
*/
|
||||||
public function setStatus($status)
|
public function setStatus($status)
|
||||||
{
|
{
|
||||||
$allowed_values = array('placed', 'approved', 'delivered');
|
$allowed_values = $this->getStatusAllowableValues();
|
||||||
if (!is_null($status) && (!in_array($status, $allowed_values))) {
|
if (!is_null($status) && !in_array($status, $allowed_values)) {
|
||||||
throw new \InvalidArgumentException("Invalid value for 'status', must be one of 'placed', 'approved', 'delivered'");
|
throw new \InvalidArgumentException(
|
||||||
|
sprintf(
|
||||||
|
"Invalid value for 'status', must be one of '%s'",
|
||||||
|
implode("', '", $allowed_values)
|
||||||
|
)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
$this->container['status'] = $status;
|
$this->container['status'] = $status;
|
||||||
|
|
||||||
|
@ -178,9 +178,12 @@ class Pet implements ArrayAccess
|
|||||||
if ($this->container['photo_urls'] === null) {
|
if ($this->container['photo_urls'] === null) {
|
||||||
$invalid_properties[] = "'photo_urls' can't be null";
|
$invalid_properties[] = "'photo_urls' can't be null";
|
||||||
}
|
}
|
||||||
$allowed_values = ["available", "pending", "sold"];
|
$allowed_values = $this->getStatusAllowableValues();
|
||||||
if (!in_array($this->container['status'], $allowed_values)) {
|
if (!in_array($this->container['status'], $allowed_values)) {
|
||||||
$invalid_properties[] = "invalid value for 'status', must be one of 'available', 'pending', 'sold'.";
|
$invalid_properties[] = sprintf(
|
||||||
|
"invalid value for 'status', must be one of '%s'",
|
||||||
|
implode("', '", $allowed_values)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
return $invalid_properties;
|
return $invalid_properties;
|
||||||
@ -201,7 +204,7 @@ class Pet implements ArrayAccess
|
|||||||
if ($this->container['photo_urls'] === null) {
|
if ($this->container['photo_urls'] === null) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
$allowed_values = ["available", "pending", "sold"];
|
$allowed_values = $this->getStatusAllowableValues();
|
||||||
if (!in_array($this->container['status'], $allowed_values)) {
|
if (!in_array($this->container['status'], $allowed_values)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -330,9 +333,14 @@ class Pet implements ArrayAccess
|
|||||||
*/
|
*/
|
||||||
public function setStatus($status)
|
public function setStatus($status)
|
||||||
{
|
{
|
||||||
$allowed_values = array('available', 'pending', 'sold');
|
$allowed_values = $this->getStatusAllowableValues();
|
||||||
if (!is_null($status) && (!in_array($status, $allowed_values))) {
|
if (!is_null($status) && !in_array($status, $allowed_values)) {
|
||||||
throw new \InvalidArgumentException("Invalid value for 'status', must be one of 'available', 'pending', 'sold'");
|
throw new \InvalidArgumentException(
|
||||||
|
sprintf(
|
||||||
|
"Invalid value for 'status', must be one of '%s'",
|
||||||
|
implode("', '", $allowed_values)
|
||||||
|
)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
$this->container['status'] = $status;
|
$this->container['status'] = $status;
|
||||||
|
|
||||||
|
@ -40,8 +40,16 @@ class AdditionalPropertiesClass(object):
|
|||||||
'map_of_map_property': 'map_of_map_property'
|
'map_of_map_property': 'map_of_map_property'
|
||||||
}
|
}
|
||||||
|
|
||||||
self._map_property = map_property
|
self._map_property = None
|
||||||
self._map_of_map_property = map_of_map_property
|
self._map_of_map_property = None
|
||||||
|
|
||||||
|
# TODO: let required properties as mandatory parameter in the constructor.
|
||||||
|
# - to check if required property is not None (e.g. by calling setter)
|
||||||
|
# - ApiClient.__deserialize_model has to be adapted as well
|
||||||
|
if map_property is not None:
|
||||||
|
self.map_property = map_property
|
||||||
|
if map_of_map_property is not None:
|
||||||
|
self.map_of_map_property = map_of_map_property
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def map_property(self):
|
def map_property(self):
|
||||||
|
@ -40,8 +40,16 @@ class Animal(object):
|
|||||||
'color': 'color'
|
'color': 'color'
|
||||||
}
|
}
|
||||||
|
|
||||||
self._class_name = class_name
|
self._class_name = None
|
||||||
self._color = color
|
self._color = None
|
||||||
|
|
||||||
|
# TODO: let required properties as mandatory parameter in the constructor.
|
||||||
|
# - to check if required property is not None (e.g. by calling setter)
|
||||||
|
# - ApiClient.__deserialize_model has to be adapted as well
|
||||||
|
if class_name is not None:
|
||||||
|
self.class_name = class_name
|
||||||
|
if color is not None:
|
||||||
|
self.color = color
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def class_name(self):
|
def class_name(self):
|
||||||
|
@ -39,6 +39,10 @@ class AnimalFarm(object):
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
# TODO: let required properties as mandatory parameter in the constructor.
|
||||||
|
# - to check if required property is not None (e.g. by calling setter)
|
||||||
|
# - ApiClient.__deserialize_model has to be adapted as well
|
||||||
|
|
||||||
def to_dict(self):
|
def to_dict(self):
|
||||||
"""
|
"""
|
||||||
Returns the model properties as a dict
|
Returns the model properties as a dict
|
||||||
|
@ -42,9 +42,19 @@ class ApiResponse(object):
|
|||||||
'message': 'message'
|
'message': 'message'
|
||||||
}
|
}
|
||||||
|
|
||||||
self._code = code
|
self._code = None
|
||||||
self._type = type
|
self._type = None
|
||||||
self._message = message
|
self._message = None
|
||||||
|
|
||||||
|
# TODO: let required properties as mandatory parameter in the constructor.
|
||||||
|
# - to check if required property is not None (e.g. by calling setter)
|
||||||
|
# - ApiClient.__deserialize_model has to be adapted as well
|
||||||
|
if code is not None:
|
||||||
|
self.code = code
|
||||||
|
if type is not None:
|
||||||
|
self.type = type
|
||||||
|
if message is not None:
|
||||||
|
self.message = message
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def code(self):
|
def code(self):
|
||||||
|
@ -38,7 +38,13 @@ class ArrayOfArrayOfNumberOnly(object):
|
|||||||
'array_array_number': 'ArrayArrayNumber'
|
'array_array_number': 'ArrayArrayNumber'
|
||||||
}
|
}
|
||||||
|
|
||||||
self._array_array_number = array_array_number
|
self._array_array_number = None
|
||||||
|
|
||||||
|
# TODO: let required properties as mandatory parameter in the constructor.
|
||||||
|
# - to check if required property is not None (e.g. by calling setter)
|
||||||
|
# - ApiClient.__deserialize_model has to be adapted as well
|
||||||
|
if array_array_number is not None:
|
||||||
|
self.array_array_number = array_array_number
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def array_array_number(self):
|
def array_array_number(self):
|
||||||
|
@ -38,7 +38,13 @@ class ArrayOfNumberOnly(object):
|
|||||||
'array_number': 'ArrayNumber'
|
'array_number': 'ArrayNumber'
|
||||||
}
|
}
|
||||||
|
|
||||||
self._array_number = array_number
|
self._array_number = None
|
||||||
|
|
||||||
|
# TODO: let required properties as mandatory parameter in the constructor.
|
||||||
|
# - to check if required property is not None (e.g. by calling setter)
|
||||||
|
# - ApiClient.__deserialize_model has to be adapted as well
|
||||||
|
if array_number is not None:
|
||||||
|
self.array_number = array_number
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def array_number(self):
|
def array_number(self):
|
||||||
|
@ -42,9 +42,19 @@ class ArrayTest(object):
|
|||||||
'array_array_of_model': 'array_array_of_model'
|
'array_array_of_model': 'array_array_of_model'
|
||||||
}
|
}
|
||||||
|
|
||||||
self._array_of_string = array_of_string
|
self._array_of_string = None
|
||||||
self._array_array_of_integer = array_array_of_integer
|
self._array_array_of_integer = None
|
||||||
self._array_array_of_model = array_array_of_model
|
self._array_array_of_model = None
|
||||||
|
|
||||||
|
# TODO: let required properties as mandatory parameter in the constructor.
|
||||||
|
# - to check if required property is not None (e.g. by calling setter)
|
||||||
|
# - ApiClient.__deserialize_model has to be adapted as well
|
||||||
|
if array_of_string is not None:
|
||||||
|
self.array_of_string = array_of_string
|
||||||
|
if array_array_of_integer is not None:
|
||||||
|
self.array_array_of_integer = array_array_of_integer
|
||||||
|
if array_array_of_model is not None:
|
||||||
|
self.array_array_of_model = array_array_of_model
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def array_of_string(self):
|
def array_of_string(self):
|
||||||
|
@ -48,12 +48,28 @@ class Capitalization(object):
|
|||||||
'att_name': 'ATT_NAME'
|
'att_name': 'ATT_NAME'
|
||||||
}
|
}
|
||||||
|
|
||||||
self._small_camel = small_camel
|
self._small_camel = None
|
||||||
self._capital_camel = capital_camel
|
self._capital_camel = None
|
||||||
self._small_snake = small_snake
|
self._small_snake = None
|
||||||
self._capital_snake = capital_snake
|
self._capital_snake = None
|
||||||
self._sca_eth_flow_points = sca_eth_flow_points
|
self._sca_eth_flow_points = None
|
||||||
self._att_name = att_name
|
self._att_name = None
|
||||||
|
|
||||||
|
# TODO: let required properties as mandatory parameter in the constructor.
|
||||||
|
# - to check if required property is not None (e.g. by calling setter)
|
||||||
|
# - ApiClient.__deserialize_model has to be adapted as well
|
||||||
|
if small_camel is not None:
|
||||||
|
self.small_camel = small_camel
|
||||||
|
if capital_camel is not None:
|
||||||
|
self.capital_camel = capital_camel
|
||||||
|
if small_snake is not None:
|
||||||
|
self.small_snake = small_snake
|
||||||
|
if capital_snake is not None:
|
||||||
|
self.capital_snake = capital_snake
|
||||||
|
if sca_eth_flow_points is not None:
|
||||||
|
self.sca_eth_flow_points = sca_eth_flow_points
|
||||||
|
if att_name is not None:
|
||||||
|
self.att_name = att_name
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def small_camel(self):
|
def small_camel(self):
|
||||||
|
@ -42,9 +42,19 @@ class Cat(object):
|
|||||||
'declawed': 'declawed'
|
'declawed': 'declawed'
|
||||||
}
|
}
|
||||||
|
|
||||||
self._class_name = class_name
|
self._class_name = None
|
||||||
self._color = color
|
self._color = None
|
||||||
self._declawed = declawed
|
self._declawed = None
|
||||||
|
|
||||||
|
# TODO: let required properties as mandatory parameter in the constructor.
|
||||||
|
# - to check if required property is not None (e.g. by calling setter)
|
||||||
|
# - ApiClient.__deserialize_model has to be adapted as well
|
||||||
|
if class_name is not None:
|
||||||
|
self.class_name = class_name
|
||||||
|
if color is not None:
|
||||||
|
self.color = color
|
||||||
|
if declawed is not None:
|
||||||
|
self.declawed = declawed
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def class_name(self):
|
def class_name(self):
|
||||||
|
@ -40,8 +40,16 @@ class Category(object):
|
|||||||
'name': 'name'
|
'name': 'name'
|
||||||
}
|
}
|
||||||
|
|
||||||
self._id = id
|
self._id = None
|
||||||
self._name = name
|
self._name = None
|
||||||
|
|
||||||
|
# TODO: let required properties as mandatory parameter in the constructor.
|
||||||
|
# - to check if required property is not None (e.g. by calling setter)
|
||||||
|
# - ApiClient.__deserialize_model has to be adapted as well
|
||||||
|
if id is not None:
|
||||||
|
self.id = id
|
||||||
|
if name is not None:
|
||||||
|
self.name = name
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def id(self):
|
def id(self):
|
||||||
|
@ -38,7 +38,13 @@ class ClassModel(object):
|
|||||||
'_class': '_class'
|
'_class': '_class'
|
||||||
}
|
}
|
||||||
|
|
||||||
self.__class = _class
|
self.__class = None
|
||||||
|
|
||||||
|
# TODO: let required properties as mandatory parameter in the constructor.
|
||||||
|
# - to check if required property is not None (e.g. by calling setter)
|
||||||
|
# - ApiClient.__deserialize_model has to be adapted as well
|
||||||
|
if _class is not None:
|
||||||
|
self._class = _class
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def _class(self):
|
def _class(self):
|
||||||
|
@ -38,7 +38,13 @@ class Client(object):
|
|||||||
'client': 'client'
|
'client': 'client'
|
||||||
}
|
}
|
||||||
|
|
||||||
self._client = client
|
self._client = None
|
||||||
|
|
||||||
|
# TODO: let required properties as mandatory parameter in the constructor.
|
||||||
|
# - to check if required property is not None (e.g. by calling setter)
|
||||||
|
# - ApiClient.__deserialize_model has to be adapted as well
|
||||||
|
if client is not None:
|
||||||
|
self.client = client
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def client(self):
|
def client(self):
|
||||||
|
@ -42,9 +42,19 @@ class Dog(object):
|
|||||||
'breed': 'breed'
|
'breed': 'breed'
|
||||||
}
|
}
|
||||||
|
|
||||||
self._class_name = class_name
|
self._class_name = None
|
||||||
self._color = color
|
self._color = None
|
||||||
self._breed = breed
|
self._breed = None
|
||||||
|
|
||||||
|
# TODO: let required properties as mandatory parameter in the constructor.
|
||||||
|
# - to check if required property is not None (e.g. by calling setter)
|
||||||
|
# - ApiClient.__deserialize_model has to be adapted as well
|
||||||
|
if class_name is not None:
|
||||||
|
self.class_name = class_name
|
||||||
|
if color is not None:
|
||||||
|
self.color = color
|
||||||
|
if breed is not None:
|
||||||
|
self.breed = breed
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def class_name(self):
|
def class_name(self):
|
||||||
|
@ -40,8 +40,16 @@ class EnumArrays(object):
|
|||||||
'array_enum': 'array_enum'
|
'array_enum': 'array_enum'
|
||||||
}
|
}
|
||||||
|
|
||||||
self._just_symbol = just_symbol
|
self._just_symbol = None
|
||||||
self._array_enum = array_enum
|
self._array_enum = None
|
||||||
|
|
||||||
|
# TODO: let required properties as mandatory parameter in the constructor.
|
||||||
|
# - to check if required property is not None (e.g. by calling setter)
|
||||||
|
# - ApiClient.__deserialize_model has to be adapted as well
|
||||||
|
if just_symbol is not None:
|
||||||
|
self.just_symbol = just_symbol
|
||||||
|
if array_enum is not None:
|
||||||
|
self.array_enum = array_enum
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def just_symbol(self):
|
def just_symbol(self):
|
||||||
|
@ -21,6 +21,11 @@ class EnumClass(object):
|
|||||||
NOTE: This class is auto generated by the swagger code generator program.
|
NOTE: This class is auto generated by the swagger code generator program.
|
||||||
Do not edit the class manually.
|
Do not edit the class manually.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
_ABC = "_abc"
|
||||||
|
_EFG = "-efg"
|
||||||
|
_XYZ_ = "(xyz)"
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
"""
|
"""
|
||||||
EnumClass - a model defined in Swagger
|
EnumClass - a model defined in Swagger
|
||||||
@ -39,6 +44,10 @@ class EnumClass(object):
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
# TODO: let required properties as mandatory parameter in the constructor.
|
||||||
|
# - to check if required property is not None (e.g. by calling setter)
|
||||||
|
# - ApiClient.__deserialize_model has to be adapted as well
|
||||||
|
|
||||||
def to_dict(self):
|
def to_dict(self):
|
||||||
"""
|
"""
|
||||||
Returns the model properties as a dict
|
Returns the model properties as a dict
|
||||||
|
@ -44,10 +44,22 @@ class EnumTest(object):
|
|||||||
'outer_enum': 'outerEnum'
|
'outer_enum': 'outerEnum'
|
||||||
}
|
}
|
||||||
|
|
||||||
self._enum_string = enum_string
|
self._enum_string = None
|
||||||
self._enum_integer = enum_integer
|
self._enum_integer = None
|
||||||
self._enum_number = enum_number
|
self._enum_number = None
|
||||||
self._outer_enum = outer_enum
|
self._outer_enum = None
|
||||||
|
|
||||||
|
# TODO: let required properties as mandatory parameter in the constructor.
|
||||||
|
# - to check if required property is not None (e.g. by calling setter)
|
||||||
|
# - ApiClient.__deserialize_model has to be adapted as well
|
||||||
|
if enum_string is not None:
|
||||||
|
self.enum_string = enum_string
|
||||||
|
if enum_integer is not None:
|
||||||
|
self.enum_integer = enum_integer
|
||||||
|
if enum_number is not None:
|
||||||
|
self.enum_number = enum_number
|
||||||
|
if outer_enum is not None:
|
||||||
|
self.outer_enum = outer_enum
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def enum_string(self):
|
def enum_string(self):
|
||||||
@ -94,7 +106,7 @@ class EnumTest(object):
|
|||||||
:param enum_integer: The enum_integer of this EnumTest.
|
:param enum_integer: The enum_integer of this EnumTest.
|
||||||
:type: int
|
:type: int
|
||||||
"""
|
"""
|
||||||
allowed_values = ["1", "-1"]
|
allowed_values = [1, -1]
|
||||||
if enum_integer not in allowed_values:
|
if enum_integer not in allowed_values:
|
||||||
raise ValueError(
|
raise ValueError(
|
||||||
"Invalid value for `enum_integer` ({0}), must be one of {1}"
|
"Invalid value for `enum_integer` ({0}), must be one of {1}"
|
||||||
@ -121,7 +133,7 @@ class EnumTest(object):
|
|||||||
:param enum_number: The enum_number of this EnumTest.
|
:param enum_number: The enum_number of this EnumTest.
|
||||||
:type: float
|
:type: float
|
||||||
"""
|
"""
|
||||||
allowed_values = ["1.1", "-1.2"]
|
allowed_values = [1.1, -1.2]
|
||||||
if enum_number not in allowed_values:
|
if enum_number not in allowed_values:
|
||||||
raise ValueError(
|
raise ValueError(
|
||||||
"Invalid value for `enum_number` ({0}), must be one of {1}"
|
"Invalid value for `enum_number` ({0}), must be one of {1}"
|
||||||
|
@ -62,19 +62,49 @@ class FormatTest(object):
|
|||||||
'password': 'password'
|
'password': 'password'
|
||||||
}
|
}
|
||||||
|
|
||||||
self._integer = integer
|
self._integer = None
|
||||||
self._int32 = int32
|
self._int32 = None
|
||||||
self._int64 = int64
|
self._int64 = None
|
||||||
self._number = number
|
self._number = None
|
||||||
self._float = float
|
self._float = None
|
||||||
self._double = double
|
self._double = None
|
||||||
self._string = string
|
self._string = None
|
||||||
self._byte = byte
|
self._byte = None
|
||||||
self._binary = binary
|
self._binary = None
|
||||||
self._date = date
|
self._date = None
|
||||||
self._date_time = date_time
|
self._date_time = None
|
||||||
self._uuid = uuid
|
self._uuid = None
|
||||||
self._password = password
|
self._password = None
|
||||||
|
|
||||||
|
# TODO: let required properties as mandatory parameter in the constructor.
|
||||||
|
# - to check if required property is not None (e.g. by calling setter)
|
||||||
|
# - ApiClient.__deserialize_model has to be adapted as well
|
||||||
|
if integer is not None:
|
||||||
|
self.integer = integer
|
||||||
|
if int32 is not None:
|
||||||
|
self.int32 = int32
|
||||||
|
if int64 is not None:
|
||||||
|
self.int64 = int64
|
||||||
|
if number is not None:
|
||||||
|
self.number = number
|
||||||
|
if float is not None:
|
||||||
|
self.float = float
|
||||||
|
if double is not None:
|
||||||
|
self.double = double
|
||||||
|
if string is not None:
|
||||||
|
self.string = string
|
||||||
|
if byte is not None:
|
||||||
|
self.byte = byte
|
||||||
|
if binary is not None:
|
||||||
|
self.binary = binary
|
||||||
|
if date is not None:
|
||||||
|
self.date = date
|
||||||
|
if date_time is not None:
|
||||||
|
self.date_time = date_time
|
||||||
|
if uuid is not None:
|
||||||
|
self.uuid = uuid
|
||||||
|
if password is not None:
|
||||||
|
self.password = password
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def integer(self):
|
def integer(self):
|
||||||
|
@ -40,8 +40,16 @@ class HasOnlyReadOnly(object):
|
|||||||
'foo': 'foo'
|
'foo': 'foo'
|
||||||
}
|
}
|
||||||
|
|
||||||
self._bar = bar
|
self._bar = None
|
||||||
self._foo = foo
|
self._foo = None
|
||||||
|
|
||||||
|
# TODO: let required properties as mandatory parameter in the constructor.
|
||||||
|
# - to check if required property is not None (e.g. by calling setter)
|
||||||
|
# - ApiClient.__deserialize_model has to be adapted as well
|
||||||
|
if bar is not None:
|
||||||
|
self.bar = bar
|
||||||
|
if foo is not None:
|
||||||
|
self.foo = foo
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def bar(self):
|
def bar(self):
|
||||||
|
@ -38,7 +38,13 @@ class List(object):
|
|||||||
'_123_list': '123-list'
|
'_123_list': '123-list'
|
||||||
}
|
}
|
||||||
|
|
||||||
self.__123_list = _123_list
|
self.__123_list = None
|
||||||
|
|
||||||
|
# TODO: let required properties as mandatory parameter in the constructor.
|
||||||
|
# - to check if required property is not None (e.g. by calling setter)
|
||||||
|
# - ApiClient.__deserialize_model has to be adapted as well
|
||||||
|
if _123_list is not None:
|
||||||
|
self._123_list = _123_list
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def _123_list(self):
|
def _123_list(self):
|
||||||
|
@ -40,8 +40,16 @@ class MapTest(object):
|
|||||||
'map_of_enum_string': 'map_of_enum_string'
|
'map_of_enum_string': 'map_of_enum_string'
|
||||||
}
|
}
|
||||||
|
|
||||||
self._map_map_of_string = map_map_of_string
|
self._map_map_of_string = None
|
||||||
self._map_of_enum_string = map_of_enum_string
|
self._map_of_enum_string = None
|
||||||
|
|
||||||
|
# TODO: let required properties as mandatory parameter in the constructor.
|
||||||
|
# - to check if required property is not None (e.g. by calling setter)
|
||||||
|
# - ApiClient.__deserialize_model has to be adapted as well
|
||||||
|
if map_map_of_string is not None:
|
||||||
|
self.map_map_of_string = map_map_of_string
|
||||||
|
if map_of_enum_string is not None:
|
||||||
|
self.map_of_enum_string = map_of_enum_string
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def map_map_of_string(self):
|
def map_map_of_string(self):
|
||||||
|
@ -42,9 +42,19 @@ class MixedPropertiesAndAdditionalPropertiesClass(object):
|
|||||||
'map': 'map'
|
'map': 'map'
|
||||||
}
|
}
|
||||||
|
|
||||||
self._uuid = uuid
|
self._uuid = None
|
||||||
self._date_time = date_time
|
self._date_time = None
|
||||||
self._map = map
|
self._map = None
|
||||||
|
|
||||||
|
# TODO: let required properties as mandatory parameter in the constructor.
|
||||||
|
# - to check if required property is not None (e.g. by calling setter)
|
||||||
|
# - ApiClient.__deserialize_model has to be adapted as well
|
||||||
|
if uuid is not None:
|
||||||
|
self.uuid = uuid
|
||||||
|
if date_time is not None:
|
||||||
|
self.date_time = date_time
|
||||||
|
if map is not None:
|
||||||
|
self.map = map
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def uuid(self):
|
def uuid(self):
|
||||||
|
@ -40,8 +40,16 @@ class Model200Response(object):
|
|||||||
'_class': 'class'
|
'_class': 'class'
|
||||||
}
|
}
|
||||||
|
|
||||||
self._name = name
|
self._name = None
|
||||||
self.__class = _class
|
self.__class = None
|
||||||
|
|
||||||
|
# TODO: let required properties as mandatory parameter in the constructor.
|
||||||
|
# - to check if required property is not None (e.g. by calling setter)
|
||||||
|
# - ApiClient.__deserialize_model has to be adapted as well
|
||||||
|
if name is not None:
|
||||||
|
self.name = name
|
||||||
|
if _class is not None:
|
||||||
|
self._class = _class
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def name(self):
|
def name(self):
|
||||||
|
@ -38,7 +38,13 @@ class ModelReturn(object):
|
|||||||
'_return': 'return'
|
'_return': 'return'
|
||||||
}
|
}
|
||||||
|
|
||||||
self.__return = _return
|
self.__return = None
|
||||||
|
|
||||||
|
# TODO: let required properties as mandatory parameter in the constructor.
|
||||||
|
# - to check if required property is not None (e.g. by calling setter)
|
||||||
|
# - ApiClient.__deserialize_model has to be adapted as well
|
||||||
|
if _return is not None:
|
||||||
|
self._return = _return
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def _return(self):
|
def _return(self):
|
||||||
|
@ -44,10 +44,22 @@ class Name(object):
|
|||||||
'_123_number': '123Number'
|
'_123_number': '123Number'
|
||||||
}
|
}
|
||||||
|
|
||||||
self._name = name
|
self._name = None
|
||||||
self._snake_case = snake_case
|
self._snake_case = None
|
||||||
self.__property = _property
|
self.__property = None
|
||||||
self.__123_number = _123_number
|
self.__123_number = None
|
||||||
|
|
||||||
|
# TODO: let required properties as mandatory parameter in the constructor.
|
||||||
|
# - to check if required property is not None (e.g. by calling setter)
|
||||||
|
# - ApiClient.__deserialize_model has to be adapted as well
|
||||||
|
if name is not None:
|
||||||
|
self.name = name
|
||||||
|
if snake_case is not None:
|
||||||
|
self.snake_case = snake_case
|
||||||
|
if _property is not None:
|
||||||
|
self._property = _property
|
||||||
|
if _123_number is not None:
|
||||||
|
self._123_number = _123_number
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def name(self):
|
def name(self):
|
||||||
|
@ -38,7 +38,13 @@ class NumberOnly(object):
|
|||||||
'just_number': 'JustNumber'
|
'just_number': 'JustNumber'
|
||||||
}
|
}
|
||||||
|
|
||||||
self._just_number = just_number
|
self._just_number = None
|
||||||
|
|
||||||
|
# TODO: let required properties as mandatory parameter in the constructor.
|
||||||
|
# - to check if required property is not None (e.g. by calling setter)
|
||||||
|
# - ApiClient.__deserialize_model has to be adapted as well
|
||||||
|
if just_number is not None:
|
||||||
|
self.just_number = just_number
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def just_number(self):
|
def just_number(self):
|
||||||
|
@ -48,12 +48,28 @@ class Order(object):
|
|||||||
'complete': 'complete'
|
'complete': 'complete'
|
||||||
}
|
}
|
||||||
|
|
||||||
self._id = id
|
self._id = None
|
||||||
self._pet_id = pet_id
|
self._pet_id = None
|
||||||
self._quantity = quantity
|
self._quantity = None
|
||||||
self._ship_date = ship_date
|
self._ship_date = None
|
||||||
self._status = status
|
self._status = None
|
||||||
self._complete = complete
|
self._complete = None
|
||||||
|
|
||||||
|
# TODO: let required properties as mandatory parameter in the constructor.
|
||||||
|
# - to check if required property is not None (e.g. by calling setter)
|
||||||
|
# - ApiClient.__deserialize_model has to be adapted as well
|
||||||
|
if id is not None:
|
||||||
|
self.id = id
|
||||||
|
if pet_id is not None:
|
||||||
|
self.pet_id = pet_id
|
||||||
|
if quantity is not None:
|
||||||
|
self.quantity = quantity
|
||||||
|
if ship_date is not None:
|
||||||
|
self.ship_date = ship_date
|
||||||
|
if status is not None:
|
||||||
|
self.status = status
|
||||||
|
if complete is not None:
|
||||||
|
self.complete = complete
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def id(self):
|
def id(self):
|
||||||
|
@ -21,6 +21,11 @@ class OuterEnum(object):
|
|||||||
NOTE: This class is auto generated by the swagger code generator program.
|
NOTE: This class is auto generated by the swagger code generator program.
|
||||||
Do not edit the class manually.
|
Do not edit the class manually.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
PLACED = "placed"
|
||||||
|
APPROVED = "approved"
|
||||||
|
DELIVERED = "delivered"
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
"""
|
"""
|
||||||
OuterEnum - a model defined in Swagger
|
OuterEnum - a model defined in Swagger
|
||||||
@ -39,6 +44,10 @@ class OuterEnum(object):
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
# TODO: let required properties as mandatory parameter in the constructor.
|
||||||
|
# - to check if required property is not None (e.g. by calling setter)
|
||||||
|
# - ApiClient.__deserialize_model has to be adapted as well
|
||||||
|
|
||||||
def to_dict(self):
|
def to_dict(self):
|
||||||
"""
|
"""
|
||||||
Returns the model properties as a dict
|
Returns the model properties as a dict
|
||||||
|
@ -48,12 +48,28 @@ class Pet(object):
|
|||||||
'status': 'status'
|
'status': 'status'
|
||||||
}
|
}
|
||||||
|
|
||||||
self._id = id
|
self._id = None
|
||||||
self._category = category
|
self._category = None
|
||||||
self._name = name
|
self._name = None
|
||||||
self._photo_urls = photo_urls
|
self._photo_urls = None
|
||||||
self._tags = tags
|
self._tags = None
|
||||||
self._status = status
|
self._status = None
|
||||||
|
|
||||||
|
# TODO: let required properties as mandatory parameter in the constructor.
|
||||||
|
# - to check if required property is not None (e.g. by calling setter)
|
||||||
|
# - ApiClient.__deserialize_model has to be adapted as well
|
||||||
|
if id is not None:
|
||||||
|
self.id = id
|
||||||
|
if category is not None:
|
||||||
|
self.category = category
|
||||||
|
if name is not None:
|
||||||
|
self.name = name
|
||||||
|
if photo_urls is not None:
|
||||||
|
self.photo_urls = photo_urls
|
||||||
|
if tags is not None:
|
||||||
|
self.tags = tags
|
||||||
|
if status is not None:
|
||||||
|
self.status = status
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def id(self):
|
def id(self):
|
||||||
|
@ -40,8 +40,16 @@ class ReadOnlyFirst(object):
|
|||||||
'baz': 'baz'
|
'baz': 'baz'
|
||||||
}
|
}
|
||||||
|
|
||||||
self._bar = bar
|
self._bar = None
|
||||||
self._baz = baz
|
self._baz = None
|
||||||
|
|
||||||
|
# TODO: let required properties as mandatory parameter in the constructor.
|
||||||
|
# - to check if required property is not None (e.g. by calling setter)
|
||||||
|
# - ApiClient.__deserialize_model has to be adapted as well
|
||||||
|
if bar is not None:
|
||||||
|
self.bar = bar
|
||||||
|
if baz is not None:
|
||||||
|
self.baz = baz
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def bar(self):
|
def bar(self):
|
||||||
|
@ -38,7 +38,13 @@ class SpecialModelName(object):
|
|||||||
'special_property_name': '$special[property.name]'
|
'special_property_name': '$special[property.name]'
|
||||||
}
|
}
|
||||||
|
|
||||||
self._special_property_name = special_property_name
|
self._special_property_name = None
|
||||||
|
|
||||||
|
# TODO: let required properties as mandatory parameter in the constructor.
|
||||||
|
# - to check if required property is not None (e.g. by calling setter)
|
||||||
|
# - ApiClient.__deserialize_model has to be adapted as well
|
||||||
|
if special_property_name is not None:
|
||||||
|
self.special_property_name = special_property_name
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def special_property_name(self):
|
def special_property_name(self):
|
||||||
|
@ -40,8 +40,16 @@ class Tag(object):
|
|||||||
'name': 'name'
|
'name': 'name'
|
||||||
}
|
}
|
||||||
|
|
||||||
self._id = id
|
self._id = None
|
||||||
self._name = name
|
self._name = None
|
||||||
|
|
||||||
|
# TODO: let required properties as mandatory parameter in the constructor.
|
||||||
|
# - to check if required property is not None (e.g. by calling setter)
|
||||||
|
# - ApiClient.__deserialize_model has to be adapted as well
|
||||||
|
if id is not None:
|
||||||
|
self.id = id
|
||||||
|
if name is not None:
|
||||||
|
self.name = name
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def id(self):
|
def id(self):
|
||||||
|
@ -52,14 +52,34 @@ class User(object):
|
|||||||
'user_status': 'userStatus'
|
'user_status': 'userStatus'
|
||||||
}
|
}
|
||||||
|
|
||||||
self._id = id
|
self._id = None
|
||||||
self._username = username
|
self._username = None
|
||||||
self._first_name = first_name
|
self._first_name = None
|
||||||
self._last_name = last_name
|
self._last_name = None
|
||||||
self._email = email
|
self._email = None
|
||||||
self._password = password
|
self._password = None
|
||||||
self._phone = phone
|
self._phone = None
|
||||||
self._user_status = user_status
|
self._user_status = None
|
||||||
|
|
||||||
|
# TODO: let required properties as mandatory parameter in the constructor.
|
||||||
|
# - to check if required property is not None (e.g. by calling setter)
|
||||||
|
# - ApiClient.__deserialize_model has to be adapted as well
|
||||||
|
if id is not None:
|
||||||
|
self.id = id
|
||||||
|
if username is not None:
|
||||||
|
self.username = username
|
||||||
|
if first_name is not None:
|
||||||
|
self.first_name = first_name
|
||||||
|
if last_name is not None:
|
||||||
|
self.last_name = last_name
|
||||||
|
if email is not None:
|
||||||
|
self.email = email
|
||||||
|
if password is not None:
|
||||||
|
self.password = password
|
||||||
|
if phone is not None:
|
||||||
|
self.phone = phone
|
||||||
|
if user_status is not None:
|
||||||
|
self.user_status = user_status
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def id(self):
|
def id(self):
|
||||||
|
@ -42,22 +42,21 @@ class EnumArraysTests(unittest.TestCase):
|
|||||||
#
|
#
|
||||||
try:
|
try:
|
||||||
fish_or_crab = petstore_api.EnumArrays(just_symbol="<=")
|
fish_or_crab = petstore_api.EnumArrays(just_symbol="<=")
|
||||||
|
self.assertTrue(0)
|
||||||
except ValueError:
|
except ValueError:
|
||||||
self.assertEqual(fish_or_crab.just_symbol, None)
|
self.assertTrue(1)
|
||||||
self.assertEqual(fish_or_crab.array_enum, None)
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
fish_or_crab = petstore_api.EnumArrays(just_symbol="$", array_enum=["dog"])
|
fish_or_crab = petstore_api.EnumArrays(just_symbol="$", array_enum=["dog"])
|
||||||
|
self.assertTrue(0)
|
||||||
except ValueError:
|
except ValueError:
|
||||||
self.assertEqual(fish_or_crab.just_symbol, None)
|
self.assertTrue(1)
|
||||||
self.assertEqual(fish_or_crab.array_enum, None)
|
|
||||||
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
fish_or_crab = petstore_api.EnumArrays(just_symbol=["$"], array_enum=["dog"])
|
fish_or_crab = petstore_api.EnumArrays(just_symbol=["$"], array_enum=["dog"])
|
||||||
|
self.assertTrue(0)
|
||||||
except ValueError:
|
except ValueError:
|
||||||
self.assertEqual(fish_or_crab.just_symbol, None)
|
self.assertTrue(1)
|
||||||
self.assertEqual(fish_or_crab.array_enum, None)
|
|
||||||
|
|
||||||
|
|
||||||
def test_enumarrays_setter(self):
|
def test_enumarrays_setter(self):
|
||||||
|
@ -46,8 +46,9 @@ class MapTestTests(unittest.TestCase):
|
|||||||
}
|
}
|
||||||
try:
|
try:
|
||||||
map_enum_test = petstore_api.MapTest(map_of_enum_string=black_or_white_dict)
|
map_enum_test = petstore_api.MapTest(map_of_enum_string=black_or_white_dict)
|
||||||
|
self.assertTrue(0)
|
||||||
except ValueError:
|
except ValueError:
|
||||||
self.assertEqual(map_enum_test, None)
|
self.assertTrue(1)
|
||||||
|
|
||||||
|
|
||||||
def test_maptest_setter(self):
|
def test_maptest_setter(self):
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
[tox]
|
[tox]
|
||||||
envlist = py27, py34
|
envlist = py27, py3
|
||||||
|
|
||||||
[testenv]
|
[testenv]
|
||||||
deps=-r{toxinidir}/requirements.txt
|
deps=-r{toxinidir}/requirements.txt
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
package io.swagger.api;
|
package io.swagger.api;
|
||||||
|
|
||||||
import java.io.File;
|
|
||||||
import io.swagger.model.ModelApiResponse;
|
import io.swagger.model.ModelApiResponse;
|
||||||
import io.swagger.model.Pet;
|
import io.swagger.model.Pet;
|
||||||
|
import org.springframework.core.io.Resource;
|
||||||
|
|
||||||
import io.swagger.annotations.*;
|
import io.swagger.annotations.*;
|
||||||
import org.springframework.http.ResponseEntity;
|
import org.springframework.http.ResponseEntity;
|
||||||
@ -14,6 +14,7 @@ import org.springframework.web.bind.annotation.RequestMethod;
|
|||||||
import org.springframework.web.bind.annotation.RequestParam;
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
import org.springframework.web.bind.annotation.RequestPart;
|
import org.springframework.web.bind.annotation.RequestPart;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
import java.io.IOException;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
@ -68,7 +69,7 @@ public interface PetApi {
|
|||||||
produces = "application/json",
|
produces = "application/json",
|
||||||
consumes = "application/json",
|
consumes = "application/json",
|
||||||
method = RequestMethod.GET)
|
method = RequestMethod.GET)
|
||||||
com.netflix.hystrix.HystrixCommand<ResponseEntity<List<Pet>>> findPetsByStatus( @NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @RequestParam(value = "status", required = true) List<String> status);
|
com.netflix.hystrix.HystrixCommand<ResponseEntity<List<Pet>>> findPetsByStatus( @NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @RequestParam(value = "status", required = true) List<String> status) throws IOException;
|
||||||
|
|
||||||
|
|
||||||
@ApiOperation(value = "Finds Pets by tags", notes = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", response = Pet.class, responseContainer = "List", authorizations = {
|
@ApiOperation(value = "Finds Pets by tags", notes = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", response = Pet.class, responseContainer = "List", authorizations = {
|
||||||
@ -85,7 +86,7 @@ public interface PetApi {
|
|||||||
produces = "application/json",
|
produces = "application/json",
|
||||||
consumes = "application/json",
|
consumes = "application/json",
|
||||||
method = RequestMethod.GET)
|
method = RequestMethod.GET)
|
||||||
com.netflix.hystrix.HystrixCommand<ResponseEntity<List<Pet>>> findPetsByTags( @NotNull @ApiParam(value = "Tags to filter by", required = true) @RequestParam(value = "tags", required = true) List<String> tags);
|
com.netflix.hystrix.HystrixCommand<ResponseEntity<List<Pet>>> findPetsByTags( @NotNull @ApiParam(value = "Tags to filter by", required = true) @RequestParam(value = "tags", required = true) List<String> tags) throws IOException;
|
||||||
|
|
||||||
|
|
||||||
@ApiOperation(value = "Find pet by ID", notes = "Returns a single pet", response = Pet.class, authorizations = {
|
@ApiOperation(value = "Find pet by ID", notes = "Returns a single pet", response = Pet.class, authorizations = {
|
||||||
@ -100,7 +101,7 @@ public interface PetApi {
|
|||||||
produces = "application/json",
|
produces = "application/json",
|
||||||
consumes = "application/json",
|
consumes = "application/json",
|
||||||
method = RequestMethod.GET)
|
method = RequestMethod.GET)
|
||||||
com.netflix.hystrix.HystrixCommand<ResponseEntity<Pet>> getPetById(@ApiParam(value = "ID of pet to return",required=true ) @PathVariable("petId") Long petId);
|
com.netflix.hystrix.HystrixCommand<ResponseEntity<Pet>> getPetById(@ApiParam(value = "ID of pet to return",required=true ) @PathVariable("petId") Long petId) throws IOException;
|
||||||
|
|
||||||
|
|
||||||
@ApiOperation(value = "Update an existing pet", notes = "", response = Void.class, authorizations = {
|
@ApiOperation(value = "Update an existing pet", notes = "", response = Void.class, authorizations = {
|
||||||
@ -150,6 +151,6 @@ public interface PetApi {
|
|||||||
produces = "application/json",
|
produces = "application/json",
|
||||||
consumes = "multipart/form-data",
|
consumes = "multipart/form-data",
|
||||||
method = RequestMethod.POST)
|
method = RequestMethod.POST)
|
||||||
com.netflix.hystrix.HystrixCommand<ResponseEntity<ModelApiResponse>> uploadFile(@ApiParam(value = "ID of pet to update",required=true ) @PathVariable("petId") Long petId,@ApiParam(value = "Additional data to pass to server" ) @RequestParam(value="additionalMetadata", required=false) String additionalMetadata,@ApiParam(value = "file detail") @RequestParam("file") MultipartFile file);
|
com.netflix.hystrix.HystrixCommand<ResponseEntity<ModelApiResponse>> uploadFile(@ApiParam(value = "ID of pet to update",required=true ) @PathVariable("petId") Long petId,@ApiParam(value = "Additional data to pass to server" ) @RequestParam(value="additionalMetadata", required=false) String additionalMetadata,@ApiParam(value = "file detail") @RequestParam("file") MultipartFile file) throws IOException;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -13,6 +13,7 @@ import org.springframework.web.bind.annotation.RequestMethod;
|
|||||||
import org.springframework.web.bind.annotation.RequestParam;
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
import org.springframework.web.bind.annotation.RequestPart;
|
import org.springframework.web.bind.annotation.RequestPart;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
import java.io.IOException;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
@ -43,7 +44,7 @@ public interface StoreApi {
|
|||||||
produces = "application/json",
|
produces = "application/json",
|
||||||
consumes = "application/json",
|
consumes = "application/json",
|
||||||
method = RequestMethod.GET)
|
method = RequestMethod.GET)
|
||||||
com.netflix.hystrix.HystrixCommand<ResponseEntity<Map<String, Integer>>> getInventory();
|
com.netflix.hystrix.HystrixCommand<ResponseEntity<Map<String, Integer>>> getInventory() throws IOException;
|
||||||
|
|
||||||
|
|
||||||
@ApiOperation(value = "Find purchase order by ID", notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", response = Order.class, tags={ "store", })
|
@ApiOperation(value = "Find purchase order by ID", notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", response = Order.class, tags={ "store", })
|
||||||
@ -56,7 +57,7 @@ public interface StoreApi {
|
|||||||
produces = "application/json",
|
produces = "application/json",
|
||||||
consumes = "application/json",
|
consumes = "application/json",
|
||||||
method = RequestMethod.GET)
|
method = RequestMethod.GET)
|
||||||
com.netflix.hystrix.HystrixCommand<ResponseEntity<Order>> getOrderById( @Min(1) @Max(5)@ApiParam(value = "ID of pet that needs to be fetched",required=true ) @PathVariable("orderId") Long orderId);
|
com.netflix.hystrix.HystrixCommand<ResponseEntity<Order>> getOrderById( @Min(1) @Max(5)@ApiParam(value = "ID of pet that needs to be fetched",required=true ) @PathVariable("orderId") Long orderId) throws IOException;
|
||||||
|
|
||||||
|
|
||||||
@ApiOperation(value = "Place an order for a pet", notes = "", response = Order.class, tags={ "store", })
|
@ApiOperation(value = "Place an order for a pet", notes = "", response = Order.class, tags={ "store", })
|
||||||
@ -68,6 +69,6 @@ public interface StoreApi {
|
|||||||
produces = "application/json",
|
produces = "application/json",
|
||||||
consumes = "application/json",
|
consumes = "application/json",
|
||||||
method = RequestMethod.POST)
|
method = RequestMethod.POST)
|
||||||
com.netflix.hystrix.HystrixCommand<ResponseEntity<Order>> placeOrder(@ApiParam(value = "order placed for purchasing the pet" ,required=true ) @Valid @RequestBody Order body);
|
com.netflix.hystrix.HystrixCommand<ResponseEntity<Order>> placeOrder(@ApiParam(value = "order placed for purchasing the pet" ,required=true ) @Valid @RequestBody Order body) throws IOException;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -13,6 +13,7 @@ import org.springframework.web.bind.annotation.RequestMethod;
|
|||||||
import org.springframework.web.bind.annotation.RequestParam;
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
import org.springframework.web.bind.annotation.RequestPart;
|
import org.springframework.web.bind.annotation.RequestPart;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
import java.io.IOException;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
@ -76,7 +77,7 @@ public interface UserApi {
|
|||||||
produces = "application/json",
|
produces = "application/json",
|
||||||
consumes = "application/json",
|
consumes = "application/json",
|
||||||
method = RequestMethod.GET)
|
method = RequestMethod.GET)
|
||||||
com.netflix.hystrix.HystrixCommand<ResponseEntity<User>> getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing. ",required=true ) @PathVariable("username") String username);
|
com.netflix.hystrix.HystrixCommand<ResponseEntity<User>> getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing. ",required=true ) @PathVariable("username") String username) throws IOException;
|
||||||
|
|
||||||
|
|
||||||
@ApiOperation(value = "Logs user into the system", notes = "", response = String.class, tags={ "user", })
|
@ApiOperation(value = "Logs user into the system", notes = "", response = String.class, tags={ "user", })
|
||||||
@ -88,7 +89,7 @@ public interface UserApi {
|
|||||||
produces = "application/json",
|
produces = "application/json",
|
||||||
consumes = "application/json",
|
consumes = "application/json",
|
||||||
method = RequestMethod.GET)
|
method = RequestMethod.GET)
|
||||||
com.netflix.hystrix.HystrixCommand<ResponseEntity<String>> loginUser( @NotNull @ApiParam(value = "The user name for login", required = true) @RequestParam(value = "username", required = true) String username, @NotNull @ApiParam(value = "The password for login in clear text", required = true) @RequestParam(value = "password", required = true) String password);
|
com.netflix.hystrix.HystrixCommand<ResponseEntity<String>> loginUser( @NotNull @ApiParam(value = "The user name for login", required = true) @RequestParam(value = "username", required = true) String username, @NotNull @ApiParam(value = "The password for login in clear text", required = true) @RequestParam(value = "password", required = true) String password) throws IOException;
|
||||||
|
|
||||||
|
|
||||||
@ApiOperation(value = "Logs out current logged in user session", notes = "", response = Void.class, tags={ "user", })
|
@ApiOperation(value = "Logs out current logged in user session", notes = "", response = Void.class, tags={ "user", })
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
package io.swagger.api;
|
package io.swagger.api;
|
||||||
|
|
||||||
import java.io.File;
|
|
||||||
import io.swagger.model.ModelApiResponse;
|
import io.swagger.model.ModelApiResponse;
|
||||||
import io.swagger.model.Pet;
|
import io.swagger.model.Pet;
|
||||||
|
import org.springframework.core.io.Resource;
|
||||||
|
|
||||||
import io.swagger.annotations.*;
|
import io.swagger.annotations.*;
|
||||||
import org.springframework.http.ResponseEntity;
|
import org.springframework.http.ResponseEntity;
|
||||||
@ -14,6 +14,7 @@ import org.springframework.web.bind.annotation.RequestMethod;
|
|||||||
import org.springframework.web.bind.annotation.RequestParam;
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
import org.springframework.web.bind.annotation.RequestPart;
|
import org.springframework.web.bind.annotation.RequestPart;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
import java.io.IOException;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
@ -68,7 +69,7 @@ public interface PetApi {
|
|||||||
produces = "application/json",
|
produces = "application/json",
|
||||||
consumes = "application/json",
|
consumes = "application/json",
|
||||||
method = RequestMethod.GET)
|
method = RequestMethod.GET)
|
||||||
ResponseEntity<List<Pet>> findPetsByStatus( @NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @RequestParam(value = "status", required = true) List<String> status);
|
ResponseEntity<List<Pet>> findPetsByStatus( @NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @RequestParam(value = "status", required = true) List<String> status) throws IOException;
|
||||||
|
|
||||||
|
|
||||||
@ApiOperation(value = "Finds Pets by tags", notes = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", response = Pet.class, responseContainer = "List", authorizations = {
|
@ApiOperation(value = "Finds Pets by tags", notes = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", response = Pet.class, responseContainer = "List", authorizations = {
|
||||||
@ -85,7 +86,7 @@ public interface PetApi {
|
|||||||
produces = "application/json",
|
produces = "application/json",
|
||||||
consumes = "application/json",
|
consumes = "application/json",
|
||||||
method = RequestMethod.GET)
|
method = RequestMethod.GET)
|
||||||
ResponseEntity<List<Pet>> findPetsByTags( @NotNull @ApiParam(value = "Tags to filter by", required = true) @RequestParam(value = "tags", required = true) List<String> tags);
|
ResponseEntity<List<Pet>> findPetsByTags( @NotNull @ApiParam(value = "Tags to filter by", required = true) @RequestParam(value = "tags", required = true) List<String> tags) throws IOException;
|
||||||
|
|
||||||
|
|
||||||
@ApiOperation(value = "Find pet by ID", notes = "Returns a single pet", response = Pet.class, authorizations = {
|
@ApiOperation(value = "Find pet by ID", notes = "Returns a single pet", response = Pet.class, authorizations = {
|
||||||
@ -100,7 +101,7 @@ public interface PetApi {
|
|||||||
produces = "application/json",
|
produces = "application/json",
|
||||||
consumes = "application/json",
|
consumes = "application/json",
|
||||||
method = RequestMethod.GET)
|
method = RequestMethod.GET)
|
||||||
ResponseEntity<Pet> getPetById(@ApiParam(value = "ID of pet to return",required=true ) @PathVariable("petId") Long petId);
|
ResponseEntity<Pet> getPetById(@ApiParam(value = "ID of pet to return",required=true ) @PathVariable("petId") Long petId) throws IOException;
|
||||||
|
|
||||||
|
|
||||||
@ApiOperation(value = "Update an existing pet", notes = "", response = Void.class, authorizations = {
|
@ApiOperation(value = "Update an existing pet", notes = "", response = Void.class, authorizations = {
|
||||||
@ -150,6 +151,6 @@ public interface PetApi {
|
|||||||
produces = "application/json",
|
produces = "application/json",
|
||||||
consumes = "multipart/form-data",
|
consumes = "multipart/form-data",
|
||||||
method = RequestMethod.POST)
|
method = RequestMethod.POST)
|
||||||
ResponseEntity<ModelApiResponse> uploadFile(@ApiParam(value = "ID of pet to update",required=true ) @PathVariable("petId") Long petId,@ApiParam(value = "Additional data to pass to server") @RequestPart(value="additionalMetadata", required=false) String additionalMetadata,@ApiParam(value = "file detail") @RequestPart("file") MultipartFile file);
|
ResponseEntity<ModelApiResponse> uploadFile(@ApiParam(value = "ID of pet to update",required=true ) @PathVariable("petId") Long petId,@ApiParam(value = "Additional data to pass to server") @RequestPart(value="additionalMetadata", required=false) String additionalMetadata,@ApiParam(value = "file detail") @RequestPart("file") MultipartFile file) throws IOException;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -13,6 +13,7 @@ import org.springframework.web.bind.annotation.RequestMethod;
|
|||||||
import org.springframework.web.bind.annotation.RequestParam;
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
import org.springframework.web.bind.annotation.RequestPart;
|
import org.springframework.web.bind.annotation.RequestPart;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
import java.io.IOException;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
@ -43,7 +44,7 @@ public interface StoreApi {
|
|||||||
produces = "application/json",
|
produces = "application/json",
|
||||||
consumes = "application/json",
|
consumes = "application/json",
|
||||||
method = RequestMethod.GET)
|
method = RequestMethod.GET)
|
||||||
ResponseEntity<Map<String, Integer>> getInventory();
|
ResponseEntity<Map<String, Integer>> getInventory() throws IOException;
|
||||||
|
|
||||||
|
|
||||||
@ApiOperation(value = "Find purchase order by ID", notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", response = Order.class, tags={ "store", })
|
@ApiOperation(value = "Find purchase order by ID", notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", response = Order.class, tags={ "store", })
|
||||||
@ -56,7 +57,7 @@ public interface StoreApi {
|
|||||||
produces = "application/json",
|
produces = "application/json",
|
||||||
consumes = "application/json",
|
consumes = "application/json",
|
||||||
method = RequestMethod.GET)
|
method = RequestMethod.GET)
|
||||||
ResponseEntity<Order> getOrderById( @Min(1) @Max(5)@ApiParam(value = "ID of pet that needs to be fetched",required=true ) @PathVariable("orderId") Long orderId);
|
ResponseEntity<Order> getOrderById( @Min(1) @Max(5)@ApiParam(value = "ID of pet that needs to be fetched",required=true ) @PathVariable("orderId") Long orderId) throws IOException;
|
||||||
|
|
||||||
|
|
||||||
@ApiOperation(value = "Place an order for a pet", notes = "", response = Order.class, tags={ "store", })
|
@ApiOperation(value = "Place an order for a pet", notes = "", response = Order.class, tags={ "store", })
|
||||||
@ -68,6 +69,6 @@ public interface StoreApi {
|
|||||||
produces = "application/json",
|
produces = "application/json",
|
||||||
consumes = "application/json",
|
consumes = "application/json",
|
||||||
method = RequestMethod.POST)
|
method = RequestMethod.POST)
|
||||||
ResponseEntity<Order> placeOrder(@ApiParam(value = "order placed for purchasing the pet" ,required=true ) @Valid @RequestBody Order body);
|
ResponseEntity<Order> placeOrder(@ApiParam(value = "order placed for purchasing the pet" ,required=true ) @Valid @RequestBody Order body) throws IOException;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -13,6 +13,7 @@ import org.springframework.web.bind.annotation.RequestMethod;
|
|||||||
import org.springframework.web.bind.annotation.RequestParam;
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
import org.springframework.web.bind.annotation.RequestPart;
|
import org.springframework.web.bind.annotation.RequestPart;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
import java.io.IOException;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
@ -76,7 +77,7 @@ public interface UserApi {
|
|||||||
produces = "application/json",
|
produces = "application/json",
|
||||||
consumes = "application/json",
|
consumes = "application/json",
|
||||||
method = RequestMethod.GET)
|
method = RequestMethod.GET)
|
||||||
ResponseEntity<User> getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing. ",required=true ) @PathVariable("username") String username);
|
ResponseEntity<User> getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing. ",required=true ) @PathVariable("username") String username) throws IOException;
|
||||||
|
|
||||||
|
|
||||||
@ApiOperation(value = "Logs user into the system", notes = "", response = String.class, tags={ "user", })
|
@ApiOperation(value = "Logs user into the system", notes = "", response = String.class, tags={ "user", })
|
||||||
@ -88,7 +89,7 @@ public interface UserApi {
|
|||||||
produces = "application/json",
|
produces = "application/json",
|
||||||
consumes = "application/json",
|
consumes = "application/json",
|
||||||
method = RequestMethod.GET)
|
method = RequestMethod.GET)
|
||||||
ResponseEntity<String> loginUser( @NotNull @ApiParam(value = "The user name for login", required = true) @RequestParam(value = "username", required = true) String username, @NotNull @ApiParam(value = "The password for login in clear text", required = true) @RequestParam(value = "password", required = true) String password);
|
ResponseEntity<String> loginUser( @NotNull @ApiParam(value = "The user name for login", required = true) @RequestParam(value = "username", required = true) String username, @NotNull @ApiParam(value = "The password for login in clear text", required = true) @RequestParam(value = "password", required = true) String password) throws IOException;
|
||||||
|
|
||||||
|
|
||||||
@ApiOperation(value = "Logs out current logged in user session", notes = "", response = Void.class, tags={ "user", })
|
@ApiOperation(value = "Logs out current logged in user session", notes = "", response = Void.class, tags={ "user", })
|
||||||
|
@ -27,9 +27,9 @@ open class FakeAPI: APIBase {
|
|||||||
To test \"client\" model
|
To test \"client\" model
|
||||||
- PATCH /fake
|
- PATCH /fake
|
||||||
- To test \"client\" model
|
- To test \"client\" model
|
||||||
- examples: [{example={
|
- examples: [{contentType=application/json, example={
|
||||||
"client" : "aeiou"
|
"client" : "aeiou"
|
||||||
}, contentType=application/json}]
|
}}]
|
||||||
|
|
||||||
- parameter body: (body) client model
|
- parameter body: (body) client model
|
||||||
|
|
||||||
|
@ -26,9 +26,9 @@ open class Fake_classname_tags123API: APIBase {
|
|||||||
/**
|
/**
|
||||||
To test class name in snake case
|
To test class name in snake case
|
||||||
- PATCH /fake_classname_test
|
- PATCH /fake_classname_test
|
||||||
- examples: [{example={
|
- examples: [{contentType=application/json, example={
|
||||||
"client" : "aeiou"
|
"client" : "aeiou"
|
||||||
}, contentType=application/json}]
|
}}]
|
||||||
|
|
||||||
- parameter body: (body) client model
|
- parameter body: (body) client model
|
||||||
|
|
||||||
|
@ -122,7 +122,7 @@ open class PetAPI: APIBase {
|
|||||||
- OAuth:
|
- OAuth:
|
||||||
- type: oauth2
|
- type: oauth2
|
||||||
- name: petstore_auth
|
- name: petstore_auth
|
||||||
- examples: [{example=<Pet>
|
- examples: [{contentType=application/xml, example=<Pet>
|
||||||
<id>123456789</id>
|
<id>123456789</id>
|
||||||
<name>doggie</name>
|
<name>doggie</name>
|
||||||
<photoUrls>
|
<photoUrls>
|
||||||
@ -131,21 +131,21 @@ open class PetAPI: APIBase {
|
|||||||
<tags>
|
<tags>
|
||||||
</tags>
|
</tags>
|
||||||
<status>aeiou</status>
|
<status>aeiou</status>
|
||||||
</Pet>, contentType=application/xml}, {example=[ {
|
</Pet>}, {contentType=application/json, example=[ {
|
||||||
"tags" : [ {
|
"photoUrls" : [ "aeiou" ],
|
||||||
"id" : 1,
|
"name" : "doggie",
|
||||||
"name" : "aeiou"
|
|
||||||
} ],
|
|
||||||
"id" : 0,
|
"id" : 0,
|
||||||
"category" : {
|
"category" : {
|
||||||
"id" : 6,
|
"name" : "aeiou",
|
||||||
"name" : "aeiou"
|
"id" : 6
|
||||||
},
|
},
|
||||||
"status" : "available",
|
"tags" : [ {
|
||||||
"name" : "doggie",
|
"name" : "aeiou",
|
||||||
"photoUrls" : [ "aeiou" ]
|
"id" : 1
|
||||||
} ], contentType=application/json}]
|
} ],
|
||||||
- examples: [{example=<Pet>
|
"status" : "available"
|
||||||
|
} ]}]
|
||||||
|
- examples: [{contentType=application/xml, example=<Pet>
|
||||||
<id>123456789</id>
|
<id>123456789</id>
|
||||||
<name>doggie</name>
|
<name>doggie</name>
|
||||||
<photoUrls>
|
<photoUrls>
|
||||||
@ -154,20 +154,20 @@ open class PetAPI: APIBase {
|
|||||||
<tags>
|
<tags>
|
||||||
</tags>
|
</tags>
|
||||||
<status>aeiou</status>
|
<status>aeiou</status>
|
||||||
</Pet>, contentType=application/xml}, {example=[ {
|
</Pet>}, {contentType=application/json, example=[ {
|
||||||
"tags" : [ {
|
"photoUrls" : [ "aeiou" ],
|
||||||
"id" : 1,
|
"name" : "doggie",
|
||||||
"name" : "aeiou"
|
|
||||||
} ],
|
|
||||||
"id" : 0,
|
"id" : 0,
|
||||||
"category" : {
|
"category" : {
|
||||||
"id" : 6,
|
"name" : "aeiou",
|
||||||
"name" : "aeiou"
|
"id" : 6
|
||||||
},
|
},
|
||||||
"status" : "available",
|
"tags" : [ {
|
||||||
"name" : "doggie",
|
"name" : "aeiou",
|
||||||
"photoUrls" : [ "aeiou" ]
|
"id" : 1
|
||||||
} ], contentType=application/json}]
|
} ],
|
||||||
|
"status" : "available"
|
||||||
|
} ]}]
|
||||||
|
|
||||||
- parameter status: (query) Status values that need to be considered for filter
|
- parameter status: (query) Status values that need to be considered for filter
|
||||||
|
|
||||||
@ -209,7 +209,7 @@ open class PetAPI: APIBase {
|
|||||||
- OAuth:
|
- OAuth:
|
||||||
- type: oauth2
|
- type: oauth2
|
||||||
- name: petstore_auth
|
- name: petstore_auth
|
||||||
- examples: [{example=<Pet>
|
- examples: [{contentType=application/xml, example=<Pet>
|
||||||
<id>123456789</id>
|
<id>123456789</id>
|
||||||
<name>doggie</name>
|
<name>doggie</name>
|
||||||
<photoUrls>
|
<photoUrls>
|
||||||
@ -218,21 +218,21 @@ open class PetAPI: APIBase {
|
|||||||
<tags>
|
<tags>
|
||||||
</tags>
|
</tags>
|
||||||
<status>aeiou</status>
|
<status>aeiou</status>
|
||||||
</Pet>, contentType=application/xml}, {example=[ {
|
</Pet>}, {contentType=application/json, example=[ {
|
||||||
"tags" : [ {
|
"photoUrls" : [ "aeiou" ],
|
||||||
"id" : 1,
|
"name" : "doggie",
|
||||||
"name" : "aeiou"
|
|
||||||
} ],
|
|
||||||
"id" : 0,
|
"id" : 0,
|
||||||
"category" : {
|
"category" : {
|
||||||
"id" : 6,
|
"name" : "aeiou",
|
||||||
"name" : "aeiou"
|
"id" : 6
|
||||||
},
|
},
|
||||||
"status" : "available",
|
"tags" : [ {
|
||||||
"name" : "doggie",
|
"name" : "aeiou",
|
||||||
"photoUrls" : [ "aeiou" ]
|
"id" : 1
|
||||||
} ], contentType=application/json}]
|
} ],
|
||||||
- examples: [{example=<Pet>
|
"status" : "available"
|
||||||
|
} ]}]
|
||||||
|
- examples: [{contentType=application/xml, example=<Pet>
|
||||||
<id>123456789</id>
|
<id>123456789</id>
|
||||||
<name>doggie</name>
|
<name>doggie</name>
|
||||||
<photoUrls>
|
<photoUrls>
|
||||||
@ -241,20 +241,20 @@ open class PetAPI: APIBase {
|
|||||||
<tags>
|
<tags>
|
||||||
</tags>
|
</tags>
|
||||||
<status>aeiou</status>
|
<status>aeiou</status>
|
||||||
</Pet>, contentType=application/xml}, {example=[ {
|
</Pet>}, {contentType=application/json, example=[ {
|
||||||
"tags" : [ {
|
"photoUrls" : [ "aeiou" ],
|
||||||
"id" : 1,
|
"name" : "doggie",
|
||||||
"name" : "aeiou"
|
|
||||||
} ],
|
|
||||||
"id" : 0,
|
"id" : 0,
|
||||||
"category" : {
|
"category" : {
|
||||||
"id" : 6,
|
"name" : "aeiou",
|
||||||
"name" : "aeiou"
|
"id" : 6
|
||||||
},
|
},
|
||||||
"status" : "available",
|
"tags" : [ {
|
||||||
"name" : "doggie",
|
"name" : "aeiou",
|
||||||
"photoUrls" : [ "aeiou" ]
|
"id" : 1
|
||||||
} ], contentType=application/json}]
|
} ],
|
||||||
|
"status" : "available"
|
||||||
|
} ]}]
|
||||||
|
|
||||||
- parameter tags: (query) Tags to filter by
|
- parameter tags: (query) Tags to filter by
|
||||||
|
|
||||||
@ -296,7 +296,7 @@ open class PetAPI: APIBase {
|
|||||||
- API Key:
|
- API Key:
|
||||||
- type: apiKey api_key
|
- type: apiKey api_key
|
||||||
- name: api_key
|
- name: api_key
|
||||||
- examples: [{example=<Pet>
|
- examples: [{contentType=application/xml, example=<Pet>
|
||||||
<id>123456789</id>
|
<id>123456789</id>
|
||||||
<name>doggie</name>
|
<name>doggie</name>
|
||||||
<photoUrls>
|
<photoUrls>
|
||||||
@ -305,21 +305,21 @@ open class PetAPI: APIBase {
|
|||||||
<tags>
|
<tags>
|
||||||
</tags>
|
</tags>
|
||||||
<status>aeiou</status>
|
<status>aeiou</status>
|
||||||
</Pet>, contentType=application/xml}, {example={
|
</Pet>}, {contentType=application/json, example={
|
||||||
"tags" : [ {
|
"photoUrls" : [ "aeiou" ],
|
||||||
"id" : 1,
|
"name" : "doggie",
|
||||||
"name" : "aeiou"
|
|
||||||
} ],
|
|
||||||
"id" : 0,
|
"id" : 0,
|
||||||
"category" : {
|
"category" : {
|
||||||
"id" : 6,
|
"name" : "aeiou",
|
||||||
"name" : "aeiou"
|
"id" : 6
|
||||||
},
|
},
|
||||||
"status" : "available",
|
"tags" : [ {
|
||||||
"name" : "doggie",
|
"name" : "aeiou",
|
||||||
"photoUrls" : [ "aeiou" ]
|
"id" : 1
|
||||||
}, contentType=application/json}]
|
} ],
|
||||||
- examples: [{example=<Pet>
|
"status" : "available"
|
||||||
|
}}]
|
||||||
|
- examples: [{contentType=application/xml, example=<Pet>
|
||||||
<id>123456789</id>
|
<id>123456789</id>
|
||||||
<name>doggie</name>
|
<name>doggie</name>
|
||||||
<photoUrls>
|
<photoUrls>
|
||||||
@ -328,20 +328,20 @@ open class PetAPI: APIBase {
|
|||||||
<tags>
|
<tags>
|
||||||
</tags>
|
</tags>
|
||||||
<status>aeiou</status>
|
<status>aeiou</status>
|
||||||
</Pet>, contentType=application/xml}, {example={
|
</Pet>}, {contentType=application/json, example={
|
||||||
"tags" : [ {
|
"photoUrls" : [ "aeiou" ],
|
||||||
"id" : 1,
|
"name" : "doggie",
|
||||||
"name" : "aeiou"
|
|
||||||
} ],
|
|
||||||
"id" : 0,
|
"id" : 0,
|
||||||
"category" : {
|
"category" : {
|
||||||
"id" : 6,
|
"name" : "aeiou",
|
||||||
"name" : "aeiou"
|
"id" : 6
|
||||||
},
|
},
|
||||||
"status" : "available",
|
"tags" : [ {
|
||||||
"name" : "doggie",
|
"name" : "aeiou",
|
||||||
"photoUrls" : [ "aeiou" ]
|
"id" : 1
|
||||||
}, contentType=application/json}]
|
} ],
|
||||||
|
"status" : "available"
|
||||||
|
}}]
|
||||||
|
|
||||||
- parameter petId: (path) ID of pet to return
|
- parameter petId: (path) ID of pet to return
|
||||||
|
|
||||||
@ -470,11 +470,11 @@ open class PetAPI: APIBase {
|
|||||||
- OAuth:
|
- OAuth:
|
||||||
- type: oauth2
|
- type: oauth2
|
||||||
- name: petstore_auth
|
- name: petstore_auth
|
||||||
- examples: [{example={
|
- examples: [{contentType=application/json, example={
|
||||||
"message" : "aeiou",
|
|
||||||
"code" : 0,
|
"code" : 0,
|
||||||
"type" : "aeiou"
|
"type" : "aeiou",
|
||||||
}, contentType=application/json}]
|
"message" : "aeiou"
|
||||||
|
}}]
|
||||||
|
|
||||||
- parameter petId: (path) ID of pet to update
|
- parameter petId: (path) ID of pet to update
|
||||||
- parameter additionalMetadata: (form) Additional data to pass to server (optional)
|
- parameter additionalMetadata: (form) Additional data to pass to server (optional)
|
||||||
|
@ -65,9 +65,9 @@ open class StoreAPI: APIBase {
|
|||||||
- API Key:
|
- API Key:
|
||||||
- type: apiKey api_key
|
- type: apiKey api_key
|
||||||
- name: api_key
|
- name: api_key
|
||||||
- examples: [{example={
|
- examples: [{contentType=application/json, example={
|
||||||
"key" : 0
|
"key" : 0
|
||||||
}, contentType=application/json}]
|
}}]
|
||||||
|
|
||||||
- returns: RequestBuilder<[String:Int32]>
|
- returns: RequestBuilder<[String:Int32]>
|
||||||
*/
|
*/
|
||||||
@ -101,36 +101,36 @@ open class StoreAPI: APIBase {
|
|||||||
Find purchase order by ID
|
Find purchase order by ID
|
||||||
- GET /store/order/{order_id}
|
- GET /store/order/{order_id}
|
||||||
- For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
- For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
||||||
- examples: [{example=<Order>
|
- examples: [{contentType=application/xml, example=<Order>
|
||||||
<id>123456789</id>
|
<id>123456789</id>
|
||||||
<petId>123456789</petId>
|
<petId>123456789</petId>
|
||||||
<quantity>123</quantity>
|
<quantity>123</quantity>
|
||||||
<shipDate>2000-01-23T04:56:07.000Z</shipDate>
|
<shipDate>2000-01-23T04:56:07.000Z</shipDate>
|
||||||
<status>aeiou</status>
|
<status>aeiou</status>
|
||||||
<complete>true</complete>
|
<complete>true</complete>
|
||||||
</Order>, contentType=application/xml}, {example={
|
</Order>}, {contentType=application/json, example={
|
||||||
"id" : 0,
|
|
||||||
"petId" : 6,
|
"petId" : 6,
|
||||||
"complete" : false,
|
|
||||||
"status" : "placed",
|
|
||||||
"quantity" : 1,
|
"quantity" : 1,
|
||||||
"shipDate" : "2000-01-23T04:56:07.000+00:00"
|
"id" : 0,
|
||||||
}, contentType=application/json}]
|
"shipDate" : "2000-01-23T04:56:07.000+00:00",
|
||||||
- examples: [{example=<Order>
|
"complete" : false,
|
||||||
|
"status" : "placed"
|
||||||
|
}}]
|
||||||
|
- examples: [{contentType=application/xml, example=<Order>
|
||||||
<id>123456789</id>
|
<id>123456789</id>
|
||||||
<petId>123456789</petId>
|
<petId>123456789</petId>
|
||||||
<quantity>123</quantity>
|
<quantity>123</quantity>
|
||||||
<shipDate>2000-01-23T04:56:07.000Z</shipDate>
|
<shipDate>2000-01-23T04:56:07.000Z</shipDate>
|
||||||
<status>aeiou</status>
|
<status>aeiou</status>
|
||||||
<complete>true</complete>
|
<complete>true</complete>
|
||||||
</Order>, contentType=application/xml}, {example={
|
</Order>}, {contentType=application/json, example={
|
||||||
"id" : 0,
|
|
||||||
"petId" : 6,
|
"petId" : 6,
|
||||||
"complete" : false,
|
|
||||||
"status" : "placed",
|
|
||||||
"quantity" : 1,
|
"quantity" : 1,
|
||||||
"shipDate" : "2000-01-23T04:56:07.000+00:00"
|
"id" : 0,
|
||||||
}, contentType=application/json}]
|
"shipDate" : "2000-01-23T04:56:07.000+00:00",
|
||||||
|
"complete" : false,
|
||||||
|
"status" : "placed"
|
||||||
|
}}]
|
||||||
|
|
||||||
- parameter orderId: (path) ID of pet that needs to be fetched
|
- parameter orderId: (path) ID of pet that needs to be fetched
|
||||||
|
|
||||||
@ -167,36 +167,36 @@ open class StoreAPI: APIBase {
|
|||||||
Place an order for a pet
|
Place an order for a pet
|
||||||
- POST /store/order
|
- POST /store/order
|
||||||
-
|
-
|
||||||
- examples: [{example=<Order>
|
- examples: [{contentType=application/xml, example=<Order>
|
||||||
<id>123456789</id>
|
<id>123456789</id>
|
||||||
<petId>123456789</petId>
|
<petId>123456789</petId>
|
||||||
<quantity>123</quantity>
|
<quantity>123</quantity>
|
||||||
<shipDate>2000-01-23T04:56:07.000Z</shipDate>
|
<shipDate>2000-01-23T04:56:07.000Z</shipDate>
|
||||||
<status>aeiou</status>
|
<status>aeiou</status>
|
||||||
<complete>true</complete>
|
<complete>true</complete>
|
||||||
</Order>, contentType=application/xml}, {example={
|
</Order>}, {contentType=application/json, example={
|
||||||
"id" : 0,
|
|
||||||
"petId" : 6,
|
"petId" : 6,
|
||||||
"complete" : false,
|
|
||||||
"status" : "placed",
|
|
||||||
"quantity" : 1,
|
"quantity" : 1,
|
||||||
"shipDate" : "2000-01-23T04:56:07.000+00:00"
|
"id" : 0,
|
||||||
}, contentType=application/json}]
|
"shipDate" : "2000-01-23T04:56:07.000+00:00",
|
||||||
- examples: [{example=<Order>
|
"complete" : false,
|
||||||
|
"status" : "placed"
|
||||||
|
}}]
|
||||||
|
- examples: [{contentType=application/xml, example=<Order>
|
||||||
<id>123456789</id>
|
<id>123456789</id>
|
||||||
<petId>123456789</petId>
|
<petId>123456789</petId>
|
||||||
<quantity>123</quantity>
|
<quantity>123</quantity>
|
||||||
<shipDate>2000-01-23T04:56:07.000Z</shipDate>
|
<shipDate>2000-01-23T04:56:07.000Z</shipDate>
|
||||||
<status>aeiou</status>
|
<status>aeiou</status>
|
||||||
<complete>true</complete>
|
<complete>true</complete>
|
||||||
</Order>, contentType=application/xml}, {example={
|
</Order>}, {contentType=application/json, example={
|
||||||
"id" : 0,
|
|
||||||
"petId" : 6,
|
"petId" : 6,
|
||||||
"complete" : false,
|
|
||||||
"status" : "placed",
|
|
||||||
"quantity" : 1,
|
"quantity" : 1,
|
||||||
"shipDate" : "2000-01-23T04:56:07.000+00:00"
|
"id" : 0,
|
||||||
}, contentType=application/json}]
|
"shipDate" : "2000-01-23T04:56:07.000+00:00",
|
||||||
|
"complete" : false,
|
||||||
|
"status" : "placed"
|
||||||
|
}}]
|
||||||
|
|
||||||
- parameter body: (body) order placed for purchasing the pet
|
- parameter body: (body) order placed for purchasing the pet
|
||||||
|
|
||||||
|
@ -168,7 +168,7 @@ open class UserAPI: APIBase {
|
|||||||
Get user by user name
|
Get user by user name
|
||||||
- GET /user/{username}
|
- GET /user/{username}
|
||||||
-
|
-
|
||||||
- examples: [{example=<User>
|
- examples: [{contentType=application/xml, example=<User>
|
||||||
<id>123456789</id>
|
<id>123456789</id>
|
||||||
<username>aeiou</username>
|
<username>aeiou</username>
|
||||||
<firstName>aeiou</firstName>
|
<firstName>aeiou</firstName>
|
||||||
@ -177,17 +177,17 @@ open class UserAPI: APIBase {
|
|||||||
<password>aeiou</password>
|
<password>aeiou</password>
|
||||||
<phone>aeiou</phone>
|
<phone>aeiou</phone>
|
||||||
<userStatus>123</userStatus>
|
<userStatus>123</userStatus>
|
||||||
</User>, contentType=application/xml}, {example={
|
</User>}, {contentType=application/json, example={
|
||||||
"id" : 0,
|
|
||||||
"lastName" : "aeiou",
|
|
||||||
"phone" : "aeiou",
|
|
||||||
"username" : "aeiou",
|
|
||||||
"email" : "aeiou",
|
|
||||||
"userStatus" : 6,
|
|
||||||
"firstName" : "aeiou",
|
"firstName" : "aeiou",
|
||||||
"password" : "aeiou"
|
"lastName" : "aeiou",
|
||||||
}, contentType=application/json}]
|
"password" : "aeiou",
|
||||||
- examples: [{example=<User>
|
"userStatus" : 6,
|
||||||
|
"phone" : "aeiou",
|
||||||
|
"id" : 0,
|
||||||
|
"email" : "aeiou",
|
||||||
|
"username" : "aeiou"
|
||||||
|
}}]
|
||||||
|
- examples: [{contentType=application/xml, example=<User>
|
||||||
<id>123456789</id>
|
<id>123456789</id>
|
||||||
<username>aeiou</username>
|
<username>aeiou</username>
|
||||||
<firstName>aeiou</firstName>
|
<firstName>aeiou</firstName>
|
||||||
@ -196,16 +196,16 @@ open class UserAPI: APIBase {
|
|||||||
<password>aeiou</password>
|
<password>aeiou</password>
|
||||||
<phone>aeiou</phone>
|
<phone>aeiou</phone>
|
||||||
<userStatus>123</userStatus>
|
<userStatus>123</userStatus>
|
||||||
</User>, contentType=application/xml}, {example={
|
</User>}, {contentType=application/json, example={
|
||||||
"id" : 0,
|
|
||||||
"lastName" : "aeiou",
|
|
||||||
"phone" : "aeiou",
|
|
||||||
"username" : "aeiou",
|
|
||||||
"email" : "aeiou",
|
|
||||||
"userStatus" : 6,
|
|
||||||
"firstName" : "aeiou",
|
"firstName" : "aeiou",
|
||||||
"password" : "aeiou"
|
"lastName" : "aeiou",
|
||||||
}, contentType=application/json}]
|
"password" : "aeiou",
|
||||||
|
"userStatus" : 6,
|
||||||
|
"phone" : "aeiou",
|
||||||
|
"id" : 0,
|
||||||
|
"email" : "aeiou",
|
||||||
|
"username" : "aeiou"
|
||||||
|
}}]
|
||||||
|
|
||||||
- parameter username: (path) The name that needs to be fetched. Use user1 for testing.
|
- parameter username: (path) The name that needs to be fetched. Use user1 for testing.
|
||||||
|
|
||||||
@ -245,8 +245,8 @@ open class UserAPI: APIBase {
|
|||||||
-
|
-
|
||||||
- responseHeaders: [X-Rate-Limit(Int32), X-Expires-After(Date)]
|
- responseHeaders: [X-Rate-Limit(Int32), X-Expires-After(Date)]
|
||||||
- responseHeaders: [X-Rate-Limit(Int32), X-Expires-After(Date)]
|
- responseHeaders: [X-Rate-Limit(Int32), X-Expires-After(Date)]
|
||||||
- examples: [{example=aeiou, contentType=application/xml}, {example="aeiou", contentType=application/json}]
|
- examples: [{contentType=application/xml, example=aeiou}, {contentType=application/json, example="aeiou"}]
|
||||||
- examples: [{example=aeiou, contentType=application/xml}, {example="aeiou", contentType=application/json}]
|
- examples: [{contentType=application/xml, example=aeiou}, {contentType=application/json, example="aeiou"}]
|
||||||
|
|
||||||
- parameter username: (query) The user name for login
|
- parameter username: (query) The user name for login
|
||||||
- parameter password: (query) The password for login in clear text
|
- parameter password: (query) The password for login in clear text
|
||||||
|
@ -252,7 +252,6 @@ class Decoders {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Decoder for [AdditionalPropertiesClass]
|
// Decoder for [AdditionalPropertiesClass]
|
||||||
Decoders.addDecoder(clazz: [AdditionalPropertiesClass].self) { (source: AnyObject, instance: AnyObject?) -> Decoded<[AdditionalPropertiesClass]> in
|
|
||||||
return Decoders.decode(clazz: [AdditionalPropertiesClass].self, source: source, instance: instance)
|
return Decoders.decode(clazz: [AdditionalPropertiesClass].self, source: source, instance: instance)
|
||||||
}
|
}
|
||||||
// Decoder for AdditionalPropertiesClass
|
// Decoder for AdditionalPropertiesClass
|
||||||
@ -280,7 +279,6 @@ class Decoders {
|
|||||||
|
|
||||||
|
|
||||||
// Decoder for [Animal]
|
// Decoder for [Animal]
|
||||||
Decoders.addDecoder(clazz: [Animal].self) { (source: AnyObject, instance: AnyObject?) -> Decoded<[Animal]> in
|
|
||||||
return Decoders.decode(clazz: [Animal].self, source: source, instance: instance)
|
return Decoders.decode(clazz: [Animal].self, source: source, instance: instance)
|
||||||
}
|
}
|
||||||
// Decoder for Animal
|
// Decoder for Animal
|
||||||
@ -315,7 +313,6 @@ class Decoders {
|
|||||||
|
|
||||||
|
|
||||||
// Decoder for [ApiResponse]
|
// Decoder for [ApiResponse]
|
||||||
Decoders.addDecoder(clazz: [ApiResponse].self) { (source: AnyObject, instance: AnyObject?) -> Decoded<[ApiResponse]> in
|
|
||||||
return Decoders.decode(clazz: [ApiResponse].self, source: source, instance: instance)
|
return Decoders.decode(clazz: [ApiResponse].self, source: source, instance: instance)
|
||||||
}
|
}
|
||||||
// Decoder for ApiResponse
|
// Decoder for ApiResponse
|
||||||
@ -349,7 +346,6 @@ class Decoders {
|
|||||||
|
|
||||||
|
|
||||||
// Decoder for [ArrayOfArrayOfNumberOnly]
|
// Decoder for [ArrayOfArrayOfNumberOnly]
|
||||||
Decoders.addDecoder(clazz: [ArrayOfArrayOfNumberOnly].self) { (source: AnyObject, instance: AnyObject?) -> Decoded<[ArrayOfArrayOfNumberOnly]> in
|
|
||||||
return Decoders.decode(clazz: [ArrayOfArrayOfNumberOnly].self, source: source, instance: instance)
|
return Decoders.decode(clazz: [ArrayOfArrayOfNumberOnly].self, source: source, instance: instance)
|
||||||
}
|
}
|
||||||
// Decoder for ArrayOfArrayOfNumberOnly
|
// Decoder for ArrayOfArrayOfNumberOnly
|
||||||
@ -371,7 +367,6 @@ class Decoders {
|
|||||||
|
|
||||||
|
|
||||||
// Decoder for [ArrayOfNumberOnly]
|
// Decoder for [ArrayOfNumberOnly]
|
||||||
Decoders.addDecoder(clazz: [ArrayOfNumberOnly].self) { (source: AnyObject, instance: AnyObject?) -> Decoded<[ArrayOfNumberOnly]> in
|
|
||||||
return Decoders.decode(clazz: [ArrayOfNumberOnly].self, source: source, instance: instance)
|
return Decoders.decode(clazz: [ArrayOfNumberOnly].self, source: source, instance: instance)
|
||||||
}
|
}
|
||||||
// Decoder for ArrayOfNumberOnly
|
// Decoder for ArrayOfNumberOnly
|
||||||
@ -393,7 +388,6 @@ class Decoders {
|
|||||||
|
|
||||||
|
|
||||||
// Decoder for [ArrayTest]
|
// Decoder for [ArrayTest]
|
||||||
Decoders.addDecoder(clazz: [ArrayTest].self) { (source: AnyObject, instance: AnyObject?) -> Decoded<[ArrayTest]> in
|
|
||||||
return Decoders.decode(clazz: [ArrayTest].self, source: source, instance: instance)
|
return Decoders.decode(clazz: [ArrayTest].self, source: source, instance: instance)
|
||||||
}
|
}
|
||||||
// Decoder for ArrayTest
|
// Decoder for ArrayTest
|
||||||
@ -427,7 +421,6 @@ class Decoders {
|
|||||||
|
|
||||||
|
|
||||||
// Decoder for [Capitalization]
|
// Decoder for [Capitalization]
|
||||||
Decoders.addDecoder(clazz: [Capitalization].self) { (source: AnyObject, instance: AnyObject?) -> Decoded<[Capitalization]> in
|
|
||||||
return Decoders.decode(clazz: [Capitalization].self, source: source, instance: instance)
|
return Decoders.decode(clazz: [Capitalization].self, source: source, instance: instance)
|
||||||
}
|
}
|
||||||
// Decoder for Capitalization
|
// Decoder for Capitalization
|
||||||
@ -479,7 +472,6 @@ class Decoders {
|
|||||||
|
|
||||||
|
|
||||||
// Decoder for [Cat]
|
// Decoder for [Cat]
|
||||||
Decoders.addDecoder(clazz: [Cat].self) { (source: AnyObject, instance: AnyObject?) -> Decoded<[Cat]> in
|
|
||||||
return Decoders.decode(clazz: [Cat].self, source: source, instance: instance)
|
return Decoders.decode(clazz: [Cat].self, source: source, instance: instance)
|
||||||
}
|
}
|
||||||
// Decoder for Cat
|
// Decoder for Cat
|
||||||
@ -516,7 +508,6 @@ class Decoders {
|
|||||||
|
|
||||||
|
|
||||||
// Decoder for [Category]
|
// Decoder for [Category]
|
||||||
Decoders.addDecoder(clazz: [Category].self) { (source: AnyObject, instance: AnyObject?) -> Decoded<[Category]> in
|
|
||||||
return Decoders.decode(clazz: [Category].self, source: source, instance: instance)
|
return Decoders.decode(clazz: [Category].self, source: source, instance: instance)
|
||||||
}
|
}
|
||||||
// Decoder for Category
|
// Decoder for Category
|
||||||
@ -544,7 +535,6 @@ class Decoders {
|
|||||||
|
|
||||||
|
|
||||||
// Decoder for [ClassModel]
|
// Decoder for [ClassModel]
|
||||||
Decoders.addDecoder(clazz: [ClassModel].self) { (source: AnyObject, instance: AnyObject?) -> Decoded<[ClassModel]> in
|
|
||||||
return Decoders.decode(clazz: [ClassModel].self, source: source, instance: instance)
|
return Decoders.decode(clazz: [ClassModel].self, source: source, instance: instance)
|
||||||
}
|
}
|
||||||
// Decoder for ClassModel
|
// Decoder for ClassModel
|
||||||
@ -566,7 +556,6 @@ class Decoders {
|
|||||||
|
|
||||||
|
|
||||||
// Decoder for [Client]
|
// Decoder for [Client]
|
||||||
Decoders.addDecoder(clazz: [Client].self) { (source: AnyObject, instance: AnyObject?) -> Decoded<[Client]> in
|
|
||||||
return Decoders.decode(clazz: [Client].self, source: source, instance: instance)
|
return Decoders.decode(clazz: [Client].self, source: source, instance: instance)
|
||||||
}
|
}
|
||||||
// Decoder for Client
|
// Decoder for Client
|
||||||
@ -588,7 +577,6 @@ class Decoders {
|
|||||||
|
|
||||||
|
|
||||||
// Decoder for [Dog]
|
// Decoder for [Dog]
|
||||||
Decoders.addDecoder(clazz: [Dog].self) { (source: AnyObject, instance: AnyObject?) -> Decoded<[Dog]> in
|
|
||||||
return Decoders.decode(clazz: [Dog].self, source: source, instance: instance)
|
return Decoders.decode(clazz: [Dog].self, source: source, instance: instance)
|
||||||
}
|
}
|
||||||
// Decoder for Dog
|
// Decoder for Dog
|
||||||
@ -625,7 +613,6 @@ class Decoders {
|
|||||||
|
|
||||||
|
|
||||||
// Decoder for [EnumArrays]
|
// Decoder for [EnumArrays]
|
||||||
Decoders.addDecoder(clazz: [EnumArrays].self) { (source: AnyObject, instance: AnyObject?) -> Decoded<[EnumArrays]> in
|
|
||||||
return Decoders.decode(clazz: [EnumArrays].self, source: source, instance: instance)
|
return Decoders.decode(clazz: [EnumArrays].self, source: source, instance: instance)
|
||||||
}
|
}
|
||||||
// Decoder for EnumArrays
|
// Decoder for EnumArrays
|
||||||
@ -653,7 +640,6 @@ class Decoders {
|
|||||||
|
|
||||||
|
|
||||||
// Decoder for [EnumClass]
|
// Decoder for [EnumClass]
|
||||||
Decoders.addDecoder(clazz: [EnumClass].self) { (source: AnyObject, instance: AnyObject?) -> Decoded<[EnumClass]> in
|
|
||||||
return Decoders.decode(clazz: [EnumClass].self, source: source, instance: instance)
|
return Decoders.decode(clazz: [EnumClass].self, source: source, instance: instance)
|
||||||
}
|
}
|
||||||
// Decoder for EnumClass
|
// Decoder for EnumClass
|
||||||
@ -664,7 +650,6 @@ class Decoders {
|
|||||||
|
|
||||||
|
|
||||||
// Decoder for [EnumTest]
|
// Decoder for [EnumTest]
|
||||||
Decoders.addDecoder(clazz: [EnumTest].self) { (source: AnyObject, instance: AnyObject?) -> Decoded<[EnumTest]> in
|
|
||||||
return Decoders.decode(clazz: [EnumTest].self, source: source, instance: instance)
|
return Decoders.decode(clazz: [EnumTest].self, source: source, instance: instance)
|
||||||
}
|
}
|
||||||
// Decoder for EnumTest
|
// Decoder for EnumTest
|
||||||
@ -704,7 +689,6 @@ class Decoders {
|
|||||||
|
|
||||||
|
|
||||||
// Decoder for [FormatTest]
|
// Decoder for [FormatTest]
|
||||||
Decoders.addDecoder(clazz: [FormatTest].self) { (source: AnyObject, instance: AnyObject?) -> Decoded<[FormatTest]> in
|
|
||||||
return Decoders.decode(clazz: [FormatTest].self, source: source, instance: instance)
|
return Decoders.decode(clazz: [FormatTest].self, source: source, instance: instance)
|
||||||
}
|
}
|
||||||
// Decoder for FormatTest
|
// Decoder for FormatTest
|
||||||
@ -798,7 +782,6 @@ class Decoders {
|
|||||||
|
|
||||||
|
|
||||||
// Decoder for [HasOnlyReadOnly]
|
// Decoder for [HasOnlyReadOnly]
|
||||||
Decoders.addDecoder(clazz: [HasOnlyReadOnly].self) { (source: AnyObject, instance: AnyObject?) -> Decoded<[HasOnlyReadOnly]> in
|
|
||||||
return Decoders.decode(clazz: [HasOnlyReadOnly].self, source: source, instance: instance)
|
return Decoders.decode(clazz: [HasOnlyReadOnly].self, source: source, instance: instance)
|
||||||
}
|
}
|
||||||
// Decoder for HasOnlyReadOnly
|
// Decoder for HasOnlyReadOnly
|
||||||
@ -826,7 +809,6 @@ class Decoders {
|
|||||||
|
|
||||||
|
|
||||||
// Decoder for [List]
|
// Decoder for [List]
|
||||||
Decoders.addDecoder(clazz: [List].self) { (source: AnyObject, instance: AnyObject?) -> Decoded<[List]> in
|
|
||||||
return Decoders.decode(clazz: [List].self, source: source, instance: instance)
|
return Decoders.decode(clazz: [List].self, source: source, instance: instance)
|
||||||
}
|
}
|
||||||
// Decoder for List
|
// Decoder for List
|
||||||
@ -848,7 +830,6 @@ class Decoders {
|
|||||||
|
|
||||||
|
|
||||||
// Decoder for [MapTest]
|
// Decoder for [MapTest]
|
||||||
Decoders.addDecoder(clazz: [MapTest].self) { (source: AnyObject, instance: AnyObject?) -> Decoded<[MapTest]> in
|
|
||||||
return Decoders.decode(clazz: [MapTest].self, source: source, instance: instance)
|
return Decoders.decode(clazz: [MapTest].self, source: source, instance: instance)
|
||||||
}
|
}
|
||||||
// Decoder for MapTest
|
// Decoder for MapTest
|
||||||
@ -876,7 +857,6 @@ class Decoders {
|
|||||||
|
|
||||||
|
|
||||||
// Decoder for [MixedPropertiesAndAdditionalPropertiesClass]
|
// Decoder for [MixedPropertiesAndAdditionalPropertiesClass]
|
||||||
Decoders.addDecoder(clazz: [MixedPropertiesAndAdditionalPropertiesClass].self) { (source: AnyObject, instance: AnyObject?) -> Decoded<[MixedPropertiesAndAdditionalPropertiesClass]> in
|
|
||||||
return Decoders.decode(clazz: [MixedPropertiesAndAdditionalPropertiesClass].self, source: source, instance: instance)
|
return Decoders.decode(clazz: [MixedPropertiesAndAdditionalPropertiesClass].self, source: source, instance: instance)
|
||||||
}
|
}
|
||||||
// Decoder for MixedPropertiesAndAdditionalPropertiesClass
|
// Decoder for MixedPropertiesAndAdditionalPropertiesClass
|
||||||
@ -910,7 +890,6 @@ class Decoders {
|
|||||||
|
|
||||||
|
|
||||||
// Decoder for [Model200Response]
|
// Decoder for [Model200Response]
|
||||||
Decoders.addDecoder(clazz: [Model200Response].self) { (source: AnyObject, instance: AnyObject?) -> Decoded<[Model200Response]> in
|
|
||||||
return Decoders.decode(clazz: [Model200Response].self, source: source, instance: instance)
|
return Decoders.decode(clazz: [Model200Response].self, source: source, instance: instance)
|
||||||
}
|
}
|
||||||
// Decoder for Model200Response
|
// Decoder for Model200Response
|
||||||
@ -938,7 +917,6 @@ class Decoders {
|
|||||||
|
|
||||||
|
|
||||||
// Decoder for [Name]
|
// Decoder for [Name]
|
||||||
Decoders.addDecoder(clazz: [Name].self) { (source: AnyObject, instance: AnyObject?) -> Decoded<[Name]> in
|
|
||||||
return Decoders.decode(clazz: [Name].self, source: source, instance: instance)
|
return Decoders.decode(clazz: [Name].self, source: source, instance: instance)
|
||||||
}
|
}
|
||||||
// Decoder for Name
|
// Decoder for Name
|
||||||
@ -978,7 +956,6 @@ class Decoders {
|
|||||||
|
|
||||||
|
|
||||||
// Decoder for [NumberOnly]
|
// Decoder for [NumberOnly]
|
||||||
Decoders.addDecoder(clazz: [NumberOnly].self) { (source: AnyObject, instance: AnyObject?) -> Decoded<[NumberOnly]> in
|
|
||||||
return Decoders.decode(clazz: [NumberOnly].self, source: source, instance: instance)
|
return Decoders.decode(clazz: [NumberOnly].self, source: source, instance: instance)
|
||||||
}
|
}
|
||||||
// Decoder for NumberOnly
|
// Decoder for NumberOnly
|
||||||
@ -1000,7 +977,6 @@ class Decoders {
|
|||||||
|
|
||||||
|
|
||||||
// Decoder for [Order]
|
// Decoder for [Order]
|
||||||
Decoders.addDecoder(clazz: [Order].self) { (source: AnyObject, instance: AnyObject?) -> Decoded<[Order]> in
|
|
||||||
return Decoders.decode(clazz: [Order].self, source: source, instance: instance)
|
return Decoders.decode(clazz: [Order].self, source: source, instance: instance)
|
||||||
}
|
}
|
||||||
// Decoder for Order
|
// Decoder for Order
|
||||||
@ -1052,7 +1028,6 @@ class Decoders {
|
|||||||
|
|
||||||
|
|
||||||
// Decoder for [OuterEnum]
|
// Decoder for [OuterEnum]
|
||||||
Decoders.addDecoder(clazz: [OuterEnum].self) { (source: AnyObject, instance: AnyObject?) -> Decoded<[OuterEnum]> in
|
|
||||||
return Decoders.decode(clazz: [OuterEnum].self, source: source, instance: instance)
|
return Decoders.decode(clazz: [OuterEnum].self, source: source, instance: instance)
|
||||||
}
|
}
|
||||||
// Decoder for OuterEnum
|
// Decoder for OuterEnum
|
||||||
@ -1063,7 +1038,6 @@ class Decoders {
|
|||||||
|
|
||||||
|
|
||||||
// Decoder for [Pet]
|
// Decoder for [Pet]
|
||||||
Decoders.addDecoder(clazz: [Pet].self) { (source: AnyObject, instance: AnyObject?) -> Decoded<[Pet]> in
|
|
||||||
return Decoders.decode(clazz: [Pet].self, source: source, instance: instance)
|
return Decoders.decode(clazz: [Pet].self, source: source, instance: instance)
|
||||||
}
|
}
|
||||||
// Decoder for Pet
|
// Decoder for Pet
|
||||||
@ -1115,7 +1089,6 @@ class Decoders {
|
|||||||
|
|
||||||
|
|
||||||
// Decoder for [ReadOnlyFirst]
|
// Decoder for [ReadOnlyFirst]
|
||||||
Decoders.addDecoder(clazz: [ReadOnlyFirst].self) { (source: AnyObject, instance: AnyObject?) -> Decoded<[ReadOnlyFirst]> in
|
|
||||||
return Decoders.decode(clazz: [ReadOnlyFirst].self, source: source, instance: instance)
|
return Decoders.decode(clazz: [ReadOnlyFirst].self, source: source, instance: instance)
|
||||||
}
|
}
|
||||||
// Decoder for ReadOnlyFirst
|
// Decoder for ReadOnlyFirst
|
||||||
@ -1143,7 +1116,6 @@ class Decoders {
|
|||||||
|
|
||||||
|
|
||||||
// Decoder for [Return]
|
// Decoder for [Return]
|
||||||
Decoders.addDecoder(clazz: [Return].self) { (source: AnyObject, instance: AnyObject?) -> Decoded<[Return]> in
|
|
||||||
return Decoders.decode(clazz: [Return].self, source: source, instance: instance)
|
return Decoders.decode(clazz: [Return].self, source: source, instance: instance)
|
||||||
}
|
}
|
||||||
// Decoder for Return
|
// Decoder for Return
|
||||||
@ -1165,7 +1137,6 @@ class Decoders {
|
|||||||
|
|
||||||
|
|
||||||
// Decoder for [SpecialModelName]
|
// Decoder for [SpecialModelName]
|
||||||
Decoders.addDecoder(clazz: [SpecialModelName].self) { (source: AnyObject, instance: AnyObject?) -> Decoded<[SpecialModelName]> in
|
|
||||||
return Decoders.decode(clazz: [SpecialModelName].self, source: source, instance: instance)
|
return Decoders.decode(clazz: [SpecialModelName].self, source: source, instance: instance)
|
||||||
}
|
}
|
||||||
// Decoder for SpecialModelName
|
// Decoder for SpecialModelName
|
||||||
@ -1187,7 +1158,6 @@ class Decoders {
|
|||||||
|
|
||||||
|
|
||||||
// Decoder for [Tag]
|
// Decoder for [Tag]
|
||||||
Decoders.addDecoder(clazz: [Tag].self) { (source: AnyObject, instance: AnyObject?) -> Decoded<[Tag]> in
|
|
||||||
return Decoders.decode(clazz: [Tag].self, source: source, instance: instance)
|
return Decoders.decode(clazz: [Tag].self, source: source, instance: instance)
|
||||||
}
|
}
|
||||||
// Decoder for Tag
|
// Decoder for Tag
|
||||||
@ -1215,7 +1185,6 @@ class Decoders {
|
|||||||
|
|
||||||
|
|
||||||
// Decoder for [User]
|
// Decoder for [User]
|
||||||
Decoders.addDecoder(clazz: [User].self) { (source: AnyObject, instance: AnyObject?) -> Decoded<[User]> in
|
|
||||||
return Decoders.decode(clazz: [User].self, source: source, instance: instance)
|
return Decoders.decode(clazz: [User].self, source: source, instance: instance)
|
||||||
}
|
}
|
||||||
// Decoder for User
|
// Decoder for User
|
||||||
|
@ -45,9 +45,9 @@ open class FakeAPI: APIBase {
|
|||||||
To test \"client\" model
|
To test \"client\" model
|
||||||
- PATCH /fake
|
- PATCH /fake
|
||||||
- To test \"client\" model
|
- To test \"client\" model
|
||||||
- examples: [{example={
|
- examples: [{contentType=application/json, example={
|
||||||
"client" : "aeiou"
|
"client" : "aeiou"
|
||||||
}, contentType=application/json}]
|
}}]
|
||||||
|
|
||||||
- parameter body: (body) client model
|
- parameter body: (body) client model
|
||||||
|
|
||||||
|
@ -44,9 +44,9 @@ open class Fake_classname_tags123API: APIBase {
|
|||||||
/**
|
/**
|
||||||
To test class name in snake case
|
To test class name in snake case
|
||||||
- PATCH /fake_classname_test
|
- PATCH /fake_classname_test
|
||||||
- examples: [{example={
|
- examples: [{contentType=application/json, example={
|
||||||
"client" : "aeiou"
|
"client" : "aeiou"
|
||||||
}, contentType=application/json}]
|
}}]
|
||||||
|
|
||||||
- parameter body: (body) client model
|
- parameter body: (body) client model
|
||||||
|
|
||||||
|
@ -175,7 +175,7 @@ open class PetAPI: APIBase {
|
|||||||
- OAuth:
|
- OAuth:
|
||||||
- type: oauth2
|
- type: oauth2
|
||||||
- name: petstore_auth
|
- name: petstore_auth
|
||||||
- examples: [{example=<Pet>
|
- examples: [{contentType=application/xml, example=<Pet>
|
||||||
<id>123456789</id>
|
<id>123456789</id>
|
||||||
<name>doggie</name>
|
<name>doggie</name>
|
||||||
<photoUrls>
|
<photoUrls>
|
||||||
@ -184,21 +184,21 @@ open class PetAPI: APIBase {
|
|||||||
<tags>
|
<tags>
|
||||||
</tags>
|
</tags>
|
||||||
<status>aeiou</status>
|
<status>aeiou</status>
|
||||||
</Pet>, contentType=application/xml}, {example=[ {
|
</Pet>}, {contentType=application/json, example=[ {
|
||||||
"tags" : [ {
|
"photoUrls" : [ "aeiou" ],
|
||||||
"id" : 1,
|
"name" : "doggie",
|
||||||
"name" : "aeiou"
|
|
||||||
} ],
|
|
||||||
"id" : 0,
|
"id" : 0,
|
||||||
"category" : {
|
"category" : {
|
||||||
"id" : 6,
|
"name" : "aeiou",
|
||||||
"name" : "aeiou"
|
"id" : 6
|
||||||
},
|
},
|
||||||
"status" : "available",
|
"tags" : [ {
|
||||||
"name" : "doggie",
|
"name" : "aeiou",
|
||||||
"photoUrls" : [ "aeiou" ]
|
"id" : 1
|
||||||
} ], contentType=application/json}]
|
} ],
|
||||||
- examples: [{example=<Pet>
|
"status" : "available"
|
||||||
|
} ]}]
|
||||||
|
- examples: [{contentType=application/xml, example=<Pet>
|
||||||
<id>123456789</id>
|
<id>123456789</id>
|
||||||
<name>doggie</name>
|
<name>doggie</name>
|
||||||
<photoUrls>
|
<photoUrls>
|
||||||
@ -207,20 +207,20 @@ open class PetAPI: APIBase {
|
|||||||
<tags>
|
<tags>
|
||||||
</tags>
|
</tags>
|
||||||
<status>aeiou</status>
|
<status>aeiou</status>
|
||||||
</Pet>, contentType=application/xml}, {example=[ {
|
</Pet>}, {contentType=application/json, example=[ {
|
||||||
"tags" : [ {
|
"photoUrls" : [ "aeiou" ],
|
||||||
"id" : 1,
|
"name" : "doggie",
|
||||||
"name" : "aeiou"
|
|
||||||
} ],
|
|
||||||
"id" : 0,
|
"id" : 0,
|
||||||
"category" : {
|
"category" : {
|
||||||
"id" : 6,
|
"name" : "aeiou",
|
||||||
"name" : "aeiou"
|
"id" : 6
|
||||||
},
|
},
|
||||||
"status" : "available",
|
"tags" : [ {
|
||||||
"name" : "doggie",
|
"name" : "aeiou",
|
||||||
"photoUrls" : [ "aeiou" ]
|
"id" : 1
|
||||||
} ], contentType=application/json}]
|
} ],
|
||||||
|
"status" : "available"
|
||||||
|
} ]}]
|
||||||
|
|
||||||
- parameter status: (query) Status values that need to be considered for filter
|
- parameter status: (query) Status values that need to be considered for filter
|
||||||
|
|
||||||
@ -279,7 +279,7 @@ open class PetAPI: APIBase {
|
|||||||
- OAuth:
|
- OAuth:
|
||||||
- type: oauth2
|
- type: oauth2
|
||||||
- name: petstore_auth
|
- name: petstore_auth
|
||||||
- examples: [{example=<Pet>
|
- examples: [{contentType=application/xml, example=<Pet>
|
||||||
<id>123456789</id>
|
<id>123456789</id>
|
||||||
<name>doggie</name>
|
<name>doggie</name>
|
||||||
<photoUrls>
|
<photoUrls>
|
||||||
@ -288,21 +288,21 @@ open class PetAPI: APIBase {
|
|||||||
<tags>
|
<tags>
|
||||||
</tags>
|
</tags>
|
||||||
<status>aeiou</status>
|
<status>aeiou</status>
|
||||||
</Pet>, contentType=application/xml}, {example=[ {
|
</Pet>}, {contentType=application/json, example=[ {
|
||||||
"tags" : [ {
|
"photoUrls" : [ "aeiou" ],
|
||||||
"id" : 1,
|
"name" : "doggie",
|
||||||
"name" : "aeiou"
|
|
||||||
} ],
|
|
||||||
"id" : 0,
|
"id" : 0,
|
||||||
"category" : {
|
"category" : {
|
||||||
"id" : 6,
|
"name" : "aeiou",
|
||||||
"name" : "aeiou"
|
"id" : 6
|
||||||
},
|
},
|
||||||
"status" : "available",
|
"tags" : [ {
|
||||||
"name" : "doggie",
|
"name" : "aeiou",
|
||||||
"photoUrls" : [ "aeiou" ]
|
"id" : 1
|
||||||
} ], contentType=application/json}]
|
} ],
|
||||||
- examples: [{example=<Pet>
|
"status" : "available"
|
||||||
|
} ]}]
|
||||||
|
- examples: [{contentType=application/xml, example=<Pet>
|
||||||
<id>123456789</id>
|
<id>123456789</id>
|
||||||
<name>doggie</name>
|
<name>doggie</name>
|
||||||
<photoUrls>
|
<photoUrls>
|
||||||
@ -311,20 +311,20 @@ open class PetAPI: APIBase {
|
|||||||
<tags>
|
<tags>
|
||||||
</tags>
|
</tags>
|
||||||
<status>aeiou</status>
|
<status>aeiou</status>
|
||||||
</Pet>, contentType=application/xml}, {example=[ {
|
</Pet>}, {contentType=application/json, example=[ {
|
||||||
"tags" : [ {
|
"photoUrls" : [ "aeiou" ],
|
||||||
"id" : 1,
|
"name" : "doggie",
|
||||||
"name" : "aeiou"
|
|
||||||
} ],
|
|
||||||
"id" : 0,
|
"id" : 0,
|
||||||
"category" : {
|
"category" : {
|
||||||
"id" : 6,
|
"name" : "aeiou",
|
||||||
"name" : "aeiou"
|
"id" : 6
|
||||||
},
|
},
|
||||||
"status" : "available",
|
"tags" : [ {
|
||||||
"name" : "doggie",
|
"name" : "aeiou",
|
||||||
"photoUrls" : [ "aeiou" ]
|
"id" : 1
|
||||||
} ], contentType=application/json}]
|
} ],
|
||||||
|
"status" : "available"
|
||||||
|
} ]}]
|
||||||
|
|
||||||
- parameter tags: (query) Tags to filter by
|
- parameter tags: (query) Tags to filter by
|
||||||
|
|
||||||
@ -383,7 +383,7 @@ open class PetAPI: APIBase {
|
|||||||
- API Key:
|
- API Key:
|
||||||
- type: apiKey api_key
|
- type: apiKey api_key
|
||||||
- name: api_key
|
- name: api_key
|
||||||
- examples: [{example=<Pet>
|
- examples: [{contentType=application/xml, example=<Pet>
|
||||||
<id>123456789</id>
|
<id>123456789</id>
|
||||||
<name>doggie</name>
|
<name>doggie</name>
|
||||||
<photoUrls>
|
<photoUrls>
|
||||||
@ -392,21 +392,21 @@ open class PetAPI: APIBase {
|
|||||||
<tags>
|
<tags>
|
||||||
</tags>
|
</tags>
|
||||||
<status>aeiou</status>
|
<status>aeiou</status>
|
||||||
</Pet>, contentType=application/xml}, {example={
|
</Pet>}, {contentType=application/json, example={
|
||||||
"tags" : [ {
|
"photoUrls" : [ "aeiou" ],
|
||||||
"id" : 1,
|
"name" : "doggie",
|
||||||
"name" : "aeiou"
|
|
||||||
} ],
|
|
||||||
"id" : 0,
|
"id" : 0,
|
||||||
"category" : {
|
"category" : {
|
||||||
"id" : 6,
|
"name" : "aeiou",
|
||||||
"name" : "aeiou"
|
"id" : 6
|
||||||
},
|
},
|
||||||
"status" : "available",
|
"tags" : [ {
|
||||||
"name" : "doggie",
|
"name" : "aeiou",
|
||||||
"photoUrls" : [ "aeiou" ]
|
"id" : 1
|
||||||
}, contentType=application/json}]
|
} ],
|
||||||
- examples: [{example=<Pet>
|
"status" : "available"
|
||||||
|
}}]
|
||||||
|
- examples: [{contentType=application/xml, example=<Pet>
|
||||||
<id>123456789</id>
|
<id>123456789</id>
|
||||||
<name>doggie</name>
|
<name>doggie</name>
|
||||||
<photoUrls>
|
<photoUrls>
|
||||||
@ -415,20 +415,20 @@ open class PetAPI: APIBase {
|
|||||||
<tags>
|
<tags>
|
||||||
</tags>
|
</tags>
|
||||||
<status>aeiou</status>
|
<status>aeiou</status>
|
||||||
</Pet>, contentType=application/xml}, {example={
|
</Pet>}, {contentType=application/json, example={
|
||||||
"tags" : [ {
|
"photoUrls" : [ "aeiou" ],
|
||||||
"id" : 1,
|
"name" : "doggie",
|
||||||
"name" : "aeiou"
|
|
||||||
} ],
|
|
||||||
"id" : 0,
|
"id" : 0,
|
||||||
"category" : {
|
"category" : {
|
||||||
"id" : 6,
|
"name" : "aeiou",
|
||||||
"name" : "aeiou"
|
"id" : 6
|
||||||
},
|
},
|
||||||
"status" : "available",
|
"tags" : [ {
|
||||||
"name" : "doggie",
|
"name" : "aeiou",
|
||||||
"photoUrls" : [ "aeiou" ]
|
"id" : 1
|
||||||
}, contentType=application/json}]
|
} ],
|
||||||
|
"status" : "available"
|
||||||
|
}}]
|
||||||
|
|
||||||
- parameter petId: (path) ID of pet to return
|
- parameter petId: (path) ID of pet to return
|
||||||
|
|
||||||
@ -612,11 +612,11 @@ open class PetAPI: APIBase {
|
|||||||
- OAuth:
|
- OAuth:
|
||||||
- type: oauth2
|
- type: oauth2
|
||||||
- name: petstore_auth
|
- name: petstore_auth
|
||||||
- examples: [{example={
|
- examples: [{contentType=application/json, example={
|
||||||
"message" : "aeiou",
|
|
||||||
"code" : 0,
|
"code" : 0,
|
||||||
"type" : "aeiou"
|
"type" : "aeiou",
|
||||||
}, contentType=application/json}]
|
"message" : "aeiou"
|
||||||
|
}}]
|
||||||
|
|
||||||
- parameter petId: (path) ID of pet to update
|
- parameter petId: (path) ID of pet to update
|
||||||
- parameter additionalMetadata: (form) Additional data to pass to server (optional)
|
- parameter additionalMetadata: (form) Additional data to pass to server (optional)
|
||||||
|
@ -99,9 +99,9 @@ open class StoreAPI: APIBase {
|
|||||||
- API Key:
|
- API Key:
|
||||||
- type: apiKey api_key
|
- type: apiKey api_key
|
||||||
- name: api_key
|
- name: api_key
|
||||||
- examples: [{example={
|
- examples: [{contentType=application/json, example={
|
||||||
"key" : 0
|
"key" : 0
|
||||||
}, contentType=application/json}]
|
}}]
|
||||||
|
|
||||||
- returns: RequestBuilder<[String:Int32]>
|
- returns: RequestBuilder<[String:Int32]>
|
||||||
*/
|
*/
|
||||||
@ -152,36 +152,36 @@ open class StoreAPI: APIBase {
|
|||||||
Find purchase order by ID
|
Find purchase order by ID
|
||||||
- GET /store/order/{order_id}
|
- GET /store/order/{order_id}
|
||||||
- For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
- For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
||||||
- examples: [{example=<Order>
|
- examples: [{contentType=application/xml, example=<Order>
|
||||||
<id>123456789</id>
|
<id>123456789</id>
|
||||||
<petId>123456789</petId>
|
<petId>123456789</petId>
|
||||||
<quantity>123</quantity>
|
<quantity>123</quantity>
|
||||||
<shipDate>2000-01-23T04:56:07.000Z</shipDate>
|
<shipDate>2000-01-23T04:56:07.000Z</shipDate>
|
||||||
<status>aeiou</status>
|
<status>aeiou</status>
|
||||||
<complete>true</complete>
|
<complete>true</complete>
|
||||||
</Order>, contentType=application/xml}, {example={
|
</Order>}, {contentType=application/json, example={
|
||||||
"id" : 0,
|
|
||||||
"petId" : 6,
|
"petId" : 6,
|
||||||
"complete" : false,
|
|
||||||
"status" : "placed",
|
|
||||||
"quantity" : 1,
|
"quantity" : 1,
|
||||||
"shipDate" : "2000-01-23T04:56:07.000+00:00"
|
"id" : 0,
|
||||||
}, contentType=application/json}]
|
"shipDate" : "2000-01-23T04:56:07.000+00:00",
|
||||||
- examples: [{example=<Order>
|
"complete" : false,
|
||||||
|
"status" : "placed"
|
||||||
|
}}]
|
||||||
|
- examples: [{contentType=application/xml, example=<Order>
|
||||||
<id>123456789</id>
|
<id>123456789</id>
|
||||||
<petId>123456789</petId>
|
<petId>123456789</petId>
|
||||||
<quantity>123</quantity>
|
<quantity>123</quantity>
|
||||||
<shipDate>2000-01-23T04:56:07.000Z</shipDate>
|
<shipDate>2000-01-23T04:56:07.000Z</shipDate>
|
||||||
<status>aeiou</status>
|
<status>aeiou</status>
|
||||||
<complete>true</complete>
|
<complete>true</complete>
|
||||||
</Order>, contentType=application/xml}, {example={
|
</Order>}, {contentType=application/json, example={
|
||||||
"id" : 0,
|
|
||||||
"petId" : 6,
|
"petId" : 6,
|
||||||
"complete" : false,
|
|
||||||
"status" : "placed",
|
|
||||||
"quantity" : 1,
|
"quantity" : 1,
|
||||||
"shipDate" : "2000-01-23T04:56:07.000+00:00"
|
"id" : 0,
|
||||||
}, contentType=application/json}]
|
"shipDate" : "2000-01-23T04:56:07.000+00:00",
|
||||||
|
"complete" : false,
|
||||||
|
"status" : "placed"
|
||||||
|
}}]
|
||||||
|
|
||||||
- parameter orderId: (path) ID of pet that needs to be fetched
|
- parameter orderId: (path) ID of pet that needs to be fetched
|
||||||
|
|
||||||
@ -235,36 +235,36 @@ open class StoreAPI: APIBase {
|
|||||||
Place an order for a pet
|
Place an order for a pet
|
||||||
- POST /store/order
|
- POST /store/order
|
||||||
-
|
-
|
||||||
- examples: [{example=<Order>
|
- examples: [{contentType=application/xml, example=<Order>
|
||||||
<id>123456789</id>
|
<id>123456789</id>
|
||||||
<petId>123456789</petId>
|
<petId>123456789</petId>
|
||||||
<quantity>123</quantity>
|
<quantity>123</quantity>
|
||||||
<shipDate>2000-01-23T04:56:07.000Z</shipDate>
|
<shipDate>2000-01-23T04:56:07.000Z</shipDate>
|
||||||
<status>aeiou</status>
|
<status>aeiou</status>
|
||||||
<complete>true</complete>
|
<complete>true</complete>
|
||||||
</Order>, contentType=application/xml}, {example={
|
</Order>}, {contentType=application/json, example={
|
||||||
"id" : 0,
|
|
||||||
"petId" : 6,
|
"petId" : 6,
|
||||||
"complete" : false,
|
|
||||||
"status" : "placed",
|
|
||||||
"quantity" : 1,
|
"quantity" : 1,
|
||||||
"shipDate" : "2000-01-23T04:56:07.000+00:00"
|
"id" : 0,
|
||||||
}, contentType=application/json}]
|
"shipDate" : "2000-01-23T04:56:07.000+00:00",
|
||||||
- examples: [{example=<Order>
|
"complete" : false,
|
||||||
|
"status" : "placed"
|
||||||
|
}}]
|
||||||
|
- examples: [{contentType=application/xml, example=<Order>
|
||||||
<id>123456789</id>
|
<id>123456789</id>
|
||||||
<petId>123456789</petId>
|
<petId>123456789</petId>
|
||||||
<quantity>123</quantity>
|
<quantity>123</quantity>
|
||||||
<shipDate>2000-01-23T04:56:07.000Z</shipDate>
|
<shipDate>2000-01-23T04:56:07.000Z</shipDate>
|
||||||
<status>aeiou</status>
|
<status>aeiou</status>
|
||||||
<complete>true</complete>
|
<complete>true</complete>
|
||||||
</Order>, contentType=application/xml}, {example={
|
</Order>}, {contentType=application/json, example={
|
||||||
"id" : 0,
|
|
||||||
"petId" : 6,
|
"petId" : 6,
|
||||||
"complete" : false,
|
|
||||||
"status" : "placed",
|
|
||||||
"quantity" : 1,
|
"quantity" : 1,
|
||||||
"shipDate" : "2000-01-23T04:56:07.000+00:00"
|
"id" : 0,
|
||||||
}, contentType=application/json}]
|
"shipDate" : "2000-01-23T04:56:07.000+00:00",
|
||||||
|
"complete" : false,
|
||||||
|
"status" : "placed"
|
||||||
|
}}]
|
||||||
|
|
||||||
- parameter body: (body) order placed for purchasing the pet
|
- parameter body: (body) order placed for purchasing the pet
|
||||||
|
|
||||||
|
@ -254,7 +254,7 @@ open class UserAPI: APIBase {
|
|||||||
Get user by user name
|
Get user by user name
|
||||||
- GET /user/{username}
|
- GET /user/{username}
|
||||||
-
|
-
|
||||||
- examples: [{example=<User>
|
- examples: [{contentType=application/xml, example=<User>
|
||||||
<id>123456789</id>
|
<id>123456789</id>
|
||||||
<username>aeiou</username>
|
<username>aeiou</username>
|
||||||
<firstName>aeiou</firstName>
|
<firstName>aeiou</firstName>
|
||||||
@ -263,17 +263,17 @@ open class UserAPI: APIBase {
|
|||||||
<password>aeiou</password>
|
<password>aeiou</password>
|
||||||
<phone>aeiou</phone>
|
<phone>aeiou</phone>
|
||||||
<userStatus>123</userStatus>
|
<userStatus>123</userStatus>
|
||||||
</User>, contentType=application/xml}, {example={
|
</User>}, {contentType=application/json, example={
|
||||||
"id" : 0,
|
|
||||||
"lastName" : "aeiou",
|
|
||||||
"phone" : "aeiou",
|
|
||||||
"username" : "aeiou",
|
|
||||||
"email" : "aeiou",
|
|
||||||
"userStatus" : 6,
|
|
||||||
"firstName" : "aeiou",
|
"firstName" : "aeiou",
|
||||||
"password" : "aeiou"
|
"lastName" : "aeiou",
|
||||||
}, contentType=application/json}]
|
"password" : "aeiou",
|
||||||
- examples: [{example=<User>
|
"userStatus" : 6,
|
||||||
|
"phone" : "aeiou",
|
||||||
|
"id" : 0,
|
||||||
|
"email" : "aeiou",
|
||||||
|
"username" : "aeiou"
|
||||||
|
}}]
|
||||||
|
- examples: [{contentType=application/xml, example=<User>
|
||||||
<id>123456789</id>
|
<id>123456789</id>
|
||||||
<username>aeiou</username>
|
<username>aeiou</username>
|
||||||
<firstName>aeiou</firstName>
|
<firstName>aeiou</firstName>
|
||||||
@ -282,16 +282,16 @@ open class UserAPI: APIBase {
|
|||||||
<password>aeiou</password>
|
<password>aeiou</password>
|
||||||
<phone>aeiou</phone>
|
<phone>aeiou</phone>
|
||||||
<userStatus>123</userStatus>
|
<userStatus>123</userStatus>
|
||||||
</User>, contentType=application/xml}, {example={
|
</User>}, {contentType=application/json, example={
|
||||||
"id" : 0,
|
|
||||||
"lastName" : "aeiou",
|
|
||||||
"phone" : "aeiou",
|
|
||||||
"username" : "aeiou",
|
|
||||||
"email" : "aeiou",
|
|
||||||
"userStatus" : 6,
|
|
||||||
"firstName" : "aeiou",
|
"firstName" : "aeiou",
|
||||||
"password" : "aeiou"
|
"lastName" : "aeiou",
|
||||||
}, contentType=application/json}]
|
"password" : "aeiou",
|
||||||
|
"userStatus" : 6,
|
||||||
|
"phone" : "aeiou",
|
||||||
|
"id" : 0,
|
||||||
|
"email" : "aeiou",
|
||||||
|
"username" : "aeiou"
|
||||||
|
}}]
|
||||||
|
|
||||||
- parameter username: (path) The name that needs to be fetched. Use user1 for testing.
|
- parameter username: (path) The name that needs to be fetched. Use user1 for testing.
|
||||||
|
|
||||||
@ -349,8 +349,8 @@ open class UserAPI: APIBase {
|
|||||||
-
|
-
|
||||||
- responseHeaders: [X-Rate-Limit(Int32), X-Expires-After(Date)]
|
- responseHeaders: [X-Rate-Limit(Int32), X-Expires-After(Date)]
|
||||||
- responseHeaders: [X-Rate-Limit(Int32), X-Expires-After(Date)]
|
- responseHeaders: [X-Rate-Limit(Int32), X-Expires-After(Date)]
|
||||||
- examples: [{example=aeiou, contentType=application/xml}, {example="aeiou", contentType=application/json}]
|
- examples: [{contentType=application/xml, example=aeiou}, {contentType=application/json, example="aeiou"}]
|
||||||
- examples: [{example=aeiou, contentType=application/xml}, {example="aeiou", contentType=application/json}]
|
- examples: [{contentType=application/xml, example=aeiou}, {contentType=application/json, example="aeiou"}]
|
||||||
|
|
||||||
- parameter username: (query) The user name for login
|
- parameter username: (query) The user name for login
|
||||||
- parameter password: (query) The password for login in clear text
|
- parameter password: (query) The password for login in clear text
|
||||||
|
@ -252,7 +252,6 @@ class Decoders {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Decoder for [AdditionalPropertiesClass]
|
// Decoder for [AdditionalPropertiesClass]
|
||||||
Decoders.addDecoder(clazz: [AdditionalPropertiesClass].self) { (source: AnyObject, instance: AnyObject?) -> Decoded<[AdditionalPropertiesClass]> in
|
|
||||||
return Decoders.decode(clazz: [AdditionalPropertiesClass].self, source: source, instance: instance)
|
return Decoders.decode(clazz: [AdditionalPropertiesClass].self, source: source, instance: instance)
|
||||||
}
|
}
|
||||||
// Decoder for AdditionalPropertiesClass
|
// Decoder for AdditionalPropertiesClass
|
||||||
@ -280,7 +279,6 @@ class Decoders {
|
|||||||
|
|
||||||
|
|
||||||
// Decoder for [Animal]
|
// Decoder for [Animal]
|
||||||
Decoders.addDecoder(clazz: [Animal].self) { (source: AnyObject, instance: AnyObject?) -> Decoded<[Animal]> in
|
|
||||||
return Decoders.decode(clazz: [Animal].self, source: source, instance: instance)
|
return Decoders.decode(clazz: [Animal].self, source: source, instance: instance)
|
||||||
}
|
}
|
||||||
// Decoder for Animal
|
// Decoder for Animal
|
||||||
@ -315,7 +313,6 @@ class Decoders {
|
|||||||
|
|
||||||
|
|
||||||
// Decoder for [ApiResponse]
|
// Decoder for [ApiResponse]
|
||||||
Decoders.addDecoder(clazz: [ApiResponse].self) { (source: AnyObject, instance: AnyObject?) -> Decoded<[ApiResponse]> in
|
|
||||||
return Decoders.decode(clazz: [ApiResponse].self, source: source, instance: instance)
|
return Decoders.decode(clazz: [ApiResponse].self, source: source, instance: instance)
|
||||||
}
|
}
|
||||||
// Decoder for ApiResponse
|
// Decoder for ApiResponse
|
||||||
@ -349,7 +346,6 @@ class Decoders {
|
|||||||
|
|
||||||
|
|
||||||
// Decoder for [ArrayOfArrayOfNumberOnly]
|
// Decoder for [ArrayOfArrayOfNumberOnly]
|
||||||
Decoders.addDecoder(clazz: [ArrayOfArrayOfNumberOnly].self) { (source: AnyObject, instance: AnyObject?) -> Decoded<[ArrayOfArrayOfNumberOnly]> in
|
|
||||||
return Decoders.decode(clazz: [ArrayOfArrayOfNumberOnly].self, source: source, instance: instance)
|
return Decoders.decode(clazz: [ArrayOfArrayOfNumberOnly].self, source: source, instance: instance)
|
||||||
}
|
}
|
||||||
// Decoder for ArrayOfArrayOfNumberOnly
|
// Decoder for ArrayOfArrayOfNumberOnly
|
||||||
@ -371,7 +367,6 @@ class Decoders {
|
|||||||
|
|
||||||
|
|
||||||
// Decoder for [ArrayOfNumberOnly]
|
// Decoder for [ArrayOfNumberOnly]
|
||||||
Decoders.addDecoder(clazz: [ArrayOfNumberOnly].self) { (source: AnyObject, instance: AnyObject?) -> Decoded<[ArrayOfNumberOnly]> in
|
|
||||||
return Decoders.decode(clazz: [ArrayOfNumberOnly].self, source: source, instance: instance)
|
return Decoders.decode(clazz: [ArrayOfNumberOnly].self, source: source, instance: instance)
|
||||||
}
|
}
|
||||||
// Decoder for ArrayOfNumberOnly
|
// Decoder for ArrayOfNumberOnly
|
||||||
@ -393,7 +388,6 @@ class Decoders {
|
|||||||
|
|
||||||
|
|
||||||
// Decoder for [ArrayTest]
|
// Decoder for [ArrayTest]
|
||||||
Decoders.addDecoder(clazz: [ArrayTest].self) { (source: AnyObject, instance: AnyObject?) -> Decoded<[ArrayTest]> in
|
|
||||||
return Decoders.decode(clazz: [ArrayTest].self, source: source, instance: instance)
|
return Decoders.decode(clazz: [ArrayTest].self, source: source, instance: instance)
|
||||||
}
|
}
|
||||||
// Decoder for ArrayTest
|
// Decoder for ArrayTest
|
||||||
@ -427,7 +421,6 @@ class Decoders {
|
|||||||
|
|
||||||
|
|
||||||
// Decoder for [Capitalization]
|
// Decoder for [Capitalization]
|
||||||
Decoders.addDecoder(clazz: [Capitalization].self) { (source: AnyObject, instance: AnyObject?) -> Decoded<[Capitalization]> in
|
|
||||||
return Decoders.decode(clazz: [Capitalization].self, source: source, instance: instance)
|
return Decoders.decode(clazz: [Capitalization].self, source: source, instance: instance)
|
||||||
}
|
}
|
||||||
// Decoder for Capitalization
|
// Decoder for Capitalization
|
||||||
@ -479,7 +472,6 @@ class Decoders {
|
|||||||
|
|
||||||
|
|
||||||
// Decoder for [Cat]
|
// Decoder for [Cat]
|
||||||
Decoders.addDecoder(clazz: [Cat].self) { (source: AnyObject, instance: AnyObject?) -> Decoded<[Cat]> in
|
|
||||||
return Decoders.decode(clazz: [Cat].self, source: source, instance: instance)
|
return Decoders.decode(clazz: [Cat].self, source: source, instance: instance)
|
||||||
}
|
}
|
||||||
// Decoder for Cat
|
// Decoder for Cat
|
||||||
@ -516,7 +508,6 @@ class Decoders {
|
|||||||
|
|
||||||
|
|
||||||
// Decoder for [Category]
|
// Decoder for [Category]
|
||||||
Decoders.addDecoder(clazz: [Category].self) { (source: AnyObject, instance: AnyObject?) -> Decoded<[Category]> in
|
|
||||||
return Decoders.decode(clazz: [Category].self, source: source, instance: instance)
|
return Decoders.decode(clazz: [Category].self, source: source, instance: instance)
|
||||||
}
|
}
|
||||||
// Decoder for Category
|
// Decoder for Category
|
||||||
@ -544,7 +535,6 @@ class Decoders {
|
|||||||
|
|
||||||
|
|
||||||
// Decoder for [ClassModel]
|
// Decoder for [ClassModel]
|
||||||
Decoders.addDecoder(clazz: [ClassModel].self) { (source: AnyObject, instance: AnyObject?) -> Decoded<[ClassModel]> in
|
|
||||||
return Decoders.decode(clazz: [ClassModel].self, source: source, instance: instance)
|
return Decoders.decode(clazz: [ClassModel].self, source: source, instance: instance)
|
||||||
}
|
}
|
||||||
// Decoder for ClassModel
|
// Decoder for ClassModel
|
||||||
@ -566,7 +556,6 @@ class Decoders {
|
|||||||
|
|
||||||
|
|
||||||
// Decoder for [Client]
|
// Decoder for [Client]
|
||||||
Decoders.addDecoder(clazz: [Client].self) { (source: AnyObject, instance: AnyObject?) -> Decoded<[Client]> in
|
|
||||||
return Decoders.decode(clazz: [Client].self, source: source, instance: instance)
|
return Decoders.decode(clazz: [Client].self, source: source, instance: instance)
|
||||||
}
|
}
|
||||||
// Decoder for Client
|
// Decoder for Client
|
||||||
@ -588,7 +577,6 @@ class Decoders {
|
|||||||
|
|
||||||
|
|
||||||
// Decoder for [Dog]
|
// Decoder for [Dog]
|
||||||
Decoders.addDecoder(clazz: [Dog].self) { (source: AnyObject, instance: AnyObject?) -> Decoded<[Dog]> in
|
|
||||||
return Decoders.decode(clazz: [Dog].self, source: source, instance: instance)
|
return Decoders.decode(clazz: [Dog].self, source: source, instance: instance)
|
||||||
}
|
}
|
||||||
// Decoder for Dog
|
// Decoder for Dog
|
||||||
@ -625,7 +613,6 @@ class Decoders {
|
|||||||
|
|
||||||
|
|
||||||
// Decoder for [EnumArrays]
|
// Decoder for [EnumArrays]
|
||||||
Decoders.addDecoder(clazz: [EnumArrays].self) { (source: AnyObject, instance: AnyObject?) -> Decoded<[EnumArrays]> in
|
|
||||||
return Decoders.decode(clazz: [EnumArrays].self, source: source, instance: instance)
|
return Decoders.decode(clazz: [EnumArrays].self, source: source, instance: instance)
|
||||||
}
|
}
|
||||||
// Decoder for EnumArrays
|
// Decoder for EnumArrays
|
||||||
@ -653,7 +640,6 @@ class Decoders {
|
|||||||
|
|
||||||
|
|
||||||
// Decoder for [EnumClass]
|
// Decoder for [EnumClass]
|
||||||
Decoders.addDecoder(clazz: [EnumClass].self) { (source: AnyObject, instance: AnyObject?) -> Decoded<[EnumClass]> in
|
|
||||||
return Decoders.decode(clazz: [EnumClass].self, source: source, instance: instance)
|
return Decoders.decode(clazz: [EnumClass].self, source: source, instance: instance)
|
||||||
}
|
}
|
||||||
// Decoder for EnumClass
|
// Decoder for EnumClass
|
||||||
@ -664,7 +650,6 @@ class Decoders {
|
|||||||
|
|
||||||
|
|
||||||
// Decoder for [EnumTest]
|
// Decoder for [EnumTest]
|
||||||
Decoders.addDecoder(clazz: [EnumTest].self) { (source: AnyObject, instance: AnyObject?) -> Decoded<[EnumTest]> in
|
|
||||||
return Decoders.decode(clazz: [EnumTest].self, source: source, instance: instance)
|
return Decoders.decode(clazz: [EnumTest].self, source: source, instance: instance)
|
||||||
}
|
}
|
||||||
// Decoder for EnumTest
|
// Decoder for EnumTest
|
||||||
@ -704,7 +689,6 @@ class Decoders {
|
|||||||
|
|
||||||
|
|
||||||
// Decoder for [FormatTest]
|
// Decoder for [FormatTest]
|
||||||
Decoders.addDecoder(clazz: [FormatTest].self) { (source: AnyObject, instance: AnyObject?) -> Decoded<[FormatTest]> in
|
|
||||||
return Decoders.decode(clazz: [FormatTest].self, source: source, instance: instance)
|
return Decoders.decode(clazz: [FormatTest].self, source: source, instance: instance)
|
||||||
}
|
}
|
||||||
// Decoder for FormatTest
|
// Decoder for FormatTest
|
||||||
@ -798,7 +782,6 @@ class Decoders {
|
|||||||
|
|
||||||
|
|
||||||
// Decoder for [HasOnlyReadOnly]
|
// Decoder for [HasOnlyReadOnly]
|
||||||
Decoders.addDecoder(clazz: [HasOnlyReadOnly].self) { (source: AnyObject, instance: AnyObject?) -> Decoded<[HasOnlyReadOnly]> in
|
|
||||||
return Decoders.decode(clazz: [HasOnlyReadOnly].self, source: source, instance: instance)
|
return Decoders.decode(clazz: [HasOnlyReadOnly].self, source: source, instance: instance)
|
||||||
}
|
}
|
||||||
// Decoder for HasOnlyReadOnly
|
// Decoder for HasOnlyReadOnly
|
||||||
@ -826,7 +809,6 @@ class Decoders {
|
|||||||
|
|
||||||
|
|
||||||
// Decoder for [List]
|
// Decoder for [List]
|
||||||
Decoders.addDecoder(clazz: [List].self) { (source: AnyObject, instance: AnyObject?) -> Decoded<[List]> in
|
|
||||||
return Decoders.decode(clazz: [List].self, source: source, instance: instance)
|
return Decoders.decode(clazz: [List].self, source: source, instance: instance)
|
||||||
}
|
}
|
||||||
// Decoder for List
|
// Decoder for List
|
||||||
@ -848,7 +830,6 @@ class Decoders {
|
|||||||
|
|
||||||
|
|
||||||
// Decoder for [MapTest]
|
// Decoder for [MapTest]
|
||||||
Decoders.addDecoder(clazz: [MapTest].self) { (source: AnyObject, instance: AnyObject?) -> Decoded<[MapTest]> in
|
|
||||||
return Decoders.decode(clazz: [MapTest].self, source: source, instance: instance)
|
return Decoders.decode(clazz: [MapTest].self, source: source, instance: instance)
|
||||||
}
|
}
|
||||||
// Decoder for MapTest
|
// Decoder for MapTest
|
||||||
@ -876,7 +857,6 @@ class Decoders {
|
|||||||
|
|
||||||
|
|
||||||
// Decoder for [MixedPropertiesAndAdditionalPropertiesClass]
|
// Decoder for [MixedPropertiesAndAdditionalPropertiesClass]
|
||||||
Decoders.addDecoder(clazz: [MixedPropertiesAndAdditionalPropertiesClass].self) { (source: AnyObject, instance: AnyObject?) -> Decoded<[MixedPropertiesAndAdditionalPropertiesClass]> in
|
|
||||||
return Decoders.decode(clazz: [MixedPropertiesAndAdditionalPropertiesClass].self, source: source, instance: instance)
|
return Decoders.decode(clazz: [MixedPropertiesAndAdditionalPropertiesClass].self, source: source, instance: instance)
|
||||||
}
|
}
|
||||||
// Decoder for MixedPropertiesAndAdditionalPropertiesClass
|
// Decoder for MixedPropertiesAndAdditionalPropertiesClass
|
||||||
@ -910,7 +890,6 @@ class Decoders {
|
|||||||
|
|
||||||
|
|
||||||
// Decoder for [Model200Response]
|
// Decoder for [Model200Response]
|
||||||
Decoders.addDecoder(clazz: [Model200Response].self) { (source: AnyObject, instance: AnyObject?) -> Decoded<[Model200Response]> in
|
|
||||||
return Decoders.decode(clazz: [Model200Response].self, source: source, instance: instance)
|
return Decoders.decode(clazz: [Model200Response].self, source: source, instance: instance)
|
||||||
}
|
}
|
||||||
// Decoder for Model200Response
|
// Decoder for Model200Response
|
||||||
@ -938,7 +917,6 @@ class Decoders {
|
|||||||
|
|
||||||
|
|
||||||
// Decoder for [Name]
|
// Decoder for [Name]
|
||||||
Decoders.addDecoder(clazz: [Name].self) { (source: AnyObject, instance: AnyObject?) -> Decoded<[Name]> in
|
|
||||||
return Decoders.decode(clazz: [Name].self, source: source, instance: instance)
|
return Decoders.decode(clazz: [Name].self, source: source, instance: instance)
|
||||||
}
|
}
|
||||||
// Decoder for Name
|
// Decoder for Name
|
||||||
@ -978,7 +956,6 @@ class Decoders {
|
|||||||
|
|
||||||
|
|
||||||
// Decoder for [NumberOnly]
|
// Decoder for [NumberOnly]
|
||||||
Decoders.addDecoder(clazz: [NumberOnly].self) { (source: AnyObject, instance: AnyObject?) -> Decoded<[NumberOnly]> in
|
|
||||||
return Decoders.decode(clazz: [NumberOnly].self, source: source, instance: instance)
|
return Decoders.decode(clazz: [NumberOnly].self, source: source, instance: instance)
|
||||||
}
|
}
|
||||||
// Decoder for NumberOnly
|
// Decoder for NumberOnly
|
||||||
@ -1000,7 +977,6 @@ class Decoders {
|
|||||||
|
|
||||||
|
|
||||||
// Decoder for [Order]
|
// Decoder for [Order]
|
||||||
Decoders.addDecoder(clazz: [Order].self) { (source: AnyObject, instance: AnyObject?) -> Decoded<[Order]> in
|
|
||||||
return Decoders.decode(clazz: [Order].self, source: source, instance: instance)
|
return Decoders.decode(clazz: [Order].self, source: source, instance: instance)
|
||||||
}
|
}
|
||||||
// Decoder for Order
|
// Decoder for Order
|
||||||
@ -1052,7 +1028,6 @@ class Decoders {
|
|||||||
|
|
||||||
|
|
||||||
// Decoder for [OuterEnum]
|
// Decoder for [OuterEnum]
|
||||||
Decoders.addDecoder(clazz: [OuterEnum].self) { (source: AnyObject, instance: AnyObject?) -> Decoded<[OuterEnum]> in
|
|
||||||
return Decoders.decode(clazz: [OuterEnum].self, source: source, instance: instance)
|
return Decoders.decode(clazz: [OuterEnum].self, source: source, instance: instance)
|
||||||
}
|
}
|
||||||
// Decoder for OuterEnum
|
// Decoder for OuterEnum
|
||||||
@ -1063,7 +1038,6 @@ class Decoders {
|
|||||||
|
|
||||||
|
|
||||||
// Decoder for [Pet]
|
// Decoder for [Pet]
|
||||||
Decoders.addDecoder(clazz: [Pet].self) { (source: AnyObject, instance: AnyObject?) -> Decoded<[Pet]> in
|
|
||||||
return Decoders.decode(clazz: [Pet].self, source: source, instance: instance)
|
return Decoders.decode(clazz: [Pet].self, source: source, instance: instance)
|
||||||
}
|
}
|
||||||
// Decoder for Pet
|
// Decoder for Pet
|
||||||
@ -1115,7 +1089,6 @@ class Decoders {
|
|||||||
|
|
||||||
|
|
||||||
// Decoder for [ReadOnlyFirst]
|
// Decoder for [ReadOnlyFirst]
|
||||||
Decoders.addDecoder(clazz: [ReadOnlyFirst].self) { (source: AnyObject, instance: AnyObject?) -> Decoded<[ReadOnlyFirst]> in
|
|
||||||
return Decoders.decode(clazz: [ReadOnlyFirst].self, source: source, instance: instance)
|
return Decoders.decode(clazz: [ReadOnlyFirst].self, source: source, instance: instance)
|
||||||
}
|
}
|
||||||
// Decoder for ReadOnlyFirst
|
// Decoder for ReadOnlyFirst
|
||||||
@ -1143,7 +1116,6 @@ class Decoders {
|
|||||||
|
|
||||||
|
|
||||||
// Decoder for [Return]
|
// Decoder for [Return]
|
||||||
Decoders.addDecoder(clazz: [Return].self) { (source: AnyObject, instance: AnyObject?) -> Decoded<[Return]> in
|
|
||||||
return Decoders.decode(clazz: [Return].self, source: source, instance: instance)
|
return Decoders.decode(clazz: [Return].self, source: source, instance: instance)
|
||||||
}
|
}
|
||||||
// Decoder for Return
|
// Decoder for Return
|
||||||
@ -1165,7 +1137,6 @@ class Decoders {
|
|||||||
|
|
||||||
|
|
||||||
// Decoder for [SpecialModelName]
|
// Decoder for [SpecialModelName]
|
||||||
Decoders.addDecoder(clazz: [SpecialModelName].self) { (source: AnyObject, instance: AnyObject?) -> Decoded<[SpecialModelName]> in
|
|
||||||
return Decoders.decode(clazz: [SpecialModelName].self, source: source, instance: instance)
|
return Decoders.decode(clazz: [SpecialModelName].self, source: source, instance: instance)
|
||||||
}
|
}
|
||||||
// Decoder for SpecialModelName
|
// Decoder for SpecialModelName
|
||||||
@ -1187,7 +1158,6 @@ class Decoders {
|
|||||||
|
|
||||||
|
|
||||||
// Decoder for [Tag]
|
// Decoder for [Tag]
|
||||||
Decoders.addDecoder(clazz: [Tag].self) { (source: AnyObject, instance: AnyObject?) -> Decoded<[Tag]> in
|
|
||||||
return Decoders.decode(clazz: [Tag].self, source: source, instance: instance)
|
return Decoders.decode(clazz: [Tag].self, source: source, instance: instance)
|
||||||
}
|
}
|
||||||
// Decoder for Tag
|
// Decoder for Tag
|
||||||
@ -1215,7 +1185,6 @@ class Decoders {
|
|||||||
|
|
||||||
|
|
||||||
// Decoder for [User]
|
// Decoder for [User]
|
||||||
Decoders.addDecoder(clazz: [User].self) { (source: AnyObject, instance: AnyObject?) -> Decoded<[User]> in
|
|
||||||
return Decoders.decode(clazz: [User].self, source: source, instance: instance)
|
return Decoders.decode(clazz: [User].self, source: source, instance: instance)
|
||||||
}
|
}
|
||||||
// Decoder for User
|
// Decoder for User
|
||||||
|
@ -47,9 +47,9 @@ open class FakeAPI: APIBase {
|
|||||||
To test \"client\" model
|
To test \"client\" model
|
||||||
- PATCH /fake
|
- PATCH /fake
|
||||||
- To test \"client\" model
|
- To test \"client\" model
|
||||||
- examples: [{example={
|
- examples: [{contentType=application/json, example={
|
||||||
"client" : "aeiou"
|
"client" : "aeiou"
|
||||||
}, contentType=application/json}]
|
}}]
|
||||||
|
|
||||||
- parameter body: (body) client model
|
- parameter body: (body) client model
|
||||||
|
|
||||||
|
@ -46,9 +46,9 @@ open class Fake_classname_tags123API: APIBase {
|
|||||||
/**
|
/**
|
||||||
To test class name in snake case
|
To test class name in snake case
|
||||||
- PATCH /fake_classname_test
|
- PATCH /fake_classname_test
|
||||||
- examples: [{example={
|
- examples: [{contentType=application/json, example={
|
||||||
"client" : "aeiou"
|
"client" : "aeiou"
|
||||||
}, contentType=application/json}]
|
}}]
|
||||||
|
|
||||||
- parameter body: (body) client model
|
- parameter body: (body) client model
|
||||||
|
|
||||||
|
@ -181,7 +181,7 @@ open class PetAPI: APIBase {
|
|||||||
- OAuth:
|
- OAuth:
|
||||||
- type: oauth2
|
- type: oauth2
|
||||||
- name: petstore_auth
|
- name: petstore_auth
|
||||||
- examples: [{example=<Pet>
|
- examples: [{contentType=application/xml, example=<Pet>
|
||||||
<id>123456789</id>
|
<id>123456789</id>
|
||||||
<name>doggie</name>
|
<name>doggie</name>
|
||||||
<photoUrls>
|
<photoUrls>
|
||||||
@ -190,21 +190,21 @@ open class PetAPI: APIBase {
|
|||||||
<tags>
|
<tags>
|
||||||
</tags>
|
</tags>
|
||||||
<status>aeiou</status>
|
<status>aeiou</status>
|
||||||
</Pet>, contentType=application/xml}, {example=[ {
|
</Pet>}, {contentType=application/json, example=[ {
|
||||||
"tags" : [ {
|
"photoUrls" : [ "aeiou" ],
|
||||||
"id" : 1,
|
"name" : "doggie",
|
||||||
"name" : "aeiou"
|
|
||||||
} ],
|
|
||||||
"id" : 0,
|
"id" : 0,
|
||||||
"category" : {
|
"category" : {
|
||||||
"id" : 6,
|
"name" : "aeiou",
|
||||||
"name" : "aeiou"
|
"id" : 6
|
||||||
},
|
},
|
||||||
"status" : "available",
|
"tags" : [ {
|
||||||
"name" : "doggie",
|
"name" : "aeiou",
|
||||||
"photoUrls" : [ "aeiou" ]
|
"id" : 1
|
||||||
} ], contentType=application/json}]
|
} ],
|
||||||
- examples: [{example=<Pet>
|
"status" : "available"
|
||||||
|
} ]}]
|
||||||
|
- examples: [{contentType=application/xml, example=<Pet>
|
||||||
<id>123456789</id>
|
<id>123456789</id>
|
||||||
<name>doggie</name>
|
<name>doggie</name>
|
||||||
<photoUrls>
|
<photoUrls>
|
||||||
@ -213,20 +213,20 @@ open class PetAPI: APIBase {
|
|||||||
<tags>
|
<tags>
|
||||||
</tags>
|
</tags>
|
||||||
<status>aeiou</status>
|
<status>aeiou</status>
|
||||||
</Pet>, contentType=application/xml}, {example=[ {
|
</Pet>}, {contentType=application/json, example=[ {
|
||||||
"tags" : [ {
|
"photoUrls" : [ "aeiou" ],
|
||||||
"id" : 1,
|
"name" : "doggie",
|
||||||
"name" : "aeiou"
|
|
||||||
} ],
|
|
||||||
"id" : 0,
|
"id" : 0,
|
||||||
"category" : {
|
"category" : {
|
||||||
"id" : 6,
|
"name" : "aeiou",
|
||||||
"name" : "aeiou"
|
"id" : 6
|
||||||
},
|
},
|
||||||
"status" : "available",
|
"tags" : [ {
|
||||||
"name" : "doggie",
|
"name" : "aeiou",
|
||||||
"photoUrls" : [ "aeiou" ]
|
"id" : 1
|
||||||
} ], contentType=application/json}]
|
} ],
|
||||||
|
"status" : "available"
|
||||||
|
} ]}]
|
||||||
|
|
||||||
- parameter status: (query) Status values that need to be considered for filter
|
- parameter status: (query) Status values that need to be considered for filter
|
||||||
|
|
||||||
@ -287,7 +287,7 @@ open class PetAPI: APIBase {
|
|||||||
- OAuth:
|
- OAuth:
|
||||||
- type: oauth2
|
- type: oauth2
|
||||||
- name: petstore_auth
|
- name: petstore_auth
|
||||||
- examples: [{example=<Pet>
|
- examples: [{contentType=application/xml, example=<Pet>
|
||||||
<id>123456789</id>
|
<id>123456789</id>
|
||||||
<name>doggie</name>
|
<name>doggie</name>
|
||||||
<photoUrls>
|
<photoUrls>
|
||||||
@ -296,21 +296,21 @@ open class PetAPI: APIBase {
|
|||||||
<tags>
|
<tags>
|
||||||
</tags>
|
</tags>
|
||||||
<status>aeiou</status>
|
<status>aeiou</status>
|
||||||
</Pet>, contentType=application/xml}, {example=[ {
|
</Pet>}, {contentType=application/json, example=[ {
|
||||||
"tags" : [ {
|
"photoUrls" : [ "aeiou" ],
|
||||||
"id" : 1,
|
"name" : "doggie",
|
||||||
"name" : "aeiou"
|
|
||||||
} ],
|
|
||||||
"id" : 0,
|
"id" : 0,
|
||||||
"category" : {
|
"category" : {
|
||||||
"id" : 6,
|
"name" : "aeiou",
|
||||||
"name" : "aeiou"
|
"id" : 6
|
||||||
},
|
},
|
||||||
"status" : "available",
|
"tags" : [ {
|
||||||
"name" : "doggie",
|
"name" : "aeiou",
|
||||||
"photoUrls" : [ "aeiou" ]
|
"id" : 1
|
||||||
} ], contentType=application/json}]
|
} ],
|
||||||
- examples: [{example=<Pet>
|
"status" : "available"
|
||||||
|
} ]}]
|
||||||
|
- examples: [{contentType=application/xml, example=<Pet>
|
||||||
<id>123456789</id>
|
<id>123456789</id>
|
||||||
<name>doggie</name>
|
<name>doggie</name>
|
||||||
<photoUrls>
|
<photoUrls>
|
||||||
@ -319,20 +319,20 @@ open class PetAPI: APIBase {
|
|||||||
<tags>
|
<tags>
|
||||||
</tags>
|
</tags>
|
||||||
<status>aeiou</status>
|
<status>aeiou</status>
|
||||||
</Pet>, contentType=application/xml}, {example=[ {
|
</Pet>}, {contentType=application/json, example=[ {
|
||||||
"tags" : [ {
|
"photoUrls" : [ "aeiou" ],
|
||||||
"id" : 1,
|
"name" : "doggie",
|
||||||
"name" : "aeiou"
|
|
||||||
} ],
|
|
||||||
"id" : 0,
|
"id" : 0,
|
||||||
"category" : {
|
"category" : {
|
||||||
"id" : 6,
|
"name" : "aeiou",
|
||||||
"name" : "aeiou"
|
"id" : 6
|
||||||
},
|
},
|
||||||
"status" : "available",
|
"tags" : [ {
|
||||||
"name" : "doggie",
|
"name" : "aeiou",
|
||||||
"photoUrls" : [ "aeiou" ]
|
"id" : 1
|
||||||
} ], contentType=application/json}]
|
} ],
|
||||||
|
"status" : "available"
|
||||||
|
} ]}]
|
||||||
|
|
||||||
- parameter tags: (query) Tags to filter by
|
- parameter tags: (query) Tags to filter by
|
||||||
|
|
||||||
@ -393,7 +393,7 @@ open class PetAPI: APIBase {
|
|||||||
- API Key:
|
- API Key:
|
||||||
- type: apiKey api_key
|
- type: apiKey api_key
|
||||||
- name: api_key
|
- name: api_key
|
||||||
- examples: [{example=<Pet>
|
- examples: [{contentType=application/xml, example=<Pet>
|
||||||
<id>123456789</id>
|
<id>123456789</id>
|
||||||
<name>doggie</name>
|
<name>doggie</name>
|
||||||
<photoUrls>
|
<photoUrls>
|
||||||
@ -402,21 +402,21 @@ open class PetAPI: APIBase {
|
|||||||
<tags>
|
<tags>
|
||||||
</tags>
|
</tags>
|
||||||
<status>aeiou</status>
|
<status>aeiou</status>
|
||||||
</Pet>, contentType=application/xml}, {example={
|
</Pet>}, {contentType=application/json, example={
|
||||||
"tags" : [ {
|
"photoUrls" : [ "aeiou" ],
|
||||||
"id" : 1,
|
"name" : "doggie",
|
||||||
"name" : "aeiou"
|
|
||||||
} ],
|
|
||||||
"id" : 0,
|
"id" : 0,
|
||||||
"category" : {
|
"category" : {
|
||||||
"id" : 6,
|
"name" : "aeiou",
|
||||||
"name" : "aeiou"
|
"id" : 6
|
||||||
},
|
},
|
||||||
"status" : "available",
|
"tags" : [ {
|
||||||
"name" : "doggie",
|
"name" : "aeiou",
|
||||||
"photoUrls" : [ "aeiou" ]
|
"id" : 1
|
||||||
}, contentType=application/json}]
|
} ],
|
||||||
- examples: [{example=<Pet>
|
"status" : "available"
|
||||||
|
}}]
|
||||||
|
- examples: [{contentType=application/xml, example=<Pet>
|
||||||
<id>123456789</id>
|
<id>123456789</id>
|
||||||
<name>doggie</name>
|
<name>doggie</name>
|
||||||
<photoUrls>
|
<photoUrls>
|
||||||
@ -425,20 +425,20 @@ open class PetAPI: APIBase {
|
|||||||
<tags>
|
<tags>
|
||||||
</tags>
|
</tags>
|
||||||
<status>aeiou</status>
|
<status>aeiou</status>
|
||||||
</Pet>, contentType=application/xml}, {example={
|
</Pet>}, {contentType=application/json, example={
|
||||||
"tags" : [ {
|
"photoUrls" : [ "aeiou" ],
|
||||||
"id" : 1,
|
"name" : "doggie",
|
||||||
"name" : "aeiou"
|
|
||||||
} ],
|
|
||||||
"id" : 0,
|
"id" : 0,
|
||||||
"category" : {
|
"category" : {
|
||||||
"id" : 6,
|
"name" : "aeiou",
|
||||||
"name" : "aeiou"
|
"id" : 6
|
||||||
},
|
},
|
||||||
"status" : "available",
|
"tags" : [ {
|
||||||
"name" : "doggie",
|
"name" : "aeiou",
|
||||||
"photoUrls" : [ "aeiou" ]
|
"id" : 1
|
||||||
}, contentType=application/json}]
|
} ],
|
||||||
|
"status" : "available"
|
||||||
|
}}]
|
||||||
|
|
||||||
- parameter petId: (path) ID of pet to return
|
- parameter petId: (path) ID of pet to return
|
||||||
|
|
||||||
@ -628,11 +628,11 @@ open class PetAPI: APIBase {
|
|||||||
- OAuth:
|
- OAuth:
|
||||||
- type: oauth2
|
- type: oauth2
|
||||||
- name: petstore_auth
|
- name: petstore_auth
|
||||||
- examples: [{example={
|
- examples: [{contentType=application/json, example={
|
||||||
"message" : "aeiou",
|
|
||||||
"code" : 0,
|
"code" : 0,
|
||||||
"type" : "aeiou"
|
"type" : "aeiou",
|
||||||
}, contentType=application/json}]
|
"message" : "aeiou"
|
||||||
|
}}]
|
||||||
|
|
||||||
- parameter petId: (path) ID of pet to update
|
- parameter petId: (path) ID of pet to update
|
||||||
- parameter additionalMetadata: (form) Additional data to pass to server (optional)
|
- parameter additionalMetadata: (form) Additional data to pass to server (optional)
|
||||||
|
@ -103,9 +103,9 @@ open class StoreAPI: APIBase {
|
|||||||
- API Key:
|
- API Key:
|
||||||
- type: apiKey api_key
|
- type: apiKey api_key
|
||||||
- name: api_key
|
- name: api_key
|
||||||
- examples: [{example={
|
- examples: [{contentType=application/json, example={
|
||||||
"key" : 0
|
"key" : 0
|
||||||
}, contentType=application/json}]
|
}}]
|
||||||
|
|
||||||
- returns: RequestBuilder<[String:Int32]>
|
- returns: RequestBuilder<[String:Int32]>
|
||||||
*/
|
*/
|
||||||
@ -158,36 +158,36 @@ open class StoreAPI: APIBase {
|
|||||||
Find purchase order by ID
|
Find purchase order by ID
|
||||||
- GET /store/order/{order_id}
|
- GET /store/order/{order_id}
|
||||||
- For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
- For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
||||||
- examples: [{example=<Order>
|
- examples: [{contentType=application/xml, example=<Order>
|
||||||
<id>123456789</id>
|
<id>123456789</id>
|
||||||
<petId>123456789</petId>
|
<petId>123456789</petId>
|
||||||
<quantity>123</quantity>
|
<quantity>123</quantity>
|
||||||
<shipDate>2000-01-23T04:56:07.000Z</shipDate>
|
<shipDate>2000-01-23T04:56:07.000Z</shipDate>
|
||||||
<status>aeiou</status>
|
<status>aeiou</status>
|
||||||
<complete>true</complete>
|
<complete>true</complete>
|
||||||
</Order>, contentType=application/xml}, {example={
|
</Order>}, {contentType=application/json, example={
|
||||||
"id" : 0,
|
|
||||||
"petId" : 6,
|
"petId" : 6,
|
||||||
"complete" : false,
|
|
||||||
"status" : "placed",
|
|
||||||
"quantity" : 1,
|
"quantity" : 1,
|
||||||
"shipDate" : "2000-01-23T04:56:07.000+00:00"
|
"id" : 0,
|
||||||
}, contentType=application/json}]
|
"shipDate" : "2000-01-23T04:56:07.000+00:00",
|
||||||
- examples: [{example=<Order>
|
"complete" : false,
|
||||||
|
"status" : "placed"
|
||||||
|
}}]
|
||||||
|
- examples: [{contentType=application/xml, example=<Order>
|
||||||
<id>123456789</id>
|
<id>123456789</id>
|
||||||
<petId>123456789</petId>
|
<petId>123456789</petId>
|
||||||
<quantity>123</quantity>
|
<quantity>123</quantity>
|
||||||
<shipDate>2000-01-23T04:56:07.000Z</shipDate>
|
<shipDate>2000-01-23T04:56:07.000Z</shipDate>
|
||||||
<status>aeiou</status>
|
<status>aeiou</status>
|
||||||
<complete>true</complete>
|
<complete>true</complete>
|
||||||
</Order>, contentType=application/xml}, {example={
|
</Order>}, {contentType=application/json, example={
|
||||||
"id" : 0,
|
|
||||||
"petId" : 6,
|
"petId" : 6,
|
||||||
"complete" : false,
|
|
||||||
"status" : "placed",
|
|
||||||
"quantity" : 1,
|
"quantity" : 1,
|
||||||
"shipDate" : "2000-01-23T04:56:07.000+00:00"
|
"id" : 0,
|
||||||
}, contentType=application/json}]
|
"shipDate" : "2000-01-23T04:56:07.000+00:00",
|
||||||
|
"complete" : false,
|
||||||
|
"status" : "placed"
|
||||||
|
}}]
|
||||||
|
|
||||||
- parameter orderId: (path) ID of pet that needs to be fetched
|
- parameter orderId: (path) ID of pet that needs to be fetched
|
||||||
|
|
||||||
@ -243,36 +243,36 @@ open class StoreAPI: APIBase {
|
|||||||
Place an order for a pet
|
Place an order for a pet
|
||||||
- POST /store/order
|
- POST /store/order
|
||||||
-
|
-
|
||||||
- examples: [{example=<Order>
|
- examples: [{contentType=application/xml, example=<Order>
|
||||||
<id>123456789</id>
|
<id>123456789</id>
|
||||||
<petId>123456789</petId>
|
<petId>123456789</petId>
|
||||||
<quantity>123</quantity>
|
<quantity>123</quantity>
|
||||||
<shipDate>2000-01-23T04:56:07.000Z</shipDate>
|
<shipDate>2000-01-23T04:56:07.000Z</shipDate>
|
||||||
<status>aeiou</status>
|
<status>aeiou</status>
|
||||||
<complete>true</complete>
|
<complete>true</complete>
|
||||||
</Order>, contentType=application/xml}, {example={
|
</Order>}, {contentType=application/json, example={
|
||||||
"id" : 0,
|
|
||||||
"petId" : 6,
|
"petId" : 6,
|
||||||
"complete" : false,
|
|
||||||
"status" : "placed",
|
|
||||||
"quantity" : 1,
|
"quantity" : 1,
|
||||||
"shipDate" : "2000-01-23T04:56:07.000+00:00"
|
"id" : 0,
|
||||||
}, contentType=application/json}]
|
"shipDate" : "2000-01-23T04:56:07.000+00:00",
|
||||||
- examples: [{example=<Order>
|
"complete" : false,
|
||||||
|
"status" : "placed"
|
||||||
|
}}]
|
||||||
|
- examples: [{contentType=application/xml, example=<Order>
|
||||||
<id>123456789</id>
|
<id>123456789</id>
|
||||||
<petId>123456789</petId>
|
<petId>123456789</petId>
|
||||||
<quantity>123</quantity>
|
<quantity>123</quantity>
|
||||||
<shipDate>2000-01-23T04:56:07.000Z</shipDate>
|
<shipDate>2000-01-23T04:56:07.000Z</shipDate>
|
||||||
<status>aeiou</status>
|
<status>aeiou</status>
|
||||||
<complete>true</complete>
|
<complete>true</complete>
|
||||||
</Order>, contentType=application/xml}, {example={
|
</Order>}, {contentType=application/json, example={
|
||||||
"id" : 0,
|
|
||||||
"petId" : 6,
|
"petId" : 6,
|
||||||
"complete" : false,
|
|
||||||
"status" : "placed",
|
|
||||||
"quantity" : 1,
|
"quantity" : 1,
|
||||||
"shipDate" : "2000-01-23T04:56:07.000+00:00"
|
"id" : 0,
|
||||||
}, contentType=application/json}]
|
"shipDate" : "2000-01-23T04:56:07.000+00:00",
|
||||||
|
"complete" : false,
|
||||||
|
"status" : "placed"
|
||||||
|
}}]
|
||||||
|
|
||||||
- parameter body: (body) order placed for purchasing the pet
|
- parameter body: (body) order placed for purchasing the pet
|
||||||
|
|
||||||
|
@ -264,7 +264,7 @@ open class UserAPI: APIBase {
|
|||||||
Get user by user name
|
Get user by user name
|
||||||
- GET /user/{username}
|
- GET /user/{username}
|
||||||
-
|
-
|
||||||
- examples: [{example=<User>
|
- examples: [{contentType=application/xml, example=<User>
|
||||||
<id>123456789</id>
|
<id>123456789</id>
|
||||||
<username>aeiou</username>
|
<username>aeiou</username>
|
||||||
<firstName>aeiou</firstName>
|
<firstName>aeiou</firstName>
|
||||||
@ -273,17 +273,17 @@ open class UserAPI: APIBase {
|
|||||||
<password>aeiou</password>
|
<password>aeiou</password>
|
||||||
<phone>aeiou</phone>
|
<phone>aeiou</phone>
|
||||||
<userStatus>123</userStatus>
|
<userStatus>123</userStatus>
|
||||||
</User>, contentType=application/xml}, {example={
|
</User>}, {contentType=application/json, example={
|
||||||
"id" : 0,
|
|
||||||
"lastName" : "aeiou",
|
|
||||||
"phone" : "aeiou",
|
|
||||||
"username" : "aeiou",
|
|
||||||
"email" : "aeiou",
|
|
||||||
"userStatus" : 6,
|
|
||||||
"firstName" : "aeiou",
|
"firstName" : "aeiou",
|
||||||
"password" : "aeiou"
|
"lastName" : "aeiou",
|
||||||
}, contentType=application/json}]
|
"password" : "aeiou",
|
||||||
- examples: [{example=<User>
|
"userStatus" : 6,
|
||||||
|
"phone" : "aeiou",
|
||||||
|
"id" : 0,
|
||||||
|
"email" : "aeiou",
|
||||||
|
"username" : "aeiou"
|
||||||
|
}}]
|
||||||
|
- examples: [{contentType=application/xml, example=<User>
|
||||||
<id>123456789</id>
|
<id>123456789</id>
|
||||||
<username>aeiou</username>
|
<username>aeiou</username>
|
||||||
<firstName>aeiou</firstName>
|
<firstName>aeiou</firstName>
|
||||||
@ -292,16 +292,16 @@ open class UserAPI: APIBase {
|
|||||||
<password>aeiou</password>
|
<password>aeiou</password>
|
||||||
<phone>aeiou</phone>
|
<phone>aeiou</phone>
|
||||||
<userStatus>123</userStatus>
|
<userStatus>123</userStatus>
|
||||||
</User>, contentType=application/xml}, {example={
|
</User>}, {contentType=application/json, example={
|
||||||
"id" : 0,
|
|
||||||
"lastName" : "aeiou",
|
|
||||||
"phone" : "aeiou",
|
|
||||||
"username" : "aeiou",
|
|
||||||
"email" : "aeiou",
|
|
||||||
"userStatus" : 6,
|
|
||||||
"firstName" : "aeiou",
|
"firstName" : "aeiou",
|
||||||
"password" : "aeiou"
|
"lastName" : "aeiou",
|
||||||
}, contentType=application/json}]
|
"password" : "aeiou",
|
||||||
|
"userStatus" : 6,
|
||||||
|
"phone" : "aeiou",
|
||||||
|
"id" : 0,
|
||||||
|
"email" : "aeiou",
|
||||||
|
"username" : "aeiou"
|
||||||
|
}}]
|
||||||
|
|
||||||
- parameter username: (path) The name that needs to be fetched. Use user1 for testing.
|
- parameter username: (path) The name that needs to be fetched. Use user1 for testing.
|
||||||
|
|
||||||
@ -361,8 +361,8 @@ open class UserAPI: APIBase {
|
|||||||
-
|
-
|
||||||
- responseHeaders: [X-Rate-Limit(Int32), X-Expires-After(Date)]
|
- responseHeaders: [X-Rate-Limit(Int32), X-Expires-After(Date)]
|
||||||
- responseHeaders: [X-Rate-Limit(Int32), X-Expires-After(Date)]
|
- responseHeaders: [X-Rate-Limit(Int32), X-Expires-After(Date)]
|
||||||
- examples: [{example=aeiou, contentType=application/xml}, {example="aeiou", contentType=application/json}]
|
- examples: [{contentType=application/xml, example=aeiou}, {contentType=application/json, example="aeiou"}]
|
||||||
- examples: [{example=aeiou, contentType=application/xml}, {example="aeiou", contentType=application/json}]
|
- examples: [{contentType=application/xml, example=aeiou}, {contentType=application/json, example="aeiou"}]
|
||||||
|
|
||||||
- parameter username: (query) The user name for login
|
- parameter username: (query) The user name for login
|
||||||
- parameter password: (query) The password for login in clear text
|
- parameter password: (query) The password for login in clear text
|
||||||
|
@ -252,7 +252,6 @@ class Decoders {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Decoder for [AdditionalPropertiesClass]
|
// Decoder for [AdditionalPropertiesClass]
|
||||||
Decoders.addDecoder(clazz: [AdditionalPropertiesClass].self) { (source: AnyObject, instance: AnyObject?) -> Decoded<[AdditionalPropertiesClass]> in
|
|
||||||
return Decoders.decode(clazz: [AdditionalPropertiesClass].self, source: source, instance: instance)
|
return Decoders.decode(clazz: [AdditionalPropertiesClass].self, source: source, instance: instance)
|
||||||
}
|
}
|
||||||
// Decoder for AdditionalPropertiesClass
|
// Decoder for AdditionalPropertiesClass
|
||||||
@ -280,7 +279,6 @@ class Decoders {
|
|||||||
|
|
||||||
|
|
||||||
// Decoder for [Animal]
|
// Decoder for [Animal]
|
||||||
Decoders.addDecoder(clazz: [Animal].self) { (source: AnyObject, instance: AnyObject?) -> Decoded<[Animal]> in
|
|
||||||
return Decoders.decode(clazz: [Animal].self, source: source, instance: instance)
|
return Decoders.decode(clazz: [Animal].self, source: source, instance: instance)
|
||||||
}
|
}
|
||||||
// Decoder for Animal
|
// Decoder for Animal
|
||||||
@ -315,7 +313,6 @@ class Decoders {
|
|||||||
|
|
||||||
|
|
||||||
// Decoder for [ApiResponse]
|
// Decoder for [ApiResponse]
|
||||||
Decoders.addDecoder(clazz: [ApiResponse].self) { (source: AnyObject, instance: AnyObject?) -> Decoded<[ApiResponse]> in
|
|
||||||
return Decoders.decode(clazz: [ApiResponse].self, source: source, instance: instance)
|
return Decoders.decode(clazz: [ApiResponse].self, source: source, instance: instance)
|
||||||
}
|
}
|
||||||
// Decoder for ApiResponse
|
// Decoder for ApiResponse
|
||||||
@ -349,7 +346,6 @@ class Decoders {
|
|||||||
|
|
||||||
|
|
||||||
// Decoder for [ArrayOfArrayOfNumberOnly]
|
// Decoder for [ArrayOfArrayOfNumberOnly]
|
||||||
Decoders.addDecoder(clazz: [ArrayOfArrayOfNumberOnly].self) { (source: AnyObject, instance: AnyObject?) -> Decoded<[ArrayOfArrayOfNumberOnly]> in
|
|
||||||
return Decoders.decode(clazz: [ArrayOfArrayOfNumberOnly].self, source: source, instance: instance)
|
return Decoders.decode(clazz: [ArrayOfArrayOfNumberOnly].self, source: source, instance: instance)
|
||||||
}
|
}
|
||||||
// Decoder for ArrayOfArrayOfNumberOnly
|
// Decoder for ArrayOfArrayOfNumberOnly
|
||||||
@ -371,7 +367,6 @@ class Decoders {
|
|||||||
|
|
||||||
|
|
||||||
// Decoder for [ArrayOfNumberOnly]
|
// Decoder for [ArrayOfNumberOnly]
|
||||||
Decoders.addDecoder(clazz: [ArrayOfNumberOnly].self) { (source: AnyObject, instance: AnyObject?) -> Decoded<[ArrayOfNumberOnly]> in
|
|
||||||
return Decoders.decode(clazz: [ArrayOfNumberOnly].self, source: source, instance: instance)
|
return Decoders.decode(clazz: [ArrayOfNumberOnly].self, source: source, instance: instance)
|
||||||
}
|
}
|
||||||
// Decoder for ArrayOfNumberOnly
|
// Decoder for ArrayOfNumberOnly
|
||||||
@ -393,7 +388,6 @@ class Decoders {
|
|||||||
|
|
||||||
|
|
||||||
// Decoder for [ArrayTest]
|
// Decoder for [ArrayTest]
|
||||||
Decoders.addDecoder(clazz: [ArrayTest].self) { (source: AnyObject, instance: AnyObject?) -> Decoded<[ArrayTest]> in
|
|
||||||
return Decoders.decode(clazz: [ArrayTest].self, source: source, instance: instance)
|
return Decoders.decode(clazz: [ArrayTest].self, source: source, instance: instance)
|
||||||
}
|
}
|
||||||
// Decoder for ArrayTest
|
// Decoder for ArrayTest
|
||||||
@ -427,7 +421,6 @@ class Decoders {
|
|||||||
|
|
||||||
|
|
||||||
// Decoder for [Capitalization]
|
// Decoder for [Capitalization]
|
||||||
Decoders.addDecoder(clazz: [Capitalization].self) { (source: AnyObject, instance: AnyObject?) -> Decoded<[Capitalization]> in
|
|
||||||
return Decoders.decode(clazz: [Capitalization].self, source: source, instance: instance)
|
return Decoders.decode(clazz: [Capitalization].self, source: source, instance: instance)
|
||||||
}
|
}
|
||||||
// Decoder for Capitalization
|
// Decoder for Capitalization
|
||||||
@ -479,7 +472,6 @@ class Decoders {
|
|||||||
|
|
||||||
|
|
||||||
// Decoder for [Cat]
|
// Decoder for [Cat]
|
||||||
Decoders.addDecoder(clazz: [Cat].self) { (source: AnyObject, instance: AnyObject?) -> Decoded<[Cat]> in
|
|
||||||
return Decoders.decode(clazz: [Cat].self, source: source, instance: instance)
|
return Decoders.decode(clazz: [Cat].self, source: source, instance: instance)
|
||||||
}
|
}
|
||||||
// Decoder for Cat
|
// Decoder for Cat
|
||||||
@ -516,7 +508,6 @@ class Decoders {
|
|||||||
|
|
||||||
|
|
||||||
// Decoder for [Category]
|
// Decoder for [Category]
|
||||||
Decoders.addDecoder(clazz: [Category].self) { (source: AnyObject, instance: AnyObject?) -> Decoded<[Category]> in
|
|
||||||
return Decoders.decode(clazz: [Category].self, source: source, instance: instance)
|
return Decoders.decode(clazz: [Category].self, source: source, instance: instance)
|
||||||
}
|
}
|
||||||
// Decoder for Category
|
// Decoder for Category
|
||||||
@ -544,7 +535,6 @@ class Decoders {
|
|||||||
|
|
||||||
|
|
||||||
// Decoder for [ClassModel]
|
// Decoder for [ClassModel]
|
||||||
Decoders.addDecoder(clazz: [ClassModel].self) { (source: AnyObject, instance: AnyObject?) -> Decoded<[ClassModel]> in
|
|
||||||
return Decoders.decode(clazz: [ClassModel].self, source: source, instance: instance)
|
return Decoders.decode(clazz: [ClassModel].self, source: source, instance: instance)
|
||||||
}
|
}
|
||||||
// Decoder for ClassModel
|
// Decoder for ClassModel
|
||||||
@ -566,7 +556,6 @@ class Decoders {
|
|||||||
|
|
||||||
|
|
||||||
// Decoder for [Client]
|
// Decoder for [Client]
|
||||||
Decoders.addDecoder(clazz: [Client].self) { (source: AnyObject, instance: AnyObject?) -> Decoded<[Client]> in
|
|
||||||
return Decoders.decode(clazz: [Client].self, source: source, instance: instance)
|
return Decoders.decode(clazz: [Client].self, source: source, instance: instance)
|
||||||
}
|
}
|
||||||
// Decoder for Client
|
// Decoder for Client
|
||||||
@ -588,7 +577,6 @@ class Decoders {
|
|||||||
|
|
||||||
|
|
||||||
// Decoder for [Dog]
|
// Decoder for [Dog]
|
||||||
Decoders.addDecoder(clazz: [Dog].self) { (source: AnyObject, instance: AnyObject?) -> Decoded<[Dog]> in
|
|
||||||
return Decoders.decode(clazz: [Dog].self, source: source, instance: instance)
|
return Decoders.decode(clazz: [Dog].self, source: source, instance: instance)
|
||||||
}
|
}
|
||||||
// Decoder for Dog
|
// Decoder for Dog
|
||||||
@ -625,7 +613,6 @@ class Decoders {
|
|||||||
|
|
||||||
|
|
||||||
// Decoder for [EnumArrays]
|
// Decoder for [EnumArrays]
|
||||||
Decoders.addDecoder(clazz: [EnumArrays].self) { (source: AnyObject, instance: AnyObject?) -> Decoded<[EnumArrays]> in
|
|
||||||
return Decoders.decode(clazz: [EnumArrays].self, source: source, instance: instance)
|
return Decoders.decode(clazz: [EnumArrays].self, source: source, instance: instance)
|
||||||
}
|
}
|
||||||
// Decoder for EnumArrays
|
// Decoder for EnumArrays
|
||||||
@ -653,7 +640,6 @@ class Decoders {
|
|||||||
|
|
||||||
|
|
||||||
// Decoder for [EnumClass]
|
// Decoder for [EnumClass]
|
||||||
Decoders.addDecoder(clazz: [EnumClass].self) { (source: AnyObject, instance: AnyObject?) -> Decoded<[EnumClass]> in
|
|
||||||
return Decoders.decode(clazz: [EnumClass].self, source: source, instance: instance)
|
return Decoders.decode(clazz: [EnumClass].self, source: source, instance: instance)
|
||||||
}
|
}
|
||||||
// Decoder for EnumClass
|
// Decoder for EnumClass
|
||||||
@ -664,7 +650,6 @@ class Decoders {
|
|||||||
|
|
||||||
|
|
||||||
// Decoder for [EnumTest]
|
// Decoder for [EnumTest]
|
||||||
Decoders.addDecoder(clazz: [EnumTest].self) { (source: AnyObject, instance: AnyObject?) -> Decoded<[EnumTest]> in
|
|
||||||
return Decoders.decode(clazz: [EnumTest].self, source: source, instance: instance)
|
return Decoders.decode(clazz: [EnumTest].self, source: source, instance: instance)
|
||||||
}
|
}
|
||||||
// Decoder for EnumTest
|
// Decoder for EnumTest
|
||||||
@ -704,7 +689,6 @@ class Decoders {
|
|||||||
|
|
||||||
|
|
||||||
// Decoder for [FormatTest]
|
// Decoder for [FormatTest]
|
||||||
Decoders.addDecoder(clazz: [FormatTest].self) { (source: AnyObject, instance: AnyObject?) -> Decoded<[FormatTest]> in
|
|
||||||
return Decoders.decode(clazz: [FormatTest].self, source: source, instance: instance)
|
return Decoders.decode(clazz: [FormatTest].self, source: source, instance: instance)
|
||||||
}
|
}
|
||||||
// Decoder for FormatTest
|
// Decoder for FormatTest
|
||||||
@ -798,7 +782,6 @@ class Decoders {
|
|||||||
|
|
||||||
|
|
||||||
// Decoder for [HasOnlyReadOnly]
|
// Decoder for [HasOnlyReadOnly]
|
||||||
Decoders.addDecoder(clazz: [HasOnlyReadOnly].self) { (source: AnyObject, instance: AnyObject?) -> Decoded<[HasOnlyReadOnly]> in
|
|
||||||
return Decoders.decode(clazz: [HasOnlyReadOnly].self, source: source, instance: instance)
|
return Decoders.decode(clazz: [HasOnlyReadOnly].self, source: source, instance: instance)
|
||||||
}
|
}
|
||||||
// Decoder for HasOnlyReadOnly
|
// Decoder for HasOnlyReadOnly
|
||||||
@ -826,7 +809,6 @@ class Decoders {
|
|||||||
|
|
||||||
|
|
||||||
// Decoder for [List]
|
// Decoder for [List]
|
||||||
Decoders.addDecoder(clazz: [List].self) { (source: AnyObject, instance: AnyObject?) -> Decoded<[List]> in
|
|
||||||
return Decoders.decode(clazz: [List].self, source: source, instance: instance)
|
return Decoders.decode(clazz: [List].self, source: source, instance: instance)
|
||||||
}
|
}
|
||||||
// Decoder for List
|
// Decoder for List
|
||||||
@ -848,7 +830,6 @@ class Decoders {
|
|||||||
|
|
||||||
|
|
||||||
// Decoder for [MapTest]
|
// Decoder for [MapTest]
|
||||||
Decoders.addDecoder(clazz: [MapTest].self) { (source: AnyObject, instance: AnyObject?) -> Decoded<[MapTest]> in
|
|
||||||
return Decoders.decode(clazz: [MapTest].self, source: source, instance: instance)
|
return Decoders.decode(clazz: [MapTest].self, source: source, instance: instance)
|
||||||
}
|
}
|
||||||
// Decoder for MapTest
|
// Decoder for MapTest
|
||||||
@ -876,7 +857,6 @@ class Decoders {
|
|||||||
|
|
||||||
|
|
||||||
// Decoder for [MixedPropertiesAndAdditionalPropertiesClass]
|
// Decoder for [MixedPropertiesAndAdditionalPropertiesClass]
|
||||||
Decoders.addDecoder(clazz: [MixedPropertiesAndAdditionalPropertiesClass].self) { (source: AnyObject, instance: AnyObject?) -> Decoded<[MixedPropertiesAndAdditionalPropertiesClass]> in
|
|
||||||
return Decoders.decode(clazz: [MixedPropertiesAndAdditionalPropertiesClass].self, source: source, instance: instance)
|
return Decoders.decode(clazz: [MixedPropertiesAndAdditionalPropertiesClass].self, source: source, instance: instance)
|
||||||
}
|
}
|
||||||
// Decoder for MixedPropertiesAndAdditionalPropertiesClass
|
// Decoder for MixedPropertiesAndAdditionalPropertiesClass
|
||||||
@ -910,7 +890,6 @@ class Decoders {
|
|||||||
|
|
||||||
|
|
||||||
// Decoder for [Model200Response]
|
// Decoder for [Model200Response]
|
||||||
Decoders.addDecoder(clazz: [Model200Response].self) { (source: AnyObject, instance: AnyObject?) -> Decoded<[Model200Response]> in
|
|
||||||
return Decoders.decode(clazz: [Model200Response].self, source: source, instance: instance)
|
return Decoders.decode(clazz: [Model200Response].self, source: source, instance: instance)
|
||||||
}
|
}
|
||||||
// Decoder for Model200Response
|
// Decoder for Model200Response
|
||||||
@ -938,7 +917,6 @@ class Decoders {
|
|||||||
|
|
||||||
|
|
||||||
// Decoder for [Name]
|
// Decoder for [Name]
|
||||||
Decoders.addDecoder(clazz: [Name].self) { (source: AnyObject, instance: AnyObject?) -> Decoded<[Name]> in
|
|
||||||
return Decoders.decode(clazz: [Name].self, source: source, instance: instance)
|
return Decoders.decode(clazz: [Name].self, source: source, instance: instance)
|
||||||
}
|
}
|
||||||
// Decoder for Name
|
// Decoder for Name
|
||||||
@ -978,7 +956,6 @@ class Decoders {
|
|||||||
|
|
||||||
|
|
||||||
// Decoder for [NumberOnly]
|
// Decoder for [NumberOnly]
|
||||||
Decoders.addDecoder(clazz: [NumberOnly].self) { (source: AnyObject, instance: AnyObject?) -> Decoded<[NumberOnly]> in
|
|
||||||
return Decoders.decode(clazz: [NumberOnly].self, source: source, instance: instance)
|
return Decoders.decode(clazz: [NumberOnly].self, source: source, instance: instance)
|
||||||
}
|
}
|
||||||
// Decoder for NumberOnly
|
// Decoder for NumberOnly
|
||||||
@ -1000,7 +977,6 @@ class Decoders {
|
|||||||
|
|
||||||
|
|
||||||
// Decoder for [Order]
|
// Decoder for [Order]
|
||||||
Decoders.addDecoder(clazz: [Order].self) { (source: AnyObject, instance: AnyObject?) -> Decoded<[Order]> in
|
|
||||||
return Decoders.decode(clazz: [Order].self, source: source, instance: instance)
|
return Decoders.decode(clazz: [Order].self, source: source, instance: instance)
|
||||||
}
|
}
|
||||||
// Decoder for Order
|
// Decoder for Order
|
||||||
@ -1052,7 +1028,6 @@ class Decoders {
|
|||||||
|
|
||||||
|
|
||||||
// Decoder for [OuterEnum]
|
// Decoder for [OuterEnum]
|
||||||
Decoders.addDecoder(clazz: [OuterEnum].self) { (source: AnyObject, instance: AnyObject?) -> Decoded<[OuterEnum]> in
|
|
||||||
return Decoders.decode(clazz: [OuterEnum].self, source: source, instance: instance)
|
return Decoders.decode(clazz: [OuterEnum].self, source: source, instance: instance)
|
||||||
}
|
}
|
||||||
// Decoder for OuterEnum
|
// Decoder for OuterEnum
|
||||||
@ -1063,7 +1038,6 @@ class Decoders {
|
|||||||
|
|
||||||
|
|
||||||
// Decoder for [Pet]
|
// Decoder for [Pet]
|
||||||
Decoders.addDecoder(clazz: [Pet].self) { (source: AnyObject, instance: AnyObject?) -> Decoded<[Pet]> in
|
|
||||||
return Decoders.decode(clazz: [Pet].self, source: source, instance: instance)
|
return Decoders.decode(clazz: [Pet].self, source: source, instance: instance)
|
||||||
}
|
}
|
||||||
// Decoder for Pet
|
// Decoder for Pet
|
||||||
@ -1115,7 +1089,6 @@ class Decoders {
|
|||||||
|
|
||||||
|
|
||||||
// Decoder for [ReadOnlyFirst]
|
// Decoder for [ReadOnlyFirst]
|
||||||
Decoders.addDecoder(clazz: [ReadOnlyFirst].self) { (source: AnyObject, instance: AnyObject?) -> Decoded<[ReadOnlyFirst]> in
|
|
||||||
return Decoders.decode(clazz: [ReadOnlyFirst].self, source: source, instance: instance)
|
return Decoders.decode(clazz: [ReadOnlyFirst].self, source: source, instance: instance)
|
||||||
}
|
}
|
||||||
// Decoder for ReadOnlyFirst
|
// Decoder for ReadOnlyFirst
|
||||||
@ -1143,7 +1116,6 @@ class Decoders {
|
|||||||
|
|
||||||
|
|
||||||
// Decoder for [Return]
|
// Decoder for [Return]
|
||||||
Decoders.addDecoder(clazz: [Return].self) { (source: AnyObject, instance: AnyObject?) -> Decoded<[Return]> in
|
|
||||||
return Decoders.decode(clazz: [Return].self, source: source, instance: instance)
|
return Decoders.decode(clazz: [Return].self, source: source, instance: instance)
|
||||||
}
|
}
|
||||||
// Decoder for Return
|
// Decoder for Return
|
||||||
@ -1165,7 +1137,6 @@ class Decoders {
|
|||||||
|
|
||||||
|
|
||||||
// Decoder for [SpecialModelName]
|
// Decoder for [SpecialModelName]
|
||||||
Decoders.addDecoder(clazz: [SpecialModelName].self) { (source: AnyObject, instance: AnyObject?) -> Decoded<[SpecialModelName]> in
|
|
||||||
return Decoders.decode(clazz: [SpecialModelName].self, source: source, instance: instance)
|
return Decoders.decode(clazz: [SpecialModelName].self, source: source, instance: instance)
|
||||||
}
|
}
|
||||||
// Decoder for SpecialModelName
|
// Decoder for SpecialModelName
|
||||||
@ -1187,7 +1158,6 @@ class Decoders {
|
|||||||
|
|
||||||
|
|
||||||
// Decoder for [Tag]
|
// Decoder for [Tag]
|
||||||
Decoders.addDecoder(clazz: [Tag].self) { (source: AnyObject, instance: AnyObject?) -> Decoded<[Tag]> in
|
|
||||||
return Decoders.decode(clazz: [Tag].self, source: source, instance: instance)
|
return Decoders.decode(clazz: [Tag].self, source: source, instance: instance)
|
||||||
}
|
}
|
||||||
// Decoder for Tag
|
// Decoder for Tag
|
||||||
@ -1215,7 +1185,6 @@ class Decoders {
|
|||||||
|
|
||||||
|
|
||||||
// Decoder for [User]
|
// Decoder for [User]
|
||||||
Decoders.addDecoder(clazz: [User].self) { (source: AnyObject, instance: AnyObject?) -> Decoded<[User]> in
|
|
||||||
return Decoders.decode(clazz: [User].self, source: source, instance: instance)
|
return Decoders.decode(clazz: [User].self, source: source, instance: instance)
|
||||||
}
|
}
|
||||||
// Decoder for User
|
// Decoder for User
|
||||||
|
@ -16,6 +16,7 @@ import org.springframework.web.bind.annotation.RequestMethod;
|
|||||||
import org.springframework.web.bind.annotation.RequestParam;
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
import org.springframework.web.bind.annotation.RequestPart;
|
import org.springframework.web.bind.annotation.RequestPart;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
import java.io.IOException;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.concurrent.CompletableFuture;
|
import java.util.concurrent.CompletableFuture;
|
||||||
@ -28,12 +29,11 @@ public interface FakeApi {
|
|||||||
@ApiOperation(value = "To test \"client\" model", notes = "To test \"client\" model", response = Client.class, tags={ "fake", })
|
@ApiOperation(value = "To test \"client\" model", notes = "To test \"client\" model", response = Client.class, tags={ "fake", })
|
||||||
@ApiResponses(value = {
|
@ApiResponses(value = {
|
||||||
@ApiResponse(code = 200, message = "successful operation", response = Client.class) })
|
@ApiResponse(code = 200, message = "successful operation", response = Client.class) })
|
||||||
|
|
||||||
@RequestMapping(value = "/fake",
|
@RequestMapping(value = "/fake",
|
||||||
produces = { "application/json" },
|
produces = { "application/json" },
|
||||||
consumes = { "application/json" },
|
consumes = { "application/json" },
|
||||||
method = RequestMethod.PATCH)
|
method = RequestMethod.PATCH)
|
||||||
default CompletableFuture<ResponseEntity<Client>> testClientModel(@ApiParam(value = "client model" ,required=true ) @Valid @RequestBody Client body) {
|
default CompletableFuture<ResponseEntity<Client>> testClientModel(@ApiParam(value = "client model" ,required=true ) @Valid @RequestBody Client body, @RequestHeader("Accept") String accept) throws IOException {
|
||||||
// do some magic!
|
// do some magic!
|
||||||
return CompletableFuture.completedFuture(new ResponseEntity<Client>(HttpStatus.OK));
|
return CompletableFuture.completedFuture(new ResponseEntity<Client>(HttpStatus.OK));
|
||||||
}
|
}
|
||||||
@ -45,12 +45,11 @@ public interface FakeApi {
|
|||||||
@ApiResponses(value = {
|
@ApiResponses(value = {
|
||||||
@ApiResponse(code = 400, message = "Invalid username supplied", response = Void.class),
|
@ApiResponse(code = 400, message = "Invalid username supplied", response = Void.class),
|
||||||
@ApiResponse(code = 404, message = "User not found", response = Void.class) })
|
@ApiResponse(code = 404, message = "User not found", response = Void.class) })
|
||||||
|
|
||||||
@RequestMapping(value = "/fake",
|
@RequestMapping(value = "/fake",
|
||||||
produces = { "application/xml; charset=utf-8", "application/json; charset=utf-8" },
|
produces = { "application/xml; charset=utf-8", "application/json; charset=utf-8" },
|
||||||
consumes = { "application/xml; charset=utf-8", "application/json; charset=utf-8" },
|
consumes = { "application/xml; charset=utf-8", "application/json; charset=utf-8" },
|
||||||
method = RequestMethod.POST)
|
method = RequestMethod.POST)
|
||||||
default CompletableFuture<ResponseEntity<Void>> testEndpointParameters(@ApiParam(value = "None", required=true) @RequestPart(value="number", required=true) BigDecimal number,@ApiParam(value = "None", required=true) @RequestPart(value="double", required=true) Double _double,@ApiParam(value = "None", required=true) @RequestPart(value="pattern_without_delimiter", required=true) String patternWithoutDelimiter,@ApiParam(value = "None", required=true) @RequestPart(value="byte", required=true) byte[] _byte,@ApiParam(value = "None") @RequestPart(value="integer", required=false) Integer integer,@ApiParam(value = "None") @RequestPart(value="int32", required=false) Integer int32,@ApiParam(value = "None") @RequestPart(value="int64", required=false) Long int64,@ApiParam(value = "None") @RequestPart(value="float", required=false) Float _float,@ApiParam(value = "None") @RequestPart(value="string", required=false) String string,@ApiParam(value = "None") @RequestPart(value="binary", required=false) byte[] binary,@ApiParam(value = "None") @RequestPart(value="date", required=false) LocalDate date,@ApiParam(value = "None") @RequestPart(value="dateTime", required=false) OffsetDateTime dateTime,@ApiParam(value = "None") @RequestPart(value="password", required=false) String password,@ApiParam(value = "None") @RequestPart(value="callback", required=false) String paramCallback) {
|
default CompletableFuture<ResponseEntity<Void>> testEndpointParameters(@ApiParam(value = "None", required=true) @RequestPart(value="number", required=true) BigDecimal number,@ApiParam(value = "None", required=true) @RequestPart(value="double", required=true) Double _double,@ApiParam(value = "None", required=true) @RequestPart(value="pattern_without_delimiter", required=true) String patternWithoutDelimiter,@ApiParam(value = "None", required=true) @RequestPart(value="byte", required=true) byte[] _byte,@ApiParam(value = "None") @RequestPart(value="integer", required=false) Integer integer,@ApiParam(value = "None") @RequestPart(value="int32", required=false) Integer int32,@ApiParam(value = "None") @RequestPart(value="int64", required=false) Long int64,@ApiParam(value = "None") @RequestPart(value="float", required=false) Float _float,@ApiParam(value = "None") @RequestPart(value="string", required=false) String string,@ApiParam(value = "None") @RequestPart(value="binary", required=false) byte[] binary,@ApiParam(value = "None") @RequestPart(value="date", required=false) LocalDate date,@ApiParam(value = "None") @RequestPart(value="dateTime", required=false) OffsetDateTime dateTime,@ApiParam(value = "None") @RequestPart(value="password", required=false) String password,@ApiParam(value = "None") @RequestPart(value="callback", required=false) String paramCallback, @RequestHeader("Accept") String accept) {
|
||||||
// do some magic!
|
// do some magic!
|
||||||
return CompletableFuture.completedFuture(new ResponseEntity<Void>(HttpStatus.OK));
|
return CompletableFuture.completedFuture(new ResponseEntity<Void>(HttpStatus.OK));
|
||||||
}
|
}
|
||||||
@ -60,12 +59,11 @@ public interface FakeApi {
|
|||||||
@ApiResponses(value = {
|
@ApiResponses(value = {
|
||||||
@ApiResponse(code = 400, message = "Invalid request", response = Void.class),
|
@ApiResponse(code = 400, message = "Invalid request", response = Void.class),
|
||||||
@ApiResponse(code = 404, message = "Not found", response = Void.class) })
|
@ApiResponse(code = 404, message = "Not found", response = Void.class) })
|
||||||
|
|
||||||
@RequestMapping(value = "/fake",
|
@RequestMapping(value = "/fake",
|
||||||
produces = { "*/*" },
|
produces = { "*/*" },
|
||||||
consumes = { "*/*" },
|
consumes = { "*/*" },
|
||||||
method = RequestMethod.GET)
|
method = RequestMethod.GET)
|
||||||
default CompletableFuture<ResponseEntity<Void>> testEnumParameters(@ApiParam(value = "Form parameter enum test (string array)", allowableValues=">, $") @RequestPart(value="enum_form_string_array", required=false) List<String> enumFormStringArray,@ApiParam(value = "Form parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue="-efg") @RequestPart(value="enum_form_string", required=false) String enumFormString,@ApiParam(value = "Header parameter enum test (string array)" , allowableValues=">, $") @RequestHeader(value="enum_header_string_array", required=false) List<String> enumHeaderStringArray,@ApiParam(value = "Header parameter enum test (string)" , allowableValues="_abc, -efg, (xyz)", defaultValue="-efg") @RequestHeader(value="enum_header_string", required=false) String enumHeaderString, @ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @RequestParam(value = "enum_query_string_array", required = false) List<String> enumQueryStringArray, @ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestParam(value = "enum_query_string", required = false, defaultValue="-efg") String enumQueryString, @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger,@ApiParam(value = "Query parameter enum test (double)", allowableValues="1.1, -1.2") @RequestPart(value="enum_query_double", required=false) Double enumQueryDouble) {
|
default CompletableFuture<ResponseEntity<Void>> testEnumParameters(@ApiParam(value = "Form parameter enum test (string array)", allowableValues=">, $") @RequestPart(value="enum_form_string_array", required=false) List<String> enumFormStringArray,@ApiParam(value = "Form parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue="-efg") @RequestPart(value="enum_form_string", required=false) String enumFormString,@ApiParam(value = "Header parameter enum test (string array)" , allowableValues=">, $") @RequestHeader(value="enum_header_string_array", required=false) List<String> enumHeaderStringArray,@ApiParam(value = "Header parameter enum test (string)" , allowableValues="_abc, -efg, (xyz)", defaultValue="-efg") @RequestHeader(value="enum_header_string", required=false) String enumHeaderString, @ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @RequestParam(value = "enum_query_string_array", required = false) List<String> enumQueryStringArray, @ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestParam(value = "enum_query_string", required = false, defaultValue="-efg") String enumQueryString, @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger,@ApiParam(value = "Query parameter enum test (double)", allowableValues="1.1, -1.2") @RequestPart(value="enum_query_double", required=false) Double enumQueryDouble, @RequestHeader("Accept") String accept) {
|
||||||
// do some magic!
|
// do some magic!
|
||||||
return CompletableFuture.completedFuture(new ResponseEntity<Void>(HttpStatus.OK));
|
return CompletableFuture.completedFuture(new ResponseEntity<Void>(HttpStatus.OK));
|
||||||
}
|
}
|
||||||
|
@ -7,7 +7,4 @@ import javax.validation.Valid;
|
|||||||
|
|
||||||
@Controller
|
@Controller
|
||||||
public class FakeApiController implements FakeApi {
|
public class FakeApiController implements FakeApi {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
package io.swagger.api;
|
package io.swagger.api;
|
||||||
|
|
||||||
import java.io.File;
|
|
||||||
import io.swagger.model.ModelApiResponse;
|
import io.swagger.model.ModelApiResponse;
|
||||||
import io.swagger.model.Pet;
|
import io.swagger.model.Pet;
|
||||||
|
import org.springframework.core.io.Resource;
|
||||||
|
|
||||||
import io.swagger.annotations.*;
|
import io.swagger.annotations.*;
|
||||||
import org.springframework.http.HttpStatus;
|
import org.springframework.http.HttpStatus;
|
||||||
@ -15,6 +15,7 @@ import org.springframework.web.bind.annotation.RequestMethod;
|
|||||||
import org.springframework.web.bind.annotation.RequestParam;
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
import org.springframework.web.bind.annotation.RequestPart;
|
import org.springframework.web.bind.annotation.RequestPart;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
import java.io.IOException;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.concurrent.CompletableFuture;
|
import java.util.concurrent.CompletableFuture;
|
||||||
@ -32,12 +33,11 @@ public interface PetApi {
|
|||||||
}, tags={ "pet", })
|
}, tags={ "pet", })
|
||||||
@ApiResponses(value = {
|
@ApiResponses(value = {
|
||||||
@ApiResponse(code = 405, message = "Invalid input", response = Void.class) })
|
@ApiResponse(code = 405, message = "Invalid input", response = Void.class) })
|
||||||
|
|
||||||
@RequestMapping(value = "/pet",
|
@RequestMapping(value = "/pet",
|
||||||
produces = { "application/xml", "application/json" },
|
produces = { "application/xml", "application/json" },
|
||||||
consumes = { "application/json", "application/xml" },
|
consumes = { "application/json", "application/xml" },
|
||||||
method = RequestMethod.POST)
|
method = RequestMethod.POST)
|
||||||
default CompletableFuture<ResponseEntity<Void>> addPet(@ApiParam(value = "Pet object that needs to be added to the store" ,required=true ) @Valid @RequestBody Pet body) {
|
default CompletableFuture<ResponseEntity<Void>> addPet(@ApiParam(value = "Pet object that needs to be added to the store" ,required=true ) @Valid @RequestBody Pet body, @RequestHeader("Accept") String accept) {
|
||||||
// do some magic!
|
// do some magic!
|
||||||
return CompletableFuture.completedFuture(new ResponseEntity<Void>(HttpStatus.OK));
|
return CompletableFuture.completedFuture(new ResponseEntity<Void>(HttpStatus.OK));
|
||||||
}
|
}
|
||||||
@ -51,11 +51,10 @@ public interface PetApi {
|
|||||||
}, tags={ "pet", })
|
}, tags={ "pet", })
|
||||||
@ApiResponses(value = {
|
@ApiResponses(value = {
|
||||||
@ApiResponse(code = 400, message = "Invalid pet value", response = Void.class) })
|
@ApiResponse(code = 400, message = "Invalid pet value", response = Void.class) })
|
||||||
|
|
||||||
@RequestMapping(value = "/pet/{petId}",
|
@RequestMapping(value = "/pet/{petId}",
|
||||||
produces = { "application/xml", "application/json" },
|
produces = { "application/xml", "application/json" },
|
||||||
method = RequestMethod.DELETE)
|
method = RequestMethod.DELETE)
|
||||||
default CompletableFuture<ResponseEntity<Void>> deletePet(@ApiParam(value = "Pet id to delete",required=true ) @PathVariable("petId") Long petId,@ApiParam(value = "" ) @RequestHeader(value="api_key", required=false) String apiKey) {
|
default CompletableFuture<ResponseEntity<Void>> deletePet(@ApiParam(value = "Pet id to delete",required=true ) @PathVariable("petId") Long petId,@ApiParam(value = "" ) @RequestHeader(value="api_key", required=false) String apiKey, @RequestHeader("Accept") String accept) {
|
||||||
// do some magic!
|
// do some magic!
|
||||||
return CompletableFuture.completedFuture(new ResponseEntity<Void>(HttpStatus.OK));
|
return CompletableFuture.completedFuture(new ResponseEntity<Void>(HttpStatus.OK));
|
||||||
}
|
}
|
||||||
@ -70,11 +69,10 @@ public interface PetApi {
|
|||||||
@ApiResponses(value = {
|
@ApiResponses(value = {
|
||||||
@ApiResponse(code = 200, message = "successful operation", response = Pet.class),
|
@ApiResponse(code = 200, message = "successful operation", response = Pet.class),
|
||||||
@ApiResponse(code = 400, message = "Invalid status value", response = Pet.class) })
|
@ApiResponse(code = 400, message = "Invalid status value", response = Pet.class) })
|
||||||
|
|
||||||
@RequestMapping(value = "/pet/findByStatus",
|
@RequestMapping(value = "/pet/findByStatus",
|
||||||
produces = { "application/xml", "application/json" },
|
produces = { "application/xml", "application/json" },
|
||||||
method = RequestMethod.GET)
|
method = RequestMethod.GET)
|
||||||
default CompletableFuture<ResponseEntity<List<Pet>>> findPetsByStatus( @NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @RequestParam(value = "status", required = true) List<String> status) {
|
default CompletableFuture<ResponseEntity<List<Pet>>> findPetsByStatus( @NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @RequestParam(value = "status", required = true) List<String> status, @RequestHeader("Accept") String accept) throws IOException {
|
||||||
// do some magic!
|
// do some magic!
|
||||||
return CompletableFuture.completedFuture(new ResponseEntity<List<Pet>>(HttpStatus.OK));
|
return CompletableFuture.completedFuture(new ResponseEntity<List<Pet>>(HttpStatus.OK));
|
||||||
}
|
}
|
||||||
@ -89,11 +87,10 @@ public interface PetApi {
|
|||||||
@ApiResponses(value = {
|
@ApiResponses(value = {
|
||||||
@ApiResponse(code = 200, message = "successful operation", response = Pet.class),
|
@ApiResponse(code = 200, message = "successful operation", response = Pet.class),
|
||||||
@ApiResponse(code = 400, message = "Invalid tag value", response = Pet.class) })
|
@ApiResponse(code = 400, message = "Invalid tag value", response = Pet.class) })
|
||||||
|
|
||||||
@RequestMapping(value = "/pet/findByTags",
|
@RequestMapping(value = "/pet/findByTags",
|
||||||
produces = { "application/xml", "application/json" },
|
produces = { "application/xml", "application/json" },
|
||||||
method = RequestMethod.GET)
|
method = RequestMethod.GET)
|
||||||
default CompletableFuture<ResponseEntity<List<Pet>>> findPetsByTags( @NotNull @ApiParam(value = "Tags to filter by", required = true) @RequestParam(value = "tags", required = true) List<String> tags) {
|
default CompletableFuture<ResponseEntity<List<Pet>>> findPetsByTags( @NotNull @ApiParam(value = "Tags to filter by", required = true) @RequestParam(value = "tags", required = true) List<String> tags, @RequestHeader("Accept") String accept) throws IOException {
|
||||||
// do some magic!
|
// do some magic!
|
||||||
return CompletableFuture.completedFuture(new ResponseEntity<List<Pet>>(HttpStatus.OK));
|
return CompletableFuture.completedFuture(new ResponseEntity<List<Pet>>(HttpStatus.OK));
|
||||||
}
|
}
|
||||||
@ -106,11 +103,10 @@ public interface PetApi {
|
|||||||
@ApiResponse(code = 200, message = "successful operation", response = Pet.class),
|
@ApiResponse(code = 200, message = "successful operation", response = Pet.class),
|
||||||
@ApiResponse(code = 400, message = "Invalid ID supplied", response = Pet.class),
|
@ApiResponse(code = 400, message = "Invalid ID supplied", response = Pet.class),
|
||||||
@ApiResponse(code = 404, message = "Pet not found", response = Pet.class) })
|
@ApiResponse(code = 404, message = "Pet not found", response = Pet.class) })
|
||||||
|
|
||||||
@RequestMapping(value = "/pet/{petId}",
|
@RequestMapping(value = "/pet/{petId}",
|
||||||
produces = { "application/xml", "application/json" },
|
produces = { "application/xml", "application/json" },
|
||||||
method = RequestMethod.GET)
|
method = RequestMethod.GET)
|
||||||
default CompletableFuture<ResponseEntity<Pet>> getPetById(@ApiParam(value = "ID of pet to return",required=true ) @PathVariable("petId") Long petId) {
|
default CompletableFuture<ResponseEntity<Pet>> getPetById(@ApiParam(value = "ID of pet to return",required=true ) @PathVariable("petId") Long petId, @RequestHeader("Accept") String accept) throws IOException {
|
||||||
// do some magic!
|
// do some magic!
|
||||||
return CompletableFuture.completedFuture(new ResponseEntity<Pet>(HttpStatus.OK));
|
return CompletableFuture.completedFuture(new ResponseEntity<Pet>(HttpStatus.OK));
|
||||||
}
|
}
|
||||||
@ -126,12 +122,11 @@ public interface PetApi {
|
|||||||
@ApiResponse(code = 400, message = "Invalid ID supplied", response = Void.class),
|
@ApiResponse(code = 400, message = "Invalid ID supplied", response = Void.class),
|
||||||
@ApiResponse(code = 404, message = "Pet not found", response = Void.class),
|
@ApiResponse(code = 404, message = "Pet not found", response = Void.class),
|
||||||
@ApiResponse(code = 405, message = "Validation exception", response = Void.class) })
|
@ApiResponse(code = 405, message = "Validation exception", response = Void.class) })
|
||||||
|
|
||||||
@RequestMapping(value = "/pet",
|
@RequestMapping(value = "/pet",
|
||||||
produces = { "application/xml", "application/json" },
|
produces = { "application/xml", "application/json" },
|
||||||
consumes = { "application/json", "application/xml" },
|
consumes = { "application/json", "application/xml" },
|
||||||
method = RequestMethod.PUT)
|
method = RequestMethod.PUT)
|
||||||
default CompletableFuture<ResponseEntity<Void>> updatePet(@ApiParam(value = "Pet object that needs to be added to the store" ,required=true ) @Valid @RequestBody Pet body) {
|
default CompletableFuture<ResponseEntity<Void>> updatePet(@ApiParam(value = "Pet object that needs to be added to the store" ,required=true ) @Valid @RequestBody Pet body, @RequestHeader("Accept") String accept) {
|
||||||
// do some magic!
|
// do some magic!
|
||||||
return CompletableFuture.completedFuture(new ResponseEntity<Void>(HttpStatus.OK));
|
return CompletableFuture.completedFuture(new ResponseEntity<Void>(HttpStatus.OK));
|
||||||
}
|
}
|
||||||
@ -145,12 +140,11 @@ public interface PetApi {
|
|||||||
}, tags={ "pet", })
|
}, tags={ "pet", })
|
||||||
@ApiResponses(value = {
|
@ApiResponses(value = {
|
||||||
@ApiResponse(code = 405, message = "Invalid input", response = Void.class) })
|
@ApiResponse(code = 405, message = "Invalid input", response = Void.class) })
|
||||||
|
|
||||||
@RequestMapping(value = "/pet/{petId}",
|
@RequestMapping(value = "/pet/{petId}",
|
||||||
produces = { "application/xml", "application/json" },
|
produces = { "application/xml", "application/json" },
|
||||||
consumes = { "application/x-www-form-urlencoded" },
|
consumes = { "application/x-www-form-urlencoded" },
|
||||||
method = RequestMethod.POST)
|
method = RequestMethod.POST)
|
||||||
default CompletableFuture<ResponseEntity<Void>> updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated",required=true ) @PathVariable("petId") Long petId,@ApiParam(value = "Updated name of the pet") @RequestPart(value="name", required=false) String name,@ApiParam(value = "Updated status of the pet") @RequestPart(value="status", required=false) String status) {
|
default CompletableFuture<ResponseEntity<Void>> updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated",required=true ) @PathVariable("petId") Long petId,@ApiParam(value = "Updated name of the pet") @RequestPart(value="name", required=false) String name,@ApiParam(value = "Updated status of the pet") @RequestPart(value="status", required=false) String status, @RequestHeader("Accept") String accept) {
|
||||||
// do some magic!
|
// do some magic!
|
||||||
return CompletableFuture.completedFuture(new ResponseEntity<Void>(HttpStatus.OK));
|
return CompletableFuture.completedFuture(new ResponseEntity<Void>(HttpStatus.OK));
|
||||||
}
|
}
|
||||||
@ -164,12 +158,11 @@ public interface PetApi {
|
|||||||
}, tags={ "pet", })
|
}, tags={ "pet", })
|
||||||
@ApiResponses(value = {
|
@ApiResponses(value = {
|
||||||
@ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) })
|
@ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) })
|
||||||
|
|
||||||
@RequestMapping(value = "/pet/{petId}/uploadImage",
|
@RequestMapping(value = "/pet/{petId}/uploadImage",
|
||||||
produces = { "application/json" },
|
produces = { "application/json" },
|
||||||
consumes = { "multipart/form-data" },
|
consumes = { "multipart/form-data" },
|
||||||
method = RequestMethod.POST)
|
method = RequestMethod.POST)
|
||||||
default CompletableFuture<ResponseEntity<ModelApiResponse>> uploadFile(@ApiParam(value = "ID of pet to update",required=true ) @PathVariable("petId") Long petId,@ApiParam(value = "Additional data to pass to server") @RequestPart(value="additionalMetadata", required=false) String additionalMetadata,@ApiParam(value = "file detail") @RequestPart("file") MultipartFile file) {
|
default CompletableFuture<ResponseEntity<ModelApiResponse>> uploadFile(@ApiParam(value = "ID of pet to update",required=true ) @PathVariable("petId") Long petId,@ApiParam(value = "Additional data to pass to server") @RequestPart(value="additionalMetadata", required=false) String additionalMetadata,@ApiParam(value = "file detail") @RequestPart("file") MultipartFile file, @RequestHeader("Accept") String accept) throws IOException {
|
||||||
// do some magic!
|
// do some magic!
|
||||||
return CompletableFuture.completedFuture(new ResponseEntity<ModelApiResponse>(HttpStatus.OK));
|
return CompletableFuture.completedFuture(new ResponseEntity<ModelApiResponse>(HttpStatus.OK));
|
||||||
}
|
}
|
||||||
|
@ -7,7 +7,4 @@ import javax.validation.Valid;
|
|||||||
|
|
||||||
@Controller
|
@Controller
|
||||||
public class PetApiController implements PetApi {
|
public class PetApiController implements PetApi {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
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