mirror of
https://github.com/valitydev/openapi-generator.git
synced 2024-11-07 02:55:19 +00:00
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)
|
||||
- [StyleRecipe](http://stylerecipe.co.jp)
|
||||
- [Svenska Spel AB](https://www.svenskaspel.se/)
|
||||
- [Switch Database](https://www.switchdatabase.com/)
|
||||
- [TaskData](http://www.taskdata.com/)
|
||||
- [ThoughtWorks](https://www.thoughtworks.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/)
|
||||
- [Webever GmbH](https://www.webever.de/)
|
||||
- [WEXO A/S](https://www.wexo.dk/)
|
||||
- [XSky](http://www.xsky.com/)
|
||||
- [Zalando](https://tech.zalando.com)
|
||||
- [ZEEF.com](https://zeef.com/)
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
{
|
||||
"artifactId": "spring-boot-beanvalidation",
|
||||
"library": "spring-boot",
|
||||
"useBeanValidation": true
|
||||
}
|
||||
|
@ -27,6 +27,7 @@ public class JavaClientCodegen extends AbstractJavaCodegen
|
||||
public static final String DO_NOT_USE_RX = "doNotUseRx";
|
||||
public static final String USE_PLAY24_WS = "usePlay24WS";
|
||||
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_2 = "retrofit2";
|
||||
@ -40,6 +41,7 @@ public class JavaClientCodegen extends AbstractJavaCodegen
|
||||
protected boolean useBeanValidation = false;
|
||||
protected boolean performBeanValidation = false;
|
||||
protected boolean useGzipFeature = false;
|
||||
protected boolean useRuntimeException = false;
|
||||
|
||||
public JavaClientCodegen() {
|
||||
super();
|
||||
@ -58,6 +60,7 @@ public class JavaClientCodegen extends AbstractJavaCodegen
|
||||
cliOptions.add(CliOption.newBoolean(USE_BEANVALIDATION, "Use BeanValidation API annotations"));
|
||||
cliOptions.add(CliOption.newBoolean(PERFORM_BEANVALIDATION, "Perform BeanValidation"));
|
||||
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("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));
|
||||
}
|
||||
|
||||
if (additionalProperties.containsKey(USE_RUNTIME_EXCEPTION)) {
|
||||
this.setUseRuntimeException(convertPropertyToBooleanAndWriteBack(USE_RUNTIME_EXCEPTION));
|
||||
}
|
||||
|
||||
final String invokerFolder = (sourceFolder + '/' + invokerPackage).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
|
||||
* otherwise preserves original consumes definition order.
|
||||
* [application/vnd...+json,... application/json, ..as is..]
|
||||
*
|
||||
* Prioritizes consumes mime-type list by moving json-vendor and json mime-types up front, but
|
||||
* otherwise preserves original consumes definition order.
|
||||
* [application/vnd...+json,... application/json, ..as is..]
|
||||
*
|
||||
* @param consumes consumes mime-type list
|
||||
* @return
|
||||
* @return
|
||||
*/
|
||||
static List<Map<String, String>> prioritizeContentTypes(List<Map<String, String>> consumes) {
|
||||
if ( consumes.size() <= 1 )
|
||||
return consumes;
|
||||
|
||||
|
||||
List<Map<String, String>> prioritizedContentTypes = new ArrayList<>(consumes.size());
|
||||
|
||||
|
||||
List<Map<String, String>> jsonVendorMimeTypes = new ArrayList<>(consumes.size());
|
||||
List<Map<String, String>> jsonMimeTypes = new ArrayList<>(consumes.size());
|
||||
|
||||
|
||||
for ( Map<String, String> consume : consumes) {
|
||||
if ( isJsonVendorMimeType(consume.get(MEDIA_TYPE))) {
|
||||
jsonVendorMimeTypes.add(consume);
|
||||
@ -320,18 +327,18 @@ public class JavaClientCodegen extends AbstractJavaCodegen
|
||||
}
|
||||
else
|
||||
prioritizedContentTypes.add(consume);
|
||||
|
||||
|
||||
consume.put("hasMore", "true");
|
||||
}
|
||||
|
||||
|
||||
prioritizedContentTypes.addAll(0, jsonMimeTypes);
|
||||
prioritizedContentTypes.addAll(0, jsonVendorMimeTypes);
|
||||
|
||||
|
||||
prioritizedContentTypes.get(prioritizedContentTypes.size()-1).put("hasMore", null);
|
||||
|
||||
|
||||
return prioritizedContentTypes;
|
||||
}
|
||||
|
||||
|
||||
private static boolean isMultipartType(List<Map<String, String>> consumes) {
|
||||
Map<String, String> firstType = consumes.get(0);
|
||||
if (firstType != null) {
|
||||
@ -419,8 +426,12 @@ public class JavaClientCodegen extends AbstractJavaCodegen
|
||||
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_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.
|
||||
|
@ -673,6 +673,11 @@ public class PhpClientCodegen extends DefaultCodegen implements CodegenConfig {
|
||||
return varName;
|
||||
}
|
||||
|
||||
// for symbol, e.g. $, #
|
||||
if (getSymbolName(name) != null) {
|
||||
return getSymbolName(name).toUpperCase();
|
||||
}
|
||||
|
||||
// string
|
||||
String enumName = sanitizeName(underscore(name).toUpperCase());
|
||||
enumName = enumName.replaceFirst("^_", "");
|
||||
|
@ -196,6 +196,13 @@ public class PythonClientCodegen extends DefaultCodegen implements CodegenConfig
|
||||
return str.replaceAll("\\.", "_");
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public Map<String, Object> postProcessModels(Map<String, Object> objs) {
|
||||
// process enum in models
|
||||
return postProcessModelsEnum(objs);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void postProcessParameter(CodegenParameter parameter){
|
||||
postProcessPattern(parameter.pattern, parameter.vendorExtensions);
|
||||
|
@ -1,5 +1,7 @@
|
||||
package io.swagger.codegen.languages;
|
||||
|
||||
import com.samskivert.mustache.Mustache;
|
||||
import com.samskivert.mustache.Template;
|
||||
import io.swagger.codegen.*;
|
||||
import io.swagger.codegen.languages.features.BeanValidationFeatures;
|
||||
import io.swagger.models.Operation;
|
||||
@ -7,7 +9,12 @@ import io.swagger.models.Path;
|
||||
import io.swagger.models.Swagger;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.io.Writer;
|
||||
import java.util.*;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
|
||||
public class SpringCodegen extends AbstractJavaCodegen implements BeanValidationFeatures {
|
||||
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()));
|
||||
}
|
||||
|
||||
typeMapping.put("file", "Resource");
|
||||
importMapping.put("Resource", "org.springframework.core.io.Resource");
|
||||
|
||||
supportingFiles.add(new SupportingFile("pom.mustache", "", "pom.xml"));
|
||||
supportingFiles.add(new SupportingFile("README.mustache", "", "README.md"));
|
||||
|
||||
@ -287,6 +297,19 @@ public class SpringCodegen extends AbstractJavaCodegen implements BeanValidation
|
||||
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
|
||||
@ -470,6 +493,32 @@ public class SpringCodegen extends AbstractJavaCodegen implements BeanValidation
|
||||
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) {
|
||||
this.title = title;
|
||||
}
|
||||
|
@ -6,7 +6,7 @@ import java.util.Map;
|
||||
import java.util.List;
|
||||
|
||||
{{>generatedAnnotation}}
|
||||
public class ApiException extends Exception {
|
||||
public class ApiException extends{{#useRuntimeException}} RuntimeException {{/useRuntimeException}}{{^useRuntimeException}} Exception {{/useRuntimeException}}{
|
||||
private int code = 0;
|
||||
private Map<String, List<String>> responseHeaders = null;
|
||||
private String responseBody = null;
|
||||
|
@ -9,8 +9,8 @@ buildscript {
|
||||
jcenter()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:1.5.+'
|
||||
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.3'
|
||||
classpath 'com.android.tools.build:gradle:2.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.github.dcendents.android-maven'
|
||||
|
||||
|
||||
android {
|
||||
compileSdkVersion 23
|
||||
buildToolsVersion '23.0.2'
|
||||
compileSdkVersion 25
|
||||
buildToolsVersion '25.0.2'
|
||||
defaultConfig {
|
||||
minSdkVersion 14
|
||||
targetSdkVersion 23
|
||||
targetSdkVersion 25
|
||||
}
|
||||
compileOptions {
|
||||
{{#java8}}
|
||||
@ -41,7 +41,7 @@ if(hasProperty('target') && target == 'android') {
|
||||
targetCompatibility JavaVersion.VERSION_1_7
|
||||
{{/java8}}
|
||||
}
|
||||
|
||||
|
||||
// Rename the aar correctly
|
||||
libraryVariants.all { variant ->
|
||||
variant.outputs.each { output ->
|
||||
@ -57,7 +57,7 @@ if(hasProperty('target') && target == 'android') {
|
||||
provided 'javax.annotation:jsr250-api:1.0'
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
afterEvaluate {
|
||||
android.libraryVariants.all { variant ->
|
||||
def task = project.tasks.create "jar${variant.name.capitalize()}", Jar
|
||||
@ -69,12 +69,12 @@ if(hasProperty('target') && target == 'android') {
|
||||
artifacts.add('archives', task);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
task sourcesJar(type: Jar) {
|
||||
from android.sourceSets.main.java.srcDirs
|
||||
classifier = 'sources'
|
||||
}
|
||||
|
||||
|
||||
artifacts {
|
||||
archives sourcesJar
|
||||
}
|
||||
@ -92,13 +92,13 @@ if(hasProperty('target') && target == 'android') {
|
||||
sourceCompatibility = JavaVersion.VERSION_1_7
|
||||
targetCompatibility = JavaVersion.VERSION_1_7
|
||||
{{/java8}}
|
||||
|
||||
|
||||
install {
|
||||
repositories.mavenInstaller {
|
||||
pom.artifactId = '{{artifactId}}'
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
task execute(type:JavaExec) {
|
||||
main = System.getProperty('mainClass')
|
||||
classpath = sourceSets.main.runtimeClasspath
|
||||
|
@ -9,8 +9,8 @@ buildscript {
|
||||
jcenter()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:1.5.+'
|
||||
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.3'
|
||||
classpath 'com.android.tools.build:gradle:2.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.github.dcendents.android-maven'
|
||||
|
||||
|
||||
android {
|
||||
compileSdkVersion 23
|
||||
buildToolsVersion '23.0.2'
|
||||
compileSdkVersion 25
|
||||
buildToolsVersion '25.0.2'
|
||||
defaultConfig {
|
||||
minSdkVersion 14
|
||||
targetSdkVersion 23
|
||||
targetSdkVersion 25
|
||||
}
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_1_7
|
||||
targetCompatibility JavaVersion.VERSION_1_7
|
||||
}
|
||||
|
||||
|
||||
// Rename the aar correctly
|
||||
libraryVariants.all { variant ->
|
||||
variant.outputs.each { output ->
|
||||
@ -51,7 +51,7 @@ if(hasProperty('target') && target == 'android') {
|
||||
provided 'javax.annotation:jsr250-api:1.0'
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
afterEvaluate {
|
||||
android.libraryVariants.all { variant ->
|
||||
def task = project.tasks.create "jar${variant.name.capitalize()}", Jar
|
||||
@ -63,12 +63,12 @@ if(hasProperty('target') && target == 'android') {
|
||||
artifacts.add('archives', task);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
task sourcesJar(type: Jar) {
|
||||
from android.sourceSets.main.java.srcDirs
|
||||
classifier = 'sources'
|
||||
}
|
||||
|
||||
|
||||
artifacts {
|
||||
archives sourcesJar
|
||||
}
|
||||
@ -77,16 +77,16 @@ if(hasProperty('target') && target == 'android') {
|
||||
|
||||
apply plugin: 'java'
|
||||
apply plugin: 'maven'
|
||||
|
||||
|
||||
sourceCompatibility = JavaVersion.VERSION_{{^java8}}1_7{{/java8}}{{#java8}}1_8{{/java8}}
|
||||
targetCompatibility = JavaVersion.VERSION_{{^java8}}1_7{{/java8}}{{#java8}}1_8{{/java8}}
|
||||
|
||||
|
||||
install {
|
||||
repositories.mavenInstaller {
|
||||
pom.artifactId = '{{artifactId}}'
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
task execute(type:JavaExec) {
|
||||
main = System.getProperty('mainClass')
|
||||
classpath = sourceSets.main.runtimeClasspath
|
||||
|
@ -9,8 +9,8 @@ buildscript {
|
||||
jcenter()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:1.5.+'
|
||||
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.3'
|
||||
classpath 'com.android.tools.build:gradle:2.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'
|
||||
|
||||
android {
|
||||
compileSdkVersion 23
|
||||
buildToolsVersion '23.0.2'
|
||||
compileSdkVersion 25
|
||||
buildToolsVersion '25.0.2'
|
||||
defaultConfig {
|
||||
minSdkVersion 14
|
||||
targetSdkVersion 23
|
||||
targetSdkVersion 25
|
||||
}
|
||||
compileOptions {
|
||||
{{#java8}}
|
||||
|
@ -9,8 +9,8 @@ buildscript {
|
||||
jcenter()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:1.5.+'
|
||||
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.3'
|
||||
classpath 'com.android.tools.build:gradle:2.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'
|
||||
|
||||
android {
|
||||
compileSdkVersion 23
|
||||
buildToolsVersion '23.0.2'
|
||||
compileSdkVersion 25
|
||||
buildToolsVersion '25.0.2'
|
||||
defaultConfig {
|
||||
minSdkVersion 14
|
||||
targetSdkVersion 23
|
||||
targetSdkVersion 25
|
||||
}
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_1_7
|
||||
|
@ -9,8 +9,8 @@ buildscript {
|
||||
jcenter()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:1.5.+'
|
||||
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.3'
|
||||
classpath 'com.android.tools.build:gradle:2.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.github.dcendents.android-maven'
|
||||
|
||||
|
||||
android {
|
||||
compileSdkVersion 23
|
||||
buildToolsVersion '23.0.2'
|
||||
compileSdkVersion 25
|
||||
buildToolsVersion '25.0.2'
|
||||
defaultConfig {
|
||||
minSdkVersion 14
|
||||
targetSdkVersion 23
|
||||
targetSdkVersion 25
|
||||
}
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_1_7
|
||||
targetCompatibility JavaVersion.VERSION_1_7
|
||||
}
|
||||
|
||||
|
||||
// Rename the aar correctly
|
||||
libraryVariants.all { variant ->
|
||||
variant.outputs.each { output ->
|
||||
@ -51,7 +51,7 @@ if(hasProperty('target') && target == 'android') {
|
||||
provided 'javax.annotation:jsr250-api:1.0'
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
afterEvaluate {
|
||||
android.libraryVariants.all { variant ->
|
||||
def task = project.tasks.create "jar${variant.name.capitalize()}", Jar
|
||||
@ -63,12 +63,12 @@ if(hasProperty('target') && target == 'android') {
|
||||
artifacts.add('archives', task);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
task sourcesJar(type: Jar) {
|
||||
from android.sourceSets.main.java.srcDirs
|
||||
classifier = 'sources'
|
||||
}
|
||||
|
||||
|
||||
artifacts {
|
||||
archives sourcesJar
|
||||
}
|
||||
@ -77,16 +77,16 @@ if(hasProperty('target') && target == 'android') {
|
||||
|
||||
apply plugin: 'java'
|
||||
apply plugin: 'maven'
|
||||
|
||||
|
||||
sourceCompatibility = JavaVersion.VERSION_1_7
|
||||
targetCompatibility = JavaVersion.VERSION_1_7
|
||||
|
||||
|
||||
install {
|
||||
repositories.mavenInstaller {
|
||||
pom.artifactId = '{{artifactId}}'
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
task execute(type:JavaExec) {
|
||||
main = System.getProperty('mainClass')
|
||||
classpath = sourceSets.main.runtimeClasspath
|
||||
|
@ -9,8 +9,8 @@ buildscript {
|
||||
jcenter()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:1.5.+'
|
||||
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.3'
|
||||
classpath 'com.android.tools.build:gradle:2.3.+'
|
||||
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
|
||||
}
|
||||
}
|
||||
|
||||
@ -21,76 +21,76 @@ repositories {
|
||||
|
||||
if(hasProperty('target') && target == 'android') {
|
||||
|
||||
apply plugin: 'com.android.library'
|
||||
apply plugin: 'com.github.dcendents.android-maven'
|
||||
apply plugin: 'com.android.library'
|
||||
apply plugin: 'com.github.dcendents.android-maven'
|
||||
|
||||
android {
|
||||
compileSdkVersion 23
|
||||
buildToolsVersion '23.0.2'
|
||||
defaultConfig {
|
||||
minSdkVersion 14
|
||||
targetSdkVersion 23
|
||||
}
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_1_7
|
||||
targetCompatibility JavaVersion.VERSION_1_7
|
||||
}
|
||||
android {
|
||||
compileSdkVersion 25
|
||||
buildToolsVersion '25.0.2'
|
||||
defaultConfig {
|
||||
minSdkVersion 14
|
||||
targetSdkVersion 25
|
||||
}
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_1_7
|
||||
targetCompatibility JavaVersion.VERSION_1_7
|
||||
}
|
||||
|
||||
// Rename the aar correctly
|
||||
libraryVariants.all { variant ->
|
||||
variant.outputs.each { output ->
|
||||
def outputFile = output.outputFile
|
||||
if (outputFile != null && outputFile.name.endsWith('.aar')) {
|
||||
def fileName = "${project.name}-${variant.baseName}-${version}.aar"
|
||||
output.outputFile = new File(outputFile.parent, fileName)
|
||||
}
|
||||
}
|
||||
}
|
||||
// Rename the aar correctly
|
||||
libraryVariants.all { variant ->
|
||||
variant.outputs.each { output ->
|
||||
def outputFile = output.outputFile
|
||||
if (outputFile != null && outputFile.name.endsWith('.aar')) {
|
||||
def fileName = "${project.name}-${variant.baseName}-${version}.aar"
|
||||
output.outputFile = new File(outputFile.parent, fileName)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
provided 'javax.annotation:jsr250-api:1.0'
|
||||
}
|
||||
}
|
||||
dependencies {
|
||||
provided 'javax.annotation:jsr250-api:1.0'
|
||||
}
|
||||
}
|
||||
|
||||
afterEvaluate {
|
||||
android.libraryVariants.all { variant ->
|
||||
def task = project.tasks.create "jar${variant.name.capitalize()}", Jar
|
||||
task.description = "Create jar artifact for ${variant.name}"
|
||||
task.dependsOn variant.javaCompile
|
||||
task.from variant.javaCompile.destinationDir
|
||||
task.destinationDir = project.file("${project.buildDir}/outputs/jar")
|
||||
task.archiveName = "${project.name}-${variant.baseName}-${version}.jar"
|
||||
artifacts.add('archives', task);
|
||||
}
|
||||
}
|
||||
afterEvaluate {
|
||||
android.libraryVariants.all { variant ->
|
||||
def task = project.tasks.create "jar${variant.name.capitalize()}", Jar
|
||||
task.description = "Create jar artifact for ${variant.name}"
|
||||
task.dependsOn variant.javaCompile
|
||||
task.from variant.javaCompile.destinationDir
|
||||
task.destinationDir = project.file("${project.buildDir}/outputs/jar")
|
||||
task.archiveName = "${project.name}-${variant.baseName}-${version}.jar"
|
||||
artifacts.add('archives', task);
|
||||
}
|
||||
}
|
||||
|
||||
task sourcesJar(type: Jar) {
|
||||
from android.sourceSets.main.java.srcDirs
|
||||
classifier = 'sources'
|
||||
}
|
||||
task sourcesJar(type: Jar) {
|
||||
from android.sourceSets.main.java.srcDirs
|
||||
classifier = 'sources'
|
||||
}
|
||||
|
||||
artifacts {
|
||||
archives sourcesJar
|
||||
}
|
||||
artifacts {
|
||||
archives sourcesJar
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
apply plugin: 'java'
|
||||
apply plugin: 'maven'
|
||||
apply plugin: 'java'
|
||||
apply plugin: 'maven'
|
||||
|
||||
sourceCompatibility = JavaVersion.VERSION_{{^java8}}1_7{{/java8}}{{#java8}}1_8{{/java8}}
|
||||
targetCompatibility = JavaVersion.VERSION_{{^java8}}1_7{{/java8}}{{#java8}}1_8{{/java8}}
|
||||
|
||||
install {
|
||||
repositories.mavenInstaller {
|
||||
pom.artifactId = '{{artifactId}}'
|
||||
}
|
||||
}
|
||||
install {
|
||||
repositories.mavenInstaller {
|
||||
pom.artifactId = '{{artifactId}}'
|
||||
}
|
||||
}
|
||||
|
||||
task execute(type:JavaExec) {
|
||||
main = System.getProperty('mainClass')
|
||||
classpath = sourceSets.main.runtimeClasspath
|
||||
}
|
||||
task execute(type:JavaExec) {
|
||||
main = System.getProperty('mainClass')
|
||||
classpath = sourceSets.main.runtimeClasspath
|
||||
}
|
||||
}
|
||||
|
||||
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.RequestPart;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import java.io.IOException;
|
||||
|
||||
import java.util.List;
|
||||
{{#async}}
|
||||
@ -40,16 +41,18 @@ public interface {{classname}} {
|
||||
}{{/hasAuthMethods}}, tags={ {{#vendorExtensions.x-tags}}"{{tag}}",{{/vendorExtensions.x-tags}} })
|
||||
@ApiResponses(value = { {{#responses}}
|
||||
@ApiResponse(code = {{{code}}}, message = "{{{message}}}", response = {{{returnType}}}.class){{#hasMore}},{{/hasMore}}{{/responses}} })
|
||||
{{#implicitHeaders}}@ApiImplicitParams({
|
||||
{{#implicitHeaders}}
|
||||
@ApiImplicitParams({
|
||||
{{#headerParams}}{{>implicitHeader}}{{/headerParams}}
|
||||
}){{/implicitHeaders}}
|
||||
})
|
||||
{{/implicitHeaders}}
|
||||
@RequestMapping(value = "{{{path}}}",{{#singleContentTypes}}
|
||||
produces = "{{{vendorExtensions.x-accepts}}}",
|
||||
consumes = "{{{vendorExtensions.x-contentType}}}",{{/singleContentTypes}}{{^singleContentTypes}}{{#hasProduces}}
|
||||
produces = { {{#produces}}"{{{mediaType}}}"{{#hasMore}}, {{/hasMore}}{{/produces}} }, {{/hasProduces}}{{#hasConsumes}}
|
||||
consumes = { {{#consumes}}"{{{mediaType}}}"{{#hasMore}}, {{/hasMore}}{{/consumes}} },{{/hasConsumes}}{{/singleContentTypes}}
|
||||
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!
|
||||
return {{#async}}CompletableFuture.completedFuture({{/async}}new ResponseEntity<{{>returnTypes}}>(HttpStatus.OK){{#async}}){{/async}};
|
||||
}{{/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.RequestPart;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import java.io.IOException;
|
||||
|
||||
import java.util.List;
|
||||
{{#async}}
|
||||
@ -36,21 +38,44 @@ public class {{classname}}Controller implements {{classname}} {
|
||||
@org.springframework.beans.factory.annotation.Autowired
|
||||
public {{classname}}Controller({{classname}}Delegate delegate) {
|
||||
this.delegate = delegate;
|
||||
}{{/isDelegate}}
|
||||
}
|
||||
|
||||
{{^jdk8-no-delegate}}{{#operation}}
|
||||
public {{#async}}Callable<{{/async}}ResponseEntity<{{>returnTypes}}>{{#async}}>{{/async}} {{operationId}}({{#allParams}}{{>queryParams}}{{>pathParams}}{{>headerParams}}{{>bodyParams}}{{>formParams}}{{#hasMore}},
|
||||
{{/hasMore}}{{/allParams}}) {
|
||||
// do some magic!{{^isDelegate}}{{^async}}
|
||||
return new ResponseEntity<{{>returnTypes}}>(HttpStatus.OK);{{/async}}{{#async}}
|
||||
{{/isDelegate}}
|
||||
{{^jdk8-no-delegate}}
|
||||
{{#operation}}
|
||||
public {{#async}}Callable<{{/async}}ResponseEntity<{{>returnTypes}}>{{#async}}>{{/async}} {{operationId}}({{#allParams}}{{>queryParams}}{{>pathParams}}{{>headerParams}}{{>bodyParams}}{{>formParams}},
|
||||
{{/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}}>>() {
|
||||
@Override
|
||||
public ResponseEntity<{{>returnTypes}}> call() throws Exception {
|
||||
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}}
|
||||
|
@ -0,0 +1 @@
|
||||
{{#returnContainer}}{{#isMapContainer}}Map{{/isMapContainer}}{{#isListContainer}}List{{/isListContainer}}{{/returnContainer}}{{^returnContainer}}{{{returnType}}}{{/returnContainer}}
|
@ -8,9 +8,9 @@ buildscript {
|
||||
jcenter()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:1.5.+'
|
||||
classpath 'com.android.tools.build:gradle:2.3.+'
|
||||
{{#useAndroidMavenGradlePlugin}}
|
||||
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.3'
|
||||
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
|
||||
{{/useAndroidMavenGradlePlugin}}
|
||||
}
|
||||
}
|
||||
@ -28,12 +28,12 @@ apply plugin: 'com.github.dcendents.android-maven'
|
||||
{{/useAndroidMavenGradlePlugin}}
|
||||
|
||||
android {
|
||||
compileSdkVersion 23
|
||||
buildToolsVersion '23.0.2'
|
||||
compileSdkVersion 25
|
||||
buildToolsVersion '25.0.2'
|
||||
useLibrary 'org.apache.http.legacy'
|
||||
defaultConfig {
|
||||
minSdkVersion 14
|
||||
targetSdkVersion 23
|
||||
targetSdkVersion 25
|
||||
}
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_1_7
|
||||
|
@ -8,9 +8,9 @@ buildscript {
|
||||
jcenter()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:1.5.+'
|
||||
classpath 'com.android.tools.build:gradle:2.3.+'
|
||||
{{#useAndroidMavenGradlePlugin}}
|
||||
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.3'
|
||||
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
|
||||
{{/useAndroidMavenGradlePlugin}}
|
||||
}
|
||||
}
|
||||
@ -28,11 +28,11 @@ apply plugin: 'com.github.dcendents.android-maven'
|
||||
{{/useAndroidMavenGradlePlugin}}
|
||||
|
||||
android {
|
||||
compileSdkVersion 23
|
||||
buildToolsVersion '23.0.2'
|
||||
compileSdkVersion 25
|
||||
buildToolsVersion '25.0.2'
|
||||
defaultConfig {
|
||||
minSdkVersion 14
|
||||
targetSdkVersion 23
|
||||
targetSdkVersion 25
|
||||
}
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_1_7
|
||||
|
@ -113,12 +113,24 @@ pplx::task<web::http::http_response> ApiClient::callApi(
|
||||
}
|
||||
else
|
||||
{
|
||||
web::http::uri_builder formData;
|
||||
for (auto& kvp : formParams)
|
||||
if (contentType == U("application/json"))
|
||||
{
|
||||
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( int64_t 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 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 )
|
||||
{
|
||||
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 )
|
||||
|
@ -132,9 +132,12 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}}imple
|
||||
{{/required}}
|
||||
{{#isEnum}}
|
||||
{{^isContainer}}
|
||||
$allowed_values = [{{#allowableValues}}{{#values}}"{{{this}}}"{{^-last}}, {{/-last}}{{/values}}{{/allowableValues}}];
|
||||
$allowed_values = $this->{{getter}}AllowableValues();
|
||||
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}}
|
||||
@ -209,7 +212,7 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}}imple
|
||||
{{/required}}
|
||||
{{#isEnum}}
|
||||
{{^isContainer}}
|
||||
$allowed_values = [{{#allowableValues}}{{#values}}"{{{this}}}"{{^-last}}, {{/-last}}{{/values}}{{/allowableValues}}];
|
||||
$allowed_values = $this->{{getter}}AllowableValues();
|
||||
if (!in_array($this->container['{{name}}'], $allowed_values)) {
|
||||
return false;
|
||||
}
|
||||
@ -275,15 +278,25 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}}imple
|
||||
public function {{setter}}(${{name}})
|
||||
{
|
||||
{{#isEnum}}
|
||||
$allowed_values = array({{#allowableValues}}{{#values}}'{{{this}}}'{{^-last}}, {{/-last}}{{/values}}{{/allowableValues}});
|
||||
$allowed_values = $this->{{getter}}AllowableValues();
|
||||
{{^isContainer}}
|
||||
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}}");
|
||||
if ({{^required}}!is_null(${{name}}) && {{/required}}!in_array(${{{name}}}, $allowed_values)) {
|
||||
throw new \InvalidArgumentException(
|
||||
sprintf(
|
||||
"Invalid value for '{{name}}', must be one of '%s'",
|
||||
implode("', '", $allowed_values)
|
||||
)
|
||||
);
|
||||
}
|
||||
{{/isContainer}}
|
||||
{{#isContainer}}
|
||||
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}}");
|
||||
if ({{^required}}!is_null(${{name}}) && {{/required}}array_diff(${{{name}}}, $allowed_values)) {
|
||||
throw new \InvalidArgumentException(
|
||||
sprintf(
|
||||
"Invalid value for '{{name}}', must be one of '%s'",
|
||||
implode("', '", $allowed_values)
|
||||
)
|
||||
);
|
||||
}
|
||||
{{/isContainer}}
|
||||
{{/isEnum}}
|
||||
|
@ -14,6 +14,13 @@ class {{classname}}(object):
|
||||
NOTE: This class is auto generated by the swagger code generator program.
|
||||
Do not edit the class manually.
|
||||
"""
|
||||
{{#allowableValues}}
|
||||
|
||||
{{#enumVars}}
|
||||
{{name}} = {{{value}}}
|
||||
{{/enumVars}}
|
||||
|
||||
{{/allowableValues}}
|
||||
def __init__(self{{#vars}}, {{name}}={{#defaultValue}}{{{defaultValue}}}{{/defaultValue}}{{^defaultValue}}None{{/defaultValue}}{{/vars}}):
|
||||
"""
|
||||
{{classname}} - a model defined in Swagger
|
||||
@ -34,7 +41,15 @@ class {{classname}}(object):
|
||||
}
|
||||
|
||||
{{#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}}
|
||||
@ -62,9 +77,13 @@ class {{classname}}(object):
|
||||
:param {{name}}: The {{name}} of this {{classname}}.
|
||||
:type: {{datatype}}
|
||||
"""
|
||||
{{#required}}
|
||||
if {{name}} is None:
|
||||
raise ValueError("Invalid value for `{{name}}`, must not be `None`")
|
||||
{{/required}}
|
||||
{{#isEnum}}
|
||||
allowed_values = [{{#allowableValues}}{{#values}}"{{{this}}}"{{^-last}}, {{/-last}}{{/values}}{{/allowableValues}}]
|
||||
{{#isContainer}}
|
||||
allowed_values = [{{#allowableValues}}{{#values}}{{#items.isString}}"{{/items.isString}}{{{this}}}{{#items.isString}}"{{/items.isString}}{{^-last}}, {{/-last}}{{/values}}{{/allowableValues}}]
|
||||
{{#isListContainer}}
|
||||
if not set({{{name}}}).issubset(set(allowed_values)):
|
||||
raise ValueError(
|
||||
@ -83,6 +102,7 @@ class {{classname}}(object):
|
||||
{{/isMapContainer}}
|
||||
{{/isContainer}}
|
||||
{{^isContainer}}
|
||||
allowed_values = [{{#allowableValues}}{{#values}}{{#isString}}"{{/isString}}{{{this}}}{{#isString}}"{{/isString}}{{^-last}}, {{/-last}}{{/values}}{{/allowableValues}}]
|
||||
if {{{name}}} not in allowed_values:
|
||||
raise ValueError(
|
||||
"Invalid value for `{{{name}}}` ({0}), must be one of {1}"
|
||||
@ -91,10 +111,6 @@ class {{classname}}(object):
|
||||
{{/isContainer}}
|
||||
{{/isEnum}}
|
||||
{{^isEnum}}
|
||||
{{#required}}
|
||||
if {{name}} is None:
|
||||
raise ValueError("Invalid value for `{{name}}`, must not be `None`")
|
||||
{{/required}}
|
||||
{{#hasValidation}}
|
||||
{{#maxLength}}
|
||||
if {{name}} is not None and len({{name}}) > {{maxLength}}:
|
||||
|
@ -1,5 +1,5 @@
|
||||
[tox]
|
||||
envlist = py27, py34
|
||||
envlist = py27, py3
|
||||
|
||||
[testenv]
|
||||
deps=-r{toxinidir}/requirements.txt
|
||||
|
@ -253,7 +253,6 @@ class Decoders {
|
||||
|
||||
{{^isArrayModel}}
|
||||
// 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)
|
||||
}
|
||||
// Decoder for {{{classname}}}
|
||||
|
@ -24,7 +24,7 @@ public class JavaClientOptionsProvider extends JavaOptionsProvider {
|
||||
options.put(JavaClientCodegen.USE_BEANVALIDATION, "false");
|
||||
options.put(JavaClientCodegen.PERFORM_BEANVALIDATION, PERFORM_BEANVALIDATION);
|
||||
options.put(JavaClientCodegen.USE_GZIP_FEATURE, "false");
|
||||
|
||||
options.put(JavaClientCodegen.USE_RUNTIME_EXCEPTION, "false");
|
||||
return options;
|
||||
}
|
||||
|
||||
|
@ -114,7 +114,7 @@
|
||||
<configuration>
|
||||
<url>https://github.com/swagger-api/swagger-ui/archive/master.tar.gz</url>
|
||||
<unpack>true</unpack>
|
||||
<skipCache>true</skipCache>
|
||||
<skipCache>true</skipCache>
|
||||
<outputDirectory>${project.build.directory}</outputDirectory>
|
||||
</configuration>
|
||||
</execution>
|
||||
|
3
pom.xml
3
pom.xml
@ -830,7 +830,8 @@
|
||||
<module>samples/server/petstore/jaxrs-resteasy/joda</module>
|
||||
<module>samples/server/petstore/scalatra</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-beanvalidation</module>
|
||||
<module>samples/server/petstore/jaxrs-cxf</module>
|
||||
|
@ -38,7 +38,13 @@ class ModelReturn(object):
|
||||
'_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
|
||||
def _return(self):
|
||||
|
@ -1,5 +1,5 @@
|
||||
[tox]
|
||||
envlist = py27, py34
|
||||
envlist = py27, py3
|
||||
|
||||
[testenv]
|
||||
deps=-r{toxinidir}/requirements.txt
|
||||
|
@ -43,6 +43,9 @@ web::json::value ModelBase::toJson( int64_t value )
|
||||
web::json::value ModelBase::toJson( double 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 )
|
||||
|
@ -52,6 +52,7 @@ public:
|
||||
static web::json::value toJson( int32_t value );
|
||||
static web::json::value toJson( int64_t 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 int32_t int32_tFromJson(web::json::value& val);
|
||||
|
@ -107,8 +107,8 @@ class EnumArrays implements ArrayAccess
|
||||
return self::$getters;
|
||||
}
|
||||
|
||||
const JUST_SYMBOL_ = '>=';
|
||||
const JUST_SYMBOL_ = '$';
|
||||
const JUST_SYMBOL_GREATER_THAN_OR_EQUAL_TO = '>=';
|
||||
const JUST_SYMBOL_DOLLAR = '$';
|
||||
const ARRAY_ENUM_FISH = 'fish';
|
||||
const ARRAY_ENUM_CRAB = 'crab';
|
||||
|
||||
@ -121,8 +121,8 @@ class EnumArrays implements ArrayAccess
|
||||
public function getJustSymbolAllowableValues()
|
||||
{
|
||||
return [
|
||||
self::JUST_SYMBOL_,
|
||||
self::JUST_SYMBOL_,
|
||||
self::JUST_SYMBOL_GREATER_THAN_OR_EQUAL_TO,
|
||||
self::JUST_SYMBOL_DOLLAR,
|
||||
];
|
||||
}
|
||||
|
||||
@ -164,9 +164,12 @@ class EnumArrays implements ArrayAccess
|
||||
{
|
||||
$invalid_properties = [];
|
||||
|
||||
$allowed_values = [">=", "$"];
|
||||
$allowed_values = $this->getJustSymbolAllowableValues();
|
||||
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;
|
||||
@ -181,7 +184,7 @@ class EnumArrays implements ArrayAccess
|
||||
public function valid()
|
||||
{
|
||||
|
||||
$allowed_values = [">=", "$"];
|
||||
$allowed_values = $this->getJustSymbolAllowableValues();
|
||||
if (!in_array($this->container['just_symbol'], $allowed_values)) {
|
||||
return false;
|
||||
}
|
||||
@ -205,9 +208,14 @@ class EnumArrays implements ArrayAccess
|
||||
*/
|
||||
public function setJustSymbol($just_symbol)
|
||||
{
|
||||
$allowed_values = array('>=', '$');
|
||||
if (!is_null($just_symbol) && (!in_array($just_symbol, $allowed_values))) {
|
||||
throw new \InvalidArgumentException("Invalid value for 'just_symbol', must be one of '>=', '$'");
|
||||
$allowed_values = $this->getJustSymbolAllowableValues();
|
||||
if (!is_null($just_symbol) && !in_array($just_symbol, $allowed_values)) {
|
||||
throw new \InvalidArgumentException(
|
||||
sprintf(
|
||||
"Invalid value for 'just_symbol', must be one of '%s'",
|
||||
implode("', '", $allowed_values)
|
||||
)
|
||||
);
|
||||
}
|
||||
$this->container['just_symbol'] = $just_symbol;
|
||||
|
||||
@ -230,9 +238,14 @@ class EnumArrays implements ArrayAccess
|
||||
*/
|
||||
public function setArrayEnum($array_enum)
|
||||
{
|
||||
$allowed_values = array('fish', 'crab');
|
||||
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'");
|
||||
$allowed_values = $this->getArrayEnumAllowableValues();
|
||||
if (!is_null($array_enum) && array_diff($array_enum, $allowed_values)) {
|
||||
throw new \InvalidArgumentException(
|
||||
sprintf(
|
||||
"Invalid value for 'array_enum', must be one of '%s'",
|
||||
implode("', '", $allowed_values)
|
||||
)
|
||||
);
|
||||
}
|
||||
$this->container['array_enum'] = $array_enum;
|
||||
|
||||
|
@ -190,19 +190,28 @@ class EnumTest implements ArrayAccess
|
||||
{
|
||||
$invalid_properties = [];
|
||||
|
||||
$allowed_values = ["UPPER", "lower", ""];
|
||||
$allowed_values = $this->getEnumStringAllowableValues();
|
||||
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)) {
|
||||
$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)) {
|
||||
$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;
|
||||
@ -217,15 +226,15 @@ class EnumTest implements ArrayAccess
|
||||
public function valid()
|
||||
{
|
||||
|
||||
$allowed_values = ["UPPER", "lower", ""];
|
||||
$allowed_values = $this->getEnumStringAllowableValues();
|
||||
if (!in_array($this->container['enum_string'], $allowed_values)) {
|
||||
return false;
|
||||
}
|
||||
$allowed_values = ["1", "-1"];
|
||||
$allowed_values = $this->getEnumIntegerAllowableValues();
|
||||
if (!in_array($this->container['enum_integer'], $allowed_values)) {
|
||||
return false;
|
||||
}
|
||||
$allowed_values = ["1.1", "-1.2"];
|
||||
$allowed_values = $this->getEnumNumberAllowableValues();
|
||||
if (!in_array($this->container['enum_number'], $allowed_values)) {
|
||||
return false;
|
||||
}
|
||||
@ -249,9 +258,14 @@ class EnumTest implements ArrayAccess
|
||||
*/
|
||||
public function setEnumString($enum_string)
|
||||
{
|
||||
$allowed_values = array('UPPER', 'lower', '');
|
||||
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', ''");
|
||||
$allowed_values = $this->getEnumStringAllowableValues();
|
||||
if (!is_null($enum_string) && !in_array($enum_string, $allowed_values)) {
|
||||
throw new \InvalidArgumentException(
|
||||
sprintf(
|
||||
"Invalid value for 'enum_string', must be one of '%s'",
|
||||
implode("', '", $allowed_values)
|
||||
)
|
||||
);
|
||||
}
|
||||
$this->container['enum_string'] = $enum_string;
|
||||
|
||||
@ -274,9 +288,14 @@ class EnumTest implements ArrayAccess
|
||||
*/
|
||||
public function setEnumInteger($enum_integer)
|
||||
{
|
||||
$allowed_values = array('1', '-1');
|
||||
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'");
|
||||
$allowed_values = $this->getEnumIntegerAllowableValues();
|
||||
if (!is_null($enum_integer) && !in_array($enum_integer, $allowed_values)) {
|
||||
throw new \InvalidArgumentException(
|
||||
sprintf(
|
||||
"Invalid value for 'enum_integer', must be one of '%s'",
|
||||
implode("', '", $allowed_values)
|
||||
)
|
||||
);
|
||||
}
|
||||
$this->container['enum_integer'] = $enum_integer;
|
||||
|
||||
@ -299,9 +318,14 @@ class EnumTest implements ArrayAccess
|
||||
*/
|
||||
public function setEnumNumber($enum_number)
|
||||
{
|
||||
$allowed_values = array('1.1', '-1.2');
|
||||
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'");
|
||||
$allowed_values = $this->getEnumNumberAllowableValues();
|
||||
if (!is_null($enum_number) && !in_array($enum_number, $allowed_values)) {
|
||||
throw new \InvalidArgumentException(
|
||||
sprintf(
|
||||
"Invalid value for 'enum_number', must be one of '%s'",
|
||||
implode("', '", $allowed_values)
|
||||
)
|
||||
);
|
||||
}
|
||||
$this->container['enum_number'] = $enum_number;
|
||||
|
||||
|
@ -203,9 +203,14 @@ class MapTest implements ArrayAccess
|
||||
*/
|
||||
public function setMapOfEnumString($map_of_enum_string)
|
||||
{
|
||||
$allowed_values = array('UPPER', 'lower');
|
||||
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'");
|
||||
$allowed_values = $this->getMapOfEnumStringAllowableValues();
|
||||
if (!is_null($map_of_enum_string) && array_diff($map_of_enum_string, $allowed_values)) {
|
||||
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;
|
||||
|
||||
|
@ -172,9 +172,12 @@ class Order implements ArrayAccess
|
||||
{
|
||||
$invalid_properties = [];
|
||||
|
||||
$allowed_values = ["placed", "approved", "delivered"];
|
||||
$allowed_values = $this->getStatusAllowableValues();
|
||||
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;
|
||||
@ -189,7 +192,7 @@ class Order implements ArrayAccess
|
||||
public function valid()
|
||||
{
|
||||
|
||||
$allowed_values = ["placed", "approved", "delivered"];
|
||||
$allowed_values = $this->getStatusAllowableValues();
|
||||
if (!in_array($this->container['status'], $allowed_values)) {
|
||||
return false;
|
||||
}
|
||||
@ -297,9 +300,14 @@ class Order implements ArrayAccess
|
||||
*/
|
||||
public function setStatus($status)
|
||||
{
|
||||
$allowed_values = array('placed', 'approved', 'delivered');
|
||||
if (!is_null($status) && (!in_array($status, $allowed_values))) {
|
||||
throw new \InvalidArgumentException("Invalid value for 'status', must be one of 'placed', 'approved', 'delivered'");
|
||||
$allowed_values = $this->getStatusAllowableValues();
|
||||
if (!is_null($status) && !in_array($status, $allowed_values)) {
|
||||
throw new \InvalidArgumentException(
|
||||
sprintf(
|
||||
"Invalid value for 'status', must be one of '%s'",
|
||||
implode("', '", $allowed_values)
|
||||
)
|
||||
);
|
||||
}
|
||||
$this->container['status'] = $status;
|
||||
|
||||
|
@ -178,9 +178,12 @@ class Pet implements ArrayAccess
|
||||
if ($this->container['photo_urls'] === 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)) {
|
||||
$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;
|
||||
@ -201,7 +204,7 @@ class Pet implements ArrayAccess
|
||||
if ($this->container['photo_urls'] === null) {
|
||||
return false;
|
||||
}
|
||||
$allowed_values = ["available", "pending", "sold"];
|
||||
$allowed_values = $this->getStatusAllowableValues();
|
||||
if (!in_array($this->container['status'], $allowed_values)) {
|
||||
return false;
|
||||
}
|
||||
@ -330,9 +333,14 @@ class Pet implements ArrayAccess
|
||||
*/
|
||||
public function setStatus($status)
|
||||
{
|
||||
$allowed_values = array('available', 'pending', 'sold');
|
||||
if (!is_null($status) && (!in_array($status, $allowed_values))) {
|
||||
throw new \InvalidArgumentException("Invalid value for 'status', must be one of 'available', 'pending', 'sold'");
|
||||
$allowed_values = $this->getStatusAllowableValues();
|
||||
if (!is_null($status) && !in_array($status, $allowed_values)) {
|
||||
throw new \InvalidArgumentException(
|
||||
sprintf(
|
||||
"Invalid value for 'status', must be one of '%s'",
|
||||
implode("', '", $allowed_values)
|
||||
)
|
||||
);
|
||||
}
|
||||
$this->container['status'] = $status;
|
||||
|
||||
|
@ -40,8 +40,16 @@ class AdditionalPropertiesClass(object):
|
||||
'map_of_map_property': 'map_of_map_property'
|
||||
}
|
||||
|
||||
self._map_property = map_property
|
||||
self._map_of_map_property = map_of_map_property
|
||||
self._map_property = None
|
||||
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
|
||||
def map_property(self):
|
||||
|
@ -40,8 +40,16 @@ class Animal(object):
|
||||
'color': 'color'
|
||||
}
|
||||
|
||||
self._class_name = class_name
|
||||
self._color = color
|
||||
self._class_name = None
|
||||
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
|
||||
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):
|
||||
"""
|
||||
Returns the model properties as a dict
|
||||
|
@ -42,9 +42,19 @@ class ApiResponse(object):
|
||||
'message': 'message'
|
||||
}
|
||||
|
||||
self._code = code
|
||||
self._type = type
|
||||
self._message = message
|
||||
self._code = None
|
||||
self._type = None
|
||||
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
|
||||
def code(self):
|
||||
|
@ -38,7 +38,13 @@ class ArrayOfArrayOfNumberOnly(object):
|
||||
'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
|
||||
def array_array_number(self):
|
||||
|
@ -38,7 +38,13 @@ class ArrayOfNumberOnly(object):
|
||||
'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
|
||||
def array_number(self):
|
||||
|
@ -42,9 +42,19 @@ class ArrayTest(object):
|
||||
'array_array_of_model': 'array_array_of_model'
|
||||
}
|
||||
|
||||
self._array_of_string = array_of_string
|
||||
self._array_array_of_integer = array_array_of_integer
|
||||
self._array_array_of_model = array_array_of_model
|
||||
self._array_of_string = None
|
||||
self._array_array_of_integer = None
|
||||
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
|
||||
def array_of_string(self):
|
||||
|
@ -48,12 +48,28 @@ class Capitalization(object):
|
||||
'att_name': 'ATT_NAME'
|
||||
}
|
||||
|
||||
self._small_camel = small_camel
|
||||
self._capital_camel = capital_camel
|
||||
self._small_snake = small_snake
|
||||
self._capital_snake = capital_snake
|
||||
self._sca_eth_flow_points = sca_eth_flow_points
|
||||
self._att_name = att_name
|
||||
self._small_camel = None
|
||||
self._capital_camel = None
|
||||
self._small_snake = None
|
||||
self._capital_snake = None
|
||||
self._sca_eth_flow_points = None
|
||||
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
|
||||
def small_camel(self):
|
||||
|
@ -42,9 +42,19 @@ class Cat(object):
|
||||
'declawed': 'declawed'
|
||||
}
|
||||
|
||||
self._class_name = class_name
|
||||
self._color = color
|
||||
self._declawed = declawed
|
||||
self._class_name = None
|
||||
self._color = None
|
||||
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
|
||||
def class_name(self):
|
||||
|
@ -40,8 +40,16 @@ class Category(object):
|
||||
'name': 'name'
|
||||
}
|
||||
|
||||
self._id = id
|
||||
self._name = name
|
||||
self._id = None
|
||||
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
|
||||
def id(self):
|
||||
|
@ -38,7 +38,13 @@ class ClassModel(object):
|
||||
'_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
|
||||
def _class(self):
|
||||
|
@ -38,7 +38,13 @@ class Client(object):
|
||||
'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
|
||||
def client(self):
|
||||
|
@ -42,9 +42,19 @@ class Dog(object):
|
||||
'breed': 'breed'
|
||||
}
|
||||
|
||||
self._class_name = class_name
|
||||
self._color = color
|
||||
self._breed = breed
|
||||
self._class_name = None
|
||||
self._color = None
|
||||
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
|
||||
def class_name(self):
|
||||
|
@ -40,8 +40,16 @@ class EnumArrays(object):
|
||||
'array_enum': 'array_enum'
|
||||
}
|
||||
|
||||
self._just_symbol = just_symbol
|
||||
self._array_enum = array_enum
|
||||
self._just_symbol = None
|
||||
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
|
||||
def just_symbol(self):
|
||||
|
@ -21,6 +21,11 @@ class EnumClass(object):
|
||||
NOTE: This class is auto generated by the swagger code generator program.
|
||||
Do not edit the class manually.
|
||||
"""
|
||||
|
||||
_ABC = "_abc"
|
||||
_EFG = "-efg"
|
||||
_XYZ_ = "(xyz)"
|
||||
|
||||
def __init__(self):
|
||||
"""
|
||||
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):
|
||||
"""
|
||||
Returns the model properties as a dict
|
||||
|
@ -44,10 +44,22 @@ class EnumTest(object):
|
||||
'outer_enum': 'outerEnum'
|
||||
}
|
||||
|
||||
self._enum_string = enum_string
|
||||
self._enum_integer = enum_integer
|
||||
self._enum_number = enum_number
|
||||
self._outer_enum = outer_enum
|
||||
self._enum_string = None
|
||||
self._enum_integer = None
|
||||
self._enum_number = None
|
||||
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
|
||||
def enum_string(self):
|
||||
@ -94,7 +106,7 @@ class EnumTest(object):
|
||||
:param enum_integer: The enum_integer of this EnumTest.
|
||||
:type: int
|
||||
"""
|
||||
allowed_values = ["1", "-1"]
|
||||
allowed_values = [1, -1]
|
||||
if enum_integer not in allowed_values:
|
||||
raise ValueError(
|
||||
"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.
|
||||
:type: float
|
||||
"""
|
||||
allowed_values = ["1.1", "-1.2"]
|
||||
allowed_values = [1.1, -1.2]
|
||||
if enum_number not in allowed_values:
|
||||
raise ValueError(
|
||||
"Invalid value for `enum_number` ({0}), must be one of {1}"
|
||||
|
@ -62,19 +62,49 @@ class FormatTest(object):
|
||||
'password': 'password'
|
||||
}
|
||||
|
||||
self._integer = integer
|
||||
self._int32 = int32
|
||||
self._int64 = int64
|
||||
self._number = number
|
||||
self._float = float
|
||||
self._double = double
|
||||
self._string = string
|
||||
self._byte = byte
|
||||
self._binary = binary
|
||||
self._date = date
|
||||
self._date_time = date_time
|
||||
self._uuid = uuid
|
||||
self._password = password
|
||||
self._integer = None
|
||||
self._int32 = None
|
||||
self._int64 = None
|
||||
self._number = None
|
||||
self._float = None
|
||||
self._double = None
|
||||
self._string = None
|
||||
self._byte = None
|
||||
self._binary = None
|
||||
self._date = None
|
||||
self._date_time = None
|
||||
self._uuid = None
|
||||
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
|
||||
def integer(self):
|
||||
|
@ -40,8 +40,16 @@ class HasOnlyReadOnly(object):
|
||||
'foo': 'foo'
|
||||
}
|
||||
|
||||
self._bar = bar
|
||||
self._foo = foo
|
||||
self._bar = None
|
||||
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
|
||||
def bar(self):
|
||||
|
@ -38,7 +38,13 @@ class List(object):
|
||||
'_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
|
||||
def _123_list(self):
|
||||
|
@ -40,8 +40,16 @@ class MapTest(object):
|
||||
'map_of_enum_string': 'map_of_enum_string'
|
||||
}
|
||||
|
||||
self._map_map_of_string = map_map_of_string
|
||||
self._map_of_enum_string = map_of_enum_string
|
||||
self._map_map_of_string = None
|
||||
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
|
||||
def map_map_of_string(self):
|
||||
|
@ -42,9 +42,19 @@ class MixedPropertiesAndAdditionalPropertiesClass(object):
|
||||
'map': 'map'
|
||||
}
|
||||
|
||||
self._uuid = uuid
|
||||
self._date_time = date_time
|
||||
self._map = map
|
||||
self._uuid = None
|
||||
self._date_time = None
|
||||
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
|
||||
def uuid(self):
|
||||
|
@ -40,8 +40,16 @@ class Model200Response(object):
|
||||
'_class': 'class'
|
||||
}
|
||||
|
||||
self._name = name
|
||||
self.__class = _class
|
||||
self._name = None
|
||||
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
|
||||
def name(self):
|
||||
|
@ -38,7 +38,13 @@ class ModelReturn(object):
|
||||
'_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
|
||||
def _return(self):
|
||||
|
@ -44,10 +44,22 @@ class Name(object):
|
||||
'_123_number': '123Number'
|
||||
}
|
||||
|
||||
self._name = name
|
||||
self._snake_case = snake_case
|
||||
self.__property = _property
|
||||
self.__123_number = _123_number
|
||||
self._name = None
|
||||
self._snake_case = None
|
||||
self.__property = None
|
||||
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
|
||||
def name(self):
|
||||
|
@ -38,7 +38,13 @@ class NumberOnly(object):
|
||||
'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
|
||||
def just_number(self):
|
||||
|
@ -48,12 +48,28 @@ class Order(object):
|
||||
'complete': 'complete'
|
||||
}
|
||||
|
||||
self._id = id
|
||||
self._pet_id = pet_id
|
||||
self._quantity = quantity
|
||||
self._ship_date = ship_date
|
||||
self._status = status
|
||||
self._complete = complete
|
||||
self._id = None
|
||||
self._pet_id = None
|
||||
self._quantity = None
|
||||
self._ship_date = None
|
||||
self._status = None
|
||||
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
|
||||
def id(self):
|
||||
|
@ -21,6 +21,11 @@ class OuterEnum(object):
|
||||
NOTE: This class is auto generated by the swagger code generator program.
|
||||
Do not edit the class manually.
|
||||
"""
|
||||
|
||||
PLACED = "placed"
|
||||
APPROVED = "approved"
|
||||
DELIVERED = "delivered"
|
||||
|
||||
def __init__(self):
|
||||
"""
|
||||
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):
|
||||
"""
|
||||
Returns the model properties as a dict
|
||||
|
@ -48,12 +48,28 @@ class Pet(object):
|
||||
'status': 'status'
|
||||
}
|
||||
|
||||
self._id = id
|
||||
self._category = category
|
||||
self._name = name
|
||||
self._photo_urls = photo_urls
|
||||
self._tags = tags
|
||||
self._status = status
|
||||
self._id = None
|
||||
self._category = None
|
||||
self._name = None
|
||||
self._photo_urls = None
|
||||
self._tags = None
|
||||
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
|
||||
def id(self):
|
||||
|
@ -40,8 +40,16 @@ class ReadOnlyFirst(object):
|
||||
'baz': 'baz'
|
||||
}
|
||||
|
||||
self._bar = bar
|
||||
self._baz = baz
|
||||
self._bar = None
|
||||
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
|
||||
def bar(self):
|
||||
|
@ -38,7 +38,13 @@ class SpecialModelName(object):
|
||||
'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
|
||||
def special_property_name(self):
|
||||
|
@ -40,8 +40,16 @@ class Tag(object):
|
||||
'name': 'name'
|
||||
}
|
||||
|
||||
self._id = id
|
||||
self._name = name
|
||||
self._id = None
|
||||
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
|
||||
def id(self):
|
||||
|
@ -52,14 +52,34 @@ class User(object):
|
||||
'user_status': 'userStatus'
|
||||
}
|
||||
|
||||
self._id = id
|
||||
self._username = username
|
||||
self._first_name = first_name
|
||||
self._last_name = last_name
|
||||
self._email = email
|
||||
self._password = password
|
||||
self._phone = phone
|
||||
self._user_status = user_status
|
||||
self._id = None
|
||||
self._username = None
|
||||
self._first_name = None
|
||||
self._last_name = None
|
||||
self._email = None
|
||||
self._password = None
|
||||
self._phone = None
|
||||
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
|
||||
def id(self):
|
||||
|
@ -42,22 +42,21 @@ class EnumArraysTests(unittest.TestCase):
|
||||
#
|
||||
try:
|
||||
fish_or_crab = petstore_api.EnumArrays(just_symbol="<=")
|
||||
self.assertTrue(0)
|
||||
except ValueError:
|
||||
self.assertEqual(fish_or_crab.just_symbol, None)
|
||||
self.assertEqual(fish_or_crab.array_enum, None)
|
||||
self.assertTrue(1)
|
||||
|
||||
try:
|
||||
fish_or_crab = petstore_api.EnumArrays(just_symbol="$", array_enum=["dog"])
|
||||
self.assertTrue(0)
|
||||
except ValueError:
|
||||
self.assertEqual(fish_or_crab.just_symbol, None)
|
||||
self.assertEqual(fish_or_crab.array_enum, None)
|
||||
self.assertTrue(1)
|
||||
|
||||
|
||||
try:
|
||||
fish_or_crab = petstore_api.EnumArrays(just_symbol=["$"], array_enum=["dog"])
|
||||
self.assertTrue(0)
|
||||
except ValueError:
|
||||
self.assertEqual(fish_or_crab.just_symbol, None)
|
||||
self.assertEqual(fish_or_crab.array_enum, None)
|
||||
self.assertTrue(1)
|
||||
|
||||
|
||||
def test_enumarrays_setter(self):
|
||||
|
@ -46,8 +46,9 @@ class MapTestTests(unittest.TestCase):
|
||||
}
|
||||
try:
|
||||
map_enum_test = petstore_api.MapTest(map_of_enum_string=black_or_white_dict)
|
||||
self.assertTrue(0)
|
||||
except ValueError:
|
||||
self.assertEqual(map_enum_test, None)
|
||||
self.assertTrue(1)
|
||||
|
||||
|
||||
def test_maptest_setter(self):
|
||||
|
@ -1,5 +1,5 @@
|
||||
[tox]
|
||||
envlist = py27, py34
|
||||
envlist = py27, py3
|
||||
|
||||
[testenv]
|
||||
deps=-r{toxinidir}/requirements.txt
|
||||
|
@ -1,8 +1,8 @@
|
||||
package io.swagger.api;
|
||||
|
||||
import java.io.File;
|
||||
import io.swagger.model.ModelApiResponse;
|
||||
import io.swagger.model.Pet;
|
||||
import org.springframework.core.io.Resource;
|
||||
|
||||
import io.swagger.annotations.*;
|
||||
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.RequestPart;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import java.io.IOException;
|
||||
|
||||
import java.util.List;
|
||||
import javax.validation.constraints.*;
|
||||
@ -68,7 +69,7 @@ public interface PetApi {
|
||||
produces = "application/json",
|
||||
consumes = "application/json",
|
||||
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 = {
|
||||
@ -85,7 +86,7 @@ public interface PetApi {
|
||||
produces = "application/json",
|
||||
consumes = "application/json",
|
||||
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 = {
|
||||
@ -100,7 +101,7 @@ public interface PetApi {
|
||||
produces = "application/json",
|
||||
consumes = "application/json",
|
||||
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 = {
|
||||
@ -150,6 +151,6 @@ public interface PetApi {
|
||||
produces = "application/json",
|
||||
consumes = "multipart/form-data",
|
||||
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.RequestPart;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import java.io.IOException;
|
||||
|
||||
import java.util.List;
|
||||
import javax.validation.constraints.*;
|
||||
@ -43,7 +44,7 @@ public interface StoreApi {
|
||||
produces = "application/json",
|
||||
consumes = "application/json",
|
||||
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", })
|
||||
@ -56,7 +57,7 @@ public interface StoreApi {
|
||||
produces = "application/json",
|
||||
consumes = "application/json",
|
||||
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", })
|
||||
@ -68,6 +69,6 @@ public interface StoreApi {
|
||||
produces = "application/json",
|
||||
consumes = "application/json",
|
||||
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.RequestPart;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import java.io.IOException;
|
||||
|
||||
import java.util.List;
|
||||
import javax.validation.constraints.*;
|
||||
@ -76,7 +77,7 @@ public interface UserApi {
|
||||
produces = "application/json",
|
||||
consumes = "application/json",
|
||||
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", })
|
||||
@ -88,7 +89,7 @@ public interface UserApi {
|
||||
produces = "application/json",
|
||||
consumes = "application/json",
|
||||
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", })
|
||||
|
@ -1,8 +1,8 @@
|
||||
package io.swagger.api;
|
||||
|
||||
import java.io.File;
|
||||
import io.swagger.model.ModelApiResponse;
|
||||
import io.swagger.model.Pet;
|
||||
import org.springframework.core.io.Resource;
|
||||
|
||||
import io.swagger.annotations.*;
|
||||
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.RequestPart;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import java.io.IOException;
|
||||
|
||||
import java.util.List;
|
||||
import javax.validation.constraints.*;
|
||||
@ -68,7 +69,7 @@ public interface PetApi {
|
||||
produces = "application/json",
|
||||
consumes = "application/json",
|
||||
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 = {
|
||||
@ -85,7 +86,7 @@ public interface PetApi {
|
||||
produces = "application/json",
|
||||
consumes = "application/json",
|
||||
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 = {
|
||||
@ -100,7 +101,7 @@ public interface PetApi {
|
||||
produces = "application/json",
|
||||
consumes = "application/json",
|
||||
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 = {
|
||||
@ -150,6 +151,6 @@ public interface PetApi {
|
||||
produces = "application/json",
|
||||
consumes = "multipart/form-data",
|
||||
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.RequestPart;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import java.io.IOException;
|
||||
|
||||
import java.util.List;
|
||||
import javax.validation.constraints.*;
|
||||
@ -43,7 +44,7 @@ public interface StoreApi {
|
||||
produces = "application/json",
|
||||
consumes = "application/json",
|
||||
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", })
|
||||
@ -56,7 +57,7 @@ public interface StoreApi {
|
||||
produces = "application/json",
|
||||
consumes = "application/json",
|
||||
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", })
|
||||
@ -68,6 +69,6 @@ public interface StoreApi {
|
||||
produces = "application/json",
|
||||
consumes = "application/json",
|
||||
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.RequestPart;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import java.io.IOException;
|
||||
|
||||
import java.util.List;
|
||||
import javax.validation.constraints.*;
|
||||
@ -76,7 +77,7 @@ public interface UserApi {
|
||||
produces = "application/json",
|
||||
consumes = "application/json",
|
||||
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", })
|
||||
@ -88,7 +89,7 @@ public interface UserApi {
|
||||
produces = "application/json",
|
||||
consumes = "application/json",
|
||||
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", })
|
||||
|
@ -27,9 +27,9 @@ open class FakeAPI: APIBase {
|
||||
To test \"client\" model
|
||||
- PATCH /fake
|
||||
- To test \"client\" model
|
||||
- examples: [{example={
|
||||
- examples: [{contentType=application/json, example={
|
||||
"client" : "aeiou"
|
||||
}, contentType=application/json}]
|
||||
}}]
|
||||
|
||||
- parameter body: (body) client model
|
||||
|
||||
|
@ -26,9 +26,9 @@ open class Fake_classname_tags123API: APIBase {
|
||||
/**
|
||||
To test class name in snake case
|
||||
- PATCH /fake_classname_test
|
||||
- examples: [{example={
|
||||
- examples: [{contentType=application/json, example={
|
||||
"client" : "aeiou"
|
||||
}, contentType=application/json}]
|
||||
}}]
|
||||
|
||||
- parameter body: (body) client model
|
||||
|
||||
|
@ -122,7 +122,7 @@ open class PetAPI: APIBase {
|
||||
- OAuth:
|
||||
- type: oauth2
|
||||
- name: petstore_auth
|
||||
- examples: [{example=<Pet>
|
||||
- examples: [{contentType=application/xml, example=<Pet>
|
||||
<id>123456789</id>
|
||||
<name>doggie</name>
|
||||
<photoUrls>
|
||||
@ -131,21 +131,21 @@ open class PetAPI: APIBase {
|
||||
<tags>
|
||||
</tags>
|
||||
<status>aeiou</status>
|
||||
</Pet>, contentType=application/xml}, {example=[ {
|
||||
"tags" : [ {
|
||||
"id" : 1,
|
||||
"name" : "aeiou"
|
||||
} ],
|
||||
</Pet>}, {contentType=application/json, example=[ {
|
||||
"photoUrls" : [ "aeiou" ],
|
||||
"name" : "doggie",
|
||||
"id" : 0,
|
||||
"category" : {
|
||||
"id" : 6,
|
||||
"name" : "aeiou"
|
||||
"name" : "aeiou",
|
||||
"id" : 6
|
||||
},
|
||||
"status" : "available",
|
||||
"name" : "doggie",
|
||||
"photoUrls" : [ "aeiou" ]
|
||||
} ], contentType=application/json}]
|
||||
- examples: [{example=<Pet>
|
||||
"tags" : [ {
|
||||
"name" : "aeiou",
|
||||
"id" : 1
|
||||
} ],
|
||||
"status" : "available"
|
||||
} ]}]
|
||||
- examples: [{contentType=application/xml, example=<Pet>
|
||||
<id>123456789</id>
|
||||
<name>doggie</name>
|
||||
<photoUrls>
|
||||
@ -154,20 +154,20 @@ open class PetAPI: APIBase {
|
||||
<tags>
|
||||
</tags>
|
||||
<status>aeiou</status>
|
||||
</Pet>, contentType=application/xml}, {example=[ {
|
||||
"tags" : [ {
|
||||
"id" : 1,
|
||||
"name" : "aeiou"
|
||||
} ],
|
||||
</Pet>}, {contentType=application/json, example=[ {
|
||||
"photoUrls" : [ "aeiou" ],
|
||||
"name" : "doggie",
|
||||
"id" : 0,
|
||||
"category" : {
|
||||
"id" : 6,
|
||||
"name" : "aeiou"
|
||||
"name" : "aeiou",
|
||||
"id" : 6
|
||||
},
|
||||
"status" : "available",
|
||||
"name" : "doggie",
|
||||
"photoUrls" : [ "aeiou" ]
|
||||
} ], contentType=application/json}]
|
||||
"tags" : [ {
|
||||
"name" : "aeiou",
|
||||
"id" : 1
|
||||
} ],
|
||||
"status" : "available"
|
||||
} ]}]
|
||||
|
||||
- parameter status: (query) Status values that need to be considered for filter
|
||||
|
||||
@ -209,7 +209,7 @@ open class PetAPI: APIBase {
|
||||
- OAuth:
|
||||
- type: oauth2
|
||||
- name: petstore_auth
|
||||
- examples: [{example=<Pet>
|
||||
- examples: [{contentType=application/xml, example=<Pet>
|
||||
<id>123456789</id>
|
||||
<name>doggie</name>
|
||||
<photoUrls>
|
||||
@ -218,21 +218,21 @@ open class PetAPI: APIBase {
|
||||
<tags>
|
||||
</tags>
|
||||
<status>aeiou</status>
|
||||
</Pet>, contentType=application/xml}, {example=[ {
|
||||
"tags" : [ {
|
||||
"id" : 1,
|
||||
"name" : "aeiou"
|
||||
} ],
|
||||
</Pet>}, {contentType=application/json, example=[ {
|
||||
"photoUrls" : [ "aeiou" ],
|
||||
"name" : "doggie",
|
||||
"id" : 0,
|
||||
"category" : {
|
||||
"id" : 6,
|
||||
"name" : "aeiou"
|
||||
"name" : "aeiou",
|
||||
"id" : 6
|
||||
},
|
||||
"status" : "available",
|
||||
"name" : "doggie",
|
||||
"photoUrls" : [ "aeiou" ]
|
||||
} ], contentType=application/json}]
|
||||
- examples: [{example=<Pet>
|
||||
"tags" : [ {
|
||||
"name" : "aeiou",
|
||||
"id" : 1
|
||||
} ],
|
||||
"status" : "available"
|
||||
} ]}]
|
||||
- examples: [{contentType=application/xml, example=<Pet>
|
||||
<id>123456789</id>
|
||||
<name>doggie</name>
|
||||
<photoUrls>
|
||||
@ -241,20 +241,20 @@ open class PetAPI: APIBase {
|
||||
<tags>
|
||||
</tags>
|
||||
<status>aeiou</status>
|
||||
</Pet>, contentType=application/xml}, {example=[ {
|
||||
"tags" : [ {
|
||||
"id" : 1,
|
||||
"name" : "aeiou"
|
||||
} ],
|
||||
</Pet>}, {contentType=application/json, example=[ {
|
||||
"photoUrls" : [ "aeiou" ],
|
||||
"name" : "doggie",
|
||||
"id" : 0,
|
||||
"category" : {
|
||||
"id" : 6,
|
||||
"name" : "aeiou"
|
||||
"name" : "aeiou",
|
||||
"id" : 6
|
||||
},
|
||||
"status" : "available",
|
||||
"name" : "doggie",
|
||||
"photoUrls" : [ "aeiou" ]
|
||||
} ], contentType=application/json}]
|
||||
"tags" : [ {
|
||||
"name" : "aeiou",
|
||||
"id" : 1
|
||||
} ],
|
||||
"status" : "available"
|
||||
} ]}]
|
||||
|
||||
- parameter tags: (query) Tags to filter by
|
||||
|
||||
@ -296,7 +296,7 @@ open class PetAPI: APIBase {
|
||||
- API Key:
|
||||
- type: apiKey api_key
|
||||
- name: api_key
|
||||
- examples: [{example=<Pet>
|
||||
- examples: [{contentType=application/xml, example=<Pet>
|
||||
<id>123456789</id>
|
||||
<name>doggie</name>
|
||||
<photoUrls>
|
||||
@ -305,21 +305,21 @@ open class PetAPI: APIBase {
|
||||
<tags>
|
||||
</tags>
|
||||
<status>aeiou</status>
|
||||
</Pet>, contentType=application/xml}, {example={
|
||||
"tags" : [ {
|
||||
"id" : 1,
|
||||
"name" : "aeiou"
|
||||
} ],
|
||||
</Pet>}, {contentType=application/json, example={
|
||||
"photoUrls" : [ "aeiou" ],
|
||||
"name" : "doggie",
|
||||
"id" : 0,
|
||||
"category" : {
|
||||
"id" : 6,
|
||||
"name" : "aeiou"
|
||||
"name" : "aeiou",
|
||||
"id" : 6
|
||||
},
|
||||
"status" : "available",
|
||||
"name" : "doggie",
|
||||
"photoUrls" : [ "aeiou" ]
|
||||
}, contentType=application/json}]
|
||||
- examples: [{example=<Pet>
|
||||
"tags" : [ {
|
||||
"name" : "aeiou",
|
||||
"id" : 1
|
||||
} ],
|
||||
"status" : "available"
|
||||
}}]
|
||||
- examples: [{contentType=application/xml, example=<Pet>
|
||||
<id>123456789</id>
|
||||
<name>doggie</name>
|
||||
<photoUrls>
|
||||
@ -328,20 +328,20 @@ open class PetAPI: APIBase {
|
||||
<tags>
|
||||
</tags>
|
||||
<status>aeiou</status>
|
||||
</Pet>, contentType=application/xml}, {example={
|
||||
"tags" : [ {
|
||||
"id" : 1,
|
||||
"name" : "aeiou"
|
||||
} ],
|
||||
</Pet>}, {contentType=application/json, example={
|
||||
"photoUrls" : [ "aeiou" ],
|
||||
"name" : "doggie",
|
||||
"id" : 0,
|
||||
"category" : {
|
||||
"id" : 6,
|
||||
"name" : "aeiou"
|
||||
"name" : "aeiou",
|
||||
"id" : 6
|
||||
},
|
||||
"status" : "available",
|
||||
"name" : "doggie",
|
||||
"photoUrls" : [ "aeiou" ]
|
||||
}, contentType=application/json}]
|
||||
"tags" : [ {
|
||||
"name" : "aeiou",
|
||||
"id" : 1
|
||||
} ],
|
||||
"status" : "available"
|
||||
}}]
|
||||
|
||||
- parameter petId: (path) ID of pet to return
|
||||
|
||||
@ -470,11 +470,11 @@ open class PetAPI: APIBase {
|
||||
- OAuth:
|
||||
- type: oauth2
|
||||
- name: petstore_auth
|
||||
- examples: [{example={
|
||||
"message" : "aeiou",
|
||||
- examples: [{contentType=application/json, example={
|
||||
"code" : 0,
|
||||
"type" : "aeiou"
|
||||
}, contentType=application/json}]
|
||||
"type" : "aeiou",
|
||||
"message" : "aeiou"
|
||||
}}]
|
||||
|
||||
- parameter petId: (path) ID of pet to update
|
||||
- parameter additionalMetadata: (form) Additional data to pass to server (optional)
|
||||
|
@ -65,9 +65,9 @@ open class StoreAPI: APIBase {
|
||||
- API Key:
|
||||
- type: apiKey api_key
|
||||
- name: api_key
|
||||
- examples: [{example={
|
||||
- examples: [{contentType=application/json, example={
|
||||
"key" : 0
|
||||
}, contentType=application/json}]
|
||||
}}]
|
||||
|
||||
- returns: RequestBuilder<[String:Int32]>
|
||||
*/
|
||||
@ -101,36 +101,36 @@ open class StoreAPI: APIBase {
|
||||
Find purchase order by ID
|
||||
- GET /store/order/{order_id}
|
||||
- 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>
|
||||
<petId>123456789</petId>
|
||||
<quantity>123</quantity>
|
||||
<shipDate>2000-01-23T04:56:07.000Z</shipDate>
|
||||
<status>aeiou</status>
|
||||
<complete>true</complete>
|
||||
</Order>, contentType=application/xml}, {example={
|
||||
"id" : 0,
|
||||
</Order>}, {contentType=application/json, example={
|
||||
"petId" : 6,
|
||||
"complete" : false,
|
||||
"status" : "placed",
|
||||
"quantity" : 1,
|
||||
"shipDate" : "2000-01-23T04:56:07.000+00:00"
|
||||
}, contentType=application/json}]
|
||||
- examples: [{example=<Order>
|
||||
"id" : 0,
|
||||
"shipDate" : "2000-01-23T04:56:07.000+00:00",
|
||||
"complete" : false,
|
||||
"status" : "placed"
|
||||
}}]
|
||||
- examples: [{contentType=application/xml, example=<Order>
|
||||
<id>123456789</id>
|
||||
<petId>123456789</petId>
|
||||
<quantity>123</quantity>
|
||||
<shipDate>2000-01-23T04:56:07.000Z</shipDate>
|
||||
<status>aeiou</status>
|
||||
<complete>true</complete>
|
||||
</Order>, contentType=application/xml}, {example={
|
||||
"id" : 0,
|
||||
</Order>}, {contentType=application/json, example={
|
||||
"petId" : 6,
|
||||
"complete" : false,
|
||||
"status" : "placed",
|
||||
"quantity" : 1,
|
||||
"shipDate" : "2000-01-23T04:56:07.000+00:00"
|
||||
}, contentType=application/json}]
|
||||
"id" : 0,
|
||||
"shipDate" : "2000-01-23T04:56:07.000+00:00",
|
||||
"complete" : false,
|
||||
"status" : "placed"
|
||||
}}]
|
||||
|
||||
- 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
|
||||
- POST /store/order
|
||||
-
|
||||
- examples: [{example=<Order>
|
||||
- examples: [{contentType=application/xml, example=<Order>
|
||||
<id>123456789</id>
|
||||
<petId>123456789</petId>
|
||||
<quantity>123</quantity>
|
||||
<shipDate>2000-01-23T04:56:07.000Z</shipDate>
|
||||
<status>aeiou</status>
|
||||
<complete>true</complete>
|
||||
</Order>, contentType=application/xml}, {example={
|
||||
"id" : 0,
|
||||
</Order>}, {contentType=application/json, example={
|
||||
"petId" : 6,
|
||||
"complete" : false,
|
||||
"status" : "placed",
|
||||
"quantity" : 1,
|
||||
"shipDate" : "2000-01-23T04:56:07.000+00:00"
|
||||
}, contentType=application/json}]
|
||||
- examples: [{example=<Order>
|
||||
"id" : 0,
|
||||
"shipDate" : "2000-01-23T04:56:07.000+00:00",
|
||||
"complete" : false,
|
||||
"status" : "placed"
|
||||
}}]
|
||||
- examples: [{contentType=application/xml, example=<Order>
|
||||
<id>123456789</id>
|
||||
<petId>123456789</petId>
|
||||
<quantity>123</quantity>
|
||||
<shipDate>2000-01-23T04:56:07.000Z</shipDate>
|
||||
<status>aeiou</status>
|
||||
<complete>true</complete>
|
||||
</Order>, contentType=application/xml}, {example={
|
||||
"id" : 0,
|
||||
</Order>}, {contentType=application/json, example={
|
||||
"petId" : 6,
|
||||
"complete" : false,
|
||||
"status" : "placed",
|
||||
"quantity" : 1,
|
||||
"shipDate" : "2000-01-23T04:56:07.000+00:00"
|
||||
}, contentType=application/json}]
|
||||
"id" : 0,
|
||||
"shipDate" : "2000-01-23T04:56:07.000+00:00",
|
||||
"complete" : false,
|
||||
"status" : "placed"
|
||||
}}]
|
||||
|
||||
- parameter body: (body) order placed for purchasing the pet
|
||||
|
||||
|
@ -168,7 +168,7 @@ open class UserAPI: APIBase {
|
||||
Get user by user name
|
||||
- GET /user/{username}
|
||||
-
|
||||
- examples: [{example=<User>
|
||||
- examples: [{contentType=application/xml, example=<User>
|
||||
<id>123456789</id>
|
||||
<username>aeiou</username>
|
||||
<firstName>aeiou</firstName>
|
||||
@ -177,17 +177,17 @@ open class UserAPI: APIBase {
|
||||
<password>aeiou</password>
|
||||
<phone>aeiou</phone>
|
||||
<userStatus>123</userStatus>
|
||||
</User>, contentType=application/xml}, {example={
|
||||
"id" : 0,
|
||||
"lastName" : "aeiou",
|
||||
"phone" : "aeiou",
|
||||
"username" : "aeiou",
|
||||
"email" : "aeiou",
|
||||
"userStatus" : 6,
|
||||
</User>}, {contentType=application/json, example={
|
||||
"firstName" : "aeiou",
|
||||
"password" : "aeiou"
|
||||
}, contentType=application/json}]
|
||||
- examples: [{example=<User>
|
||||
"lastName" : "aeiou",
|
||||
"password" : "aeiou",
|
||||
"userStatus" : 6,
|
||||
"phone" : "aeiou",
|
||||
"id" : 0,
|
||||
"email" : "aeiou",
|
||||
"username" : "aeiou"
|
||||
}}]
|
||||
- examples: [{contentType=application/xml, example=<User>
|
||||
<id>123456789</id>
|
||||
<username>aeiou</username>
|
||||
<firstName>aeiou</firstName>
|
||||
@ -196,16 +196,16 @@ open class UserAPI: APIBase {
|
||||
<password>aeiou</password>
|
||||
<phone>aeiou</phone>
|
||||
<userStatus>123</userStatus>
|
||||
</User>, contentType=application/xml}, {example={
|
||||
"id" : 0,
|
||||
"lastName" : "aeiou",
|
||||
"phone" : "aeiou",
|
||||
"username" : "aeiou",
|
||||
"email" : "aeiou",
|
||||
"userStatus" : 6,
|
||||
</User>}, {contentType=application/json, example={
|
||||
"firstName" : "aeiou",
|
||||
"password" : "aeiou"
|
||||
}, contentType=application/json}]
|
||||
"lastName" : "aeiou",
|
||||
"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.
|
||||
|
||||
@ -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)]
|
||||
- examples: [{example=aeiou, contentType=application/xml}, {example="aeiou", contentType=application/json}]
|
||||
- examples: [{example=aeiou, contentType=application/xml}, {example="aeiou", contentType=application/json}]
|
||||
- examples: [{contentType=application/xml, example=aeiou}, {contentType=application/json, example="aeiou"}]
|
||||
- examples: [{contentType=application/xml, example=aeiou}, {contentType=application/json, example="aeiou"}]
|
||||
|
||||
- parameter username: (query) The user name for login
|
||||
- parameter password: (query) The password for login in clear text
|
||||
|
@ -252,7 +252,6 @@ class Decoders {
|
||||
}
|
||||
|
||||
// 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)
|
||||
}
|
||||
// Decoder for AdditionalPropertiesClass
|
||||
@ -280,7 +279,6 @@ class Decoders {
|
||||
|
||||
|
||||
// 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)
|
||||
}
|
||||
// Decoder for Animal
|
||||
@ -315,7 +313,6 @@ class Decoders {
|
||||
|
||||
|
||||
// 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)
|
||||
}
|
||||
// Decoder for ApiResponse
|
||||
@ -349,7 +346,6 @@ class Decoders {
|
||||
|
||||
|
||||
// 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)
|
||||
}
|
||||
// Decoder for ArrayOfArrayOfNumberOnly
|
||||
@ -371,7 +367,6 @@ class Decoders {
|
||||
|
||||
|
||||
// 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)
|
||||
}
|
||||
// Decoder for ArrayOfNumberOnly
|
||||
@ -393,7 +388,6 @@ class Decoders {
|
||||
|
||||
|
||||
// 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)
|
||||
}
|
||||
// Decoder for ArrayTest
|
||||
@ -427,7 +421,6 @@ class Decoders {
|
||||
|
||||
|
||||
// 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)
|
||||
}
|
||||
// Decoder for Capitalization
|
||||
@ -479,7 +472,6 @@ class Decoders {
|
||||
|
||||
|
||||
// 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)
|
||||
}
|
||||
// Decoder for Cat
|
||||
@ -516,7 +508,6 @@ class Decoders {
|
||||
|
||||
|
||||
// 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)
|
||||
}
|
||||
// Decoder for Category
|
||||
@ -544,7 +535,6 @@ class Decoders {
|
||||
|
||||
|
||||
// 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)
|
||||
}
|
||||
// Decoder for ClassModel
|
||||
@ -566,7 +556,6 @@ class Decoders {
|
||||
|
||||
|
||||
// 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)
|
||||
}
|
||||
// Decoder for Client
|
||||
@ -588,7 +577,6 @@ class Decoders {
|
||||
|
||||
|
||||
// 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)
|
||||
}
|
||||
// Decoder for Dog
|
||||
@ -625,7 +613,6 @@ class Decoders {
|
||||
|
||||
|
||||
// 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)
|
||||
}
|
||||
// Decoder for EnumArrays
|
||||
@ -653,7 +640,6 @@ class Decoders {
|
||||
|
||||
|
||||
// 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)
|
||||
}
|
||||
// Decoder for EnumClass
|
||||
@ -664,7 +650,6 @@ class Decoders {
|
||||
|
||||
|
||||
// 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)
|
||||
}
|
||||
// Decoder for EnumTest
|
||||
@ -704,7 +689,6 @@ class Decoders {
|
||||
|
||||
|
||||
// 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)
|
||||
}
|
||||
// Decoder for FormatTest
|
||||
@ -798,7 +782,6 @@ class Decoders {
|
||||
|
||||
|
||||
// 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)
|
||||
}
|
||||
// Decoder for HasOnlyReadOnly
|
||||
@ -826,7 +809,6 @@ class Decoders {
|
||||
|
||||
|
||||
// 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)
|
||||
}
|
||||
// Decoder for List
|
||||
@ -848,7 +830,6 @@ class Decoders {
|
||||
|
||||
|
||||
// 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)
|
||||
}
|
||||
// Decoder for MapTest
|
||||
@ -876,7 +857,6 @@ class Decoders {
|
||||
|
||||
|
||||
// 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)
|
||||
}
|
||||
// Decoder for MixedPropertiesAndAdditionalPropertiesClass
|
||||
@ -910,7 +890,6 @@ class Decoders {
|
||||
|
||||
|
||||
// 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)
|
||||
}
|
||||
// Decoder for Model200Response
|
||||
@ -938,7 +917,6 @@ class Decoders {
|
||||
|
||||
|
||||
// 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)
|
||||
}
|
||||
// Decoder for Name
|
||||
@ -978,7 +956,6 @@ class Decoders {
|
||||
|
||||
|
||||
// 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)
|
||||
}
|
||||
// Decoder for NumberOnly
|
||||
@ -1000,7 +977,6 @@ class Decoders {
|
||||
|
||||
|
||||
// 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)
|
||||
}
|
||||
// Decoder for Order
|
||||
@ -1052,7 +1028,6 @@ class Decoders {
|
||||
|
||||
|
||||
// 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)
|
||||
}
|
||||
// Decoder for OuterEnum
|
||||
@ -1063,7 +1038,6 @@ class Decoders {
|
||||
|
||||
|
||||
// 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)
|
||||
}
|
||||
// Decoder for Pet
|
||||
@ -1115,7 +1089,6 @@ class Decoders {
|
||||
|
||||
|
||||
// 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)
|
||||
}
|
||||
// Decoder for ReadOnlyFirst
|
||||
@ -1143,7 +1116,6 @@ class Decoders {
|
||||
|
||||
|
||||
// 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)
|
||||
}
|
||||
// Decoder for Return
|
||||
@ -1165,7 +1137,6 @@ class Decoders {
|
||||
|
||||
|
||||
// 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)
|
||||
}
|
||||
// Decoder for SpecialModelName
|
||||
@ -1187,7 +1158,6 @@ class Decoders {
|
||||
|
||||
|
||||
// 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)
|
||||
}
|
||||
// Decoder for Tag
|
||||
@ -1215,7 +1185,6 @@ class Decoders {
|
||||
|
||||
|
||||
// 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)
|
||||
}
|
||||
// Decoder for User
|
||||
|
@ -45,9 +45,9 @@ open class FakeAPI: APIBase {
|
||||
To test \"client\" model
|
||||
- PATCH /fake
|
||||
- To test \"client\" model
|
||||
- examples: [{example={
|
||||
- examples: [{contentType=application/json, example={
|
||||
"client" : "aeiou"
|
||||
}, contentType=application/json}]
|
||||
}}]
|
||||
|
||||
- parameter body: (body) client model
|
||||
|
||||
|
@ -44,9 +44,9 @@ open class Fake_classname_tags123API: APIBase {
|
||||
/**
|
||||
To test class name in snake case
|
||||
- PATCH /fake_classname_test
|
||||
- examples: [{example={
|
||||
- examples: [{contentType=application/json, example={
|
||||
"client" : "aeiou"
|
||||
}, contentType=application/json}]
|
||||
}}]
|
||||
|
||||
- parameter body: (body) client model
|
||||
|
||||
|
@ -175,7 +175,7 @@ open class PetAPI: APIBase {
|
||||
- OAuth:
|
||||
- type: oauth2
|
||||
- name: petstore_auth
|
||||
- examples: [{example=<Pet>
|
||||
- examples: [{contentType=application/xml, example=<Pet>
|
||||
<id>123456789</id>
|
||||
<name>doggie</name>
|
||||
<photoUrls>
|
||||
@ -184,21 +184,21 @@ open class PetAPI: APIBase {
|
||||
<tags>
|
||||
</tags>
|
||||
<status>aeiou</status>
|
||||
</Pet>, contentType=application/xml}, {example=[ {
|
||||
"tags" : [ {
|
||||
"id" : 1,
|
||||
"name" : "aeiou"
|
||||
} ],
|
||||
</Pet>}, {contentType=application/json, example=[ {
|
||||
"photoUrls" : [ "aeiou" ],
|
||||
"name" : "doggie",
|
||||
"id" : 0,
|
||||
"category" : {
|
||||
"id" : 6,
|
||||
"name" : "aeiou"
|
||||
"name" : "aeiou",
|
||||
"id" : 6
|
||||
},
|
||||
"status" : "available",
|
||||
"name" : "doggie",
|
||||
"photoUrls" : [ "aeiou" ]
|
||||
} ], contentType=application/json}]
|
||||
- examples: [{example=<Pet>
|
||||
"tags" : [ {
|
||||
"name" : "aeiou",
|
||||
"id" : 1
|
||||
} ],
|
||||
"status" : "available"
|
||||
} ]}]
|
||||
- examples: [{contentType=application/xml, example=<Pet>
|
||||
<id>123456789</id>
|
||||
<name>doggie</name>
|
||||
<photoUrls>
|
||||
@ -207,20 +207,20 @@ open class PetAPI: APIBase {
|
||||
<tags>
|
||||
</tags>
|
||||
<status>aeiou</status>
|
||||
</Pet>, contentType=application/xml}, {example=[ {
|
||||
"tags" : [ {
|
||||
"id" : 1,
|
||||
"name" : "aeiou"
|
||||
} ],
|
||||
</Pet>}, {contentType=application/json, example=[ {
|
||||
"photoUrls" : [ "aeiou" ],
|
||||
"name" : "doggie",
|
||||
"id" : 0,
|
||||
"category" : {
|
||||
"id" : 6,
|
||||
"name" : "aeiou"
|
||||
"name" : "aeiou",
|
||||
"id" : 6
|
||||
},
|
||||
"status" : "available",
|
||||
"name" : "doggie",
|
||||
"photoUrls" : [ "aeiou" ]
|
||||
} ], contentType=application/json}]
|
||||
"tags" : [ {
|
||||
"name" : "aeiou",
|
||||
"id" : 1
|
||||
} ],
|
||||
"status" : "available"
|
||||
} ]}]
|
||||
|
||||
- parameter status: (query) Status values that need to be considered for filter
|
||||
|
||||
@ -279,7 +279,7 @@ open class PetAPI: APIBase {
|
||||
- OAuth:
|
||||
- type: oauth2
|
||||
- name: petstore_auth
|
||||
- examples: [{example=<Pet>
|
||||
- examples: [{contentType=application/xml, example=<Pet>
|
||||
<id>123456789</id>
|
||||
<name>doggie</name>
|
||||
<photoUrls>
|
||||
@ -288,21 +288,21 @@ open class PetAPI: APIBase {
|
||||
<tags>
|
||||
</tags>
|
||||
<status>aeiou</status>
|
||||
</Pet>, contentType=application/xml}, {example=[ {
|
||||
"tags" : [ {
|
||||
"id" : 1,
|
||||
"name" : "aeiou"
|
||||
} ],
|
||||
</Pet>}, {contentType=application/json, example=[ {
|
||||
"photoUrls" : [ "aeiou" ],
|
||||
"name" : "doggie",
|
||||
"id" : 0,
|
||||
"category" : {
|
||||
"id" : 6,
|
||||
"name" : "aeiou"
|
||||
"name" : "aeiou",
|
||||
"id" : 6
|
||||
},
|
||||
"status" : "available",
|
||||
"name" : "doggie",
|
||||
"photoUrls" : [ "aeiou" ]
|
||||
} ], contentType=application/json}]
|
||||
- examples: [{example=<Pet>
|
||||
"tags" : [ {
|
||||
"name" : "aeiou",
|
||||
"id" : 1
|
||||
} ],
|
||||
"status" : "available"
|
||||
} ]}]
|
||||
- examples: [{contentType=application/xml, example=<Pet>
|
||||
<id>123456789</id>
|
||||
<name>doggie</name>
|
||||
<photoUrls>
|
||||
@ -311,20 +311,20 @@ open class PetAPI: APIBase {
|
||||
<tags>
|
||||
</tags>
|
||||
<status>aeiou</status>
|
||||
</Pet>, contentType=application/xml}, {example=[ {
|
||||
"tags" : [ {
|
||||
"id" : 1,
|
||||
"name" : "aeiou"
|
||||
} ],
|
||||
</Pet>}, {contentType=application/json, example=[ {
|
||||
"photoUrls" : [ "aeiou" ],
|
||||
"name" : "doggie",
|
||||
"id" : 0,
|
||||
"category" : {
|
||||
"id" : 6,
|
||||
"name" : "aeiou"
|
||||
"name" : "aeiou",
|
||||
"id" : 6
|
||||
},
|
||||
"status" : "available",
|
||||
"name" : "doggie",
|
||||
"photoUrls" : [ "aeiou" ]
|
||||
} ], contentType=application/json}]
|
||||
"tags" : [ {
|
||||
"name" : "aeiou",
|
||||
"id" : 1
|
||||
} ],
|
||||
"status" : "available"
|
||||
} ]}]
|
||||
|
||||
- parameter tags: (query) Tags to filter by
|
||||
|
||||
@ -383,7 +383,7 @@ open class PetAPI: APIBase {
|
||||
- API Key:
|
||||
- type: apiKey api_key
|
||||
- name: api_key
|
||||
- examples: [{example=<Pet>
|
||||
- examples: [{contentType=application/xml, example=<Pet>
|
||||
<id>123456789</id>
|
||||
<name>doggie</name>
|
||||
<photoUrls>
|
||||
@ -392,21 +392,21 @@ open class PetAPI: APIBase {
|
||||
<tags>
|
||||
</tags>
|
||||
<status>aeiou</status>
|
||||
</Pet>, contentType=application/xml}, {example={
|
||||
"tags" : [ {
|
||||
"id" : 1,
|
||||
"name" : "aeiou"
|
||||
} ],
|
||||
</Pet>}, {contentType=application/json, example={
|
||||
"photoUrls" : [ "aeiou" ],
|
||||
"name" : "doggie",
|
||||
"id" : 0,
|
||||
"category" : {
|
||||
"id" : 6,
|
||||
"name" : "aeiou"
|
||||
"name" : "aeiou",
|
||||
"id" : 6
|
||||
},
|
||||
"status" : "available",
|
||||
"name" : "doggie",
|
||||
"photoUrls" : [ "aeiou" ]
|
||||
}, contentType=application/json}]
|
||||
- examples: [{example=<Pet>
|
||||
"tags" : [ {
|
||||
"name" : "aeiou",
|
||||
"id" : 1
|
||||
} ],
|
||||
"status" : "available"
|
||||
}}]
|
||||
- examples: [{contentType=application/xml, example=<Pet>
|
||||
<id>123456789</id>
|
||||
<name>doggie</name>
|
||||
<photoUrls>
|
||||
@ -415,20 +415,20 @@ open class PetAPI: APIBase {
|
||||
<tags>
|
||||
</tags>
|
||||
<status>aeiou</status>
|
||||
</Pet>, contentType=application/xml}, {example={
|
||||
"tags" : [ {
|
||||
"id" : 1,
|
||||
"name" : "aeiou"
|
||||
} ],
|
||||
</Pet>}, {contentType=application/json, example={
|
||||
"photoUrls" : [ "aeiou" ],
|
||||
"name" : "doggie",
|
||||
"id" : 0,
|
||||
"category" : {
|
||||
"id" : 6,
|
||||
"name" : "aeiou"
|
||||
"name" : "aeiou",
|
||||
"id" : 6
|
||||
},
|
||||
"status" : "available",
|
||||
"name" : "doggie",
|
||||
"photoUrls" : [ "aeiou" ]
|
||||
}, contentType=application/json}]
|
||||
"tags" : [ {
|
||||
"name" : "aeiou",
|
||||
"id" : 1
|
||||
} ],
|
||||
"status" : "available"
|
||||
}}]
|
||||
|
||||
- parameter petId: (path) ID of pet to return
|
||||
|
||||
@ -612,11 +612,11 @@ open class PetAPI: APIBase {
|
||||
- OAuth:
|
||||
- type: oauth2
|
||||
- name: petstore_auth
|
||||
- examples: [{example={
|
||||
"message" : "aeiou",
|
||||
- examples: [{contentType=application/json, example={
|
||||
"code" : 0,
|
||||
"type" : "aeiou"
|
||||
}, contentType=application/json}]
|
||||
"type" : "aeiou",
|
||||
"message" : "aeiou"
|
||||
}}]
|
||||
|
||||
- parameter petId: (path) ID of pet to update
|
||||
- parameter additionalMetadata: (form) Additional data to pass to server (optional)
|
||||
|
@ -99,9 +99,9 @@ open class StoreAPI: APIBase {
|
||||
- API Key:
|
||||
- type: apiKey api_key
|
||||
- name: api_key
|
||||
- examples: [{example={
|
||||
- examples: [{contentType=application/json, example={
|
||||
"key" : 0
|
||||
}, contentType=application/json}]
|
||||
}}]
|
||||
|
||||
- returns: RequestBuilder<[String:Int32]>
|
||||
*/
|
||||
@ -152,36 +152,36 @@ open class StoreAPI: APIBase {
|
||||
Find purchase order by ID
|
||||
- GET /store/order/{order_id}
|
||||
- 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>
|
||||
<petId>123456789</petId>
|
||||
<quantity>123</quantity>
|
||||
<shipDate>2000-01-23T04:56:07.000Z</shipDate>
|
||||
<status>aeiou</status>
|
||||
<complete>true</complete>
|
||||
</Order>, contentType=application/xml}, {example={
|
||||
"id" : 0,
|
||||
</Order>}, {contentType=application/json, example={
|
||||
"petId" : 6,
|
||||
"complete" : false,
|
||||
"status" : "placed",
|
||||
"quantity" : 1,
|
||||
"shipDate" : "2000-01-23T04:56:07.000+00:00"
|
||||
}, contentType=application/json}]
|
||||
- examples: [{example=<Order>
|
||||
"id" : 0,
|
||||
"shipDate" : "2000-01-23T04:56:07.000+00:00",
|
||||
"complete" : false,
|
||||
"status" : "placed"
|
||||
}}]
|
||||
- examples: [{contentType=application/xml, example=<Order>
|
||||
<id>123456789</id>
|
||||
<petId>123456789</petId>
|
||||
<quantity>123</quantity>
|
||||
<shipDate>2000-01-23T04:56:07.000Z</shipDate>
|
||||
<status>aeiou</status>
|
||||
<complete>true</complete>
|
||||
</Order>, contentType=application/xml}, {example={
|
||||
"id" : 0,
|
||||
</Order>}, {contentType=application/json, example={
|
||||
"petId" : 6,
|
||||
"complete" : false,
|
||||
"status" : "placed",
|
||||
"quantity" : 1,
|
||||
"shipDate" : "2000-01-23T04:56:07.000+00:00"
|
||||
}, contentType=application/json}]
|
||||
"id" : 0,
|
||||
"shipDate" : "2000-01-23T04:56:07.000+00:00",
|
||||
"complete" : false,
|
||||
"status" : "placed"
|
||||
}}]
|
||||
|
||||
- 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
|
||||
- POST /store/order
|
||||
-
|
||||
- examples: [{example=<Order>
|
||||
- examples: [{contentType=application/xml, example=<Order>
|
||||
<id>123456789</id>
|
||||
<petId>123456789</petId>
|
||||
<quantity>123</quantity>
|
||||
<shipDate>2000-01-23T04:56:07.000Z</shipDate>
|
||||
<status>aeiou</status>
|
||||
<complete>true</complete>
|
||||
</Order>, contentType=application/xml}, {example={
|
||||
"id" : 0,
|
||||
</Order>}, {contentType=application/json, example={
|
||||
"petId" : 6,
|
||||
"complete" : false,
|
||||
"status" : "placed",
|
||||
"quantity" : 1,
|
||||
"shipDate" : "2000-01-23T04:56:07.000+00:00"
|
||||
}, contentType=application/json}]
|
||||
- examples: [{example=<Order>
|
||||
"id" : 0,
|
||||
"shipDate" : "2000-01-23T04:56:07.000+00:00",
|
||||
"complete" : false,
|
||||
"status" : "placed"
|
||||
}}]
|
||||
- examples: [{contentType=application/xml, example=<Order>
|
||||
<id>123456789</id>
|
||||
<petId>123456789</petId>
|
||||
<quantity>123</quantity>
|
||||
<shipDate>2000-01-23T04:56:07.000Z</shipDate>
|
||||
<status>aeiou</status>
|
||||
<complete>true</complete>
|
||||
</Order>, contentType=application/xml}, {example={
|
||||
"id" : 0,
|
||||
</Order>}, {contentType=application/json, example={
|
||||
"petId" : 6,
|
||||
"complete" : false,
|
||||
"status" : "placed",
|
||||
"quantity" : 1,
|
||||
"shipDate" : "2000-01-23T04:56:07.000+00:00"
|
||||
}, contentType=application/json}]
|
||||
"id" : 0,
|
||||
"shipDate" : "2000-01-23T04:56:07.000+00:00",
|
||||
"complete" : false,
|
||||
"status" : "placed"
|
||||
}}]
|
||||
|
||||
- parameter body: (body) order placed for purchasing the pet
|
||||
|
||||
|
@ -254,7 +254,7 @@ open class UserAPI: APIBase {
|
||||
Get user by user name
|
||||
- GET /user/{username}
|
||||
-
|
||||
- examples: [{example=<User>
|
||||
- examples: [{contentType=application/xml, example=<User>
|
||||
<id>123456789</id>
|
||||
<username>aeiou</username>
|
||||
<firstName>aeiou</firstName>
|
||||
@ -263,17 +263,17 @@ open class UserAPI: APIBase {
|
||||
<password>aeiou</password>
|
||||
<phone>aeiou</phone>
|
||||
<userStatus>123</userStatus>
|
||||
</User>, contentType=application/xml}, {example={
|
||||
"id" : 0,
|
||||
"lastName" : "aeiou",
|
||||
"phone" : "aeiou",
|
||||
"username" : "aeiou",
|
||||
"email" : "aeiou",
|
||||
"userStatus" : 6,
|
||||
</User>}, {contentType=application/json, example={
|
||||
"firstName" : "aeiou",
|
||||
"password" : "aeiou"
|
||||
}, contentType=application/json}]
|
||||
- examples: [{example=<User>
|
||||
"lastName" : "aeiou",
|
||||
"password" : "aeiou",
|
||||
"userStatus" : 6,
|
||||
"phone" : "aeiou",
|
||||
"id" : 0,
|
||||
"email" : "aeiou",
|
||||
"username" : "aeiou"
|
||||
}}]
|
||||
- examples: [{contentType=application/xml, example=<User>
|
||||
<id>123456789</id>
|
||||
<username>aeiou</username>
|
||||
<firstName>aeiou</firstName>
|
||||
@ -282,16 +282,16 @@ open class UserAPI: APIBase {
|
||||
<password>aeiou</password>
|
||||
<phone>aeiou</phone>
|
||||
<userStatus>123</userStatus>
|
||||
</User>, contentType=application/xml}, {example={
|
||||
"id" : 0,
|
||||
"lastName" : "aeiou",
|
||||
"phone" : "aeiou",
|
||||
"username" : "aeiou",
|
||||
"email" : "aeiou",
|
||||
"userStatus" : 6,
|
||||
</User>}, {contentType=application/json, example={
|
||||
"firstName" : "aeiou",
|
||||
"password" : "aeiou"
|
||||
}, contentType=application/json}]
|
||||
"lastName" : "aeiou",
|
||||
"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.
|
||||
|
||||
@ -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)]
|
||||
- examples: [{example=aeiou, contentType=application/xml}, {example="aeiou", contentType=application/json}]
|
||||
- examples: [{example=aeiou, contentType=application/xml}, {example="aeiou", contentType=application/json}]
|
||||
- examples: [{contentType=application/xml, example=aeiou}, {contentType=application/json, example="aeiou"}]
|
||||
- examples: [{contentType=application/xml, example=aeiou}, {contentType=application/json, example="aeiou"}]
|
||||
|
||||
- parameter username: (query) The user name for login
|
||||
- parameter password: (query) The password for login in clear text
|
||||
|
@ -252,7 +252,6 @@ class Decoders {
|
||||
}
|
||||
|
||||
// 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)
|
||||
}
|
||||
// Decoder for AdditionalPropertiesClass
|
||||
@ -280,7 +279,6 @@ class Decoders {
|
||||
|
||||
|
||||
// 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)
|
||||
}
|
||||
// Decoder for Animal
|
||||
@ -315,7 +313,6 @@ class Decoders {
|
||||
|
||||
|
||||
// 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)
|
||||
}
|
||||
// Decoder for ApiResponse
|
||||
@ -349,7 +346,6 @@ class Decoders {
|
||||
|
||||
|
||||
// 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)
|
||||
}
|
||||
// Decoder for ArrayOfArrayOfNumberOnly
|
||||
@ -371,7 +367,6 @@ class Decoders {
|
||||
|
||||
|
||||
// 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)
|
||||
}
|
||||
// Decoder for ArrayOfNumberOnly
|
||||
@ -393,7 +388,6 @@ class Decoders {
|
||||
|
||||
|
||||
// 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)
|
||||
}
|
||||
// Decoder for ArrayTest
|
||||
@ -427,7 +421,6 @@ class Decoders {
|
||||
|
||||
|
||||
// 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)
|
||||
}
|
||||
// Decoder for Capitalization
|
||||
@ -479,7 +472,6 @@ class Decoders {
|
||||
|
||||
|
||||
// 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)
|
||||
}
|
||||
// Decoder for Cat
|
||||
@ -516,7 +508,6 @@ class Decoders {
|
||||
|
||||
|
||||
// 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)
|
||||
}
|
||||
// Decoder for Category
|
||||
@ -544,7 +535,6 @@ class Decoders {
|
||||
|
||||
|
||||
// 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)
|
||||
}
|
||||
// Decoder for ClassModel
|
||||
@ -566,7 +556,6 @@ class Decoders {
|
||||
|
||||
|
||||
// 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)
|
||||
}
|
||||
// Decoder for Client
|
||||
@ -588,7 +577,6 @@ class Decoders {
|
||||
|
||||
|
||||
// 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)
|
||||
}
|
||||
// Decoder for Dog
|
||||
@ -625,7 +613,6 @@ class Decoders {
|
||||
|
||||
|
||||
// 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)
|
||||
}
|
||||
// Decoder for EnumArrays
|
||||
@ -653,7 +640,6 @@ class Decoders {
|
||||
|
||||
|
||||
// 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)
|
||||
}
|
||||
// Decoder for EnumClass
|
||||
@ -664,7 +650,6 @@ class Decoders {
|
||||
|
||||
|
||||
// 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)
|
||||
}
|
||||
// Decoder for EnumTest
|
||||
@ -704,7 +689,6 @@ class Decoders {
|
||||
|
||||
|
||||
// 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)
|
||||
}
|
||||
// Decoder for FormatTest
|
||||
@ -798,7 +782,6 @@ class Decoders {
|
||||
|
||||
|
||||
// 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)
|
||||
}
|
||||
// Decoder for HasOnlyReadOnly
|
||||
@ -826,7 +809,6 @@ class Decoders {
|
||||
|
||||
|
||||
// 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)
|
||||
}
|
||||
// Decoder for List
|
||||
@ -848,7 +830,6 @@ class Decoders {
|
||||
|
||||
|
||||
// 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)
|
||||
}
|
||||
// Decoder for MapTest
|
||||
@ -876,7 +857,6 @@ class Decoders {
|
||||
|
||||
|
||||
// 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)
|
||||
}
|
||||
// Decoder for MixedPropertiesAndAdditionalPropertiesClass
|
||||
@ -910,7 +890,6 @@ class Decoders {
|
||||
|
||||
|
||||
// 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)
|
||||
}
|
||||
// Decoder for Model200Response
|
||||
@ -938,7 +917,6 @@ class Decoders {
|
||||
|
||||
|
||||
// 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)
|
||||
}
|
||||
// Decoder for Name
|
||||
@ -978,7 +956,6 @@ class Decoders {
|
||||
|
||||
|
||||
// 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)
|
||||
}
|
||||
// Decoder for NumberOnly
|
||||
@ -1000,7 +977,6 @@ class Decoders {
|
||||
|
||||
|
||||
// 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)
|
||||
}
|
||||
// Decoder for Order
|
||||
@ -1052,7 +1028,6 @@ class Decoders {
|
||||
|
||||
|
||||
// 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)
|
||||
}
|
||||
// Decoder for OuterEnum
|
||||
@ -1063,7 +1038,6 @@ class Decoders {
|
||||
|
||||
|
||||
// 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)
|
||||
}
|
||||
// Decoder for Pet
|
||||
@ -1115,7 +1089,6 @@ class Decoders {
|
||||
|
||||
|
||||
// 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)
|
||||
}
|
||||
// Decoder for ReadOnlyFirst
|
||||
@ -1143,7 +1116,6 @@ class Decoders {
|
||||
|
||||
|
||||
// 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)
|
||||
}
|
||||
// Decoder for Return
|
||||
@ -1165,7 +1137,6 @@ class Decoders {
|
||||
|
||||
|
||||
// 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)
|
||||
}
|
||||
// Decoder for SpecialModelName
|
||||
@ -1187,7 +1158,6 @@ class Decoders {
|
||||
|
||||
|
||||
// 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)
|
||||
}
|
||||
// Decoder for Tag
|
||||
@ -1215,7 +1185,6 @@ class Decoders {
|
||||
|
||||
|
||||
// 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)
|
||||
}
|
||||
// Decoder for User
|
||||
|
@ -47,9 +47,9 @@ open class FakeAPI: APIBase {
|
||||
To test \"client\" model
|
||||
- PATCH /fake
|
||||
- To test \"client\" model
|
||||
- examples: [{example={
|
||||
- examples: [{contentType=application/json, example={
|
||||
"client" : "aeiou"
|
||||
}, contentType=application/json}]
|
||||
}}]
|
||||
|
||||
- parameter body: (body) client model
|
||||
|
||||
|
@ -46,9 +46,9 @@ open class Fake_classname_tags123API: APIBase {
|
||||
/**
|
||||
To test class name in snake case
|
||||
- PATCH /fake_classname_test
|
||||
- examples: [{example={
|
||||
- examples: [{contentType=application/json, example={
|
||||
"client" : "aeiou"
|
||||
}, contentType=application/json}]
|
||||
}}]
|
||||
|
||||
- parameter body: (body) client model
|
||||
|
||||
|
@ -181,7 +181,7 @@ open class PetAPI: APIBase {
|
||||
- OAuth:
|
||||
- type: oauth2
|
||||
- name: petstore_auth
|
||||
- examples: [{example=<Pet>
|
||||
- examples: [{contentType=application/xml, example=<Pet>
|
||||
<id>123456789</id>
|
||||
<name>doggie</name>
|
||||
<photoUrls>
|
||||
@ -190,21 +190,21 @@ open class PetAPI: APIBase {
|
||||
<tags>
|
||||
</tags>
|
||||
<status>aeiou</status>
|
||||
</Pet>, contentType=application/xml}, {example=[ {
|
||||
"tags" : [ {
|
||||
"id" : 1,
|
||||
"name" : "aeiou"
|
||||
} ],
|
||||
</Pet>}, {contentType=application/json, example=[ {
|
||||
"photoUrls" : [ "aeiou" ],
|
||||
"name" : "doggie",
|
||||
"id" : 0,
|
||||
"category" : {
|
||||
"id" : 6,
|
||||
"name" : "aeiou"
|
||||
"name" : "aeiou",
|
||||
"id" : 6
|
||||
},
|
||||
"status" : "available",
|
||||
"name" : "doggie",
|
||||
"photoUrls" : [ "aeiou" ]
|
||||
} ], contentType=application/json}]
|
||||
- examples: [{example=<Pet>
|
||||
"tags" : [ {
|
||||
"name" : "aeiou",
|
||||
"id" : 1
|
||||
} ],
|
||||
"status" : "available"
|
||||
} ]}]
|
||||
- examples: [{contentType=application/xml, example=<Pet>
|
||||
<id>123456789</id>
|
||||
<name>doggie</name>
|
||||
<photoUrls>
|
||||
@ -213,20 +213,20 @@ open class PetAPI: APIBase {
|
||||
<tags>
|
||||
</tags>
|
||||
<status>aeiou</status>
|
||||
</Pet>, contentType=application/xml}, {example=[ {
|
||||
"tags" : [ {
|
||||
"id" : 1,
|
||||
"name" : "aeiou"
|
||||
} ],
|
||||
</Pet>}, {contentType=application/json, example=[ {
|
||||
"photoUrls" : [ "aeiou" ],
|
||||
"name" : "doggie",
|
||||
"id" : 0,
|
||||
"category" : {
|
||||
"id" : 6,
|
||||
"name" : "aeiou"
|
||||
"name" : "aeiou",
|
||||
"id" : 6
|
||||
},
|
||||
"status" : "available",
|
||||
"name" : "doggie",
|
||||
"photoUrls" : [ "aeiou" ]
|
||||
} ], contentType=application/json}]
|
||||
"tags" : [ {
|
||||
"name" : "aeiou",
|
||||
"id" : 1
|
||||
} ],
|
||||
"status" : "available"
|
||||
} ]}]
|
||||
|
||||
- parameter status: (query) Status values that need to be considered for filter
|
||||
|
||||
@ -287,7 +287,7 @@ open class PetAPI: APIBase {
|
||||
- OAuth:
|
||||
- type: oauth2
|
||||
- name: petstore_auth
|
||||
- examples: [{example=<Pet>
|
||||
- examples: [{contentType=application/xml, example=<Pet>
|
||||
<id>123456789</id>
|
||||
<name>doggie</name>
|
||||
<photoUrls>
|
||||
@ -296,21 +296,21 @@ open class PetAPI: APIBase {
|
||||
<tags>
|
||||
</tags>
|
||||
<status>aeiou</status>
|
||||
</Pet>, contentType=application/xml}, {example=[ {
|
||||
"tags" : [ {
|
||||
"id" : 1,
|
||||
"name" : "aeiou"
|
||||
} ],
|
||||
</Pet>}, {contentType=application/json, example=[ {
|
||||
"photoUrls" : [ "aeiou" ],
|
||||
"name" : "doggie",
|
||||
"id" : 0,
|
||||
"category" : {
|
||||
"id" : 6,
|
||||
"name" : "aeiou"
|
||||
"name" : "aeiou",
|
||||
"id" : 6
|
||||
},
|
||||
"status" : "available",
|
||||
"name" : "doggie",
|
||||
"photoUrls" : [ "aeiou" ]
|
||||
} ], contentType=application/json}]
|
||||
- examples: [{example=<Pet>
|
||||
"tags" : [ {
|
||||
"name" : "aeiou",
|
||||
"id" : 1
|
||||
} ],
|
||||
"status" : "available"
|
||||
} ]}]
|
||||
- examples: [{contentType=application/xml, example=<Pet>
|
||||
<id>123456789</id>
|
||||
<name>doggie</name>
|
||||
<photoUrls>
|
||||
@ -319,20 +319,20 @@ open class PetAPI: APIBase {
|
||||
<tags>
|
||||
</tags>
|
||||
<status>aeiou</status>
|
||||
</Pet>, contentType=application/xml}, {example=[ {
|
||||
"tags" : [ {
|
||||
"id" : 1,
|
||||
"name" : "aeiou"
|
||||
} ],
|
||||
</Pet>}, {contentType=application/json, example=[ {
|
||||
"photoUrls" : [ "aeiou" ],
|
||||
"name" : "doggie",
|
||||
"id" : 0,
|
||||
"category" : {
|
||||
"id" : 6,
|
||||
"name" : "aeiou"
|
||||
"name" : "aeiou",
|
||||
"id" : 6
|
||||
},
|
||||
"status" : "available",
|
||||
"name" : "doggie",
|
||||
"photoUrls" : [ "aeiou" ]
|
||||
} ], contentType=application/json}]
|
||||
"tags" : [ {
|
||||
"name" : "aeiou",
|
||||
"id" : 1
|
||||
} ],
|
||||
"status" : "available"
|
||||
} ]}]
|
||||
|
||||
- parameter tags: (query) Tags to filter by
|
||||
|
||||
@ -393,7 +393,7 @@ open class PetAPI: APIBase {
|
||||
- API Key:
|
||||
- type: apiKey api_key
|
||||
- name: api_key
|
||||
- examples: [{example=<Pet>
|
||||
- examples: [{contentType=application/xml, example=<Pet>
|
||||
<id>123456789</id>
|
||||
<name>doggie</name>
|
||||
<photoUrls>
|
||||
@ -402,21 +402,21 @@ open class PetAPI: APIBase {
|
||||
<tags>
|
||||
</tags>
|
||||
<status>aeiou</status>
|
||||
</Pet>, contentType=application/xml}, {example={
|
||||
"tags" : [ {
|
||||
"id" : 1,
|
||||
"name" : "aeiou"
|
||||
} ],
|
||||
</Pet>}, {contentType=application/json, example={
|
||||
"photoUrls" : [ "aeiou" ],
|
||||
"name" : "doggie",
|
||||
"id" : 0,
|
||||
"category" : {
|
||||
"id" : 6,
|
||||
"name" : "aeiou"
|
||||
"name" : "aeiou",
|
||||
"id" : 6
|
||||
},
|
||||
"status" : "available",
|
||||
"name" : "doggie",
|
||||
"photoUrls" : [ "aeiou" ]
|
||||
}, contentType=application/json}]
|
||||
- examples: [{example=<Pet>
|
||||
"tags" : [ {
|
||||
"name" : "aeiou",
|
||||
"id" : 1
|
||||
} ],
|
||||
"status" : "available"
|
||||
}}]
|
||||
- examples: [{contentType=application/xml, example=<Pet>
|
||||
<id>123456789</id>
|
||||
<name>doggie</name>
|
||||
<photoUrls>
|
||||
@ -425,20 +425,20 @@ open class PetAPI: APIBase {
|
||||
<tags>
|
||||
</tags>
|
||||
<status>aeiou</status>
|
||||
</Pet>, contentType=application/xml}, {example={
|
||||
"tags" : [ {
|
||||
"id" : 1,
|
||||
"name" : "aeiou"
|
||||
} ],
|
||||
</Pet>}, {contentType=application/json, example={
|
||||
"photoUrls" : [ "aeiou" ],
|
||||
"name" : "doggie",
|
||||
"id" : 0,
|
||||
"category" : {
|
||||
"id" : 6,
|
||||
"name" : "aeiou"
|
||||
"name" : "aeiou",
|
||||
"id" : 6
|
||||
},
|
||||
"status" : "available",
|
||||
"name" : "doggie",
|
||||
"photoUrls" : [ "aeiou" ]
|
||||
}, contentType=application/json}]
|
||||
"tags" : [ {
|
||||
"name" : "aeiou",
|
||||
"id" : 1
|
||||
} ],
|
||||
"status" : "available"
|
||||
}}]
|
||||
|
||||
- parameter petId: (path) ID of pet to return
|
||||
|
||||
@ -628,11 +628,11 @@ open class PetAPI: APIBase {
|
||||
- OAuth:
|
||||
- type: oauth2
|
||||
- name: petstore_auth
|
||||
- examples: [{example={
|
||||
"message" : "aeiou",
|
||||
- examples: [{contentType=application/json, example={
|
||||
"code" : 0,
|
||||
"type" : "aeiou"
|
||||
}, contentType=application/json}]
|
||||
"type" : "aeiou",
|
||||
"message" : "aeiou"
|
||||
}}]
|
||||
|
||||
- parameter petId: (path) ID of pet to update
|
||||
- parameter additionalMetadata: (form) Additional data to pass to server (optional)
|
||||
|
@ -103,9 +103,9 @@ open class StoreAPI: APIBase {
|
||||
- API Key:
|
||||
- type: apiKey api_key
|
||||
- name: api_key
|
||||
- examples: [{example={
|
||||
- examples: [{contentType=application/json, example={
|
||||
"key" : 0
|
||||
}, contentType=application/json}]
|
||||
}}]
|
||||
|
||||
- returns: RequestBuilder<[String:Int32]>
|
||||
*/
|
||||
@ -158,36 +158,36 @@ open class StoreAPI: APIBase {
|
||||
Find purchase order by ID
|
||||
- GET /store/order/{order_id}
|
||||
- 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>
|
||||
<petId>123456789</petId>
|
||||
<quantity>123</quantity>
|
||||
<shipDate>2000-01-23T04:56:07.000Z</shipDate>
|
||||
<status>aeiou</status>
|
||||
<complete>true</complete>
|
||||
</Order>, contentType=application/xml}, {example={
|
||||
"id" : 0,
|
||||
</Order>}, {contentType=application/json, example={
|
||||
"petId" : 6,
|
||||
"complete" : false,
|
||||
"status" : "placed",
|
||||
"quantity" : 1,
|
||||
"shipDate" : "2000-01-23T04:56:07.000+00:00"
|
||||
}, contentType=application/json}]
|
||||
- examples: [{example=<Order>
|
||||
"id" : 0,
|
||||
"shipDate" : "2000-01-23T04:56:07.000+00:00",
|
||||
"complete" : false,
|
||||
"status" : "placed"
|
||||
}}]
|
||||
- examples: [{contentType=application/xml, example=<Order>
|
||||
<id>123456789</id>
|
||||
<petId>123456789</petId>
|
||||
<quantity>123</quantity>
|
||||
<shipDate>2000-01-23T04:56:07.000Z</shipDate>
|
||||
<status>aeiou</status>
|
||||
<complete>true</complete>
|
||||
</Order>, contentType=application/xml}, {example={
|
||||
"id" : 0,
|
||||
</Order>}, {contentType=application/json, example={
|
||||
"petId" : 6,
|
||||
"complete" : false,
|
||||
"status" : "placed",
|
||||
"quantity" : 1,
|
||||
"shipDate" : "2000-01-23T04:56:07.000+00:00"
|
||||
}, contentType=application/json}]
|
||||
"id" : 0,
|
||||
"shipDate" : "2000-01-23T04:56:07.000+00:00",
|
||||
"complete" : false,
|
||||
"status" : "placed"
|
||||
}}]
|
||||
|
||||
- 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
|
||||
- POST /store/order
|
||||
-
|
||||
- examples: [{example=<Order>
|
||||
- examples: [{contentType=application/xml, example=<Order>
|
||||
<id>123456789</id>
|
||||
<petId>123456789</petId>
|
||||
<quantity>123</quantity>
|
||||
<shipDate>2000-01-23T04:56:07.000Z</shipDate>
|
||||
<status>aeiou</status>
|
||||
<complete>true</complete>
|
||||
</Order>, contentType=application/xml}, {example={
|
||||
"id" : 0,
|
||||
</Order>}, {contentType=application/json, example={
|
||||
"petId" : 6,
|
||||
"complete" : false,
|
||||
"status" : "placed",
|
||||
"quantity" : 1,
|
||||
"shipDate" : "2000-01-23T04:56:07.000+00:00"
|
||||
}, contentType=application/json}]
|
||||
- examples: [{example=<Order>
|
||||
"id" : 0,
|
||||
"shipDate" : "2000-01-23T04:56:07.000+00:00",
|
||||
"complete" : false,
|
||||
"status" : "placed"
|
||||
}}]
|
||||
- examples: [{contentType=application/xml, example=<Order>
|
||||
<id>123456789</id>
|
||||
<petId>123456789</petId>
|
||||
<quantity>123</quantity>
|
||||
<shipDate>2000-01-23T04:56:07.000Z</shipDate>
|
||||
<status>aeiou</status>
|
||||
<complete>true</complete>
|
||||
</Order>, contentType=application/xml}, {example={
|
||||
"id" : 0,
|
||||
</Order>}, {contentType=application/json, example={
|
||||
"petId" : 6,
|
||||
"complete" : false,
|
||||
"status" : "placed",
|
||||
"quantity" : 1,
|
||||
"shipDate" : "2000-01-23T04:56:07.000+00:00"
|
||||
}, contentType=application/json}]
|
||||
"id" : 0,
|
||||
"shipDate" : "2000-01-23T04:56:07.000+00:00",
|
||||
"complete" : false,
|
||||
"status" : "placed"
|
||||
}}]
|
||||
|
||||
- parameter body: (body) order placed for purchasing the pet
|
||||
|
||||
|
@ -264,7 +264,7 @@ open class UserAPI: APIBase {
|
||||
Get user by user name
|
||||
- GET /user/{username}
|
||||
-
|
||||
- examples: [{example=<User>
|
||||
- examples: [{contentType=application/xml, example=<User>
|
||||
<id>123456789</id>
|
||||
<username>aeiou</username>
|
||||
<firstName>aeiou</firstName>
|
||||
@ -273,17 +273,17 @@ open class UserAPI: APIBase {
|
||||
<password>aeiou</password>
|
||||
<phone>aeiou</phone>
|
||||
<userStatus>123</userStatus>
|
||||
</User>, contentType=application/xml}, {example={
|
||||
"id" : 0,
|
||||
"lastName" : "aeiou",
|
||||
"phone" : "aeiou",
|
||||
"username" : "aeiou",
|
||||
"email" : "aeiou",
|
||||
"userStatus" : 6,
|
||||
</User>}, {contentType=application/json, example={
|
||||
"firstName" : "aeiou",
|
||||
"password" : "aeiou"
|
||||
}, contentType=application/json}]
|
||||
- examples: [{example=<User>
|
||||
"lastName" : "aeiou",
|
||||
"password" : "aeiou",
|
||||
"userStatus" : 6,
|
||||
"phone" : "aeiou",
|
||||
"id" : 0,
|
||||
"email" : "aeiou",
|
||||
"username" : "aeiou"
|
||||
}}]
|
||||
- examples: [{contentType=application/xml, example=<User>
|
||||
<id>123456789</id>
|
||||
<username>aeiou</username>
|
||||
<firstName>aeiou</firstName>
|
||||
@ -292,16 +292,16 @@ open class UserAPI: APIBase {
|
||||
<password>aeiou</password>
|
||||
<phone>aeiou</phone>
|
||||
<userStatus>123</userStatus>
|
||||
</User>, contentType=application/xml}, {example={
|
||||
"id" : 0,
|
||||
"lastName" : "aeiou",
|
||||
"phone" : "aeiou",
|
||||
"username" : "aeiou",
|
||||
"email" : "aeiou",
|
||||
"userStatus" : 6,
|
||||
</User>}, {contentType=application/json, example={
|
||||
"firstName" : "aeiou",
|
||||
"password" : "aeiou"
|
||||
}, contentType=application/json}]
|
||||
"lastName" : "aeiou",
|
||||
"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.
|
||||
|
||||
@ -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)]
|
||||
- examples: [{example=aeiou, contentType=application/xml}, {example="aeiou", contentType=application/json}]
|
||||
- examples: [{example=aeiou, contentType=application/xml}, {example="aeiou", contentType=application/json}]
|
||||
- examples: [{contentType=application/xml, example=aeiou}, {contentType=application/json, example="aeiou"}]
|
||||
- examples: [{contentType=application/xml, example=aeiou}, {contentType=application/json, example="aeiou"}]
|
||||
|
||||
- parameter username: (query) The user name for login
|
||||
- parameter password: (query) The password for login in clear text
|
||||
|
@ -252,7 +252,6 @@ class Decoders {
|
||||
}
|
||||
|
||||
// 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)
|
||||
}
|
||||
// Decoder for AdditionalPropertiesClass
|
||||
@ -280,7 +279,6 @@ class Decoders {
|
||||
|
||||
|
||||
// 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)
|
||||
}
|
||||
// Decoder for Animal
|
||||
@ -315,7 +313,6 @@ class Decoders {
|
||||
|
||||
|
||||
// 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)
|
||||
}
|
||||
// Decoder for ApiResponse
|
||||
@ -349,7 +346,6 @@ class Decoders {
|
||||
|
||||
|
||||
// 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)
|
||||
}
|
||||
// Decoder for ArrayOfArrayOfNumberOnly
|
||||
@ -371,7 +367,6 @@ class Decoders {
|
||||
|
||||
|
||||
// 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)
|
||||
}
|
||||
// Decoder for ArrayOfNumberOnly
|
||||
@ -393,7 +388,6 @@ class Decoders {
|
||||
|
||||
|
||||
// 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)
|
||||
}
|
||||
// Decoder for ArrayTest
|
||||
@ -427,7 +421,6 @@ class Decoders {
|
||||
|
||||
|
||||
// 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)
|
||||
}
|
||||
// Decoder for Capitalization
|
||||
@ -479,7 +472,6 @@ class Decoders {
|
||||
|
||||
|
||||
// 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)
|
||||
}
|
||||
// Decoder for Cat
|
||||
@ -516,7 +508,6 @@ class Decoders {
|
||||
|
||||
|
||||
// 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)
|
||||
}
|
||||
// Decoder for Category
|
||||
@ -544,7 +535,6 @@ class Decoders {
|
||||
|
||||
|
||||
// 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)
|
||||
}
|
||||
// Decoder for ClassModel
|
||||
@ -566,7 +556,6 @@ class Decoders {
|
||||
|
||||
|
||||
// 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)
|
||||
}
|
||||
// Decoder for Client
|
||||
@ -588,7 +577,6 @@ class Decoders {
|
||||
|
||||
|
||||
// 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)
|
||||
}
|
||||
// Decoder for Dog
|
||||
@ -625,7 +613,6 @@ class Decoders {
|
||||
|
||||
|
||||
// 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)
|
||||
}
|
||||
// Decoder for EnumArrays
|
||||
@ -653,7 +640,6 @@ class Decoders {
|
||||
|
||||
|
||||
// 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)
|
||||
}
|
||||
// Decoder for EnumClass
|
||||
@ -664,7 +650,6 @@ class Decoders {
|
||||
|
||||
|
||||
// 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)
|
||||
}
|
||||
// Decoder for EnumTest
|
||||
@ -704,7 +689,6 @@ class Decoders {
|
||||
|
||||
|
||||
// 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)
|
||||
}
|
||||
// Decoder for FormatTest
|
||||
@ -798,7 +782,6 @@ class Decoders {
|
||||
|
||||
|
||||
// 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)
|
||||
}
|
||||
// Decoder for HasOnlyReadOnly
|
||||
@ -826,7 +809,6 @@ class Decoders {
|
||||
|
||||
|
||||
// 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)
|
||||
}
|
||||
// Decoder for List
|
||||
@ -848,7 +830,6 @@ class Decoders {
|
||||
|
||||
|
||||
// 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)
|
||||
}
|
||||
// Decoder for MapTest
|
||||
@ -876,7 +857,6 @@ class Decoders {
|
||||
|
||||
|
||||
// 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)
|
||||
}
|
||||
// Decoder for MixedPropertiesAndAdditionalPropertiesClass
|
||||
@ -910,7 +890,6 @@ class Decoders {
|
||||
|
||||
|
||||
// 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)
|
||||
}
|
||||
// Decoder for Model200Response
|
||||
@ -938,7 +917,6 @@ class Decoders {
|
||||
|
||||
|
||||
// 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)
|
||||
}
|
||||
// Decoder for Name
|
||||
@ -978,7 +956,6 @@ class Decoders {
|
||||
|
||||
|
||||
// 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)
|
||||
}
|
||||
// Decoder for NumberOnly
|
||||
@ -1000,7 +977,6 @@ class Decoders {
|
||||
|
||||
|
||||
// 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)
|
||||
}
|
||||
// Decoder for Order
|
||||
@ -1052,7 +1028,6 @@ class Decoders {
|
||||
|
||||
|
||||
// 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)
|
||||
}
|
||||
// Decoder for OuterEnum
|
||||
@ -1063,7 +1038,6 @@ class Decoders {
|
||||
|
||||
|
||||
// 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)
|
||||
}
|
||||
// Decoder for Pet
|
||||
@ -1115,7 +1089,6 @@ class Decoders {
|
||||
|
||||
|
||||
// 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)
|
||||
}
|
||||
// Decoder for ReadOnlyFirst
|
||||
@ -1143,7 +1116,6 @@ class Decoders {
|
||||
|
||||
|
||||
// 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)
|
||||
}
|
||||
// Decoder for Return
|
||||
@ -1165,7 +1137,6 @@ class Decoders {
|
||||
|
||||
|
||||
// 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)
|
||||
}
|
||||
// Decoder for SpecialModelName
|
||||
@ -1187,7 +1158,6 @@ class Decoders {
|
||||
|
||||
|
||||
// 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)
|
||||
}
|
||||
// Decoder for Tag
|
||||
@ -1215,7 +1185,6 @@ class Decoders {
|
||||
|
||||
|
||||
// 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)
|
||||
}
|
||||
// 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.RequestPart;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import java.io.IOException;
|
||||
|
||||
import java.util.List;
|
||||
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", })
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(code = 200, message = "successful operation", response = Client.class) })
|
||||
|
||||
@RequestMapping(value = "/fake",
|
||||
produces = { "application/json" },
|
||||
consumes = { "application/json" },
|
||||
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!
|
||||
return CompletableFuture.completedFuture(new ResponseEntity<Client>(HttpStatus.OK));
|
||||
}
|
||||
@ -45,12 +45,11 @@ public interface FakeApi {
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(code = 400, message = "Invalid username supplied", response = Void.class),
|
||||
@ApiResponse(code = 404, message = "User not found", response = Void.class) })
|
||||
|
||||
@RequestMapping(value = "/fake",
|
||||
produces = { "application/xml; charset=utf-8", "application/json; charset=utf-8" },
|
||||
consumes = { "application/xml; charset=utf-8", "application/json; charset=utf-8" },
|
||||
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!
|
||||
return CompletableFuture.completedFuture(new ResponseEntity<Void>(HttpStatus.OK));
|
||||
}
|
||||
@ -60,12 +59,11 @@ public interface FakeApi {
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(code = 400, message = "Invalid request", response = Void.class),
|
||||
@ApiResponse(code = 404, message = "Not found", response = Void.class) })
|
||||
|
||||
@RequestMapping(value = "/fake",
|
||||
produces = { "*/*" },
|
||||
consumes = { "*/*" },
|
||||
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!
|
||||
return CompletableFuture.completedFuture(new ResponseEntity<Void>(HttpStatus.OK));
|
||||
}
|
||||
|
@ -7,7 +7,4 @@ import javax.validation.Valid;
|
||||
|
||||
@Controller
|
||||
public class FakeApiController implements FakeApi {
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
@ -1,8 +1,8 @@
|
||||
package io.swagger.api;
|
||||
|
||||
import java.io.File;
|
||||
import io.swagger.model.ModelApiResponse;
|
||||
import io.swagger.model.Pet;
|
||||
import org.springframework.core.io.Resource;
|
||||
|
||||
import io.swagger.annotations.*;
|
||||
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.RequestPart;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import java.io.IOException;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
@ -32,12 +33,11 @@ public interface PetApi {
|
||||
}, tags={ "pet", })
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(code = 405, message = "Invalid input", response = Void.class) })
|
||||
|
||||
@RequestMapping(value = "/pet",
|
||||
produces = { "application/xml", "application/json" },
|
||||
consumes = { "application/json", "application/xml" },
|
||||
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!
|
||||
return CompletableFuture.completedFuture(new ResponseEntity<Void>(HttpStatus.OK));
|
||||
}
|
||||
@ -51,11 +51,10 @@ public interface PetApi {
|
||||
}, tags={ "pet", })
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(code = 400, message = "Invalid pet value", response = Void.class) })
|
||||
|
||||
@RequestMapping(value = "/pet/{petId}",
|
||||
produces = { "application/xml", "application/json" },
|
||||
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!
|
||||
return CompletableFuture.completedFuture(new ResponseEntity<Void>(HttpStatus.OK));
|
||||
}
|
||||
@ -70,11 +69,10 @@ public interface PetApi {
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(code = 200, message = "successful operation", response = Pet.class),
|
||||
@ApiResponse(code = 400, message = "Invalid status value", response = Pet.class) })
|
||||
|
||||
@RequestMapping(value = "/pet/findByStatus",
|
||||
produces = { "application/xml", "application/json" },
|
||||
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!
|
||||
return CompletableFuture.completedFuture(new ResponseEntity<List<Pet>>(HttpStatus.OK));
|
||||
}
|
||||
@ -89,11 +87,10 @@ public interface PetApi {
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(code = 200, message = "successful operation", response = Pet.class),
|
||||
@ApiResponse(code = 400, message = "Invalid tag value", response = Pet.class) })
|
||||
|
||||
@RequestMapping(value = "/pet/findByTags",
|
||||
produces = { "application/xml", "application/json" },
|
||||
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!
|
||||
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 = 400, message = "Invalid ID supplied", response = Pet.class),
|
||||
@ApiResponse(code = 404, message = "Pet not found", response = Pet.class) })
|
||||
|
||||
@RequestMapping(value = "/pet/{petId}",
|
||||
produces = { "application/xml", "application/json" },
|
||||
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!
|
||||
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 = 404, message = "Pet not found", response = Void.class),
|
||||
@ApiResponse(code = 405, message = "Validation exception", response = Void.class) })
|
||||
|
||||
@RequestMapping(value = "/pet",
|
||||
produces = { "application/xml", "application/json" },
|
||||
consumes = { "application/json", "application/xml" },
|
||||
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!
|
||||
return CompletableFuture.completedFuture(new ResponseEntity<Void>(HttpStatus.OK));
|
||||
}
|
||||
@ -145,12 +140,11 @@ public interface PetApi {
|
||||
}, tags={ "pet", })
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(code = 405, message = "Invalid input", response = Void.class) })
|
||||
|
||||
@RequestMapping(value = "/pet/{petId}",
|
||||
produces = { "application/xml", "application/json" },
|
||||
consumes = { "application/x-www-form-urlencoded" },
|
||||
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!
|
||||
return CompletableFuture.completedFuture(new ResponseEntity<Void>(HttpStatus.OK));
|
||||
}
|
||||
@ -164,12 +158,11 @@ public interface PetApi {
|
||||
}, tags={ "pet", })
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) })
|
||||
|
||||
@RequestMapping(value = "/pet/{petId}/uploadImage",
|
||||
produces = { "application/json" },
|
||||
consumes = { "multipart/form-data" },
|
||||
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!
|
||||
return CompletableFuture.completedFuture(new ResponseEntity<ModelApiResponse>(HttpStatus.OK));
|
||||
}
|
||||
|
@ -7,7 +7,4 @@ import javax.validation.Valid;
|
||||
|
||||
@Controller
|
||||
public class PetApiController implements PetApi {
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user