forked from loafle/openapi-generator-original
Merge remote-tracking branch 'origin/master' into 2.3.0
This commit is contained in:
commit
e1e5ac4d37
1
.gitignore
vendored
1
.gitignore
vendored
@ -24,6 +24,7 @@ packages/
|
|||||||
.pub
|
.pub
|
||||||
.packages
|
.packages
|
||||||
.vagrant/
|
.vagrant/
|
||||||
|
.vscode/
|
||||||
|
|
||||||
.settings
|
.settings
|
||||||
|
|
||||||
|
@ -809,6 +809,7 @@ Here are some companies/projects using Swagger Codegen in production. To add you
|
|||||||
- [Webever GmbH](https://www.webever.de/)
|
- [Webever GmbH](https://www.webever.de/)
|
||||||
- [WEXO A/S](https://www.wexo.dk/)
|
- [WEXO A/S](https://www.wexo.dk/)
|
||||||
- [XSky](http://www.xsky.com/)
|
- [XSky](http://www.xsky.com/)
|
||||||
|
- [Yelp](http://www.yelp.com/)
|
||||||
- [Zalando](https://tech.zalando.com)
|
- [Zalando](https://tech.zalando.com)
|
||||||
- [ZEEF.com](https://zeef.com/)
|
- [ZEEF.com](https://zeef.com/)
|
||||||
|
|
||||||
|
@ -9,6 +9,7 @@
|
|||||||
./bin/java-petstore-retrofit.sh
|
./bin/java-petstore-retrofit.sh
|
||||||
./bin/java-petstore-retrofit2.sh
|
./bin/java-petstore-retrofit2.sh
|
||||||
./bin/java-petstore-retrofit2rx.sh
|
./bin/java-petstore-retrofit2rx.sh
|
||||||
|
./bin/java-petstore-retrofit2rx2.sh
|
||||||
./bin/java8-petstore-jersey2.sh
|
./bin/java8-petstore-jersey2.sh
|
||||||
./bin/java-petstore-retrofit2-play24.sh
|
./bin/java-petstore-retrofit2-play24.sh
|
||||||
./bin/java-petstore-jersey2-java6.sh
|
./bin/java-petstore-jersey2-java6.sh
|
||||||
|
@ -8,3 +8,4 @@
|
|||||||
./bin/springboot-petstore-server.sh
|
./bin/springboot-petstore-server.sh
|
||||||
./bin/spring-mvc-petstore-server.sh
|
./bin/spring-mvc-petstore-server.sh
|
||||||
./bin/springboot-petstore-server-beanvalidation.sh
|
./bin/springboot-petstore-server-beanvalidation.sh
|
||||||
|
./bin/springboot-petstore-server-implicitHeaders.sh
|
||||||
|
@ -28,9 +28,9 @@ fi
|
|||||||
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
|
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
|
||||||
|
|
||||||
echo "Typescript Petstore API client (default)"
|
echo "Typescript Petstore API client (default)"
|
||||||
ags="$@ generate -i modules/swagger-codegen/src/test/resources/2_0/petstore.json -l typescript-angular2 -o samples/client/petstore/typescript-angular2/default"
|
ags="$@ generate -i modules/swagger-codegen/src/test/resources/2_0/petstore.yaml -l typescript-angular2 -o samples/client/petstore/typescript-angular2/default"
|
||||||
java $JAVA_OPTS -jar $executable $ags
|
java $JAVA_OPTS -jar $executable $ags
|
||||||
|
|
||||||
echo "Typescript Petstore API client (npm setting)"
|
echo "Typescript Petstore API client (npm setting)"
|
||||||
ags="$@ generate -i modules/swagger-codegen/src/test/resources/2_0/petstore.json -l typescript-angular2 -c bin/typescript-petstore-npm.json -o samples/client/petstore/typescript-angular2/npm"
|
ags="$@ generate -i modules/swagger-codegen/src/test/resources/2_0/petstore.yaml -l typescript-angular2 -c bin/typescript-petstore-npm.json -o samples/client/petstore/typescript-angular2/npm"
|
||||||
java $JAVA_OPTS -jar $executable $ags
|
java $JAVA_OPTS -jar $executable $ags
|
||||||
|
@ -25,6 +25,7 @@ public class CodegenModel {
|
|||||||
public String discriminator;
|
public String discriminator;
|
||||||
public String defaultValue;
|
public String defaultValue;
|
||||||
public String arrayModelType;
|
public String arrayModelType;
|
||||||
|
public boolean isAlias; // Is this effectively an alias of another simple type
|
||||||
public List<CodegenProperty> vars = new ArrayList<CodegenProperty>();
|
public List<CodegenProperty> vars = new ArrayList<CodegenProperty>();
|
||||||
public List<CodegenProperty> requiredVars = new ArrayList<CodegenProperty>(); // a list of required properties
|
public List<CodegenProperty> requiredVars = new ArrayList<CodegenProperty>(); // a list of required properties
|
||||||
public List<CodegenProperty> optionalVars = new ArrayList<CodegenProperty>(); // a list of optional properties
|
public List<CodegenProperty> optionalVars = new ArrayList<CodegenProperty>(); // a list of optional properties
|
||||||
|
@ -116,6 +116,8 @@ public class DefaultCodegen {
|
|||||||
// They are translated to words like "Dollar" and prefixed with '
|
// They are translated to words like "Dollar" and prefixed with '
|
||||||
// Then translated back during JSON encoding and decoding
|
// Then translated back during JSON encoding and decoding
|
||||||
protected Map<String, String> specialCharReplacements = new HashMap<String, String>();
|
protected Map<String, String> specialCharReplacements = new HashMap<String, String>();
|
||||||
|
// When a model is an alias for a simple type
|
||||||
|
protected Map<String, String> typeAliases = new HashMap<>();
|
||||||
|
|
||||||
protected String ignoreFilePathOverride;
|
protected String ignoreFilePathOverride;
|
||||||
|
|
||||||
@ -1210,6 +1212,18 @@ public class DefaultCodegen {
|
|||||||
return swaggerType;
|
return swaggerType;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determine the type alias for the given type if it exists. This feature
|
||||||
|
* is only used for Java, because the language does not have a aliasing
|
||||||
|
* mechanism of its own.
|
||||||
|
* @param name The type name.
|
||||||
|
* @return The alias of the given type, if it exists. If there is no alias
|
||||||
|
* for this type, then returns the input type name.
|
||||||
|
*/
|
||||||
|
public String getAlias(String name) {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Output the API (class) name (capitalized) ending with "Api"
|
* Output the API (class) name (capitalized) ending with "Api"
|
||||||
* Return DefaultApi if name is empty
|
* Return DefaultApi if name is empty
|
||||||
@ -1374,6 +1388,10 @@ public class DefaultCodegen {
|
|||||||
ModelImpl impl = (ModelImpl) model;
|
ModelImpl impl = (ModelImpl) model;
|
||||||
if (impl.getType() != null) {
|
if (impl.getType() != null) {
|
||||||
Property p = PropertyBuilder.build(impl.getType(), impl.getFormat(), null);
|
Property p = PropertyBuilder.build(impl.getType(), impl.getFormat(), null);
|
||||||
|
if (!impl.getType().equals("object") && impl.getEnum() == null) {
|
||||||
|
typeAliases.put(name, impl.getType());
|
||||||
|
m.isAlias = true;
|
||||||
|
}
|
||||||
m.dataType = getSwaggerType(p);
|
m.dataType = getSwaggerType(p);
|
||||||
}
|
}
|
||||||
if(impl.getEnum() != null && impl.getEnum().size() > 0) {
|
if(impl.getEnum() != null && impl.getEnum().size() > 0) {
|
||||||
@ -2526,6 +2544,7 @@ public class DefaultCodegen {
|
|||||||
Model sub = bp.getSchema();
|
Model sub = bp.getSchema();
|
||||||
if (sub instanceof RefModel) {
|
if (sub instanceof RefModel) {
|
||||||
String name = ((RefModel) sub).getSimpleRef();
|
String name = ((RefModel) sub).getSimpleRef();
|
||||||
|
name = getAlias(name);
|
||||||
if (typeMapping.containsKey(name)) {
|
if (typeMapping.containsKey(name)) {
|
||||||
name = typeMapping.get(name);
|
name = typeMapping.get(name);
|
||||||
} else {
|
} else {
|
||||||
|
@ -4,6 +4,7 @@ import com.samskivert.mustache.Mustache;
|
|||||||
import com.samskivert.mustache.Template;
|
import com.samskivert.mustache.Template;
|
||||||
import io.swagger.codegen.ignore.CodegenIgnoreProcessor;
|
import io.swagger.codegen.ignore.CodegenIgnoreProcessor;
|
||||||
import io.swagger.codegen.utils.ImplementationVersion;
|
import io.swagger.codegen.utils.ImplementationVersion;
|
||||||
|
import io.swagger.codegen.languages.AbstractJavaCodegen;
|
||||||
import io.swagger.models.*;
|
import io.swagger.models.*;
|
||||||
import io.swagger.models.auth.OAuth2Definition;
|
import io.swagger.models.auth.OAuth2Definition;
|
||||||
import io.swagger.models.auth.SecuritySchemeDefinition;
|
import io.swagger.models.auth.SecuritySchemeDefinition;
|
||||||
@ -327,7 +328,17 @@ public class DefaultGenerator extends AbstractGenerator implements Generator {
|
|||||||
if(config.importMapping().containsKey(modelName)) {
|
if(config.importMapping().containsKey(modelName)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
allModels.add(((List<Object>) models.get("models")).get(0));
|
Map<String, Object> modelTemplate = (Map<String, Object>) ((List<Object>) models.get("models")).get(0);
|
||||||
|
if (config instanceof AbstractJavaCodegen) {
|
||||||
|
// Special handling of aliases only applies to Java
|
||||||
|
if (modelTemplate != null && modelTemplate.containsKey("model")) {
|
||||||
|
CodegenModel m = (CodegenModel) modelTemplate.get("model");
|
||||||
|
if (m.isAlias) {
|
||||||
|
continue; // Don't create user-defined classes for aliases
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
allModels.add(modelTemplate);
|
||||||
for (String templateName : config.modelTemplateFiles().keySet()) {
|
for (String templateName : config.modelTemplateFiles().keySet()) {
|
||||||
String suffix = config.modelTemplateFiles().get(templateName);
|
String suffix = config.modelTemplateFiles().get(templateName);
|
||||||
String filename = config.modelFileFolder() + File.separator + config.toModelFilename(modelName) + suffix;
|
String filename = config.modelFileFolder() + File.separator + config.toModelFilename(modelName) + suffix;
|
||||||
|
@ -581,6 +581,14 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code
|
|||||||
return super.getTypeDeclaration(p);
|
return super.getTypeDeclaration(p);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getAlias(String name) {
|
||||||
|
if (typeAliases.containsKey(name)) {
|
||||||
|
return typeAliases.get(name);
|
||||||
|
}
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toDefaultValue(Property p) {
|
public String toDefaultValue(Property p) {
|
||||||
if (p instanceof ArrayProperty) {
|
if (p instanceof ArrayProperty) {
|
||||||
@ -730,6 +738,8 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code
|
|||||||
public String getSwaggerType(Property p) {
|
public String getSwaggerType(Property p) {
|
||||||
String swaggerType = super.getSwaggerType(p);
|
String swaggerType = super.getSwaggerType(p);
|
||||||
|
|
||||||
|
swaggerType = getAlias(swaggerType);
|
||||||
|
|
||||||
// don't apply renaming on types from the typeMapping
|
// don't apply renaming on types from the typeMapping
|
||||||
if (typeMapping.containsKey(swaggerType)) {
|
if (typeMapping.containsKey(swaggerType)) {
|
||||||
return typeMapping.get(swaggerType);
|
return typeMapping.get(swaggerType);
|
||||||
|
@ -64,7 +64,7 @@ public class AndroidClientCodegen extends DefaultCodegen implements CodegenConfi
|
|||||||
"import", "public", "throws", "case", "enum", "instanceof", "return", "transient",
|
"import", "public", "throws", "case", "enum", "instanceof", "return", "transient",
|
||||||
"catch", "extends", "int", "short", "try", "char", "final", "interface", "static",
|
"catch", "extends", "int", "short", "try", "char", "final", "interface", "static",
|
||||||
"void", "class", "finally", "long", "strictfp", "volatile", "const", "float",
|
"void", "class", "finally", "long", "strictfp", "volatile", "const", "float",
|
||||||
"native", "super", "while")
|
"native", "super", "while", "null")
|
||||||
);
|
);
|
||||||
|
|
||||||
languageSpecificPrimitives = new HashSet<String>(
|
languageSpecificPrimitives = new HashSet<String>(
|
||||||
|
@ -69,6 +69,17 @@ public class FlaskConnexionCodegen extends DefaultCodegen implements CodegenConf
|
|||||||
typeMapping.put("file", "file");
|
typeMapping.put("file", "file");
|
||||||
typeMapping.put("UUID", "str");
|
typeMapping.put("UUID", "str");
|
||||||
|
|
||||||
|
// from https://docs.python.org/release/2.5.4/ref/keywords.html
|
||||||
|
setReservedWordsLowerCase(
|
||||||
|
Arrays.asList(
|
||||||
|
// @property
|
||||||
|
"property",
|
||||||
|
// python reserved words
|
||||||
|
"and", "del", "from", "not", "while", "as", "elif", "global", "or", "with",
|
||||||
|
"assert", "else", "if", "pass", "yield", "break", "except", "import",
|
||||||
|
"print", "class", "exec", "in", "raise", "continue", "finally", "is",
|
||||||
|
"return", "def", "for", "lambda", "try", "self", "None"));
|
||||||
|
|
||||||
// set the output folder here
|
// set the output folder here
|
||||||
outputFolder = "generated-code/connexion";
|
outputFolder = "generated-code/connexion";
|
||||||
|
|
||||||
|
@ -56,7 +56,8 @@ public class GoClientCodegen extends DefaultCodegen implements CodegenConfig {
|
|||||||
"case", "defer", "go", "map", "struct",
|
"case", "defer", "go", "map", "struct",
|
||||||
"chan", "else", "goto", "package", "switch",
|
"chan", "else", "goto", "package", "switch",
|
||||||
"const", "fallthrough", "if", "range", "type",
|
"const", "fallthrough", "if", "range", "type",
|
||||||
"continue", "for", "import", "return", "var", "error", "ApiResponse")
|
"continue", "for", "import", "return", "var", "error", "ApiResponse",
|
||||||
|
"nil")
|
||||||
// Added "error" as it's used so frequently that it may as well be a keyword
|
// Added "error" as it's used so frequently that it may as well be a keyword
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -78,7 +78,8 @@ public class GoServerCodegen extends DefaultCodegen implements CodegenConfig {
|
|||||||
"case", "defer", "go", "map", "struct",
|
"case", "defer", "go", "map", "struct",
|
||||||
"chan", "else", "goto", "package", "switch",
|
"chan", "else", "goto", "package", "switch",
|
||||||
"const", "fallthrough", "if", "range", "type",
|
"const", "fallthrough", "if", "range", "type",
|
||||||
"continue", "for", "import", "return", "var", "error", "ApiResponse")
|
"continue", "for", "import", "return", "var", "error", "ApiResponse",
|
||||||
|
"nil")
|
||||||
// Added "error" as it's used so frequently that it may as well be a keyword
|
// Added "error" as it's used so frequently that it may as well be a keyword
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -101,7 +101,7 @@ public class PythonClientCodegen extends DefaultCodegen implements CodegenConfig
|
|||||||
"and", "del", "from", "not", "while", "as", "elif", "global", "or", "with",
|
"and", "del", "from", "not", "while", "as", "elif", "global", "or", "with",
|
||||||
"assert", "else", "if", "pass", "yield", "break", "except", "import",
|
"assert", "else", "if", "pass", "yield", "break", "except", "import",
|
||||||
"print", "class", "exec", "in", "raise", "continue", "finally", "is",
|
"print", "class", "exec", "in", "raise", "continue", "finally", "is",
|
||||||
"return", "def", "for", "lambda", "try", "self"));
|
"return", "def", "for", "lambda", "try", "self", "None"));
|
||||||
|
|
||||||
regexModifiers = new HashMap<Character, String>();
|
regexModifiers = new HashMap<Character, String>();
|
||||||
regexModifiers.put('i', "IGNORECASE");
|
regexModifiers.put('i', "IGNORECASE");
|
||||||
|
@ -75,6 +75,7 @@ public class ApiClient {
|
|||||||
objectMapper = new ObjectMapper();
|
objectMapper = new ObjectMapper();
|
||||||
objectMapper.setSerializationInclusion(JsonInclude.Include.NON_NULL);
|
objectMapper.setSerializationInclusion(JsonInclude.Include.NON_NULL);
|
||||||
objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
|
objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
|
||||||
|
objectMapper.configure(DeserializationFeature.FAIL_ON_INVALID_SUBTYPE, false);
|
||||||
objectMapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS);
|
objectMapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS);
|
||||||
objectMapper.enable(SerializationFeature.WRITE_ENUMS_USING_TO_STRING);
|
objectMapper.enable(SerializationFeature.WRITE_ENUMS_USING_TO_STRING);
|
||||||
objectMapper.enable(DeserializationFeature.READ_ENUMS_USING_TO_STRING);
|
objectMapper.enable(DeserializationFeature.READ_ENUMS_USING_TO_STRING);
|
||||||
|
@ -152,6 +152,7 @@ public class ApiClient {
|
|||||||
objectMapper.enable(SerializationFeature.WRITE_ENUMS_USING_TO_STRING);
|
objectMapper.enable(SerializationFeature.WRITE_ENUMS_USING_TO_STRING);
|
||||||
objectMapper.enable(DeserializationFeature.READ_ENUMS_USING_TO_STRING);
|
objectMapper.enable(DeserializationFeature.READ_ENUMS_USING_TO_STRING);
|
||||||
objectMapper.disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES);
|
objectMapper.disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES);
|
||||||
|
objectMapper.disable(DeserializationFeature.FAIL_ON_INVALID_SUBTYPE);
|
||||||
objectMapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS);
|
objectMapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS);
|
||||||
objectMapper.setDateFormat(new RFC3339DateFormat());
|
objectMapper.setDateFormat(new RFC3339DateFormat());
|
||||||
{{#joda}}
|
{{#joda}}
|
||||||
|
@ -27,6 +27,7 @@ public class JSON implements ContextResolver<ObjectMapper> {
|
|||||||
mapper = new ObjectMapper();
|
mapper = new ObjectMapper();
|
||||||
mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL);
|
mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL);
|
||||||
mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
|
mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
|
||||||
|
mapper.configure(DeserializationFeature.FAIL_ON_INVALID_SUBTYPE, false);
|
||||||
mapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS);
|
mapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS);
|
||||||
mapper.enable(SerializationFeature.WRITE_ENUMS_USING_TO_STRING);
|
mapper.enable(SerializationFeature.WRITE_ENUMS_USING_TO_STRING);
|
||||||
mapper.enable(DeserializationFeature.READ_ENUMS_USING_TO_STRING);
|
mapper.enable(DeserializationFeature.READ_ENUMS_USING_TO_STRING);
|
||||||
|
@ -909,6 +909,26 @@ public class ApiClient {
|
|||||||
* @throws ApiException If fail to serialize the request body object
|
* @throws ApiException If fail to serialize the request body object
|
||||||
*/
|
*/
|
||||||
public Call buildCall(String path, String method, List<Pair> queryParams, Object body, Map<String, String> headerParams, Map<String, Object> formParams, String[] authNames, ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
|
public Call buildCall(String path, String method, List<Pair> queryParams, Object body, Map<String, String> headerParams, Map<String, Object> formParams, String[] authNames, ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
|
||||||
|
Request request = buildRequest(path, method, queryParams, body, headerParams, formParams, authNames, progressRequestListener);
|
||||||
|
|
||||||
|
return httpClient.newCall(request);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Build an HTTP request with the given options.
|
||||||
|
*
|
||||||
|
* @param path The sub-path of the HTTP URL
|
||||||
|
* @param method The request method, one of "GET", "HEAD", "OPTIONS", "POST", "PUT", "PATCH" and "DELETE"
|
||||||
|
* @param queryParams The query parameters
|
||||||
|
* @param body The request body object
|
||||||
|
* @param headerParams The header parameters
|
||||||
|
* @param formParams The form parameters
|
||||||
|
* @param authNames The authentications to apply
|
||||||
|
* @param progressRequestListener Progress request listener
|
||||||
|
* @return The HTTP request
|
||||||
|
* @throws ApiException If fail to serialize the request body object
|
||||||
|
*/
|
||||||
|
public Request buildRequest(String path, String method, List<Pair> queryParams, Object body, Map<String, String> headerParams, Map<String, Object> formParams, String[] authNames, ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
|
||||||
updateParamsForAuth(authNames, queryParams, headerParams);
|
updateParamsForAuth(authNames, queryParams, headerParams);
|
||||||
|
|
||||||
final String url = buildUrl(path, queryParams);
|
final String url = buildUrl(path, queryParams);
|
||||||
@ -949,7 +969,7 @@ public class ApiClient {
|
|||||||
request = reqBuilder.method(method, reqBody).build();
|
request = reqBuilder.method(method, reqBody).build();
|
||||||
}
|
}
|
||||||
|
|
||||||
return httpClient.newCall(request);
|
return request;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -21,6 +21,7 @@ public class JSON implements ContextResolver<ObjectMapper> {
|
|||||||
mapper = new ObjectMapper();
|
mapper = new ObjectMapper();
|
||||||
mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL);
|
mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL);
|
||||||
mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
|
mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
|
||||||
|
mapper.configure(DeserializationFeature.FAIL_ON_INVALID_SUBTYPE, false);
|
||||||
mapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS);
|
mapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS);
|
||||||
mapper.enable(SerializationFeature.WRITE_ENUMS_USING_TO_STRING);
|
mapper.enable(SerializationFeature.WRITE_ENUMS_USING_TO_STRING);
|
||||||
mapper.enable(DeserializationFeature.READ_ENUMS_USING_TO_STRING);
|
mapper.enable(DeserializationFeature.READ_ENUMS_USING_TO_STRING);
|
||||||
|
@ -1,9 +1,8 @@
|
|||||||
from connexion.decorators import produces
|
|
||||||
from six import iteritems
|
from six import iteritems
|
||||||
from {{modelPackage}}.base_model_ import Model
|
from {{modelPackage}}.base_model_ import Model
|
||||||
|
from connexion.apps.flask_app import FlaskJSONEncoder
|
||||||
|
|
||||||
|
class JSONEncoder(FlaskJSONEncoder):
|
||||||
class JSONEncoder(produces.JSONEncoder):
|
|
||||||
include_nulls = False
|
include_nulls = False
|
||||||
|
|
||||||
def default(self, o):
|
def default(self, o):
|
||||||
@ -16,4 +15,4 @@ class JSONEncoder(produces.JSONEncoder):
|
|||||||
attr = o.attribute_map[attr]
|
attr = o.attribute_map[attr]
|
||||||
dikt[attr] = value
|
dikt[attr] = value
|
||||||
return dikt
|
return dikt
|
||||||
return produces.JSONEncoder.default(self, o)
|
return FlaskJSONEncoder.default(self, o)
|
@ -1,4 +1,4 @@
|
|||||||
connexion == 1.0.129
|
connexion == 1.1.9
|
||||||
python_dateutil == 2.6.0
|
python_dateutil == 2.6.0
|
||||||
{{#supportPython2}}
|
{{#supportPython2}}
|
||||||
typing == 3.5.2.2
|
typing == 3.5.2.2
|
||||||
|
@ -593,16 +593,17 @@ class ApiClient(object):
|
|||||||
:param klass: class literal.
|
:param klass: class literal.
|
||||||
:return: model object.
|
:return: model object.
|
||||||
"""
|
"""
|
||||||
instance = klass()
|
if not klass.swagger_types:
|
||||||
|
|
||||||
if not instance.swagger_types:
|
|
||||||
return data
|
return data
|
||||||
|
|
||||||
for attr, attr_type in iteritems(instance.swagger_types):
|
kwargs = {}
|
||||||
|
for attr, attr_type in iteritems(klass.swagger_types):
|
||||||
if data is not None \
|
if data is not None \
|
||||||
and instance.attribute_map[attr] in data \
|
and klass.attribute_map[attr] in data \
|
||||||
and isinstance(data, (list, dict)):
|
and isinstance(data, (list, dict)):
|
||||||
value = data[instance.attribute_map[attr]]
|
value = data[klass.attribute_map[attr]]
|
||||||
setattr(instance, attr, self.__deserialize(value, attr_type))
|
kwargs[attr] = self.__deserialize(value, attr_type)
|
||||||
|
|
||||||
|
instance = klass(**kwargs)
|
||||||
|
|
||||||
return instance
|
return instance
|
||||||
|
@ -14,42 +14,50 @@ class {{classname}}(object):
|
|||||||
NOTE: This class is auto generated by the swagger code generator program.
|
NOTE: This class is auto generated by the swagger code generator program.
|
||||||
Do not edit the class manually.
|
Do not edit the class manually.
|
||||||
"""
|
"""
|
||||||
{{#allowableValues}}
|
|
||||||
|
|
||||||
|
{{#allowableValues}}
|
||||||
|
"""
|
||||||
|
allowed enum values
|
||||||
|
"""
|
||||||
{{#enumVars}}
|
{{#enumVars}}
|
||||||
{{name}} = {{{value}}}
|
{{name}} = {{{value}}}
|
||||||
{{/enumVars}}
|
{{/enumVars}}
|
||||||
|
|
||||||
{{/allowableValues}}
|
{{/allowableValues}}
|
||||||
def __init__(self{{#vars}}, {{name}}={{#defaultValue}}{{{defaultValue}}}{{/defaultValue}}{{^defaultValue}}None{{/defaultValue}}{{/vars}}):
|
|
||||||
"""
|
|
||||||
{{classname}} - a model defined in Swagger
|
|
||||||
|
|
||||||
:param dict swaggerTypes: The key is attribute name
|
"""
|
||||||
|
Attributes:
|
||||||
|
swagger_types (dict): The key is attribute name
|
||||||
and the value is attribute type.
|
and the value is attribute type.
|
||||||
:param dict attributeMap: The key is attribute name
|
attribute_map (dict): The key is attribute name
|
||||||
and the value is json key in definition.
|
and the value is json key in definition.
|
||||||
"""
|
"""
|
||||||
self.swagger_types = {
|
swagger_types = {
|
||||||
{{#vars}}'{{name}}': '{{{datatype}}}'{{#hasMore}},
|
{{#vars}}'{{name}}': '{{{datatype}}}'{{#hasMore}},
|
||||||
{{/hasMore}}{{/vars}}
|
{{/hasMore}}{{/vars}}
|
||||||
}
|
}
|
||||||
|
|
||||||
self.attribute_map = {
|
attribute_map = {
|
||||||
{{#vars}}'{{name}}': '{{baseName}}'{{#hasMore}},
|
{{#vars}}'{{name}}': '{{baseName}}'{{#hasMore}},
|
||||||
{{/hasMore}}{{/vars}}
|
{{/hasMore}}{{/vars}}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
def __init__(self{{#vars}}, {{name}}={{#defaultValue}}{{{defaultValue}}}{{/defaultValue}}{{^defaultValue}}None{{/defaultValue}}{{/vars}}):
|
||||||
|
"""
|
||||||
|
{{classname}} - a model defined in Swagger
|
||||||
|
"""
|
||||||
|
|
||||||
{{#vars}}
|
{{#vars}}
|
||||||
self._{{name}} = None
|
self._{{name}} = None
|
||||||
{{/vars}}
|
{{/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}}
|
{{#vars}}
|
||||||
|
{{#required}}
|
||||||
|
self.{{name}} = {{name}}
|
||||||
|
{{/required}}
|
||||||
|
{{^required}}
|
||||||
if {{name}} is not None:
|
if {{name}} is not None:
|
||||||
self.{{name}} = {{name}}
|
self.{{name}} = {{name}}
|
||||||
|
{{/required}}
|
||||||
{{/vars}}
|
{{/vars}}
|
||||||
|
|
||||||
{{#vars}}
|
{{#vars}}
|
||||||
|
@ -28,7 +28,9 @@ class Test{{classname}}(unittest.TestCase):
|
|||||||
"""
|
"""
|
||||||
Test {{classname}}
|
Test {{classname}}
|
||||||
"""
|
"""
|
||||||
model = {{packageName}}.models.{{classFilename}}.{{classname}}()
|
# FIXME: construct object with mandatory attributes with example values
|
||||||
|
#model = {{packageName}}.models.{{classFilename}}.{{classname}}()
|
||||||
|
pass
|
||||||
|
|
||||||
{{/model}}
|
{{/model}}
|
||||||
{{/models}}
|
{{/models}}
|
||||||
|
@ -804,6 +804,74 @@ paths:
|
|||||||
description: User not found
|
description: User not found
|
||||||
security:
|
security:
|
||||||
- http_basic_test: []
|
- http_basic_test: []
|
||||||
|
/fake/outer/number:
|
||||||
|
post:
|
||||||
|
tags:
|
||||||
|
- fake
|
||||||
|
description: Test serialization of outer number types
|
||||||
|
operationId: fakeOuterNumberSerialize
|
||||||
|
parameters:
|
||||||
|
- name: body
|
||||||
|
in: body
|
||||||
|
description: Input number as post body
|
||||||
|
schema:
|
||||||
|
$ref: '#/definitions/OuterNumber'
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: Output number
|
||||||
|
schema:
|
||||||
|
$ref: '#/definitions/OuterNumber'
|
||||||
|
/fake/outer/string:
|
||||||
|
post:
|
||||||
|
tags:
|
||||||
|
- fake
|
||||||
|
description: Test serialization of outer string types
|
||||||
|
operationId: fakeOuterStringSerialize
|
||||||
|
parameters:
|
||||||
|
- name: body
|
||||||
|
in: body
|
||||||
|
description: Input string as post body
|
||||||
|
schema:
|
||||||
|
$ref: '#/definitions/OuterString'
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: Output string
|
||||||
|
schema:
|
||||||
|
$ref: '#/definitions/OuterString'
|
||||||
|
/fake/outer/boolean:
|
||||||
|
post:
|
||||||
|
tags:
|
||||||
|
- fake
|
||||||
|
description: Test serialization of outer boolean types
|
||||||
|
operationId: fakeOuterBooleanSerialize
|
||||||
|
parameters:
|
||||||
|
- name: body
|
||||||
|
in: body
|
||||||
|
description: Input boolean as post body
|
||||||
|
schema:
|
||||||
|
$ref: '#/definitions/OuterBoolean'
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: Output boolean
|
||||||
|
schema:
|
||||||
|
$ref: '#/definitions/OuterBoolean'
|
||||||
|
/fake/outer/composite:
|
||||||
|
post:
|
||||||
|
tags:
|
||||||
|
- fake
|
||||||
|
description: Test serialization of object with outer number type
|
||||||
|
operationId: fakeOuterCompositeSerialize
|
||||||
|
parameters:
|
||||||
|
- name: body
|
||||||
|
in: body
|
||||||
|
description: Input composite as post body
|
||||||
|
schema:
|
||||||
|
$ref: '#/definitions/OuterComposite'
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: Output composite
|
||||||
|
schema:
|
||||||
|
$ref: '#/definitions/OuterComposite'
|
||||||
securityDefinitions:
|
securityDefinitions:
|
||||||
petstore_auth:
|
petstore_auth:
|
||||||
type: oauth2
|
type: oauth2
|
||||||
@ -1281,6 +1349,21 @@ definitions:
|
|||||||
- "placed"
|
- "placed"
|
||||||
- "approved"
|
- "approved"
|
||||||
- "delivered"
|
- "delivered"
|
||||||
|
OuterNumber:
|
||||||
|
type: number
|
||||||
|
OuterString:
|
||||||
|
type: string
|
||||||
|
OuterBoolean:
|
||||||
|
type: boolean
|
||||||
|
OuterComposite:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
my_number:
|
||||||
|
$ref: '#/definitions/OuterNumber'
|
||||||
|
my_string:
|
||||||
|
$ref: '#/definitions/OuterString'
|
||||||
|
my_boolean:
|
||||||
|
$ref: '#/definitions/OuterBoolean'
|
||||||
externalDocs:
|
externalDocs:
|
||||||
description: Find out more about Swagger
|
description: Find out more about Swagger
|
||||||
url: 'http://swagger.io'
|
url: 'http://swagger.io'
|
||||||
|
@ -1091,6 +1091,26 @@ public class ApiClient {
|
|||||||
* @throws ApiException If fail to serialize the request body object
|
* @throws ApiException If fail to serialize the request body object
|
||||||
*/
|
*/
|
||||||
public Call buildCall(String path, String method, List<Pair> queryParams, Object body, Map<String, String> headerParams, Map<String, Object> formParams, String[] authNames, ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
|
public Call buildCall(String path, String method, List<Pair> queryParams, Object body, Map<String, String> headerParams, Map<String, Object> formParams, String[] authNames, ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
|
||||||
|
Request request = buildRequest(path, method, queryParams, body, headerParams, formParams, authNames, progressRequestListener);
|
||||||
|
|
||||||
|
return httpClient.newCall(request);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Build an HTTP request with the given options.
|
||||||
|
*
|
||||||
|
* @param path The sub-path of the HTTP URL
|
||||||
|
* @param method The request method, one of "GET", "HEAD", "OPTIONS", "POST", "PUT", "PATCH" and "DELETE"
|
||||||
|
* @param queryParams The query parameters
|
||||||
|
* @param body The request body object
|
||||||
|
* @param headerParams The header parameters
|
||||||
|
* @param formParams The form parameters
|
||||||
|
* @param authNames The authentications to apply
|
||||||
|
* @param progressRequestListener Progress request listener
|
||||||
|
* @return The HTTP request
|
||||||
|
* @throws ApiException If fail to serialize the request body object
|
||||||
|
*/
|
||||||
|
public Request buildRequest(String path, String method, List<Pair> queryParams, Object body, Map<String, String> headerParams, Map<String, Object> formParams, String[] authNames, ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
|
||||||
updateParamsForAuth(authNames, queryParams, headerParams);
|
updateParamsForAuth(authNames, queryParams, headerParams);
|
||||||
|
|
||||||
final String url = buildUrl(path, queryParams);
|
final String url = buildUrl(path, queryParams);
|
||||||
@ -1131,7 +1151,7 @@ public class ApiClient {
|
|||||||
request = reqBuilder.method(method, reqBody).build();
|
request = reqBuilder.method(method, reqBody).build();
|
||||||
}
|
}
|
||||||
|
|
||||||
return httpClient.newCall(request);
|
return request;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -296,6 +296,10 @@ case $state in
|
|||||||
ops)
|
ops)
|
||||||
# Operations
|
# Operations
|
||||||
_values "Operations" \
|
_values "Operations" \
|
||||||
|
"fakeOuterBooleanSerialize[]" \
|
||||||
|
"fakeOuterCompositeSerialize[]" \
|
||||||
|
"fakeOuterNumberSerialize[]" \
|
||||||
|
"fakeOuterStringSerialize[]" \
|
||||||
"testClientModel[To test \"client\" model]" \
|
"testClientModel[To test \"client\" model]" \
|
||||||
"testEndpointParameters[Fake endpoint for testing various parameters
|
"testEndpointParameters[Fake endpoint for testing various parameters
|
||||||
假端點
|
假端點
|
||||||
@ -325,6 +329,30 @@ case $state in
|
|||||||
;;
|
;;
|
||||||
args)
|
args)
|
||||||
case $line[1] in
|
case $line[1] in
|
||||||
|
fakeOuterBooleanSerialize)
|
||||||
|
local -a _op_arguments
|
||||||
|
_op_arguments=(
|
||||||
|
)
|
||||||
|
_describe -t actions 'operations' _op_arguments -S '' && ret=0
|
||||||
|
;;
|
||||||
|
fakeOuterCompositeSerialize)
|
||||||
|
local -a _op_arguments
|
||||||
|
_op_arguments=(
|
||||||
|
)
|
||||||
|
_describe -t actions 'operations' _op_arguments -S '' && ret=0
|
||||||
|
;;
|
||||||
|
fakeOuterNumberSerialize)
|
||||||
|
local -a _op_arguments
|
||||||
|
_op_arguments=(
|
||||||
|
)
|
||||||
|
_describe -t actions 'operations' _op_arguments -S '' && ret=0
|
||||||
|
;;
|
||||||
|
fakeOuterStringSerialize)
|
||||||
|
local -a _op_arguments
|
||||||
|
_op_arguments=(
|
||||||
|
)
|
||||||
|
_describe -t actions 'operations' _op_arguments -S '' && ret=0
|
||||||
|
;;
|
||||||
testClientModel)
|
testClientModel)
|
||||||
local -a _op_arguments
|
local -a _op_arguments
|
||||||
_op_arguments=(
|
_op_arguments=(
|
||||||
|
@ -66,6 +66,10 @@ declare -A operation_parameters
|
|||||||
# 0 - optional
|
# 0 - optional
|
||||||
# 1 - required
|
# 1 - required
|
||||||
declare -A operation_parameters_minimum_occurences
|
declare -A operation_parameters_minimum_occurences
|
||||||
|
operation_parameters_minimum_occurences["fakeOuterBooleanSerialize:::body"]=0
|
||||||
|
operation_parameters_minimum_occurences["fakeOuterCompositeSerialize:::body"]=0
|
||||||
|
operation_parameters_minimum_occurences["fakeOuterNumberSerialize:::body"]=0
|
||||||
|
operation_parameters_minimum_occurences["fakeOuterStringSerialize:::body"]=0
|
||||||
operation_parameters_minimum_occurences["testClientModel:::body"]=1
|
operation_parameters_minimum_occurences["testClientModel:::body"]=1
|
||||||
operation_parameters_minimum_occurences["testEndpointParameters:::number"]=1
|
operation_parameters_minimum_occurences["testEndpointParameters:::number"]=1
|
||||||
operation_parameters_minimum_occurences["testEndpointParameters:::double"]=1
|
operation_parameters_minimum_occurences["testEndpointParameters:::double"]=1
|
||||||
@ -123,6 +127,10 @@ operation_parameters_minimum_occurences["updateUser:::body"]=1
|
|||||||
# N - N values
|
# N - N values
|
||||||
# 0 - unlimited
|
# 0 - unlimited
|
||||||
declare -A operation_parameters_maximum_occurences
|
declare -A operation_parameters_maximum_occurences
|
||||||
|
operation_parameters_maximum_occurences["fakeOuterBooleanSerialize:::body"]=0
|
||||||
|
operation_parameters_maximum_occurences["fakeOuterCompositeSerialize:::body"]=0
|
||||||
|
operation_parameters_maximum_occurences["fakeOuterNumberSerialize:::body"]=0
|
||||||
|
operation_parameters_maximum_occurences["fakeOuterStringSerialize:::body"]=0
|
||||||
operation_parameters_maximum_occurences["testClientModel:::body"]=0
|
operation_parameters_maximum_occurences["testClientModel:::body"]=0
|
||||||
operation_parameters_maximum_occurences["testEndpointParameters:::number"]=0
|
operation_parameters_maximum_occurences["testEndpointParameters:::number"]=0
|
||||||
operation_parameters_maximum_occurences["testEndpointParameters:::double"]=0
|
operation_parameters_maximum_occurences["testEndpointParameters:::double"]=0
|
||||||
@ -177,6 +185,10 @@ operation_parameters_maximum_occurences["updateUser:::body"]=0
|
|||||||
# The type of collection for specifying multiple values for parameter:
|
# The type of collection for specifying multiple values for parameter:
|
||||||
# - multi, csv, ssv, tsv
|
# - multi, csv, ssv, tsv
|
||||||
declare -A operation_parameters_collection_type
|
declare -A operation_parameters_collection_type
|
||||||
|
operation_parameters_collection_type["fakeOuterBooleanSerialize:::body"]=""
|
||||||
|
operation_parameters_collection_type["fakeOuterCompositeSerialize:::body"]=""
|
||||||
|
operation_parameters_collection_type["fakeOuterNumberSerialize:::body"]=""
|
||||||
|
operation_parameters_collection_type["fakeOuterStringSerialize:::body"]=""
|
||||||
operation_parameters_collection_type["testClientModel:::body"]=""
|
operation_parameters_collection_type["testClientModel:::body"]=""
|
||||||
operation_parameters_collection_type["testEndpointParameters:::number"]=""
|
operation_parameters_collection_type["testEndpointParameters:::number"]=""
|
||||||
operation_parameters_collection_type["testEndpointParameters:::double"]=""
|
operation_parameters_collection_type["testEndpointParameters:::double"]=""
|
||||||
@ -714,6 +726,10 @@ EOF
|
|||||||
echo ""
|
echo ""
|
||||||
echo -e "$(tput bold)$(tput setaf 7)[fake]$(tput sgr0)"
|
echo -e "$(tput bold)$(tput setaf 7)[fake]$(tput sgr0)"
|
||||||
read -d '' ops <<EOF
|
read -d '' ops <<EOF
|
||||||
|
$(tput setaf 6)fakeOuterBooleanSerialize$(tput sgr0);
|
||||||
|
$(tput setaf 6)fakeOuterCompositeSerialize$(tput sgr0);
|
||||||
|
$(tput setaf 6)fakeOuterNumberSerialize$(tput sgr0);
|
||||||
|
$(tput setaf 6)fakeOuterStringSerialize$(tput sgr0);
|
||||||
$(tput setaf 6)testClientModel$(tput sgr0);To test \"client\" model
|
$(tput setaf 6)testClientModel$(tput sgr0);To test \"client\" model
|
||||||
$(tput setaf 6)testEndpointParameters$(tput sgr0);Fake endpoint for testing various parameters
|
$(tput setaf 6)testEndpointParameters$(tput sgr0);Fake endpoint for testing various parameters
|
||||||
假端點
|
假端點
|
||||||
@ -813,6 +829,154 @@ print_version() {
|
|||||||
echo ""
|
echo ""
|
||||||
}
|
}
|
||||||
|
|
||||||
|
##############################################################################
|
||||||
|
#
|
||||||
|
# Print help for fakeOuterBooleanSerialize operation
|
||||||
|
#
|
||||||
|
##############################################################################
|
||||||
|
print_fakeOuterBooleanSerialize_help() {
|
||||||
|
echo ""
|
||||||
|
echo -e "$(tput bold)$(tput setaf 7)fakeOuterBooleanSerialize - $(tput sgr0)"
|
||||||
|
echo -e ""
|
||||||
|
echo -e "Test serialization of outer boolean types" | fold -sw 80
|
||||||
|
echo -e ""
|
||||||
|
echo -e "$(tput bold)$(tput setaf 7)Parameters$(tput sgr0)"
|
||||||
|
echo -e " * $(tput setaf 2)body$(tput sgr0) $(tput setaf 4)[]$(tput sgr0)$(tput sgr0) - Input boolean as post body" | fold -sw 80 | sed '2,$s/^/ /'
|
||||||
|
echo -e ""
|
||||||
|
echo ""
|
||||||
|
echo -e "$(tput bold)$(tput setaf 7)Responses$(tput sgr0)"
|
||||||
|
case 200 in
|
||||||
|
1*)
|
||||||
|
echo -e "$(tput setaf 7) 200;Output boolean$(tput sgr0)" | column -t -s ';' | fold -sw 80 | sed '2,$s/^/ /'
|
||||||
|
;;
|
||||||
|
2*)
|
||||||
|
echo -e "$(tput setaf 2) 200;Output boolean$(tput sgr0)" | column -t -s ';' | fold -sw 80 | sed '2,$s/^/ /'
|
||||||
|
;;
|
||||||
|
3*)
|
||||||
|
echo -e "$(tput setaf 3) 200;Output boolean$(tput sgr0)" | column -t -s ';' | fold -sw 80 | sed '2,$s/^/ /'
|
||||||
|
;;
|
||||||
|
4*)
|
||||||
|
echo -e "$(tput setaf 1) 200;Output boolean$(tput sgr0)" | column -t -s ';' | fold -sw 80 | sed '2,$s/^/ /'
|
||||||
|
;;
|
||||||
|
5*)
|
||||||
|
echo -e "$(tput setaf 5) 200;Output boolean$(tput sgr0)" | column -t -s ';' | fold -sw 80 | sed '2,$s/^/ /'
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo -e "$(tput setaf 7) 200;Output boolean$(tput sgr0)" | column -t -s ';' | fold -sw 80 | sed '2,$s/^/ /'
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
##############################################################################
|
||||||
|
#
|
||||||
|
# Print help for fakeOuterCompositeSerialize operation
|
||||||
|
#
|
||||||
|
##############################################################################
|
||||||
|
print_fakeOuterCompositeSerialize_help() {
|
||||||
|
echo ""
|
||||||
|
echo -e "$(tput bold)$(tput setaf 7)fakeOuterCompositeSerialize - $(tput sgr0)"
|
||||||
|
echo -e ""
|
||||||
|
echo -e "Test serialization of object with outer number type" | fold -sw 80
|
||||||
|
echo -e ""
|
||||||
|
echo -e "$(tput bold)$(tput setaf 7)Parameters$(tput sgr0)"
|
||||||
|
echo -e " * $(tput setaf 2)body$(tput sgr0) $(tput setaf 4)[]$(tput sgr0)$(tput sgr0) - Input composite as post body" | fold -sw 80 | sed '2,$s/^/ /'
|
||||||
|
echo -e ""
|
||||||
|
echo ""
|
||||||
|
echo -e "$(tput bold)$(tput setaf 7)Responses$(tput sgr0)"
|
||||||
|
case 200 in
|
||||||
|
1*)
|
||||||
|
echo -e "$(tput setaf 7) 200;Output composite$(tput sgr0)" | column -t -s ';' | fold -sw 80 | sed '2,$s/^/ /'
|
||||||
|
;;
|
||||||
|
2*)
|
||||||
|
echo -e "$(tput setaf 2) 200;Output composite$(tput sgr0)" | column -t -s ';' | fold -sw 80 | sed '2,$s/^/ /'
|
||||||
|
;;
|
||||||
|
3*)
|
||||||
|
echo -e "$(tput setaf 3) 200;Output composite$(tput sgr0)" | column -t -s ';' | fold -sw 80 | sed '2,$s/^/ /'
|
||||||
|
;;
|
||||||
|
4*)
|
||||||
|
echo -e "$(tput setaf 1) 200;Output composite$(tput sgr0)" | column -t -s ';' | fold -sw 80 | sed '2,$s/^/ /'
|
||||||
|
;;
|
||||||
|
5*)
|
||||||
|
echo -e "$(tput setaf 5) 200;Output composite$(tput sgr0)" | column -t -s ';' | fold -sw 80 | sed '2,$s/^/ /'
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo -e "$(tput setaf 7) 200;Output composite$(tput sgr0)" | column -t -s ';' | fold -sw 80 | sed '2,$s/^/ /'
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
##############################################################################
|
||||||
|
#
|
||||||
|
# Print help for fakeOuterNumberSerialize operation
|
||||||
|
#
|
||||||
|
##############################################################################
|
||||||
|
print_fakeOuterNumberSerialize_help() {
|
||||||
|
echo ""
|
||||||
|
echo -e "$(tput bold)$(tput setaf 7)fakeOuterNumberSerialize - $(tput sgr0)"
|
||||||
|
echo -e ""
|
||||||
|
echo -e "Test serialization of outer number types" | fold -sw 80
|
||||||
|
echo -e ""
|
||||||
|
echo -e "$(tput bold)$(tput setaf 7)Parameters$(tput sgr0)"
|
||||||
|
echo -e " * $(tput setaf 2)body$(tput sgr0) $(tput setaf 4)[]$(tput sgr0)$(tput sgr0) - Input number as post body" | fold -sw 80 | sed '2,$s/^/ /'
|
||||||
|
echo -e ""
|
||||||
|
echo ""
|
||||||
|
echo -e "$(tput bold)$(tput setaf 7)Responses$(tput sgr0)"
|
||||||
|
case 200 in
|
||||||
|
1*)
|
||||||
|
echo -e "$(tput setaf 7) 200;Output number$(tput sgr0)" | column -t -s ';' | fold -sw 80 | sed '2,$s/^/ /'
|
||||||
|
;;
|
||||||
|
2*)
|
||||||
|
echo -e "$(tput setaf 2) 200;Output number$(tput sgr0)" | column -t -s ';' | fold -sw 80 | sed '2,$s/^/ /'
|
||||||
|
;;
|
||||||
|
3*)
|
||||||
|
echo -e "$(tput setaf 3) 200;Output number$(tput sgr0)" | column -t -s ';' | fold -sw 80 | sed '2,$s/^/ /'
|
||||||
|
;;
|
||||||
|
4*)
|
||||||
|
echo -e "$(tput setaf 1) 200;Output number$(tput sgr0)" | column -t -s ';' | fold -sw 80 | sed '2,$s/^/ /'
|
||||||
|
;;
|
||||||
|
5*)
|
||||||
|
echo -e "$(tput setaf 5) 200;Output number$(tput sgr0)" | column -t -s ';' | fold -sw 80 | sed '2,$s/^/ /'
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo -e "$(tput setaf 7) 200;Output number$(tput sgr0)" | column -t -s ';' | fold -sw 80 | sed '2,$s/^/ /'
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
##############################################################################
|
||||||
|
#
|
||||||
|
# Print help for fakeOuterStringSerialize operation
|
||||||
|
#
|
||||||
|
##############################################################################
|
||||||
|
print_fakeOuterStringSerialize_help() {
|
||||||
|
echo ""
|
||||||
|
echo -e "$(tput bold)$(tput setaf 7)fakeOuterStringSerialize - $(tput sgr0)"
|
||||||
|
echo -e ""
|
||||||
|
echo -e "Test serialization of outer string types" | fold -sw 80
|
||||||
|
echo -e ""
|
||||||
|
echo -e "$(tput bold)$(tput setaf 7)Parameters$(tput sgr0)"
|
||||||
|
echo -e " * $(tput setaf 2)body$(tput sgr0) $(tput setaf 4)[]$(tput sgr0)$(tput sgr0) - Input string as post body" | fold -sw 80 | sed '2,$s/^/ /'
|
||||||
|
echo -e ""
|
||||||
|
echo ""
|
||||||
|
echo -e "$(tput bold)$(tput setaf 7)Responses$(tput sgr0)"
|
||||||
|
case 200 in
|
||||||
|
1*)
|
||||||
|
echo -e "$(tput setaf 7) 200;Output string$(tput sgr0)" | column -t -s ';' | fold -sw 80 | sed '2,$s/^/ /'
|
||||||
|
;;
|
||||||
|
2*)
|
||||||
|
echo -e "$(tput setaf 2) 200;Output string$(tput sgr0)" | column -t -s ';' | fold -sw 80 | sed '2,$s/^/ /'
|
||||||
|
;;
|
||||||
|
3*)
|
||||||
|
echo -e "$(tput setaf 3) 200;Output string$(tput sgr0)" | column -t -s ';' | fold -sw 80 | sed '2,$s/^/ /'
|
||||||
|
;;
|
||||||
|
4*)
|
||||||
|
echo -e "$(tput setaf 1) 200;Output string$(tput sgr0)" | column -t -s ';' | fold -sw 80 | sed '2,$s/^/ /'
|
||||||
|
;;
|
||||||
|
5*)
|
||||||
|
echo -e "$(tput setaf 5) 200;Output string$(tput sgr0)" | column -t -s ';' | fold -sw 80 | sed '2,$s/^/ /'
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo -e "$(tput setaf 7) 200;Output string$(tput sgr0)" | column -t -s ';' | fold -sw 80 | sed '2,$s/^/ /'
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
##############################################################################
|
##############################################################################
|
||||||
#
|
#
|
||||||
# Print help for testClientModel operation
|
# Print help for testClientModel operation
|
||||||
@ -2044,6 +2208,262 @@ print_updateUser_help() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
##############################################################################
|
||||||
|
#
|
||||||
|
# Call fakeOuterBooleanSerialize operation
|
||||||
|
#
|
||||||
|
##############################################################################
|
||||||
|
call_fakeOuterBooleanSerialize() {
|
||||||
|
local path_parameter_names=()
|
||||||
|
local query_parameter_names=()
|
||||||
|
|
||||||
|
if [[ $force = false ]]; then
|
||||||
|
validate_request_parameters "/v2/fake/outer/boolean" path_parameter_names query_parameter_names
|
||||||
|
fi
|
||||||
|
|
||||||
|
local path=$(build_request_path "/v2/fake/outer/boolean" path_parameter_names query_parameter_names)
|
||||||
|
local method="POST"
|
||||||
|
local headers_curl=$(header_arguments_to_curl)
|
||||||
|
if [[ -n $header_accept ]]; then
|
||||||
|
headers_curl="${headers_curl} -H 'Accept: ${header_accept}'"
|
||||||
|
fi
|
||||||
|
|
||||||
|
local basic_auth_option=""
|
||||||
|
if [[ -n $basic_auth_credential ]]; then
|
||||||
|
basic_auth_option="-u ${basic_auth_credential}"
|
||||||
|
fi
|
||||||
|
local body_json_curl=""
|
||||||
|
|
||||||
|
#
|
||||||
|
# Check if the user provided 'Content-type' headers in the
|
||||||
|
# command line. If not try to set them based on the Swagger specification
|
||||||
|
# if values produces and consumes are defined unambigously
|
||||||
|
#
|
||||||
|
|
||||||
|
|
||||||
|
if [[ -z $header_content_type && "$force" = false ]]; then
|
||||||
|
:
|
||||||
|
else
|
||||||
|
headers_curl="${headers_curl} -H 'Content-type: ${header_content_type}'"
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
# If we have received some body content over pipe, pass it from the
|
||||||
|
# temporary file to cURL
|
||||||
|
#
|
||||||
|
if [[ -n $body_content_temp_file ]]; then
|
||||||
|
if [[ "$print_curl" = true ]]; then
|
||||||
|
echo "cat ${body_content_temp_file} | curl ${basic_auth_option} ${curl_arguments} ${headers_curl} -X ${method} \"${host}${path}\" -d @-"
|
||||||
|
else
|
||||||
|
eval "cat ${body_content_temp_file} | curl ${basic_auth_option} ${curl_arguments} ${headers_curl} -X ${method} \"${host}${path}\" -d @-"
|
||||||
|
fi
|
||||||
|
rm "${body_content_temp_file}"
|
||||||
|
#
|
||||||
|
# If not, try to build the content body from arguments KEY==VALUE and KEY:=VALUE
|
||||||
|
#
|
||||||
|
else
|
||||||
|
body_json_curl=$(body_parameters_to_json)
|
||||||
|
if [[ "$print_curl" = true ]]; then
|
||||||
|
echo "curl ${basic_auth_option} ${curl_arguments} ${headers_curl} -X ${method} ${body_json_curl} \"${host}${path}\""
|
||||||
|
else
|
||||||
|
eval "curl ${basic_auth_option} ${curl_arguments} ${headers_curl} -X ${method} ${body_json_curl} \"${host}${path}\""
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
##############################################################################
|
||||||
|
#
|
||||||
|
# Call fakeOuterCompositeSerialize operation
|
||||||
|
#
|
||||||
|
##############################################################################
|
||||||
|
call_fakeOuterCompositeSerialize() {
|
||||||
|
local path_parameter_names=()
|
||||||
|
local query_parameter_names=()
|
||||||
|
|
||||||
|
if [[ $force = false ]]; then
|
||||||
|
validate_request_parameters "/v2/fake/outer/composite" path_parameter_names query_parameter_names
|
||||||
|
fi
|
||||||
|
|
||||||
|
local path=$(build_request_path "/v2/fake/outer/composite" path_parameter_names query_parameter_names)
|
||||||
|
local method="POST"
|
||||||
|
local headers_curl=$(header_arguments_to_curl)
|
||||||
|
if [[ -n $header_accept ]]; then
|
||||||
|
headers_curl="${headers_curl} -H 'Accept: ${header_accept}'"
|
||||||
|
fi
|
||||||
|
|
||||||
|
local basic_auth_option=""
|
||||||
|
if [[ -n $basic_auth_credential ]]; then
|
||||||
|
basic_auth_option="-u ${basic_auth_credential}"
|
||||||
|
fi
|
||||||
|
local body_json_curl=""
|
||||||
|
|
||||||
|
#
|
||||||
|
# Check if the user provided 'Content-type' headers in the
|
||||||
|
# command line. If not try to set them based on the Swagger specification
|
||||||
|
# if values produces and consumes are defined unambigously
|
||||||
|
#
|
||||||
|
|
||||||
|
|
||||||
|
if [[ -z $header_content_type && "$force" = false ]]; then
|
||||||
|
:
|
||||||
|
else
|
||||||
|
headers_curl="${headers_curl} -H 'Content-type: ${header_content_type}'"
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
# If we have received some body content over pipe, pass it from the
|
||||||
|
# temporary file to cURL
|
||||||
|
#
|
||||||
|
if [[ -n $body_content_temp_file ]]; then
|
||||||
|
if [[ "$print_curl" = true ]]; then
|
||||||
|
echo "cat ${body_content_temp_file} | curl ${basic_auth_option} ${curl_arguments} ${headers_curl} -X ${method} \"${host}${path}\" -d @-"
|
||||||
|
else
|
||||||
|
eval "cat ${body_content_temp_file} | curl ${basic_auth_option} ${curl_arguments} ${headers_curl} -X ${method} \"${host}${path}\" -d @-"
|
||||||
|
fi
|
||||||
|
rm "${body_content_temp_file}"
|
||||||
|
#
|
||||||
|
# If not, try to build the content body from arguments KEY==VALUE and KEY:=VALUE
|
||||||
|
#
|
||||||
|
else
|
||||||
|
body_json_curl=$(body_parameters_to_json)
|
||||||
|
if [[ "$print_curl" = true ]]; then
|
||||||
|
echo "curl ${basic_auth_option} ${curl_arguments} ${headers_curl} -X ${method} ${body_json_curl} \"${host}${path}\""
|
||||||
|
else
|
||||||
|
eval "curl ${basic_auth_option} ${curl_arguments} ${headers_curl} -X ${method} ${body_json_curl} \"${host}${path}\""
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
##############################################################################
|
||||||
|
#
|
||||||
|
# Call fakeOuterNumberSerialize operation
|
||||||
|
#
|
||||||
|
##############################################################################
|
||||||
|
call_fakeOuterNumberSerialize() {
|
||||||
|
local path_parameter_names=()
|
||||||
|
local query_parameter_names=()
|
||||||
|
|
||||||
|
if [[ $force = false ]]; then
|
||||||
|
validate_request_parameters "/v2/fake/outer/number" path_parameter_names query_parameter_names
|
||||||
|
fi
|
||||||
|
|
||||||
|
local path=$(build_request_path "/v2/fake/outer/number" path_parameter_names query_parameter_names)
|
||||||
|
local method="POST"
|
||||||
|
local headers_curl=$(header_arguments_to_curl)
|
||||||
|
if [[ -n $header_accept ]]; then
|
||||||
|
headers_curl="${headers_curl} -H 'Accept: ${header_accept}'"
|
||||||
|
fi
|
||||||
|
|
||||||
|
local basic_auth_option=""
|
||||||
|
if [[ -n $basic_auth_credential ]]; then
|
||||||
|
basic_auth_option="-u ${basic_auth_credential}"
|
||||||
|
fi
|
||||||
|
local body_json_curl=""
|
||||||
|
|
||||||
|
#
|
||||||
|
# Check if the user provided 'Content-type' headers in the
|
||||||
|
# command line. If not try to set them based on the Swagger specification
|
||||||
|
# if values produces and consumes are defined unambigously
|
||||||
|
#
|
||||||
|
|
||||||
|
|
||||||
|
if [[ -z $header_content_type && "$force" = false ]]; then
|
||||||
|
:
|
||||||
|
else
|
||||||
|
headers_curl="${headers_curl} -H 'Content-type: ${header_content_type}'"
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
# If we have received some body content over pipe, pass it from the
|
||||||
|
# temporary file to cURL
|
||||||
|
#
|
||||||
|
if [[ -n $body_content_temp_file ]]; then
|
||||||
|
if [[ "$print_curl" = true ]]; then
|
||||||
|
echo "cat ${body_content_temp_file} | curl ${basic_auth_option} ${curl_arguments} ${headers_curl} -X ${method} \"${host}${path}\" -d @-"
|
||||||
|
else
|
||||||
|
eval "cat ${body_content_temp_file} | curl ${basic_auth_option} ${curl_arguments} ${headers_curl} -X ${method} \"${host}${path}\" -d @-"
|
||||||
|
fi
|
||||||
|
rm "${body_content_temp_file}"
|
||||||
|
#
|
||||||
|
# If not, try to build the content body from arguments KEY==VALUE and KEY:=VALUE
|
||||||
|
#
|
||||||
|
else
|
||||||
|
body_json_curl=$(body_parameters_to_json)
|
||||||
|
if [[ "$print_curl" = true ]]; then
|
||||||
|
echo "curl ${basic_auth_option} ${curl_arguments} ${headers_curl} -X ${method} ${body_json_curl} \"${host}${path}\""
|
||||||
|
else
|
||||||
|
eval "curl ${basic_auth_option} ${curl_arguments} ${headers_curl} -X ${method} ${body_json_curl} \"${host}${path}\""
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
##############################################################################
|
||||||
|
#
|
||||||
|
# Call fakeOuterStringSerialize operation
|
||||||
|
#
|
||||||
|
##############################################################################
|
||||||
|
call_fakeOuterStringSerialize() {
|
||||||
|
local path_parameter_names=()
|
||||||
|
local query_parameter_names=()
|
||||||
|
|
||||||
|
if [[ $force = false ]]; then
|
||||||
|
validate_request_parameters "/v2/fake/outer/string" path_parameter_names query_parameter_names
|
||||||
|
fi
|
||||||
|
|
||||||
|
local path=$(build_request_path "/v2/fake/outer/string" path_parameter_names query_parameter_names)
|
||||||
|
local method="POST"
|
||||||
|
local headers_curl=$(header_arguments_to_curl)
|
||||||
|
if [[ -n $header_accept ]]; then
|
||||||
|
headers_curl="${headers_curl} -H 'Accept: ${header_accept}'"
|
||||||
|
fi
|
||||||
|
|
||||||
|
local basic_auth_option=""
|
||||||
|
if [[ -n $basic_auth_credential ]]; then
|
||||||
|
basic_auth_option="-u ${basic_auth_credential}"
|
||||||
|
fi
|
||||||
|
local body_json_curl=""
|
||||||
|
|
||||||
|
#
|
||||||
|
# Check if the user provided 'Content-type' headers in the
|
||||||
|
# command line. If not try to set them based on the Swagger specification
|
||||||
|
# if values produces and consumes are defined unambigously
|
||||||
|
#
|
||||||
|
|
||||||
|
|
||||||
|
if [[ -z $header_content_type && "$force" = false ]]; then
|
||||||
|
:
|
||||||
|
else
|
||||||
|
headers_curl="${headers_curl} -H 'Content-type: ${header_content_type}'"
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
# If we have received some body content over pipe, pass it from the
|
||||||
|
# temporary file to cURL
|
||||||
|
#
|
||||||
|
if [[ -n $body_content_temp_file ]]; then
|
||||||
|
if [[ "$print_curl" = true ]]; then
|
||||||
|
echo "cat ${body_content_temp_file} | curl ${basic_auth_option} ${curl_arguments} ${headers_curl} -X ${method} \"${host}${path}\" -d @-"
|
||||||
|
else
|
||||||
|
eval "cat ${body_content_temp_file} | curl ${basic_auth_option} ${curl_arguments} ${headers_curl} -X ${method} \"${host}${path}\" -d @-"
|
||||||
|
fi
|
||||||
|
rm "${body_content_temp_file}"
|
||||||
|
#
|
||||||
|
# If not, try to build the content body from arguments KEY==VALUE and KEY:=VALUE
|
||||||
|
#
|
||||||
|
else
|
||||||
|
body_json_curl=$(body_parameters_to_json)
|
||||||
|
if [[ "$print_curl" = true ]]; then
|
||||||
|
echo "curl ${basic_auth_option} ${curl_arguments} ${headers_curl} -X ${method} ${body_json_curl} \"${host}${path}\""
|
||||||
|
else
|
||||||
|
eval "curl ${basic_auth_option} ${curl_arguments} ${headers_curl} -X ${method} ${body_json_curl} \"${host}${path}\""
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
##############################################################################
|
##############################################################################
|
||||||
#
|
#
|
||||||
# Call testClientModel operation
|
# Call testClientModel operation
|
||||||
@ -3202,6 +3622,18 @@ case $key in
|
|||||||
--dry-run)
|
--dry-run)
|
||||||
print_curl=true
|
print_curl=true
|
||||||
;;
|
;;
|
||||||
|
fakeOuterBooleanSerialize)
|
||||||
|
operation="fakeOuterBooleanSerialize"
|
||||||
|
;;
|
||||||
|
fakeOuterCompositeSerialize)
|
||||||
|
operation="fakeOuterCompositeSerialize"
|
||||||
|
;;
|
||||||
|
fakeOuterNumberSerialize)
|
||||||
|
operation="fakeOuterNumberSerialize"
|
||||||
|
;;
|
||||||
|
fakeOuterStringSerialize)
|
||||||
|
operation="fakeOuterStringSerialize"
|
||||||
|
;;
|
||||||
testClientModel)
|
testClientModel)
|
||||||
operation="testClientModel"
|
operation="testClientModel"
|
||||||
;;
|
;;
|
||||||
@ -3358,6 +3790,18 @@ fi
|
|||||||
|
|
||||||
# Run cURL command based on the operation ID
|
# Run cURL command based on the operation ID
|
||||||
case $operation in
|
case $operation in
|
||||||
|
fakeOuterBooleanSerialize)
|
||||||
|
call_fakeOuterBooleanSerialize
|
||||||
|
;;
|
||||||
|
fakeOuterCompositeSerialize)
|
||||||
|
call_fakeOuterCompositeSerialize
|
||||||
|
;;
|
||||||
|
fakeOuterNumberSerialize)
|
||||||
|
call_fakeOuterNumberSerialize
|
||||||
|
;;
|
||||||
|
fakeOuterStringSerialize)
|
||||||
|
call_fakeOuterStringSerialize
|
||||||
|
;;
|
||||||
testClientModel)
|
testClientModel)
|
||||||
call_testClientModel
|
call_testClientModel
|
||||||
;;
|
;;
|
||||||
|
@ -68,6 +68,10 @@ _petstore-cli()
|
|||||||
# The list of available operation in the REST service
|
# The list of available operation in the REST service
|
||||||
# It's modelled as an associative array for efficient key lookup
|
# It's modelled as an associative array for efficient key lookup
|
||||||
declare -A operations
|
declare -A operations
|
||||||
|
operations["fakeOuterBooleanSerialize"]=1
|
||||||
|
operations["fakeOuterCompositeSerialize"]=1
|
||||||
|
operations["fakeOuterNumberSerialize"]=1
|
||||||
|
operations["fakeOuterStringSerialize"]=1
|
||||||
operations["testClientModel"]=1
|
operations["testClientModel"]=1
|
||||||
operations["testEndpointParameters"]=1
|
operations["testEndpointParameters"]=1
|
||||||
operations["testEnumParameters"]=1
|
operations["testEnumParameters"]=1
|
||||||
@ -96,6 +100,10 @@ _petstore-cli()
|
|||||||
# An associative array of operations to their parameters
|
# An associative array of operations to their parameters
|
||||||
# Only include path, query and header parameters
|
# Only include path, query and header parameters
|
||||||
declare -A operation_parameters
|
declare -A operation_parameters
|
||||||
|
operation_parameters["fakeOuterBooleanSerialize"]=""
|
||||||
|
operation_parameters["fakeOuterCompositeSerialize"]=""
|
||||||
|
operation_parameters["fakeOuterNumberSerialize"]=""
|
||||||
|
operation_parameters["fakeOuterStringSerialize"]=""
|
||||||
operation_parameters["testClientModel"]=""
|
operation_parameters["testClientModel"]=""
|
||||||
operation_parameters["testEndpointParameters"]=""
|
operation_parameters["testEndpointParameters"]=""
|
||||||
operation_parameters["testEnumParameters"]="enum_query_string_array= enum_query_string= enum_query_integer= enum_header_string_array: enum_header_string: "
|
operation_parameters["testEnumParameters"]="enum_query_string_array= enum_query_string= enum_query_integer= enum_header_string_array: enum_header_string: "
|
||||||
|
@ -61,6 +61,11 @@ utility::string_t ApiClient::parameterToString(float value)
|
|||||||
return utility::conversions::to_string_t(std::to_string(value));
|
return utility::conversions::to_string_t(std::to_string(value));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
utility::string_t ApiClient::parameterToString(float value)
|
||||||
|
{
|
||||||
|
return utility::conversions::to_string_t(std::to_string(value));
|
||||||
|
}
|
||||||
|
|
||||||
utility::string_t ApiClient::parameterToString(const utility::datetime &value)
|
utility::string_t ApiClient::parameterToString(const utility::datetime &value)
|
||||||
{
|
{
|
||||||
return utility::conversions::to_string_t(value.to_string(utility::datetime::ISO_8601));
|
return utility::conversions::to_string_t(value.to_string(utility::datetime::ISO_8601));
|
||||||
|
@ -0,0 +1,8 @@
|
|||||||
|
# IO.Swagger.Model.OuterBoolean
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
@ -0,0 +1,11 @@
|
|||||||
|
# IO.Swagger.Model.OuterComposite
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**MyNumber** | [**OuterNumber**](OuterNumber.md) | | [optional]
|
||||||
|
**MyString** | [**OuterString**](OuterString.md) | | [optional]
|
||||||
|
**MyBoolean** | [**OuterBoolean**](OuterBoolean.md) | | [optional]
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
@ -0,0 +1,8 @@
|
|||||||
|
# IO.Swagger.Model.OuterNumber
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
@ -0,0 +1,8 @@
|
|||||||
|
# IO.Swagger.Model.OuterString
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
@ -0,0 +1,100 @@
|
|||||||
|
/*
|
||||||
|
* Swagger Petstore
|
||||||
|
*
|
||||||
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||||
|
*
|
||||||
|
* OpenAPI spec version: 1.0.0
|
||||||
|
* Contact: apiteam@swagger.io
|
||||||
|
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||||
|
*/
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using System.Linq;
|
||||||
|
using System.IO;
|
||||||
|
using System.Text;
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Collections.ObjectModel;
|
||||||
|
using System.Runtime.Serialization;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
using Newtonsoft.Json.Converters;
|
||||||
|
|
||||||
|
namespace IO.Swagger.Model
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// OuterBoolean
|
||||||
|
/// </summary>
|
||||||
|
[DataContract]
|
||||||
|
public partial class OuterBoolean : IEquatable<OuterBoolean>
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Initializes a new instance of the <see cref="OuterBoolean" /> class.
|
||||||
|
/// </summary>
|
||||||
|
[JsonConstructorAttribute]
|
||||||
|
public OuterBoolean()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns the string presentation of the object
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>String presentation of the object</returns>
|
||||||
|
public override string ToString()
|
||||||
|
{
|
||||||
|
var sb = new StringBuilder();
|
||||||
|
sb.Append("class OuterBoolean {\n");
|
||||||
|
sb.Append("}\n");
|
||||||
|
return sb.ToString();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns the JSON string presentation of the object
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>JSON string presentation of the object</returns>
|
||||||
|
public string ToJson()
|
||||||
|
{
|
||||||
|
return JsonConvert.SerializeObject(this, Formatting.Indented);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns true if objects are equal
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="obj">Object to be compared</param>
|
||||||
|
/// <returns>Boolean</returns>
|
||||||
|
public override bool Equals(object obj)
|
||||||
|
{
|
||||||
|
// credit: http://stackoverflow.com/a/10454552/677735
|
||||||
|
return this.Equals(obj as OuterBoolean);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns true if OuterBoolean instances are equal
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="other">Instance of OuterBoolean to be compared</param>
|
||||||
|
/// <returns>Boolean</returns>
|
||||||
|
public bool Equals(OuterBoolean other)
|
||||||
|
{
|
||||||
|
// credit: http://stackoverflow.com/a/10454552/677735
|
||||||
|
if (other == null)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the hash code
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>Hash code</returns>
|
||||||
|
public override int GetHashCode()
|
||||||
|
{
|
||||||
|
// credit: http://stackoverflow.com/a/263416/677735
|
||||||
|
unchecked // Overflow is fine, just wrap
|
||||||
|
{
|
||||||
|
int hash = 41;
|
||||||
|
// Suitable nullity checks etc, of course :)
|
||||||
|
return hash;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,144 @@
|
|||||||
|
/*
|
||||||
|
* Swagger Petstore
|
||||||
|
*
|
||||||
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||||
|
*
|
||||||
|
* OpenAPI spec version: 1.0.0
|
||||||
|
* Contact: apiteam@swagger.io
|
||||||
|
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||||
|
*/
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using System.Linq;
|
||||||
|
using System.IO;
|
||||||
|
using System.Text;
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Collections.ObjectModel;
|
||||||
|
using System.Runtime.Serialization;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
using Newtonsoft.Json.Converters;
|
||||||
|
|
||||||
|
namespace IO.Swagger.Model
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// OuterComposite
|
||||||
|
/// </summary>
|
||||||
|
[DataContract]
|
||||||
|
public partial class OuterComposite : IEquatable<OuterComposite>
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Initializes a new instance of the <see cref="OuterComposite" /> class.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="MyNumber">MyNumber.</param>
|
||||||
|
/// <param name="MyString">MyString.</param>
|
||||||
|
/// <param name="MyBoolean">MyBoolean.</param>
|
||||||
|
public OuterComposite(OuterNumber MyNumber = default(OuterNumber), OuterString MyString = default(OuterString), OuterBoolean MyBoolean = default(OuterBoolean))
|
||||||
|
{
|
||||||
|
this.MyNumber = MyNumber;
|
||||||
|
this.MyString = MyString;
|
||||||
|
this.MyBoolean = MyBoolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or Sets MyNumber
|
||||||
|
/// </summary>
|
||||||
|
[DataMember(Name="my_number", EmitDefaultValue=false)]
|
||||||
|
public OuterNumber MyNumber { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or Sets MyString
|
||||||
|
/// </summary>
|
||||||
|
[DataMember(Name="my_string", EmitDefaultValue=false)]
|
||||||
|
public OuterString MyString { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or Sets MyBoolean
|
||||||
|
/// </summary>
|
||||||
|
[DataMember(Name="my_boolean", EmitDefaultValue=false)]
|
||||||
|
public OuterBoolean MyBoolean { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// Returns the string presentation of the object
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>String presentation of the object</returns>
|
||||||
|
public override string ToString()
|
||||||
|
{
|
||||||
|
var sb = new StringBuilder();
|
||||||
|
sb.Append("class OuterComposite {\n");
|
||||||
|
sb.Append(" MyNumber: ").Append(MyNumber).Append("\n");
|
||||||
|
sb.Append(" MyString: ").Append(MyString).Append("\n");
|
||||||
|
sb.Append(" MyBoolean: ").Append(MyBoolean).Append("\n");
|
||||||
|
sb.Append("}\n");
|
||||||
|
return sb.ToString();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns the JSON string presentation of the object
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>JSON string presentation of the object</returns>
|
||||||
|
public string ToJson()
|
||||||
|
{
|
||||||
|
return JsonConvert.SerializeObject(this, Formatting.Indented);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns true if objects are equal
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="obj">Object to be compared</param>
|
||||||
|
/// <returns>Boolean</returns>
|
||||||
|
public override bool Equals(object obj)
|
||||||
|
{
|
||||||
|
// credit: http://stackoverflow.com/a/10454552/677735
|
||||||
|
return this.Equals(obj as OuterComposite);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns true if OuterComposite instances are equal
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="other">Instance of OuterComposite to be compared</param>
|
||||||
|
/// <returns>Boolean</returns>
|
||||||
|
public bool Equals(OuterComposite other)
|
||||||
|
{
|
||||||
|
// credit: http://stackoverflow.com/a/10454552/677735
|
||||||
|
if (other == null)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
return
|
||||||
|
(
|
||||||
|
this.MyNumber == other.MyNumber ||
|
||||||
|
this.MyNumber != null &&
|
||||||
|
this.MyNumber.Equals(other.MyNumber)
|
||||||
|
) &&
|
||||||
|
(
|
||||||
|
this.MyString == other.MyString ||
|
||||||
|
this.MyString != null &&
|
||||||
|
this.MyString.Equals(other.MyString)
|
||||||
|
) &&
|
||||||
|
(
|
||||||
|
this.MyBoolean == other.MyBoolean ||
|
||||||
|
this.MyBoolean != null &&
|
||||||
|
this.MyBoolean.Equals(other.MyBoolean)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the hash code
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>Hash code</returns>
|
||||||
|
public override int GetHashCode()
|
||||||
|
{
|
||||||
|
// credit: http://stackoverflow.com/a/263416/677735
|
||||||
|
unchecked // Overflow is fine, just wrap
|
||||||
|
{
|
||||||
|
int hash = 41;
|
||||||
|
// Suitable nullity checks etc, of course :)
|
||||||
|
if (this.MyNumber != null)
|
||||||
|
hash = hash * 59 + this.MyNumber.GetHashCode();
|
||||||
|
if (this.MyString != null)
|
||||||
|
hash = hash * 59 + this.MyString.GetHashCode();
|
||||||
|
if (this.MyBoolean != null)
|
||||||
|
hash = hash * 59 + this.MyBoolean.GetHashCode();
|
||||||
|
return hash;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,100 @@
|
|||||||
|
/*
|
||||||
|
* Swagger Petstore
|
||||||
|
*
|
||||||
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||||
|
*
|
||||||
|
* OpenAPI spec version: 1.0.0
|
||||||
|
* Contact: apiteam@swagger.io
|
||||||
|
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||||
|
*/
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using System.Linq;
|
||||||
|
using System.IO;
|
||||||
|
using System.Text;
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Collections.ObjectModel;
|
||||||
|
using System.Runtime.Serialization;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
using Newtonsoft.Json.Converters;
|
||||||
|
|
||||||
|
namespace IO.Swagger.Model
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// OuterNumber
|
||||||
|
/// </summary>
|
||||||
|
[DataContract]
|
||||||
|
public partial class OuterNumber : IEquatable<OuterNumber>
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Initializes a new instance of the <see cref="OuterNumber" /> class.
|
||||||
|
/// </summary>
|
||||||
|
[JsonConstructorAttribute]
|
||||||
|
public OuterNumber()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns the string presentation of the object
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>String presentation of the object</returns>
|
||||||
|
public override string ToString()
|
||||||
|
{
|
||||||
|
var sb = new StringBuilder();
|
||||||
|
sb.Append("class OuterNumber {\n");
|
||||||
|
sb.Append("}\n");
|
||||||
|
return sb.ToString();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns the JSON string presentation of the object
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>JSON string presentation of the object</returns>
|
||||||
|
public string ToJson()
|
||||||
|
{
|
||||||
|
return JsonConvert.SerializeObject(this, Formatting.Indented);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns true if objects are equal
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="obj">Object to be compared</param>
|
||||||
|
/// <returns>Boolean</returns>
|
||||||
|
public override bool Equals(object obj)
|
||||||
|
{
|
||||||
|
// credit: http://stackoverflow.com/a/10454552/677735
|
||||||
|
return this.Equals(obj as OuterNumber);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns true if OuterNumber instances are equal
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="other">Instance of OuterNumber to be compared</param>
|
||||||
|
/// <returns>Boolean</returns>
|
||||||
|
public bool Equals(OuterNumber other)
|
||||||
|
{
|
||||||
|
// credit: http://stackoverflow.com/a/10454552/677735
|
||||||
|
if (other == null)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the hash code
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>Hash code</returns>
|
||||||
|
public override int GetHashCode()
|
||||||
|
{
|
||||||
|
// credit: http://stackoverflow.com/a/263416/677735
|
||||||
|
unchecked // Overflow is fine, just wrap
|
||||||
|
{
|
||||||
|
int hash = 41;
|
||||||
|
// Suitable nullity checks etc, of course :)
|
||||||
|
return hash;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,100 @@
|
|||||||
|
/*
|
||||||
|
* Swagger Petstore
|
||||||
|
*
|
||||||
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||||
|
*
|
||||||
|
* OpenAPI spec version: 1.0.0
|
||||||
|
* Contact: apiteam@swagger.io
|
||||||
|
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||||
|
*/
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using System.Linq;
|
||||||
|
using System.IO;
|
||||||
|
using System.Text;
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Collections.ObjectModel;
|
||||||
|
using System.Runtime.Serialization;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
using Newtonsoft.Json.Converters;
|
||||||
|
|
||||||
|
namespace IO.Swagger.Model
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// OuterString
|
||||||
|
/// </summary>
|
||||||
|
[DataContract]
|
||||||
|
public partial class OuterString : IEquatable<OuterString>
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Initializes a new instance of the <see cref="OuterString" /> class.
|
||||||
|
/// </summary>
|
||||||
|
[JsonConstructorAttribute]
|
||||||
|
public OuterString()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns the string presentation of the object
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>String presentation of the object</returns>
|
||||||
|
public override string ToString()
|
||||||
|
{
|
||||||
|
var sb = new StringBuilder();
|
||||||
|
sb.Append("class OuterString {\n");
|
||||||
|
sb.Append("}\n");
|
||||||
|
return sb.ToString();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns the JSON string presentation of the object
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>JSON string presentation of the object</returns>
|
||||||
|
public string ToJson()
|
||||||
|
{
|
||||||
|
return JsonConvert.SerializeObject(this, Formatting.Indented);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns true if objects are equal
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="obj">Object to be compared</param>
|
||||||
|
/// <returns>Boolean</returns>
|
||||||
|
public override bool Equals(object obj)
|
||||||
|
{
|
||||||
|
// credit: http://stackoverflow.com/a/10454552/677735
|
||||||
|
return this.Equals(obj as OuterString);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns true if OuterString instances are equal
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="other">Instance of OuterString to be compared</param>
|
||||||
|
/// <returns>Boolean</returns>
|
||||||
|
public bool Equals(OuterString other)
|
||||||
|
{
|
||||||
|
// credit: http://stackoverflow.com/a/10454552/677735
|
||||||
|
if (other == null)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the hash code
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>Hash code</returns>
|
||||||
|
public override int GetHashCode()
|
||||||
|
{
|
||||||
|
// credit: http://stackoverflow.com/a/263416/677735
|
||||||
|
unchecked // Overflow is fine, just wrap
|
||||||
|
{
|
||||||
|
int hash = 41;
|
||||||
|
// Suitable nullity checks etc, of course :)
|
||||||
|
return hash;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -69,17 +69,16 @@ namespace Example
|
|||||||
{
|
{
|
||||||
|
|
||||||
var apiInstance = new FakeApi();
|
var apiInstance = new FakeApi();
|
||||||
var body = new ModelClient(); // ModelClient | client model
|
var body = new OuterBoolean(); // OuterBoolean | Input boolean as post body (optional)
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
// To test \"client\" model
|
OuterBoolean result = apiInstance.FakeOuterBooleanSerialize(body);
|
||||||
ModelClient result = apiInstance.TestClientModel(body);
|
|
||||||
Debug.WriteLine(result);
|
Debug.WriteLine(result);
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
Debug.Print("Exception when calling FakeApi.TestClientModel: " + e.Message );
|
Debug.Print("Exception when calling FakeApi.FakeOuterBooleanSerialize: " + e.Message );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -93,6 +92,10 @@ All URIs are relative to *http://petstore.swagger.io:80/v2*
|
|||||||
|
|
||||||
Class | Method | HTTP request | Description
|
Class | Method | HTTP request | Description
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
|
*FakeApi* | [**FakeOuterBooleanSerialize**](docs/FakeApi.md#fakeouterbooleanserialize) | **POST** /fake/outer/boolean |
|
||||||
|
*FakeApi* | [**FakeOuterCompositeSerialize**](docs/FakeApi.md#fakeoutercompositeserialize) | **POST** /fake/outer/composite |
|
||||||
|
*FakeApi* | [**FakeOuterNumberSerialize**](docs/FakeApi.md#fakeouternumberserialize) | **POST** /fake/outer/number |
|
||||||
|
*FakeApi* | [**FakeOuterStringSerialize**](docs/FakeApi.md#fakeouterstringserialize) | **POST** /fake/outer/string |
|
||||||
*FakeApi* | [**TestClientModel**](docs/FakeApi.md#testclientmodel) | **PATCH** /fake | To test \"client\" model
|
*FakeApi* | [**TestClientModel**](docs/FakeApi.md#testclientmodel) | **PATCH** /fake | To test \"client\" model
|
||||||
*FakeApi* | [**TestEndpointParameters**](docs/FakeApi.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
*FakeApi* | [**TestEndpointParameters**](docs/FakeApi.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||||
*FakeApi* | [**TestEnumParameters**](docs/FakeApi.md#testenumparameters) | **GET** /fake | To test enum parameters
|
*FakeApi* | [**TestEnumParameters**](docs/FakeApi.md#testenumparameters) | **GET** /fake | To test enum parameters
|
||||||
@ -148,7 +151,11 @@ Class | Method | HTTP request | Description
|
|||||||
- [Model.Name](docs/Name.md)
|
- [Model.Name](docs/Name.md)
|
||||||
- [Model.NumberOnly](docs/NumberOnly.md)
|
- [Model.NumberOnly](docs/NumberOnly.md)
|
||||||
- [Model.Order](docs/Order.md)
|
- [Model.Order](docs/Order.md)
|
||||||
|
- [Model.OuterBoolean](docs/OuterBoolean.md)
|
||||||
|
- [Model.OuterComposite](docs/OuterComposite.md)
|
||||||
- [Model.OuterEnum](docs/OuterEnum.md)
|
- [Model.OuterEnum](docs/OuterEnum.md)
|
||||||
|
- [Model.OuterNumber](docs/OuterNumber.md)
|
||||||
|
- [Model.OuterString](docs/OuterString.md)
|
||||||
- [Model.Pet](docs/Pet.md)
|
- [Model.Pet](docs/Pet.md)
|
||||||
- [Model.ReadOnlyFirst](docs/ReadOnlyFirst.md)
|
- [Model.ReadOnlyFirst](docs/ReadOnlyFirst.md)
|
||||||
- [Model.SpecialModelName](docs/SpecialModelName.md)
|
- [Model.SpecialModelName](docs/SpecialModelName.md)
|
||||||
|
@ -4,11 +4,259 @@ All URIs are relative to *http://petstore.swagger.io:80/v2*
|
|||||||
|
|
||||||
Method | HTTP request | Description
|
Method | HTTP request | Description
|
||||||
------------- | ------------- | -------------
|
------------- | ------------- | -------------
|
||||||
|
[**FakeOuterBooleanSerialize**](FakeApi.md#fakeouterbooleanserialize) | **POST** /fake/outer/boolean |
|
||||||
|
[**FakeOuterCompositeSerialize**](FakeApi.md#fakeoutercompositeserialize) | **POST** /fake/outer/composite |
|
||||||
|
[**FakeOuterNumberSerialize**](FakeApi.md#fakeouternumberserialize) | **POST** /fake/outer/number |
|
||||||
|
[**FakeOuterStringSerialize**](FakeApi.md#fakeouterstringserialize) | **POST** /fake/outer/string |
|
||||||
[**TestClientModel**](FakeApi.md#testclientmodel) | **PATCH** /fake | To test \"client\" model
|
[**TestClientModel**](FakeApi.md#testclientmodel) | **PATCH** /fake | To test \"client\" model
|
||||||
[**TestEndpointParameters**](FakeApi.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
[**TestEndpointParameters**](FakeApi.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||||
[**TestEnumParameters**](FakeApi.md#testenumparameters) | **GET** /fake | To test enum parameters
|
[**TestEnumParameters**](FakeApi.md#testenumparameters) | **GET** /fake | To test enum parameters
|
||||||
|
|
||||||
|
|
||||||
|
<a name="fakeouterbooleanserialize"></a>
|
||||||
|
# **FakeOuterBooleanSerialize**
|
||||||
|
> OuterBoolean FakeOuterBooleanSerialize (OuterBoolean body = null)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Test serialization of outer boolean types
|
||||||
|
|
||||||
|
### Example
|
||||||
|
```csharp
|
||||||
|
using System;
|
||||||
|
using System.Diagnostics;
|
||||||
|
using IO.Swagger.Api;
|
||||||
|
using IO.Swagger.Client;
|
||||||
|
using IO.Swagger.Model;
|
||||||
|
|
||||||
|
namespace Example
|
||||||
|
{
|
||||||
|
public class FakeOuterBooleanSerializeExample
|
||||||
|
{
|
||||||
|
public void main()
|
||||||
|
{
|
||||||
|
|
||||||
|
var apiInstance = new FakeApi();
|
||||||
|
var body = new OuterBoolean(); // OuterBoolean | Input boolean as post body (optional)
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
OuterBoolean result = apiInstance.FakeOuterBooleanSerialize(body);
|
||||||
|
Debug.WriteLine(result);
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
Debug.Print("Exception when calling FakeApi.FakeOuterBooleanSerialize: " + e.Message );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**body** | [**OuterBoolean**](OuterBoolean.md)| Input boolean as post body | [optional]
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
[**OuterBoolean**](OuterBoolean.md)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
<a name="fakeoutercompositeserialize"></a>
|
||||||
|
# **FakeOuterCompositeSerialize**
|
||||||
|
> OuterComposite FakeOuterCompositeSerialize (OuterComposite body = null)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Test serialization of object with outer number type
|
||||||
|
|
||||||
|
### Example
|
||||||
|
```csharp
|
||||||
|
using System;
|
||||||
|
using System.Diagnostics;
|
||||||
|
using IO.Swagger.Api;
|
||||||
|
using IO.Swagger.Client;
|
||||||
|
using IO.Swagger.Model;
|
||||||
|
|
||||||
|
namespace Example
|
||||||
|
{
|
||||||
|
public class FakeOuterCompositeSerializeExample
|
||||||
|
{
|
||||||
|
public void main()
|
||||||
|
{
|
||||||
|
|
||||||
|
var apiInstance = new FakeApi();
|
||||||
|
var body = new OuterComposite(); // OuterComposite | Input composite as post body (optional)
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
OuterComposite result = apiInstance.FakeOuterCompositeSerialize(body);
|
||||||
|
Debug.WriteLine(result);
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
Debug.Print("Exception when calling FakeApi.FakeOuterCompositeSerialize: " + e.Message );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**body** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional]
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
[**OuterComposite**](OuterComposite.md)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
<a name="fakeouternumberserialize"></a>
|
||||||
|
# **FakeOuterNumberSerialize**
|
||||||
|
> OuterNumber FakeOuterNumberSerialize (OuterNumber body = null)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Test serialization of outer number types
|
||||||
|
|
||||||
|
### Example
|
||||||
|
```csharp
|
||||||
|
using System;
|
||||||
|
using System.Diagnostics;
|
||||||
|
using IO.Swagger.Api;
|
||||||
|
using IO.Swagger.Client;
|
||||||
|
using IO.Swagger.Model;
|
||||||
|
|
||||||
|
namespace Example
|
||||||
|
{
|
||||||
|
public class FakeOuterNumberSerializeExample
|
||||||
|
{
|
||||||
|
public void main()
|
||||||
|
{
|
||||||
|
|
||||||
|
var apiInstance = new FakeApi();
|
||||||
|
var body = new OuterNumber(); // OuterNumber | Input number as post body (optional)
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
OuterNumber result = apiInstance.FakeOuterNumberSerialize(body);
|
||||||
|
Debug.WriteLine(result);
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
Debug.Print("Exception when calling FakeApi.FakeOuterNumberSerialize: " + e.Message );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**body** | [**OuterNumber**](OuterNumber.md)| Input number as post body | [optional]
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
[**OuterNumber**](OuterNumber.md)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
<a name="fakeouterstringserialize"></a>
|
||||||
|
# **FakeOuterStringSerialize**
|
||||||
|
> OuterString FakeOuterStringSerialize (OuterString body = null)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Test serialization of outer string types
|
||||||
|
|
||||||
|
### Example
|
||||||
|
```csharp
|
||||||
|
using System;
|
||||||
|
using System.Diagnostics;
|
||||||
|
using IO.Swagger.Api;
|
||||||
|
using IO.Swagger.Client;
|
||||||
|
using IO.Swagger.Model;
|
||||||
|
|
||||||
|
namespace Example
|
||||||
|
{
|
||||||
|
public class FakeOuterStringSerializeExample
|
||||||
|
{
|
||||||
|
public void main()
|
||||||
|
{
|
||||||
|
|
||||||
|
var apiInstance = new FakeApi();
|
||||||
|
var body = new OuterString(); // OuterString | Input string as post body (optional)
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
OuterString result = apiInstance.FakeOuterStringSerialize(body);
|
||||||
|
Debug.WriteLine(result);
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
Debug.Print("Exception when calling FakeApi.FakeOuterStringSerialize: " + e.Message );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**body** | [**OuterString**](OuterString.md)| Input string as post body | [optional]
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
[**OuterString**](OuterString.md)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||||
|
|
||||||
<a name="testclientmodel"></a>
|
<a name="testclientmodel"></a>
|
||||||
# **TestClientModel**
|
# **TestClientModel**
|
||||||
> ModelClient TestClientModel (ModelClient body)
|
> ModelClient TestClientModel (ModelClient body)
|
||||||
|
@ -0,0 +1,8 @@
|
|||||||
|
# IO.Swagger.Model.OuterBoolean
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
@ -0,0 +1,11 @@
|
|||||||
|
# IO.Swagger.Model.OuterComposite
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**MyNumber** | [**OuterNumber**](OuterNumber.md) | | [optional]
|
||||||
|
**MyString** | [**OuterString**](OuterString.md) | | [optional]
|
||||||
|
**MyBoolean** | [**OuterBoolean**](OuterBoolean.md) | | [optional]
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
@ -0,0 +1,8 @@
|
|||||||
|
# IO.Swagger.Model.OuterNumber
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
@ -0,0 +1,8 @@
|
|||||||
|
# IO.Swagger.Model.OuterString
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
@ -0,0 +1,70 @@
|
|||||||
|
/*
|
||||||
|
* Swagger Petstore
|
||||||
|
*
|
||||||
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||||
|
*
|
||||||
|
* OpenAPI spec version: 1.0.0
|
||||||
|
* Contact: apiteam@swagger.io
|
||||||
|
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
using NUnit.Framework;
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using System.Linq;
|
||||||
|
using System.IO;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using IO.Swagger.Api;
|
||||||
|
using IO.Swagger.Model;
|
||||||
|
using IO.Swagger.Client;
|
||||||
|
using System.Reflection;
|
||||||
|
|
||||||
|
namespace IO.Swagger.Test
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Class for testing OuterBoolean
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// This file is automatically generated by Swagger Codegen.
|
||||||
|
/// Please update the test case below to test the model.
|
||||||
|
/// </remarks>
|
||||||
|
[TestFixture]
|
||||||
|
public class OuterBooleanTests
|
||||||
|
{
|
||||||
|
// TODO uncomment below to declare an instance variable for OuterBoolean
|
||||||
|
//private OuterBoolean instance;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Setup before each test
|
||||||
|
/// </summary>
|
||||||
|
[SetUp]
|
||||||
|
public void Init()
|
||||||
|
{
|
||||||
|
// TODO uncomment below to create an instance of OuterBoolean
|
||||||
|
//instance = new OuterBoolean();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Clean up after each test
|
||||||
|
/// </summary>
|
||||||
|
[TearDown]
|
||||||
|
public void Cleanup()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Test an instance of OuterBoolean
|
||||||
|
/// </summary>
|
||||||
|
[Test]
|
||||||
|
public void OuterBooleanInstanceTest()
|
||||||
|
{
|
||||||
|
// TODO uncomment below to test "IsInstanceOfType" OuterBoolean
|
||||||
|
//Assert.IsInstanceOfType<OuterBoolean> (instance, "variable 'instance' is a OuterBoolean");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,94 @@
|
|||||||
|
/*
|
||||||
|
* Swagger Petstore
|
||||||
|
*
|
||||||
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||||
|
*
|
||||||
|
* OpenAPI spec version: 1.0.0
|
||||||
|
* Contact: apiteam@swagger.io
|
||||||
|
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
using NUnit.Framework;
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using System.Linq;
|
||||||
|
using System.IO;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using IO.Swagger.Api;
|
||||||
|
using IO.Swagger.Model;
|
||||||
|
using IO.Swagger.Client;
|
||||||
|
using System.Reflection;
|
||||||
|
|
||||||
|
namespace IO.Swagger.Test
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Class for testing OuterComposite
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// This file is automatically generated by Swagger Codegen.
|
||||||
|
/// Please update the test case below to test the model.
|
||||||
|
/// </remarks>
|
||||||
|
[TestFixture]
|
||||||
|
public class OuterCompositeTests
|
||||||
|
{
|
||||||
|
// TODO uncomment below to declare an instance variable for OuterComposite
|
||||||
|
//private OuterComposite instance;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Setup before each test
|
||||||
|
/// </summary>
|
||||||
|
[SetUp]
|
||||||
|
public void Init()
|
||||||
|
{
|
||||||
|
// TODO uncomment below to create an instance of OuterComposite
|
||||||
|
//instance = new OuterComposite();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Clean up after each test
|
||||||
|
/// </summary>
|
||||||
|
[TearDown]
|
||||||
|
public void Cleanup()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Test an instance of OuterComposite
|
||||||
|
/// </summary>
|
||||||
|
[Test]
|
||||||
|
public void OuterCompositeInstanceTest()
|
||||||
|
{
|
||||||
|
// TODO uncomment below to test "IsInstanceOfType" OuterComposite
|
||||||
|
//Assert.IsInstanceOfType<OuterComposite> (instance, "variable 'instance' is a OuterComposite");
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Test the property 'MyNumber'
|
||||||
|
/// </summary>
|
||||||
|
[Test]
|
||||||
|
public void MyNumberTest()
|
||||||
|
{
|
||||||
|
// TODO unit test for the property 'MyNumber'
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Test the property 'MyString'
|
||||||
|
/// </summary>
|
||||||
|
[Test]
|
||||||
|
public void MyStringTest()
|
||||||
|
{
|
||||||
|
// TODO unit test for the property 'MyString'
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Test the property 'MyBoolean'
|
||||||
|
/// </summary>
|
||||||
|
[Test]
|
||||||
|
public void MyBooleanTest()
|
||||||
|
{
|
||||||
|
// TODO unit test for the property 'MyBoolean'
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,70 @@
|
|||||||
|
/*
|
||||||
|
* Swagger Petstore
|
||||||
|
*
|
||||||
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||||
|
*
|
||||||
|
* OpenAPI spec version: 1.0.0
|
||||||
|
* Contact: apiteam@swagger.io
|
||||||
|
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
using NUnit.Framework;
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using System.Linq;
|
||||||
|
using System.IO;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using IO.Swagger.Api;
|
||||||
|
using IO.Swagger.Model;
|
||||||
|
using IO.Swagger.Client;
|
||||||
|
using System.Reflection;
|
||||||
|
|
||||||
|
namespace IO.Swagger.Test
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Class for testing OuterNumber
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// This file is automatically generated by Swagger Codegen.
|
||||||
|
/// Please update the test case below to test the model.
|
||||||
|
/// </remarks>
|
||||||
|
[TestFixture]
|
||||||
|
public class OuterNumberTests
|
||||||
|
{
|
||||||
|
// TODO uncomment below to declare an instance variable for OuterNumber
|
||||||
|
//private OuterNumber instance;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Setup before each test
|
||||||
|
/// </summary>
|
||||||
|
[SetUp]
|
||||||
|
public void Init()
|
||||||
|
{
|
||||||
|
// TODO uncomment below to create an instance of OuterNumber
|
||||||
|
//instance = new OuterNumber();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Clean up after each test
|
||||||
|
/// </summary>
|
||||||
|
[TearDown]
|
||||||
|
public void Cleanup()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Test an instance of OuterNumber
|
||||||
|
/// </summary>
|
||||||
|
[Test]
|
||||||
|
public void OuterNumberInstanceTest()
|
||||||
|
{
|
||||||
|
// TODO uncomment below to test "IsInstanceOfType" OuterNumber
|
||||||
|
//Assert.IsInstanceOfType<OuterNumber> (instance, "variable 'instance' is a OuterNumber");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,70 @@
|
|||||||
|
/*
|
||||||
|
* Swagger Petstore
|
||||||
|
*
|
||||||
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||||
|
*
|
||||||
|
* OpenAPI spec version: 1.0.0
|
||||||
|
* Contact: apiteam@swagger.io
|
||||||
|
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
using NUnit.Framework;
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using System.Linq;
|
||||||
|
using System.IO;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using IO.Swagger.Api;
|
||||||
|
using IO.Swagger.Model;
|
||||||
|
using IO.Swagger.Client;
|
||||||
|
using System.Reflection;
|
||||||
|
|
||||||
|
namespace IO.Swagger.Test
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Class for testing OuterString
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// This file is automatically generated by Swagger Codegen.
|
||||||
|
/// Please update the test case below to test the model.
|
||||||
|
/// </remarks>
|
||||||
|
[TestFixture]
|
||||||
|
public class OuterStringTests
|
||||||
|
{
|
||||||
|
// TODO uncomment below to declare an instance variable for OuterString
|
||||||
|
//private OuterString instance;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Setup before each test
|
||||||
|
/// </summary>
|
||||||
|
[SetUp]
|
||||||
|
public void Init()
|
||||||
|
{
|
||||||
|
// TODO uncomment below to create an instance of OuterString
|
||||||
|
//instance = new OuterString();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Clean up after each test
|
||||||
|
/// </summary>
|
||||||
|
[TearDown]
|
||||||
|
public void Cleanup()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Test an instance of OuterString
|
||||||
|
/// </summary>
|
||||||
|
[Test]
|
||||||
|
public void OuterStringInstanceTest()
|
||||||
|
{
|
||||||
|
// TODO uncomment below to test "IsInstanceOfType" OuterString
|
||||||
|
//Assert.IsInstanceOfType<OuterString> (instance, "variable 'instance' is a OuterString");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -25,6 +25,90 @@ namespace IO.Swagger.Api
|
|||||||
{
|
{
|
||||||
#region Synchronous Operations
|
#region Synchronous Operations
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Test serialization of outer boolean types
|
||||||
|
/// </remarks>
|
||||||
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||||
|
/// <param name="body">Input boolean as post body (optional)</param>
|
||||||
|
/// <returns>OuterBoolean</returns>
|
||||||
|
OuterBoolean FakeOuterBooleanSerialize (OuterBoolean body = null);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Test serialization of outer boolean types
|
||||||
|
/// </remarks>
|
||||||
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||||
|
/// <param name="body">Input boolean as post body (optional)</param>
|
||||||
|
/// <returns>ApiResponse of OuterBoolean</returns>
|
||||||
|
ApiResponse<OuterBoolean> FakeOuterBooleanSerializeWithHttpInfo (OuterBoolean body = null);
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Test serialization of object with outer number type
|
||||||
|
/// </remarks>
|
||||||
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||||
|
/// <param name="body">Input composite as post body (optional)</param>
|
||||||
|
/// <returns>OuterComposite</returns>
|
||||||
|
OuterComposite FakeOuterCompositeSerialize (OuterComposite body = null);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Test serialization of object with outer number type
|
||||||
|
/// </remarks>
|
||||||
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||||
|
/// <param name="body">Input composite as post body (optional)</param>
|
||||||
|
/// <returns>ApiResponse of OuterComposite</returns>
|
||||||
|
ApiResponse<OuterComposite> FakeOuterCompositeSerializeWithHttpInfo (OuterComposite body = null);
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Test serialization of outer number types
|
||||||
|
/// </remarks>
|
||||||
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||||
|
/// <param name="body">Input number as post body (optional)</param>
|
||||||
|
/// <returns>OuterNumber</returns>
|
||||||
|
OuterNumber FakeOuterNumberSerialize (OuterNumber body = null);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Test serialization of outer number types
|
||||||
|
/// </remarks>
|
||||||
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||||
|
/// <param name="body">Input number as post body (optional)</param>
|
||||||
|
/// <returns>ApiResponse of OuterNumber</returns>
|
||||||
|
ApiResponse<OuterNumber> FakeOuterNumberSerializeWithHttpInfo (OuterNumber body = null);
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Test serialization of outer string types
|
||||||
|
/// </remarks>
|
||||||
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||||
|
/// <param name="body">Input string as post body (optional)</param>
|
||||||
|
/// <returns>OuterString</returns>
|
||||||
|
OuterString FakeOuterStringSerialize (OuterString body = null);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Test serialization of outer string types
|
||||||
|
/// </remarks>
|
||||||
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||||
|
/// <param name="body">Input string as post body (optional)</param>
|
||||||
|
/// <returns>ApiResponse of OuterString</returns>
|
||||||
|
ApiResponse<OuterString> FakeOuterStringSerializeWithHttpInfo (OuterString body = null);
|
||||||
|
/// <summary>
|
||||||
/// To test \"client\" model
|
/// To test \"client\" model
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
@ -130,6 +214,90 @@ namespace IO.Swagger.Api
|
|||||||
#endregion Synchronous Operations
|
#endregion Synchronous Operations
|
||||||
#region Asynchronous Operations
|
#region Asynchronous Operations
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Test serialization of outer boolean types
|
||||||
|
/// </remarks>
|
||||||
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||||
|
/// <param name="body">Input boolean as post body (optional)</param>
|
||||||
|
/// <returns>Task of OuterBoolean</returns>
|
||||||
|
System.Threading.Tasks.Task<OuterBoolean> FakeOuterBooleanSerializeAsync (OuterBoolean body = null);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Test serialization of outer boolean types
|
||||||
|
/// </remarks>
|
||||||
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||||
|
/// <param name="body">Input boolean as post body (optional)</param>
|
||||||
|
/// <returns>Task of ApiResponse (OuterBoolean)</returns>
|
||||||
|
System.Threading.Tasks.Task<ApiResponse<OuterBoolean>> FakeOuterBooleanSerializeAsyncWithHttpInfo (OuterBoolean body = null);
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Test serialization of object with outer number type
|
||||||
|
/// </remarks>
|
||||||
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||||
|
/// <param name="body">Input composite as post body (optional)</param>
|
||||||
|
/// <returns>Task of OuterComposite</returns>
|
||||||
|
System.Threading.Tasks.Task<OuterComposite> FakeOuterCompositeSerializeAsync (OuterComposite body = null);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Test serialization of object with outer number type
|
||||||
|
/// </remarks>
|
||||||
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||||
|
/// <param name="body">Input composite as post body (optional)</param>
|
||||||
|
/// <returns>Task of ApiResponse (OuterComposite)</returns>
|
||||||
|
System.Threading.Tasks.Task<ApiResponse<OuterComposite>> FakeOuterCompositeSerializeAsyncWithHttpInfo (OuterComposite body = null);
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Test serialization of outer number types
|
||||||
|
/// </remarks>
|
||||||
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||||
|
/// <param name="body">Input number as post body (optional)</param>
|
||||||
|
/// <returns>Task of OuterNumber</returns>
|
||||||
|
System.Threading.Tasks.Task<OuterNumber> FakeOuterNumberSerializeAsync (OuterNumber body = null);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Test serialization of outer number types
|
||||||
|
/// </remarks>
|
||||||
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||||
|
/// <param name="body">Input number as post body (optional)</param>
|
||||||
|
/// <returns>Task of ApiResponse (OuterNumber)</returns>
|
||||||
|
System.Threading.Tasks.Task<ApiResponse<OuterNumber>> FakeOuterNumberSerializeAsyncWithHttpInfo (OuterNumber body = null);
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Test serialization of outer string types
|
||||||
|
/// </remarks>
|
||||||
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||||
|
/// <param name="body">Input string as post body (optional)</param>
|
||||||
|
/// <returns>Task of OuterString</returns>
|
||||||
|
System.Threading.Tasks.Task<OuterString> FakeOuterStringSerializeAsync (OuterString body = null);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Test serialization of outer string types
|
||||||
|
/// </remarks>
|
||||||
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||||
|
/// <param name="body">Input string as post body (optional)</param>
|
||||||
|
/// <returns>Task of ApiResponse (OuterString)</returns>
|
||||||
|
System.Threading.Tasks.Task<ApiResponse<OuterString>> FakeOuterStringSerializeAsyncWithHttpInfo (OuterString body = null);
|
||||||
|
/// <summary>
|
||||||
/// To test \"client\" model
|
/// To test \"client\" model
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
@ -344,6 +512,570 @@ namespace IO.Swagger.Api
|
|||||||
this.Configuration.AddDefaultHeader(key, value);
|
this.Configuration.AddDefaultHeader(key, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Test serialization of outer boolean types
|
||||||
|
/// </summary>
|
||||||
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||||
|
/// <param name="body">Input boolean as post body (optional)</param>
|
||||||
|
/// <returns>OuterBoolean</returns>
|
||||||
|
public OuterBoolean FakeOuterBooleanSerialize (OuterBoolean body = null)
|
||||||
|
{
|
||||||
|
ApiResponse<OuterBoolean> localVarResponse = FakeOuterBooleanSerializeWithHttpInfo(body);
|
||||||
|
return localVarResponse.Data;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Test serialization of outer boolean types
|
||||||
|
/// </summary>
|
||||||
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||||
|
/// <param name="body">Input boolean as post body (optional)</param>
|
||||||
|
/// <returns>ApiResponse of OuterBoolean</returns>
|
||||||
|
public ApiResponse< OuterBoolean > FakeOuterBooleanSerializeWithHttpInfo (OuterBoolean body = null)
|
||||||
|
{
|
||||||
|
|
||||||
|
var localVarPath = "/fake/outer/boolean";
|
||||||
|
var localVarPathParams = new Dictionary<String, String>();
|
||||||
|
var localVarQueryParams = new Dictionary<String, String>();
|
||||||
|
var localVarHeaderParams = new Dictionary<String, String>(Configuration.DefaultHeader);
|
||||||
|
var localVarFormParams = new Dictionary<String, String>();
|
||||||
|
var localVarFileParams = new Dictionary<String, FileParameter>();
|
||||||
|
Object localVarPostBody = null;
|
||||||
|
|
||||||
|
// to determine the Content-Type header
|
||||||
|
String[] localVarHttpContentTypes = new String[] {
|
||||||
|
};
|
||||||
|
String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
|
||||||
|
|
||||||
|
// to determine the Accept header
|
||||||
|
String[] localVarHttpHeaderAccepts = new String[] {
|
||||||
|
};
|
||||||
|
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
||||||
|
if (localVarHttpHeaderAccept != null)
|
||||||
|
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
|
||||||
|
|
||||||
|
if (body != null && body.GetType() != typeof(byte[]))
|
||||||
|
{
|
||||||
|
localVarPostBody = Configuration.ApiClient.Serialize(body); // http body (model) parameter
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
localVarPostBody = body; // byte array
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// make the HTTP request
|
||||||
|
IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath,
|
||||||
|
Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
|
||||||
|
localVarPathParams, localVarHttpContentType);
|
||||||
|
|
||||||
|
int localVarStatusCode = (int) localVarResponse.StatusCode;
|
||||||
|
|
||||||
|
if (ExceptionFactory != null)
|
||||||
|
{
|
||||||
|
Exception exception = ExceptionFactory("FakeOuterBooleanSerialize", localVarResponse);
|
||||||
|
if (exception != null) throw exception;
|
||||||
|
}
|
||||||
|
|
||||||
|
return new ApiResponse<OuterBoolean>(localVarStatusCode,
|
||||||
|
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
|
||||||
|
(OuterBoolean) Configuration.ApiClient.Deserialize(localVarResponse, typeof(OuterBoolean)));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Test serialization of outer boolean types
|
||||||
|
/// </summary>
|
||||||
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||||
|
/// <param name="body">Input boolean as post body (optional)</param>
|
||||||
|
/// <returns>Task of OuterBoolean</returns>
|
||||||
|
public async System.Threading.Tasks.Task<OuterBoolean> FakeOuterBooleanSerializeAsync (OuterBoolean body = null)
|
||||||
|
{
|
||||||
|
ApiResponse<OuterBoolean> localVarResponse = await FakeOuterBooleanSerializeAsyncWithHttpInfo(body);
|
||||||
|
return localVarResponse.Data;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Test serialization of outer boolean types
|
||||||
|
/// </summary>
|
||||||
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||||
|
/// <param name="body">Input boolean as post body (optional)</param>
|
||||||
|
/// <returns>Task of ApiResponse (OuterBoolean)</returns>
|
||||||
|
public async System.Threading.Tasks.Task<ApiResponse<OuterBoolean>> FakeOuterBooleanSerializeAsyncWithHttpInfo (OuterBoolean body = null)
|
||||||
|
{
|
||||||
|
|
||||||
|
var localVarPath = "/fake/outer/boolean";
|
||||||
|
var localVarPathParams = new Dictionary<String, String>();
|
||||||
|
var localVarQueryParams = new Dictionary<String, String>();
|
||||||
|
var localVarHeaderParams = new Dictionary<String, String>(Configuration.DefaultHeader);
|
||||||
|
var localVarFormParams = new Dictionary<String, String>();
|
||||||
|
var localVarFileParams = new Dictionary<String, FileParameter>();
|
||||||
|
Object localVarPostBody = null;
|
||||||
|
|
||||||
|
// to determine the Content-Type header
|
||||||
|
String[] localVarHttpContentTypes = new String[] {
|
||||||
|
};
|
||||||
|
String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
|
||||||
|
|
||||||
|
// to determine the Accept header
|
||||||
|
String[] localVarHttpHeaderAccepts = new String[] {
|
||||||
|
};
|
||||||
|
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
||||||
|
if (localVarHttpHeaderAccept != null)
|
||||||
|
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
|
||||||
|
|
||||||
|
if (body != null && body.GetType() != typeof(byte[]))
|
||||||
|
{
|
||||||
|
localVarPostBody = Configuration.ApiClient.Serialize(body); // http body (model) parameter
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
localVarPostBody = body; // byte array
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// make the HTTP request
|
||||||
|
IRestResponse localVarResponse = (IRestResponse) await Configuration.ApiClient.CallApiAsync(localVarPath,
|
||||||
|
Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
|
||||||
|
localVarPathParams, localVarHttpContentType);
|
||||||
|
|
||||||
|
int localVarStatusCode = (int) localVarResponse.StatusCode;
|
||||||
|
|
||||||
|
if (ExceptionFactory != null)
|
||||||
|
{
|
||||||
|
Exception exception = ExceptionFactory("FakeOuterBooleanSerialize", localVarResponse);
|
||||||
|
if (exception != null) throw exception;
|
||||||
|
}
|
||||||
|
|
||||||
|
return new ApiResponse<OuterBoolean>(localVarStatusCode,
|
||||||
|
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
|
||||||
|
(OuterBoolean) Configuration.ApiClient.Deserialize(localVarResponse, typeof(OuterBoolean)));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Test serialization of object with outer number type
|
||||||
|
/// </summary>
|
||||||
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||||
|
/// <param name="body">Input composite as post body (optional)</param>
|
||||||
|
/// <returns>OuterComposite</returns>
|
||||||
|
public OuterComposite FakeOuterCompositeSerialize (OuterComposite body = null)
|
||||||
|
{
|
||||||
|
ApiResponse<OuterComposite> localVarResponse = FakeOuterCompositeSerializeWithHttpInfo(body);
|
||||||
|
return localVarResponse.Data;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Test serialization of object with outer number type
|
||||||
|
/// </summary>
|
||||||
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||||
|
/// <param name="body">Input composite as post body (optional)</param>
|
||||||
|
/// <returns>ApiResponse of OuterComposite</returns>
|
||||||
|
public ApiResponse< OuterComposite > FakeOuterCompositeSerializeWithHttpInfo (OuterComposite body = null)
|
||||||
|
{
|
||||||
|
|
||||||
|
var localVarPath = "/fake/outer/composite";
|
||||||
|
var localVarPathParams = new Dictionary<String, String>();
|
||||||
|
var localVarQueryParams = new Dictionary<String, String>();
|
||||||
|
var localVarHeaderParams = new Dictionary<String, String>(Configuration.DefaultHeader);
|
||||||
|
var localVarFormParams = new Dictionary<String, String>();
|
||||||
|
var localVarFileParams = new Dictionary<String, FileParameter>();
|
||||||
|
Object localVarPostBody = null;
|
||||||
|
|
||||||
|
// to determine the Content-Type header
|
||||||
|
String[] localVarHttpContentTypes = new String[] {
|
||||||
|
};
|
||||||
|
String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
|
||||||
|
|
||||||
|
// to determine the Accept header
|
||||||
|
String[] localVarHttpHeaderAccepts = new String[] {
|
||||||
|
};
|
||||||
|
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
||||||
|
if (localVarHttpHeaderAccept != null)
|
||||||
|
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
|
||||||
|
|
||||||
|
if (body != null && body.GetType() != typeof(byte[]))
|
||||||
|
{
|
||||||
|
localVarPostBody = Configuration.ApiClient.Serialize(body); // http body (model) parameter
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
localVarPostBody = body; // byte array
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// make the HTTP request
|
||||||
|
IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath,
|
||||||
|
Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
|
||||||
|
localVarPathParams, localVarHttpContentType);
|
||||||
|
|
||||||
|
int localVarStatusCode = (int) localVarResponse.StatusCode;
|
||||||
|
|
||||||
|
if (ExceptionFactory != null)
|
||||||
|
{
|
||||||
|
Exception exception = ExceptionFactory("FakeOuterCompositeSerialize", localVarResponse);
|
||||||
|
if (exception != null) throw exception;
|
||||||
|
}
|
||||||
|
|
||||||
|
return new ApiResponse<OuterComposite>(localVarStatusCode,
|
||||||
|
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
|
||||||
|
(OuterComposite) Configuration.ApiClient.Deserialize(localVarResponse, typeof(OuterComposite)));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Test serialization of object with outer number type
|
||||||
|
/// </summary>
|
||||||
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||||
|
/// <param name="body">Input composite as post body (optional)</param>
|
||||||
|
/// <returns>Task of OuterComposite</returns>
|
||||||
|
public async System.Threading.Tasks.Task<OuterComposite> FakeOuterCompositeSerializeAsync (OuterComposite body = null)
|
||||||
|
{
|
||||||
|
ApiResponse<OuterComposite> localVarResponse = await FakeOuterCompositeSerializeAsyncWithHttpInfo(body);
|
||||||
|
return localVarResponse.Data;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Test serialization of object with outer number type
|
||||||
|
/// </summary>
|
||||||
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||||
|
/// <param name="body">Input composite as post body (optional)</param>
|
||||||
|
/// <returns>Task of ApiResponse (OuterComposite)</returns>
|
||||||
|
public async System.Threading.Tasks.Task<ApiResponse<OuterComposite>> FakeOuterCompositeSerializeAsyncWithHttpInfo (OuterComposite body = null)
|
||||||
|
{
|
||||||
|
|
||||||
|
var localVarPath = "/fake/outer/composite";
|
||||||
|
var localVarPathParams = new Dictionary<String, String>();
|
||||||
|
var localVarQueryParams = new Dictionary<String, String>();
|
||||||
|
var localVarHeaderParams = new Dictionary<String, String>(Configuration.DefaultHeader);
|
||||||
|
var localVarFormParams = new Dictionary<String, String>();
|
||||||
|
var localVarFileParams = new Dictionary<String, FileParameter>();
|
||||||
|
Object localVarPostBody = null;
|
||||||
|
|
||||||
|
// to determine the Content-Type header
|
||||||
|
String[] localVarHttpContentTypes = new String[] {
|
||||||
|
};
|
||||||
|
String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
|
||||||
|
|
||||||
|
// to determine the Accept header
|
||||||
|
String[] localVarHttpHeaderAccepts = new String[] {
|
||||||
|
};
|
||||||
|
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
||||||
|
if (localVarHttpHeaderAccept != null)
|
||||||
|
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
|
||||||
|
|
||||||
|
if (body != null && body.GetType() != typeof(byte[]))
|
||||||
|
{
|
||||||
|
localVarPostBody = Configuration.ApiClient.Serialize(body); // http body (model) parameter
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
localVarPostBody = body; // byte array
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// make the HTTP request
|
||||||
|
IRestResponse localVarResponse = (IRestResponse) await Configuration.ApiClient.CallApiAsync(localVarPath,
|
||||||
|
Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
|
||||||
|
localVarPathParams, localVarHttpContentType);
|
||||||
|
|
||||||
|
int localVarStatusCode = (int) localVarResponse.StatusCode;
|
||||||
|
|
||||||
|
if (ExceptionFactory != null)
|
||||||
|
{
|
||||||
|
Exception exception = ExceptionFactory("FakeOuterCompositeSerialize", localVarResponse);
|
||||||
|
if (exception != null) throw exception;
|
||||||
|
}
|
||||||
|
|
||||||
|
return new ApiResponse<OuterComposite>(localVarStatusCode,
|
||||||
|
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
|
||||||
|
(OuterComposite) Configuration.ApiClient.Deserialize(localVarResponse, typeof(OuterComposite)));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Test serialization of outer number types
|
||||||
|
/// </summary>
|
||||||
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||||
|
/// <param name="body">Input number as post body (optional)</param>
|
||||||
|
/// <returns>OuterNumber</returns>
|
||||||
|
public OuterNumber FakeOuterNumberSerialize (OuterNumber body = null)
|
||||||
|
{
|
||||||
|
ApiResponse<OuterNumber> localVarResponse = FakeOuterNumberSerializeWithHttpInfo(body);
|
||||||
|
return localVarResponse.Data;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Test serialization of outer number types
|
||||||
|
/// </summary>
|
||||||
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||||
|
/// <param name="body">Input number as post body (optional)</param>
|
||||||
|
/// <returns>ApiResponse of OuterNumber</returns>
|
||||||
|
public ApiResponse< OuterNumber > FakeOuterNumberSerializeWithHttpInfo (OuterNumber body = null)
|
||||||
|
{
|
||||||
|
|
||||||
|
var localVarPath = "/fake/outer/number";
|
||||||
|
var localVarPathParams = new Dictionary<String, String>();
|
||||||
|
var localVarQueryParams = new Dictionary<String, String>();
|
||||||
|
var localVarHeaderParams = new Dictionary<String, String>(Configuration.DefaultHeader);
|
||||||
|
var localVarFormParams = new Dictionary<String, String>();
|
||||||
|
var localVarFileParams = new Dictionary<String, FileParameter>();
|
||||||
|
Object localVarPostBody = null;
|
||||||
|
|
||||||
|
// to determine the Content-Type header
|
||||||
|
String[] localVarHttpContentTypes = new String[] {
|
||||||
|
};
|
||||||
|
String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
|
||||||
|
|
||||||
|
// to determine the Accept header
|
||||||
|
String[] localVarHttpHeaderAccepts = new String[] {
|
||||||
|
};
|
||||||
|
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
||||||
|
if (localVarHttpHeaderAccept != null)
|
||||||
|
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
|
||||||
|
|
||||||
|
if (body != null && body.GetType() != typeof(byte[]))
|
||||||
|
{
|
||||||
|
localVarPostBody = Configuration.ApiClient.Serialize(body); // http body (model) parameter
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
localVarPostBody = body; // byte array
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// make the HTTP request
|
||||||
|
IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath,
|
||||||
|
Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
|
||||||
|
localVarPathParams, localVarHttpContentType);
|
||||||
|
|
||||||
|
int localVarStatusCode = (int) localVarResponse.StatusCode;
|
||||||
|
|
||||||
|
if (ExceptionFactory != null)
|
||||||
|
{
|
||||||
|
Exception exception = ExceptionFactory("FakeOuterNumberSerialize", localVarResponse);
|
||||||
|
if (exception != null) throw exception;
|
||||||
|
}
|
||||||
|
|
||||||
|
return new ApiResponse<OuterNumber>(localVarStatusCode,
|
||||||
|
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
|
||||||
|
(OuterNumber) Configuration.ApiClient.Deserialize(localVarResponse, typeof(OuterNumber)));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Test serialization of outer number types
|
||||||
|
/// </summary>
|
||||||
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||||
|
/// <param name="body">Input number as post body (optional)</param>
|
||||||
|
/// <returns>Task of OuterNumber</returns>
|
||||||
|
public async System.Threading.Tasks.Task<OuterNumber> FakeOuterNumberSerializeAsync (OuterNumber body = null)
|
||||||
|
{
|
||||||
|
ApiResponse<OuterNumber> localVarResponse = await FakeOuterNumberSerializeAsyncWithHttpInfo(body);
|
||||||
|
return localVarResponse.Data;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Test serialization of outer number types
|
||||||
|
/// </summary>
|
||||||
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||||
|
/// <param name="body">Input number as post body (optional)</param>
|
||||||
|
/// <returns>Task of ApiResponse (OuterNumber)</returns>
|
||||||
|
public async System.Threading.Tasks.Task<ApiResponse<OuterNumber>> FakeOuterNumberSerializeAsyncWithHttpInfo (OuterNumber body = null)
|
||||||
|
{
|
||||||
|
|
||||||
|
var localVarPath = "/fake/outer/number";
|
||||||
|
var localVarPathParams = new Dictionary<String, String>();
|
||||||
|
var localVarQueryParams = new Dictionary<String, String>();
|
||||||
|
var localVarHeaderParams = new Dictionary<String, String>(Configuration.DefaultHeader);
|
||||||
|
var localVarFormParams = new Dictionary<String, String>();
|
||||||
|
var localVarFileParams = new Dictionary<String, FileParameter>();
|
||||||
|
Object localVarPostBody = null;
|
||||||
|
|
||||||
|
// to determine the Content-Type header
|
||||||
|
String[] localVarHttpContentTypes = new String[] {
|
||||||
|
};
|
||||||
|
String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
|
||||||
|
|
||||||
|
// to determine the Accept header
|
||||||
|
String[] localVarHttpHeaderAccepts = new String[] {
|
||||||
|
};
|
||||||
|
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
||||||
|
if (localVarHttpHeaderAccept != null)
|
||||||
|
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
|
||||||
|
|
||||||
|
if (body != null && body.GetType() != typeof(byte[]))
|
||||||
|
{
|
||||||
|
localVarPostBody = Configuration.ApiClient.Serialize(body); // http body (model) parameter
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
localVarPostBody = body; // byte array
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// make the HTTP request
|
||||||
|
IRestResponse localVarResponse = (IRestResponse) await Configuration.ApiClient.CallApiAsync(localVarPath,
|
||||||
|
Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
|
||||||
|
localVarPathParams, localVarHttpContentType);
|
||||||
|
|
||||||
|
int localVarStatusCode = (int) localVarResponse.StatusCode;
|
||||||
|
|
||||||
|
if (ExceptionFactory != null)
|
||||||
|
{
|
||||||
|
Exception exception = ExceptionFactory("FakeOuterNumberSerialize", localVarResponse);
|
||||||
|
if (exception != null) throw exception;
|
||||||
|
}
|
||||||
|
|
||||||
|
return new ApiResponse<OuterNumber>(localVarStatusCode,
|
||||||
|
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
|
||||||
|
(OuterNumber) Configuration.ApiClient.Deserialize(localVarResponse, typeof(OuterNumber)));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Test serialization of outer string types
|
||||||
|
/// </summary>
|
||||||
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||||
|
/// <param name="body">Input string as post body (optional)</param>
|
||||||
|
/// <returns>OuterString</returns>
|
||||||
|
public OuterString FakeOuterStringSerialize (OuterString body = null)
|
||||||
|
{
|
||||||
|
ApiResponse<OuterString> localVarResponse = FakeOuterStringSerializeWithHttpInfo(body);
|
||||||
|
return localVarResponse.Data;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Test serialization of outer string types
|
||||||
|
/// </summary>
|
||||||
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||||
|
/// <param name="body">Input string as post body (optional)</param>
|
||||||
|
/// <returns>ApiResponse of OuterString</returns>
|
||||||
|
public ApiResponse< OuterString > FakeOuterStringSerializeWithHttpInfo (OuterString body = null)
|
||||||
|
{
|
||||||
|
|
||||||
|
var localVarPath = "/fake/outer/string";
|
||||||
|
var localVarPathParams = new Dictionary<String, String>();
|
||||||
|
var localVarQueryParams = new Dictionary<String, String>();
|
||||||
|
var localVarHeaderParams = new Dictionary<String, String>(Configuration.DefaultHeader);
|
||||||
|
var localVarFormParams = new Dictionary<String, String>();
|
||||||
|
var localVarFileParams = new Dictionary<String, FileParameter>();
|
||||||
|
Object localVarPostBody = null;
|
||||||
|
|
||||||
|
// to determine the Content-Type header
|
||||||
|
String[] localVarHttpContentTypes = new String[] {
|
||||||
|
};
|
||||||
|
String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
|
||||||
|
|
||||||
|
// to determine the Accept header
|
||||||
|
String[] localVarHttpHeaderAccepts = new String[] {
|
||||||
|
};
|
||||||
|
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
||||||
|
if (localVarHttpHeaderAccept != null)
|
||||||
|
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
|
||||||
|
|
||||||
|
if (body != null && body.GetType() != typeof(byte[]))
|
||||||
|
{
|
||||||
|
localVarPostBody = Configuration.ApiClient.Serialize(body); // http body (model) parameter
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
localVarPostBody = body; // byte array
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// make the HTTP request
|
||||||
|
IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath,
|
||||||
|
Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
|
||||||
|
localVarPathParams, localVarHttpContentType);
|
||||||
|
|
||||||
|
int localVarStatusCode = (int) localVarResponse.StatusCode;
|
||||||
|
|
||||||
|
if (ExceptionFactory != null)
|
||||||
|
{
|
||||||
|
Exception exception = ExceptionFactory("FakeOuterStringSerialize", localVarResponse);
|
||||||
|
if (exception != null) throw exception;
|
||||||
|
}
|
||||||
|
|
||||||
|
return new ApiResponse<OuterString>(localVarStatusCode,
|
||||||
|
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
|
||||||
|
(OuterString) Configuration.ApiClient.Deserialize(localVarResponse, typeof(OuterString)));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Test serialization of outer string types
|
||||||
|
/// </summary>
|
||||||
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||||
|
/// <param name="body">Input string as post body (optional)</param>
|
||||||
|
/// <returns>Task of OuterString</returns>
|
||||||
|
public async System.Threading.Tasks.Task<OuterString> FakeOuterStringSerializeAsync (OuterString body = null)
|
||||||
|
{
|
||||||
|
ApiResponse<OuterString> localVarResponse = await FakeOuterStringSerializeAsyncWithHttpInfo(body);
|
||||||
|
return localVarResponse.Data;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Test serialization of outer string types
|
||||||
|
/// </summary>
|
||||||
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||||
|
/// <param name="body">Input string as post body (optional)</param>
|
||||||
|
/// <returns>Task of ApiResponse (OuterString)</returns>
|
||||||
|
public async System.Threading.Tasks.Task<ApiResponse<OuterString>> FakeOuterStringSerializeAsyncWithHttpInfo (OuterString body = null)
|
||||||
|
{
|
||||||
|
|
||||||
|
var localVarPath = "/fake/outer/string";
|
||||||
|
var localVarPathParams = new Dictionary<String, String>();
|
||||||
|
var localVarQueryParams = new Dictionary<String, String>();
|
||||||
|
var localVarHeaderParams = new Dictionary<String, String>(Configuration.DefaultHeader);
|
||||||
|
var localVarFormParams = new Dictionary<String, String>();
|
||||||
|
var localVarFileParams = new Dictionary<String, FileParameter>();
|
||||||
|
Object localVarPostBody = null;
|
||||||
|
|
||||||
|
// to determine the Content-Type header
|
||||||
|
String[] localVarHttpContentTypes = new String[] {
|
||||||
|
};
|
||||||
|
String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
|
||||||
|
|
||||||
|
// to determine the Accept header
|
||||||
|
String[] localVarHttpHeaderAccepts = new String[] {
|
||||||
|
};
|
||||||
|
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
||||||
|
if (localVarHttpHeaderAccept != null)
|
||||||
|
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
|
||||||
|
|
||||||
|
if (body != null && body.GetType() != typeof(byte[]))
|
||||||
|
{
|
||||||
|
localVarPostBody = Configuration.ApiClient.Serialize(body); // http body (model) parameter
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
localVarPostBody = body; // byte array
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// make the HTTP request
|
||||||
|
IRestResponse localVarResponse = (IRestResponse) await Configuration.ApiClient.CallApiAsync(localVarPath,
|
||||||
|
Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
|
||||||
|
localVarPathParams, localVarHttpContentType);
|
||||||
|
|
||||||
|
int localVarStatusCode = (int) localVarResponse.StatusCode;
|
||||||
|
|
||||||
|
if (ExceptionFactory != null)
|
||||||
|
{
|
||||||
|
Exception exception = ExceptionFactory("FakeOuterStringSerialize", localVarResponse);
|
||||||
|
if (exception != null) throw exception;
|
||||||
|
}
|
||||||
|
|
||||||
|
return new ApiResponse<OuterString>(localVarStatusCode,
|
||||||
|
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
|
||||||
|
(OuterString) Configuration.ApiClient.Deserialize(localVarResponse, typeof(OuterString)));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// To test \"client\" model To test \"client\" model
|
/// To test \"client\" model To test \"client\" model
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -0,0 +1,112 @@
|
|||||||
|
/*
|
||||||
|
* Swagger Petstore
|
||||||
|
*
|
||||||
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||||
|
*
|
||||||
|
* OpenAPI spec version: 1.0.0
|
||||||
|
* Contact: apiteam@swagger.io
|
||||||
|
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||||
|
*/
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using System.Linq;
|
||||||
|
using System.IO;
|
||||||
|
using System.Text;
|
||||||
|
using System.Text.RegularExpressions;
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Collections.ObjectModel;
|
||||||
|
using System.Runtime.Serialization;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
using Newtonsoft.Json.Converters;
|
||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
|
||||||
|
namespace IO.Swagger.Model
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// OuterBoolean
|
||||||
|
/// </summary>
|
||||||
|
[DataContract]
|
||||||
|
public partial class OuterBoolean : IEquatable<OuterBoolean>, IValidatableObject
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Initializes a new instance of the <see cref="OuterBoolean" /> class.
|
||||||
|
/// </summary>
|
||||||
|
[JsonConstructorAttribute]
|
||||||
|
public OuterBoolean()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns the string presentation of the object
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>String presentation of the object</returns>
|
||||||
|
public override string ToString()
|
||||||
|
{
|
||||||
|
var sb = new StringBuilder();
|
||||||
|
sb.Append("class OuterBoolean {\n");
|
||||||
|
sb.Append("}\n");
|
||||||
|
return sb.ToString();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns the JSON string presentation of the object
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>JSON string presentation of the object</returns>
|
||||||
|
public string ToJson()
|
||||||
|
{
|
||||||
|
return JsonConvert.SerializeObject(this, Formatting.Indented);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns true if objects are equal
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="obj">Object to be compared</param>
|
||||||
|
/// <returns>Boolean</returns>
|
||||||
|
public override bool Equals(object obj)
|
||||||
|
{
|
||||||
|
// credit: http://stackoverflow.com/a/10454552/677735
|
||||||
|
return this.Equals(obj as OuterBoolean);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns true if OuterBoolean instances are equal
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="other">Instance of OuterBoolean to be compared</param>
|
||||||
|
/// <returns>Boolean</returns>
|
||||||
|
public bool Equals(OuterBoolean other)
|
||||||
|
{
|
||||||
|
// credit: http://stackoverflow.com/a/10454552/677735
|
||||||
|
if (other == null)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the hash code
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>Hash code</returns>
|
||||||
|
public override int GetHashCode()
|
||||||
|
{
|
||||||
|
// credit: http://stackoverflow.com/a/263416/677735
|
||||||
|
unchecked // Overflow is fine, just wrap
|
||||||
|
{
|
||||||
|
int hash = 41;
|
||||||
|
// Suitable nullity checks etc, of course :)
|
||||||
|
return hash;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// To validate all properties of the instance
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="validationContext">Validation context</param>
|
||||||
|
/// <returns>Validation Result</returns>
|
||||||
|
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
|
||||||
|
{
|
||||||
|
yield break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,156 @@
|
|||||||
|
/*
|
||||||
|
* Swagger Petstore
|
||||||
|
*
|
||||||
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||||
|
*
|
||||||
|
* OpenAPI spec version: 1.0.0
|
||||||
|
* Contact: apiteam@swagger.io
|
||||||
|
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||||
|
*/
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using System.Linq;
|
||||||
|
using System.IO;
|
||||||
|
using System.Text;
|
||||||
|
using System.Text.RegularExpressions;
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Collections.ObjectModel;
|
||||||
|
using System.Runtime.Serialization;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
using Newtonsoft.Json.Converters;
|
||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
|
||||||
|
namespace IO.Swagger.Model
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// OuterComposite
|
||||||
|
/// </summary>
|
||||||
|
[DataContract]
|
||||||
|
public partial class OuterComposite : IEquatable<OuterComposite>, IValidatableObject
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Initializes a new instance of the <see cref="OuterComposite" /> class.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="MyNumber">MyNumber.</param>
|
||||||
|
/// <param name="MyString">MyString.</param>
|
||||||
|
/// <param name="MyBoolean">MyBoolean.</param>
|
||||||
|
public OuterComposite(OuterNumber MyNumber = default(OuterNumber), OuterString MyString = default(OuterString), OuterBoolean MyBoolean = default(OuterBoolean))
|
||||||
|
{
|
||||||
|
this.MyNumber = MyNumber;
|
||||||
|
this.MyString = MyString;
|
||||||
|
this.MyBoolean = MyBoolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or Sets MyNumber
|
||||||
|
/// </summary>
|
||||||
|
[DataMember(Name="my_number", EmitDefaultValue=false)]
|
||||||
|
public OuterNumber MyNumber { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or Sets MyString
|
||||||
|
/// </summary>
|
||||||
|
[DataMember(Name="my_string", EmitDefaultValue=false)]
|
||||||
|
public OuterString MyString { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or Sets MyBoolean
|
||||||
|
/// </summary>
|
||||||
|
[DataMember(Name="my_boolean", EmitDefaultValue=false)]
|
||||||
|
public OuterBoolean MyBoolean { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// Returns the string presentation of the object
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>String presentation of the object</returns>
|
||||||
|
public override string ToString()
|
||||||
|
{
|
||||||
|
var sb = new StringBuilder();
|
||||||
|
sb.Append("class OuterComposite {\n");
|
||||||
|
sb.Append(" MyNumber: ").Append(MyNumber).Append("\n");
|
||||||
|
sb.Append(" MyString: ").Append(MyString).Append("\n");
|
||||||
|
sb.Append(" MyBoolean: ").Append(MyBoolean).Append("\n");
|
||||||
|
sb.Append("}\n");
|
||||||
|
return sb.ToString();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns the JSON string presentation of the object
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>JSON string presentation of the object</returns>
|
||||||
|
public string ToJson()
|
||||||
|
{
|
||||||
|
return JsonConvert.SerializeObject(this, Formatting.Indented);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns true if objects are equal
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="obj">Object to be compared</param>
|
||||||
|
/// <returns>Boolean</returns>
|
||||||
|
public override bool Equals(object obj)
|
||||||
|
{
|
||||||
|
// credit: http://stackoverflow.com/a/10454552/677735
|
||||||
|
return this.Equals(obj as OuterComposite);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns true if OuterComposite instances are equal
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="other">Instance of OuterComposite to be compared</param>
|
||||||
|
/// <returns>Boolean</returns>
|
||||||
|
public bool Equals(OuterComposite other)
|
||||||
|
{
|
||||||
|
// credit: http://stackoverflow.com/a/10454552/677735
|
||||||
|
if (other == null)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
return
|
||||||
|
(
|
||||||
|
this.MyNumber == other.MyNumber ||
|
||||||
|
this.MyNumber != null &&
|
||||||
|
this.MyNumber.Equals(other.MyNumber)
|
||||||
|
) &&
|
||||||
|
(
|
||||||
|
this.MyString == other.MyString ||
|
||||||
|
this.MyString != null &&
|
||||||
|
this.MyString.Equals(other.MyString)
|
||||||
|
) &&
|
||||||
|
(
|
||||||
|
this.MyBoolean == other.MyBoolean ||
|
||||||
|
this.MyBoolean != null &&
|
||||||
|
this.MyBoolean.Equals(other.MyBoolean)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the hash code
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>Hash code</returns>
|
||||||
|
public override int GetHashCode()
|
||||||
|
{
|
||||||
|
// credit: http://stackoverflow.com/a/263416/677735
|
||||||
|
unchecked // Overflow is fine, just wrap
|
||||||
|
{
|
||||||
|
int hash = 41;
|
||||||
|
// Suitable nullity checks etc, of course :)
|
||||||
|
if (this.MyNumber != null)
|
||||||
|
hash = hash * 59 + this.MyNumber.GetHashCode();
|
||||||
|
if (this.MyString != null)
|
||||||
|
hash = hash * 59 + this.MyString.GetHashCode();
|
||||||
|
if (this.MyBoolean != null)
|
||||||
|
hash = hash * 59 + this.MyBoolean.GetHashCode();
|
||||||
|
return hash;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// To validate all properties of the instance
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="validationContext">Validation context</param>
|
||||||
|
/// <returns>Validation Result</returns>
|
||||||
|
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
|
||||||
|
{
|
||||||
|
yield break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,112 @@
|
|||||||
|
/*
|
||||||
|
* Swagger Petstore
|
||||||
|
*
|
||||||
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||||
|
*
|
||||||
|
* OpenAPI spec version: 1.0.0
|
||||||
|
* Contact: apiteam@swagger.io
|
||||||
|
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||||
|
*/
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using System.Linq;
|
||||||
|
using System.IO;
|
||||||
|
using System.Text;
|
||||||
|
using System.Text.RegularExpressions;
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Collections.ObjectModel;
|
||||||
|
using System.Runtime.Serialization;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
using Newtonsoft.Json.Converters;
|
||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
|
||||||
|
namespace IO.Swagger.Model
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// OuterNumber
|
||||||
|
/// </summary>
|
||||||
|
[DataContract]
|
||||||
|
public partial class OuterNumber : IEquatable<OuterNumber>, IValidatableObject
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Initializes a new instance of the <see cref="OuterNumber" /> class.
|
||||||
|
/// </summary>
|
||||||
|
[JsonConstructorAttribute]
|
||||||
|
public OuterNumber()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns the string presentation of the object
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>String presentation of the object</returns>
|
||||||
|
public override string ToString()
|
||||||
|
{
|
||||||
|
var sb = new StringBuilder();
|
||||||
|
sb.Append("class OuterNumber {\n");
|
||||||
|
sb.Append("}\n");
|
||||||
|
return sb.ToString();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns the JSON string presentation of the object
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>JSON string presentation of the object</returns>
|
||||||
|
public string ToJson()
|
||||||
|
{
|
||||||
|
return JsonConvert.SerializeObject(this, Formatting.Indented);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns true if objects are equal
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="obj">Object to be compared</param>
|
||||||
|
/// <returns>Boolean</returns>
|
||||||
|
public override bool Equals(object obj)
|
||||||
|
{
|
||||||
|
// credit: http://stackoverflow.com/a/10454552/677735
|
||||||
|
return this.Equals(obj as OuterNumber);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns true if OuterNumber instances are equal
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="other">Instance of OuterNumber to be compared</param>
|
||||||
|
/// <returns>Boolean</returns>
|
||||||
|
public bool Equals(OuterNumber other)
|
||||||
|
{
|
||||||
|
// credit: http://stackoverflow.com/a/10454552/677735
|
||||||
|
if (other == null)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the hash code
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>Hash code</returns>
|
||||||
|
public override int GetHashCode()
|
||||||
|
{
|
||||||
|
// credit: http://stackoverflow.com/a/263416/677735
|
||||||
|
unchecked // Overflow is fine, just wrap
|
||||||
|
{
|
||||||
|
int hash = 41;
|
||||||
|
// Suitable nullity checks etc, of course :)
|
||||||
|
return hash;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// To validate all properties of the instance
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="validationContext">Validation context</param>
|
||||||
|
/// <returns>Validation Result</returns>
|
||||||
|
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
|
||||||
|
{
|
||||||
|
yield break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,112 @@
|
|||||||
|
/*
|
||||||
|
* Swagger Petstore
|
||||||
|
*
|
||||||
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||||
|
*
|
||||||
|
* OpenAPI spec version: 1.0.0
|
||||||
|
* Contact: apiteam@swagger.io
|
||||||
|
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||||
|
*/
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using System.Linq;
|
||||||
|
using System.IO;
|
||||||
|
using System.Text;
|
||||||
|
using System.Text.RegularExpressions;
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Collections.ObjectModel;
|
||||||
|
using System.Runtime.Serialization;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
using Newtonsoft.Json.Converters;
|
||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
|
||||||
|
namespace IO.Swagger.Model
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// OuterString
|
||||||
|
/// </summary>
|
||||||
|
[DataContract]
|
||||||
|
public partial class OuterString : IEquatable<OuterString>, IValidatableObject
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Initializes a new instance of the <see cref="OuterString" /> class.
|
||||||
|
/// </summary>
|
||||||
|
[JsonConstructorAttribute]
|
||||||
|
public OuterString()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns the string presentation of the object
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>String presentation of the object</returns>
|
||||||
|
public override string ToString()
|
||||||
|
{
|
||||||
|
var sb = new StringBuilder();
|
||||||
|
sb.Append("class OuterString {\n");
|
||||||
|
sb.Append("}\n");
|
||||||
|
return sb.ToString();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns the JSON string presentation of the object
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>JSON string presentation of the object</returns>
|
||||||
|
public string ToJson()
|
||||||
|
{
|
||||||
|
return JsonConvert.SerializeObject(this, Formatting.Indented);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns true if objects are equal
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="obj">Object to be compared</param>
|
||||||
|
/// <returns>Boolean</returns>
|
||||||
|
public override bool Equals(object obj)
|
||||||
|
{
|
||||||
|
// credit: http://stackoverflow.com/a/10454552/677735
|
||||||
|
return this.Equals(obj as OuterString);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns true if OuterString instances are equal
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="other">Instance of OuterString to be compared</param>
|
||||||
|
/// <returns>Boolean</returns>
|
||||||
|
public bool Equals(OuterString other)
|
||||||
|
{
|
||||||
|
// credit: http://stackoverflow.com/a/10454552/677735
|
||||||
|
if (other == null)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the hash code
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>Hash code</returns>
|
||||||
|
public override int GetHashCode()
|
||||||
|
{
|
||||||
|
// credit: http://stackoverflow.com/a/263416/677735
|
||||||
|
unchecked // Overflow is fine, just wrap
|
||||||
|
{
|
||||||
|
int hash = 41;
|
||||||
|
// Suitable nullity checks etc, of course :)
|
||||||
|
return hash;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// To validate all properties of the instance
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="validationContext">Validation context</param>
|
||||||
|
/// <returns>Validation Result</returns>
|
||||||
|
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
|
||||||
|
{
|
||||||
|
yield break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -49,17 +49,16 @@ namespace Example
|
|||||||
{
|
{
|
||||||
|
|
||||||
var apiInstance = new FakeApi();
|
var apiInstance = new FakeApi();
|
||||||
var body = new ModelClient(); // ModelClient | client model
|
var body = new OuterBoolean(); // OuterBoolean | Input boolean as post body (optional)
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
// To test \"client\" model
|
OuterBoolean result = apiInstance.FakeOuterBooleanSerialize(body);
|
||||||
ModelClient result = apiInstance.TestClientModel(body);
|
|
||||||
Debug.WriteLine(result);
|
Debug.WriteLine(result);
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
Debug.Print("Exception when calling FakeApi.TestClientModel: " + e.Message );
|
Debug.Print("Exception when calling FakeApi.FakeOuterBooleanSerialize: " + e.Message );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -73,6 +72,10 @@ All URIs are relative to *http://petstore.swagger.io:80/v2*
|
|||||||
|
|
||||||
Class | Method | HTTP request | Description
|
Class | Method | HTTP request | Description
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
|
*FakeApi* | [**FakeOuterBooleanSerialize**](docs/FakeApi.md#fakeouterbooleanserialize) | **POST** /fake/outer/boolean |
|
||||||
|
*FakeApi* | [**FakeOuterCompositeSerialize**](docs/FakeApi.md#fakeoutercompositeserialize) | **POST** /fake/outer/composite |
|
||||||
|
*FakeApi* | [**FakeOuterNumberSerialize**](docs/FakeApi.md#fakeouternumberserialize) | **POST** /fake/outer/number |
|
||||||
|
*FakeApi* | [**FakeOuterStringSerialize**](docs/FakeApi.md#fakeouterstringserialize) | **POST** /fake/outer/string |
|
||||||
*FakeApi* | [**TestClientModel**](docs/FakeApi.md#testclientmodel) | **PATCH** /fake | To test \"client\" model
|
*FakeApi* | [**TestClientModel**](docs/FakeApi.md#testclientmodel) | **PATCH** /fake | To test \"client\" model
|
||||||
*FakeApi* | [**TestEndpointParameters**](docs/FakeApi.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
*FakeApi* | [**TestEndpointParameters**](docs/FakeApi.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||||
*FakeApi* | [**TestEnumParameters**](docs/FakeApi.md#testenumparameters) | **GET** /fake | To test enum parameters
|
*FakeApi* | [**TestEnumParameters**](docs/FakeApi.md#testenumparameters) | **GET** /fake | To test enum parameters
|
||||||
@ -127,7 +130,11 @@ Class | Method | HTTP request | Description
|
|||||||
- [Model.Name](docs/Name.md)
|
- [Model.Name](docs/Name.md)
|
||||||
- [Model.NumberOnly](docs/NumberOnly.md)
|
- [Model.NumberOnly](docs/NumberOnly.md)
|
||||||
- [Model.Order](docs/Order.md)
|
- [Model.Order](docs/Order.md)
|
||||||
|
- [Model.OuterBoolean](docs/OuterBoolean.md)
|
||||||
|
- [Model.OuterComposite](docs/OuterComposite.md)
|
||||||
- [Model.OuterEnum](docs/OuterEnum.md)
|
- [Model.OuterEnum](docs/OuterEnum.md)
|
||||||
|
- [Model.OuterNumber](docs/OuterNumber.md)
|
||||||
|
- [Model.OuterString](docs/OuterString.md)
|
||||||
- [Model.Pet](docs/Pet.md)
|
- [Model.Pet](docs/Pet.md)
|
||||||
- [Model.ReadOnlyFirst](docs/ReadOnlyFirst.md)
|
- [Model.ReadOnlyFirst](docs/ReadOnlyFirst.md)
|
||||||
- [Model.SpecialModelName](docs/SpecialModelName.md)
|
- [Model.SpecialModelName](docs/SpecialModelName.md)
|
||||||
|
@ -4,11 +4,259 @@ All URIs are relative to *http://petstore.swagger.io:80/v2*
|
|||||||
|
|
||||||
Method | HTTP request | Description
|
Method | HTTP request | Description
|
||||||
------------- | ------------- | -------------
|
------------- | ------------- | -------------
|
||||||
|
[**FakeOuterBooleanSerialize**](FakeApi.md#fakeouterbooleanserialize) | **POST** /fake/outer/boolean |
|
||||||
|
[**FakeOuterCompositeSerialize**](FakeApi.md#fakeoutercompositeserialize) | **POST** /fake/outer/composite |
|
||||||
|
[**FakeOuterNumberSerialize**](FakeApi.md#fakeouternumberserialize) | **POST** /fake/outer/number |
|
||||||
|
[**FakeOuterStringSerialize**](FakeApi.md#fakeouterstringserialize) | **POST** /fake/outer/string |
|
||||||
[**TestClientModel**](FakeApi.md#testclientmodel) | **PATCH** /fake | To test \"client\" model
|
[**TestClientModel**](FakeApi.md#testclientmodel) | **PATCH** /fake | To test \"client\" model
|
||||||
[**TestEndpointParameters**](FakeApi.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
[**TestEndpointParameters**](FakeApi.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||||
[**TestEnumParameters**](FakeApi.md#testenumparameters) | **GET** /fake | To test enum parameters
|
[**TestEnumParameters**](FakeApi.md#testenumparameters) | **GET** /fake | To test enum parameters
|
||||||
|
|
||||||
|
|
||||||
|
<a name="fakeouterbooleanserialize"></a>
|
||||||
|
# **FakeOuterBooleanSerialize**
|
||||||
|
> OuterBoolean FakeOuterBooleanSerialize (OuterBoolean body = null)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Test serialization of outer boolean types
|
||||||
|
|
||||||
|
### Example
|
||||||
|
```csharp
|
||||||
|
using System;
|
||||||
|
using System.Diagnostics;
|
||||||
|
using IO.Swagger.Api;
|
||||||
|
using IO.Swagger.Client;
|
||||||
|
using IO.Swagger.Model;
|
||||||
|
|
||||||
|
namespace Example
|
||||||
|
{
|
||||||
|
public class FakeOuterBooleanSerializeExample
|
||||||
|
{
|
||||||
|
public void main()
|
||||||
|
{
|
||||||
|
|
||||||
|
var apiInstance = new FakeApi();
|
||||||
|
var body = new OuterBoolean(); // OuterBoolean | Input boolean as post body (optional)
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
OuterBoolean result = apiInstance.FakeOuterBooleanSerialize(body);
|
||||||
|
Debug.WriteLine(result);
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
Debug.Print("Exception when calling FakeApi.FakeOuterBooleanSerialize: " + e.Message );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**body** | [**OuterBoolean**](OuterBoolean.md)| Input boolean as post body | [optional]
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
[**OuterBoolean**](OuterBoolean.md)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
<a name="fakeoutercompositeserialize"></a>
|
||||||
|
# **FakeOuterCompositeSerialize**
|
||||||
|
> OuterComposite FakeOuterCompositeSerialize (OuterComposite body = null)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Test serialization of object with outer number type
|
||||||
|
|
||||||
|
### Example
|
||||||
|
```csharp
|
||||||
|
using System;
|
||||||
|
using System.Diagnostics;
|
||||||
|
using IO.Swagger.Api;
|
||||||
|
using IO.Swagger.Client;
|
||||||
|
using IO.Swagger.Model;
|
||||||
|
|
||||||
|
namespace Example
|
||||||
|
{
|
||||||
|
public class FakeOuterCompositeSerializeExample
|
||||||
|
{
|
||||||
|
public void main()
|
||||||
|
{
|
||||||
|
|
||||||
|
var apiInstance = new FakeApi();
|
||||||
|
var body = new OuterComposite(); // OuterComposite | Input composite as post body (optional)
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
OuterComposite result = apiInstance.FakeOuterCompositeSerialize(body);
|
||||||
|
Debug.WriteLine(result);
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
Debug.Print("Exception when calling FakeApi.FakeOuterCompositeSerialize: " + e.Message );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**body** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional]
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
[**OuterComposite**](OuterComposite.md)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
<a name="fakeouternumberserialize"></a>
|
||||||
|
# **FakeOuterNumberSerialize**
|
||||||
|
> OuterNumber FakeOuterNumberSerialize (OuterNumber body = null)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Test serialization of outer number types
|
||||||
|
|
||||||
|
### Example
|
||||||
|
```csharp
|
||||||
|
using System;
|
||||||
|
using System.Diagnostics;
|
||||||
|
using IO.Swagger.Api;
|
||||||
|
using IO.Swagger.Client;
|
||||||
|
using IO.Swagger.Model;
|
||||||
|
|
||||||
|
namespace Example
|
||||||
|
{
|
||||||
|
public class FakeOuterNumberSerializeExample
|
||||||
|
{
|
||||||
|
public void main()
|
||||||
|
{
|
||||||
|
|
||||||
|
var apiInstance = new FakeApi();
|
||||||
|
var body = new OuterNumber(); // OuterNumber | Input number as post body (optional)
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
OuterNumber result = apiInstance.FakeOuterNumberSerialize(body);
|
||||||
|
Debug.WriteLine(result);
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
Debug.Print("Exception when calling FakeApi.FakeOuterNumberSerialize: " + e.Message );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**body** | [**OuterNumber**](OuterNumber.md)| Input number as post body | [optional]
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
[**OuterNumber**](OuterNumber.md)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
<a name="fakeouterstringserialize"></a>
|
||||||
|
# **FakeOuterStringSerialize**
|
||||||
|
> OuterString FakeOuterStringSerialize (OuterString body = null)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Test serialization of outer string types
|
||||||
|
|
||||||
|
### Example
|
||||||
|
```csharp
|
||||||
|
using System;
|
||||||
|
using System.Diagnostics;
|
||||||
|
using IO.Swagger.Api;
|
||||||
|
using IO.Swagger.Client;
|
||||||
|
using IO.Swagger.Model;
|
||||||
|
|
||||||
|
namespace Example
|
||||||
|
{
|
||||||
|
public class FakeOuterStringSerializeExample
|
||||||
|
{
|
||||||
|
public void main()
|
||||||
|
{
|
||||||
|
|
||||||
|
var apiInstance = new FakeApi();
|
||||||
|
var body = new OuterString(); // OuterString | Input string as post body (optional)
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
OuterString result = apiInstance.FakeOuterStringSerialize(body);
|
||||||
|
Debug.WriteLine(result);
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
Debug.Print("Exception when calling FakeApi.FakeOuterStringSerialize: " + e.Message );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**body** | [**OuterString**](OuterString.md)| Input string as post body | [optional]
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
[**OuterString**](OuterString.md)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||||
|
|
||||||
<a name="testclientmodel"></a>
|
<a name="testclientmodel"></a>
|
||||||
# **TestClientModel**
|
# **TestClientModel**
|
||||||
> ModelClient TestClientModel (ModelClient body)
|
> ModelClient TestClientModel (ModelClient body)
|
||||||
|
@ -25,6 +25,90 @@ namespace IO.Swagger.Api
|
|||||||
{
|
{
|
||||||
#region Synchronous Operations
|
#region Synchronous Operations
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Test serialization of outer boolean types
|
||||||
|
/// </remarks>
|
||||||
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||||
|
/// <param name="body">Input boolean as post body (optional)</param>
|
||||||
|
/// <returns>OuterBoolean</returns>
|
||||||
|
OuterBoolean FakeOuterBooleanSerialize (OuterBoolean body = null);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Test serialization of outer boolean types
|
||||||
|
/// </remarks>
|
||||||
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||||
|
/// <param name="body">Input boolean as post body (optional)</param>
|
||||||
|
/// <returns>ApiResponse of OuterBoolean</returns>
|
||||||
|
ApiResponse<OuterBoolean> FakeOuterBooleanSerializeWithHttpInfo (OuterBoolean body = null);
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Test serialization of object with outer number type
|
||||||
|
/// </remarks>
|
||||||
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||||
|
/// <param name="body">Input composite as post body (optional)</param>
|
||||||
|
/// <returns>OuterComposite</returns>
|
||||||
|
OuterComposite FakeOuterCompositeSerialize (OuterComposite body = null);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Test serialization of object with outer number type
|
||||||
|
/// </remarks>
|
||||||
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||||
|
/// <param name="body">Input composite as post body (optional)</param>
|
||||||
|
/// <returns>ApiResponse of OuterComposite</returns>
|
||||||
|
ApiResponse<OuterComposite> FakeOuterCompositeSerializeWithHttpInfo (OuterComposite body = null);
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Test serialization of outer number types
|
||||||
|
/// </remarks>
|
||||||
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||||
|
/// <param name="body">Input number as post body (optional)</param>
|
||||||
|
/// <returns>OuterNumber</returns>
|
||||||
|
OuterNumber FakeOuterNumberSerialize (OuterNumber body = null);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Test serialization of outer number types
|
||||||
|
/// </remarks>
|
||||||
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||||
|
/// <param name="body">Input number as post body (optional)</param>
|
||||||
|
/// <returns>ApiResponse of OuterNumber</returns>
|
||||||
|
ApiResponse<OuterNumber> FakeOuterNumberSerializeWithHttpInfo (OuterNumber body = null);
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Test serialization of outer string types
|
||||||
|
/// </remarks>
|
||||||
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||||
|
/// <param name="body">Input string as post body (optional)</param>
|
||||||
|
/// <returns>OuterString</returns>
|
||||||
|
OuterString FakeOuterStringSerialize (OuterString body = null);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Test serialization of outer string types
|
||||||
|
/// </remarks>
|
||||||
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||||
|
/// <param name="body">Input string as post body (optional)</param>
|
||||||
|
/// <returns>ApiResponse of OuterString</returns>
|
||||||
|
ApiResponse<OuterString> FakeOuterStringSerializeWithHttpInfo (OuterString body = null);
|
||||||
|
/// <summary>
|
||||||
/// To test \"client\" model
|
/// To test \"client\" model
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
@ -130,6 +214,90 @@ namespace IO.Swagger.Api
|
|||||||
#endregion Synchronous Operations
|
#endregion Synchronous Operations
|
||||||
#region Asynchronous Operations
|
#region Asynchronous Operations
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Test serialization of outer boolean types
|
||||||
|
/// </remarks>
|
||||||
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||||
|
/// <param name="body">Input boolean as post body (optional)</param>
|
||||||
|
/// <returns>Task of OuterBoolean</returns>
|
||||||
|
System.Threading.Tasks.Task<OuterBoolean> FakeOuterBooleanSerializeAsync (OuterBoolean body = null);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Test serialization of outer boolean types
|
||||||
|
/// </remarks>
|
||||||
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||||
|
/// <param name="body">Input boolean as post body (optional)</param>
|
||||||
|
/// <returns>Task of ApiResponse (OuterBoolean)</returns>
|
||||||
|
System.Threading.Tasks.Task<ApiResponse<OuterBoolean>> FakeOuterBooleanSerializeAsyncWithHttpInfo (OuterBoolean body = null);
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Test serialization of object with outer number type
|
||||||
|
/// </remarks>
|
||||||
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||||
|
/// <param name="body">Input composite as post body (optional)</param>
|
||||||
|
/// <returns>Task of OuterComposite</returns>
|
||||||
|
System.Threading.Tasks.Task<OuterComposite> FakeOuterCompositeSerializeAsync (OuterComposite body = null);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Test serialization of object with outer number type
|
||||||
|
/// </remarks>
|
||||||
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||||
|
/// <param name="body">Input composite as post body (optional)</param>
|
||||||
|
/// <returns>Task of ApiResponse (OuterComposite)</returns>
|
||||||
|
System.Threading.Tasks.Task<ApiResponse<OuterComposite>> FakeOuterCompositeSerializeAsyncWithHttpInfo (OuterComposite body = null);
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Test serialization of outer number types
|
||||||
|
/// </remarks>
|
||||||
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||||
|
/// <param name="body">Input number as post body (optional)</param>
|
||||||
|
/// <returns>Task of OuterNumber</returns>
|
||||||
|
System.Threading.Tasks.Task<OuterNumber> FakeOuterNumberSerializeAsync (OuterNumber body = null);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Test serialization of outer number types
|
||||||
|
/// </remarks>
|
||||||
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||||
|
/// <param name="body">Input number as post body (optional)</param>
|
||||||
|
/// <returns>Task of ApiResponse (OuterNumber)</returns>
|
||||||
|
System.Threading.Tasks.Task<ApiResponse<OuterNumber>> FakeOuterNumberSerializeAsyncWithHttpInfo (OuterNumber body = null);
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Test serialization of outer string types
|
||||||
|
/// </remarks>
|
||||||
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||||
|
/// <param name="body">Input string as post body (optional)</param>
|
||||||
|
/// <returns>Task of OuterString</returns>
|
||||||
|
System.Threading.Tasks.Task<OuterString> FakeOuterStringSerializeAsync (OuterString body = null);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Test serialization of outer string types
|
||||||
|
/// </remarks>
|
||||||
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||||
|
/// <param name="body">Input string as post body (optional)</param>
|
||||||
|
/// <returns>Task of ApiResponse (OuterString)</returns>
|
||||||
|
System.Threading.Tasks.Task<ApiResponse<OuterString>> FakeOuterStringSerializeAsyncWithHttpInfo (OuterString body = null);
|
||||||
|
/// <summary>
|
||||||
/// To test \"client\" model
|
/// To test \"client\" model
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
@ -344,6 +512,570 @@ namespace IO.Swagger.Api
|
|||||||
this.Configuration.AddDefaultHeader(key, value);
|
this.Configuration.AddDefaultHeader(key, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Test serialization of outer boolean types
|
||||||
|
/// </summary>
|
||||||
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||||
|
/// <param name="body">Input boolean as post body (optional)</param>
|
||||||
|
/// <returns>OuterBoolean</returns>
|
||||||
|
public OuterBoolean FakeOuterBooleanSerialize (OuterBoolean body = null)
|
||||||
|
{
|
||||||
|
ApiResponse<OuterBoolean> localVarResponse = FakeOuterBooleanSerializeWithHttpInfo(body);
|
||||||
|
return localVarResponse.Data;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Test serialization of outer boolean types
|
||||||
|
/// </summary>
|
||||||
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||||
|
/// <param name="body">Input boolean as post body (optional)</param>
|
||||||
|
/// <returns>ApiResponse of OuterBoolean</returns>
|
||||||
|
public ApiResponse< OuterBoolean > FakeOuterBooleanSerializeWithHttpInfo (OuterBoolean body = null)
|
||||||
|
{
|
||||||
|
|
||||||
|
var localVarPath = "./fake/outer/boolean";
|
||||||
|
var localVarPathParams = new Dictionary<String, String>();
|
||||||
|
var localVarQueryParams = new Dictionary<String, String>();
|
||||||
|
var localVarHeaderParams = new Dictionary<String, String>(Configuration.DefaultHeader);
|
||||||
|
var localVarFormParams = new Dictionary<String, String>();
|
||||||
|
var localVarFileParams = new Dictionary<String, FileParameter>();
|
||||||
|
Object localVarPostBody = null;
|
||||||
|
|
||||||
|
// to determine the Content-Type header
|
||||||
|
String[] localVarHttpContentTypes = new String[] {
|
||||||
|
};
|
||||||
|
String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
|
||||||
|
|
||||||
|
// to determine the Accept header
|
||||||
|
String[] localVarHttpHeaderAccepts = new String[] {
|
||||||
|
};
|
||||||
|
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
||||||
|
if (localVarHttpHeaderAccept != null)
|
||||||
|
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
|
||||||
|
|
||||||
|
if (body != null && body.GetType() != typeof(byte[]))
|
||||||
|
{
|
||||||
|
localVarPostBody = Configuration.ApiClient.Serialize(body); // http body (model) parameter
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
localVarPostBody = body; // byte array
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// make the HTTP request
|
||||||
|
IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath,
|
||||||
|
Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
|
||||||
|
localVarPathParams, localVarHttpContentType);
|
||||||
|
|
||||||
|
int localVarStatusCode = (int) localVarResponse.StatusCode;
|
||||||
|
|
||||||
|
if (ExceptionFactory != null)
|
||||||
|
{
|
||||||
|
Exception exception = ExceptionFactory("FakeOuterBooleanSerialize", localVarResponse);
|
||||||
|
if (exception != null) throw exception;
|
||||||
|
}
|
||||||
|
|
||||||
|
return new ApiResponse<OuterBoolean>(localVarStatusCode,
|
||||||
|
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
|
||||||
|
(OuterBoolean) Configuration.ApiClient.Deserialize(localVarResponse, typeof(OuterBoolean)));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Test serialization of outer boolean types
|
||||||
|
/// </summary>
|
||||||
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||||
|
/// <param name="body">Input boolean as post body (optional)</param>
|
||||||
|
/// <returns>Task of OuterBoolean</returns>
|
||||||
|
public async System.Threading.Tasks.Task<OuterBoolean> FakeOuterBooleanSerializeAsync (OuterBoolean body = null)
|
||||||
|
{
|
||||||
|
ApiResponse<OuterBoolean> localVarResponse = await FakeOuterBooleanSerializeAsyncWithHttpInfo(body);
|
||||||
|
return localVarResponse.Data;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Test serialization of outer boolean types
|
||||||
|
/// </summary>
|
||||||
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||||
|
/// <param name="body">Input boolean as post body (optional)</param>
|
||||||
|
/// <returns>Task of ApiResponse (OuterBoolean)</returns>
|
||||||
|
public async System.Threading.Tasks.Task<ApiResponse<OuterBoolean>> FakeOuterBooleanSerializeAsyncWithHttpInfo (OuterBoolean body = null)
|
||||||
|
{
|
||||||
|
|
||||||
|
var localVarPath = "./fake/outer/boolean";
|
||||||
|
var localVarPathParams = new Dictionary<String, String>();
|
||||||
|
var localVarQueryParams = new Dictionary<String, String>();
|
||||||
|
var localVarHeaderParams = new Dictionary<String, String>(Configuration.DefaultHeader);
|
||||||
|
var localVarFormParams = new Dictionary<String, String>();
|
||||||
|
var localVarFileParams = new Dictionary<String, FileParameter>();
|
||||||
|
Object localVarPostBody = null;
|
||||||
|
|
||||||
|
// to determine the Content-Type header
|
||||||
|
String[] localVarHttpContentTypes = new String[] {
|
||||||
|
};
|
||||||
|
String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
|
||||||
|
|
||||||
|
// to determine the Accept header
|
||||||
|
String[] localVarHttpHeaderAccepts = new String[] {
|
||||||
|
};
|
||||||
|
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
||||||
|
if (localVarHttpHeaderAccept != null)
|
||||||
|
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
|
||||||
|
|
||||||
|
if (body != null && body.GetType() != typeof(byte[]))
|
||||||
|
{
|
||||||
|
localVarPostBody = Configuration.ApiClient.Serialize(body); // http body (model) parameter
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
localVarPostBody = body; // byte array
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// make the HTTP request
|
||||||
|
IRestResponse localVarResponse = (IRestResponse) await Configuration.ApiClient.CallApiAsync(localVarPath,
|
||||||
|
Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
|
||||||
|
localVarPathParams, localVarHttpContentType);
|
||||||
|
|
||||||
|
int localVarStatusCode = (int) localVarResponse.StatusCode;
|
||||||
|
|
||||||
|
if (ExceptionFactory != null)
|
||||||
|
{
|
||||||
|
Exception exception = ExceptionFactory("FakeOuterBooleanSerialize", localVarResponse);
|
||||||
|
if (exception != null) throw exception;
|
||||||
|
}
|
||||||
|
|
||||||
|
return new ApiResponse<OuterBoolean>(localVarStatusCode,
|
||||||
|
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
|
||||||
|
(OuterBoolean) Configuration.ApiClient.Deserialize(localVarResponse, typeof(OuterBoolean)));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Test serialization of object with outer number type
|
||||||
|
/// </summary>
|
||||||
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||||
|
/// <param name="body">Input composite as post body (optional)</param>
|
||||||
|
/// <returns>OuterComposite</returns>
|
||||||
|
public OuterComposite FakeOuterCompositeSerialize (OuterComposite body = null)
|
||||||
|
{
|
||||||
|
ApiResponse<OuterComposite> localVarResponse = FakeOuterCompositeSerializeWithHttpInfo(body);
|
||||||
|
return localVarResponse.Data;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Test serialization of object with outer number type
|
||||||
|
/// </summary>
|
||||||
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||||
|
/// <param name="body">Input composite as post body (optional)</param>
|
||||||
|
/// <returns>ApiResponse of OuterComposite</returns>
|
||||||
|
public ApiResponse< OuterComposite > FakeOuterCompositeSerializeWithHttpInfo (OuterComposite body = null)
|
||||||
|
{
|
||||||
|
|
||||||
|
var localVarPath = "./fake/outer/composite";
|
||||||
|
var localVarPathParams = new Dictionary<String, String>();
|
||||||
|
var localVarQueryParams = new Dictionary<String, String>();
|
||||||
|
var localVarHeaderParams = new Dictionary<String, String>(Configuration.DefaultHeader);
|
||||||
|
var localVarFormParams = new Dictionary<String, String>();
|
||||||
|
var localVarFileParams = new Dictionary<String, FileParameter>();
|
||||||
|
Object localVarPostBody = null;
|
||||||
|
|
||||||
|
// to determine the Content-Type header
|
||||||
|
String[] localVarHttpContentTypes = new String[] {
|
||||||
|
};
|
||||||
|
String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
|
||||||
|
|
||||||
|
// to determine the Accept header
|
||||||
|
String[] localVarHttpHeaderAccepts = new String[] {
|
||||||
|
};
|
||||||
|
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
||||||
|
if (localVarHttpHeaderAccept != null)
|
||||||
|
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
|
||||||
|
|
||||||
|
if (body != null && body.GetType() != typeof(byte[]))
|
||||||
|
{
|
||||||
|
localVarPostBody = Configuration.ApiClient.Serialize(body); // http body (model) parameter
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
localVarPostBody = body; // byte array
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// make the HTTP request
|
||||||
|
IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath,
|
||||||
|
Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
|
||||||
|
localVarPathParams, localVarHttpContentType);
|
||||||
|
|
||||||
|
int localVarStatusCode = (int) localVarResponse.StatusCode;
|
||||||
|
|
||||||
|
if (ExceptionFactory != null)
|
||||||
|
{
|
||||||
|
Exception exception = ExceptionFactory("FakeOuterCompositeSerialize", localVarResponse);
|
||||||
|
if (exception != null) throw exception;
|
||||||
|
}
|
||||||
|
|
||||||
|
return new ApiResponse<OuterComposite>(localVarStatusCode,
|
||||||
|
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
|
||||||
|
(OuterComposite) Configuration.ApiClient.Deserialize(localVarResponse, typeof(OuterComposite)));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Test serialization of object with outer number type
|
||||||
|
/// </summary>
|
||||||
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||||
|
/// <param name="body">Input composite as post body (optional)</param>
|
||||||
|
/// <returns>Task of OuterComposite</returns>
|
||||||
|
public async System.Threading.Tasks.Task<OuterComposite> FakeOuterCompositeSerializeAsync (OuterComposite body = null)
|
||||||
|
{
|
||||||
|
ApiResponse<OuterComposite> localVarResponse = await FakeOuterCompositeSerializeAsyncWithHttpInfo(body);
|
||||||
|
return localVarResponse.Data;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Test serialization of object with outer number type
|
||||||
|
/// </summary>
|
||||||
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||||
|
/// <param name="body">Input composite as post body (optional)</param>
|
||||||
|
/// <returns>Task of ApiResponse (OuterComposite)</returns>
|
||||||
|
public async System.Threading.Tasks.Task<ApiResponse<OuterComposite>> FakeOuterCompositeSerializeAsyncWithHttpInfo (OuterComposite body = null)
|
||||||
|
{
|
||||||
|
|
||||||
|
var localVarPath = "./fake/outer/composite";
|
||||||
|
var localVarPathParams = new Dictionary<String, String>();
|
||||||
|
var localVarQueryParams = new Dictionary<String, String>();
|
||||||
|
var localVarHeaderParams = new Dictionary<String, String>(Configuration.DefaultHeader);
|
||||||
|
var localVarFormParams = new Dictionary<String, String>();
|
||||||
|
var localVarFileParams = new Dictionary<String, FileParameter>();
|
||||||
|
Object localVarPostBody = null;
|
||||||
|
|
||||||
|
// to determine the Content-Type header
|
||||||
|
String[] localVarHttpContentTypes = new String[] {
|
||||||
|
};
|
||||||
|
String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
|
||||||
|
|
||||||
|
// to determine the Accept header
|
||||||
|
String[] localVarHttpHeaderAccepts = new String[] {
|
||||||
|
};
|
||||||
|
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
||||||
|
if (localVarHttpHeaderAccept != null)
|
||||||
|
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
|
||||||
|
|
||||||
|
if (body != null && body.GetType() != typeof(byte[]))
|
||||||
|
{
|
||||||
|
localVarPostBody = Configuration.ApiClient.Serialize(body); // http body (model) parameter
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
localVarPostBody = body; // byte array
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// make the HTTP request
|
||||||
|
IRestResponse localVarResponse = (IRestResponse) await Configuration.ApiClient.CallApiAsync(localVarPath,
|
||||||
|
Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
|
||||||
|
localVarPathParams, localVarHttpContentType);
|
||||||
|
|
||||||
|
int localVarStatusCode = (int) localVarResponse.StatusCode;
|
||||||
|
|
||||||
|
if (ExceptionFactory != null)
|
||||||
|
{
|
||||||
|
Exception exception = ExceptionFactory("FakeOuterCompositeSerialize", localVarResponse);
|
||||||
|
if (exception != null) throw exception;
|
||||||
|
}
|
||||||
|
|
||||||
|
return new ApiResponse<OuterComposite>(localVarStatusCode,
|
||||||
|
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
|
||||||
|
(OuterComposite) Configuration.ApiClient.Deserialize(localVarResponse, typeof(OuterComposite)));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Test serialization of outer number types
|
||||||
|
/// </summary>
|
||||||
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||||
|
/// <param name="body">Input number as post body (optional)</param>
|
||||||
|
/// <returns>OuterNumber</returns>
|
||||||
|
public OuterNumber FakeOuterNumberSerialize (OuterNumber body = null)
|
||||||
|
{
|
||||||
|
ApiResponse<OuterNumber> localVarResponse = FakeOuterNumberSerializeWithHttpInfo(body);
|
||||||
|
return localVarResponse.Data;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Test serialization of outer number types
|
||||||
|
/// </summary>
|
||||||
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||||
|
/// <param name="body">Input number as post body (optional)</param>
|
||||||
|
/// <returns>ApiResponse of OuterNumber</returns>
|
||||||
|
public ApiResponse< OuterNumber > FakeOuterNumberSerializeWithHttpInfo (OuterNumber body = null)
|
||||||
|
{
|
||||||
|
|
||||||
|
var localVarPath = "./fake/outer/number";
|
||||||
|
var localVarPathParams = new Dictionary<String, String>();
|
||||||
|
var localVarQueryParams = new Dictionary<String, String>();
|
||||||
|
var localVarHeaderParams = new Dictionary<String, String>(Configuration.DefaultHeader);
|
||||||
|
var localVarFormParams = new Dictionary<String, String>();
|
||||||
|
var localVarFileParams = new Dictionary<String, FileParameter>();
|
||||||
|
Object localVarPostBody = null;
|
||||||
|
|
||||||
|
// to determine the Content-Type header
|
||||||
|
String[] localVarHttpContentTypes = new String[] {
|
||||||
|
};
|
||||||
|
String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
|
||||||
|
|
||||||
|
// to determine the Accept header
|
||||||
|
String[] localVarHttpHeaderAccepts = new String[] {
|
||||||
|
};
|
||||||
|
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
||||||
|
if (localVarHttpHeaderAccept != null)
|
||||||
|
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
|
||||||
|
|
||||||
|
if (body != null && body.GetType() != typeof(byte[]))
|
||||||
|
{
|
||||||
|
localVarPostBody = Configuration.ApiClient.Serialize(body); // http body (model) parameter
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
localVarPostBody = body; // byte array
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// make the HTTP request
|
||||||
|
IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath,
|
||||||
|
Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
|
||||||
|
localVarPathParams, localVarHttpContentType);
|
||||||
|
|
||||||
|
int localVarStatusCode = (int) localVarResponse.StatusCode;
|
||||||
|
|
||||||
|
if (ExceptionFactory != null)
|
||||||
|
{
|
||||||
|
Exception exception = ExceptionFactory("FakeOuterNumberSerialize", localVarResponse);
|
||||||
|
if (exception != null) throw exception;
|
||||||
|
}
|
||||||
|
|
||||||
|
return new ApiResponse<OuterNumber>(localVarStatusCode,
|
||||||
|
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
|
||||||
|
(OuterNumber) Configuration.ApiClient.Deserialize(localVarResponse, typeof(OuterNumber)));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Test serialization of outer number types
|
||||||
|
/// </summary>
|
||||||
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||||
|
/// <param name="body">Input number as post body (optional)</param>
|
||||||
|
/// <returns>Task of OuterNumber</returns>
|
||||||
|
public async System.Threading.Tasks.Task<OuterNumber> FakeOuterNumberSerializeAsync (OuterNumber body = null)
|
||||||
|
{
|
||||||
|
ApiResponse<OuterNumber> localVarResponse = await FakeOuterNumberSerializeAsyncWithHttpInfo(body);
|
||||||
|
return localVarResponse.Data;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Test serialization of outer number types
|
||||||
|
/// </summary>
|
||||||
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||||
|
/// <param name="body">Input number as post body (optional)</param>
|
||||||
|
/// <returns>Task of ApiResponse (OuterNumber)</returns>
|
||||||
|
public async System.Threading.Tasks.Task<ApiResponse<OuterNumber>> FakeOuterNumberSerializeAsyncWithHttpInfo (OuterNumber body = null)
|
||||||
|
{
|
||||||
|
|
||||||
|
var localVarPath = "./fake/outer/number";
|
||||||
|
var localVarPathParams = new Dictionary<String, String>();
|
||||||
|
var localVarQueryParams = new Dictionary<String, String>();
|
||||||
|
var localVarHeaderParams = new Dictionary<String, String>(Configuration.DefaultHeader);
|
||||||
|
var localVarFormParams = new Dictionary<String, String>();
|
||||||
|
var localVarFileParams = new Dictionary<String, FileParameter>();
|
||||||
|
Object localVarPostBody = null;
|
||||||
|
|
||||||
|
// to determine the Content-Type header
|
||||||
|
String[] localVarHttpContentTypes = new String[] {
|
||||||
|
};
|
||||||
|
String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
|
||||||
|
|
||||||
|
// to determine the Accept header
|
||||||
|
String[] localVarHttpHeaderAccepts = new String[] {
|
||||||
|
};
|
||||||
|
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
||||||
|
if (localVarHttpHeaderAccept != null)
|
||||||
|
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
|
||||||
|
|
||||||
|
if (body != null && body.GetType() != typeof(byte[]))
|
||||||
|
{
|
||||||
|
localVarPostBody = Configuration.ApiClient.Serialize(body); // http body (model) parameter
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
localVarPostBody = body; // byte array
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// make the HTTP request
|
||||||
|
IRestResponse localVarResponse = (IRestResponse) await Configuration.ApiClient.CallApiAsync(localVarPath,
|
||||||
|
Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
|
||||||
|
localVarPathParams, localVarHttpContentType);
|
||||||
|
|
||||||
|
int localVarStatusCode = (int) localVarResponse.StatusCode;
|
||||||
|
|
||||||
|
if (ExceptionFactory != null)
|
||||||
|
{
|
||||||
|
Exception exception = ExceptionFactory("FakeOuterNumberSerialize", localVarResponse);
|
||||||
|
if (exception != null) throw exception;
|
||||||
|
}
|
||||||
|
|
||||||
|
return new ApiResponse<OuterNumber>(localVarStatusCode,
|
||||||
|
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
|
||||||
|
(OuterNumber) Configuration.ApiClient.Deserialize(localVarResponse, typeof(OuterNumber)));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Test serialization of outer string types
|
||||||
|
/// </summary>
|
||||||
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||||
|
/// <param name="body">Input string as post body (optional)</param>
|
||||||
|
/// <returns>OuterString</returns>
|
||||||
|
public OuterString FakeOuterStringSerialize (OuterString body = null)
|
||||||
|
{
|
||||||
|
ApiResponse<OuterString> localVarResponse = FakeOuterStringSerializeWithHttpInfo(body);
|
||||||
|
return localVarResponse.Data;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Test serialization of outer string types
|
||||||
|
/// </summary>
|
||||||
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||||
|
/// <param name="body">Input string as post body (optional)</param>
|
||||||
|
/// <returns>ApiResponse of OuterString</returns>
|
||||||
|
public ApiResponse< OuterString > FakeOuterStringSerializeWithHttpInfo (OuterString body = null)
|
||||||
|
{
|
||||||
|
|
||||||
|
var localVarPath = "./fake/outer/string";
|
||||||
|
var localVarPathParams = new Dictionary<String, String>();
|
||||||
|
var localVarQueryParams = new Dictionary<String, String>();
|
||||||
|
var localVarHeaderParams = new Dictionary<String, String>(Configuration.DefaultHeader);
|
||||||
|
var localVarFormParams = new Dictionary<String, String>();
|
||||||
|
var localVarFileParams = new Dictionary<String, FileParameter>();
|
||||||
|
Object localVarPostBody = null;
|
||||||
|
|
||||||
|
// to determine the Content-Type header
|
||||||
|
String[] localVarHttpContentTypes = new String[] {
|
||||||
|
};
|
||||||
|
String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
|
||||||
|
|
||||||
|
// to determine the Accept header
|
||||||
|
String[] localVarHttpHeaderAccepts = new String[] {
|
||||||
|
};
|
||||||
|
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
||||||
|
if (localVarHttpHeaderAccept != null)
|
||||||
|
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
|
||||||
|
|
||||||
|
if (body != null && body.GetType() != typeof(byte[]))
|
||||||
|
{
|
||||||
|
localVarPostBody = Configuration.ApiClient.Serialize(body); // http body (model) parameter
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
localVarPostBody = body; // byte array
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// make the HTTP request
|
||||||
|
IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath,
|
||||||
|
Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
|
||||||
|
localVarPathParams, localVarHttpContentType);
|
||||||
|
|
||||||
|
int localVarStatusCode = (int) localVarResponse.StatusCode;
|
||||||
|
|
||||||
|
if (ExceptionFactory != null)
|
||||||
|
{
|
||||||
|
Exception exception = ExceptionFactory("FakeOuterStringSerialize", localVarResponse);
|
||||||
|
if (exception != null) throw exception;
|
||||||
|
}
|
||||||
|
|
||||||
|
return new ApiResponse<OuterString>(localVarStatusCode,
|
||||||
|
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
|
||||||
|
(OuterString) Configuration.ApiClient.Deserialize(localVarResponse, typeof(OuterString)));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Test serialization of outer string types
|
||||||
|
/// </summary>
|
||||||
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||||
|
/// <param name="body">Input string as post body (optional)</param>
|
||||||
|
/// <returns>Task of OuterString</returns>
|
||||||
|
public async System.Threading.Tasks.Task<OuterString> FakeOuterStringSerializeAsync (OuterString body = null)
|
||||||
|
{
|
||||||
|
ApiResponse<OuterString> localVarResponse = await FakeOuterStringSerializeAsyncWithHttpInfo(body);
|
||||||
|
return localVarResponse.Data;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Test serialization of outer string types
|
||||||
|
/// </summary>
|
||||||
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||||
|
/// <param name="body">Input string as post body (optional)</param>
|
||||||
|
/// <returns>Task of ApiResponse (OuterString)</returns>
|
||||||
|
public async System.Threading.Tasks.Task<ApiResponse<OuterString>> FakeOuterStringSerializeAsyncWithHttpInfo (OuterString body = null)
|
||||||
|
{
|
||||||
|
|
||||||
|
var localVarPath = "./fake/outer/string";
|
||||||
|
var localVarPathParams = new Dictionary<String, String>();
|
||||||
|
var localVarQueryParams = new Dictionary<String, String>();
|
||||||
|
var localVarHeaderParams = new Dictionary<String, String>(Configuration.DefaultHeader);
|
||||||
|
var localVarFormParams = new Dictionary<String, String>();
|
||||||
|
var localVarFileParams = new Dictionary<String, FileParameter>();
|
||||||
|
Object localVarPostBody = null;
|
||||||
|
|
||||||
|
// to determine the Content-Type header
|
||||||
|
String[] localVarHttpContentTypes = new String[] {
|
||||||
|
};
|
||||||
|
String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
|
||||||
|
|
||||||
|
// to determine the Accept header
|
||||||
|
String[] localVarHttpHeaderAccepts = new String[] {
|
||||||
|
};
|
||||||
|
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
||||||
|
if (localVarHttpHeaderAccept != null)
|
||||||
|
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
|
||||||
|
|
||||||
|
if (body != null && body.GetType() != typeof(byte[]))
|
||||||
|
{
|
||||||
|
localVarPostBody = Configuration.ApiClient.Serialize(body); // http body (model) parameter
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
localVarPostBody = body; // byte array
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// make the HTTP request
|
||||||
|
IRestResponse localVarResponse = (IRestResponse) await Configuration.ApiClient.CallApiAsync(localVarPath,
|
||||||
|
Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
|
||||||
|
localVarPathParams, localVarHttpContentType);
|
||||||
|
|
||||||
|
int localVarStatusCode = (int) localVarResponse.StatusCode;
|
||||||
|
|
||||||
|
if (ExceptionFactory != null)
|
||||||
|
{
|
||||||
|
Exception exception = ExceptionFactory("FakeOuterStringSerialize", localVarResponse);
|
||||||
|
if (exception != null) throw exception;
|
||||||
|
}
|
||||||
|
|
||||||
|
return new ApiResponse<OuterString>(localVarStatusCode,
|
||||||
|
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
|
||||||
|
(OuterString) Configuration.ApiClient.Deserialize(localVarResponse, typeof(OuterString)));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// To test \"client\" model To test \"client\" model
|
/// To test \"client\" model To test \"client\" model
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -416,7 +1148,6 @@ namespace IO.Swagger.Api
|
|||||||
return new ApiResponse<ModelClient>(localVarStatusCode,
|
return new ApiResponse<ModelClient>(localVarStatusCode,
|
||||||
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
|
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
|
||||||
(ModelClient) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ModelClient)));
|
(ModelClient) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ModelClient)));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -492,7 +1223,6 @@ namespace IO.Swagger.Api
|
|||||||
return new ApiResponse<ModelClient>(localVarStatusCode,
|
return new ApiResponse<ModelClient>(localVarStatusCode,
|
||||||
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
|
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
|
||||||
(ModelClient) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ModelClient)));
|
(ModelClient) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ModelClient)));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -613,7 +1343,6 @@ namespace IO.Swagger.Api
|
|||||||
if (exception != null) throw exception;
|
if (exception != null) throw exception;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return new ApiResponse<Object>(localVarStatusCode,
|
return new ApiResponse<Object>(localVarStatusCode,
|
||||||
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
|
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
|
||||||
null);
|
null);
|
||||||
@ -737,7 +1466,6 @@ namespace IO.Swagger.Api
|
|||||||
if (exception != null) throw exception;
|
if (exception != null) throw exception;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return new ApiResponse<Object>(localVarStatusCode,
|
return new ApiResponse<Object>(localVarStatusCode,
|
||||||
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
|
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
|
||||||
null);
|
null);
|
||||||
@ -822,7 +1550,6 @@ namespace IO.Swagger.Api
|
|||||||
if (exception != null) throw exception;
|
if (exception != null) throw exception;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return new ApiResponse<Object>(localVarStatusCode,
|
return new ApiResponse<Object>(localVarStatusCode,
|
||||||
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
|
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
|
||||||
null);
|
null);
|
||||||
@ -908,7 +1635,6 @@ namespace IO.Swagger.Api
|
|||||||
if (exception != null) throw exception;
|
if (exception != null) throw exception;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return new ApiResponse<Object>(localVarStatusCode,
|
return new ApiResponse<Object>(localVarStatusCode,
|
||||||
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
|
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
|
||||||
null);
|
null);
|
||||||
|
@ -570,7 +570,6 @@ namespace IO.Swagger.Api
|
|||||||
if (exception != null) throw exception;
|
if (exception != null) throw exception;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return new ApiResponse<Object>(localVarStatusCode,
|
return new ApiResponse<Object>(localVarStatusCode,
|
||||||
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
|
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
|
||||||
null);
|
null);
|
||||||
@ -653,7 +652,6 @@ namespace IO.Swagger.Api
|
|||||||
if (exception != null) throw exception;
|
if (exception != null) throw exception;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return new ApiResponse<Object>(localVarStatusCode,
|
return new ApiResponse<Object>(localVarStatusCode,
|
||||||
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
|
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
|
||||||
null);
|
null);
|
||||||
@ -729,7 +727,6 @@ namespace IO.Swagger.Api
|
|||||||
if (exception != null) throw exception;
|
if (exception != null) throw exception;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return new ApiResponse<Object>(localVarStatusCode,
|
return new ApiResponse<Object>(localVarStatusCode,
|
||||||
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
|
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
|
||||||
null);
|
null);
|
||||||
@ -806,7 +803,6 @@ namespace IO.Swagger.Api
|
|||||||
if (exception != null) throw exception;
|
if (exception != null) throw exception;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return new ApiResponse<Object>(localVarStatusCode,
|
return new ApiResponse<Object>(localVarStatusCode,
|
||||||
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
|
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
|
||||||
null);
|
null);
|
||||||
@ -883,7 +879,6 @@ namespace IO.Swagger.Api
|
|||||||
return new ApiResponse<List<Pet>>(localVarStatusCode,
|
return new ApiResponse<List<Pet>>(localVarStatusCode,
|
||||||
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
|
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
|
||||||
(List<Pet>) Configuration.ApiClient.Deserialize(localVarResponse, typeof(List<Pet>)));
|
(List<Pet>) Configuration.ApiClient.Deserialize(localVarResponse, typeof(List<Pet>)));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -958,7 +953,6 @@ namespace IO.Swagger.Api
|
|||||||
return new ApiResponse<List<Pet>>(localVarStatusCode,
|
return new ApiResponse<List<Pet>>(localVarStatusCode,
|
||||||
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
|
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
|
||||||
(List<Pet>) Configuration.ApiClient.Deserialize(localVarResponse, typeof(List<Pet>)));
|
(List<Pet>) Configuration.ApiClient.Deserialize(localVarResponse, typeof(List<Pet>)));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -1032,7 +1026,6 @@ namespace IO.Swagger.Api
|
|||||||
return new ApiResponse<List<Pet>>(localVarStatusCode,
|
return new ApiResponse<List<Pet>>(localVarStatusCode,
|
||||||
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
|
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
|
||||||
(List<Pet>) Configuration.ApiClient.Deserialize(localVarResponse, typeof(List<Pet>)));
|
(List<Pet>) Configuration.ApiClient.Deserialize(localVarResponse, typeof(List<Pet>)));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -1107,7 +1100,6 @@ namespace IO.Swagger.Api
|
|||||||
return new ApiResponse<List<Pet>>(localVarStatusCode,
|
return new ApiResponse<List<Pet>>(localVarStatusCode,
|
||||||
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
|
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
|
||||||
(List<Pet>) Configuration.ApiClient.Deserialize(localVarResponse, typeof(List<Pet>)));
|
(List<Pet>) Configuration.ApiClient.Deserialize(localVarResponse, typeof(List<Pet>)));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -1181,7 +1173,6 @@ namespace IO.Swagger.Api
|
|||||||
return new ApiResponse<Pet>(localVarStatusCode,
|
return new ApiResponse<Pet>(localVarStatusCode,
|
||||||
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
|
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
|
||||||
(Pet) Configuration.ApiClient.Deserialize(localVarResponse, typeof(Pet)));
|
(Pet) Configuration.ApiClient.Deserialize(localVarResponse, typeof(Pet)));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -1255,7 +1246,6 @@ namespace IO.Swagger.Api
|
|||||||
return new ApiResponse<Pet>(localVarStatusCode,
|
return new ApiResponse<Pet>(localVarStatusCode,
|
||||||
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
|
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
|
||||||
(Pet) Configuration.ApiClient.Deserialize(localVarResponse, typeof(Pet)));
|
(Pet) Configuration.ApiClient.Deserialize(localVarResponse, typeof(Pet)));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -1334,7 +1324,6 @@ namespace IO.Swagger.Api
|
|||||||
if (exception != null) throw exception;
|
if (exception != null) throw exception;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return new ApiResponse<Object>(localVarStatusCode,
|
return new ApiResponse<Object>(localVarStatusCode,
|
||||||
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
|
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
|
||||||
null);
|
null);
|
||||||
@ -1417,7 +1406,6 @@ namespace IO.Swagger.Api
|
|||||||
if (exception != null) throw exception;
|
if (exception != null) throw exception;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return new ApiResponse<Object>(localVarStatusCode,
|
return new ApiResponse<Object>(localVarStatusCode,
|
||||||
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
|
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
|
||||||
null);
|
null);
|
||||||
@ -1497,7 +1485,6 @@ namespace IO.Swagger.Api
|
|||||||
if (exception != null) throw exception;
|
if (exception != null) throw exception;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return new ApiResponse<Object>(localVarStatusCode,
|
return new ApiResponse<Object>(localVarStatusCode,
|
||||||
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
|
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
|
||||||
null);
|
null);
|
||||||
@ -1578,7 +1565,6 @@ namespace IO.Swagger.Api
|
|||||||
if (exception != null) throw exception;
|
if (exception != null) throw exception;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return new ApiResponse<Object>(localVarStatusCode,
|
return new ApiResponse<Object>(localVarStatusCode,
|
||||||
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
|
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
|
||||||
null);
|
null);
|
||||||
@ -1661,7 +1647,6 @@ namespace IO.Swagger.Api
|
|||||||
return new ApiResponse<ApiResponse>(localVarStatusCode,
|
return new ApiResponse<ApiResponse>(localVarStatusCode,
|
||||||
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
|
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
|
||||||
(ApiResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ApiResponse)));
|
(ApiResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ApiResponse)));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -1742,7 +1727,6 @@ namespace IO.Swagger.Api
|
|||||||
return new ApiResponse<ApiResponse>(localVarStatusCode,
|
return new ApiResponse<ApiResponse>(localVarStatusCode,
|
||||||
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
|
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
|
||||||
(ApiResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ApiResponse)));
|
(ApiResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ApiResponse)));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -363,7 +363,6 @@ namespace IO.Swagger.Api
|
|||||||
if (exception != null) throw exception;
|
if (exception != null) throw exception;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return new ApiResponse<Object>(localVarStatusCode,
|
return new ApiResponse<Object>(localVarStatusCode,
|
||||||
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
|
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
|
||||||
null);
|
null);
|
||||||
@ -431,7 +430,6 @@ namespace IO.Swagger.Api
|
|||||||
if (exception != null) throw exception;
|
if (exception != null) throw exception;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return new ApiResponse<Object>(localVarStatusCode,
|
return new ApiResponse<Object>(localVarStatusCode,
|
||||||
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
|
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
|
||||||
null);
|
null);
|
||||||
@ -501,7 +499,6 @@ namespace IO.Swagger.Api
|
|||||||
return new ApiResponse<Dictionary<string, int?>>(localVarStatusCode,
|
return new ApiResponse<Dictionary<string, int?>>(localVarStatusCode,
|
||||||
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
|
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
|
||||||
(Dictionary<string, int?>) Configuration.ApiClient.Deserialize(localVarResponse, typeof(Dictionary<string, int?>)));
|
(Dictionary<string, int?>) Configuration.ApiClient.Deserialize(localVarResponse, typeof(Dictionary<string, int?>)));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -568,7 +565,6 @@ namespace IO.Swagger.Api
|
|||||||
return new ApiResponse<Dictionary<string, int?>>(localVarStatusCode,
|
return new ApiResponse<Dictionary<string, int?>>(localVarStatusCode,
|
||||||
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
|
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
|
||||||
(Dictionary<string, int?>) Configuration.ApiClient.Deserialize(localVarResponse, typeof(Dictionary<string, int?>)));
|
(Dictionary<string, int?>) Configuration.ApiClient.Deserialize(localVarResponse, typeof(Dictionary<string, int?>)));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -636,7 +632,6 @@ namespace IO.Swagger.Api
|
|||||||
return new ApiResponse<Order>(localVarStatusCode,
|
return new ApiResponse<Order>(localVarStatusCode,
|
||||||
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
|
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
|
||||||
(Order) Configuration.ApiClient.Deserialize(localVarResponse, typeof(Order)));
|
(Order) Configuration.ApiClient.Deserialize(localVarResponse, typeof(Order)));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -705,7 +700,6 @@ namespace IO.Swagger.Api
|
|||||||
return new ApiResponse<Order>(localVarStatusCode,
|
return new ApiResponse<Order>(localVarStatusCode,
|
||||||
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
|
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
|
||||||
(Order) Configuration.ApiClient.Deserialize(localVarResponse, typeof(Order)));
|
(Order) Configuration.ApiClient.Deserialize(localVarResponse, typeof(Order)));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -780,7 +774,6 @@ namespace IO.Swagger.Api
|
|||||||
return new ApiResponse<Order>(localVarStatusCode,
|
return new ApiResponse<Order>(localVarStatusCode,
|
||||||
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
|
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
|
||||||
(Order) Configuration.ApiClient.Deserialize(localVarResponse, typeof(Order)));
|
(Order) Configuration.ApiClient.Deserialize(localVarResponse, typeof(Order)));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -856,7 +849,6 @@ namespace IO.Swagger.Api
|
|||||||
return new ApiResponse<Order>(localVarStatusCode,
|
return new ApiResponse<Order>(localVarStatusCode,
|
||||||
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
|
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
|
||||||
(Order) Configuration.ApiClient.Deserialize(localVarResponse, typeof(Order)));
|
(Order) Configuration.ApiClient.Deserialize(localVarResponse, typeof(Order)));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -546,7 +546,6 @@ namespace IO.Swagger.Api
|
|||||||
if (exception != null) throw exception;
|
if (exception != null) throw exception;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return new ApiResponse<Object>(localVarStatusCode,
|
return new ApiResponse<Object>(localVarStatusCode,
|
||||||
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
|
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
|
||||||
null);
|
null);
|
||||||
@ -621,7 +620,6 @@ namespace IO.Swagger.Api
|
|||||||
if (exception != null) throw exception;
|
if (exception != null) throw exception;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return new ApiResponse<Object>(localVarStatusCode,
|
return new ApiResponse<Object>(localVarStatusCode,
|
||||||
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
|
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
|
||||||
null);
|
null);
|
||||||
@ -695,7 +693,6 @@ namespace IO.Swagger.Api
|
|||||||
if (exception != null) throw exception;
|
if (exception != null) throw exception;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return new ApiResponse<Object>(localVarStatusCode,
|
return new ApiResponse<Object>(localVarStatusCode,
|
||||||
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
|
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
|
||||||
null);
|
null);
|
||||||
@ -770,7 +767,6 @@ namespace IO.Swagger.Api
|
|||||||
if (exception != null) throw exception;
|
if (exception != null) throw exception;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return new ApiResponse<Object>(localVarStatusCode,
|
return new ApiResponse<Object>(localVarStatusCode,
|
||||||
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
|
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
|
||||||
null);
|
null);
|
||||||
@ -844,7 +840,6 @@ namespace IO.Swagger.Api
|
|||||||
if (exception != null) throw exception;
|
if (exception != null) throw exception;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return new ApiResponse<Object>(localVarStatusCode,
|
return new ApiResponse<Object>(localVarStatusCode,
|
||||||
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
|
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
|
||||||
null);
|
null);
|
||||||
@ -919,7 +914,6 @@ namespace IO.Swagger.Api
|
|||||||
if (exception != null) throw exception;
|
if (exception != null) throw exception;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return new ApiResponse<Object>(localVarStatusCode,
|
return new ApiResponse<Object>(localVarStatusCode,
|
||||||
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
|
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
|
||||||
null);
|
null);
|
||||||
@ -986,7 +980,6 @@ namespace IO.Swagger.Api
|
|||||||
if (exception != null) throw exception;
|
if (exception != null) throw exception;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return new ApiResponse<Object>(localVarStatusCode,
|
return new ApiResponse<Object>(localVarStatusCode,
|
||||||
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
|
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
|
||||||
null);
|
null);
|
||||||
@ -1054,7 +1047,6 @@ namespace IO.Swagger.Api
|
|||||||
if (exception != null) throw exception;
|
if (exception != null) throw exception;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return new ApiResponse<Object>(localVarStatusCode,
|
return new ApiResponse<Object>(localVarStatusCode,
|
||||||
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
|
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
|
||||||
null);
|
null);
|
||||||
@ -1125,7 +1117,6 @@ namespace IO.Swagger.Api
|
|||||||
return new ApiResponse<User>(localVarStatusCode,
|
return new ApiResponse<User>(localVarStatusCode,
|
||||||
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
|
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
|
||||||
(User) Configuration.ApiClient.Deserialize(localVarResponse, typeof(User)));
|
(User) Configuration.ApiClient.Deserialize(localVarResponse, typeof(User)));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -1194,7 +1185,6 @@ namespace IO.Swagger.Api
|
|||||||
return new ApiResponse<User>(localVarStatusCode,
|
return new ApiResponse<User>(localVarStatusCode,
|
||||||
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
|
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
|
||||||
(User) Configuration.ApiClient.Deserialize(localVarResponse, typeof(User)));
|
(User) Configuration.ApiClient.Deserialize(localVarResponse, typeof(User)));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -1268,7 +1258,6 @@ namespace IO.Swagger.Api
|
|||||||
return new ApiResponse<string>(localVarStatusCode,
|
return new ApiResponse<string>(localVarStatusCode,
|
||||||
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
|
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
|
||||||
(string) Configuration.ApiClient.Deserialize(localVarResponse, typeof(string)));
|
(string) Configuration.ApiClient.Deserialize(localVarResponse, typeof(string)));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -1343,7 +1332,6 @@ namespace IO.Swagger.Api
|
|||||||
return new ApiResponse<string>(localVarStatusCode,
|
return new ApiResponse<string>(localVarStatusCode,
|
||||||
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
|
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
|
||||||
(string) Configuration.ApiClient.Deserialize(localVarResponse, typeof(string)));
|
(string) Configuration.ApiClient.Deserialize(localVarResponse, typeof(string)));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -1401,7 +1389,6 @@ namespace IO.Swagger.Api
|
|||||||
if (exception != null) throw exception;
|
if (exception != null) throw exception;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return new ApiResponse<Object>(localVarStatusCode,
|
return new ApiResponse<Object>(localVarStatusCode,
|
||||||
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
|
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
|
||||||
null);
|
null);
|
||||||
@ -1463,7 +1450,6 @@ namespace IO.Swagger.Api
|
|||||||
if (exception != null) throw exception;
|
if (exception != null) throw exception;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return new ApiResponse<Object>(localVarStatusCode,
|
return new ApiResponse<Object>(localVarStatusCode,
|
||||||
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
|
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
|
||||||
null);
|
null);
|
||||||
@ -1543,7 +1529,6 @@ namespace IO.Swagger.Api
|
|||||||
if (exception != null) throw exception;
|
if (exception != null) throw exception;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return new ApiResponse<Object>(localVarStatusCode,
|
return new ApiResponse<Object>(localVarStatusCode,
|
||||||
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
|
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
|
||||||
null);
|
null);
|
||||||
@ -1624,7 +1609,6 @@ namespace IO.Swagger.Api
|
|||||||
if (exception != null) throw exception;
|
if (exception != null) throw exception;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return new ApiResponse<Object>(localVarStatusCode,
|
return new ApiResponse<Object>(localVarStatusCode,
|
||||||
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
|
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
|
||||||
null);
|
null);
|
||||||
|
@ -115,6 +115,8 @@ namespace IO.Swagger.Client
|
|||||||
String contentType)
|
String contentType)
|
||||||
{
|
{
|
||||||
var request = new RestRequest(path, method);
|
var request = new RestRequest(path, method);
|
||||||
|
// disable ResetSharp.Portable built-in serialization
|
||||||
|
request.Serializer = null;
|
||||||
|
|
||||||
// add path parameter, if any
|
// add path parameter, if any
|
||||||
foreach(var param in pathParams)
|
foreach(var param in pathParams)
|
||||||
@ -142,11 +144,11 @@ namespace IO.Swagger.Client
|
|||||||
{
|
{
|
||||||
if (postBody.GetType() == typeof(String))
|
if (postBody.GetType() == typeof(String))
|
||||||
{
|
{
|
||||||
request.AddParameter("application/json", postBody, ParameterType.RequestBody);
|
request.AddParameter(new Parameter { Value = postBody, Type = ParameterType.RequestBody, ContentType = "application/json" });
|
||||||
}
|
}
|
||||||
else if (postBody.GetType() == typeof(byte[]))
|
else if (postBody.GetType() == typeof(byte[]))
|
||||||
{
|
{
|
||||||
request.AddParameter(contentType, postBody, ParameterType.RequestBody);
|
request.AddParameter(new Parameter { Value = postBody, Type = ParameterType.RequestBody, ContentType = contentType });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -43,10 +43,8 @@ Contact: apiteam@swagger.io
|
|||||||
<None Include="project.json" />
|
<None Include="project.json" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Include="Api\**\*.cs"/>
|
<Compile Include="**\*.cs"
|
||||||
<Compile Include="Client\**\*.cs"/>
|
Exclude="obj\**" />
|
||||||
<Compile Include="Model\**\*.cs"/>
|
|
||||||
<Compile Include="Properties\**\*.cs"/>
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\Portable\$(TargetFrameworkVersion)\Microsoft.Portable.CSharp.targets" />
|
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\Portable\$(TargetFrameworkVersion)\Microsoft.Portable.CSharp.targets" />
|
||||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||||
|
@ -69,17 +69,16 @@ namespace Example
|
|||||||
{
|
{
|
||||||
|
|
||||||
var apiInstance = new FakeApi();
|
var apiInstance = new FakeApi();
|
||||||
var body = new ModelClient(); // ModelClient | client model
|
var body = new OuterBoolean(); // OuterBoolean | Input boolean as post body (optional)
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
// To test \"client\" model
|
OuterBoolean result = apiInstance.FakeOuterBooleanSerialize(body);
|
||||||
ModelClient result = apiInstance.TestClientModel(body);
|
|
||||||
Debug.WriteLine(result);
|
Debug.WriteLine(result);
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
Debug.Print("Exception when calling FakeApi.TestClientModel: " + e.Message );
|
Debug.Print("Exception when calling FakeApi.FakeOuterBooleanSerialize: " + e.Message );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -93,6 +92,10 @@ All URIs are relative to *http://petstore.swagger.io:80/v2*
|
|||||||
|
|
||||||
Class | Method | HTTP request | Description
|
Class | Method | HTTP request | Description
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
|
*FakeApi* | [**FakeOuterBooleanSerialize**](docs/FakeApi.md#fakeouterbooleanserialize) | **POST** /fake/outer/boolean |
|
||||||
|
*FakeApi* | [**FakeOuterCompositeSerialize**](docs/FakeApi.md#fakeoutercompositeserialize) | **POST** /fake/outer/composite |
|
||||||
|
*FakeApi* | [**FakeOuterNumberSerialize**](docs/FakeApi.md#fakeouternumberserialize) | **POST** /fake/outer/number |
|
||||||
|
*FakeApi* | [**FakeOuterStringSerialize**](docs/FakeApi.md#fakeouterstringserialize) | **POST** /fake/outer/string |
|
||||||
*FakeApi* | [**TestClientModel**](docs/FakeApi.md#testclientmodel) | **PATCH** /fake | To test \"client\" model
|
*FakeApi* | [**TestClientModel**](docs/FakeApi.md#testclientmodel) | **PATCH** /fake | To test \"client\" model
|
||||||
*FakeApi* | [**TestEndpointParameters**](docs/FakeApi.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
*FakeApi* | [**TestEndpointParameters**](docs/FakeApi.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||||
*FakeApi* | [**TestEnumParameters**](docs/FakeApi.md#testenumparameters) | **GET** /fake | To test enum parameters
|
*FakeApi* | [**TestEnumParameters**](docs/FakeApi.md#testenumparameters) | **GET** /fake | To test enum parameters
|
||||||
@ -148,7 +151,11 @@ Class | Method | HTTP request | Description
|
|||||||
- [Model.Name](docs/Name.md)
|
- [Model.Name](docs/Name.md)
|
||||||
- [Model.NumberOnly](docs/NumberOnly.md)
|
- [Model.NumberOnly](docs/NumberOnly.md)
|
||||||
- [Model.Order](docs/Order.md)
|
- [Model.Order](docs/Order.md)
|
||||||
|
- [Model.OuterBoolean](docs/OuterBoolean.md)
|
||||||
|
- [Model.OuterComposite](docs/OuterComposite.md)
|
||||||
- [Model.OuterEnum](docs/OuterEnum.md)
|
- [Model.OuterEnum](docs/OuterEnum.md)
|
||||||
|
- [Model.OuterNumber](docs/OuterNumber.md)
|
||||||
|
- [Model.OuterString](docs/OuterString.md)
|
||||||
- [Model.Pet](docs/Pet.md)
|
- [Model.Pet](docs/Pet.md)
|
||||||
- [Model.ReadOnlyFirst](docs/ReadOnlyFirst.md)
|
- [Model.ReadOnlyFirst](docs/ReadOnlyFirst.md)
|
||||||
- [Model.SpecialModelName](docs/SpecialModelName.md)
|
- [Model.SpecialModelName](docs/SpecialModelName.md)
|
||||||
|
@ -4,11 +4,259 @@ All URIs are relative to *http://petstore.swagger.io:80/v2*
|
|||||||
|
|
||||||
Method | HTTP request | Description
|
Method | HTTP request | Description
|
||||||
------------- | ------------- | -------------
|
------------- | ------------- | -------------
|
||||||
|
[**FakeOuterBooleanSerialize**](FakeApi.md#fakeouterbooleanserialize) | **POST** /fake/outer/boolean |
|
||||||
|
[**FakeOuterCompositeSerialize**](FakeApi.md#fakeoutercompositeserialize) | **POST** /fake/outer/composite |
|
||||||
|
[**FakeOuterNumberSerialize**](FakeApi.md#fakeouternumberserialize) | **POST** /fake/outer/number |
|
||||||
|
[**FakeOuterStringSerialize**](FakeApi.md#fakeouterstringserialize) | **POST** /fake/outer/string |
|
||||||
[**TestClientModel**](FakeApi.md#testclientmodel) | **PATCH** /fake | To test \"client\" model
|
[**TestClientModel**](FakeApi.md#testclientmodel) | **PATCH** /fake | To test \"client\" model
|
||||||
[**TestEndpointParameters**](FakeApi.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
[**TestEndpointParameters**](FakeApi.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||||
[**TestEnumParameters**](FakeApi.md#testenumparameters) | **GET** /fake | To test enum parameters
|
[**TestEnumParameters**](FakeApi.md#testenumparameters) | **GET** /fake | To test enum parameters
|
||||||
|
|
||||||
|
|
||||||
|
<a name="fakeouterbooleanserialize"></a>
|
||||||
|
# **FakeOuterBooleanSerialize**
|
||||||
|
> OuterBoolean FakeOuterBooleanSerialize (OuterBoolean body = null)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Test serialization of outer boolean types
|
||||||
|
|
||||||
|
### Example
|
||||||
|
```csharp
|
||||||
|
using System;
|
||||||
|
using System.Diagnostics;
|
||||||
|
using IO.Swagger.Api;
|
||||||
|
using IO.Swagger.Client;
|
||||||
|
using IO.Swagger.Model;
|
||||||
|
|
||||||
|
namespace Example
|
||||||
|
{
|
||||||
|
public class FakeOuterBooleanSerializeExample
|
||||||
|
{
|
||||||
|
public void main()
|
||||||
|
{
|
||||||
|
|
||||||
|
var apiInstance = new FakeApi();
|
||||||
|
var body = new OuterBoolean(); // OuterBoolean | Input boolean as post body (optional)
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
OuterBoolean result = apiInstance.FakeOuterBooleanSerialize(body);
|
||||||
|
Debug.WriteLine(result);
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
Debug.Print("Exception when calling FakeApi.FakeOuterBooleanSerialize: " + e.Message );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**body** | [**OuterBoolean**](OuterBoolean.md)| Input boolean as post body | [optional]
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
[**OuterBoolean**](OuterBoolean.md)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
<a name="fakeoutercompositeserialize"></a>
|
||||||
|
# **FakeOuterCompositeSerialize**
|
||||||
|
> OuterComposite FakeOuterCompositeSerialize (OuterComposite body = null)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Test serialization of object with outer number type
|
||||||
|
|
||||||
|
### Example
|
||||||
|
```csharp
|
||||||
|
using System;
|
||||||
|
using System.Diagnostics;
|
||||||
|
using IO.Swagger.Api;
|
||||||
|
using IO.Swagger.Client;
|
||||||
|
using IO.Swagger.Model;
|
||||||
|
|
||||||
|
namespace Example
|
||||||
|
{
|
||||||
|
public class FakeOuterCompositeSerializeExample
|
||||||
|
{
|
||||||
|
public void main()
|
||||||
|
{
|
||||||
|
|
||||||
|
var apiInstance = new FakeApi();
|
||||||
|
var body = new OuterComposite(); // OuterComposite | Input composite as post body (optional)
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
OuterComposite result = apiInstance.FakeOuterCompositeSerialize(body);
|
||||||
|
Debug.WriteLine(result);
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
Debug.Print("Exception when calling FakeApi.FakeOuterCompositeSerialize: " + e.Message );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**body** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional]
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
[**OuterComposite**](OuterComposite.md)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
<a name="fakeouternumberserialize"></a>
|
||||||
|
# **FakeOuterNumberSerialize**
|
||||||
|
> OuterNumber FakeOuterNumberSerialize (OuterNumber body = null)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Test serialization of outer number types
|
||||||
|
|
||||||
|
### Example
|
||||||
|
```csharp
|
||||||
|
using System;
|
||||||
|
using System.Diagnostics;
|
||||||
|
using IO.Swagger.Api;
|
||||||
|
using IO.Swagger.Client;
|
||||||
|
using IO.Swagger.Model;
|
||||||
|
|
||||||
|
namespace Example
|
||||||
|
{
|
||||||
|
public class FakeOuterNumberSerializeExample
|
||||||
|
{
|
||||||
|
public void main()
|
||||||
|
{
|
||||||
|
|
||||||
|
var apiInstance = new FakeApi();
|
||||||
|
var body = new OuterNumber(); // OuterNumber | Input number as post body (optional)
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
OuterNumber result = apiInstance.FakeOuterNumberSerialize(body);
|
||||||
|
Debug.WriteLine(result);
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
Debug.Print("Exception when calling FakeApi.FakeOuterNumberSerialize: " + e.Message );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**body** | [**OuterNumber**](OuterNumber.md)| Input number as post body | [optional]
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
[**OuterNumber**](OuterNumber.md)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
<a name="fakeouterstringserialize"></a>
|
||||||
|
# **FakeOuterStringSerialize**
|
||||||
|
> OuterString FakeOuterStringSerialize (OuterString body = null)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Test serialization of outer string types
|
||||||
|
|
||||||
|
### Example
|
||||||
|
```csharp
|
||||||
|
using System;
|
||||||
|
using System.Diagnostics;
|
||||||
|
using IO.Swagger.Api;
|
||||||
|
using IO.Swagger.Client;
|
||||||
|
using IO.Swagger.Model;
|
||||||
|
|
||||||
|
namespace Example
|
||||||
|
{
|
||||||
|
public class FakeOuterStringSerializeExample
|
||||||
|
{
|
||||||
|
public void main()
|
||||||
|
{
|
||||||
|
|
||||||
|
var apiInstance = new FakeApi();
|
||||||
|
var body = new OuterString(); // OuterString | Input string as post body (optional)
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
OuterString result = apiInstance.FakeOuterStringSerialize(body);
|
||||||
|
Debug.WriteLine(result);
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
Debug.Print("Exception when calling FakeApi.FakeOuterStringSerialize: " + e.Message );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**body** | [**OuterString**](OuterString.md)| Input string as post body | [optional]
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
[**OuterString**](OuterString.md)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||||
|
|
||||||
<a name="testclientmodel"></a>
|
<a name="testclientmodel"></a>
|
||||||
# **TestClientModel**
|
# **TestClientModel**
|
||||||
> ModelClient TestClientModel (ModelClient body)
|
> ModelClient TestClientModel (ModelClient body)
|
||||||
|
@ -0,0 +1,8 @@
|
|||||||
|
# IO.Swagger.Model.OuterBoolean
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
@ -0,0 +1,11 @@
|
|||||||
|
# IO.Swagger.Model.OuterComposite
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**MyNumber** | [**OuterNumber**](OuterNumber.md) | | [optional]
|
||||||
|
**MyString** | [**OuterString**](OuterString.md) | | [optional]
|
||||||
|
**MyBoolean** | [**OuterBoolean**](OuterBoolean.md) | | [optional]
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
@ -0,0 +1,8 @@
|
|||||||
|
# IO.Swagger.Model.OuterNumber
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
@ -0,0 +1,8 @@
|
|||||||
|
# IO.Swagger.Model.OuterString
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
@ -0,0 +1,70 @@
|
|||||||
|
/*
|
||||||
|
* Swagger Petstore
|
||||||
|
*
|
||||||
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||||
|
*
|
||||||
|
* OpenAPI spec version: 1.0.0
|
||||||
|
* Contact: apiteam@swagger.io
|
||||||
|
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
using NUnit.Framework;
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using System.Linq;
|
||||||
|
using System.IO;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using IO.Swagger.Api;
|
||||||
|
using IO.Swagger.Model;
|
||||||
|
using IO.Swagger.Client;
|
||||||
|
using System.Reflection;
|
||||||
|
|
||||||
|
namespace IO.Swagger.Test
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Class for testing OuterBoolean
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// This file is automatically generated by Swagger Codegen.
|
||||||
|
/// Please update the test case below to test the model.
|
||||||
|
/// </remarks>
|
||||||
|
[TestFixture]
|
||||||
|
public class OuterBooleanTests
|
||||||
|
{
|
||||||
|
// TODO uncomment below to declare an instance variable for OuterBoolean
|
||||||
|
//private OuterBoolean instance;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Setup before each test
|
||||||
|
/// </summary>
|
||||||
|
[SetUp]
|
||||||
|
public void Init()
|
||||||
|
{
|
||||||
|
// TODO uncomment below to create an instance of OuterBoolean
|
||||||
|
//instance = new OuterBoolean();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Clean up after each test
|
||||||
|
/// </summary>
|
||||||
|
[TearDown]
|
||||||
|
public void Cleanup()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Test an instance of OuterBoolean
|
||||||
|
/// </summary>
|
||||||
|
[Test]
|
||||||
|
public void OuterBooleanInstanceTest()
|
||||||
|
{
|
||||||
|
// TODO uncomment below to test "IsInstanceOfType" OuterBoolean
|
||||||
|
//Assert.IsInstanceOfType<OuterBoolean> (instance, "variable 'instance' is a OuterBoolean");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,94 @@
|
|||||||
|
/*
|
||||||
|
* Swagger Petstore
|
||||||
|
*
|
||||||
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||||
|
*
|
||||||
|
* OpenAPI spec version: 1.0.0
|
||||||
|
* Contact: apiteam@swagger.io
|
||||||
|
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
using NUnit.Framework;
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using System.Linq;
|
||||||
|
using System.IO;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using IO.Swagger.Api;
|
||||||
|
using IO.Swagger.Model;
|
||||||
|
using IO.Swagger.Client;
|
||||||
|
using System.Reflection;
|
||||||
|
|
||||||
|
namespace IO.Swagger.Test
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Class for testing OuterComposite
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// This file is automatically generated by Swagger Codegen.
|
||||||
|
/// Please update the test case below to test the model.
|
||||||
|
/// </remarks>
|
||||||
|
[TestFixture]
|
||||||
|
public class OuterCompositeTests
|
||||||
|
{
|
||||||
|
// TODO uncomment below to declare an instance variable for OuterComposite
|
||||||
|
//private OuterComposite instance;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Setup before each test
|
||||||
|
/// </summary>
|
||||||
|
[SetUp]
|
||||||
|
public void Init()
|
||||||
|
{
|
||||||
|
// TODO uncomment below to create an instance of OuterComposite
|
||||||
|
//instance = new OuterComposite();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Clean up after each test
|
||||||
|
/// </summary>
|
||||||
|
[TearDown]
|
||||||
|
public void Cleanup()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Test an instance of OuterComposite
|
||||||
|
/// </summary>
|
||||||
|
[Test]
|
||||||
|
public void OuterCompositeInstanceTest()
|
||||||
|
{
|
||||||
|
// TODO uncomment below to test "IsInstanceOfType" OuterComposite
|
||||||
|
//Assert.IsInstanceOfType<OuterComposite> (instance, "variable 'instance' is a OuterComposite");
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Test the property 'MyNumber'
|
||||||
|
/// </summary>
|
||||||
|
[Test]
|
||||||
|
public void MyNumberTest()
|
||||||
|
{
|
||||||
|
// TODO unit test for the property 'MyNumber'
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Test the property 'MyString'
|
||||||
|
/// </summary>
|
||||||
|
[Test]
|
||||||
|
public void MyStringTest()
|
||||||
|
{
|
||||||
|
// TODO unit test for the property 'MyString'
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Test the property 'MyBoolean'
|
||||||
|
/// </summary>
|
||||||
|
[Test]
|
||||||
|
public void MyBooleanTest()
|
||||||
|
{
|
||||||
|
// TODO unit test for the property 'MyBoolean'
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,70 @@
|
|||||||
|
/*
|
||||||
|
* Swagger Petstore
|
||||||
|
*
|
||||||
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||||
|
*
|
||||||
|
* OpenAPI spec version: 1.0.0
|
||||||
|
* Contact: apiteam@swagger.io
|
||||||
|
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
using NUnit.Framework;
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using System.Linq;
|
||||||
|
using System.IO;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using IO.Swagger.Api;
|
||||||
|
using IO.Swagger.Model;
|
||||||
|
using IO.Swagger.Client;
|
||||||
|
using System.Reflection;
|
||||||
|
|
||||||
|
namespace IO.Swagger.Test
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Class for testing OuterNumber
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// This file is automatically generated by Swagger Codegen.
|
||||||
|
/// Please update the test case below to test the model.
|
||||||
|
/// </remarks>
|
||||||
|
[TestFixture]
|
||||||
|
public class OuterNumberTests
|
||||||
|
{
|
||||||
|
// TODO uncomment below to declare an instance variable for OuterNumber
|
||||||
|
//private OuterNumber instance;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Setup before each test
|
||||||
|
/// </summary>
|
||||||
|
[SetUp]
|
||||||
|
public void Init()
|
||||||
|
{
|
||||||
|
// TODO uncomment below to create an instance of OuterNumber
|
||||||
|
//instance = new OuterNumber();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Clean up after each test
|
||||||
|
/// </summary>
|
||||||
|
[TearDown]
|
||||||
|
public void Cleanup()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Test an instance of OuterNumber
|
||||||
|
/// </summary>
|
||||||
|
[Test]
|
||||||
|
public void OuterNumberInstanceTest()
|
||||||
|
{
|
||||||
|
// TODO uncomment below to test "IsInstanceOfType" OuterNumber
|
||||||
|
//Assert.IsInstanceOfType<OuterNumber> (instance, "variable 'instance' is a OuterNumber");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,70 @@
|
|||||||
|
/*
|
||||||
|
* Swagger Petstore
|
||||||
|
*
|
||||||
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||||
|
*
|
||||||
|
* OpenAPI spec version: 1.0.0
|
||||||
|
* Contact: apiteam@swagger.io
|
||||||
|
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
using NUnit.Framework;
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using System.Linq;
|
||||||
|
using System.IO;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using IO.Swagger.Api;
|
||||||
|
using IO.Swagger.Model;
|
||||||
|
using IO.Swagger.Client;
|
||||||
|
using System.Reflection;
|
||||||
|
|
||||||
|
namespace IO.Swagger.Test
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Class for testing OuterString
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// This file is automatically generated by Swagger Codegen.
|
||||||
|
/// Please update the test case below to test the model.
|
||||||
|
/// </remarks>
|
||||||
|
[TestFixture]
|
||||||
|
public class OuterStringTests
|
||||||
|
{
|
||||||
|
// TODO uncomment below to declare an instance variable for OuterString
|
||||||
|
//private OuterString instance;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Setup before each test
|
||||||
|
/// </summary>
|
||||||
|
[SetUp]
|
||||||
|
public void Init()
|
||||||
|
{
|
||||||
|
// TODO uncomment below to create an instance of OuterString
|
||||||
|
//instance = new OuterString();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Clean up after each test
|
||||||
|
/// </summary>
|
||||||
|
[TearDown]
|
||||||
|
public void Cleanup()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Test an instance of OuterString
|
||||||
|
/// </summary>
|
||||||
|
[Test]
|
||||||
|
public void OuterStringInstanceTest()
|
||||||
|
{
|
||||||
|
// TODO uncomment below to test "IsInstanceOfType" OuterString
|
||||||
|
//Assert.IsInstanceOfType<OuterString> (instance, "variable 'instance' is a OuterString");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -25,6 +25,90 @@ namespace IO.Swagger.Api
|
|||||||
{
|
{
|
||||||
#region Synchronous Operations
|
#region Synchronous Operations
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Test serialization of outer boolean types
|
||||||
|
/// </remarks>
|
||||||
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||||
|
/// <param name="body">Input boolean as post body (optional)</param>
|
||||||
|
/// <returns>OuterBoolean</returns>
|
||||||
|
OuterBoolean FakeOuterBooleanSerialize (OuterBoolean body = null);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Test serialization of outer boolean types
|
||||||
|
/// </remarks>
|
||||||
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||||
|
/// <param name="body">Input boolean as post body (optional)</param>
|
||||||
|
/// <returns>ApiResponse of OuterBoolean</returns>
|
||||||
|
ApiResponse<OuterBoolean> FakeOuterBooleanSerializeWithHttpInfo (OuterBoolean body = null);
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Test serialization of object with outer number type
|
||||||
|
/// </remarks>
|
||||||
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||||
|
/// <param name="body">Input composite as post body (optional)</param>
|
||||||
|
/// <returns>OuterComposite</returns>
|
||||||
|
OuterComposite FakeOuterCompositeSerialize (OuterComposite body = null);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Test serialization of object with outer number type
|
||||||
|
/// </remarks>
|
||||||
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||||
|
/// <param name="body">Input composite as post body (optional)</param>
|
||||||
|
/// <returns>ApiResponse of OuterComposite</returns>
|
||||||
|
ApiResponse<OuterComposite> FakeOuterCompositeSerializeWithHttpInfo (OuterComposite body = null);
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Test serialization of outer number types
|
||||||
|
/// </remarks>
|
||||||
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||||
|
/// <param name="body">Input number as post body (optional)</param>
|
||||||
|
/// <returns>OuterNumber</returns>
|
||||||
|
OuterNumber FakeOuterNumberSerialize (OuterNumber body = null);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Test serialization of outer number types
|
||||||
|
/// </remarks>
|
||||||
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||||
|
/// <param name="body">Input number as post body (optional)</param>
|
||||||
|
/// <returns>ApiResponse of OuterNumber</returns>
|
||||||
|
ApiResponse<OuterNumber> FakeOuterNumberSerializeWithHttpInfo (OuterNumber body = null);
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Test serialization of outer string types
|
||||||
|
/// </remarks>
|
||||||
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||||
|
/// <param name="body">Input string as post body (optional)</param>
|
||||||
|
/// <returns>OuterString</returns>
|
||||||
|
OuterString FakeOuterStringSerialize (OuterString body = null);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Test serialization of outer string types
|
||||||
|
/// </remarks>
|
||||||
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||||
|
/// <param name="body">Input string as post body (optional)</param>
|
||||||
|
/// <returns>ApiResponse of OuterString</returns>
|
||||||
|
ApiResponse<OuterString> FakeOuterStringSerializeWithHttpInfo (OuterString body = null);
|
||||||
|
/// <summary>
|
||||||
/// To test \"client\" model
|
/// To test \"client\" model
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
@ -130,6 +214,90 @@ namespace IO.Swagger.Api
|
|||||||
#endregion Synchronous Operations
|
#endregion Synchronous Operations
|
||||||
#region Asynchronous Operations
|
#region Asynchronous Operations
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Test serialization of outer boolean types
|
||||||
|
/// </remarks>
|
||||||
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||||
|
/// <param name="body">Input boolean as post body (optional)</param>
|
||||||
|
/// <returns>Task of OuterBoolean</returns>
|
||||||
|
System.Threading.Tasks.Task<OuterBoolean> FakeOuterBooleanSerializeAsync (OuterBoolean body = null);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Test serialization of outer boolean types
|
||||||
|
/// </remarks>
|
||||||
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||||
|
/// <param name="body">Input boolean as post body (optional)</param>
|
||||||
|
/// <returns>Task of ApiResponse (OuterBoolean)</returns>
|
||||||
|
System.Threading.Tasks.Task<ApiResponse<OuterBoolean>> FakeOuterBooleanSerializeAsyncWithHttpInfo (OuterBoolean body = null);
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Test serialization of object with outer number type
|
||||||
|
/// </remarks>
|
||||||
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||||
|
/// <param name="body">Input composite as post body (optional)</param>
|
||||||
|
/// <returns>Task of OuterComposite</returns>
|
||||||
|
System.Threading.Tasks.Task<OuterComposite> FakeOuterCompositeSerializeAsync (OuterComposite body = null);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Test serialization of object with outer number type
|
||||||
|
/// </remarks>
|
||||||
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||||
|
/// <param name="body">Input composite as post body (optional)</param>
|
||||||
|
/// <returns>Task of ApiResponse (OuterComposite)</returns>
|
||||||
|
System.Threading.Tasks.Task<ApiResponse<OuterComposite>> FakeOuterCompositeSerializeAsyncWithHttpInfo (OuterComposite body = null);
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Test serialization of outer number types
|
||||||
|
/// </remarks>
|
||||||
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||||
|
/// <param name="body">Input number as post body (optional)</param>
|
||||||
|
/// <returns>Task of OuterNumber</returns>
|
||||||
|
System.Threading.Tasks.Task<OuterNumber> FakeOuterNumberSerializeAsync (OuterNumber body = null);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Test serialization of outer number types
|
||||||
|
/// </remarks>
|
||||||
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||||
|
/// <param name="body">Input number as post body (optional)</param>
|
||||||
|
/// <returns>Task of ApiResponse (OuterNumber)</returns>
|
||||||
|
System.Threading.Tasks.Task<ApiResponse<OuterNumber>> FakeOuterNumberSerializeAsyncWithHttpInfo (OuterNumber body = null);
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Test serialization of outer string types
|
||||||
|
/// </remarks>
|
||||||
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||||
|
/// <param name="body">Input string as post body (optional)</param>
|
||||||
|
/// <returns>Task of OuterString</returns>
|
||||||
|
System.Threading.Tasks.Task<OuterString> FakeOuterStringSerializeAsync (OuterString body = null);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Test serialization of outer string types
|
||||||
|
/// </remarks>
|
||||||
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||||
|
/// <param name="body">Input string as post body (optional)</param>
|
||||||
|
/// <returns>Task of ApiResponse (OuterString)</returns>
|
||||||
|
System.Threading.Tasks.Task<ApiResponse<OuterString>> FakeOuterStringSerializeAsyncWithHttpInfo (OuterString body = null);
|
||||||
|
/// <summary>
|
||||||
/// To test \"client\" model
|
/// To test \"client\" model
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
@ -344,6 +512,570 @@ namespace IO.Swagger.Api
|
|||||||
this.Configuration.AddDefaultHeader(key, value);
|
this.Configuration.AddDefaultHeader(key, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Test serialization of outer boolean types
|
||||||
|
/// </summary>
|
||||||
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||||
|
/// <param name="body">Input boolean as post body (optional)</param>
|
||||||
|
/// <returns>OuterBoolean</returns>
|
||||||
|
public OuterBoolean FakeOuterBooleanSerialize (OuterBoolean body = null)
|
||||||
|
{
|
||||||
|
ApiResponse<OuterBoolean> localVarResponse = FakeOuterBooleanSerializeWithHttpInfo(body);
|
||||||
|
return localVarResponse.Data;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Test serialization of outer boolean types
|
||||||
|
/// </summary>
|
||||||
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||||
|
/// <param name="body">Input boolean as post body (optional)</param>
|
||||||
|
/// <returns>ApiResponse of OuterBoolean</returns>
|
||||||
|
public ApiResponse< OuterBoolean > FakeOuterBooleanSerializeWithHttpInfo (OuterBoolean body = null)
|
||||||
|
{
|
||||||
|
|
||||||
|
var localVarPath = "/fake/outer/boolean";
|
||||||
|
var localVarPathParams = new Dictionary<String, String>();
|
||||||
|
var localVarQueryParams = new Dictionary<String, String>();
|
||||||
|
var localVarHeaderParams = new Dictionary<String, String>(Configuration.DefaultHeader);
|
||||||
|
var localVarFormParams = new Dictionary<String, String>();
|
||||||
|
var localVarFileParams = new Dictionary<String, FileParameter>();
|
||||||
|
Object localVarPostBody = null;
|
||||||
|
|
||||||
|
// to determine the Content-Type header
|
||||||
|
String[] localVarHttpContentTypes = new String[] {
|
||||||
|
};
|
||||||
|
String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
|
||||||
|
|
||||||
|
// to determine the Accept header
|
||||||
|
String[] localVarHttpHeaderAccepts = new String[] {
|
||||||
|
};
|
||||||
|
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
||||||
|
if (localVarHttpHeaderAccept != null)
|
||||||
|
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
|
||||||
|
|
||||||
|
if (body != null && body.GetType() != typeof(byte[]))
|
||||||
|
{
|
||||||
|
localVarPostBody = Configuration.ApiClient.Serialize(body); // http body (model) parameter
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
localVarPostBody = body; // byte array
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// make the HTTP request
|
||||||
|
IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath,
|
||||||
|
Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
|
||||||
|
localVarPathParams, localVarHttpContentType);
|
||||||
|
|
||||||
|
int localVarStatusCode = (int) localVarResponse.StatusCode;
|
||||||
|
|
||||||
|
if (ExceptionFactory != null)
|
||||||
|
{
|
||||||
|
Exception exception = ExceptionFactory("FakeOuterBooleanSerialize", localVarResponse);
|
||||||
|
if (exception != null) throw exception;
|
||||||
|
}
|
||||||
|
|
||||||
|
return new ApiResponse<OuterBoolean>(localVarStatusCode,
|
||||||
|
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
|
||||||
|
(OuterBoolean) Configuration.ApiClient.Deserialize(localVarResponse, typeof(OuterBoolean)));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Test serialization of outer boolean types
|
||||||
|
/// </summary>
|
||||||
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||||
|
/// <param name="body">Input boolean as post body (optional)</param>
|
||||||
|
/// <returns>Task of OuterBoolean</returns>
|
||||||
|
public async System.Threading.Tasks.Task<OuterBoolean> FakeOuterBooleanSerializeAsync (OuterBoolean body = null)
|
||||||
|
{
|
||||||
|
ApiResponse<OuterBoolean> localVarResponse = await FakeOuterBooleanSerializeAsyncWithHttpInfo(body);
|
||||||
|
return localVarResponse.Data;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Test serialization of outer boolean types
|
||||||
|
/// </summary>
|
||||||
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||||
|
/// <param name="body">Input boolean as post body (optional)</param>
|
||||||
|
/// <returns>Task of ApiResponse (OuterBoolean)</returns>
|
||||||
|
public async System.Threading.Tasks.Task<ApiResponse<OuterBoolean>> FakeOuterBooleanSerializeAsyncWithHttpInfo (OuterBoolean body = null)
|
||||||
|
{
|
||||||
|
|
||||||
|
var localVarPath = "/fake/outer/boolean";
|
||||||
|
var localVarPathParams = new Dictionary<String, String>();
|
||||||
|
var localVarQueryParams = new Dictionary<String, String>();
|
||||||
|
var localVarHeaderParams = new Dictionary<String, String>(Configuration.DefaultHeader);
|
||||||
|
var localVarFormParams = new Dictionary<String, String>();
|
||||||
|
var localVarFileParams = new Dictionary<String, FileParameter>();
|
||||||
|
Object localVarPostBody = null;
|
||||||
|
|
||||||
|
// to determine the Content-Type header
|
||||||
|
String[] localVarHttpContentTypes = new String[] {
|
||||||
|
};
|
||||||
|
String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
|
||||||
|
|
||||||
|
// to determine the Accept header
|
||||||
|
String[] localVarHttpHeaderAccepts = new String[] {
|
||||||
|
};
|
||||||
|
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
||||||
|
if (localVarHttpHeaderAccept != null)
|
||||||
|
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
|
||||||
|
|
||||||
|
if (body != null && body.GetType() != typeof(byte[]))
|
||||||
|
{
|
||||||
|
localVarPostBody = Configuration.ApiClient.Serialize(body); // http body (model) parameter
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
localVarPostBody = body; // byte array
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// make the HTTP request
|
||||||
|
IRestResponse localVarResponse = (IRestResponse) await Configuration.ApiClient.CallApiAsync(localVarPath,
|
||||||
|
Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
|
||||||
|
localVarPathParams, localVarHttpContentType);
|
||||||
|
|
||||||
|
int localVarStatusCode = (int) localVarResponse.StatusCode;
|
||||||
|
|
||||||
|
if (ExceptionFactory != null)
|
||||||
|
{
|
||||||
|
Exception exception = ExceptionFactory("FakeOuterBooleanSerialize", localVarResponse);
|
||||||
|
if (exception != null) throw exception;
|
||||||
|
}
|
||||||
|
|
||||||
|
return new ApiResponse<OuterBoolean>(localVarStatusCode,
|
||||||
|
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
|
||||||
|
(OuterBoolean) Configuration.ApiClient.Deserialize(localVarResponse, typeof(OuterBoolean)));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Test serialization of object with outer number type
|
||||||
|
/// </summary>
|
||||||
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||||
|
/// <param name="body">Input composite as post body (optional)</param>
|
||||||
|
/// <returns>OuterComposite</returns>
|
||||||
|
public OuterComposite FakeOuterCompositeSerialize (OuterComposite body = null)
|
||||||
|
{
|
||||||
|
ApiResponse<OuterComposite> localVarResponse = FakeOuterCompositeSerializeWithHttpInfo(body);
|
||||||
|
return localVarResponse.Data;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Test serialization of object with outer number type
|
||||||
|
/// </summary>
|
||||||
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||||
|
/// <param name="body">Input composite as post body (optional)</param>
|
||||||
|
/// <returns>ApiResponse of OuterComposite</returns>
|
||||||
|
public ApiResponse< OuterComposite > FakeOuterCompositeSerializeWithHttpInfo (OuterComposite body = null)
|
||||||
|
{
|
||||||
|
|
||||||
|
var localVarPath = "/fake/outer/composite";
|
||||||
|
var localVarPathParams = new Dictionary<String, String>();
|
||||||
|
var localVarQueryParams = new Dictionary<String, String>();
|
||||||
|
var localVarHeaderParams = new Dictionary<String, String>(Configuration.DefaultHeader);
|
||||||
|
var localVarFormParams = new Dictionary<String, String>();
|
||||||
|
var localVarFileParams = new Dictionary<String, FileParameter>();
|
||||||
|
Object localVarPostBody = null;
|
||||||
|
|
||||||
|
// to determine the Content-Type header
|
||||||
|
String[] localVarHttpContentTypes = new String[] {
|
||||||
|
};
|
||||||
|
String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
|
||||||
|
|
||||||
|
// to determine the Accept header
|
||||||
|
String[] localVarHttpHeaderAccepts = new String[] {
|
||||||
|
};
|
||||||
|
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
||||||
|
if (localVarHttpHeaderAccept != null)
|
||||||
|
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
|
||||||
|
|
||||||
|
if (body != null && body.GetType() != typeof(byte[]))
|
||||||
|
{
|
||||||
|
localVarPostBody = Configuration.ApiClient.Serialize(body); // http body (model) parameter
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
localVarPostBody = body; // byte array
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// make the HTTP request
|
||||||
|
IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath,
|
||||||
|
Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
|
||||||
|
localVarPathParams, localVarHttpContentType);
|
||||||
|
|
||||||
|
int localVarStatusCode = (int) localVarResponse.StatusCode;
|
||||||
|
|
||||||
|
if (ExceptionFactory != null)
|
||||||
|
{
|
||||||
|
Exception exception = ExceptionFactory("FakeOuterCompositeSerialize", localVarResponse);
|
||||||
|
if (exception != null) throw exception;
|
||||||
|
}
|
||||||
|
|
||||||
|
return new ApiResponse<OuterComposite>(localVarStatusCode,
|
||||||
|
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
|
||||||
|
(OuterComposite) Configuration.ApiClient.Deserialize(localVarResponse, typeof(OuterComposite)));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Test serialization of object with outer number type
|
||||||
|
/// </summary>
|
||||||
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||||
|
/// <param name="body">Input composite as post body (optional)</param>
|
||||||
|
/// <returns>Task of OuterComposite</returns>
|
||||||
|
public async System.Threading.Tasks.Task<OuterComposite> FakeOuterCompositeSerializeAsync (OuterComposite body = null)
|
||||||
|
{
|
||||||
|
ApiResponse<OuterComposite> localVarResponse = await FakeOuterCompositeSerializeAsyncWithHttpInfo(body);
|
||||||
|
return localVarResponse.Data;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Test serialization of object with outer number type
|
||||||
|
/// </summary>
|
||||||
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||||
|
/// <param name="body">Input composite as post body (optional)</param>
|
||||||
|
/// <returns>Task of ApiResponse (OuterComposite)</returns>
|
||||||
|
public async System.Threading.Tasks.Task<ApiResponse<OuterComposite>> FakeOuterCompositeSerializeAsyncWithHttpInfo (OuterComposite body = null)
|
||||||
|
{
|
||||||
|
|
||||||
|
var localVarPath = "/fake/outer/composite";
|
||||||
|
var localVarPathParams = new Dictionary<String, String>();
|
||||||
|
var localVarQueryParams = new Dictionary<String, String>();
|
||||||
|
var localVarHeaderParams = new Dictionary<String, String>(Configuration.DefaultHeader);
|
||||||
|
var localVarFormParams = new Dictionary<String, String>();
|
||||||
|
var localVarFileParams = new Dictionary<String, FileParameter>();
|
||||||
|
Object localVarPostBody = null;
|
||||||
|
|
||||||
|
// to determine the Content-Type header
|
||||||
|
String[] localVarHttpContentTypes = new String[] {
|
||||||
|
};
|
||||||
|
String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
|
||||||
|
|
||||||
|
// to determine the Accept header
|
||||||
|
String[] localVarHttpHeaderAccepts = new String[] {
|
||||||
|
};
|
||||||
|
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
||||||
|
if (localVarHttpHeaderAccept != null)
|
||||||
|
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
|
||||||
|
|
||||||
|
if (body != null && body.GetType() != typeof(byte[]))
|
||||||
|
{
|
||||||
|
localVarPostBody = Configuration.ApiClient.Serialize(body); // http body (model) parameter
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
localVarPostBody = body; // byte array
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// make the HTTP request
|
||||||
|
IRestResponse localVarResponse = (IRestResponse) await Configuration.ApiClient.CallApiAsync(localVarPath,
|
||||||
|
Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
|
||||||
|
localVarPathParams, localVarHttpContentType);
|
||||||
|
|
||||||
|
int localVarStatusCode = (int) localVarResponse.StatusCode;
|
||||||
|
|
||||||
|
if (ExceptionFactory != null)
|
||||||
|
{
|
||||||
|
Exception exception = ExceptionFactory("FakeOuterCompositeSerialize", localVarResponse);
|
||||||
|
if (exception != null) throw exception;
|
||||||
|
}
|
||||||
|
|
||||||
|
return new ApiResponse<OuterComposite>(localVarStatusCode,
|
||||||
|
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
|
||||||
|
(OuterComposite) Configuration.ApiClient.Deserialize(localVarResponse, typeof(OuterComposite)));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Test serialization of outer number types
|
||||||
|
/// </summary>
|
||||||
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||||
|
/// <param name="body">Input number as post body (optional)</param>
|
||||||
|
/// <returns>OuterNumber</returns>
|
||||||
|
public OuterNumber FakeOuterNumberSerialize (OuterNumber body = null)
|
||||||
|
{
|
||||||
|
ApiResponse<OuterNumber> localVarResponse = FakeOuterNumberSerializeWithHttpInfo(body);
|
||||||
|
return localVarResponse.Data;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Test serialization of outer number types
|
||||||
|
/// </summary>
|
||||||
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||||
|
/// <param name="body">Input number as post body (optional)</param>
|
||||||
|
/// <returns>ApiResponse of OuterNumber</returns>
|
||||||
|
public ApiResponse< OuterNumber > FakeOuterNumberSerializeWithHttpInfo (OuterNumber body = null)
|
||||||
|
{
|
||||||
|
|
||||||
|
var localVarPath = "/fake/outer/number";
|
||||||
|
var localVarPathParams = new Dictionary<String, String>();
|
||||||
|
var localVarQueryParams = new Dictionary<String, String>();
|
||||||
|
var localVarHeaderParams = new Dictionary<String, String>(Configuration.DefaultHeader);
|
||||||
|
var localVarFormParams = new Dictionary<String, String>();
|
||||||
|
var localVarFileParams = new Dictionary<String, FileParameter>();
|
||||||
|
Object localVarPostBody = null;
|
||||||
|
|
||||||
|
// to determine the Content-Type header
|
||||||
|
String[] localVarHttpContentTypes = new String[] {
|
||||||
|
};
|
||||||
|
String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
|
||||||
|
|
||||||
|
// to determine the Accept header
|
||||||
|
String[] localVarHttpHeaderAccepts = new String[] {
|
||||||
|
};
|
||||||
|
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
||||||
|
if (localVarHttpHeaderAccept != null)
|
||||||
|
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
|
||||||
|
|
||||||
|
if (body != null && body.GetType() != typeof(byte[]))
|
||||||
|
{
|
||||||
|
localVarPostBody = Configuration.ApiClient.Serialize(body); // http body (model) parameter
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
localVarPostBody = body; // byte array
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// make the HTTP request
|
||||||
|
IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath,
|
||||||
|
Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
|
||||||
|
localVarPathParams, localVarHttpContentType);
|
||||||
|
|
||||||
|
int localVarStatusCode = (int) localVarResponse.StatusCode;
|
||||||
|
|
||||||
|
if (ExceptionFactory != null)
|
||||||
|
{
|
||||||
|
Exception exception = ExceptionFactory("FakeOuterNumberSerialize", localVarResponse);
|
||||||
|
if (exception != null) throw exception;
|
||||||
|
}
|
||||||
|
|
||||||
|
return new ApiResponse<OuterNumber>(localVarStatusCode,
|
||||||
|
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
|
||||||
|
(OuterNumber) Configuration.ApiClient.Deserialize(localVarResponse, typeof(OuterNumber)));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Test serialization of outer number types
|
||||||
|
/// </summary>
|
||||||
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||||
|
/// <param name="body">Input number as post body (optional)</param>
|
||||||
|
/// <returns>Task of OuterNumber</returns>
|
||||||
|
public async System.Threading.Tasks.Task<OuterNumber> FakeOuterNumberSerializeAsync (OuterNumber body = null)
|
||||||
|
{
|
||||||
|
ApiResponse<OuterNumber> localVarResponse = await FakeOuterNumberSerializeAsyncWithHttpInfo(body);
|
||||||
|
return localVarResponse.Data;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Test serialization of outer number types
|
||||||
|
/// </summary>
|
||||||
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||||
|
/// <param name="body">Input number as post body (optional)</param>
|
||||||
|
/// <returns>Task of ApiResponse (OuterNumber)</returns>
|
||||||
|
public async System.Threading.Tasks.Task<ApiResponse<OuterNumber>> FakeOuterNumberSerializeAsyncWithHttpInfo (OuterNumber body = null)
|
||||||
|
{
|
||||||
|
|
||||||
|
var localVarPath = "/fake/outer/number";
|
||||||
|
var localVarPathParams = new Dictionary<String, String>();
|
||||||
|
var localVarQueryParams = new Dictionary<String, String>();
|
||||||
|
var localVarHeaderParams = new Dictionary<String, String>(Configuration.DefaultHeader);
|
||||||
|
var localVarFormParams = new Dictionary<String, String>();
|
||||||
|
var localVarFileParams = new Dictionary<String, FileParameter>();
|
||||||
|
Object localVarPostBody = null;
|
||||||
|
|
||||||
|
// to determine the Content-Type header
|
||||||
|
String[] localVarHttpContentTypes = new String[] {
|
||||||
|
};
|
||||||
|
String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
|
||||||
|
|
||||||
|
// to determine the Accept header
|
||||||
|
String[] localVarHttpHeaderAccepts = new String[] {
|
||||||
|
};
|
||||||
|
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
||||||
|
if (localVarHttpHeaderAccept != null)
|
||||||
|
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
|
||||||
|
|
||||||
|
if (body != null && body.GetType() != typeof(byte[]))
|
||||||
|
{
|
||||||
|
localVarPostBody = Configuration.ApiClient.Serialize(body); // http body (model) parameter
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
localVarPostBody = body; // byte array
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// make the HTTP request
|
||||||
|
IRestResponse localVarResponse = (IRestResponse) await Configuration.ApiClient.CallApiAsync(localVarPath,
|
||||||
|
Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
|
||||||
|
localVarPathParams, localVarHttpContentType);
|
||||||
|
|
||||||
|
int localVarStatusCode = (int) localVarResponse.StatusCode;
|
||||||
|
|
||||||
|
if (ExceptionFactory != null)
|
||||||
|
{
|
||||||
|
Exception exception = ExceptionFactory("FakeOuterNumberSerialize", localVarResponse);
|
||||||
|
if (exception != null) throw exception;
|
||||||
|
}
|
||||||
|
|
||||||
|
return new ApiResponse<OuterNumber>(localVarStatusCode,
|
||||||
|
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
|
||||||
|
(OuterNumber) Configuration.ApiClient.Deserialize(localVarResponse, typeof(OuterNumber)));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Test serialization of outer string types
|
||||||
|
/// </summary>
|
||||||
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||||
|
/// <param name="body">Input string as post body (optional)</param>
|
||||||
|
/// <returns>OuterString</returns>
|
||||||
|
public OuterString FakeOuterStringSerialize (OuterString body = null)
|
||||||
|
{
|
||||||
|
ApiResponse<OuterString> localVarResponse = FakeOuterStringSerializeWithHttpInfo(body);
|
||||||
|
return localVarResponse.Data;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Test serialization of outer string types
|
||||||
|
/// </summary>
|
||||||
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||||
|
/// <param name="body">Input string as post body (optional)</param>
|
||||||
|
/// <returns>ApiResponse of OuterString</returns>
|
||||||
|
public ApiResponse< OuterString > FakeOuterStringSerializeWithHttpInfo (OuterString body = null)
|
||||||
|
{
|
||||||
|
|
||||||
|
var localVarPath = "/fake/outer/string";
|
||||||
|
var localVarPathParams = new Dictionary<String, String>();
|
||||||
|
var localVarQueryParams = new Dictionary<String, String>();
|
||||||
|
var localVarHeaderParams = new Dictionary<String, String>(Configuration.DefaultHeader);
|
||||||
|
var localVarFormParams = new Dictionary<String, String>();
|
||||||
|
var localVarFileParams = new Dictionary<String, FileParameter>();
|
||||||
|
Object localVarPostBody = null;
|
||||||
|
|
||||||
|
// to determine the Content-Type header
|
||||||
|
String[] localVarHttpContentTypes = new String[] {
|
||||||
|
};
|
||||||
|
String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
|
||||||
|
|
||||||
|
// to determine the Accept header
|
||||||
|
String[] localVarHttpHeaderAccepts = new String[] {
|
||||||
|
};
|
||||||
|
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
||||||
|
if (localVarHttpHeaderAccept != null)
|
||||||
|
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
|
||||||
|
|
||||||
|
if (body != null && body.GetType() != typeof(byte[]))
|
||||||
|
{
|
||||||
|
localVarPostBody = Configuration.ApiClient.Serialize(body); // http body (model) parameter
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
localVarPostBody = body; // byte array
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// make the HTTP request
|
||||||
|
IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath,
|
||||||
|
Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
|
||||||
|
localVarPathParams, localVarHttpContentType);
|
||||||
|
|
||||||
|
int localVarStatusCode = (int) localVarResponse.StatusCode;
|
||||||
|
|
||||||
|
if (ExceptionFactory != null)
|
||||||
|
{
|
||||||
|
Exception exception = ExceptionFactory("FakeOuterStringSerialize", localVarResponse);
|
||||||
|
if (exception != null) throw exception;
|
||||||
|
}
|
||||||
|
|
||||||
|
return new ApiResponse<OuterString>(localVarStatusCode,
|
||||||
|
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
|
||||||
|
(OuterString) Configuration.ApiClient.Deserialize(localVarResponse, typeof(OuterString)));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Test serialization of outer string types
|
||||||
|
/// </summary>
|
||||||
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||||
|
/// <param name="body">Input string as post body (optional)</param>
|
||||||
|
/// <returns>Task of OuterString</returns>
|
||||||
|
public async System.Threading.Tasks.Task<OuterString> FakeOuterStringSerializeAsync (OuterString body = null)
|
||||||
|
{
|
||||||
|
ApiResponse<OuterString> localVarResponse = await FakeOuterStringSerializeAsyncWithHttpInfo(body);
|
||||||
|
return localVarResponse.Data;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Test serialization of outer string types
|
||||||
|
/// </summary>
|
||||||
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||||
|
/// <param name="body">Input string as post body (optional)</param>
|
||||||
|
/// <returns>Task of ApiResponse (OuterString)</returns>
|
||||||
|
public async System.Threading.Tasks.Task<ApiResponse<OuterString>> FakeOuterStringSerializeAsyncWithHttpInfo (OuterString body = null)
|
||||||
|
{
|
||||||
|
|
||||||
|
var localVarPath = "/fake/outer/string";
|
||||||
|
var localVarPathParams = new Dictionary<String, String>();
|
||||||
|
var localVarQueryParams = new Dictionary<String, String>();
|
||||||
|
var localVarHeaderParams = new Dictionary<String, String>(Configuration.DefaultHeader);
|
||||||
|
var localVarFormParams = new Dictionary<String, String>();
|
||||||
|
var localVarFileParams = new Dictionary<String, FileParameter>();
|
||||||
|
Object localVarPostBody = null;
|
||||||
|
|
||||||
|
// to determine the Content-Type header
|
||||||
|
String[] localVarHttpContentTypes = new String[] {
|
||||||
|
};
|
||||||
|
String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
|
||||||
|
|
||||||
|
// to determine the Accept header
|
||||||
|
String[] localVarHttpHeaderAccepts = new String[] {
|
||||||
|
};
|
||||||
|
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
||||||
|
if (localVarHttpHeaderAccept != null)
|
||||||
|
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
|
||||||
|
|
||||||
|
if (body != null && body.GetType() != typeof(byte[]))
|
||||||
|
{
|
||||||
|
localVarPostBody = Configuration.ApiClient.Serialize(body); // http body (model) parameter
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
localVarPostBody = body; // byte array
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// make the HTTP request
|
||||||
|
IRestResponse localVarResponse = (IRestResponse) await Configuration.ApiClient.CallApiAsync(localVarPath,
|
||||||
|
Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
|
||||||
|
localVarPathParams, localVarHttpContentType);
|
||||||
|
|
||||||
|
int localVarStatusCode = (int) localVarResponse.StatusCode;
|
||||||
|
|
||||||
|
if (ExceptionFactory != null)
|
||||||
|
{
|
||||||
|
Exception exception = ExceptionFactory("FakeOuterStringSerialize", localVarResponse);
|
||||||
|
if (exception != null) throw exception;
|
||||||
|
}
|
||||||
|
|
||||||
|
return new ApiResponse<OuterString>(localVarStatusCode,
|
||||||
|
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
|
||||||
|
(OuterString) Configuration.ApiClient.Deserialize(localVarResponse, typeof(OuterString)));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// To test \"client\" model To test \"client\" model
|
/// To test \"client\" model To test \"client\" model
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -0,0 +1,135 @@
|
|||||||
|
/*
|
||||||
|
* Swagger Petstore
|
||||||
|
*
|
||||||
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||||
|
*
|
||||||
|
* OpenAPI spec version: 1.0.0
|
||||||
|
* Contact: apiteam@swagger.io
|
||||||
|
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||||
|
*/
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using System.Linq;
|
||||||
|
using System.IO;
|
||||||
|
using System.Text;
|
||||||
|
using System.Text.RegularExpressions;
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Collections.ObjectModel;
|
||||||
|
using System.Runtime.Serialization;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
using Newtonsoft.Json.Converters;
|
||||||
|
using PropertyChanged;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
|
||||||
|
namespace IO.Swagger.Model
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// OuterBoolean
|
||||||
|
/// </summary>
|
||||||
|
[DataContract]
|
||||||
|
[ImplementPropertyChanged]
|
||||||
|
public partial class OuterBoolean : IEquatable<OuterBoolean>, IValidatableObject
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Initializes a new instance of the <see cref="OuterBoolean" /> class.
|
||||||
|
/// </summary>
|
||||||
|
[JsonConstructorAttribute]
|
||||||
|
public OuterBoolean()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns the string presentation of the object
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>String presentation of the object</returns>
|
||||||
|
public override string ToString()
|
||||||
|
{
|
||||||
|
var sb = new StringBuilder();
|
||||||
|
sb.Append("class OuterBoolean {\n");
|
||||||
|
sb.Append("}\n");
|
||||||
|
return sb.ToString();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns the JSON string presentation of the object
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>JSON string presentation of the object</returns>
|
||||||
|
public string ToJson()
|
||||||
|
{
|
||||||
|
return JsonConvert.SerializeObject(this, Formatting.Indented);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns true if objects are equal
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="obj">Object to be compared</param>
|
||||||
|
/// <returns>Boolean</returns>
|
||||||
|
public override bool Equals(object obj)
|
||||||
|
{
|
||||||
|
// credit: http://stackoverflow.com/a/10454552/677735
|
||||||
|
return this.Equals(obj as OuterBoolean);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns true if OuterBoolean instances are equal
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="other">Instance of OuterBoolean to be compared</param>
|
||||||
|
/// <returns>Boolean</returns>
|
||||||
|
public bool Equals(OuterBoolean other)
|
||||||
|
{
|
||||||
|
// credit: http://stackoverflow.com/a/10454552/677735
|
||||||
|
if (other == null)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the hash code
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>Hash code</returns>
|
||||||
|
public override int GetHashCode()
|
||||||
|
{
|
||||||
|
// credit: http://stackoverflow.com/a/263416/677735
|
||||||
|
unchecked // Overflow is fine, just wrap
|
||||||
|
{
|
||||||
|
int hash = 41;
|
||||||
|
// Suitable nullity checks etc, of course :)
|
||||||
|
return hash;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Property changed event handler
|
||||||
|
/// </summary>
|
||||||
|
public event PropertyChangedEventHandler PropertyChanged;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Trigger when a property changed
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="propertyName">Property Name</param>
|
||||||
|
public virtual void OnPropertyChanged(string propertyName)
|
||||||
|
{
|
||||||
|
// NOTE: property changed is handled via "code weaving" using Fody.
|
||||||
|
// Properties with setters are modified at compile time to notify of changes.
|
||||||
|
var propertyChanged = PropertyChanged;
|
||||||
|
if (propertyChanged != null)
|
||||||
|
{
|
||||||
|
propertyChanged(this, new PropertyChangedEventArgs(propertyName));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// To validate all properties of the instance
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="validationContext">Validation context</param>
|
||||||
|
/// <returns>Validation Result</returns>
|
||||||
|
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
|
||||||
|
{
|
||||||
|
yield break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,179 @@
|
|||||||
|
/*
|
||||||
|
* Swagger Petstore
|
||||||
|
*
|
||||||
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||||
|
*
|
||||||
|
* OpenAPI spec version: 1.0.0
|
||||||
|
* Contact: apiteam@swagger.io
|
||||||
|
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||||
|
*/
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using System.Linq;
|
||||||
|
using System.IO;
|
||||||
|
using System.Text;
|
||||||
|
using System.Text.RegularExpressions;
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Collections.ObjectModel;
|
||||||
|
using System.Runtime.Serialization;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
using Newtonsoft.Json.Converters;
|
||||||
|
using PropertyChanged;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
|
||||||
|
namespace IO.Swagger.Model
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// OuterComposite
|
||||||
|
/// </summary>
|
||||||
|
[DataContract]
|
||||||
|
[ImplementPropertyChanged]
|
||||||
|
public partial class OuterComposite : IEquatable<OuterComposite>, IValidatableObject
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Initializes a new instance of the <see cref="OuterComposite" /> class.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="MyNumber">MyNumber.</param>
|
||||||
|
/// <param name="MyString">MyString.</param>
|
||||||
|
/// <param name="MyBoolean">MyBoolean.</param>
|
||||||
|
public OuterComposite(OuterNumber MyNumber = default(OuterNumber), OuterString MyString = default(OuterString), OuterBoolean MyBoolean = default(OuterBoolean))
|
||||||
|
{
|
||||||
|
this.MyNumber = MyNumber;
|
||||||
|
this.MyString = MyString;
|
||||||
|
this.MyBoolean = MyBoolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or Sets MyNumber
|
||||||
|
/// </summary>
|
||||||
|
[DataMember(Name="my_number", EmitDefaultValue=false)]
|
||||||
|
public OuterNumber MyNumber { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or Sets MyString
|
||||||
|
/// </summary>
|
||||||
|
[DataMember(Name="my_string", EmitDefaultValue=false)]
|
||||||
|
public OuterString MyString { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or Sets MyBoolean
|
||||||
|
/// </summary>
|
||||||
|
[DataMember(Name="my_boolean", EmitDefaultValue=false)]
|
||||||
|
public OuterBoolean MyBoolean { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// Returns the string presentation of the object
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>String presentation of the object</returns>
|
||||||
|
public override string ToString()
|
||||||
|
{
|
||||||
|
var sb = new StringBuilder();
|
||||||
|
sb.Append("class OuterComposite {\n");
|
||||||
|
sb.Append(" MyNumber: ").Append(MyNumber).Append("\n");
|
||||||
|
sb.Append(" MyString: ").Append(MyString).Append("\n");
|
||||||
|
sb.Append(" MyBoolean: ").Append(MyBoolean).Append("\n");
|
||||||
|
sb.Append("}\n");
|
||||||
|
return sb.ToString();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns the JSON string presentation of the object
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>JSON string presentation of the object</returns>
|
||||||
|
public string ToJson()
|
||||||
|
{
|
||||||
|
return JsonConvert.SerializeObject(this, Formatting.Indented);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns true if objects are equal
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="obj">Object to be compared</param>
|
||||||
|
/// <returns>Boolean</returns>
|
||||||
|
public override bool Equals(object obj)
|
||||||
|
{
|
||||||
|
// credit: http://stackoverflow.com/a/10454552/677735
|
||||||
|
return this.Equals(obj as OuterComposite);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns true if OuterComposite instances are equal
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="other">Instance of OuterComposite to be compared</param>
|
||||||
|
/// <returns>Boolean</returns>
|
||||||
|
public bool Equals(OuterComposite other)
|
||||||
|
{
|
||||||
|
// credit: http://stackoverflow.com/a/10454552/677735
|
||||||
|
if (other == null)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
return
|
||||||
|
(
|
||||||
|
this.MyNumber == other.MyNumber ||
|
||||||
|
this.MyNumber != null &&
|
||||||
|
this.MyNumber.Equals(other.MyNumber)
|
||||||
|
) &&
|
||||||
|
(
|
||||||
|
this.MyString == other.MyString ||
|
||||||
|
this.MyString != null &&
|
||||||
|
this.MyString.Equals(other.MyString)
|
||||||
|
) &&
|
||||||
|
(
|
||||||
|
this.MyBoolean == other.MyBoolean ||
|
||||||
|
this.MyBoolean != null &&
|
||||||
|
this.MyBoolean.Equals(other.MyBoolean)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the hash code
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>Hash code</returns>
|
||||||
|
public override int GetHashCode()
|
||||||
|
{
|
||||||
|
// credit: http://stackoverflow.com/a/263416/677735
|
||||||
|
unchecked // Overflow is fine, just wrap
|
||||||
|
{
|
||||||
|
int hash = 41;
|
||||||
|
// Suitable nullity checks etc, of course :)
|
||||||
|
if (this.MyNumber != null)
|
||||||
|
hash = hash * 59 + this.MyNumber.GetHashCode();
|
||||||
|
if (this.MyString != null)
|
||||||
|
hash = hash * 59 + this.MyString.GetHashCode();
|
||||||
|
if (this.MyBoolean != null)
|
||||||
|
hash = hash * 59 + this.MyBoolean.GetHashCode();
|
||||||
|
return hash;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Property changed event handler
|
||||||
|
/// </summary>
|
||||||
|
public event PropertyChangedEventHandler PropertyChanged;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Trigger when a property changed
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="propertyName">Property Name</param>
|
||||||
|
public virtual void OnPropertyChanged(string propertyName)
|
||||||
|
{
|
||||||
|
// NOTE: property changed is handled via "code weaving" using Fody.
|
||||||
|
// Properties with setters are modified at compile time to notify of changes.
|
||||||
|
var propertyChanged = PropertyChanged;
|
||||||
|
if (propertyChanged != null)
|
||||||
|
{
|
||||||
|
propertyChanged(this, new PropertyChangedEventArgs(propertyName));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// To validate all properties of the instance
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="validationContext">Validation context</param>
|
||||||
|
/// <returns>Validation Result</returns>
|
||||||
|
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
|
||||||
|
{
|
||||||
|
yield break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,135 @@
|
|||||||
|
/*
|
||||||
|
* Swagger Petstore
|
||||||
|
*
|
||||||
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||||
|
*
|
||||||
|
* OpenAPI spec version: 1.0.0
|
||||||
|
* Contact: apiteam@swagger.io
|
||||||
|
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||||
|
*/
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using System.Linq;
|
||||||
|
using System.IO;
|
||||||
|
using System.Text;
|
||||||
|
using System.Text.RegularExpressions;
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Collections.ObjectModel;
|
||||||
|
using System.Runtime.Serialization;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
using Newtonsoft.Json.Converters;
|
||||||
|
using PropertyChanged;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
|
||||||
|
namespace IO.Swagger.Model
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// OuterNumber
|
||||||
|
/// </summary>
|
||||||
|
[DataContract]
|
||||||
|
[ImplementPropertyChanged]
|
||||||
|
public partial class OuterNumber : IEquatable<OuterNumber>, IValidatableObject
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Initializes a new instance of the <see cref="OuterNumber" /> class.
|
||||||
|
/// </summary>
|
||||||
|
[JsonConstructorAttribute]
|
||||||
|
public OuterNumber()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns the string presentation of the object
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>String presentation of the object</returns>
|
||||||
|
public override string ToString()
|
||||||
|
{
|
||||||
|
var sb = new StringBuilder();
|
||||||
|
sb.Append("class OuterNumber {\n");
|
||||||
|
sb.Append("}\n");
|
||||||
|
return sb.ToString();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns the JSON string presentation of the object
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>JSON string presentation of the object</returns>
|
||||||
|
public string ToJson()
|
||||||
|
{
|
||||||
|
return JsonConvert.SerializeObject(this, Formatting.Indented);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns true if objects are equal
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="obj">Object to be compared</param>
|
||||||
|
/// <returns>Boolean</returns>
|
||||||
|
public override bool Equals(object obj)
|
||||||
|
{
|
||||||
|
// credit: http://stackoverflow.com/a/10454552/677735
|
||||||
|
return this.Equals(obj as OuterNumber);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns true if OuterNumber instances are equal
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="other">Instance of OuterNumber to be compared</param>
|
||||||
|
/// <returns>Boolean</returns>
|
||||||
|
public bool Equals(OuterNumber other)
|
||||||
|
{
|
||||||
|
// credit: http://stackoverflow.com/a/10454552/677735
|
||||||
|
if (other == null)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the hash code
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>Hash code</returns>
|
||||||
|
public override int GetHashCode()
|
||||||
|
{
|
||||||
|
// credit: http://stackoverflow.com/a/263416/677735
|
||||||
|
unchecked // Overflow is fine, just wrap
|
||||||
|
{
|
||||||
|
int hash = 41;
|
||||||
|
// Suitable nullity checks etc, of course :)
|
||||||
|
return hash;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Property changed event handler
|
||||||
|
/// </summary>
|
||||||
|
public event PropertyChangedEventHandler PropertyChanged;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Trigger when a property changed
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="propertyName">Property Name</param>
|
||||||
|
public virtual void OnPropertyChanged(string propertyName)
|
||||||
|
{
|
||||||
|
// NOTE: property changed is handled via "code weaving" using Fody.
|
||||||
|
// Properties with setters are modified at compile time to notify of changes.
|
||||||
|
var propertyChanged = PropertyChanged;
|
||||||
|
if (propertyChanged != null)
|
||||||
|
{
|
||||||
|
propertyChanged(this, new PropertyChangedEventArgs(propertyName));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// To validate all properties of the instance
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="validationContext">Validation context</param>
|
||||||
|
/// <returns>Validation Result</returns>
|
||||||
|
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
|
||||||
|
{
|
||||||
|
yield break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,135 @@
|
|||||||
|
/*
|
||||||
|
* Swagger Petstore
|
||||||
|
*
|
||||||
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||||
|
*
|
||||||
|
* OpenAPI spec version: 1.0.0
|
||||||
|
* Contact: apiteam@swagger.io
|
||||||
|
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||||
|
*/
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using System.Linq;
|
||||||
|
using System.IO;
|
||||||
|
using System.Text;
|
||||||
|
using System.Text.RegularExpressions;
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Collections.ObjectModel;
|
||||||
|
using System.Runtime.Serialization;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
using Newtonsoft.Json.Converters;
|
||||||
|
using PropertyChanged;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
|
||||||
|
namespace IO.Swagger.Model
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// OuterString
|
||||||
|
/// </summary>
|
||||||
|
[DataContract]
|
||||||
|
[ImplementPropertyChanged]
|
||||||
|
public partial class OuterString : IEquatable<OuterString>, IValidatableObject
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Initializes a new instance of the <see cref="OuterString" /> class.
|
||||||
|
/// </summary>
|
||||||
|
[JsonConstructorAttribute]
|
||||||
|
public OuterString()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns the string presentation of the object
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>String presentation of the object</returns>
|
||||||
|
public override string ToString()
|
||||||
|
{
|
||||||
|
var sb = new StringBuilder();
|
||||||
|
sb.Append("class OuterString {\n");
|
||||||
|
sb.Append("}\n");
|
||||||
|
return sb.ToString();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns the JSON string presentation of the object
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>JSON string presentation of the object</returns>
|
||||||
|
public string ToJson()
|
||||||
|
{
|
||||||
|
return JsonConvert.SerializeObject(this, Formatting.Indented);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns true if objects are equal
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="obj">Object to be compared</param>
|
||||||
|
/// <returns>Boolean</returns>
|
||||||
|
public override bool Equals(object obj)
|
||||||
|
{
|
||||||
|
// credit: http://stackoverflow.com/a/10454552/677735
|
||||||
|
return this.Equals(obj as OuterString);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns true if OuterString instances are equal
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="other">Instance of OuterString to be compared</param>
|
||||||
|
/// <returns>Boolean</returns>
|
||||||
|
public bool Equals(OuterString other)
|
||||||
|
{
|
||||||
|
// credit: http://stackoverflow.com/a/10454552/677735
|
||||||
|
if (other == null)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the hash code
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>Hash code</returns>
|
||||||
|
public override int GetHashCode()
|
||||||
|
{
|
||||||
|
// credit: http://stackoverflow.com/a/263416/677735
|
||||||
|
unchecked // Overflow is fine, just wrap
|
||||||
|
{
|
||||||
|
int hash = 41;
|
||||||
|
// Suitable nullity checks etc, of course :)
|
||||||
|
return hash;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Property changed event handler
|
||||||
|
/// </summary>
|
||||||
|
public event PropertyChangedEventHandler PropertyChanged;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Trigger when a property changed
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="propertyName">Property Name</param>
|
||||||
|
public virtual void OnPropertyChanged(string propertyName)
|
||||||
|
{
|
||||||
|
// NOTE: property changed is handled via "code weaving" using Fody.
|
||||||
|
// Properties with setters are modified at compile time to notify of changes.
|
||||||
|
var propertyChanged = PropertyChanged;
|
||||||
|
if (propertyChanged != null)
|
||||||
|
{
|
||||||
|
propertyChanged(this, new PropertyChangedEventArgs(propertyName));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// To validate all properties of the instance
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="validationContext">Validation context</param>
|
||||||
|
/// <returns>Validation Result</returns>
|
||||||
|
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
|
||||||
|
{
|
||||||
|
yield break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -8,6 +8,82 @@ defmodule SwaggerPetstore.Api.Fake do
|
|||||||
plug Tesla.Middleware.BaseUrl, "http://petstore.swagger.io:80/v2"
|
plug Tesla.Middleware.BaseUrl, "http://petstore.swagger.io:80/v2"
|
||||||
plug Tesla.Middleware.JSON
|
plug Tesla.Middleware.JSON
|
||||||
|
|
||||||
|
@doc """
|
||||||
|
|
||||||
|
|
||||||
|
Test serialization of outer boolean types
|
||||||
|
"""
|
||||||
|
def fake_outer_boolean_serialize(body) do
|
||||||
|
method = [method: :post]
|
||||||
|
url = [url: "/fake/outer/boolean"]
|
||||||
|
query_params = []
|
||||||
|
header_params = []
|
||||||
|
body_params = [body: body]
|
||||||
|
form_params = []
|
||||||
|
params = query_params ++ header_params ++ body_params ++ form_params
|
||||||
|
opts = []
|
||||||
|
options = method ++ url ++ params ++ opts
|
||||||
|
|
||||||
|
request(options)
|
||||||
|
end
|
||||||
|
|
||||||
|
@doc """
|
||||||
|
|
||||||
|
|
||||||
|
Test serialization of object with outer number type
|
||||||
|
"""
|
||||||
|
def fake_outer_composite_serialize(body) do
|
||||||
|
method = [method: :post]
|
||||||
|
url = [url: "/fake/outer/composite"]
|
||||||
|
query_params = []
|
||||||
|
header_params = []
|
||||||
|
body_params = [body: body]
|
||||||
|
form_params = []
|
||||||
|
params = query_params ++ header_params ++ body_params ++ form_params
|
||||||
|
opts = []
|
||||||
|
options = method ++ url ++ params ++ opts
|
||||||
|
|
||||||
|
request(options)
|
||||||
|
end
|
||||||
|
|
||||||
|
@doc """
|
||||||
|
|
||||||
|
|
||||||
|
Test serialization of outer number types
|
||||||
|
"""
|
||||||
|
def fake_outer_number_serialize(body) do
|
||||||
|
method = [method: :post]
|
||||||
|
url = [url: "/fake/outer/number"]
|
||||||
|
query_params = []
|
||||||
|
header_params = []
|
||||||
|
body_params = [body: body]
|
||||||
|
form_params = []
|
||||||
|
params = query_params ++ header_params ++ body_params ++ form_params
|
||||||
|
opts = []
|
||||||
|
options = method ++ url ++ params ++ opts
|
||||||
|
|
||||||
|
request(options)
|
||||||
|
end
|
||||||
|
|
||||||
|
@doc """
|
||||||
|
|
||||||
|
|
||||||
|
Test serialization of outer string types
|
||||||
|
"""
|
||||||
|
def fake_outer_string_serialize(body) do
|
||||||
|
method = [method: :post]
|
||||||
|
url = [url: "/fake/outer/string"]
|
||||||
|
query_params = []
|
||||||
|
header_params = []
|
||||||
|
body_params = [body: body]
|
||||||
|
form_params = []
|
||||||
|
params = query_params ++ header_params ++ body_params ++ form_params
|
||||||
|
opts = []
|
||||||
|
options = method ++ url ++ params ++ opts
|
||||||
|
|
||||||
|
request(options)
|
||||||
|
end
|
||||||
|
|
||||||
@doc """
|
@doc """
|
||||||
To test \"client\" model
|
To test \"client\" model
|
||||||
|
|
||||||
|
@ -21,6 +21,10 @@ All URIs are relative to *http://petstore.swagger.io:80/v2*
|
|||||||
|
|
||||||
Class | Method | HTTP request | Description
|
Class | Method | HTTP request | Description
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
|
*FakeApi* | [**FakeOuterBooleanSerialize**](docs/FakeApi.md#fakeouterbooleanserialize) | **Post** /fake/outer/boolean |
|
||||||
|
*FakeApi* | [**FakeOuterCompositeSerialize**](docs/FakeApi.md#fakeoutercompositeserialize) | **Post** /fake/outer/composite |
|
||||||
|
*FakeApi* | [**FakeOuterNumberSerialize**](docs/FakeApi.md#fakeouternumberserialize) | **Post** /fake/outer/number |
|
||||||
|
*FakeApi* | [**FakeOuterStringSerialize**](docs/FakeApi.md#fakeouterstringserialize) | **Post** /fake/outer/string |
|
||||||
*FakeApi* | [**TestClientModel**](docs/FakeApi.md#testclientmodel) | **Patch** /fake | To test \"client\" model
|
*FakeApi* | [**TestClientModel**](docs/FakeApi.md#testclientmodel) | **Patch** /fake | To test \"client\" model
|
||||||
*FakeApi* | [**TestEndpointParameters**](docs/FakeApi.md#testendpointparameters) | **Post** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
*FakeApi* | [**TestEndpointParameters**](docs/FakeApi.md#testendpointparameters) | **Post** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||||
*FakeApi* | [**TestEnumParameters**](docs/FakeApi.md#testenumparameters) | **Get** /fake | To test enum parameters
|
*FakeApi* | [**TestEnumParameters**](docs/FakeApi.md#testenumparameters) | **Get** /fake | To test enum parameters
|
||||||
@ -75,7 +79,11 @@ Class | Method | HTTP request | Description
|
|||||||
- [Name](docs/Name.md)
|
- [Name](docs/Name.md)
|
||||||
- [NumberOnly](docs/NumberOnly.md)
|
- [NumberOnly](docs/NumberOnly.md)
|
||||||
- [Order](docs/Order.md)
|
- [Order](docs/Order.md)
|
||||||
|
- [OuterBoolean](docs/OuterBoolean.md)
|
||||||
|
- [OuterComposite](docs/OuterComposite.md)
|
||||||
- [OuterEnum](docs/OuterEnum.md)
|
- [OuterEnum](docs/OuterEnum.md)
|
||||||
|
- [OuterNumber](docs/OuterNumber.md)
|
||||||
|
- [OuterString](docs/OuterString.md)
|
||||||
- [Pet](docs/Pet.md)
|
- [Pet](docs/Pet.md)
|
||||||
- [ReadOnlyFirst](docs/ReadOnlyFirst.md)
|
- [ReadOnlyFirst](docs/ReadOnlyFirst.md)
|
||||||
- [SpecialModelName](docs/SpecialModelName.md)
|
- [SpecialModelName](docs/SpecialModelName.md)
|
||||||
|
@ -4,11 +4,151 @@ All URIs are relative to *http://petstore.swagger.io:80/v2*
|
|||||||
|
|
||||||
Method | HTTP request | Description
|
Method | HTTP request | Description
|
||||||
------------- | ------------- | -------------
|
------------- | ------------- | -------------
|
||||||
|
[**FakeOuterBooleanSerialize**](FakeApi.md#FakeOuterBooleanSerialize) | **Post** /fake/outer/boolean |
|
||||||
|
[**FakeOuterCompositeSerialize**](FakeApi.md#FakeOuterCompositeSerialize) | **Post** /fake/outer/composite |
|
||||||
|
[**FakeOuterNumberSerialize**](FakeApi.md#FakeOuterNumberSerialize) | **Post** /fake/outer/number |
|
||||||
|
[**FakeOuterStringSerialize**](FakeApi.md#FakeOuterStringSerialize) | **Post** /fake/outer/string |
|
||||||
[**TestClientModel**](FakeApi.md#TestClientModel) | **Patch** /fake | To test \"client\" model
|
[**TestClientModel**](FakeApi.md#TestClientModel) | **Patch** /fake | To test \"client\" model
|
||||||
[**TestEndpointParameters**](FakeApi.md#TestEndpointParameters) | **Post** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
[**TestEndpointParameters**](FakeApi.md#TestEndpointParameters) | **Post** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||||
[**TestEnumParameters**](FakeApi.md#TestEnumParameters) | **Get** /fake | To test enum parameters
|
[**TestEnumParameters**](FakeApi.md#TestEnumParameters) | **Get** /fake | To test enum parameters
|
||||||
|
|
||||||
|
|
||||||
|
# **FakeOuterBooleanSerialize**
|
||||||
|
> OuterBoolean FakeOuterBooleanSerialize(optional)
|
||||||
|
|
||||||
|
|
||||||
|
Test serialization of outer boolean types
|
||||||
|
|
||||||
|
### Required Parameters
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**optional** | **map[string]interface{}** | optional parameters | nil if no parameters
|
||||||
|
|
||||||
|
### Optional Parameters
|
||||||
|
Optional parameters are passed through a map[string]interface{}.
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**body** | [**OuterBoolean**](OuterBoolean.md)| Input boolean as post body |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
[**OuterBoolean**](OuterBoolean.md)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
# **FakeOuterCompositeSerialize**
|
||||||
|
> OuterComposite FakeOuterCompositeSerialize(optional)
|
||||||
|
|
||||||
|
|
||||||
|
Test serialization of object with outer number type
|
||||||
|
|
||||||
|
### Required Parameters
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**optional** | **map[string]interface{}** | optional parameters | nil if no parameters
|
||||||
|
|
||||||
|
### Optional Parameters
|
||||||
|
Optional parameters are passed through a map[string]interface{}.
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**body** | [**OuterComposite**](OuterComposite.md)| Input composite as post body |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
[**OuterComposite**](OuterComposite.md)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
# **FakeOuterNumberSerialize**
|
||||||
|
> OuterNumber FakeOuterNumberSerialize(optional)
|
||||||
|
|
||||||
|
|
||||||
|
Test serialization of outer number types
|
||||||
|
|
||||||
|
### Required Parameters
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**optional** | **map[string]interface{}** | optional parameters | nil if no parameters
|
||||||
|
|
||||||
|
### Optional Parameters
|
||||||
|
Optional parameters are passed through a map[string]interface{}.
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**body** | [**OuterNumber**](OuterNumber.md)| Input number as post body |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
[**OuterNumber**](OuterNumber.md)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
# **FakeOuterStringSerialize**
|
||||||
|
> OuterString FakeOuterStringSerialize(optional)
|
||||||
|
|
||||||
|
|
||||||
|
Test serialization of outer string types
|
||||||
|
|
||||||
|
### Required Parameters
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**optional** | **map[string]interface{}** | optional parameters | nil if no parameters
|
||||||
|
|
||||||
|
### Optional Parameters
|
||||||
|
Optional parameters are passed through a map[string]interface{}.
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**body** | [**OuterString**](OuterString.md)| Input string as post body |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
[**OuterString**](OuterString.md)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||||
|
|
||||||
# **TestClientModel**
|
# **TestClientModel**
|
||||||
> Client TestClientModel(body)
|
> Client TestClientModel(body)
|
||||||
To test \"client\" model
|
To test \"client\" model
|
||||||
|
@ -0,0 +1,9 @@
|
|||||||
|
# OuterBoolean
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
@ -0,0 +1,12 @@
|
|||||||
|
# OuterComposite
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**MyNumber** | [***OuterNumber**](OuterNumber.md) | | [optional] [default to null]
|
||||||
|
**MyString** | [***OuterString**](OuterString.md) | | [optional] [default to null]
|
||||||
|
**MyBoolean** | [***OuterBoolean**](OuterBoolean.md) | | [optional] [default to null]
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
@ -0,0 +1,9 @@
|
|||||||
|
# OuterNumber
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
@ -0,0 +1,9 @@
|
|||||||
|
# OuterString
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
@ -27,6 +27,274 @@ var (
|
|||||||
type FakeApiService service
|
type FakeApiService service
|
||||||
|
|
||||||
|
|
||||||
|
/* FakeApiService
|
||||||
|
Test serialization of outer boolean types
|
||||||
|
|
||||||
|
@param optional (nil or map[string]interface{}) with one or more of:
|
||||||
|
@param "body" (OuterBoolean) Input boolean as post body
|
||||||
|
@return OuterBoolean*/
|
||||||
|
func (a *FakeApiService) FakeOuterBooleanSerialize(localVarOptionals map[string]interface{}) (OuterBoolean, *http.Response, error) {
|
||||||
|
var (
|
||||||
|
localVarHttpMethod = strings.ToUpper("Post")
|
||||||
|
localVarPostBody interface{}
|
||||||
|
localVarFileName string
|
||||||
|
localVarFileBytes []byte
|
||||||
|
successPayload OuterBoolean
|
||||||
|
)
|
||||||
|
|
||||||
|
// create path and map variables
|
||||||
|
localVarPath := a.client.cfg.BasePath + "/fake/outer/boolean"
|
||||||
|
|
||||||
|
localVarHeaderParams := make(map[string]string)
|
||||||
|
localVarQueryParams := url.Values{}
|
||||||
|
localVarFormParams := url.Values{}
|
||||||
|
|
||||||
|
|
||||||
|
// to determine the Content-Type header
|
||||||
|
localVarHttpContentTypes := []string{ }
|
||||||
|
|
||||||
|
// set Content-Type header
|
||||||
|
localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
|
||||||
|
if localVarHttpContentType != "" {
|
||||||
|
localVarHeaderParams["Content-Type"] = localVarHttpContentType
|
||||||
|
}
|
||||||
|
|
||||||
|
// to determine the Accept header
|
||||||
|
localVarHttpHeaderAccepts := []string{
|
||||||
|
}
|
||||||
|
|
||||||
|
// set Accept header
|
||||||
|
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
|
||||||
|
if localVarHttpHeaderAccept != "" {
|
||||||
|
localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
|
||||||
|
}
|
||||||
|
// body params
|
||||||
|
if localVarTempParam, localVarOk := localVarOptionals["body"].(OuterBoolean); localVarOk {
|
||||||
|
localVarPostBody = &localVarTempParam
|
||||||
|
}
|
||||||
|
r, err := a.client.prepareRequest(nil, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
|
||||||
|
if err != nil {
|
||||||
|
return successPayload, nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarHttpResponse, err := a.client.callAPI(r)
|
||||||
|
if err != nil || localVarHttpResponse == nil {
|
||||||
|
return successPayload, localVarHttpResponse, err
|
||||||
|
}
|
||||||
|
defer localVarHttpResponse.Body.Close()
|
||||||
|
if localVarHttpResponse.StatusCode >= 300 {
|
||||||
|
return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status)
|
||||||
|
}
|
||||||
|
|
||||||
|
if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil {
|
||||||
|
return successPayload, localVarHttpResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
return successPayload, localVarHttpResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
/* FakeApiService
|
||||||
|
Test serialization of object with outer number type
|
||||||
|
|
||||||
|
@param optional (nil or map[string]interface{}) with one or more of:
|
||||||
|
@param "body" (OuterComposite) Input composite as post body
|
||||||
|
@return OuterComposite*/
|
||||||
|
func (a *FakeApiService) FakeOuterCompositeSerialize(localVarOptionals map[string]interface{}) (OuterComposite, *http.Response, error) {
|
||||||
|
var (
|
||||||
|
localVarHttpMethod = strings.ToUpper("Post")
|
||||||
|
localVarPostBody interface{}
|
||||||
|
localVarFileName string
|
||||||
|
localVarFileBytes []byte
|
||||||
|
successPayload OuterComposite
|
||||||
|
)
|
||||||
|
|
||||||
|
// create path and map variables
|
||||||
|
localVarPath := a.client.cfg.BasePath + "/fake/outer/composite"
|
||||||
|
|
||||||
|
localVarHeaderParams := make(map[string]string)
|
||||||
|
localVarQueryParams := url.Values{}
|
||||||
|
localVarFormParams := url.Values{}
|
||||||
|
|
||||||
|
|
||||||
|
// to determine the Content-Type header
|
||||||
|
localVarHttpContentTypes := []string{ }
|
||||||
|
|
||||||
|
// set Content-Type header
|
||||||
|
localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
|
||||||
|
if localVarHttpContentType != "" {
|
||||||
|
localVarHeaderParams["Content-Type"] = localVarHttpContentType
|
||||||
|
}
|
||||||
|
|
||||||
|
// to determine the Accept header
|
||||||
|
localVarHttpHeaderAccepts := []string{
|
||||||
|
}
|
||||||
|
|
||||||
|
// set Accept header
|
||||||
|
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
|
||||||
|
if localVarHttpHeaderAccept != "" {
|
||||||
|
localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
|
||||||
|
}
|
||||||
|
// body params
|
||||||
|
if localVarTempParam, localVarOk := localVarOptionals["body"].(OuterComposite); localVarOk {
|
||||||
|
localVarPostBody = &localVarTempParam
|
||||||
|
}
|
||||||
|
r, err := a.client.prepareRequest(nil, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
|
||||||
|
if err != nil {
|
||||||
|
return successPayload, nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarHttpResponse, err := a.client.callAPI(r)
|
||||||
|
if err != nil || localVarHttpResponse == nil {
|
||||||
|
return successPayload, localVarHttpResponse, err
|
||||||
|
}
|
||||||
|
defer localVarHttpResponse.Body.Close()
|
||||||
|
if localVarHttpResponse.StatusCode >= 300 {
|
||||||
|
return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status)
|
||||||
|
}
|
||||||
|
|
||||||
|
if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil {
|
||||||
|
return successPayload, localVarHttpResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
return successPayload, localVarHttpResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
/* FakeApiService
|
||||||
|
Test serialization of outer number types
|
||||||
|
|
||||||
|
@param optional (nil or map[string]interface{}) with one or more of:
|
||||||
|
@param "body" (OuterNumber) Input number as post body
|
||||||
|
@return OuterNumber*/
|
||||||
|
func (a *FakeApiService) FakeOuterNumberSerialize(localVarOptionals map[string]interface{}) (OuterNumber, *http.Response, error) {
|
||||||
|
var (
|
||||||
|
localVarHttpMethod = strings.ToUpper("Post")
|
||||||
|
localVarPostBody interface{}
|
||||||
|
localVarFileName string
|
||||||
|
localVarFileBytes []byte
|
||||||
|
successPayload OuterNumber
|
||||||
|
)
|
||||||
|
|
||||||
|
// create path and map variables
|
||||||
|
localVarPath := a.client.cfg.BasePath + "/fake/outer/number"
|
||||||
|
|
||||||
|
localVarHeaderParams := make(map[string]string)
|
||||||
|
localVarQueryParams := url.Values{}
|
||||||
|
localVarFormParams := url.Values{}
|
||||||
|
|
||||||
|
|
||||||
|
// to determine the Content-Type header
|
||||||
|
localVarHttpContentTypes := []string{ }
|
||||||
|
|
||||||
|
// set Content-Type header
|
||||||
|
localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
|
||||||
|
if localVarHttpContentType != "" {
|
||||||
|
localVarHeaderParams["Content-Type"] = localVarHttpContentType
|
||||||
|
}
|
||||||
|
|
||||||
|
// to determine the Accept header
|
||||||
|
localVarHttpHeaderAccepts := []string{
|
||||||
|
}
|
||||||
|
|
||||||
|
// set Accept header
|
||||||
|
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
|
||||||
|
if localVarHttpHeaderAccept != "" {
|
||||||
|
localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
|
||||||
|
}
|
||||||
|
// body params
|
||||||
|
if localVarTempParam, localVarOk := localVarOptionals["body"].(OuterNumber); localVarOk {
|
||||||
|
localVarPostBody = &localVarTempParam
|
||||||
|
}
|
||||||
|
r, err := a.client.prepareRequest(nil, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
|
||||||
|
if err != nil {
|
||||||
|
return successPayload, nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarHttpResponse, err := a.client.callAPI(r)
|
||||||
|
if err != nil || localVarHttpResponse == nil {
|
||||||
|
return successPayload, localVarHttpResponse, err
|
||||||
|
}
|
||||||
|
defer localVarHttpResponse.Body.Close()
|
||||||
|
if localVarHttpResponse.StatusCode >= 300 {
|
||||||
|
return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status)
|
||||||
|
}
|
||||||
|
|
||||||
|
if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil {
|
||||||
|
return successPayload, localVarHttpResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
return successPayload, localVarHttpResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
/* FakeApiService
|
||||||
|
Test serialization of outer string types
|
||||||
|
|
||||||
|
@param optional (nil or map[string]interface{}) with one or more of:
|
||||||
|
@param "body" (OuterString) Input string as post body
|
||||||
|
@return OuterString*/
|
||||||
|
func (a *FakeApiService) FakeOuterStringSerialize(localVarOptionals map[string]interface{}) (OuterString, *http.Response, error) {
|
||||||
|
var (
|
||||||
|
localVarHttpMethod = strings.ToUpper("Post")
|
||||||
|
localVarPostBody interface{}
|
||||||
|
localVarFileName string
|
||||||
|
localVarFileBytes []byte
|
||||||
|
successPayload OuterString
|
||||||
|
)
|
||||||
|
|
||||||
|
// create path and map variables
|
||||||
|
localVarPath := a.client.cfg.BasePath + "/fake/outer/string"
|
||||||
|
|
||||||
|
localVarHeaderParams := make(map[string]string)
|
||||||
|
localVarQueryParams := url.Values{}
|
||||||
|
localVarFormParams := url.Values{}
|
||||||
|
|
||||||
|
|
||||||
|
// to determine the Content-Type header
|
||||||
|
localVarHttpContentTypes := []string{ }
|
||||||
|
|
||||||
|
// set Content-Type header
|
||||||
|
localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
|
||||||
|
if localVarHttpContentType != "" {
|
||||||
|
localVarHeaderParams["Content-Type"] = localVarHttpContentType
|
||||||
|
}
|
||||||
|
|
||||||
|
// to determine the Accept header
|
||||||
|
localVarHttpHeaderAccepts := []string{
|
||||||
|
}
|
||||||
|
|
||||||
|
// set Accept header
|
||||||
|
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
|
||||||
|
if localVarHttpHeaderAccept != "" {
|
||||||
|
localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
|
||||||
|
}
|
||||||
|
// body params
|
||||||
|
if localVarTempParam, localVarOk := localVarOptionals["body"].(OuterString); localVarOk {
|
||||||
|
localVarPostBody = &localVarTempParam
|
||||||
|
}
|
||||||
|
r, err := a.client.prepareRequest(nil, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
|
||||||
|
if err != nil {
|
||||||
|
return successPayload, nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarHttpResponse, err := a.client.callAPI(r)
|
||||||
|
if err != nil || localVarHttpResponse == nil {
|
||||||
|
return successPayload, localVarHttpResponse, err
|
||||||
|
}
|
||||||
|
defer localVarHttpResponse.Body.Close()
|
||||||
|
if localVarHttpResponse.StatusCode >= 300 {
|
||||||
|
return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status)
|
||||||
|
}
|
||||||
|
|
||||||
|
if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil {
|
||||||
|
return successPayload, localVarHttpResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
return successPayload, localVarHttpResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
/* FakeApiService To test \"client\" model
|
/* FakeApiService To test \"client\" model
|
||||||
To test \"client\" model
|
To test \"client\" model
|
||||||
|
|
||||||
|
14
samples/client/petstore/go/go-petstore/outer_boolean.go
Normal file
14
samples/client/petstore/go/go-petstore/outer_boolean.go
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
/*
|
||||||
|
* Swagger Petstore
|
||||||
|
*
|
||||||
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||||
|
*
|
||||||
|
* OpenAPI spec version: 1.0.0
|
||||||
|
* Contact: apiteam@swagger.io
|
||||||
|
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||||
|
*/
|
||||||
|
|
||||||
|
package petstore
|
||||||
|
|
||||||
|
type OuterBoolean struct {
|
||||||
|
}
|
20
samples/client/petstore/go/go-petstore/outer_composite.go
Normal file
20
samples/client/petstore/go/go-petstore/outer_composite.go
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
/*
|
||||||
|
* Swagger Petstore
|
||||||
|
*
|
||||||
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||||
|
*
|
||||||
|
* OpenAPI spec version: 1.0.0
|
||||||
|
* Contact: apiteam@swagger.io
|
||||||
|
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||||
|
*/
|
||||||
|
|
||||||
|
package petstore
|
||||||
|
|
||||||
|
type OuterComposite struct {
|
||||||
|
|
||||||
|
MyNumber *OuterNumber `json:"my_number,omitempty"`
|
||||||
|
|
||||||
|
MyString *OuterString `json:"my_string,omitempty"`
|
||||||
|
|
||||||
|
MyBoolean *OuterBoolean `json:"my_boolean,omitempty"`
|
||||||
|
}
|
14
samples/client/petstore/go/go-petstore/outer_number.go
Normal file
14
samples/client/petstore/go/go-petstore/outer_number.go
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
/*
|
||||||
|
* Swagger Petstore
|
||||||
|
*
|
||||||
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||||
|
*
|
||||||
|
* OpenAPI spec version: 1.0.0
|
||||||
|
* Contact: apiteam@swagger.io
|
||||||
|
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||||
|
*/
|
||||||
|
|
||||||
|
package petstore
|
||||||
|
|
||||||
|
type OuterNumber struct {
|
||||||
|
}
|
14
samples/client/petstore/go/go-petstore/outer_string.go
Normal file
14
samples/client/petstore/go/go-petstore/outer_string.go
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
/*
|
||||||
|
* Swagger Petstore
|
||||||
|
*
|
||||||
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||||
|
*
|
||||||
|
* OpenAPI spec version: 1.0.0
|
||||||
|
* Contact: apiteam@swagger.io
|
||||||
|
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||||
|
*/
|
||||||
|
|
||||||
|
package petstore
|
||||||
|
|
||||||
|
type OuterString struct {
|
||||||
|
}
|
@ -133,6 +133,7 @@ public class ApiClient {
|
|||||||
objectMapper.enable(SerializationFeature.WRITE_ENUMS_USING_TO_STRING);
|
objectMapper.enable(SerializationFeature.WRITE_ENUMS_USING_TO_STRING);
|
||||||
objectMapper.enable(DeserializationFeature.READ_ENUMS_USING_TO_STRING);
|
objectMapper.enable(DeserializationFeature.READ_ENUMS_USING_TO_STRING);
|
||||||
objectMapper.disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES);
|
objectMapper.disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES);
|
||||||
|
objectMapper.disable(DeserializationFeature.FAIL_ON_INVALID_SUBTYPE);
|
||||||
objectMapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS);
|
objectMapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS);
|
||||||
objectMapper.setDateFormat(new RFC3339DateFormat());
|
objectMapper.setDateFormat(new RFC3339DateFormat());
|
||||||
ThreeTenModule module = new ThreeTenModule();
|
ThreeTenModule module = new ThreeTenModule();
|
||||||
|
@ -7,6 +7,7 @@ import java.math.BigDecimal;
|
|||||||
import io.swagger.client.model.Client;
|
import io.swagger.client.model.Client;
|
||||||
import org.threeten.bp.LocalDate;
|
import org.threeten.bp.LocalDate;
|
||||||
import org.threeten.bp.OffsetDateTime;
|
import org.threeten.bp.OffsetDateTime;
|
||||||
|
import io.swagger.client.model.OuterComposite;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
@ -18,6 +19,58 @@ import feign.*;
|
|||||||
public interface FakeApi extends ApiClient.Api {
|
public interface FakeApi extends ApiClient.Api {
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Test serialization of outer boolean types
|
||||||
|
* @param body Input boolean as post body (optional)
|
||||||
|
* @return Boolean
|
||||||
|
*/
|
||||||
|
@RequestLine("POST /fake/outer/boolean")
|
||||||
|
@Headers({
|
||||||
|
"Content-Type: application/json",
|
||||||
|
"Accept: application/json",
|
||||||
|
})
|
||||||
|
Boolean fakeOuterBooleanSerialize(Boolean body);
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Test serialization of object with outer number type
|
||||||
|
* @param body Input composite as post body (optional)
|
||||||
|
* @return OuterComposite
|
||||||
|
*/
|
||||||
|
@RequestLine("POST /fake/outer/composite")
|
||||||
|
@Headers({
|
||||||
|
"Content-Type: application/json",
|
||||||
|
"Accept: application/json",
|
||||||
|
})
|
||||||
|
OuterComposite fakeOuterCompositeSerialize(OuterComposite body);
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Test serialization of outer number types
|
||||||
|
* @param body Input number as post body (optional)
|
||||||
|
* @return BigDecimal
|
||||||
|
*/
|
||||||
|
@RequestLine("POST /fake/outer/number")
|
||||||
|
@Headers({
|
||||||
|
"Content-Type: application/json",
|
||||||
|
"Accept: application/json",
|
||||||
|
})
|
||||||
|
BigDecimal fakeOuterNumberSerialize(BigDecimal body);
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Test serialization of outer string types
|
||||||
|
* @param body Input string as post body (optional)
|
||||||
|
* @return String
|
||||||
|
*/
|
||||||
|
@RequestLine("POST /fake/outer/string")
|
||||||
|
@Headers({
|
||||||
|
"Content-Type: application/json",
|
||||||
|
"Accept: application/json",
|
||||||
|
})
|
||||||
|
String fakeOuterStringSerialize(String body);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* To test \"client\" model
|
* To test \"client\" model
|
||||||
* To test \"client\" model
|
* To test \"client\" model
|
||||||
|
@ -0,0 +1,137 @@
|
|||||||
|
/*
|
||||||
|
* Swagger Petstore
|
||||||
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||||
|
*
|
||||||
|
* OpenAPI spec version: 1.0.0
|
||||||
|
* Contact: apiteam@swagger.io
|
||||||
|
*
|
||||||
|
* NOTE: This class is auto generated by the swagger code generator program.
|
||||||
|
* https://github.com/swagger-api/swagger-codegen.git
|
||||||
|
* Do not edit the class manually.
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
package io.swagger.client.model;
|
||||||
|
|
||||||
|
import java.util.Objects;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonValue;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* OuterComposite
|
||||||
|
*/
|
||||||
|
|
||||||
|
public class OuterComposite {
|
||||||
|
@JsonProperty("my_number")
|
||||||
|
private BigDecimal myNumber = null;
|
||||||
|
|
||||||
|
@JsonProperty("my_string")
|
||||||
|
private String myString = null;
|
||||||
|
|
||||||
|
@JsonProperty("my_boolean")
|
||||||
|
private Boolean myBoolean = null;
|
||||||
|
|
||||||
|
public OuterComposite myNumber(BigDecimal myNumber) {
|
||||||
|
this.myNumber = myNumber;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get myNumber
|
||||||
|
* @return myNumber
|
||||||
|
**/
|
||||||
|
@ApiModelProperty(value = "")
|
||||||
|
public BigDecimal getMyNumber() {
|
||||||
|
return myNumber;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMyNumber(BigDecimal myNumber) {
|
||||||
|
this.myNumber = myNumber;
|
||||||
|
}
|
||||||
|
|
||||||
|
public OuterComposite myString(String myString) {
|
||||||
|
this.myString = myString;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get myString
|
||||||
|
* @return myString
|
||||||
|
**/
|
||||||
|
@ApiModelProperty(value = "")
|
||||||
|
public String getMyString() {
|
||||||
|
return myString;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMyString(String myString) {
|
||||||
|
this.myString = myString;
|
||||||
|
}
|
||||||
|
|
||||||
|
public OuterComposite myBoolean(Boolean myBoolean) {
|
||||||
|
this.myBoolean = myBoolean;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get myBoolean
|
||||||
|
* @return myBoolean
|
||||||
|
**/
|
||||||
|
@ApiModelProperty(value = "")
|
||||||
|
public Boolean getMyBoolean() {
|
||||||
|
return myBoolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMyBoolean(Boolean myBoolean) {
|
||||||
|
this.myBoolean = myBoolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(java.lang.Object o) {
|
||||||
|
if (this == o) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (o == null || getClass() != o.getClass()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
OuterComposite outerComposite = (OuterComposite) o;
|
||||||
|
return Objects.equals(this.myNumber, outerComposite.myNumber) &&
|
||||||
|
Objects.equals(this.myString, outerComposite.myString) &&
|
||||||
|
Objects.equals(this.myBoolean, outerComposite.myBoolean);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
return Objects.hash(myNumber, myString, myBoolean);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
sb.append("class OuterComposite {\n");
|
||||||
|
|
||||||
|
sb.append(" myNumber: ").append(toIndentedString(myNumber)).append("\n");
|
||||||
|
sb.append(" myString: ").append(toIndentedString(myString)).append("\n");
|
||||||
|
sb.append(" myBoolean: ").append(toIndentedString(myBoolean)).append("\n");
|
||||||
|
sb.append("}");
|
||||||
|
return sb.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Convert the given object to string with each line indented by 4 spaces
|
||||||
|
* (except the first line).
|
||||||
|
*/
|
||||||
|
private String toIndentedString(java.lang.Object o) {
|
||||||
|
if (o == null) {
|
||||||
|
return "null";
|
||||||
|
}
|
||||||
|
return o.toString().replace("\n", "\n ");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -1,10 +1,11 @@
|
|||||||
package io.swagger.client.api;
|
package io.swagger.client.api;
|
||||||
|
|
||||||
import io.swagger.client.ApiClient;
|
import io.swagger.client.ApiClient;
|
||||||
import io.swagger.client.model.Client;
|
|
||||||
import org.threeten.bp.OffsetDateTime;
|
|
||||||
import org.threeten.bp.LocalDate;
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
import io.swagger.client.model.Client;
|
||||||
|
import org.threeten.bp.LocalDate;
|
||||||
|
import org.threeten.bp.OffsetDateTime;
|
||||||
|
import io.swagger.client.model.OuterComposite;
|
||||||
import org.junit.Before;
|
import org.junit.Before;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
@ -26,10 +27,66 @@ public class FakeApiTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* Test serialization of outer boolean types
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void fakeOuterBooleanSerializeTest() {
|
||||||
|
Boolean body = null;
|
||||||
|
// Boolean response = api.fakeOuterBooleanSerialize(body);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* Test serialization of object with outer number type
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void fakeOuterCompositeSerializeTest() {
|
||||||
|
OuterComposite body = null;
|
||||||
|
// OuterComposite response = api.fakeOuterCompositeSerialize(body);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* Test serialization of outer number types
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void fakeOuterNumberSerializeTest() {
|
||||||
|
BigDecimal body = null;
|
||||||
|
// BigDecimal response = api.fakeOuterNumberSerialize(body);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* Test serialization of outer string types
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void fakeOuterStringSerializeTest() {
|
||||||
|
String body = null;
|
||||||
|
// String response = api.fakeOuterStringSerialize(body);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* To test \"client\" model
|
* To test \"client\" model
|
||||||
*
|
*
|
||||||
*
|
* To test \"client\" model
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void testClientModelTest() {
|
public void testClientModelTest() {
|
||||||
@ -39,6 +96,7 @@ public class FakeApiTest {
|
|||||||
// TODO: test validations
|
// TODO: test validations
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||||
*
|
*
|
||||||
@ -65,10 +123,11 @@ public class FakeApiTest {
|
|||||||
// TODO: test validations
|
// TODO: test validations
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* To test enum parameters
|
* To test enum parameters
|
||||||
*
|
*
|
||||||
*
|
* To test enum parameters
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void testEnumParametersTest() {
|
public void testEnumParametersTest() {
|
||||||
@ -78,11 +137,35 @@ public class FakeApiTest {
|
|||||||
String enumHeaderString = null;
|
String enumHeaderString = null;
|
||||||
List<String> enumQueryStringArray = null;
|
List<String> enumQueryStringArray = null;
|
||||||
String enumQueryString = null;
|
String enumQueryString = null;
|
||||||
BigDecimal enumQueryInteger = null;
|
Integer enumQueryInteger = null;
|
||||||
Double enumQueryDouble = null;
|
Double enumQueryDouble = null;
|
||||||
// api.testEnumParameters(enumFormStringArray, enumFormString, enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble);
|
// api.testEnumParameters(enumFormStringArray, enumFormString, enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble);
|
||||||
|
|
||||||
// TODO: test validations
|
// TODO: test validations
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* To test enum parameters
|
||||||
|
*
|
||||||
|
* To test enum parameters
|
||||||
|
*
|
||||||
|
* This tests the overload of the method that uses a Map for query parameters instead of
|
||||||
|
* listing them out individually.
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void testEnumParametersTestQueryMap() {
|
||||||
|
List<String> enumFormStringArray = null;
|
||||||
|
String enumFormString = null;
|
||||||
|
List<String> enumHeaderStringArray = null;
|
||||||
|
String enumHeaderString = null;
|
||||||
|
Double enumQueryDouble = null;
|
||||||
|
FakeApi.TestEnumParametersQueryParams queryParams = new FakeApi.TestEnumParametersQueryParams()
|
||||||
|
.enumQueryStringArray(null)
|
||||||
|
.enumQueryString(null)
|
||||||
|
.enumQueryInteger(null);
|
||||||
|
// api.testEnumParameters(enumFormStringArray, enumFormString, enumHeaderStringArray, enumHeaderString, enumQueryDouble, queryParams);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -4,11 +4,195 @@ All URIs are relative to *http://petstore.swagger.io:80/v2*
|
|||||||
|
|
||||||
Method | HTTP request | Description
|
Method | HTTP request | Description
|
||||||
------------- | ------------- | -------------
|
------------- | ------------- | -------------
|
||||||
|
[**fakeOuterBooleanSerialize**](FakeApi.md#fakeOuterBooleanSerialize) | **POST** /fake/outer/boolean |
|
||||||
|
[**fakeOuterCompositeSerialize**](FakeApi.md#fakeOuterCompositeSerialize) | **POST** /fake/outer/composite |
|
||||||
|
[**fakeOuterNumberSerialize**](FakeApi.md#fakeOuterNumberSerialize) | **POST** /fake/outer/number |
|
||||||
|
[**fakeOuterStringSerialize**](FakeApi.md#fakeOuterStringSerialize) | **POST** /fake/outer/string |
|
||||||
[**testClientModel**](FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model
|
[**testClientModel**](FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model
|
||||||
[**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
[**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||||
[**testEnumParameters**](FakeApi.md#testEnumParameters) | **GET** /fake | To test enum parameters
|
[**testEnumParameters**](FakeApi.md#testEnumParameters) | **GET** /fake | To test enum parameters
|
||||||
|
|
||||||
|
|
||||||
|
<a name="fakeOuterBooleanSerialize"></a>
|
||||||
|
# **fakeOuterBooleanSerialize**
|
||||||
|
> Boolean fakeOuterBooleanSerialize(body)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Test serialization of outer boolean types
|
||||||
|
|
||||||
|
### Example
|
||||||
|
```java
|
||||||
|
// Import classes:
|
||||||
|
//import io.swagger.client.ApiException;
|
||||||
|
//import io.swagger.client.api.FakeApi;
|
||||||
|
|
||||||
|
|
||||||
|
FakeApi apiInstance = new FakeApi();
|
||||||
|
Boolean body = true; // Boolean | Input boolean as post body
|
||||||
|
try {
|
||||||
|
Boolean result = apiInstance.fakeOuterBooleanSerialize(body);
|
||||||
|
System.out.println(result);
|
||||||
|
} catch (ApiException e) {
|
||||||
|
System.err.println("Exception when calling FakeApi#fakeOuterBooleanSerialize");
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**body** | [**Boolean**](Boolean.md)| Input boolean as post body | [optional]
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
**Boolean**
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
<a name="fakeOuterCompositeSerialize"></a>
|
||||||
|
# **fakeOuterCompositeSerialize**
|
||||||
|
> OuterComposite fakeOuterCompositeSerialize(body)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Test serialization of object with outer number type
|
||||||
|
|
||||||
|
### Example
|
||||||
|
```java
|
||||||
|
// Import classes:
|
||||||
|
//import io.swagger.client.ApiException;
|
||||||
|
//import io.swagger.client.api.FakeApi;
|
||||||
|
|
||||||
|
|
||||||
|
FakeApi apiInstance = new FakeApi();
|
||||||
|
OuterComposite body = new OuterComposite(); // OuterComposite | Input composite as post body
|
||||||
|
try {
|
||||||
|
OuterComposite result = apiInstance.fakeOuterCompositeSerialize(body);
|
||||||
|
System.out.println(result);
|
||||||
|
} catch (ApiException e) {
|
||||||
|
System.err.println("Exception when calling FakeApi#fakeOuterCompositeSerialize");
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**body** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional]
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
[**OuterComposite**](OuterComposite.md)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
<a name="fakeOuterNumberSerialize"></a>
|
||||||
|
# **fakeOuterNumberSerialize**
|
||||||
|
> BigDecimal fakeOuterNumberSerialize(body)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Test serialization of outer number types
|
||||||
|
|
||||||
|
### Example
|
||||||
|
```java
|
||||||
|
// Import classes:
|
||||||
|
//import io.swagger.client.ApiException;
|
||||||
|
//import io.swagger.client.api.FakeApi;
|
||||||
|
|
||||||
|
|
||||||
|
FakeApi apiInstance = new FakeApi();
|
||||||
|
BigDecimal body = new BigDecimal(); // BigDecimal | Input number as post body
|
||||||
|
try {
|
||||||
|
BigDecimal result = apiInstance.fakeOuterNumberSerialize(body);
|
||||||
|
System.out.println(result);
|
||||||
|
} catch (ApiException e) {
|
||||||
|
System.err.println("Exception when calling FakeApi#fakeOuterNumberSerialize");
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**body** | [**BigDecimal**](BigDecimal.md)| Input number as post body | [optional]
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
[**BigDecimal**](BigDecimal.md)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
<a name="fakeOuterStringSerialize"></a>
|
||||||
|
# **fakeOuterStringSerialize**
|
||||||
|
> String fakeOuterStringSerialize(body)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Test serialization of outer string types
|
||||||
|
|
||||||
|
### Example
|
||||||
|
```java
|
||||||
|
// Import classes:
|
||||||
|
//import io.swagger.client.ApiException;
|
||||||
|
//import io.swagger.client.api.FakeApi;
|
||||||
|
|
||||||
|
|
||||||
|
FakeApi apiInstance = new FakeApi();
|
||||||
|
String body = "body_example"; // String | Input string as post body
|
||||||
|
try {
|
||||||
|
String result = apiInstance.fakeOuterStringSerialize(body);
|
||||||
|
System.out.println(result);
|
||||||
|
} catch (ApiException e) {
|
||||||
|
System.err.println("Exception when calling FakeApi#fakeOuterStringSerialize");
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**body** | [**String**](String.md)| Input string as post body | [optional]
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
**String**
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
<a name="testClientModel"></a>
|
<a name="testClientModel"></a>
|
||||||
# **testClientModel**
|
# **testClientModel**
|
||||||
> Client testClientModel(body)
|
> Client testClientModel(body)
|
||||||
|
12
samples/client/petstore/java/jersey1/docs/OuterComposite.md
Normal file
12
samples/client/petstore/java/jersey1/docs/OuterComposite.md
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
|
||||||
|
# OuterComposite
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**myNumber** | [**BigDecimal**](BigDecimal.md) | | [optional]
|
||||||
|
**myString** | **String** | | [optional]
|
||||||
|
**myBoolean** | **Boolean** | | [optional]
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -76,6 +76,7 @@ public class ApiClient {
|
|||||||
objectMapper = new ObjectMapper();
|
objectMapper = new ObjectMapper();
|
||||||
objectMapper.setSerializationInclusion(JsonInclude.Include.NON_NULL);
|
objectMapper.setSerializationInclusion(JsonInclude.Include.NON_NULL);
|
||||||
objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
|
objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
|
||||||
|
objectMapper.configure(DeserializationFeature.FAIL_ON_INVALID_SUBTYPE, false);
|
||||||
objectMapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS);
|
objectMapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS);
|
||||||
objectMapper.enable(SerializationFeature.WRITE_ENUMS_USING_TO_STRING);
|
objectMapper.enable(SerializationFeature.WRITE_ENUMS_USING_TO_STRING);
|
||||||
objectMapper.enable(DeserializationFeature.READ_ENUMS_USING_TO_STRING);
|
objectMapper.enable(DeserializationFeature.READ_ENUMS_USING_TO_STRING);
|
||||||
|
@ -24,6 +24,7 @@ import java.math.BigDecimal;
|
|||||||
import io.swagger.client.model.Client;
|
import io.swagger.client.model.Client;
|
||||||
import org.threeten.bp.LocalDate;
|
import org.threeten.bp.LocalDate;
|
||||||
import org.threeten.bp.OffsetDateTime;
|
import org.threeten.bp.OffsetDateTime;
|
||||||
|
import io.swagger.client.model.OuterComposite;
|
||||||
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
@ -51,6 +52,150 @@ public class FakeApi {
|
|||||||
this.apiClient = apiClient;
|
this.apiClient = apiClient;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Test serialization of outer boolean types
|
||||||
|
* @param body Input boolean as post body (optional)
|
||||||
|
* @return Boolean
|
||||||
|
* @throws ApiException if fails to make API call
|
||||||
|
*/
|
||||||
|
public Boolean fakeOuterBooleanSerialize(Boolean body) throws ApiException {
|
||||||
|
Object localVarPostBody = body;
|
||||||
|
|
||||||
|
// create path and map variables
|
||||||
|
String localVarPath = "/fake/outer/boolean";
|
||||||
|
|
||||||
|
// query params
|
||||||
|
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
||||||
|
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
||||||
|
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
final String[] localVarAccepts = {
|
||||||
|
|
||||||
|
};
|
||||||
|
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
||||||
|
|
||||||
|
final String[] localVarContentTypes = {
|
||||||
|
|
||||||
|
};
|
||||||
|
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
|
|
||||||
|
String[] localVarAuthNames = new String[] { };
|
||||||
|
|
||||||
|
GenericType<Boolean> localVarReturnType = new GenericType<Boolean>() {};
|
||||||
|
return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Test serialization of object with outer number type
|
||||||
|
* @param body Input composite as post body (optional)
|
||||||
|
* @return OuterComposite
|
||||||
|
* @throws ApiException if fails to make API call
|
||||||
|
*/
|
||||||
|
public OuterComposite fakeOuterCompositeSerialize(OuterComposite body) throws ApiException {
|
||||||
|
Object localVarPostBody = body;
|
||||||
|
|
||||||
|
// create path and map variables
|
||||||
|
String localVarPath = "/fake/outer/composite";
|
||||||
|
|
||||||
|
// query params
|
||||||
|
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
||||||
|
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
||||||
|
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
final String[] localVarAccepts = {
|
||||||
|
|
||||||
|
};
|
||||||
|
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
||||||
|
|
||||||
|
final String[] localVarContentTypes = {
|
||||||
|
|
||||||
|
};
|
||||||
|
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
|
|
||||||
|
String[] localVarAuthNames = new String[] { };
|
||||||
|
|
||||||
|
GenericType<OuterComposite> localVarReturnType = new GenericType<OuterComposite>() {};
|
||||||
|
return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Test serialization of outer number types
|
||||||
|
* @param body Input number as post body (optional)
|
||||||
|
* @return BigDecimal
|
||||||
|
* @throws ApiException if fails to make API call
|
||||||
|
*/
|
||||||
|
public BigDecimal fakeOuterNumberSerialize(BigDecimal body) throws ApiException {
|
||||||
|
Object localVarPostBody = body;
|
||||||
|
|
||||||
|
// create path and map variables
|
||||||
|
String localVarPath = "/fake/outer/number";
|
||||||
|
|
||||||
|
// query params
|
||||||
|
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
||||||
|
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
||||||
|
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
final String[] localVarAccepts = {
|
||||||
|
|
||||||
|
};
|
||||||
|
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
||||||
|
|
||||||
|
final String[] localVarContentTypes = {
|
||||||
|
|
||||||
|
};
|
||||||
|
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
|
|
||||||
|
String[] localVarAuthNames = new String[] { };
|
||||||
|
|
||||||
|
GenericType<BigDecimal> localVarReturnType = new GenericType<BigDecimal>() {};
|
||||||
|
return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Test serialization of outer string types
|
||||||
|
* @param body Input string as post body (optional)
|
||||||
|
* @return String
|
||||||
|
* @throws ApiException if fails to make API call
|
||||||
|
*/
|
||||||
|
public String fakeOuterStringSerialize(String body) throws ApiException {
|
||||||
|
Object localVarPostBody = body;
|
||||||
|
|
||||||
|
// create path and map variables
|
||||||
|
String localVarPath = "/fake/outer/string";
|
||||||
|
|
||||||
|
// query params
|
||||||
|
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
||||||
|
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
||||||
|
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
final String[] localVarAccepts = {
|
||||||
|
|
||||||
|
};
|
||||||
|
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
||||||
|
|
||||||
|
final String[] localVarContentTypes = {
|
||||||
|
|
||||||
|
};
|
||||||
|
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
|
|
||||||
|
String[] localVarAuthNames = new String[] { };
|
||||||
|
|
||||||
|
GenericType<String> localVarReturnType = new GenericType<String>() {};
|
||||||
|
return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* To test \"client\" model
|
* To test \"client\" model
|
||||||
* To test \"client\" model
|
* To test \"client\" model
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user