Add alias type definitions for Java

When a spec defines a Model at the top level that is a non-aggretate type (such
as string, number or boolean), it essentially represents an alias for the simple
type. For example, the following spec snippet creates an alias of the boolean
type that for all intents and purposes acts just like a regular boolean.

    definitions:
      JustABoolean:
        type: boolean

This can be modeled in some languages through built-in mechanisms, such as
typedefs in C++. Java, however, just not have a clean way of representing this.

This change introduces an internal mechanism for representing aliases. It
maintains a map in DefaultCodegen that tracks these types of definitions, and
wherever it sees the "JustABoolean" type in the spec, it generates code that
uses the built-in "Boolean" instead.

This functionality currenlty only applies to Java, but could be extended to
other languages later.

The change adds a few examples of this to the fake endpoint spec for testing,
which means all of the samples change as well.
This commit is contained in:
Benjamin Douglas 2017-04-17 12:39:49 -07:00
parent b1a39ac820
commit 9058099e5b
279 changed files with 25635 additions and 1370 deletions

View File

@ -25,6 +25,7 @@ public class CodegenModel {
public String discriminator;
public String defaultValue;
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> requiredVars = new ArrayList<CodegenProperty>(); // a list of required properties
public List<CodegenProperty> optionalVars = new ArrayList<CodegenProperty>(); // a list of optional properties

View File

@ -115,6 +115,8 @@ public class DefaultCodegen {
// They are translated to words like "Dollar" and prefixed with '
// Then translated back during JSON encoding and decoding
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;
@ -1209,6 +1211,18 @@ public class DefaultCodegen {
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"
* Return DefaultApi if name is empty
@ -1373,6 +1387,10 @@ public class DefaultCodegen {
ModelImpl impl = (ModelImpl) model;
if (impl.getType() != 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);
}
if(impl.getEnum() != null && impl.getEnum().size() > 0) {
@ -2517,6 +2535,7 @@ public class DefaultCodegen {
Model sub = bp.getSchema();
if (sub instanceof RefModel) {
String name = ((RefModel) sub).getSimpleRef();
name = getAlias(name);
if (typeMapping.containsKey(name)) {
name = typeMapping.get(name);
} else {

View File

@ -318,7 +318,19 @@ public class DefaultGenerator extends AbstractGenerator implements Generator {
if(config.importMapping().containsKey(modelName)) {
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.getName().contains("java") || config.getName().contains("jaxrs")
|| config.getName().contains("spring") || config.getName().endsWith("4j")
|| config.getName().equals("inflector")) {
// 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()) {
String suffix = config.modelTemplateFiles().get(templateName);
String filename = config.modelFileFolder() + File.separator + config.toModelFilename(modelName) + suffix;

View File

@ -568,6 +568,14 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code
return super.getTypeDeclaration(p);
}
@Override
public String getAlias(String name) {
if (typeAliases.containsKey(name)) {
return typeAliases.get(name);
}
return name;
}
@Override
public String toDefaultValue(Property p) {
if (p instanceof ArrayProperty) {
@ -708,6 +716,8 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code
public String getSwaggerType(Property p) {
String swaggerType = super.getSwaggerType(p);
swaggerType = getAlias(swaggerType);
// don't apply renaming on types from the typeMapping
if (typeMapping.containsKey(swaggerType)) {
return typeMapping.get(swaggerType);

View File

@ -781,6 +781,74 @@ paths:
description: User not found
security:
- 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:
petstore_auth:
type: oauth2
@ -1258,6 +1326,21 @@ definitions:
- "placed"
- "approved"
- "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:
description: Find out more about Swagger
url: 'http://swagger.io'

View File

@ -1,4 +1,4 @@
# swagger-petstore-android-volley
# swagger-android-client
## Requirements
@ -27,7 +27,7 @@ Add this dependency to your project's POM:
```xml
<dependency>
<groupId>io.swagger</groupId>
<artifactId>swagger-petstore-android-volley</artifactId>
<artifactId>swagger-android-client</artifactId>
<version>1.0.0</version>
<scope>compile</scope>
</dependency>
@ -38,7 +38,7 @@ Add this dependency to your project's POM:
Add this dependency to your project's build file:
```groovy
compile "io.swagger:swagger-petstore-android-volley:1.0.0"
compile "io.swagger:swagger-android-client:1.0.0"
```
### Others
@ -49,7 +49,7 @@ At first generate the JAR by executing:
Then manually install the following JARs:
* target/swagger-petstore-android-volley-1.0.0.jar
* target/swagger-android-client-1.0.0.jar
* target/lib/*.jar
## Getting Started

View File

@ -3,7 +3,7 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>io.swagger</groupId>
<artifactId>swagger-petstore-android-volley</artifactId>
<artifactId>swagger-android-client</artifactId>
<version>1.0.0</version>
<dependencies>
<dependency>

View File

@ -296,6 +296,10 @@ case $state in
ops)
# Operations
_values "Operations" \
"fakeOuterBooleanSerialize[]" \
"fakeOuterCompositeSerialize[]" \
"fakeOuterNumberSerialize[]" \
"fakeOuterStringSerialize[]" \
"testClientModel[To test \"client\" model]" \
"testEndpointParameters[Fake endpoint for testing various parameters
假端點
@ -325,6 +329,30 @@ case $state in
;;
args)
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)
local -a _op_arguments
_op_arguments=(

View File

@ -66,6 +66,10 @@ declare -A operation_parameters
# 0 - optional
# 1 - required
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["testEndpointParameters:::number"]=1
operation_parameters_minimum_occurences["testEndpointParameters:::double"]=1
@ -122,6 +126,10 @@ operation_parameters_minimum_occurences["updateUser:::body"]=1
# N - N values
# 0 - unlimited
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["testEndpointParameters:::number"]=0
operation_parameters_maximum_occurences["testEndpointParameters:::double"]=0
@ -175,6 +183,10 @@ operation_parameters_maximum_occurences["updateUser:::body"]=0
# The type of collection for specifying multiple values for parameter:
# - multi, csv, ssv, tsv
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["testEndpointParameters:::number"]=""
operation_parameters_collection_type["testEndpointParameters:::double"]=""
@ -711,6 +723,10 @@ EOF
echo ""
echo -e "$(tput bold)$(tput setaf 7)[fake]$(tput sgr0)"
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)testEndpointParameters$(tput sgr0);Fake endpoint for testing various parameters
假端點
@ -804,6 +820,154 @@ print_version() {
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
@ -2000,6 +2164,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
@ -3085,6 +3505,18 @@ case $key in
--dry-run)
print_curl=true
;;
fakeOuterBooleanSerialize)
operation="fakeOuterBooleanSerialize"
;;
fakeOuterCompositeSerialize)
operation="fakeOuterCompositeSerialize"
;;
fakeOuterNumberSerialize)
operation="fakeOuterNumberSerialize"
;;
fakeOuterStringSerialize)
operation="fakeOuterStringSerialize"
;;
testClientModel)
operation="testClientModel"
;;
@ -3238,6 +3670,18 @@ fi
# Run cURL command based on the operation ID
case $operation in
fakeOuterBooleanSerialize)
call_fakeOuterBooleanSerialize
;;
fakeOuterCompositeSerialize)
call_fakeOuterCompositeSerialize
;;
fakeOuterNumberSerialize)
call_fakeOuterNumberSerialize
;;
fakeOuterStringSerialize)
call_fakeOuterStringSerialize
;;
testClientModel)
call_testClientModel
;;

View File

@ -68,6 +68,10 @@ _petstore-cli()
# The list of available operation in the REST service
# It's modelled as an associative array for efficient key lookup
declare -A operations
operations["fakeOuterBooleanSerialize"]=1
operations["fakeOuterCompositeSerialize"]=1
operations["fakeOuterNumberSerialize"]=1
operations["fakeOuterStringSerialize"]=1
operations["testClientModel"]=1
operations["testEndpointParameters"]=1
operations["testEnumParameters"]=1
@ -95,6 +99,10 @@ _petstore-cli()
# An associative array of operations to their parameters
# Only include path, query and header parameters
declare -A operation_parameters
operation_parameters["fakeOuterBooleanSerialize"]=""
operation_parameters["fakeOuterCompositeSerialize"]=""
operation_parameters["fakeOuterNumberSerialize"]=""
operation_parameters["fakeOuterStringSerialize"]=""
operation_parameters["testClientModel"]=""
operation_parameters["testEndpointParameters"]=""
operation_parameters["testEnumParameters"]="enum_query_string_array= enum_query_string= enum_query_integer= enum_header_string_array: enum_header_string: "

View File

@ -52,6 +52,11 @@ utility::string_t ApiClient::parameterToString(int32_t 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)
{
return utility::conversions::to_string_t(value.to_string(utility::datetime::ISO_8601));

View File

@ -50,6 +50,7 @@ public:
static utility::string_t parameterToString(utility::string_t value);
static utility::string_t parameterToString(int32_t value);
static utility::string_t parameterToString(int64_t value);
static utility::string_t parameterToString(float value);
static utility::string_t parameterToString(const utility::datetime &value);
template<class T>

View File

@ -274,6 +274,10 @@ int32_t ModelBase::int32_tFromJson(web::json::value& val)
{
return val.as_integer();
}
float ModelBase::floatFromJson(web::json::value& val)
{
return val.as_double();
}
utility::string_t ModelBase::stringFromJson(web::json::value& val)
{
return val.is_string() ? val.as_string() : U("");
@ -310,6 +314,15 @@ int32_t ModelBase::int32_tFromHttpContent(std::shared_ptr<HttpContent> val)
ss >> result;
return result;
}
float ModelBase::floatFromHttpContent(std::shared_ptr<HttpContent> val)
{
utility::string_t str = ModelBase::stringFromHttpContent(val);
utility::stringstream_t ss(str);
float result = 0;
ss >> result;
return result;
}
utility::string_t ModelBase::stringFromHttpContent(std::shared_ptr<HttpContent> val)
{
std::shared_ptr<std::istream> data = val->getData();

View File

@ -55,6 +55,7 @@ public:
static int64_t int64_tFromJson(web::json::value& val);
static int32_t int32_tFromJson(web::json::value& val);
static float floatFromJson(web::json::value& val);
static utility::string_t stringFromJson(web::json::value& val);
static utility::datetime dateFromJson(web::json::value& val);
static double doubleFromJson(web::json::value& val);
@ -71,6 +72,7 @@ public:
static int64_t int64_tFromHttpContent(std::shared_ptr<HttpContent> val);
static int32_t int32_tFromHttpContent(std::shared_ptr<HttpContent> val);
static float floatFromHttpContent(std::shared_ptr<HttpContent> val);
static utility::string_t stringFromHttpContent(std::shared_ptr<HttpContent> val);
static utility::datetime dateFromHttpContent(std::shared_ptr<HttpContent> val);
static bool boolFromHttpContent(std::shared_ptr<HttpContent> val);

View File

@ -49,17 +49,16 @@ namespace Example
{
var apiInstance = new FakeApi();
var body = new ModelClient(); // ModelClient | client model
var body = new OuterBoolean(); // OuterBoolean | Input boolean as post body (optional)
try
{
// To test \"client\" model
ModelClient result = apiInstance.TestClientModel(body);
OuterBoolean result = apiInstance.FakeOuterBooleanSerialize(body);
Debug.WriteLine(result);
}
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
------------ | ------------- | ------------- | -------------
*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* | [**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
@ -127,7 +130,11 @@ Class | Method | HTTP request | Description
- [Model.Name](docs/Name.md)
- [Model.NumberOnly](docs/NumberOnly.md)
- [Model.Order](docs/Order.md)
- [Model.OuterBoolean](docs/OuterBoolean.md)
- [Model.OuterComposite](docs/OuterComposite.md)
- [Model.OuterEnum](docs/OuterEnum.md)
- [Model.OuterNumber](docs/OuterNumber.md)
- [Model.OuterString](docs/OuterString.md)
- [Model.Pet](docs/Pet.md)
- [Model.ReadOnlyFirst](docs/ReadOnlyFirst.md)
- [Model.SpecialModelName](docs/SpecialModelName.md)

View File

@ -4,11 +4,259 @@ All URIs are relative to *http://petstore.swagger.io:80/v2*
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 \&quot;client\&quot; model
[**TestEndpointParameters**](FakeApi.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various 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>
# **TestClientModel**
> ModelClient TestClientModel (ModelClient body)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -25,6 +25,90 @@ namespace IO.Swagger.Api
{
#region Synchronous Operations
/// <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 \&quot;client\&quot; model
/// </summary>
/// <remarks>
@ -130,6 +214,90 @@ namespace IO.Swagger.Api
#endregion Synchronous Operations
#region Asynchronous Operations
/// <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 \&quot;client\&quot; model
/// </summary>
/// <remarks>
@ -344,6 +512,570 @@ namespace IO.Swagger.Api
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>
/// To test \&quot;client\&quot; model To test \&quot;client\&quot; model
/// </summary>

View File

@ -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;
}
}
}
}

View File

@ -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;
}
}
}
}

View File

@ -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;
}
}
}
}

View File

@ -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;
}
}
}
}

View File

@ -69,17 +69,16 @@ namespace Example
{
var apiInstance = new FakeApi();
var body = new ModelClient(); // ModelClient | client model
var body = new OuterBoolean(); // OuterBoolean | Input boolean as post body (optional)
try
{
// To test \"client\" model
ModelClient result = apiInstance.TestClientModel(body);
OuterBoolean result = apiInstance.FakeOuterBooleanSerialize(body);
Debug.WriteLine(result);
}
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
------------ | ------------- | ------------- | -------------
*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* | [**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
@ -147,7 +150,11 @@ Class | Method | HTTP request | Description
- [Model.Name](docs/Name.md)
- [Model.NumberOnly](docs/NumberOnly.md)
- [Model.Order](docs/Order.md)
- [Model.OuterBoolean](docs/OuterBoolean.md)
- [Model.OuterComposite](docs/OuterComposite.md)
- [Model.OuterEnum](docs/OuterEnum.md)
- [Model.OuterNumber](docs/OuterNumber.md)
- [Model.OuterString](docs/OuterString.md)
- [Model.Pet](docs/Pet.md)
- [Model.ReadOnlyFirst](docs/ReadOnlyFirst.md)
- [Model.SpecialModelName](docs/SpecialModelName.md)

View File

@ -4,11 +4,259 @@ All URIs are relative to *http://petstore.swagger.io:80/v2*
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 \&quot;client\&quot; model
[**TestEndpointParameters**](FakeApi.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various 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>
# **TestClientModel**
> ModelClient TestClientModel (ModelClient body)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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");
}
}
}

View File

@ -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'
}
}
}

View File

@ -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");
}
}
}

View File

@ -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");
}
}
}

View File

@ -25,6 +25,90 @@ namespace IO.Swagger.Api
{
#region Synchronous Operations
/// <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 \&quot;client\&quot; model
/// </summary>
/// <remarks>
@ -130,6 +214,90 @@ namespace IO.Swagger.Api
#endregion Synchronous Operations
#region Asynchronous Operations
/// <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 \&quot;client\&quot; model
/// </summary>
/// <remarks>
@ -344,6 +512,570 @@ namespace IO.Swagger.Api
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>
/// To test \&quot;client\&quot; model To test \&quot;client\&quot; model
/// </summary>

View File

@ -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;
}
}
}

View File

@ -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;
}
}
}

View File

@ -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;
}
}
}

View File

@ -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;
}
}
}

View File

@ -69,17 +69,16 @@ namespace Example
{
var apiInstance = new FakeApi();
var body = new ModelClient(); // ModelClient | client model
var body = new OuterBoolean(); // OuterBoolean | Input boolean as post body (optional)
try
{
// To test \"client\" model
ModelClient result = apiInstance.TestClientModel(body);
OuterBoolean result = apiInstance.FakeOuterBooleanSerialize(body);
Debug.WriteLine(result);
}
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
------------ | ------------- | ------------- | -------------
*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* | [**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
@ -147,7 +150,11 @@ Class | Method | HTTP request | Description
- [Model.Name](docs/Name.md)
- [Model.NumberOnly](docs/NumberOnly.md)
- [Model.Order](docs/Order.md)
- [Model.OuterBoolean](docs/OuterBoolean.md)
- [Model.OuterComposite](docs/OuterComposite.md)
- [Model.OuterEnum](docs/OuterEnum.md)
- [Model.OuterNumber](docs/OuterNumber.md)
- [Model.OuterString](docs/OuterString.md)
- [Model.Pet](docs/Pet.md)
- [Model.ReadOnlyFirst](docs/ReadOnlyFirst.md)
- [Model.SpecialModelName](docs/SpecialModelName.md)

View File

@ -4,11 +4,259 @@ All URIs are relative to *http://petstore.swagger.io:80/v2*
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 \&quot;client\&quot; model
[**TestEndpointParameters**](FakeApi.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various 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>
# **TestClientModel**
> ModelClient TestClientModel (ModelClient body)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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");
}
}
}

View File

@ -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'
}
}
}

View File

@ -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");
}
}
}

View File

@ -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");
}
}
}

View File

@ -25,6 +25,90 @@ namespace IO.Swagger.Api
{
#region Synchronous Operations
/// <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 \&quot;client\&quot; model
/// </summary>
/// <remarks>
@ -130,6 +214,90 @@ namespace IO.Swagger.Api
#endregion Synchronous Operations
#region Asynchronous Operations
/// <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 \&quot;client\&quot; model
/// </summary>
/// <remarks>
@ -344,6 +512,570 @@ namespace IO.Swagger.Api
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>
/// To test \&quot;client\&quot; model To test \&quot;client\&quot; model
/// </summary>

View File

@ -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;
}
}
}

View File

@ -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;
}
}
}

View File

@ -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;
}
}
}

View File

@ -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;
}
}
}

View File

@ -8,6 +8,82 @@ defmodule SwaggerPetstore.Api.Fake do
plug Tesla.Middleware.BaseUrl, "http://petstore.swagger.io:80/v2"
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 """
To test \&quot;client\&quot; model

View File

@ -21,6 +21,10 @@ All URIs are relative to *http://petstore.swagger.io:80/v2*
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 \&quot;client\&quot; model
*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
@ -74,7 +78,11 @@ Class | Method | HTTP request | Description
- [Name](docs/Name.md)
- [NumberOnly](docs/NumberOnly.md)
- [Order](docs/Order.md)
- [OuterBoolean](docs/OuterBoolean.md)
- [OuterComposite](docs/OuterComposite.md)
- [OuterEnum](docs/OuterEnum.md)
- [OuterNumber](docs/OuterNumber.md)
- [OuterString](docs/OuterString.md)
- [Pet](docs/Pet.md)
- [ReadOnlyFirst](docs/ReadOnlyFirst.md)
- [SpecialModelName](docs/SpecialModelName.md)

View File

@ -4,11 +4,131 @@ All URIs are relative to *http://petstore.swagger.io:80/v2*
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 \&quot;client\&quot; model
[**TestEndpointParameters**](FakeApi.md#TestEndpointParameters) | **Post** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
[**TestEnumParameters**](FakeApi.md#TestEnumParameters) | **Get** /fake | To test enum parameters
# **FakeOuterBooleanSerialize**
> OuterBoolean FakeOuterBooleanSerialize($body)
Test serialization of outer boolean types
### 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)
# **FakeOuterCompositeSerialize**
> OuterComposite FakeOuterCompositeSerialize($body)
Test serialization of object with outer number type
### 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)
# **FakeOuterNumberSerialize**
> OuterNumber FakeOuterNumberSerialize($body)
Test serialization of outer number types
### 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)
# **FakeOuterStringSerialize**
> OuterString FakeOuterStringSerialize($body)
Test serialization of outer string types
### 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)
# **TestClientModel**
> Client TestClientModel($body)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -37,6 +37,250 @@ func NewFakeApiWithBasePath(basePath string) *FakeApi {
}
}
/**
*
* Test serialization of outer boolean types
*
* @param body Input boolean as post body
* @return *OuterBoolean
*/
func (a FakeApi) FakeOuterBooleanSerialize(body OuterBoolean) (*OuterBoolean, *APIResponse, error) {
var localVarHttpMethod = strings.ToUpper("Post")
// create path and map variables
localVarPath := a.Configuration.BasePath + "/fake/outer/boolean"
localVarHeaderParams := make(map[string]string)
localVarQueryParams := url.Values{}
localVarFormParams := make(map[string]string)
var localVarPostBody interface{}
var localVarFileName string
var localVarFileBytes []byte
// add default headers if any
for key := range a.Configuration.DefaultHeader {
localVarHeaderParams[key] = a.Configuration.DefaultHeader[key]
}
// to determine the Content-Type header
localVarHttpContentTypes := []string{ }
// set Content-Type header
localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes)
if localVarHttpContentType != "" {
localVarHeaderParams["Content-Type"] = localVarHttpContentType
}
// to determine the Accept header
localVarHttpHeaderAccepts := []string{
}
// set Accept header
localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts)
if localVarHttpHeaderAccept != "" {
localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
}
// body params
localVarPostBody = &body
var successPayload = new(OuterBoolean)
localVarHttpResponse, err := a.Configuration.APIClient.CallAPI(localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
var localVarURL, _ = url.Parse(localVarPath)
localVarURL.RawQuery = localVarQueryParams.Encode()
var localVarAPIResponse = &APIResponse{Operation: "FakeOuterBooleanSerialize", Method: localVarHttpMethod, RequestURL: localVarURL.String()}
if localVarHttpResponse != nil {
localVarAPIResponse.Response = localVarHttpResponse.RawResponse
localVarAPIResponse.Payload = localVarHttpResponse.Body()
}
if err != nil {
return successPayload, localVarAPIResponse, err
}
err = json.Unmarshal(localVarHttpResponse.Body(), &successPayload)
return successPayload, localVarAPIResponse, err
}
/**
*
* Test serialization of object with outer number type
*
* @param body Input composite as post body
* @return *OuterComposite
*/
func (a FakeApi) FakeOuterCompositeSerialize(body OuterComposite) (*OuterComposite, *APIResponse, error) {
var localVarHttpMethod = strings.ToUpper("Post")
// create path and map variables
localVarPath := a.Configuration.BasePath + "/fake/outer/composite"
localVarHeaderParams := make(map[string]string)
localVarQueryParams := url.Values{}
localVarFormParams := make(map[string]string)
var localVarPostBody interface{}
var localVarFileName string
var localVarFileBytes []byte
// add default headers if any
for key := range a.Configuration.DefaultHeader {
localVarHeaderParams[key] = a.Configuration.DefaultHeader[key]
}
// to determine the Content-Type header
localVarHttpContentTypes := []string{ }
// set Content-Type header
localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes)
if localVarHttpContentType != "" {
localVarHeaderParams["Content-Type"] = localVarHttpContentType
}
// to determine the Accept header
localVarHttpHeaderAccepts := []string{
}
// set Accept header
localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts)
if localVarHttpHeaderAccept != "" {
localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
}
// body params
localVarPostBody = &body
var successPayload = new(OuterComposite)
localVarHttpResponse, err := a.Configuration.APIClient.CallAPI(localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
var localVarURL, _ = url.Parse(localVarPath)
localVarURL.RawQuery = localVarQueryParams.Encode()
var localVarAPIResponse = &APIResponse{Operation: "FakeOuterCompositeSerialize", Method: localVarHttpMethod, RequestURL: localVarURL.String()}
if localVarHttpResponse != nil {
localVarAPIResponse.Response = localVarHttpResponse.RawResponse
localVarAPIResponse.Payload = localVarHttpResponse.Body()
}
if err != nil {
return successPayload, localVarAPIResponse, err
}
err = json.Unmarshal(localVarHttpResponse.Body(), &successPayload)
return successPayload, localVarAPIResponse, err
}
/**
*
* Test serialization of outer number types
*
* @param body Input number as post body
* @return *OuterNumber
*/
func (a FakeApi) FakeOuterNumberSerialize(body OuterNumber) (*OuterNumber, *APIResponse, error) {
var localVarHttpMethod = strings.ToUpper("Post")
// create path and map variables
localVarPath := a.Configuration.BasePath + "/fake/outer/number"
localVarHeaderParams := make(map[string]string)
localVarQueryParams := url.Values{}
localVarFormParams := make(map[string]string)
var localVarPostBody interface{}
var localVarFileName string
var localVarFileBytes []byte
// add default headers if any
for key := range a.Configuration.DefaultHeader {
localVarHeaderParams[key] = a.Configuration.DefaultHeader[key]
}
// to determine the Content-Type header
localVarHttpContentTypes := []string{ }
// set Content-Type header
localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes)
if localVarHttpContentType != "" {
localVarHeaderParams["Content-Type"] = localVarHttpContentType
}
// to determine the Accept header
localVarHttpHeaderAccepts := []string{
}
// set Accept header
localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts)
if localVarHttpHeaderAccept != "" {
localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
}
// body params
localVarPostBody = &body
var successPayload = new(OuterNumber)
localVarHttpResponse, err := a.Configuration.APIClient.CallAPI(localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
var localVarURL, _ = url.Parse(localVarPath)
localVarURL.RawQuery = localVarQueryParams.Encode()
var localVarAPIResponse = &APIResponse{Operation: "FakeOuterNumberSerialize", Method: localVarHttpMethod, RequestURL: localVarURL.String()}
if localVarHttpResponse != nil {
localVarAPIResponse.Response = localVarHttpResponse.RawResponse
localVarAPIResponse.Payload = localVarHttpResponse.Body()
}
if err != nil {
return successPayload, localVarAPIResponse, err
}
err = json.Unmarshal(localVarHttpResponse.Body(), &successPayload)
return successPayload, localVarAPIResponse, err
}
/**
*
* Test serialization of outer string types
*
* @param body Input string as post body
* @return *OuterString
*/
func (a FakeApi) FakeOuterStringSerialize(body OuterString) (*OuterString, *APIResponse, error) {
var localVarHttpMethod = strings.ToUpper("Post")
// create path and map variables
localVarPath := a.Configuration.BasePath + "/fake/outer/string"
localVarHeaderParams := make(map[string]string)
localVarQueryParams := url.Values{}
localVarFormParams := make(map[string]string)
var localVarPostBody interface{}
var localVarFileName string
var localVarFileBytes []byte
// add default headers if any
for key := range a.Configuration.DefaultHeader {
localVarHeaderParams[key] = a.Configuration.DefaultHeader[key]
}
// to determine the Content-Type header
localVarHttpContentTypes := []string{ }
// set Content-Type header
localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes)
if localVarHttpContentType != "" {
localVarHeaderParams["Content-Type"] = localVarHttpContentType
}
// to determine the Accept header
localVarHttpHeaderAccepts := []string{
}
// set Accept header
localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts)
if localVarHttpHeaderAccept != "" {
localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
}
// body params
localVarPostBody = &body
var successPayload = new(OuterString)
localVarHttpResponse, err := a.Configuration.APIClient.CallAPI(localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
var localVarURL, _ = url.Parse(localVarPath)
localVarURL.RawQuery = localVarQueryParams.Encode()
var localVarAPIResponse = &APIResponse{Operation: "FakeOuterStringSerialize", Method: localVarHttpMethod, RequestURL: localVarURL.String()}
if localVarHttpResponse != nil {
localVarAPIResponse.Response = localVarHttpResponse.RawResponse
localVarAPIResponse.Payload = localVarHttpResponse.Body()
}
if err != nil {
return successPayload, localVarAPIResponse, err
}
err = json.Unmarshal(localVarHttpResponse.Body(), &successPayload)
return successPayload, localVarAPIResponse, err
}
/**
* To test \&quot;client\&quot; model
* To test \&quot;client\&quot; model

View 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 {
}

View 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"`
}

View 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 {
}

View 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 {
}

View File

@ -7,6 +7,7 @@ import java.math.BigDecimal;
import io.swagger.client.model.Client;
import org.joda.time.DateTime;
import org.joda.time.LocalDate;
import io.swagger.client.model.OuterComposite;
import java.util.ArrayList;
import java.util.HashMap;
@ -18,6 +19,58 @@ import feign.*;
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 \&quot;client\&quot; model
* To test \&quot;client\&quot; model

View File

@ -0,0 +1,136 @@
/*
* 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 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 ");
}
}

View File

@ -1,9 +1,21 @@
package io.swagger.client.api;
import static org.assertj.core.api.Assertions.assertThat;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
import io.swagger.client.ApiClient;
import io.swagger.client.model.OuterComposite;
import okhttp3.mockwebserver.MockResponse;
import okhttp3.mockwebserver.MockWebServer;
import okhttp3.mockwebserver.RecordedRequest;
import org.joda.time.LocalDate;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.math.BigDecimal;
import org.joda.time.DateTime;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
@ -18,12 +30,31 @@ import java.util.Map;
public class FakeApiTest {
private FakeApi api;
private MockWebServer mockServer;
@Before
public void setup() {
api = new ApiClient().buildClient(FakeApi.class);
public void setup() throws IOException {
mockServer = new MockWebServer();
mockServer.start();
api = new ApiClient().setBasePath(mockServer.url("/").toString()).buildClient(FakeApi.class);
}
@After
public void teardown() throws IOException {
mockServer.shutdown();
}
/**
* Extract the HTTP request body from the mock server as a String.
* @param request The mock server's request.
* @return A String representation of the body of the request.
* @throws IOException On error reading the body of the request.
*/
private static String requestBody(RecordedRequest request) throws IOException {
ByteArrayOutputStream body = new ByteArrayOutputStream((int) request.getBodySize());
request.getBody().copyTo(body);
return body.toString();
}
/**
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
@ -48,5 +79,52 @@ public class FakeApiTest {
// TODO: test validations
}
@Test
public void testOuterNumber() throws Exception {
mockServer.enqueue(new MockResponse().setBody("5"));
BigDecimal response = api.fakeOuterNumberSerialize(new BigDecimal(3));
assertThat(requestBody(mockServer.takeRequest())).isEqualTo("3");
assertThat(response).isEqualTo(new BigDecimal(5));
}
@Test
public void testOuterString() throws Exception {
mockServer.enqueue(new MockResponse().setBody("\"Hello from the server\""));
String response = api.fakeOuterStringSerialize("Hello from the client");
assertThat(requestBody(mockServer.takeRequest())).isEqualTo("\"Hello from the client\"");
assertThat(response).isEqualTo("Hello from the server");
}
@Test
public void testOuterBoolean() throws Exception {
mockServer.enqueue(new MockResponse().setBody("true"));
Boolean response = api.fakeOuterBooleanSerialize(false);
assertThat(requestBody(mockServer.takeRequest())).isEqualTo("false");
assertThat(response).isEqualTo(true);
}
@Test
public void testOuterComposite() throws Exception {
mockServer.enqueue(new MockResponse().setBody(
"{\"my_number\": 5, \"my_string\": \"Hello from the server\", \"my_boolean\": true}"));
OuterComposite compositeRequest = new OuterComposite()
.myNumber(new BigDecimal(3))
.myString("Hello from the client")
.myBoolean(false);
OuterComposite response = api.fakeOuterCompositeSerialize(compositeRequest);
JsonNode requestJson = new ObjectMapper()
.readValue(requestBody(mockServer.takeRequest()), JsonNode.class);
assertThat(requestJson.fieldNames()).contains("my_number", "my_string", "my_boolean");
assertThat(requestJson.get("my_number").intValue()).isEqualTo(3);
assertThat(requestJson.get("my_string").textValue()).isEqualTo("Hello from the client");
assertThat(requestJson.get("my_boolean").booleanValue()).isEqualTo(false);
assertThat(response).isEqualTo(
new OuterComposite()
.myNumber(new BigDecimal(5))
.myString("Hello from the server")
.myBoolean(true)
);
}
}

View File

@ -4,11 +4,195 @@ All URIs are relative to *http://petstore.swagger.io:80/v2*
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 \&quot;client\&quot; model
[**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various 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>
# **testClientModel**
> Client testClientModel(body)

View File

@ -0,0 +1,12 @@
# OuterComposite
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**myNumber** | [**BigDecimal**](BigDecimal.md) | | [optional]
**myString** | **String** | | [optional]
**myBoolean** | **Boolean** | | [optional]

View File

@ -24,6 +24,7 @@ import java.math.BigDecimal;
import io.swagger.client.model.Client;
import org.joda.time.DateTime;
import org.joda.time.LocalDate;
import io.swagger.client.model.OuterComposite;
import java.util.ArrayList;
@ -51,6 +52,150 @@ public class FakeApi {
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 \&quot;client\&quot; model
* To test \&quot;client\&quot; model

View File

@ -0,0 +1,136 @@
/*
* 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 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 ");
}
}

View File

@ -4,11 +4,195 @@ All URIs are relative to *http://petstore.swagger.io:80/v2*
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 \&quot;client\&quot; model
[**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various 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>
# **testClientModel**
> Client testClientModel(body)

View File

@ -0,0 +1,12 @@
# OuterComposite
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**myNumber** | [**BigDecimal**](BigDecimal.md) | | [optional]
**myString** | **String** | | [optional]
**myBoolean** | **Boolean** | | [optional]

View File

@ -11,6 +11,7 @@ import java.math.BigDecimal;
import io.swagger.client.model.Client;
import org.joda.time.DateTime;
import org.joda.time.LocalDate;
import io.swagger.client.model.OuterComposite;
import java.util.ArrayList;
import java.util.HashMap;
@ -37,6 +38,150 @@ public class FakeApi {
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 \&quot;client\&quot; model
* To test \&quot;client\&quot; model

View File

@ -0,0 +1,136 @@
/*
* 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 org.apache.commons.lang3.ObjectUtils;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
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 ObjectUtils.equals(this.myNumber, outerComposite.myNumber) &&
ObjectUtils.equals(this.myString, outerComposite.myString) &&
ObjectUtils.equals(this.myBoolean, outerComposite.myBoolean);
}
@Override
public int hashCode() {
return ObjectUtils.hashCodeMulti(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 ");
}
}

View File

@ -4,11 +4,195 @@ All URIs are relative to *http://petstore.swagger.io:80/v2*
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 \&quot;client\&quot; model
[**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various 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>
# **testClientModel**
> Client testClientModel(body)

View File

@ -0,0 +1,12 @@
# OuterComposite
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**myNumber** | [**BigDecimal**](BigDecimal.md) | | [optional]
**myString** | **String** | | [optional]
**myBoolean** | **Boolean** | | [optional]

View File

@ -11,6 +11,7 @@ import java.math.BigDecimal;
import io.swagger.client.model.Client;
import java.time.LocalDate;
import java.time.OffsetDateTime;
import io.swagger.client.model.OuterComposite;
import java.util.ArrayList;
import java.util.HashMap;
@ -37,6 +38,150 @@ public class FakeApi {
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 \&quot;client\&quot; model
* To test \&quot;client\&quot; model

View File

@ -0,0 +1,136 @@
/*
* 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 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 ");
}
}

View File

@ -4,11 +4,195 @@ All URIs are relative to *http://petstore.swagger.io:80/v2*
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 \&quot;client\&quot; model
[**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various 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>
# **testClientModel**
> Client testClientModel(body)

View File

@ -0,0 +1,12 @@
# OuterComposite
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**myNumber** | [**BigDecimal**](BigDecimal.md) | | [optional]
**myString** | **String** | | [optional]
**myBoolean** | **Boolean** | | [optional]

View File

@ -11,6 +11,7 @@ import java.math.BigDecimal;
import io.swagger.client.model.Client;
import org.joda.time.DateTime;
import org.joda.time.LocalDate;
import io.swagger.client.model.OuterComposite;
import java.util.ArrayList;
import java.util.HashMap;
@ -37,6 +38,150 @@ public class FakeApi {
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 \&quot;client\&quot; model
* To test \&quot;client\&quot; model

View File

@ -0,0 +1,136 @@
/*
* 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 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 ");
}
}

View File

@ -4,11 +4,195 @@ All URIs are relative to *http://petstore.swagger.io:80/v2*
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 \&quot;client\&quot; model
[**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various 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>
# **testClientModel**
> Client testClientModel(body)

View File

@ -0,0 +1,12 @@
# OuterComposite
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**myNumber** | [**BigDecimal**](BigDecimal.md) | | [optional]
**myString** | **String** | | [optional]
**myBoolean** | **Boolean** | | [optional]

View File

@ -31,6 +31,7 @@ import java.math.BigDecimal;
import io.swagger.client.model.Client;
import org.joda.time.DateTime;
import org.joda.time.LocalDate;
import io.swagger.client.model.OuterComposite;
import java.lang.reflect.Type;
import java.util.ArrayList;
@ -57,6 +58,486 @@ public class FakeApi {
this.apiClient = apiClient;
}
/**
* Build call for fakeOuterBooleanSerialize
* @param body Input boolean as post body (optional)
* @param progressListener Progress listener
* @param progressRequestListener Progress request listener
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
*/
public com.squareup.okhttp.Call fakeOuterBooleanSerializeCall(Boolean body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
Object localVarPostBody = body;
// create path and map variables
String localVarPath = "/fake/outer/boolean";
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);
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
final String[] localVarContentTypes = {
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
if(progressListener != null) {
apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
@Override
public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
return originalResponse.newBuilder()
.body(new ProgressResponseBody(originalResponse.body(), progressListener))
.build();
}
});
}
String[] localVarAuthNames = new String[] { };
return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
}
@SuppressWarnings("rawtypes")
private com.squareup.okhttp.Call fakeOuterBooleanSerializeValidateBeforeCall(Boolean body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
com.squareup.okhttp.Call call = fakeOuterBooleanSerializeCall(body, progressListener, progressRequestListener);
return call;
}
/**
*
* Test serialization of outer boolean types
* @param body Input boolean as post body (optional)
* @return Boolean
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
public Boolean fakeOuterBooleanSerialize(Boolean body) throws ApiException {
ApiResponse<Boolean> resp = fakeOuterBooleanSerializeWithHttpInfo(body);
return resp.getData();
}
/**
*
* Test serialization of outer boolean types
* @param body Input boolean as post body (optional)
* @return ApiResponse&lt;Boolean&gt;
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
public ApiResponse<Boolean> fakeOuterBooleanSerializeWithHttpInfo(Boolean body) throws ApiException {
com.squareup.okhttp.Call call = fakeOuterBooleanSerializeValidateBeforeCall(body, null, null);
Type localVarReturnType = new TypeToken<Boolean>(){}.getType();
return apiClient.execute(call, localVarReturnType);
}
/**
* (asynchronously)
* Test serialization of outer boolean types
* @param body Input boolean as post body (optional)
* @param callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
*/
public com.squareup.okhttp.Call fakeOuterBooleanSerializeAsync(Boolean body, final ApiCallback<Boolean> callback) throws ApiException {
ProgressResponseBody.ProgressListener progressListener = null;
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
if (callback != null) {
progressListener = new ProgressResponseBody.ProgressListener() {
@Override
public void update(long bytesRead, long contentLength, boolean done) {
callback.onDownloadProgress(bytesRead, contentLength, done);
}
};
progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
@Override
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
callback.onUploadProgress(bytesWritten, contentLength, done);
}
};
}
com.squareup.okhttp.Call call = fakeOuterBooleanSerializeValidateBeforeCall(body, progressListener, progressRequestListener);
Type localVarReturnType = new TypeToken<Boolean>(){}.getType();
apiClient.executeAsync(call, localVarReturnType, callback);
return call;
}
/**
* Build call for fakeOuterCompositeSerialize
* @param body Input composite as post body (optional)
* @param progressListener Progress listener
* @param progressRequestListener Progress request listener
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
*/
public com.squareup.okhttp.Call fakeOuterCompositeSerializeCall(OuterComposite body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
Object localVarPostBody = body;
// create path and map variables
String localVarPath = "/fake/outer/composite";
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);
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
final String[] localVarContentTypes = {
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
if(progressListener != null) {
apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
@Override
public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
return originalResponse.newBuilder()
.body(new ProgressResponseBody(originalResponse.body(), progressListener))
.build();
}
});
}
String[] localVarAuthNames = new String[] { };
return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
}
@SuppressWarnings("rawtypes")
private com.squareup.okhttp.Call fakeOuterCompositeSerializeValidateBeforeCall(OuterComposite body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
com.squareup.okhttp.Call call = fakeOuterCompositeSerializeCall(body, progressListener, progressRequestListener);
return call;
}
/**
*
* Test serialization of object with outer number type
* @param body Input composite as post body (optional)
* @return OuterComposite
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
public OuterComposite fakeOuterCompositeSerialize(OuterComposite body) throws ApiException {
ApiResponse<OuterComposite> resp = fakeOuterCompositeSerializeWithHttpInfo(body);
return resp.getData();
}
/**
*
* Test serialization of object with outer number type
* @param body Input composite as post body (optional)
* @return ApiResponse&lt;OuterComposite&gt;
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
public ApiResponse<OuterComposite> fakeOuterCompositeSerializeWithHttpInfo(OuterComposite body) throws ApiException {
com.squareup.okhttp.Call call = fakeOuterCompositeSerializeValidateBeforeCall(body, null, null);
Type localVarReturnType = new TypeToken<OuterComposite>(){}.getType();
return apiClient.execute(call, localVarReturnType);
}
/**
* (asynchronously)
* Test serialization of object with outer number type
* @param body Input composite as post body (optional)
* @param callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
*/
public com.squareup.okhttp.Call fakeOuterCompositeSerializeAsync(OuterComposite body, final ApiCallback<OuterComposite> callback) throws ApiException {
ProgressResponseBody.ProgressListener progressListener = null;
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
if (callback != null) {
progressListener = new ProgressResponseBody.ProgressListener() {
@Override
public void update(long bytesRead, long contentLength, boolean done) {
callback.onDownloadProgress(bytesRead, contentLength, done);
}
};
progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
@Override
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
callback.onUploadProgress(bytesWritten, contentLength, done);
}
};
}
com.squareup.okhttp.Call call = fakeOuterCompositeSerializeValidateBeforeCall(body, progressListener, progressRequestListener);
Type localVarReturnType = new TypeToken<OuterComposite>(){}.getType();
apiClient.executeAsync(call, localVarReturnType, callback);
return call;
}
/**
* Build call for fakeOuterNumberSerialize
* @param body Input number as post body (optional)
* @param progressListener Progress listener
* @param progressRequestListener Progress request listener
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
*/
public com.squareup.okhttp.Call fakeOuterNumberSerializeCall(BigDecimal body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
Object localVarPostBody = body;
// create path and map variables
String localVarPath = "/fake/outer/number";
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);
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
final String[] localVarContentTypes = {
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
if(progressListener != null) {
apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
@Override
public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
return originalResponse.newBuilder()
.body(new ProgressResponseBody(originalResponse.body(), progressListener))
.build();
}
});
}
String[] localVarAuthNames = new String[] { };
return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
}
@SuppressWarnings("rawtypes")
private com.squareup.okhttp.Call fakeOuterNumberSerializeValidateBeforeCall(BigDecimal body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
com.squareup.okhttp.Call call = fakeOuterNumberSerializeCall(body, progressListener, progressRequestListener);
return call;
}
/**
*
* Test serialization of outer number types
* @param body Input number as post body (optional)
* @return BigDecimal
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
public BigDecimal fakeOuterNumberSerialize(BigDecimal body) throws ApiException {
ApiResponse<BigDecimal> resp = fakeOuterNumberSerializeWithHttpInfo(body);
return resp.getData();
}
/**
*
* Test serialization of outer number types
* @param body Input number as post body (optional)
* @return ApiResponse&lt;BigDecimal&gt;
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
public ApiResponse<BigDecimal> fakeOuterNumberSerializeWithHttpInfo(BigDecimal body) throws ApiException {
com.squareup.okhttp.Call call = fakeOuterNumberSerializeValidateBeforeCall(body, null, null);
Type localVarReturnType = new TypeToken<BigDecimal>(){}.getType();
return apiClient.execute(call, localVarReturnType);
}
/**
* (asynchronously)
* Test serialization of outer number types
* @param body Input number as post body (optional)
* @param callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
*/
public com.squareup.okhttp.Call fakeOuterNumberSerializeAsync(BigDecimal body, final ApiCallback<BigDecimal> callback) throws ApiException {
ProgressResponseBody.ProgressListener progressListener = null;
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
if (callback != null) {
progressListener = new ProgressResponseBody.ProgressListener() {
@Override
public void update(long bytesRead, long contentLength, boolean done) {
callback.onDownloadProgress(bytesRead, contentLength, done);
}
};
progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
@Override
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
callback.onUploadProgress(bytesWritten, contentLength, done);
}
};
}
com.squareup.okhttp.Call call = fakeOuterNumberSerializeValidateBeforeCall(body, progressListener, progressRequestListener);
Type localVarReturnType = new TypeToken<BigDecimal>(){}.getType();
apiClient.executeAsync(call, localVarReturnType, callback);
return call;
}
/**
* Build call for fakeOuterStringSerialize
* @param body Input string as post body (optional)
* @param progressListener Progress listener
* @param progressRequestListener Progress request listener
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
*/
public com.squareup.okhttp.Call fakeOuterStringSerializeCall(String body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
Object localVarPostBody = body;
// create path and map variables
String localVarPath = "/fake/outer/string";
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);
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
final String[] localVarContentTypes = {
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
if(progressListener != null) {
apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
@Override
public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
return originalResponse.newBuilder()
.body(new ProgressResponseBody(originalResponse.body(), progressListener))
.build();
}
});
}
String[] localVarAuthNames = new String[] { };
return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
}
@SuppressWarnings("rawtypes")
private com.squareup.okhttp.Call fakeOuterStringSerializeValidateBeforeCall(String body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
com.squareup.okhttp.Call call = fakeOuterStringSerializeCall(body, progressListener, progressRequestListener);
return call;
}
/**
*
* Test serialization of outer string types
* @param body Input string as post body (optional)
* @return String
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
public String fakeOuterStringSerialize(String body) throws ApiException {
ApiResponse<String> resp = fakeOuterStringSerializeWithHttpInfo(body);
return resp.getData();
}
/**
*
* Test serialization of outer string types
* @param body Input string as post body (optional)
* @return ApiResponse&lt;String&gt;
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
public ApiResponse<String> fakeOuterStringSerializeWithHttpInfo(String body) throws ApiException {
com.squareup.okhttp.Call call = fakeOuterStringSerializeValidateBeforeCall(body, null, null);
Type localVarReturnType = new TypeToken<String>(){}.getType();
return apiClient.execute(call, localVarReturnType);
}
/**
* (asynchronously)
* Test serialization of outer string types
* @param body Input string as post body (optional)
* @param callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
*/
public com.squareup.okhttp.Call fakeOuterStringSerializeAsync(String body, final ApiCallback<String> callback) throws ApiException {
ProgressResponseBody.ProgressListener progressListener = null;
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
if (callback != null) {
progressListener = new ProgressResponseBody.ProgressListener() {
@Override
public void update(long bytesRead, long contentLength, boolean done) {
callback.onDownloadProgress(bytesRead, contentLength, done);
}
};
progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
@Override
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
callback.onUploadProgress(bytesWritten, contentLength, done);
}
};
}
com.squareup.okhttp.Call call = fakeOuterStringSerializeValidateBeforeCall(body, progressListener, progressRequestListener);
Type localVarReturnType = new TypeToken<String>(){}.getType();
apiClient.executeAsync(call, localVarReturnType, callback);
return call;
}
/**
* Build call for testClientModel
* @param body client model (required)

View File

@ -0,0 +1,169 @@
/*
* 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.google.gson.annotations.SerializedName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.math.BigDecimal;
import android.os.Parcelable;
import android.os.Parcel;
/**
* OuterComposite
*/
public class OuterComposite implements Parcelable {
@SerializedName("my_number")
private BigDecimal myNumber = null;
@SerializedName("my_string")
private String myString = null;
@SerializedName("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 ");
}
public void writeToParcel(Parcel out, int flags) {
out.writeValue(myNumber);
out.writeValue(myString);
out.writeValue(myBoolean);
}
public OuterComposite() {
super();
}
OuterComposite(Parcel in) {
myNumber = (BigDecimal)in.readValue(null);
myString = (String)in.readValue(null);
myBoolean = (Boolean)in.readValue(null);
}
public int describeContents() {
return 0;
}
public static final Parcelable.Creator<OuterComposite> CREATOR = new Parcelable.Creator<OuterComposite>() {
public OuterComposite createFromParcel(Parcel in) {
return new OuterComposite(in);
}
public OuterComposite[] newArray(int size) {
return new OuterComposite[size];
}
};
}

View File

@ -4,11 +4,195 @@ All URIs are relative to *http://petstore.swagger.io:80/v2*
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 \&quot;client\&quot; model
[**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various 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>
# **testClientModel**
> Client testClientModel(body)

View File

@ -0,0 +1,12 @@
# OuterComposite
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**myNumber** | [**BigDecimal**](BigDecimal.md) | | [optional]
**myString** | **String** | | [optional]
**myBoolean** | **Boolean** | | [optional]

View File

@ -31,6 +31,7 @@ import java.math.BigDecimal;
import io.swagger.client.model.Client;
import org.joda.time.DateTime;
import org.joda.time.LocalDate;
import io.swagger.client.model.OuterComposite;
import java.lang.reflect.Type;
import java.util.ArrayList;
@ -57,6 +58,486 @@ public class FakeApi {
this.apiClient = apiClient;
}
/**
* Build call for fakeOuterBooleanSerialize
* @param body Input boolean as post body (optional)
* @param progressListener Progress listener
* @param progressRequestListener Progress request listener
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
*/
public com.squareup.okhttp.Call fakeOuterBooleanSerializeCall(Boolean body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
Object localVarPostBody = body;
// create path and map variables
String localVarPath = "/fake/outer/boolean";
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);
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
final String[] localVarContentTypes = {
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
if(progressListener != null) {
apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
@Override
public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
return originalResponse.newBuilder()
.body(new ProgressResponseBody(originalResponse.body(), progressListener))
.build();
}
});
}
String[] localVarAuthNames = new String[] { };
return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
}
@SuppressWarnings("rawtypes")
private com.squareup.okhttp.Call fakeOuterBooleanSerializeValidateBeforeCall(Boolean body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
com.squareup.okhttp.Call call = fakeOuterBooleanSerializeCall(body, progressListener, progressRequestListener);
return call;
}
/**
*
* Test serialization of outer boolean types
* @param body Input boolean as post body (optional)
* @return Boolean
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
public Boolean fakeOuterBooleanSerialize(Boolean body) throws ApiException {
ApiResponse<Boolean> resp = fakeOuterBooleanSerializeWithHttpInfo(body);
return resp.getData();
}
/**
*
* Test serialization of outer boolean types
* @param body Input boolean as post body (optional)
* @return ApiResponse&lt;Boolean&gt;
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
public ApiResponse<Boolean> fakeOuterBooleanSerializeWithHttpInfo(Boolean body) throws ApiException {
com.squareup.okhttp.Call call = fakeOuterBooleanSerializeValidateBeforeCall(body, null, null);
Type localVarReturnType = new TypeToken<Boolean>(){}.getType();
return apiClient.execute(call, localVarReturnType);
}
/**
* (asynchronously)
* Test serialization of outer boolean types
* @param body Input boolean as post body (optional)
* @param callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
*/
public com.squareup.okhttp.Call fakeOuterBooleanSerializeAsync(Boolean body, final ApiCallback<Boolean> callback) throws ApiException {
ProgressResponseBody.ProgressListener progressListener = null;
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
if (callback != null) {
progressListener = new ProgressResponseBody.ProgressListener() {
@Override
public void update(long bytesRead, long contentLength, boolean done) {
callback.onDownloadProgress(bytesRead, contentLength, done);
}
};
progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
@Override
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
callback.onUploadProgress(bytesWritten, contentLength, done);
}
};
}
com.squareup.okhttp.Call call = fakeOuterBooleanSerializeValidateBeforeCall(body, progressListener, progressRequestListener);
Type localVarReturnType = new TypeToken<Boolean>(){}.getType();
apiClient.executeAsync(call, localVarReturnType, callback);
return call;
}
/**
* Build call for fakeOuterCompositeSerialize
* @param body Input composite as post body (optional)
* @param progressListener Progress listener
* @param progressRequestListener Progress request listener
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
*/
public com.squareup.okhttp.Call fakeOuterCompositeSerializeCall(OuterComposite body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
Object localVarPostBody = body;
// create path and map variables
String localVarPath = "/fake/outer/composite";
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);
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
final String[] localVarContentTypes = {
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
if(progressListener != null) {
apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
@Override
public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
return originalResponse.newBuilder()
.body(new ProgressResponseBody(originalResponse.body(), progressListener))
.build();
}
});
}
String[] localVarAuthNames = new String[] { };
return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
}
@SuppressWarnings("rawtypes")
private com.squareup.okhttp.Call fakeOuterCompositeSerializeValidateBeforeCall(OuterComposite body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
com.squareup.okhttp.Call call = fakeOuterCompositeSerializeCall(body, progressListener, progressRequestListener);
return call;
}
/**
*
* Test serialization of object with outer number type
* @param body Input composite as post body (optional)
* @return OuterComposite
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
public OuterComposite fakeOuterCompositeSerialize(OuterComposite body) throws ApiException {
ApiResponse<OuterComposite> resp = fakeOuterCompositeSerializeWithHttpInfo(body);
return resp.getData();
}
/**
*
* Test serialization of object with outer number type
* @param body Input composite as post body (optional)
* @return ApiResponse&lt;OuterComposite&gt;
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
public ApiResponse<OuterComposite> fakeOuterCompositeSerializeWithHttpInfo(OuterComposite body) throws ApiException {
com.squareup.okhttp.Call call = fakeOuterCompositeSerializeValidateBeforeCall(body, null, null);
Type localVarReturnType = new TypeToken<OuterComposite>(){}.getType();
return apiClient.execute(call, localVarReturnType);
}
/**
* (asynchronously)
* Test serialization of object with outer number type
* @param body Input composite as post body (optional)
* @param callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
*/
public com.squareup.okhttp.Call fakeOuterCompositeSerializeAsync(OuterComposite body, final ApiCallback<OuterComposite> callback) throws ApiException {
ProgressResponseBody.ProgressListener progressListener = null;
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
if (callback != null) {
progressListener = new ProgressResponseBody.ProgressListener() {
@Override
public void update(long bytesRead, long contentLength, boolean done) {
callback.onDownloadProgress(bytesRead, contentLength, done);
}
};
progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
@Override
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
callback.onUploadProgress(bytesWritten, contentLength, done);
}
};
}
com.squareup.okhttp.Call call = fakeOuterCompositeSerializeValidateBeforeCall(body, progressListener, progressRequestListener);
Type localVarReturnType = new TypeToken<OuterComposite>(){}.getType();
apiClient.executeAsync(call, localVarReturnType, callback);
return call;
}
/**
* Build call for fakeOuterNumberSerialize
* @param body Input number as post body (optional)
* @param progressListener Progress listener
* @param progressRequestListener Progress request listener
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
*/
public com.squareup.okhttp.Call fakeOuterNumberSerializeCall(BigDecimal body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
Object localVarPostBody = body;
// create path and map variables
String localVarPath = "/fake/outer/number";
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);
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
final String[] localVarContentTypes = {
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
if(progressListener != null) {
apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
@Override
public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
return originalResponse.newBuilder()
.body(new ProgressResponseBody(originalResponse.body(), progressListener))
.build();
}
});
}
String[] localVarAuthNames = new String[] { };
return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
}
@SuppressWarnings("rawtypes")
private com.squareup.okhttp.Call fakeOuterNumberSerializeValidateBeforeCall(BigDecimal body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
com.squareup.okhttp.Call call = fakeOuterNumberSerializeCall(body, progressListener, progressRequestListener);
return call;
}
/**
*
* Test serialization of outer number types
* @param body Input number as post body (optional)
* @return BigDecimal
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
public BigDecimal fakeOuterNumberSerialize(BigDecimal body) throws ApiException {
ApiResponse<BigDecimal> resp = fakeOuterNumberSerializeWithHttpInfo(body);
return resp.getData();
}
/**
*
* Test serialization of outer number types
* @param body Input number as post body (optional)
* @return ApiResponse&lt;BigDecimal&gt;
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
public ApiResponse<BigDecimal> fakeOuterNumberSerializeWithHttpInfo(BigDecimal body) throws ApiException {
com.squareup.okhttp.Call call = fakeOuterNumberSerializeValidateBeforeCall(body, null, null);
Type localVarReturnType = new TypeToken<BigDecimal>(){}.getType();
return apiClient.execute(call, localVarReturnType);
}
/**
* (asynchronously)
* Test serialization of outer number types
* @param body Input number as post body (optional)
* @param callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
*/
public com.squareup.okhttp.Call fakeOuterNumberSerializeAsync(BigDecimal body, final ApiCallback<BigDecimal> callback) throws ApiException {
ProgressResponseBody.ProgressListener progressListener = null;
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
if (callback != null) {
progressListener = new ProgressResponseBody.ProgressListener() {
@Override
public void update(long bytesRead, long contentLength, boolean done) {
callback.onDownloadProgress(bytesRead, contentLength, done);
}
};
progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
@Override
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
callback.onUploadProgress(bytesWritten, contentLength, done);
}
};
}
com.squareup.okhttp.Call call = fakeOuterNumberSerializeValidateBeforeCall(body, progressListener, progressRequestListener);
Type localVarReturnType = new TypeToken<BigDecimal>(){}.getType();
apiClient.executeAsync(call, localVarReturnType, callback);
return call;
}
/**
* Build call for fakeOuterStringSerialize
* @param body Input string as post body (optional)
* @param progressListener Progress listener
* @param progressRequestListener Progress request listener
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
*/
public com.squareup.okhttp.Call fakeOuterStringSerializeCall(String body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
Object localVarPostBody = body;
// create path and map variables
String localVarPath = "/fake/outer/string";
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);
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
final String[] localVarContentTypes = {
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
if(progressListener != null) {
apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
@Override
public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
return originalResponse.newBuilder()
.body(new ProgressResponseBody(originalResponse.body(), progressListener))
.build();
}
});
}
String[] localVarAuthNames = new String[] { };
return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
}
@SuppressWarnings("rawtypes")
private com.squareup.okhttp.Call fakeOuterStringSerializeValidateBeforeCall(String body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
com.squareup.okhttp.Call call = fakeOuterStringSerializeCall(body, progressListener, progressRequestListener);
return call;
}
/**
*
* Test serialization of outer string types
* @param body Input string as post body (optional)
* @return String
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
public String fakeOuterStringSerialize(String body) throws ApiException {
ApiResponse<String> resp = fakeOuterStringSerializeWithHttpInfo(body);
return resp.getData();
}
/**
*
* Test serialization of outer string types
* @param body Input string as post body (optional)
* @return ApiResponse&lt;String&gt;
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
public ApiResponse<String> fakeOuterStringSerializeWithHttpInfo(String body) throws ApiException {
com.squareup.okhttp.Call call = fakeOuterStringSerializeValidateBeforeCall(body, null, null);
Type localVarReturnType = new TypeToken<String>(){}.getType();
return apiClient.execute(call, localVarReturnType);
}
/**
* (asynchronously)
* Test serialization of outer string types
* @param body Input string as post body (optional)
* @param callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
*/
public com.squareup.okhttp.Call fakeOuterStringSerializeAsync(String body, final ApiCallback<String> callback) throws ApiException {
ProgressResponseBody.ProgressListener progressListener = null;
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
if (callback != null) {
progressListener = new ProgressResponseBody.ProgressListener() {
@Override
public void update(long bytesRead, long contentLength, boolean done) {
callback.onDownloadProgress(bytesRead, contentLength, done);
}
};
progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
@Override
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
callback.onUploadProgress(bytesWritten, contentLength, done);
}
};
}
com.squareup.okhttp.Call call = fakeOuterStringSerializeValidateBeforeCall(body, progressListener, progressRequestListener);
Type localVarReturnType = new TypeToken<String>(){}.getType();
apiClient.executeAsync(call, localVarReturnType, callback);
return call;
}
/**
* Build call for testClientModel
* @param body client model (required)

View File

@ -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
*
* 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.google.gson.annotations.SerializedName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.math.BigDecimal;
/**
* OuterComposite
*/
public class OuterComposite {
@SerializedName("my_number")
private BigDecimal myNumber = null;
@SerializedName("my_string")
private String myString = null;
@SerializedName("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 ");
}
}

View File

@ -10,6 +10,7 @@ import java.math.BigDecimal;
import io.swagger.client.model.Client;
import org.joda.time.DateTime;
import org.joda.time.LocalDate;
import io.swagger.client.model.OuterComposite;
import java.util.ArrayList;
import java.util.HashMap;
@ -17,6 +18,102 @@ import java.util.List;
import java.util.Map;
public interface FakeApi {
/**
*
* Sync method
* Test serialization of outer boolean types
* @param body Input boolean as post body (optional)
* @return Boolean
*/
@POST("/fake/outer/boolean")
Boolean fakeOuterBooleanSerialize(
@retrofit.http.Body Boolean body
);
/**
*
* Async method
* @param body Input boolean as post body (optional)
* @param cb callback method
*/
@POST("/fake/outer/boolean")
void fakeOuterBooleanSerialize(
@retrofit.http.Body Boolean body, Callback<Boolean> cb
);
/**
*
* Sync method
* Test serialization of object with outer number type
* @param body Input composite as post body (optional)
* @return OuterComposite
*/
@POST("/fake/outer/composite")
OuterComposite fakeOuterCompositeSerialize(
@retrofit.http.Body OuterComposite body
);
/**
*
* Async method
* @param body Input composite as post body (optional)
* @param cb callback method
*/
@POST("/fake/outer/composite")
void fakeOuterCompositeSerialize(
@retrofit.http.Body OuterComposite body, Callback<OuterComposite> cb
);
/**
*
* Sync method
* Test serialization of outer number types
* @param body Input number as post body (optional)
* @return BigDecimal
*/
@POST("/fake/outer/number")
BigDecimal fakeOuterNumberSerialize(
@retrofit.http.Body BigDecimal body
);
/**
*
* Async method
* @param body Input number as post body (optional)
* @param cb callback method
*/
@POST("/fake/outer/number")
void fakeOuterNumberSerialize(
@retrofit.http.Body BigDecimal body, Callback<BigDecimal> cb
);
/**
*
* Sync method
* Test serialization of outer string types
* @param body Input string as post body (optional)
* @return String
*/
@POST("/fake/outer/string")
String fakeOuterStringSerialize(
@retrofit.http.Body String body
);
/**
*
* Async method
* @param body Input string as post body (optional)
* @param cb callback method
*/
@POST("/fake/outer/string")
void fakeOuterStringSerialize(
@retrofit.http.Body String body, Callback<String> cb
);
/**
* To test \&quot;client\&quot; model
* Sync method

View File

@ -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
*
* 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.google.gson.annotations.SerializedName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.math.BigDecimal;
/**
* OuterComposite
*/
public class OuterComposite {
@SerializedName("my_number")
private BigDecimal myNumber = null;
@SerializedName("my_string")
private String myString = null;
@SerializedName("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 ");
}
}

Some files were not shown because too many files have changed in this diff Show More