Compare commits

...

6 Commits

Author SHA1 Message Date
William Cheng
de2923f7a2 update travis config 2018-12-31 17:10:47 +08:00
William Cheng
aa58a167ab 4.0.0-beta release 2018-12-31 17:09:25 +08:00
Akihito Nakano
354db2f3e6 Fix: Inline models can't be generated (#1768)
* Add a test case

* Fix that the inline models couldn't be flatten when "components" doesn't exist

* Rename yaml file

* Rename method name
2018-12-31 17:00:28 +08:00
Akihito Nakano
f96e64bd9e Add test case for InlineModelResolver: inline object response with additionalProperties (#1781)
* Add test case : inline object response with additionalProperties

* Delete legacy test case
2018-12-31 14:36:30 +08:00
William Cheng
3ec90a86cb Add an option to generate the alias (map, array) as model (#1729)
* add option to generate alias as model

* fix issue due to incorrect merge
2018-12-31 11:59:58 +08:00
William Cheng
2f6381cb19 Add nullable support to C# client (refactor) (#1775)
* add nullable support to c# client (refactor)

* clean up methods

* move typemapping to constructor
2018-12-31 10:44:02 +08:00
75 changed files with 610 additions and 428 deletions

View File

@@ -97,7 +97,7 @@ before_install:
- cat /etc/hosts
# show java version
- java -version
- if [ "$TRAVIS_BRANCH" = "master" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
- if [ "$TRAVIS_BRANCH" = "4.0.0-beta" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
openssl aes-256-cbc -K $encrypted_6e2c8bba47c6_key -iv $encrypted_6e2c8bba47c6_iv -in sec.gpg.enc -out sec.gpg -d ;
gpg --keyserver keyserver.ubuntu.com --recv-key $SIGNING_KEY ;
gpg --check-trustdb ;
@@ -130,7 +130,7 @@ script:
after_success:
# push to maven repo
- if [ $SONATYPE_USERNAME ] && [ -z $TRAVIS_TAG ] && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
if [ "$TRAVIS_BRANCH" = "master" ]; then
if [ "$TRAVIS_BRANCH" = "4.0.0-beta" ]; then
mvn clean deploy -DskipTests=true -B -U -P release --settings CI/settings.xml;
echo "Finished mvn clean deploy for $TRAVIS_BRANCH";
pushd .;
@@ -149,9 +149,9 @@ after_success:
fi;
fi;
## docker: build and push openapi-generator-online to DockerHub
- if [ $DOCKER_HUB_USERNAME ]; then echo "$DOCKER_HUB_PASSWORD" | docker login --username=$DOCKER_HUB_USERNAME --password-stdin && docker build -t $DOCKER_GENERATOR_IMAGE_NAME ./modules/openapi-generator-online && if [ ! -z "$TRAVIS_TAG" ]; then docker tag $DOCKER_GENERATOR_IMAGE_NAME:latest $DOCKER_GENERATOR_IMAGE_NAME:$TRAVIS_TAG; fi && if [ ! -z "$TRAVIS_TAG" ] || [ "$TRAVIS_BRANCH" = "master" ]; then docker push $DOCKER_GENERATOR_IMAGE_NAME && echo "Pushed to $DOCKER_GENERATOR_IMAGE_NAME"; fi; fi
- if [ $DOCKER_HUB_USERNAME ]; then echo "$DOCKER_HUB_PASSWORD" | docker login --username=$DOCKER_HUB_USERNAME --password-stdin && docker build -t $DOCKER_GENERATOR_IMAGE_NAME ./modules/openapi-generator-online && if [ ! -z "$TRAVIS_TAG" ]; then docker tag $DOCKER_GENERATOR_IMAGE_NAME:latest $DOCKER_GENERATOR_IMAGE_NAME:$TRAVIS_TAG; fi && if [ ! -z "$TRAVIS_TAG" ] || [ "$TRAVIS_BRANCH" = "4.0.0-beta" ]; then docker push $DOCKER_GENERATOR_IMAGE_NAME && echo "Pushed to $DOCKER_GENERATOR_IMAGE_NAME"; fi; fi
## docker: build cli image and push to Docker Hub
- if [ $DOCKER_HUB_USERNAME ]; then echo "$DOCKER_HUB_PASSWORD" | docker login --username=$DOCKER_HUB_USERNAME --password-stdin && cp docker-entrypoint.sh ./modules/openapi-generator-cli && docker build -t $DOCKER_CODEGEN_CLI_IMAGE_NAME ./modules/openapi-generator-cli && if [ ! -z "$TRAVIS_TAG" ]; then docker tag $DOCKER_CODEGEN_CLI_IMAGE_NAME:latest $DOCKER_CODEGEN_CLI_IMAGE_NAME:$TRAVIS_TAG; fi && if [ ! -z "$TRAVIS_TAG" ] || [ "$TRAVIS_BRANCH" = "master" ]; then docker push $DOCKER_CODEGEN_CLI_IMAGE_NAME && echo "Pushed to $DOCKER_CODEGEN_CLI_IMAGE_NAME"; fi; fi
- if [ $DOCKER_HUB_USERNAME ]; then echo "$DOCKER_HUB_PASSWORD" | docker login --username=$DOCKER_HUB_USERNAME --password-stdin && cp docker-entrypoint.sh ./modules/openapi-generator-cli && docker build -t $DOCKER_CODEGEN_CLI_IMAGE_NAME ./modules/openapi-generator-cli && if [ ! -z "$TRAVIS_TAG" ]; then docker tag $DOCKER_CODEGEN_CLI_IMAGE_NAME:latest $DOCKER_CODEGEN_CLI_IMAGE_NAME:$TRAVIS_TAG; fi && if [ ! -z "$TRAVIS_TAG" ] || [ "$TRAVIS_BRANCH" = "4.0.0-beta" ]; then docker push $DOCKER_CODEGEN_CLI_IMAGE_NAME && echo "Pushed to $DOCKER_CODEGEN_CLI_IMAGE_NAME"; fi; fi
env:
- DOCKER_GENERATOR_IMAGE_NAME=openapitools/openapi-generator-online DOCKER_CODEGEN_CLI_IMAGE_NAME=openapitools/openapi-generator-cli NODE_ENV=test CC=gcc-5 CXX=g++-5

View File

@@ -15,7 +15,7 @@ elif [ "$NODE_INDEX" = "2" ]; then
java -version
#export GO_POST_PROCESS_FILE="/usr/local/bin/gofmt -w"
# not formatting the code as different go versions may format the code a bit different
./bin/utils/ensure-up-to-date
#./bin/utils/ensure-up-to-date
else
echo "Running node $NODE_INDEX to test 'samples.circleci.jdk7' defined in pom.xml ..."
sudo update-java-alternatives -s java-1.7.0-openjdk-amd64

View File

@@ -3,7 +3,7 @@
<parent>
<groupId>org.openapitools</groupId>
<artifactId>openapi-generator-project</artifactId>
<version>4.0.0-SNAPSHOT</version>
<version>4.0.0-beta</version>
<relativePath>../..</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@@ -208,6 +208,9 @@ public class Generate implements Runnable {
@Option(name = {"--enable-post-process-file"}, title = "enable post-process file", description = CodegenConstants.ENABLE_POST_PROCESS_FILE)
private Boolean enablePostProcessFile;
@Option(name = {"--generate-alias-as-model"}, title = "generate alias (array, map) as model", description = CodegenConstants.GENERATE_ALIAS_AS_MODEL_DESC)
private Boolean generateAliasAsModel;
@Override
public void run() {
if (logToStderr != null) {
@@ -334,6 +337,10 @@ public class Generate implements Runnable {
configurator.setEnablePostProcessFile(enablePostProcessFile);
}
if (generateAliasAsModel != null) {
configurator.setGenerateAliasAsModel(generateAliasAsModel);
}
applySystemPropertiesKvpList(systemProperties, configurator);
applyInstantiationTypesKvpList(instantiationTypes, configurator);
applyImportMappingsKvpList(importMappings, configurator);

View File

@@ -1,4 +1,4 @@
openApiGeneratorVersion=4.0.0-SNAPSHOT
openApiGeneratorVersion=4.0.0-beta
# BEGIN placeholders
# these are just placeholders to allow contributors to build directly

View File

@@ -3,7 +3,7 @@
<parent>
<groupId>org.openapitools</groupId>
<artifactId>openapi-generator-project</artifactId>
<version>4.0.0-SNAPSHOT</version>
<version>4.0.0-beta</version>
<relativePath>../..</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.openapitools</groupId>
<artifactId>openapi-generator-project</artifactId>
<version>4.0.0-SNAPSHOT</version>
<version>4.0.0-beta</version>
<relativePath>../..</relativePath>
</parent>
<artifactId>openapi-generator-maven-plugin</artifactId>

View File

@@ -3,7 +3,7 @@
<parent>
<groupId>org.openapitools</groupId>
<artifactId>openapi-generator-project</artifactId>
<version>4.0.0-SNAPSHOT</version>
<version>4.0.0-beta</version>
<relativePath>../..</relativePath>
</parent>
<artifactId>openapi-generator-online</artifactId>

View File

@@ -3,7 +3,7 @@
<parent>
<groupId>org.openapitools</groupId>
<artifactId>openapi-generator-project</artifactId>
<version>4.0.0-SNAPSHOT</version>
<version>4.0.0-beta</version>
<relativePath>../..</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@@ -264,11 +264,11 @@ public interface CodegenConfig {
boolean isEnablePostProcessFile();
public void setEnablePostProcessFile(boolean isEnablePostProcessFile);
void setEnablePostProcessFile(boolean isEnablePostProcessFile);
// set OpenAPI and schemas
public void setGlobalOpenAPI(OpenAPI openAPI);
void setGlobalOpenAPI(OpenAPI openAPI);
public void setGlobalSchemas(OpenAPI openAPI);
void setGlobalSchemas(OpenAPI openAPI);
}

View File

@@ -284,6 +284,9 @@ public class CodegenConstants {
public static final String OPEN_API_SPEC_NAME = "openAPISpecName";
public static final String GENERATE_ALIAS_AS_MODEL = "generateAliasAsModel";
public static final String GENERATE_ALIAS_AS_MODEL_DESC = "Generate alias to map, array as models";
public static final String USE_COMPARE_NET_OBJECTS = "useCompareNetObjects";
public static final String USE_COMPARE_NET_OBJECTS_DESC = "Use KellermanSoftware.CompareNetObjects for deep recursive object comparison. WARNING: this option incurs potential performance impact.";
}

View File

@@ -209,6 +209,11 @@ public class DefaultCodegen implements CodegenConfig {
this.setEnablePostProcessFile(Boolean.valueOf(additionalProperties
.get(CodegenConstants.ENABLE_POST_PROCESS_FILE).toString()));
}
if (additionalProperties.containsKey(CodegenConstants.GENERATE_ALIAS_AS_MODEL)) {
ModelUtils.setGenerateAliasAsModel(Boolean.valueOf(additionalProperties
.get(CodegenConstants.GENERATE_ALIAS_AS_MODEL).toString()));
}
}
// override with any special post-processing for all models

View File

@@ -434,13 +434,13 @@ public class DefaultGenerator extends AbstractGenerator implements Generator {
LOGGER.info("Model " + name + " not generated since it's a free-form object");
continue;
} else if (ModelUtils.isMapSchema(schema)) { // check to see if it's a "map" model
if (schema.getProperties() == null || schema.getProperties().isEmpty()) {
if (!ModelUtils.isGenerateAliasAsModel() && (schema.getProperties() == null || schema.getProperties().isEmpty())) {
// schema without property, i.e. alias to map
LOGGER.info("Model " + name + " not generated since it's an alias to map (without property)");
continue;
}
} else if (ModelUtils.isArraySchema(schema)) { // check to see if it's an "array" model
if (schema.getProperties() == null || schema.getProperties().isEmpty()) {
if (!ModelUtils.isGenerateAliasAsModel() && (schema.getProperties() == null || schema.getProperties().isEmpty())) {
// schema without property, i.e. alias to array
LOGGER.info("Model " + name + " not generated since it's an alias to array (without property)");
continue;

View File

@@ -17,6 +17,7 @@
package org.openapitools.codegen;
import io.swagger.v3.oas.models.Components;
import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.oas.models.media.Schema;
import io.swagger.v3.oas.models.media.ArraySchema;
@@ -49,7 +50,7 @@ public class InlineModelResolver {
this.openapi = openapi;
if (openapi.getComponents() == null) {
return; // There's nothing here
openapi.setComponents(new Components());
}
if (openapi.getComponents().getSchemas() == null) {

View File

@@ -220,6 +220,15 @@ public class CodegenConfigurator implements Serializable {
return this;
}
public boolean isGenerateAliasAsModel() {
return ModelUtils.isGenerateAliasAsModel();
}
public CodegenConfigurator setGenerateAliasAsModel(boolean generateAliasAsModel) {
ModelUtils.setGenerateAliasAsModel(generateAliasAsModel);
return this;
}
public String getModelNameSuffix() {
return modelNameSuffix;
}

View File

@@ -75,6 +75,12 @@ public abstract class AbstractCSharpCodegen extends DefaultCodegen implements Co
protected Set<String> collectionTypes;
protected Set<String> mapTypes;
// true if support nullable type
protected boolean supportNullable = Boolean.FALSE;
// nullable type
protected Set<String> nullableType = new HashSet<String>();
private static final Logger LOGGER = LoggerFactory.getLogger(AbstractCSharpCodegen.class);
public AbstractCSharpCodegen() {
@@ -130,19 +136,26 @@ public abstract class AbstractCSharpCodegen extends DefaultCodegen implements Co
"String",
"string",
"bool?",
"bool",
"double?",
"double",
"decimal?",
"decimal",
"int?",
"int",
"long?",
"long",
"float?",
"float",
"byte[]",
"ICollection",
"Collection",
"List",
"Dictionary",
"DateTime?",
"DateTime",
"DateTimeOffset?",
"String",
"DataTimeOffset",
"Boolean",
"Double",
"Int32",
@@ -157,6 +170,7 @@ public abstract class AbstractCSharpCodegen extends DefaultCodegen implements Co
instantiationTypes.put("list", "List");
instantiationTypes.put("map", "Dictionary");
// Nullable types here assume C# 2 support is not part of base
typeMapping = new HashMap<String, String>();
typeMapping.put("string", "string");
@@ -176,6 +190,11 @@ public abstract class AbstractCSharpCodegen extends DefaultCodegen implements Co
typeMapping.put("map", "Dictionary");
typeMapping.put("object", "Object");
typeMapping.put("UUID", "Guid?");
// nullable type
nullableType = new HashSet<String>(
Arrays.asList("decimal", "bool", "int", "float", "long", "double", "DateTime", "Guid")
);
}
public void setReturnICollection(boolean returnICollection) {
@@ -209,8 +228,7 @@ public abstract class AbstractCSharpCodegen extends DefaultCodegen implements Co
this.useDateTimeOffsetFlag = flag;
if (flag) {
typeMapping.put("DateTime", "DateTimeOffset?");
}
else {
} else {
typeMapping.put("DateTime", "DateTime?");
}
}
@@ -421,8 +439,8 @@ public abstract class AbstractCSharpCodegen extends DefaultCodegen implements Co
}
for (Map.Entry<String, Object> entry : models.entrySet()) {
String swaggerName = entry.getKey();
CodegenModel model = ModelUtils.getModelByName(swaggerName, models);
String openAPIName = entry.getKey();
CodegenModel model = ModelUtils.getModelByName(openAPIName, models);
if (model != null) {
for (CodegenProperty var : model.allVars) {
if (enumRefs.containsKey(var.dataType)) {
@@ -483,7 +501,7 @@ public abstract class AbstractCSharpCodegen extends DefaultCodegen implements Co
}
}
} else {
LOGGER.warn("Expected to retrieve model %s by name, but no model was found. Check your -Dmodels inclusions.", swaggerName);
LOGGER.warn("Expected to retrieve model %s by name, but no model was found. Check your -Dmodels inclusions.", openAPIName);
}
}
}
@@ -573,28 +591,30 @@ public abstract class AbstractCSharpCodegen extends DefaultCodegen implements Co
}
}
for (CodegenParameter parameter: operation.allParams) {
CodegenModel model = null;
for(Object modelHashMap: allModels) {
CodegenModel codegenModel = ((HashMap<String, CodegenModel>) modelHashMap).get("model");
if (codegenModel.getClassname().equals(parameter.dataType)) {
model = codegenModel;
break;
if (!isSupportNullable()) {
for (CodegenParameter parameter : operation.allParams) {
CodegenModel model = null;
for (Object modelHashMap : allModels) {
CodegenModel codegenModel = ((HashMap<String, CodegenModel>) modelHashMap).get("model");
if (codegenModel.getClassname().equals(parameter.dataType)) {
model = codegenModel;
break;
}
}
}
if (model == null) {
// Primitive data types all come already marked
parameter.isNullable = true;
} else {
// Effectively mark enum models as enums and non-nullable
if (model.isEnum) {
parameter.isEnum = true;
parameter.allowableValues = model.allowableValues;
parameter.isPrimitiveType = true;
parameter.isNullable = false;
} else {
if (model == null) {
// Primitive data types all come already marked
parameter.isNullable = true;
} else {
// Effectively mark enum models as enums and non-nullable
if (model.isEnum) {
parameter.isEnum = true;
parameter.allowableValues = model.allowableValues;
parameter.isPrimitiveType = true;
parameter.isNullable = false;
} else {
parameter.isNullable = true;
}
}
}
}
@@ -792,6 +812,14 @@ public abstract class AbstractCSharpCodegen extends DefaultCodegen implements Co
return reservedWords.contains(word);
}
public String getNullableType(Schema p, String type) {
if (languageSpecificPrimitives.contains(type)) {
return type;
} else {
return null;
}
}
@Override
public String getSchemaType(Schema p) {
String openAPIType = super.getSchemaType(p);
@@ -804,8 +832,9 @@ public abstract class AbstractCSharpCodegen extends DefaultCodegen implements Co
if (typeMapping.containsKey(openAPIType)) {
type = typeMapping.get(openAPIType);
if (languageSpecificPrimitives.contains(type)) {
return type;
String languageType = getNullableType(p, type);
if (languageType != null) {
return languageType;
}
} else {
type = openAPIType;
@@ -950,6 +979,14 @@ public abstract class AbstractCSharpCodegen extends DefaultCodegen implements Co
this.interfacePrefix = interfacePrefix;
}
public boolean isSupportNullable() {
return supportNullable;
}
public void setSupportNullable(final boolean supportNullable) {
this.supportNullable = supportNullable;
}
@Override
public String toEnumValue(String value, String datatype) {
// C# only supports enums as literals for int, int?, long, long?, byte, and byte?. All else must be treated as strings.
@@ -1011,7 +1048,9 @@ public abstract class AbstractCSharpCodegen extends DefaultCodegen implements Co
@Override
public boolean isDataTypeString(String dataType) {
// also treat double/decimal/float as "string" in enum so that the values (e.g. 2.8) get double-quoted
return "String".equalsIgnoreCase(dataType) || "double?".equals(dataType) || "decimal?".equals(dataType) || "float?".equals(dataType);
return "String".equalsIgnoreCase(dataType) ||
"double?".equals(dataType) || "decimal?".equals(dataType) || "float?".equals(dataType) ||
"double".equals(dataType) || "decimal".equals(dataType) || "float".equals(dataType);
}
@Override

View File

@@ -776,7 +776,6 @@ public class CSharpClientCodegen extends AbstractCSharpCodegen {
}
}
public void setPackageName(String packageName) {
this.packageName = packageName;
}

View File

@@ -22,6 +22,7 @@ import static org.apache.commons.lang3.StringUtils.isEmpty;
import com.google.common.collect.ImmutableMap;
import com.samskivert.mustache.Mustache;
import io.swagger.v3.oas.models.media.ArraySchema;
import io.swagger.v3.oas.models.media.Schema;
import org.openapitools.codegen.CliOption;
@@ -32,6 +33,7 @@ import org.openapitools.codegen.CodegenParameter;
import org.openapitools.codegen.CodegenProperty;
import org.openapitools.codegen.CodegenType;
import org.openapitools.codegen.SupportingFile;
import org.openapitools.codegen.utils.ModelUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -84,19 +86,39 @@ public class CSharpRefactorClientCodegen extends AbstractCSharpCodegen {
// By default, generated code is considered public
protected boolean nonPublicApi = Boolean.FALSE;
public CSharpRefactorClientCodegen() {
super();
// mapped non-nullable type without ?
typeMapping = new HashMap<String, String>();
typeMapping.put("string", "string");
typeMapping.put("binary", "byte[]");
typeMapping.put("ByteArray", "byte[]");
typeMapping.put("boolean", "bool");
typeMapping.put("integer", "int");
typeMapping.put("float", "float");
typeMapping.put("long", "long");
typeMapping.put("double", "double");
typeMapping.put("number", "decimal");
typeMapping.put("DateTime", "DateTime");
typeMapping.put("date", "DateTime");
typeMapping.put("file", "System.IO.Stream");
typeMapping.put("array", "List");
typeMapping.put("list", "List");
typeMapping.put("map", "Dictionary");
typeMapping.put("object", "Object");
typeMapping.put("UUID", "Guid");
setSupportNullable(Boolean.TRUE);
hideGenerationTimestamp = Boolean.TRUE;
supportsInheritance = true;
modelTemplateFiles.put("model.mustache", ".cs");
apiTemplateFiles.put("api.mustache", ".cs");
modelDocTemplateFiles.put("model_doc.mustache", ".md");
apiDocTemplateFiles.put("api_doc.mustache", ".md");
embeddedTemplateDir = templateDir = "csharp-refactor";
hideGenerationTimestamp = Boolean.TRUE;
cliOptions.clear();
// CLI options
@@ -223,7 +245,6 @@ public class CSharpRefactorClientCodegen extends AbstractCSharpCodegen {
setModelPropertyNaming((String) additionalProperties.get(CodegenConstants.MODEL_PROPERTY_NAMING));
}
if (isEmpty(apiPackage)) {
setApiPackage("Api");
}
@@ -609,6 +630,10 @@ public class CSharpRefactorClientCodegen extends AbstractCSharpCodegen {
public void postProcessParameter(CodegenParameter parameter) {
postProcessPattern(parameter.pattern, parameter.vendorExtensions);
super.postProcessParameter(parameter);
if (!parameter.required && nullableType.contains(parameter.dataType)) { //optional
parameter.dataType = parameter.dataType + "?";
}
}
@Override
@@ -852,4 +877,17 @@ public class CSharpRefactorClientCodegen extends AbstractCSharpCodegen {
// To avoid unexpected behaviors when options are passed programmatically such as { "supportsAsync": "" }
return super.processCompiler(compiler).emptyStringIsFalse(true);
}
@Override
public String getNullableType(Schema p, String type) {
if (languageSpecificPrimitives.contains(type)) {
if (isSupportNullable() && ModelUtils.isNullable(p) && nullableType.contains(type)) {
return type + "?";
} else {
return type;
}
} else {
return null;
}
}
}

View File

@@ -61,6 +61,16 @@ import java.util.stream.Collectors;
public class ModelUtils {
private static final Logger LOGGER = LoggerFactory.getLogger(ModelUtils.class);
private static boolean generateAliasAsModel = false;
public static void setGenerateAliasAsModel(boolean value) {
generateAliasAsModel = value;
}
public static boolean isGenerateAliasAsModel() {
return generateAliasAsModel;
}
/**
* Searches for the model by name in the map of models and returns it
@@ -769,15 +779,23 @@ public class ModelUtils {
// top-level enum class
return schema;
} else if (isArraySchema(ref)) {
return unaliasSchema(allSchemas, allSchemas.get(ModelUtils.getSimpleRef(schema.get$ref())));
if (generateAliasAsModel) {
return schema; // generate a model extending array
} else {
return unaliasSchema(allSchemas, allSchemas.get(ModelUtils.getSimpleRef(schema.get$ref())));
}
} else if (isComposedSchema(ref)) {
return schema;
} else if (isMapSchema(ref)) {
if (ref.getProperties() != null && !ref.getProperties().isEmpty()) // has at least one property
return schema; // treat it as model
else {
// treat it as a typical map
return unaliasSchema(allSchemas, allSchemas.get(ModelUtils.getSimpleRef(schema.get$ref())));
if (generateAliasAsModel) {
return schema; // generate a model extending map
} else {
// treat it as a typical map
return unaliasSchema(allSchemas, allSchemas.get(ModelUtils.getSimpleRef(schema.get$ref())));
}
}
} else if (isObjectSchema(ref)) { // model
if (ref.getProperties() != null && !ref.getProperties().isEmpty()) { // has at least one property

View File

@@ -85,7 +85,7 @@ namespace {{packageName}}.{{apiPackage}}
/// </summary>
{{>visibility}} interface {{interfacePrefix}}{{classname}} : {{interfacePrefix}}{{classname}}Sync{{#supportsAsync}}, {{interfacePrefix}}{{classname}}Async{{/supportsAsync}}
{
}
/// <summary>
@@ -94,7 +94,7 @@ namespace {{packageName}}.{{apiPackage}}
{{>visibility}} partial class {{classname}} : {{interfacePrefix}}{{classname}}
{
private {{packageName}}.Client.ExceptionFactory _exceptionFactory = (name, response) => null;
/// <summary>
/// Initializes a new instance of the <see cref="{{classname}}"/> class.
/// </summary>
@@ -151,7 +151,7 @@ namespace {{packageName}}.{{apiPackage}}
if(asyncClient == null) throw new ArgumentNullException("asyncClient");
{{/supportsAsync}}
if(configuration == null) throw new ArgumentNullException("configuration");
this.Client = client;
{{#supportsAsync}}
this.AsynchronousClient = asyncClient;
@@ -225,13 +225,15 @@ namespace {{packageName}}.{{apiPackage}}
public {{packageName}}.Client.ApiResponse<{{#returnType}} {{{returnType}}} {{/returnType}}{{^returnType}}Object{{/returnType}}> {{operationId}}WithHttpInfo ({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = null{{/optionalMethodArgument}}{{/required}}{{#hasMore}}, {{/hasMore}}{{/allParams}})
{
{{#allParams}}
{{^isNullable}}
{{#required}}
// verify the required parameter '{{paramName}}' is set
if ({{paramName}} == null)
throw new {{packageName}}.Client.ApiException(400, "Missing required parameter '{{paramName}}' when calling {{classname}}->{{operationId}}");
{{/required}}
{{/allParams}}
{{/required}}
{{/isNullable}}
{{/allParams}}
{{packageName}}.Client.RequestOptions requestOptions = new {{packageName}}.Client.RequestOptions();
String[] @contentTypes = new String[] {
@@ -362,11 +364,14 @@ namespace {{packageName}}.{{apiPackage}}
public async System.Threading.Tasks.Task<{{packageName}}.Client.ApiResponse<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Object{{/returnType}}>> {{operationId}}AsyncWithHttpInfo ({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = null{{/optionalMethodArgument}}{{/required}}{{#hasMore}}, {{/hasMore}}{{/allParams}})
{
{{#allParams}}
{{^isNullable}}
{{#required}}
// verify the required parameter '{{paramName}}' is set
if ({{paramName}} == null)
throw new {{packageName}}.Client.ApiException(400, "Missing required parameter '{{paramName}}' when calling {{classname}}->{{operationId}}");
{{/required}}
{{/isNullable}}
{{/allParams}}
{{packageName}}.Client.RequestOptions requestOptions = new {{packageName}}.Client.RequestOptions();

View File

@@ -58,6 +58,7 @@
{{#vars}}
{{^isInherited}}
{{^isReadOnly}}
{{^isNullable}}
{{#required}}
{{^isEnum}}
// to ensure "{{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}}" is required (not null)
@@ -74,6 +75,7 @@
this.{{name}} = {{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}};
{{/isEnum}}
{{/required}}
{{/isNullable}}
{{/isReadOnly}}
{{/isInherited}}
{{/vars}}

View File

@@ -24,7 +24,9 @@ import io.swagger.v3.oas.models.parameters.RequestBody;
import io.swagger.v3.oas.models.responses.ApiResponse;
import io.swagger.v3.oas.models.responses.ApiResponses;
import io.swagger.v3.parser.core.models.ParseOptions;
import org.apache.commons.lang3.StringUtils;
import org.openapitools.codegen.utils.ModelUtils;
import org.testng.Assert;
import org.testng.annotations.Test;
import java.util.HashMap;
@@ -274,6 +276,16 @@ public class InlineModelResolverTest {
assertTrue(model.getProperties().get("name") instanceof StringSchema);
}
@Test
public void resolveInlineRequestBodyWhenNoComponents() {
OpenAPI openAPI = new OpenAPIParser().readLocation("src/test/resources/3_0/inline_request_body_no_components.yaml", null, new ParseOptions()).getOpenAPI();
new InlineModelResolver().flatten(openAPI);
assertNotNull(openAPI.getComponents());
assertNotNull(openAPI.getComponents().getRequestBodies());
}
/*
@Test
public void resolveInlineArraySchemaWithTitle() {
OpenAPI openAPI = new OpenAPIParser().readLocation("src/test/resources/3_0/inline_model_resolver.yaml", null, new ParseOptions()).getOpenAPI();
@@ -454,64 +466,29 @@ public class InlineModelResolverTest {
ArraySchema responseSchema = (ArraySchema) mediaType.getSchema();
assertEquals("#/components/schemas/resolveInlineArrayResponseWithTitleItems", responseSchema.getItems().get$ref());
}
@Test
public void resolveInlineObjectResponseWithAdditionalProperties() {
OpenAPI openAPI = new OpenAPIParser().readLocation("src/test/resources/3_0/inline_model_resolver.yaml", null, new ParseOptions()).getOpenAPI();
new InlineModelResolver().flatten(openAPI);
MediaType mediaType = openAPI
.getPaths()
.get("/resolve_inline_object_response_with_additional_properties")
.getGet()
.getResponses()
.get("200")
.getContent()
.get("application/json");
assertTrue(mediaType.getSchema() instanceof ObjectSchema);
assertTrue(mediaType.getSchema().getAdditionalProperties() instanceof ObjectSchema);
ObjectSchema additionalProperties = (ObjectSchema) mediaType.getSchema().getAdditionalProperties();
assertTrue(additionalProperties.getProperties().get("resolve_inline_object_response_with_additional_properties") instanceof StringSchema);
}
/*
@Test
public void testInlineMapResponse() throws Exception {
OpenAPI openapi = new OpenAPI();
MapProperty schema = new MapProperty();
schema.setAdditionalProperties(new StringSchema());
schema.setVendorExtension("x-ext", "ext-prop");
openapi.path("/foo/baz", new Path()
.get(new Operation()
.response(200, new Response()
.vendorExtension("x-foo", "bar")
.description("it works!")
.schema(schema))));
new InlineModelResolver().flatten(openapi);
Json.prettyPrint(openapi);
Response response = openapi.getPaths().get("/foo/baz").getGet().getResponses().get("200");
Property property = response.getSchema();
assertTrue(property instanceof MapProperty);
assertTrue(openapi.getComponents().getSchemas().size() == 0);
assertEquals(1, property.getVendorExtensions().size());
assertEquals("ext-prop", property.getVendorExtensions().get("x-ext"));
}
@Test
public void testInlineMapResponseWithObjectSchema() throws Exception {
OpenAPI openapi = new OpenAPI();
MapProperty schema = new MapProperty();
schema.setAdditionalProperties(new ObjectSchema()
.addProperties("name", new StringSchema()));
schema.setVendorExtension("x-ext", "ext-prop");
openapi.path("/foo/baz", new Path()
.get(new Operation()
.response(200, new Response()
.vendorExtension("x-foo", "bar")
.description("it works!")
.schema(schema))));
new InlineModelResolver().flatten(openapi);
Response response = openapi.getPaths().get("/foo/baz").getGet().getResponses().get("200");
Property property = response.getSchema();
assertTrue(property instanceof MapProperty);
assertEquals(1, property.getVendorExtensions().size());
assertEquals("ext-prop", property.getVendorExtensions().get("x-ext"));
assertTrue(openapi.getComponents().getSchemas().size() == 1);
Model inline = openapi.getComponents().getSchemas().get("inline_response_200");
assertTrue(inline instanceof ObjectSchema);
ObjectSchema impl = (ObjectSchema) inline;
assertNotNull(impl.getProperties().get("name"));
assertTrue(impl.getProperties().get("name") instanceof StringSchema);
}
@Test
public void testArrayResponse() {
OpenAPI openapi = new OpenAPI();

View File

@@ -121,6 +121,21 @@ paths:
properties:
array_response_with_title_property:
type: string
/resolve_inline_object_response_with_additional_properties:
get:
operationId: resolveInlineObjectResponseWithAdditionalProperties
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
additionalProperties:
type: object
properties:
resolve_inline_object_response_with_additional_properties:
type: string
components:
schemas:
Users:

View File

@@ -0,0 +1,24 @@
openapi: 3.0.1
info:
version: 1.0.0
title: Example
license:
name: MIT
servers:
- url: http://api.example.xyz/v1
paths:
/test1:
post:
requestBody:
description: test
content:
application/json:
schema:
type: object
properties:
name:
type: string
operationId: test1
responses:
'200':
description: OK

View File

@@ -9,7 +9,7 @@
<artifactId>openapi-generator-project</artifactId>
<packaging>pom</packaging>
<name>openapi-generator-project</name>
<version>4.0.0-SNAPSHOT</version>
<version>4.0.0-beta</version>
<url>https://github.com/openapitools/openapi-generator</url>
<scm>
<connection>scm:git:git@github.com:openapitools/openapi-generator.git</connection>

View File

@@ -3,7 +3,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Code** | **int?** | | [optional]
**Code** | **int** | | [optional]
**Type** | **string** | | [optional]
**Message** | **string** | | [optional]

View File

@@ -3,7 +3,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**ArrayArrayNumber** | **List&lt;List&lt;decimal?&gt;&gt;** | | [optional]
**ArrayArrayNumber** | **List&lt;List&lt;decimal&gt;&gt;** | | [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

@@ -3,7 +3,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**ArrayNumber** | **List&lt;decimal?&gt;** | | [optional]
**ArrayNumber** | **List&lt;decimal&gt;** | | [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

@@ -4,7 +4,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**ArrayOfString** | **List&lt;string&gt;** | | [optional]
**ArrayArrayOfInteger** | **List&lt;List&lt;long?&gt;&gt;** | | [optional]
**ArrayArrayOfInteger** | **List&lt;List&lt;long&gt;&gt;** | | [optional]
**ArrayArrayOfModel** | **List&lt;List&lt;ReadOnlyFirst&gt;&gt;** | | [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

@@ -5,7 +5,7 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**ClassName** | **string** | |
**Color** | **string** | | [optional] [default to "red"]
**Declawed** | **bool?** | | [optional]
**Declawed** | **bool** | | [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

@@ -3,7 +3,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Id** | **long?** | | [optional]
**Id** | **long** | | [optional]
**Name** | **string** | | [default to "default-name"]
[[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

@@ -5,8 +5,8 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**EnumString** | **string** | | [optional]
**EnumStringRequired** | **string** | |
**EnumInteger** | **int?** | | [optional]
**EnumNumber** | **double?** | | [optional]
**EnumInteger** | **int** | | [optional]
**EnumNumber** | **double** | | [optional]
**OuterEnum** | [**OuterEnum**](OuterEnum.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

@@ -20,7 +20,7 @@ Method | HTTP request | Description
<a name="fakeouterbooleanserialize"></a>
# **FakeOuterBooleanSerialize**
> bool? FakeOuterBooleanSerialize (bool? body = null)
> bool FakeOuterBooleanSerialize (bool? body = null)
@@ -45,7 +45,7 @@ namespace Example
try
{
bool? result = apiInstance.FakeOuterBooleanSerialize(body);
bool result = apiInstance.FakeOuterBooleanSerialize(body);
Debug.WriteLine(result);
}
catch (Exception e)
@@ -65,7 +65,7 @@ Name | Type | Description | Notes
### Return type
**bool?**
**bool**
### Authorization
@@ -140,7 +140,7 @@ No authorization required
<a name="fakeouternumberserialize"></a>
# **FakeOuterNumberSerialize**
> decimal? FakeOuterNumberSerialize (decimal? body = null)
> decimal FakeOuterNumberSerialize (decimal? body = null)
@@ -165,7 +165,7 @@ namespace Example
try
{
decimal? result = apiInstance.FakeOuterNumberSerialize(body);
decimal result = apiInstance.FakeOuterNumberSerialize(body);
Debug.WriteLine(result);
}
catch (Exception e)
@@ -185,7 +185,7 @@ Name | Type | Description | Notes
### Return type
**decimal?**
**decimal**
### Authorization
@@ -439,7 +439,7 @@ No authorization required
<a name="testendpointparameters"></a>
# **TestEndpointParameters**
> void TestEndpointParameters (decimal? number, double? _double, string patternWithoutDelimiter, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, string _string = null, System.IO.Stream binary = null, DateTime? date = null, DateTime? dateTime = null, string password = null, string callback = null)
> void TestEndpointParameters (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, string _string = null, System.IO.Stream binary = null, DateTime? date = null, DateTime? dateTime = null, string password = null, string callback = null)
Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
@@ -464,8 +464,8 @@ namespace Example
Configuration.Default.Password = "YOUR_PASSWORD";
var apiInstance = new FakeApi();
var number = 8.14; // decimal? | None
var _double = 1.2D; // double? | None
var number = 8.14; // decimal | None
var _double = 1.2D; // double | None
var patternWithoutDelimiter = patternWithoutDelimiter_example; // string | None
var _byte = BYTE_ARRAY_DATA_HERE; // byte[] | None
var integer = 56; // int? | None (optional)
@@ -497,8 +497,8 @@ namespace Example
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**number** | **decimal?**| None |
**_double** | **double?**| None |
**number** | **decimal**| None |
**_double** | **double**| None |
**patternWithoutDelimiter** | **string**| None |
**_byte** | **byte[]**| None |
**integer** | **int?**| None | [optional]
@@ -603,7 +603,7 @@ No authorization required
<a name="testgroupparameters"></a>
# **TestGroupParameters**
> void TestGroupParameters (int? requiredStringGroup, bool? requiredBooleanGroup, long? requiredInt64Group, int? stringGroup = null, bool? booleanGroup = null, long? int64Group = null)
> void TestGroupParameters (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = null, bool? booleanGroup = null, long? int64Group = null)
Fake endpoint to test group parameters (optional)
@@ -624,9 +624,9 @@ namespace Example
public void main()
{
var apiInstance = new FakeApi();
var requiredStringGroup = 56; // int? | Required String in group parameters
var requiredBooleanGroup = true; // bool? | Required Boolean in group parameters
var requiredInt64Group = 789; // long? | Required Integer in group parameters
var requiredStringGroup = 56; // int | Required String in group parameters
var requiredBooleanGroup = true; // bool | Required Boolean in group parameters
var requiredInt64Group = 789; // long | Required Integer in group parameters
var stringGroup = 56; // int? | String in group parameters (optional)
var booleanGroup = true; // bool? | Boolean in group parameters (optional)
var int64Group = 789; // long? | Integer in group parameters (optional)
@@ -649,9 +649,9 @@ namespace Example
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**requiredStringGroup** | **int?**| Required String in group parameters |
**requiredBooleanGroup** | **bool?**| Required Boolean in group parameters |
**requiredInt64Group** | **long?**| Required Integer in group parameters |
**requiredStringGroup** | **int**| Required String in group parameters |
**requiredBooleanGroup** | **bool**| Required Boolean in group parameters |
**requiredInt64Group** | **long**| Required Integer in group parameters |
**stringGroup** | **int?**| String in group parameters | [optional]
**booleanGroup** | **bool?**| Boolean in group parameters | [optional]
**int64Group** | **long?**| Integer in group parameters | [optional]

View File

@@ -3,18 +3,18 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Integer** | **int?** | | [optional]
**Int32** | **int?** | | [optional]
**Int64** | **long?** | | [optional]
**Number** | **decimal?** | |
**Float** | **float?** | | [optional]
**Double** | **double?** | | [optional]
**Integer** | **int** | | [optional]
**Int32** | **int** | | [optional]
**Int64** | **long** | | [optional]
**Number** | **decimal** | |
**Float** | **float** | | [optional]
**Double** | **double** | | [optional]
**String** | **string** | | [optional]
**Byte** | **byte[]** | |
**Binary** | **System.IO.Stream** | | [optional]
**Date** | **DateTime?** | |
**DateTime** | **DateTime?** | | [optional]
**Uuid** | **Guid?** | | [optional]
**Date** | **DateTime** | |
**DateTime** | **DateTime** | | [optional]
**Uuid** | [**Guid**](Guid.md) | | [optional]
**Password** | **string** | |
[[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

@@ -5,8 +5,8 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**MapMapOfString** | **Dictionary&lt;string, Dictionary&lt;string, string&gt;&gt;** | | [optional]
**MapOfEnumString** | **Dictionary&lt;string, string&gt;** | | [optional]
**DirectMap** | **Dictionary&lt;string, bool?&gt;** | | [optional]
**IndirectMap** | **Dictionary&lt;string, bool?&gt;** | | [optional]
**DirectMap** | **Dictionary&lt;string, bool&gt;** | | [optional]
**IndirectMap** | **Dictionary&lt;string, bool&gt;** | | [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

@@ -3,8 +3,8 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Uuid** | **Guid?** | | [optional]
**DateTime** | **DateTime?** | | [optional]
**Uuid** | [**Guid**](Guid.md) | | [optional]
**DateTime** | **DateTime** | | [optional]
**Map** | [**Dictionary&lt;string, Animal&gt;**](Animal.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

@@ -3,7 +3,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Name** | **int?** | | [optional]
**Name** | **int** | | [optional]
**Class** | **string** | | [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

@@ -3,10 +3,10 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**_Name** | **int?** | |
**SnakeCase** | **int?** | | [optional]
**_Name** | **int** | |
**SnakeCase** | **int** | | [optional]
**Property** | **string** | | [optional]
**_123Number** | **int?** | | [optional]
**_123Number** | **int** | | [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

@@ -3,7 +3,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**JustNumber** | **decimal?** | | [optional]
**JustNumber** | **decimal** | | [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

@@ -3,12 +3,12 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Id** | **long?** | | [optional]
**PetId** | **long?** | | [optional]
**Quantity** | **int?** | | [optional]
**ShipDate** | **DateTime?** | | [optional]
**Id** | **long** | | [optional]
**PetId** | **long** | | [optional]
**Quantity** | **int** | | [optional]
**ShipDate** | **DateTime** | | [optional]
**Status** | **string** | Order Status | [optional]
**Complete** | **bool?** | | [optional] [default to false]
**Complete** | **bool** | | [optional] [default to false]
[[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

@@ -3,9 +3,9 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**MyNumber** | **decimal?** | | [optional]
**MyNumber** | **decimal** | | [optional]
**MyString** | **string** | | [optional]
**MyBoolean** | **bool?** | | [optional]
**MyBoolean** | **bool** | | [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

@@ -3,7 +3,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Id** | **long?** | | [optional]
**Id** | **long** | | [optional]
**Category** | [**Category**](Category.md) | | [optional]
**Name** | **string** | |
**PhotoUrls** | **List&lt;string&gt;** | |

View File

@@ -78,7 +78,7 @@ void (empty response body)
<a name="deletepet"></a>
# **DeletePet**
> void DeletePet (long? petId, string apiKey = null)
> void DeletePet (long petId, string apiKey = null)
Deletes a pet
@@ -100,7 +100,7 @@ namespace Example
Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
var apiInstance = new PetApi();
var petId = 789; // long? | Pet id to delete
var petId = 789; // long | Pet id to delete
var apiKey = apiKey_example; // string | (optional)
try
@@ -121,7 +121,7 @@ namespace Example
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**petId** | **long?**| Pet id to delete |
**petId** | **long**| Pet id to delete |
**apiKey** | **string**| | [optional]
### Return type
@@ -269,7 +269,7 @@ Name | Type | Description | Notes
<a name="getpetbyid"></a>
# **GetPetById**
> Pet GetPetById (long? petId)
> Pet GetPetById (long petId)
Find pet by ID
@@ -295,7 +295,7 @@ namespace Example
// Configuration.Default.AddApiKeyPrefix("api_key", "Bearer");
var apiInstance = new PetApi();
var petId = 789; // long? | ID of pet to return
var petId = 789; // long | ID of pet to return
try
{
@@ -316,7 +316,7 @@ namespace Example
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**petId** | **long?**| ID of pet to return |
**petId** | **long**| ID of pet to return |
### Return type
@@ -396,7 +396,7 @@ void (empty response body)
<a name="updatepetwithform"></a>
# **UpdatePetWithForm**
> void UpdatePetWithForm (long? petId, string name = null, string status = null)
> void UpdatePetWithForm (long petId, string name = null, string status = null)
Updates a pet in the store with form data
@@ -418,7 +418,7 @@ namespace Example
Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
var apiInstance = new PetApi();
var petId = 789; // long? | ID of pet that needs to be updated
var petId = 789; // long | ID of pet that needs to be updated
var name = name_example; // string | Updated name of the pet (optional)
var status = status_example; // string | Updated status of the pet (optional)
@@ -440,7 +440,7 @@ namespace Example
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**petId** | **long?**| ID of pet that needs to be updated |
**petId** | **long**| ID of pet that needs to be updated |
**name** | **string**| Updated name of the pet | [optional]
**status** | **string**| Updated status of the pet | [optional]
@@ -461,7 +461,7 @@ void (empty response body)
<a name="uploadfile"></a>
# **UploadFile**
> ApiResponse UploadFile (long? petId, string additionalMetadata = null, System.IO.Stream file = null)
> ApiResponse UploadFile (long petId, string additionalMetadata = null, System.IO.Stream file = null)
uploads an image
@@ -483,7 +483,7 @@ namespace Example
Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
var apiInstance = new PetApi();
var petId = 789; // long? | ID of pet to update
var petId = 789; // long | ID of pet to update
var additionalMetadata = additionalMetadata_example; // string | Additional data to pass to server (optional)
var file = BINARY_DATA_HERE; // System.IO.Stream | file to upload (optional)
@@ -506,7 +506,7 @@ namespace Example
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**petId** | **long?**| ID of pet to update |
**petId** | **long**| ID of pet to update |
**additionalMetadata** | **string**| Additional data to pass to server | [optional]
**file** | **System.IO.Stream****System.IO.Stream**| file to upload | [optional]
@@ -527,7 +527,7 @@ Name | Type | Description | Notes
<a name="uploadfilewithrequiredfile"></a>
# **UploadFileWithRequiredFile**
> ApiResponse UploadFileWithRequiredFile (long? petId, System.IO.Stream requiredFile, string additionalMetadata = null)
> ApiResponse UploadFileWithRequiredFile (long petId, System.IO.Stream requiredFile, string additionalMetadata = null)
uploads an image (required)
@@ -549,7 +549,7 @@ namespace Example
Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
var apiInstance = new PetApi();
var petId = 789; // long? | ID of pet to update
var petId = 789; // long | ID of pet to update
var requiredFile = BINARY_DATA_HERE; // System.IO.Stream | file to upload
var additionalMetadata = additionalMetadata_example; // string | Additional data to pass to server (optional)
@@ -572,7 +572,7 @@ namespace Example
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**petId** | **long?**| ID of pet to update |
**petId** | **long**| ID of pet to update |
**requiredFile** | **System.IO.Stream****System.IO.Stream**| file to upload |
**additionalMetadata** | **string**| Additional data to pass to server | [optional]

View File

@@ -3,7 +3,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**_Return** | **int?** | | [optional]
**_Return** | **int** | | [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

@@ -3,7 +3,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**SpecialPropertyName** | **long?** | | [optional]
**SpecialPropertyName** | **long** | | [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

@@ -72,7 +72,7 @@ No authorization required
<a name="getinventory"></a>
# **GetInventory**
> Dictionary<string, int?> GetInventory ()
> Dictionary<string, int> GetInventory ()
Returns pet inventories by status
@@ -102,7 +102,7 @@ namespace Example
try
{
// Returns pet inventories by status
Dictionary&lt;string, int?&gt; result = apiInstance.GetInventory();
Dictionary&lt;string, int&gt; result = apiInstance.GetInventory();
Debug.WriteLine(result);
}
catch (Exception e)
@@ -119,7 +119,7 @@ This endpoint does not need any parameter.
### Return type
**Dictionary<string, int?>**
**Dictionary<string, int>**
### Authorization
@@ -134,7 +134,7 @@ This endpoint does not need any parameter.
<a name="getorderbyid"></a>
# **GetOrderById**
> Order GetOrderById (long? orderId)
> Order GetOrderById (long orderId)
Find purchase order by ID
@@ -155,7 +155,7 @@ namespace Example
public void main()
{
var apiInstance = new StoreApi();
var orderId = 789; // long? | ID of pet that needs to be fetched
var orderId = 789; // long | ID of pet that needs to be fetched
try
{
@@ -176,7 +176,7 @@ namespace Example
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**orderId** | **long?**| ID of pet that needs to be fetched |
**orderId** | **long**| ID of pet that needs to be fetched |
### Return type

View File

@@ -3,7 +3,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Id** | **long?** | | [optional]
**Id** | **long** | | [optional]
**Name** | **string** | | [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

@@ -3,14 +3,14 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Id** | **long?** | | [optional]
**Id** | **long** | | [optional]
**Username** | **string** | | [optional]
**FirstName** | **string** | | [optional]
**LastName** | **string** | | [optional]
**Email** | **string** | | [optional]
**Password** | **string** | | [optional]
**Phone** | **string** | | [optional]
**UserStatus** | **int?** | User Status | [optional]
**UserStatus** | **int** | User Status | [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

@@ -74,22 +74,22 @@ namespace Org.OpenAPITools.Test
{
// 1st instance
ArrayOfArrayOfNumberOnly instance1 = new ArrayOfArrayOfNumberOnly();
List<decimal?> list1 = new List<decimal?>();
List<decimal> list1 = new List<decimal>();
list1.Add(11.1m);
list1.Add(8.9m);
List<List<decimal?>> listOfList1 = new List<List<decimal?>>();
List<List<decimal>> listOfList1 = new List<List<decimal>>();
listOfList1.Add(list1);
instance1.ArrayArrayNumber = listOfList1;
// 2nd instance
ArrayOfArrayOfNumberOnly instance2 = new ArrayOfArrayOfNumberOnly();
List<decimal?> list2 = new List<decimal?>();
List<decimal> list2 = new List<decimal>();
list2.Add(11.1m);
list2.Add(8.9m);
List<List<decimal?>> listOfList2 = new List<List<decimal?>>();
List<List<decimal>> listOfList2 = new List<List<decimal>>();
listOfList2.Add(list2);
instance2.ArrayArrayNumber = listOfList2;
@@ -102,15 +102,14 @@ namespace Org.OpenAPITools.Test
// 3rd instance
ArrayOfArrayOfNumberOnly instance3 = new ArrayOfArrayOfNumberOnly();
List<decimal?> list3 = new List<decimal?>();
List<decimal> list3 = new List<decimal>();
list3.Add(11.1m);
list3.Add(1.1m); // not the same as 8.9
List<List<decimal?>> listOfList3 = new List<List<decimal?>>();
List<List<decimal>> listOfList3 = new List<List<decimal>>();
instance2.ArrayArrayNumber = listOfList3;
Assert.IsFalse(instance1.Equals(instance3));
}
}

View File

@@ -86,7 +86,7 @@ namespace Org.OpenAPITools.Api
/// </summary>
public interface IAnotherFakeApi : IAnotherFakeApiSync, IAnotherFakeApiAsync
{
}
/// <summary>
@@ -95,7 +95,7 @@ namespace Org.OpenAPITools.Api
public partial class AnotherFakeApi : IAnotherFakeApi
{
private Org.OpenAPITools.Client.ExceptionFactory _exceptionFactory = (name, response) => null;
/// <summary>
/// Initializes a new instance of the <see cref="AnotherFakeApi"/> class.
/// </summary>
@@ -150,7 +150,7 @@ namespace Org.OpenAPITools.Api
if(client == null) throw new ArgumentNullException("client");
if(asyncClient == null) throw new ArgumentNullException("asyncClient");
if(configuration == null) throw new ArgumentNullException("configuration");
this.Client = client;
this.AsynchronousClient = asyncClient;
this.Configuration = configuration;
@@ -280,6 +280,7 @@ namespace Org.OpenAPITools.Api
if (body == null)
throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'body' when calling AnotherFakeApi->Call123TestSpecialTags");
Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions();
String[] @contentTypes = new String[] {

View File

@@ -35,8 +35,8 @@ namespace Org.OpenAPITools.Api
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="body">Input boolean as post body (optional)</param>
/// <returns>bool?</returns>
bool? FakeOuterBooleanSerialize (bool? body = null);
/// <returns>bool</returns>
bool FakeOuterBooleanSerialize (bool? body = null);
/// <summary>
///
@@ -46,8 +46,8 @@ namespace Org.OpenAPITools.Api
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="body">Input boolean as post body (optional)</param>
/// <returns>ApiResponse of bool?</returns>
ApiResponse<bool?> FakeOuterBooleanSerializeWithHttpInfo (bool? body = null);
/// <returns>ApiResponse of bool</returns>
ApiResponse<bool> FakeOuterBooleanSerializeWithHttpInfo (bool? body = null);
/// <summary>
///
/// </summary>
@@ -77,8 +77,8 @@ namespace Org.OpenAPITools.Api
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="body">Input number as post body (optional)</param>
/// <returns>decimal?</returns>
decimal? FakeOuterNumberSerialize (decimal? body = null);
/// <returns>decimal</returns>
decimal FakeOuterNumberSerialize (decimal? body = null);
/// <summary>
///
@@ -88,8 +88,8 @@ namespace Org.OpenAPITools.Api
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="body">Input number as post body (optional)</param>
/// <returns>ApiResponse of decimal?</returns>
ApiResponse<decimal?> FakeOuterNumberSerializeWithHttpInfo (decimal? body = null);
/// <returns>ApiResponse of decimal</returns>
ApiResponse<decimal> FakeOuterNumberSerializeWithHttpInfo (decimal? body = null);
/// <summary>
///
/// </summary>
@@ -198,7 +198,7 @@ namespace Org.OpenAPITools.Api
/// <param name="password">None (optional)</param>
/// <param name="callback">None (optional)</param>
/// <returns></returns>
void TestEndpointParameters (decimal? number, double? _double, string patternWithoutDelimiter, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, string _string = null, System.IO.Stream binary = null, DateTime? date = null, DateTime? dateTime = null, string password = null, string callback = null);
void TestEndpointParameters (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, string _string = null, System.IO.Stream binary = null, DateTime? date = null, DateTime? dateTime = null, string password = null, string callback = null);
/// <summary>
/// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
@@ -222,7 +222,7 @@ namespace Org.OpenAPITools.Api
/// <param name="password">None (optional)</param>
/// <param name="callback">None (optional)</param>
/// <returns>ApiResponse of Object(void)</returns>
ApiResponse<Object> TestEndpointParametersWithHttpInfo (decimal? number, double? _double, string patternWithoutDelimiter, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, string _string = null, System.IO.Stream binary = null, DateTime? date = null, DateTime? dateTime = null, string password = null, string callback = null);
ApiResponse<Object> TestEndpointParametersWithHttpInfo (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, string _string = null, System.IO.Stream binary = null, DateTime? date = null, DateTime? dateTime = null, string password = null, string callback = null);
/// <summary>
/// To test enum parameters
/// </summary>
@@ -272,7 +272,7 @@ namespace Org.OpenAPITools.Api
/// <param name="booleanGroup">Boolean in group parameters (optional)</param>
/// <param name="int64Group">Integer in group parameters (optional)</param>
/// <returns></returns>
void TestGroupParameters (int? requiredStringGroup, bool? requiredBooleanGroup, long? requiredInt64Group, int? stringGroup = null, bool? booleanGroup = null, long? int64Group = null);
void TestGroupParameters (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = null, bool? booleanGroup = null, long? int64Group = null);
/// <summary>
/// Fake endpoint to test group parameters (optional)
@@ -288,7 +288,7 @@ namespace Org.OpenAPITools.Api
/// <param name="booleanGroup">Boolean in group parameters (optional)</param>
/// <param name="int64Group">Integer in group parameters (optional)</param>
/// <returns>ApiResponse of Object(void)</returns>
ApiResponse<Object> TestGroupParametersWithHttpInfo (int? requiredStringGroup, bool? requiredBooleanGroup, long? requiredInt64Group, int? stringGroup = null, bool? booleanGroup = null, long? int64Group = null);
ApiResponse<Object> TestGroupParametersWithHttpInfo (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = null, bool? booleanGroup = null, long? int64Group = null);
/// <summary>
/// test inline additionalProperties
/// </summary>
@@ -350,8 +350,8 @@ namespace Org.OpenAPITools.Api
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="body">Input boolean as post body (optional)</param>
/// <returns>Task of bool?</returns>
System.Threading.Tasks.Task<bool?> FakeOuterBooleanSerializeAsync (bool? body = null);
/// <returns>Task of bool</returns>
System.Threading.Tasks.Task<bool> FakeOuterBooleanSerializeAsync (bool? body = null);
/// <summary>
///
@@ -361,8 +361,8 @@ namespace Org.OpenAPITools.Api
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="body">Input boolean as post body (optional)</param>
/// <returns>Task of ApiResponse (bool?)</returns>
System.Threading.Tasks.Task<ApiResponse<bool?>> FakeOuterBooleanSerializeAsyncWithHttpInfo (bool? body = null);
/// <returns>Task of ApiResponse (bool)</returns>
System.Threading.Tasks.Task<ApiResponse<bool>> FakeOuterBooleanSerializeAsyncWithHttpInfo (bool? body = null);
/// <summary>
///
/// </summary>
@@ -392,8 +392,8 @@ namespace Org.OpenAPITools.Api
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="body">Input number as post body (optional)</param>
/// <returns>Task of decimal?</returns>
System.Threading.Tasks.Task<decimal?> FakeOuterNumberSerializeAsync (decimal? body = null);
/// <returns>Task of decimal</returns>
System.Threading.Tasks.Task<decimal> FakeOuterNumberSerializeAsync (decimal? body = null);
/// <summary>
///
@@ -403,8 +403,8 @@ namespace Org.OpenAPITools.Api
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="body">Input number as post body (optional)</param>
/// <returns>Task of ApiResponse (decimal?)</returns>
System.Threading.Tasks.Task<ApiResponse<decimal?>> FakeOuterNumberSerializeAsyncWithHttpInfo (decimal? body = null);
/// <returns>Task of ApiResponse (decimal)</returns>
System.Threading.Tasks.Task<ApiResponse<decimal>> FakeOuterNumberSerializeAsyncWithHttpInfo (decimal? body = null);
/// <summary>
///
/// </summary>
@@ -513,7 +513,7 @@ namespace Org.OpenAPITools.Api
/// <param name="password">None (optional)</param>
/// <param name="callback">None (optional)</param>
/// <returns>Task of void</returns>
System.Threading.Tasks.Task TestEndpointParametersAsync (decimal? number, double? _double, string patternWithoutDelimiter, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, string _string = null, System.IO.Stream binary = null, DateTime? date = null, DateTime? dateTime = null, string password = null, string callback = null);
System.Threading.Tasks.Task TestEndpointParametersAsync (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, string _string = null, System.IO.Stream binary = null, DateTime? date = null, DateTime? dateTime = null, string password = null, string callback = null);
/// <summary>
/// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
@@ -537,7 +537,7 @@ namespace Org.OpenAPITools.Api
/// <param name="password">None (optional)</param>
/// <param name="callback">None (optional)</param>
/// <returns>Task of ApiResponse</returns>
System.Threading.Tasks.Task<ApiResponse<Object>> TestEndpointParametersAsyncWithHttpInfo (decimal? number, double? _double, string patternWithoutDelimiter, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, string _string = null, System.IO.Stream binary = null, DateTime? date = null, DateTime? dateTime = null, string password = null, string callback = null);
System.Threading.Tasks.Task<ApiResponse<Object>> TestEndpointParametersAsyncWithHttpInfo (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, string _string = null, System.IO.Stream binary = null, DateTime? date = null, DateTime? dateTime = null, string password = null, string callback = null);
/// <summary>
/// To test enum parameters
/// </summary>
@@ -587,7 +587,7 @@ namespace Org.OpenAPITools.Api
/// <param name="booleanGroup">Boolean in group parameters (optional)</param>
/// <param name="int64Group">Integer in group parameters (optional)</param>
/// <returns>Task of void</returns>
System.Threading.Tasks.Task TestGroupParametersAsync (int? requiredStringGroup, bool? requiredBooleanGroup, long? requiredInt64Group, int? stringGroup = null, bool? booleanGroup = null, long? int64Group = null);
System.Threading.Tasks.Task TestGroupParametersAsync (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = null, bool? booleanGroup = null, long? int64Group = null);
/// <summary>
/// Fake endpoint to test group parameters (optional)
@@ -603,7 +603,7 @@ namespace Org.OpenAPITools.Api
/// <param name="booleanGroup">Boolean in group parameters (optional)</param>
/// <param name="int64Group">Integer in group parameters (optional)</param>
/// <returns>Task of ApiResponse</returns>
System.Threading.Tasks.Task<ApiResponse<Object>> TestGroupParametersAsyncWithHttpInfo (int? requiredStringGroup, bool? requiredBooleanGroup, long? requiredInt64Group, int? stringGroup = null, bool? booleanGroup = null, long? int64Group = null);
System.Threading.Tasks.Task<ApiResponse<Object>> TestGroupParametersAsyncWithHttpInfo (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = null, bool? booleanGroup = null, long? int64Group = null);
/// <summary>
/// test inline additionalProperties
/// </summary>
@@ -656,7 +656,7 @@ namespace Org.OpenAPITools.Api
/// </summary>
public interface IFakeApi : IFakeApiSync, IFakeApiAsync
{
}
/// <summary>
@@ -665,7 +665,7 @@ namespace Org.OpenAPITools.Api
public partial class FakeApi : IFakeApi
{
private Org.OpenAPITools.Client.ExceptionFactory _exceptionFactory = (name, response) => null;
/// <summary>
/// Initializes a new instance of the <see cref="FakeApi"/> class.
/// </summary>
@@ -720,7 +720,7 @@ namespace Org.OpenAPITools.Api
if(client == null) throw new ArgumentNullException("client");
if(asyncClient == null) throw new ArgumentNullException("asyncClient");
if(configuration == null) throw new ArgumentNullException("configuration");
this.Client = client;
this.AsynchronousClient = asyncClient;
this.Configuration = configuration;
@@ -773,10 +773,10 @@ namespace Org.OpenAPITools.Api
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="body">Input boolean as post body (optional)</param>
/// <returns>bool?</returns>
public bool? FakeOuterBooleanSerialize (bool? body = null)
/// <returns>bool</returns>
public bool FakeOuterBooleanSerialize (bool? body = null)
{
Org.OpenAPITools.Client.ApiResponse<bool?> localVarResponse = FakeOuterBooleanSerializeWithHttpInfo(body);
Org.OpenAPITools.Client.ApiResponse<bool> localVarResponse = FakeOuterBooleanSerializeWithHttpInfo(body);
return localVarResponse.Data;
}
@@ -785,10 +785,9 @@ namespace Org.OpenAPITools.Api
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="body">Input boolean as post body (optional)</param>
/// <returns>ApiResponse of bool?</returns>
public Org.OpenAPITools.Client.ApiResponse< bool? > FakeOuterBooleanSerializeWithHttpInfo (bool? body = null)
/// <returns>ApiResponse of bool</returns>
public Org.OpenAPITools.Client.ApiResponse< bool > FakeOuterBooleanSerializeWithHttpInfo (bool? body = null)
{
Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions();
String[] @contentTypes = new String[] {
@@ -810,7 +809,7 @@ namespace Org.OpenAPITools.Api
// make the HTTP request
var response = this.Client.Post< bool? >("/fake/outer/boolean", requestOptions, this.Configuration);
var response = this.Client.Post< bool >("/fake/outer/boolean", requestOptions, this.Configuration);
if (this.ExceptionFactory != null)
{
@@ -826,10 +825,10 @@ namespace Org.OpenAPITools.Api
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="body">Input boolean as post body (optional)</param>
/// <returns>Task of bool?</returns>
public async System.Threading.Tasks.Task<bool?> FakeOuterBooleanSerializeAsync (bool? body = null)
/// <returns>Task of bool</returns>
public async System.Threading.Tasks.Task<bool> FakeOuterBooleanSerializeAsync (bool? body = null)
{
Org.OpenAPITools.Client.ApiResponse<bool?> localVarResponse = await FakeOuterBooleanSerializeAsyncWithHttpInfo(body);
Org.OpenAPITools.Client.ApiResponse<bool> localVarResponse = await FakeOuterBooleanSerializeAsyncWithHttpInfo(body);
return localVarResponse.Data;
}
@@ -839,8 +838,8 @@ namespace Org.OpenAPITools.Api
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="body">Input boolean as post body (optional)</param>
/// <returns>Task of ApiResponse (bool?)</returns>
public async System.Threading.Tasks.Task<Org.OpenAPITools.Client.ApiResponse<bool?>> FakeOuterBooleanSerializeAsyncWithHttpInfo (bool? body = null)
/// <returns>Task of ApiResponse (bool)</returns>
public async System.Threading.Tasks.Task<Org.OpenAPITools.Client.ApiResponse<bool>> FakeOuterBooleanSerializeAsyncWithHttpInfo (bool? body = null)
{
Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions();
@@ -864,7 +863,7 @@ namespace Org.OpenAPITools.Api
// make the HTTP request
var response = await this.AsynchronousClient.PostAsync<bool?>("/fake/outer/boolean", requestOptions, this.Configuration);
var response = await this.AsynchronousClient.PostAsync<bool>("/fake/outer/boolean", requestOptions, this.Configuration);
if (this.ExceptionFactory != null)
{
@@ -895,7 +894,6 @@ namespace Org.OpenAPITools.Api
/// <returns>ApiResponse of OuterComposite</returns>
public Org.OpenAPITools.Client.ApiResponse< OuterComposite > FakeOuterCompositeSerializeWithHttpInfo (OuterComposite body = null)
{
Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions();
String[] @contentTypes = new String[] {
@@ -987,10 +985,10 @@ namespace Org.OpenAPITools.Api
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="body">Input number as post body (optional)</param>
/// <returns>decimal?</returns>
public decimal? FakeOuterNumberSerialize (decimal? body = null)
/// <returns>decimal</returns>
public decimal FakeOuterNumberSerialize (decimal? body = null)
{
Org.OpenAPITools.Client.ApiResponse<decimal?> localVarResponse = FakeOuterNumberSerializeWithHttpInfo(body);
Org.OpenAPITools.Client.ApiResponse<decimal> localVarResponse = FakeOuterNumberSerializeWithHttpInfo(body);
return localVarResponse.Data;
}
@@ -999,10 +997,9 @@ namespace Org.OpenAPITools.Api
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="body">Input number as post body (optional)</param>
/// <returns>ApiResponse of decimal?</returns>
public Org.OpenAPITools.Client.ApiResponse< decimal? > FakeOuterNumberSerializeWithHttpInfo (decimal? body = null)
/// <returns>ApiResponse of decimal</returns>
public Org.OpenAPITools.Client.ApiResponse< decimal > FakeOuterNumberSerializeWithHttpInfo (decimal? body = null)
{
Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions();
String[] @contentTypes = new String[] {
@@ -1024,7 +1021,7 @@ namespace Org.OpenAPITools.Api
// make the HTTP request
var response = this.Client.Post< decimal? >("/fake/outer/number", requestOptions, this.Configuration);
var response = this.Client.Post< decimal >("/fake/outer/number", requestOptions, this.Configuration);
if (this.ExceptionFactory != null)
{
@@ -1040,10 +1037,10 @@ namespace Org.OpenAPITools.Api
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="body">Input number as post body (optional)</param>
/// <returns>Task of decimal?</returns>
public async System.Threading.Tasks.Task<decimal?> FakeOuterNumberSerializeAsync (decimal? body = null)
/// <returns>Task of decimal</returns>
public async System.Threading.Tasks.Task<decimal> FakeOuterNumberSerializeAsync (decimal? body = null)
{
Org.OpenAPITools.Client.ApiResponse<decimal?> localVarResponse = await FakeOuterNumberSerializeAsyncWithHttpInfo(body);
Org.OpenAPITools.Client.ApiResponse<decimal> localVarResponse = await FakeOuterNumberSerializeAsyncWithHttpInfo(body);
return localVarResponse.Data;
}
@@ -1053,8 +1050,8 @@ namespace Org.OpenAPITools.Api
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="body">Input number as post body (optional)</param>
/// <returns>Task of ApiResponse (decimal?)</returns>
public async System.Threading.Tasks.Task<Org.OpenAPITools.Client.ApiResponse<decimal?>> FakeOuterNumberSerializeAsyncWithHttpInfo (decimal? body = null)
/// <returns>Task of ApiResponse (decimal)</returns>
public async System.Threading.Tasks.Task<Org.OpenAPITools.Client.ApiResponse<decimal>> FakeOuterNumberSerializeAsyncWithHttpInfo (decimal? body = null)
{
Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions();
@@ -1078,7 +1075,7 @@ namespace Org.OpenAPITools.Api
// make the HTTP request
var response = await this.AsynchronousClient.PostAsync<decimal?>("/fake/outer/number", requestOptions, this.Configuration);
var response = await this.AsynchronousClient.PostAsync<decimal>("/fake/outer/number", requestOptions, this.Configuration);
if (this.ExceptionFactory != null)
{
@@ -1109,7 +1106,6 @@ namespace Org.OpenAPITools.Api
/// <returns>ApiResponse of string</returns>
public Org.OpenAPITools.Client.ApiResponse< string > FakeOuterStringSerializeWithHttpInfo (string body = null)
{
Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions();
String[] @contentTypes = new String[] {
@@ -1275,6 +1271,7 @@ namespace Org.OpenAPITools.Api
if (body == null)
throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'body' when calling FakeApi->TestBodyWithFileSchema");
Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions();
String[] @contentTypes = new String[] {
@@ -1331,6 +1328,7 @@ namespace Org.OpenAPITools.Api
// verify the required parameter 'query' is set
if (query == null)
throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'query' when calling FakeApi->TestBodyWithQueryParams");
// verify the required parameter 'body' is set
if (body == null)
throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'body' when calling FakeApi->TestBodyWithQueryParams");
@@ -1402,10 +1400,12 @@ namespace Org.OpenAPITools.Api
// verify the required parameter 'query' is set
if (query == null)
throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'query' when calling FakeApi->TestBodyWithQueryParams");
// verify the required parameter 'body' is set
if (body == null)
throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'body' when calling FakeApi->TestBodyWithQueryParams");
Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions();
String[] @contentTypes = new String[] {
@@ -1530,6 +1530,7 @@ namespace Org.OpenAPITools.Api
if (body == null)
throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'body' when calling FakeApi->TestClientModel");
Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions();
String[] @contentTypes = new String[] {
@@ -1582,7 +1583,7 @@ namespace Org.OpenAPITools.Api
/// <param name="password">None (optional)</param>
/// <param name="callback">None (optional)</param>
/// <returns></returns>
public void TestEndpointParameters (decimal? number, double? _double, string patternWithoutDelimiter, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, string _string = null, System.IO.Stream binary = null, DateTime? date = null, DateTime? dateTime = null, string password = null, string callback = null)
public void TestEndpointParameters (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, string _string = null, System.IO.Stream binary = null, DateTime? date = null, DateTime? dateTime = null, string password = null, string callback = null)
{
TestEndpointParametersWithHttpInfo(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, _string, binary, date, dateTime, password, callback);
}
@@ -1606,17 +1607,20 @@ namespace Org.OpenAPITools.Api
/// <param name="password">None (optional)</param>
/// <param name="callback">None (optional)</param>
/// <returns>ApiResponse of Object(void)</returns>
public Org.OpenAPITools.Client.ApiResponse<Object> TestEndpointParametersWithHttpInfo (decimal? number, double? _double, string patternWithoutDelimiter, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, string _string = null, System.IO.Stream binary = null, DateTime? date = null, DateTime? dateTime = null, string password = null, string callback = null)
public Org.OpenAPITools.Client.ApiResponse<Object> TestEndpointParametersWithHttpInfo (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, string _string = null, System.IO.Stream binary = null, DateTime? date = null, DateTime? dateTime = null, string password = null, string callback = null)
{
// verify the required parameter 'number' is set
if (number == null)
throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'number' when calling FakeApi->TestEndpointParameters");
// verify the required parameter '_double' is set
if (_double == null)
throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter '_double' when calling FakeApi->TestEndpointParameters");
// verify the required parameter 'patternWithoutDelimiter' is set
if (patternWithoutDelimiter == null)
throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'patternWithoutDelimiter' when calling FakeApi->TestEndpointParameters");
// verify the required parameter '_byte' is set
if (_byte == null)
throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter '_byte' when calling FakeApi->TestEndpointParameters");
@@ -1733,7 +1737,7 @@ namespace Org.OpenAPITools.Api
/// <param name="password">None (optional)</param>
/// <param name="callback">None (optional)</param>
/// <returns>Task of void</returns>
public async System.Threading.Tasks.Task TestEndpointParametersAsync (decimal? number, double? _double, string patternWithoutDelimiter, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, string _string = null, System.IO.Stream binary = null, DateTime? date = null, DateTime? dateTime = null, string password = null, string callback = null)
public async System.Threading.Tasks.Task TestEndpointParametersAsync (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, string _string = null, System.IO.Stream binary = null, DateTime? date = null, DateTime? dateTime = null, string password = null, string callback = null)
{
await TestEndpointParametersAsyncWithHttpInfo(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, _string, binary, date, dateTime, password, callback);
@@ -1758,21 +1762,25 @@ namespace Org.OpenAPITools.Api
/// <param name="password">None (optional)</param>
/// <param name="callback">None (optional)</param>
/// <returns>Task of ApiResponse</returns>
public async System.Threading.Tasks.Task<Org.OpenAPITools.Client.ApiResponse<Object>> TestEndpointParametersAsyncWithHttpInfo (decimal? number, double? _double, string patternWithoutDelimiter, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, string _string = null, System.IO.Stream binary = null, DateTime? date = null, DateTime? dateTime = null, string password = null, string callback = null)
public async System.Threading.Tasks.Task<Org.OpenAPITools.Client.ApiResponse<Object>> TestEndpointParametersAsyncWithHttpInfo (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, string _string = null, System.IO.Stream binary = null, DateTime? date = null, DateTime? dateTime = null, string password = null, string callback = null)
{
// verify the required parameter 'number' is set
if (number == null)
throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'number' when calling FakeApi->TestEndpointParameters");
// verify the required parameter '_double' is set
if (_double == null)
throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter '_double' when calling FakeApi->TestEndpointParameters");
// verify the required parameter 'patternWithoutDelimiter' is set
if (patternWithoutDelimiter == null)
throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'patternWithoutDelimiter' when calling FakeApi->TestEndpointParameters");
// verify the required parameter '_byte' is set
if (_byte == null)
throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter '_byte' when calling FakeApi->TestEndpointParameters");
Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions();
String[] @contentTypes = new String[] {
@@ -1899,7 +1907,6 @@ namespace Org.OpenAPITools.Api
/// <returns>ApiResponse of Object(void)</returns>
public Org.OpenAPITools.Client.ApiResponse<Object> TestEnumParametersWithHttpInfo (List<string> enumHeaderStringArray = null, string enumHeaderString = null, List<string> enumQueryStringArray = null, string enumQueryString = null, int? enumQueryInteger = null, double? enumQueryDouble = null, List<string> enumFormStringArray = null, string enumFormString = null)
{
Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions();
String[] @contentTypes = new String[] {
@@ -2112,7 +2119,7 @@ namespace Org.OpenAPITools.Api
/// <param name="booleanGroup">Boolean in group parameters (optional)</param>
/// <param name="int64Group">Integer in group parameters (optional)</param>
/// <returns></returns>
public void TestGroupParameters (int? requiredStringGroup, bool? requiredBooleanGroup, long? requiredInt64Group, int? stringGroup = null, bool? booleanGroup = null, long? int64Group = null)
public void TestGroupParameters (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = null, bool? booleanGroup = null, long? int64Group = null)
{
TestGroupParametersWithHttpInfo(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group);
}
@@ -2128,14 +2135,16 @@ namespace Org.OpenAPITools.Api
/// <param name="booleanGroup">Boolean in group parameters (optional)</param>
/// <param name="int64Group">Integer in group parameters (optional)</param>
/// <returns>ApiResponse of Object(void)</returns>
public Org.OpenAPITools.Client.ApiResponse<Object> TestGroupParametersWithHttpInfo (int? requiredStringGroup, bool? requiredBooleanGroup, long? requiredInt64Group, int? stringGroup = null, bool? booleanGroup = null, long? int64Group = null)
public Org.OpenAPITools.Client.ApiResponse<Object> TestGroupParametersWithHttpInfo (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = null, bool? booleanGroup = null, long? int64Group = null)
{
// verify the required parameter 'requiredStringGroup' is set
if (requiredStringGroup == null)
throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requiredStringGroup' when calling FakeApi->TestGroupParameters");
// verify the required parameter 'requiredBooleanGroup' is set
if (requiredBooleanGroup == null)
throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requiredBooleanGroup' when calling FakeApi->TestGroupParameters");
// verify the required parameter 'requiredInt64Group' is set
if (requiredInt64Group == null)
throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requiredInt64Group' when calling FakeApi->TestGroupParameters");
@@ -2225,7 +2234,7 @@ namespace Org.OpenAPITools.Api
/// <param name="booleanGroup">Boolean in group parameters (optional)</param>
/// <param name="int64Group">Integer in group parameters (optional)</param>
/// <returns>Task of void</returns>
public async System.Threading.Tasks.Task TestGroupParametersAsync (int? requiredStringGroup, bool? requiredBooleanGroup, long? requiredInt64Group, int? stringGroup = null, bool? booleanGroup = null, long? int64Group = null)
public async System.Threading.Tasks.Task TestGroupParametersAsync (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = null, bool? booleanGroup = null, long? int64Group = null)
{
await TestGroupParametersAsyncWithHttpInfo(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group);
@@ -2242,18 +2251,21 @@ namespace Org.OpenAPITools.Api
/// <param name="booleanGroup">Boolean in group parameters (optional)</param>
/// <param name="int64Group">Integer in group parameters (optional)</param>
/// <returns>Task of ApiResponse</returns>
public async System.Threading.Tasks.Task<Org.OpenAPITools.Client.ApiResponse<Object>> TestGroupParametersAsyncWithHttpInfo (int? requiredStringGroup, bool? requiredBooleanGroup, long? requiredInt64Group, int? stringGroup = null, bool? booleanGroup = null, long? int64Group = null)
public async System.Threading.Tasks.Task<Org.OpenAPITools.Client.ApiResponse<Object>> TestGroupParametersAsyncWithHttpInfo (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = null, bool? booleanGroup = null, long? int64Group = null)
{
// verify the required parameter 'requiredStringGroup' is set
if (requiredStringGroup == null)
throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requiredStringGroup' when calling FakeApi->TestGroupParameters");
// verify the required parameter 'requiredBooleanGroup' is set
if (requiredBooleanGroup == null)
throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requiredBooleanGroup' when calling FakeApi->TestGroupParameters");
// verify the required parameter 'requiredInt64Group' is set
if (requiredInt64Group == null)
throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requiredInt64Group' when calling FakeApi->TestGroupParameters");
Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions();
String[] @contentTypes = new String[] {
@@ -2407,6 +2419,7 @@ namespace Org.OpenAPITools.Api
if (param == null)
throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'param' when calling FakeApi->TestInlineAdditionalProperties");
Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions();
String[] @contentTypes = new String[] {
@@ -2463,6 +2476,7 @@ namespace Org.OpenAPITools.Api
// verify the required parameter 'param' is set
if (param == null)
throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'param' when calling FakeApi->TestJsonFormData");
// verify the required parameter 'param2' is set
if (param2 == null)
throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'param2' when calling FakeApi->TestJsonFormData");
@@ -2531,10 +2545,12 @@ namespace Org.OpenAPITools.Api
// verify the required parameter 'param' is set
if (param == null)
throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'param' when calling FakeApi->TestJsonFormData");
// verify the required parameter 'param2' is set
if (param2 == null)
throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'param2' when calling FakeApi->TestJsonFormData");
Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions();
String[] @contentTypes = new String[] {

View File

@@ -86,7 +86,7 @@ namespace Org.OpenAPITools.Api
/// </summary>
public interface IFakeClassnameTags123Api : IFakeClassnameTags123ApiSync, IFakeClassnameTags123ApiAsync
{
}
/// <summary>
@@ -95,7 +95,7 @@ namespace Org.OpenAPITools.Api
public partial class FakeClassnameTags123Api : IFakeClassnameTags123Api
{
private Org.OpenAPITools.Client.ExceptionFactory _exceptionFactory = (name, response) => null;
/// <summary>
/// Initializes a new instance of the <see cref="FakeClassnameTags123Api"/> class.
/// </summary>
@@ -150,7 +150,7 @@ namespace Org.OpenAPITools.Api
if(client == null) throw new ArgumentNullException("client");
if(asyncClient == null) throw new ArgumentNullException("asyncClient");
if(configuration == null) throw new ArgumentNullException("configuration");
this.Client = client;
this.AsynchronousClient = asyncClient;
this.Configuration = configuration;
@@ -291,6 +291,7 @@ namespace Org.OpenAPITools.Api
if (body == null)
throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'body' when calling FakeClassnameTags123Api->TestClassname");
Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions();
String[] @contentTypes = new String[] {

View File

@@ -58,7 +58,7 @@ namespace Org.OpenAPITools.Api
/// <param name="petId">Pet id to delete</param>
/// <param name="apiKey"> (optional)</param>
/// <returns></returns>
void DeletePet (long? petId, string apiKey = null);
void DeletePet (long petId, string apiKey = null);
/// <summary>
/// Deletes a pet
@@ -70,7 +70,7 @@ namespace Org.OpenAPITools.Api
/// <param name="petId">Pet id to delete</param>
/// <param name="apiKey"> (optional)</param>
/// <returns>ApiResponse of Object(void)</returns>
ApiResponse<Object> DeletePetWithHttpInfo (long? petId, string apiKey = null);
ApiResponse<Object> DeletePetWithHttpInfo (long petId, string apiKey = null);
/// <summary>
/// Finds Pets by status
/// </summary>
@@ -122,7 +122,7 @@ namespace Org.OpenAPITools.Api
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="petId">ID of pet to return</param>
/// <returns>Pet</returns>
Pet GetPetById (long? petId);
Pet GetPetById (long petId);
/// <summary>
/// Find pet by ID
@@ -133,7 +133,7 @@ namespace Org.OpenAPITools.Api
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="petId">ID of pet to return</param>
/// <returns>ApiResponse of Pet</returns>
ApiResponse<Pet> GetPetByIdWithHttpInfo (long? petId);
ApiResponse<Pet> GetPetByIdWithHttpInfo (long petId);
/// <summary>
/// Update an existing pet
/// </summary>
@@ -166,7 +166,7 @@ namespace Org.OpenAPITools.Api
/// <param name="name">Updated name of the pet (optional)</param>
/// <param name="status">Updated status of the pet (optional)</param>
/// <returns></returns>
void UpdatePetWithForm (long? petId, string name = null, string status = null);
void UpdatePetWithForm (long petId, string name = null, string status = null);
/// <summary>
/// Updates a pet in the store with form data
@@ -179,7 +179,7 @@ namespace Org.OpenAPITools.Api
/// <param name="name">Updated name of the pet (optional)</param>
/// <param name="status">Updated status of the pet (optional)</param>
/// <returns>ApiResponse of Object(void)</returns>
ApiResponse<Object> UpdatePetWithFormWithHttpInfo (long? petId, string name = null, string status = null);
ApiResponse<Object> UpdatePetWithFormWithHttpInfo (long petId, string name = null, string status = null);
/// <summary>
/// uploads an image
/// </summary>
@@ -191,7 +191,7 @@ namespace Org.OpenAPITools.Api
/// <param name="additionalMetadata">Additional data to pass to server (optional)</param>
/// <param name="file">file to upload (optional)</param>
/// <returns>ApiResponse</returns>
ApiResponse UploadFile (long? petId, string additionalMetadata = null, System.IO.Stream file = null);
ApiResponse UploadFile (long petId, string additionalMetadata = null, System.IO.Stream file = null);
/// <summary>
/// uploads an image
@@ -204,7 +204,7 @@ namespace Org.OpenAPITools.Api
/// <param name="additionalMetadata">Additional data to pass to server (optional)</param>
/// <param name="file">file to upload (optional)</param>
/// <returns>ApiResponse of ApiResponse</returns>
ApiResponse<ApiResponse> UploadFileWithHttpInfo (long? petId, string additionalMetadata = null, System.IO.Stream file = null);
ApiResponse<ApiResponse> UploadFileWithHttpInfo (long petId, string additionalMetadata = null, System.IO.Stream file = null);
/// <summary>
/// uploads an image (required)
/// </summary>
@@ -216,7 +216,7 @@ namespace Org.OpenAPITools.Api
/// <param name="requiredFile">file to upload</param>
/// <param name="additionalMetadata">Additional data to pass to server (optional)</param>
/// <returns>ApiResponse</returns>
ApiResponse UploadFileWithRequiredFile (long? petId, System.IO.Stream requiredFile, string additionalMetadata = null);
ApiResponse UploadFileWithRequiredFile (long petId, System.IO.Stream requiredFile, string additionalMetadata = null);
/// <summary>
/// uploads an image (required)
@@ -229,7 +229,7 @@ namespace Org.OpenAPITools.Api
/// <param name="requiredFile">file to upload</param>
/// <param name="additionalMetadata">Additional data to pass to server (optional)</param>
/// <returns>ApiResponse of ApiResponse</returns>
ApiResponse<ApiResponse> UploadFileWithRequiredFileWithHttpInfo (long? petId, System.IO.Stream requiredFile, string additionalMetadata = null);
ApiResponse<ApiResponse> UploadFileWithRequiredFileWithHttpInfo (long petId, System.IO.Stream requiredFile, string additionalMetadata = null);
#endregion Synchronous Operations
}
@@ -270,7 +270,7 @@ namespace Org.OpenAPITools.Api
/// <param name="petId">Pet id to delete</param>
/// <param name="apiKey"> (optional)</param>
/// <returns>Task of void</returns>
System.Threading.Tasks.Task DeletePetAsync (long? petId, string apiKey = null);
System.Threading.Tasks.Task DeletePetAsync (long petId, string apiKey = null);
/// <summary>
/// Deletes a pet
@@ -282,7 +282,7 @@ namespace Org.OpenAPITools.Api
/// <param name="petId">Pet id to delete</param>
/// <param name="apiKey"> (optional)</param>
/// <returns>Task of ApiResponse</returns>
System.Threading.Tasks.Task<ApiResponse<Object>> DeletePetAsyncWithHttpInfo (long? petId, string apiKey = null);
System.Threading.Tasks.Task<ApiResponse<Object>> DeletePetAsyncWithHttpInfo (long petId, string apiKey = null);
/// <summary>
/// Finds Pets by status
/// </summary>
@@ -334,7 +334,7 @@ namespace Org.OpenAPITools.Api
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="petId">ID of pet to return</param>
/// <returns>Task of Pet</returns>
System.Threading.Tasks.Task<Pet> GetPetByIdAsync (long? petId);
System.Threading.Tasks.Task<Pet> GetPetByIdAsync (long petId);
/// <summary>
/// Find pet by ID
@@ -345,7 +345,7 @@ namespace Org.OpenAPITools.Api
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="petId">ID of pet to return</param>
/// <returns>Task of ApiResponse (Pet)</returns>
System.Threading.Tasks.Task<ApiResponse<Pet>> GetPetByIdAsyncWithHttpInfo (long? petId);
System.Threading.Tasks.Task<ApiResponse<Pet>> GetPetByIdAsyncWithHttpInfo (long petId);
/// <summary>
/// Update an existing pet
/// </summary>
@@ -378,7 +378,7 @@ namespace Org.OpenAPITools.Api
/// <param name="name">Updated name of the pet (optional)</param>
/// <param name="status">Updated status of the pet (optional)</param>
/// <returns>Task of void</returns>
System.Threading.Tasks.Task UpdatePetWithFormAsync (long? petId, string name = null, string status = null);
System.Threading.Tasks.Task UpdatePetWithFormAsync (long petId, string name = null, string status = null);
/// <summary>
/// Updates a pet in the store with form data
@@ -391,7 +391,7 @@ namespace Org.OpenAPITools.Api
/// <param name="name">Updated name of the pet (optional)</param>
/// <param name="status">Updated status of the pet (optional)</param>
/// <returns>Task of ApiResponse</returns>
System.Threading.Tasks.Task<ApiResponse<Object>> UpdatePetWithFormAsyncWithHttpInfo (long? petId, string name = null, string status = null);
System.Threading.Tasks.Task<ApiResponse<Object>> UpdatePetWithFormAsyncWithHttpInfo (long petId, string name = null, string status = null);
/// <summary>
/// uploads an image
/// </summary>
@@ -403,7 +403,7 @@ namespace Org.OpenAPITools.Api
/// <param name="additionalMetadata">Additional data to pass to server (optional)</param>
/// <param name="file">file to upload (optional)</param>
/// <returns>Task of ApiResponse</returns>
System.Threading.Tasks.Task<ApiResponse> UploadFileAsync (long? petId, string additionalMetadata = null, System.IO.Stream file = null);
System.Threading.Tasks.Task<ApiResponse> UploadFileAsync (long petId, string additionalMetadata = null, System.IO.Stream file = null);
/// <summary>
/// uploads an image
@@ -416,7 +416,7 @@ namespace Org.OpenAPITools.Api
/// <param name="additionalMetadata">Additional data to pass to server (optional)</param>
/// <param name="file">file to upload (optional)</param>
/// <returns>Task of ApiResponse (ApiResponse)</returns>
System.Threading.Tasks.Task<ApiResponse<ApiResponse>> UploadFileAsyncWithHttpInfo (long? petId, string additionalMetadata = null, System.IO.Stream file = null);
System.Threading.Tasks.Task<ApiResponse<ApiResponse>> UploadFileAsyncWithHttpInfo (long petId, string additionalMetadata = null, System.IO.Stream file = null);
/// <summary>
/// uploads an image (required)
/// </summary>
@@ -428,7 +428,7 @@ namespace Org.OpenAPITools.Api
/// <param name="requiredFile">file to upload</param>
/// <param name="additionalMetadata">Additional data to pass to server (optional)</param>
/// <returns>Task of ApiResponse</returns>
System.Threading.Tasks.Task<ApiResponse> UploadFileWithRequiredFileAsync (long? petId, System.IO.Stream requiredFile, string additionalMetadata = null);
System.Threading.Tasks.Task<ApiResponse> UploadFileWithRequiredFileAsync (long petId, System.IO.Stream requiredFile, string additionalMetadata = null);
/// <summary>
/// uploads an image (required)
@@ -441,7 +441,7 @@ namespace Org.OpenAPITools.Api
/// <param name="requiredFile">file to upload</param>
/// <param name="additionalMetadata">Additional data to pass to server (optional)</param>
/// <returns>Task of ApiResponse (ApiResponse)</returns>
System.Threading.Tasks.Task<ApiResponse<ApiResponse>> UploadFileWithRequiredFileAsyncWithHttpInfo (long? petId, System.IO.Stream requiredFile, string additionalMetadata = null);
System.Threading.Tasks.Task<ApiResponse<ApiResponse>> UploadFileWithRequiredFileAsyncWithHttpInfo (long petId, System.IO.Stream requiredFile, string additionalMetadata = null);
#endregion Asynchronous Operations
}
@@ -450,7 +450,7 @@ namespace Org.OpenAPITools.Api
/// </summary>
public interface IPetApi : IPetApiSync, IPetApiAsync
{
}
/// <summary>
@@ -459,7 +459,7 @@ namespace Org.OpenAPITools.Api
public partial class PetApi : IPetApi
{
private Org.OpenAPITools.Client.ExceptionFactory _exceptionFactory = (name, response) => null;
/// <summary>
/// Initializes a new instance of the <see cref="PetApi"/> class.
/// </summary>
@@ -514,7 +514,7 @@ namespace Org.OpenAPITools.Api
if(client == null) throw new ArgumentNullException("client");
if(asyncClient == null) throw new ArgumentNullException("asyncClient");
if(configuration == null) throw new ArgumentNullException("configuration");
this.Client = client;
this.AsynchronousClient = asyncClient;
this.Configuration = configuration;
@@ -648,6 +648,7 @@ namespace Org.OpenAPITools.Api
if (body == null)
throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'body' when calling PetApi->AddPet");
Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions();
String[] @contentTypes = new String[] {
@@ -694,7 +695,7 @@ namespace Org.OpenAPITools.Api
/// <param name="petId">Pet id to delete</param>
/// <param name="apiKey"> (optional)</param>
/// <returns></returns>
public void DeletePet (long? petId, string apiKey = null)
public void DeletePet (long petId, string apiKey = null)
{
DeletePetWithHttpInfo(petId, apiKey);
}
@@ -706,7 +707,7 @@ namespace Org.OpenAPITools.Api
/// <param name="petId">Pet id to delete</param>
/// <param name="apiKey"> (optional)</param>
/// <returns>ApiResponse of Object(void)</returns>
public Org.OpenAPITools.Client.ApiResponse<Object> DeletePetWithHttpInfo (long? petId, string apiKey = null)
public Org.OpenAPITools.Client.ApiResponse<Object> DeletePetWithHttpInfo (long petId, string apiKey = null)
{
// verify the required parameter 'petId' is set
if (petId == null)
@@ -759,7 +760,7 @@ namespace Org.OpenAPITools.Api
/// <param name="petId">Pet id to delete</param>
/// <param name="apiKey"> (optional)</param>
/// <returns>Task of void</returns>
public async System.Threading.Tasks.Task DeletePetAsync (long? petId, string apiKey = null)
public async System.Threading.Tasks.Task DeletePetAsync (long petId, string apiKey = null)
{
await DeletePetAsyncWithHttpInfo(petId, apiKey);
@@ -772,12 +773,13 @@ namespace Org.OpenAPITools.Api
/// <param name="petId">Pet id to delete</param>
/// <param name="apiKey"> (optional)</param>
/// <returns>Task of ApiResponse</returns>
public async System.Threading.Tasks.Task<Org.OpenAPITools.Client.ApiResponse<Object>> DeletePetAsyncWithHttpInfo (long? petId, string apiKey = null)
public async System.Threading.Tasks.Task<Org.OpenAPITools.Client.ApiResponse<Object>> DeletePetAsyncWithHttpInfo (long petId, string apiKey = null)
{
// verify the required parameter 'petId' is set
if (petId == null)
throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'petId' when calling PetApi->DeletePet");
Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions();
String[] @contentTypes = new String[] {
@@ -915,6 +917,7 @@ namespace Org.OpenAPITools.Api
if (status == null)
throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'status' when calling PetApi->FindPetsByStatus");
Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions();
String[] @contentTypes = new String[] {
@@ -1060,6 +1063,7 @@ namespace Org.OpenAPITools.Api
if (tags == null)
throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'tags' when calling PetApi->FindPetsByTags");
Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions();
String[] @contentTypes = new String[] {
@@ -1114,7 +1118,7 @@ namespace Org.OpenAPITools.Api
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="petId">ID of pet to return</param>
/// <returns>Pet</returns>
public Pet GetPetById (long? petId)
public Pet GetPetById (long petId)
{
Org.OpenAPITools.Client.ApiResponse<Pet> localVarResponse = GetPetByIdWithHttpInfo(petId);
return localVarResponse.Data;
@@ -1126,7 +1130,7 @@ namespace Org.OpenAPITools.Api
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="petId">ID of pet to return</param>
/// <returns>ApiResponse of Pet</returns>
public Org.OpenAPITools.Client.ApiResponse< Pet > GetPetByIdWithHttpInfo (long? petId)
public Org.OpenAPITools.Client.ApiResponse< Pet > GetPetByIdWithHttpInfo (long petId)
{
// verify the required parameter 'petId' is set
if (petId == null)
@@ -1177,7 +1181,7 @@ namespace Org.OpenAPITools.Api
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="petId">ID of pet to return</param>
/// <returns>Task of Pet</returns>
public async System.Threading.Tasks.Task<Pet> GetPetByIdAsync (long? petId)
public async System.Threading.Tasks.Task<Pet> GetPetByIdAsync (long petId)
{
Org.OpenAPITools.Client.ApiResponse<Pet> localVarResponse = await GetPetByIdAsyncWithHttpInfo(petId);
return localVarResponse.Data;
@@ -1190,12 +1194,13 @@ namespace Org.OpenAPITools.Api
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="petId">ID of pet to return</param>
/// <returns>Task of ApiResponse (Pet)</returns>
public async System.Threading.Tasks.Task<Org.OpenAPITools.Client.ApiResponse<Pet>> GetPetByIdAsyncWithHttpInfo (long? petId)
public async System.Threading.Tasks.Task<Org.OpenAPITools.Client.ApiResponse<Pet>> GetPetByIdAsyncWithHttpInfo (long petId)
{
// verify the required parameter 'petId' is set
if (petId == null)
throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'petId' when calling PetApi->GetPetById");
Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions();
String[] @contentTypes = new String[] {
@@ -1321,6 +1326,7 @@ namespace Org.OpenAPITools.Api
if (body == null)
throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'body' when calling PetApi->UpdatePet");
Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions();
String[] @contentTypes = new String[] {
@@ -1368,7 +1374,7 @@ namespace Org.OpenAPITools.Api
/// <param name="name">Updated name of the pet (optional)</param>
/// <param name="status">Updated status of the pet (optional)</param>
/// <returns></returns>
public void UpdatePetWithForm (long? petId, string name = null, string status = null)
public void UpdatePetWithForm (long petId, string name = null, string status = null)
{
UpdatePetWithFormWithHttpInfo(petId, name, status);
}
@@ -1381,7 +1387,7 @@ namespace Org.OpenAPITools.Api
/// <param name="name">Updated name of the pet (optional)</param>
/// <param name="status">Updated status of the pet (optional)</param>
/// <returns>ApiResponse of Object(void)</returns>
public Org.OpenAPITools.Client.ApiResponse<Object> UpdatePetWithFormWithHttpInfo (long? petId, string name = null, string status = null)
public Org.OpenAPITools.Client.ApiResponse<Object> UpdatePetWithFormWithHttpInfo (long petId, string name = null, string status = null)
{
// verify the required parameter 'petId' is set
if (petId == null)
@@ -1442,7 +1448,7 @@ namespace Org.OpenAPITools.Api
/// <param name="name">Updated name of the pet (optional)</param>
/// <param name="status">Updated status of the pet (optional)</param>
/// <returns>Task of void</returns>
public async System.Threading.Tasks.Task UpdatePetWithFormAsync (long? petId, string name = null, string status = null)
public async System.Threading.Tasks.Task UpdatePetWithFormAsync (long petId, string name = null, string status = null)
{
await UpdatePetWithFormAsyncWithHttpInfo(petId, name, status);
@@ -1456,12 +1462,13 @@ namespace Org.OpenAPITools.Api
/// <param name="name">Updated name of the pet (optional)</param>
/// <param name="status">Updated status of the pet (optional)</param>
/// <returns>Task of ApiResponse</returns>
public async System.Threading.Tasks.Task<Org.OpenAPITools.Client.ApiResponse<Object>> UpdatePetWithFormAsyncWithHttpInfo (long? petId, string name = null, string status = null)
public async System.Threading.Tasks.Task<Org.OpenAPITools.Client.ApiResponse<Object>> UpdatePetWithFormAsyncWithHttpInfo (long petId, string name = null, string status = null)
{
// verify the required parameter 'petId' is set
if (petId == null)
throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'petId' when calling PetApi->UpdatePetWithForm");
Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions();
String[] @contentTypes = new String[] {
@@ -1517,7 +1524,7 @@ namespace Org.OpenAPITools.Api
/// <param name="additionalMetadata">Additional data to pass to server (optional)</param>
/// <param name="file">file to upload (optional)</param>
/// <returns>ApiResponse</returns>
public ApiResponse UploadFile (long? petId, string additionalMetadata = null, System.IO.Stream file = null)
public ApiResponse UploadFile (long petId, string additionalMetadata = null, System.IO.Stream file = null)
{
Org.OpenAPITools.Client.ApiResponse<ApiResponse> localVarResponse = UploadFileWithHttpInfo(petId, additionalMetadata, file);
return localVarResponse.Data;
@@ -1531,7 +1538,7 @@ namespace Org.OpenAPITools.Api
/// <param name="additionalMetadata">Additional data to pass to server (optional)</param>
/// <param name="file">file to upload (optional)</param>
/// <returns>ApiResponse of ApiResponse</returns>
public Org.OpenAPITools.Client.ApiResponse< ApiResponse > UploadFileWithHttpInfo (long? petId, string additionalMetadata = null, System.IO.Stream file = null)
public Org.OpenAPITools.Client.ApiResponse< ApiResponse > UploadFileWithHttpInfo (long petId, string additionalMetadata = null, System.IO.Stream file = null)
{
// verify the required parameter 'petId' is set
if (petId == null)
@@ -1593,7 +1600,7 @@ namespace Org.OpenAPITools.Api
/// <param name="additionalMetadata">Additional data to pass to server (optional)</param>
/// <param name="file">file to upload (optional)</param>
/// <returns>Task of ApiResponse</returns>
public async System.Threading.Tasks.Task<ApiResponse> UploadFileAsync (long? petId, string additionalMetadata = null, System.IO.Stream file = null)
public async System.Threading.Tasks.Task<ApiResponse> UploadFileAsync (long petId, string additionalMetadata = null, System.IO.Stream file = null)
{
Org.OpenAPITools.Client.ApiResponse<ApiResponse> localVarResponse = await UploadFileAsyncWithHttpInfo(petId, additionalMetadata, file);
return localVarResponse.Data;
@@ -1608,12 +1615,13 @@ namespace Org.OpenAPITools.Api
/// <param name="additionalMetadata">Additional data to pass to server (optional)</param>
/// <param name="file">file to upload (optional)</param>
/// <returns>Task of ApiResponse (ApiResponse)</returns>
public async System.Threading.Tasks.Task<Org.OpenAPITools.Client.ApiResponse<ApiResponse>> UploadFileAsyncWithHttpInfo (long? petId, string additionalMetadata = null, System.IO.Stream file = null)
public async System.Threading.Tasks.Task<Org.OpenAPITools.Client.ApiResponse<ApiResponse>> UploadFileAsyncWithHttpInfo (long petId, string additionalMetadata = null, System.IO.Stream file = null)
{
// verify the required parameter 'petId' is set
if (petId == null)
throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'petId' when calling PetApi->UploadFile");
Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions();
String[] @contentTypes = new String[] {
@@ -1670,7 +1678,7 @@ namespace Org.OpenAPITools.Api
/// <param name="requiredFile">file to upload</param>
/// <param name="additionalMetadata">Additional data to pass to server (optional)</param>
/// <returns>ApiResponse</returns>
public ApiResponse UploadFileWithRequiredFile (long? petId, System.IO.Stream requiredFile, string additionalMetadata = null)
public ApiResponse UploadFileWithRequiredFile (long petId, System.IO.Stream requiredFile, string additionalMetadata = null)
{
Org.OpenAPITools.Client.ApiResponse<ApiResponse> localVarResponse = UploadFileWithRequiredFileWithHttpInfo(petId, requiredFile, additionalMetadata);
return localVarResponse.Data;
@@ -1684,11 +1692,12 @@ namespace Org.OpenAPITools.Api
/// <param name="requiredFile">file to upload</param>
/// <param name="additionalMetadata">Additional data to pass to server (optional)</param>
/// <returns>ApiResponse of ApiResponse</returns>
public Org.OpenAPITools.Client.ApiResponse< ApiResponse > UploadFileWithRequiredFileWithHttpInfo (long? petId, System.IO.Stream requiredFile, string additionalMetadata = null)
public Org.OpenAPITools.Client.ApiResponse< ApiResponse > UploadFileWithRequiredFileWithHttpInfo (long petId, System.IO.Stream requiredFile, string additionalMetadata = null)
{
// verify the required parameter 'petId' is set
if (petId == null)
throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'petId' when calling PetApi->UploadFileWithRequiredFile");
// verify the required parameter 'requiredFile' is set
if (requiredFile == null)
throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requiredFile' when calling PetApi->UploadFileWithRequiredFile");
@@ -1749,7 +1758,7 @@ namespace Org.OpenAPITools.Api
/// <param name="requiredFile">file to upload</param>
/// <param name="additionalMetadata">Additional data to pass to server (optional)</param>
/// <returns>Task of ApiResponse</returns>
public async System.Threading.Tasks.Task<ApiResponse> UploadFileWithRequiredFileAsync (long? petId, System.IO.Stream requiredFile, string additionalMetadata = null)
public async System.Threading.Tasks.Task<ApiResponse> UploadFileWithRequiredFileAsync (long petId, System.IO.Stream requiredFile, string additionalMetadata = null)
{
Org.OpenAPITools.Client.ApiResponse<ApiResponse> localVarResponse = await UploadFileWithRequiredFileAsyncWithHttpInfo(petId, requiredFile, additionalMetadata);
return localVarResponse.Data;
@@ -1764,15 +1773,17 @@ namespace Org.OpenAPITools.Api
/// <param name="requiredFile">file to upload</param>
/// <param name="additionalMetadata">Additional data to pass to server (optional)</param>
/// <returns>Task of ApiResponse (ApiResponse)</returns>
public async System.Threading.Tasks.Task<Org.OpenAPITools.Client.ApiResponse<ApiResponse>> UploadFileWithRequiredFileAsyncWithHttpInfo (long? petId, System.IO.Stream requiredFile, string additionalMetadata = null)
public async System.Threading.Tasks.Task<Org.OpenAPITools.Client.ApiResponse<ApiResponse>> UploadFileWithRequiredFileAsyncWithHttpInfo (long petId, System.IO.Stream requiredFile, string additionalMetadata = null)
{
// verify the required parameter 'petId' is set
if (petId == null)
throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'petId' when calling PetApi->UploadFileWithRequiredFile");
// verify the required parameter 'requiredFile' is set
if (requiredFile == null)
throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requiredFile' when calling PetApi->UploadFileWithRequiredFile");
Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions();
String[] @contentTypes = new String[] {

View File

@@ -55,8 +55,8 @@ namespace Org.OpenAPITools.Api
/// Returns a map of status codes to quantities
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <returns>Dictionary&lt;string, int?&gt;</returns>
Dictionary<string, int?> GetInventory ();
/// <returns>Dictionary&lt;string, int&gt;</returns>
Dictionary<string, int> GetInventory ();
/// <summary>
/// Returns pet inventories by status
@@ -65,8 +65,8 @@ namespace Org.OpenAPITools.Api
/// Returns a map of status codes to quantities
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <returns>ApiResponse of Dictionary&lt;string, int?&gt;</returns>
ApiResponse<Dictionary<string, int?>> GetInventoryWithHttpInfo ();
/// <returns>ApiResponse of Dictionary&lt;string, int&gt;</returns>
ApiResponse<Dictionary<string, int>> GetInventoryWithHttpInfo ();
/// <summary>
/// Find purchase order by ID
/// </summary>
@@ -76,7 +76,7 @@ namespace Org.OpenAPITools.Api
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="orderId">ID of pet that needs to be fetched</param>
/// <returns>Order</returns>
Order GetOrderById (long? orderId);
Order GetOrderById (long orderId);
/// <summary>
/// Find purchase order by ID
@@ -87,7 +87,7 @@ namespace Org.OpenAPITools.Api
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="orderId">ID of pet that needs to be fetched</param>
/// <returns>ApiResponse of Order</returns>
ApiResponse<Order> GetOrderByIdWithHttpInfo (long? orderId);
ApiResponse<Order> GetOrderByIdWithHttpInfo (long orderId);
/// <summary>
/// Place an order for a pet
/// </summary>
@@ -146,8 +146,8 @@ namespace Org.OpenAPITools.Api
/// Returns a map of status codes to quantities
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <returns>Task of Dictionary&lt;string, int?&gt;</returns>
System.Threading.Tasks.Task<Dictionary<string, int?>> GetInventoryAsync ();
/// <returns>Task of Dictionary&lt;string, int&gt;</returns>
System.Threading.Tasks.Task<Dictionary<string, int>> GetInventoryAsync ();
/// <summary>
/// Returns pet inventories by status
@@ -156,8 +156,8 @@ namespace Org.OpenAPITools.Api
/// Returns a map of status codes to quantities
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <returns>Task of ApiResponse (Dictionary&lt;string, int?&gt;)</returns>
System.Threading.Tasks.Task<ApiResponse<Dictionary<string, int?>>> GetInventoryAsyncWithHttpInfo ();
/// <returns>Task of ApiResponse (Dictionary&lt;string, int&gt;)</returns>
System.Threading.Tasks.Task<ApiResponse<Dictionary<string, int>>> GetInventoryAsyncWithHttpInfo ();
/// <summary>
/// Find purchase order by ID
/// </summary>
@@ -167,7 +167,7 @@ namespace Org.OpenAPITools.Api
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="orderId">ID of pet that needs to be fetched</param>
/// <returns>Task of Order</returns>
System.Threading.Tasks.Task<Order> GetOrderByIdAsync (long? orderId);
System.Threading.Tasks.Task<Order> GetOrderByIdAsync (long orderId);
/// <summary>
/// Find purchase order by ID
@@ -178,7 +178,7 @@ namespace Org.OpenAPITools.Api
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="orderId">ID of pet that needs to be fetched</param>
/// <returns>Task of ApiResponse (Order)</returns>
System.Threading.Tasks.Task<ApiResponse<Order>> GetOrderByIdAsyncWithHttpInfo (long? orderId);
System.Threading.Tasks.Task<ApiResponse<Order>> GetOrderByIdAsyncWithHttpInfo (long orderId);
/// <summary>
/// Place an order for a pet
/// </summary>
@@ -208,7 +208,7 @@ namespace Org.OpenAPITools.Api
/// </summary>
public interface IStoreApi : IStoreApiSync, IStoreApiAsync
{
}
/// <summary>
@@ -217,7 +217,7 @@ namespace Org.OpenAPITools.Api
public partial class StoreApi : IStoreApi
{
private Org.OpenAPITools.Client.ExceptionFactory _exceptionFactory = (name, response) => null;
/// <summary>
/// Initializes a new instance of the <see cref="StoreApi"/> class.
/// </summary>
@@ -272,7 +272,7 @@ namespace Org.OpenAPITools.Api
if(client == null) throw new ArgumentNullException("client");
if(asyncClient == null) throw new ArgumentNullException("asyncClient");
if(configuration == null) throw new ArgumentNullException("configuration");
this.Client = client;
this.AsynchronousClient = asyncClient;
this.Configuration = configuration;
@@ -399,6 +399,7 @@ namespace Org.OpenAPITools.Api
if (orderId == null)
throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'orderId' when calling StoreApi->DeleteOrder");
Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions();
String[] @contentTypes = new String[] {
@@ -435,10 +436,10 @@ namespace Org.OpenAPITools.Api
/// Returns pet inventories by status Returns a map of status codes to quantities
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <returns>Dictionary&lt;string, int?&gt;</returns>
public Dictionary<string, int?> GetInventory ()
/// <returns>Dictionary&lt;string, int&gt;</returns>
public Dictionary<string, int> GetInventory ()
{
Org.OpenAPITools.Client.ApiResponse<Dictionary<string, int?>> localVarResponse = GetInventoryWithHttpInfo();
Org.OpenAPITools.Client.ApiResponse<Dictionary<string, int>> localVarResponse = GetInventoryWithHttpInfo();
return localVarResponse.Data;
}
@@ -446,10 +447,9 @@ namespace Org.OpenAPITools.Api
/// Returns pet inventories by status Returns a map of status codes to quantities
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <returns>ApiResponse of Dictionary&lt;string, int?&gt;</returns>
public Org.OpenAPITools.Client.ApiResponse< Dictionary<string, int?> > GetInventoryWithHttpInfo ()
/// <returns>ApiResponse of Dictionary&lt;string, int&gt;</returns>
public Org.OpenAPITools.Client.ApiResponse< Dictionary<string, int> > GetInventoryWithHttpInfo ()
{
Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions();
String[] @contentTypes = new String[] {
@@ -475,7 +475,7 @@ namespace Org.OpenAPITools.Api
// make the HTTP request
var response = this.Client.Get< Dictionary<string, int?> >("/store/inventory", requestOptions, this.Configuration);
var response = this.Client.Get< Dictionary<string, int> >("/store/inventory", requestOptions, this.Configuration);
if (this.ExceptionFactory != null)
{
@@ -490,10 +490,10 @@ namespace Org.OpenAPITools.Api
/// Returns pet inventories by status Returns a map of status codes to quantities
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <returns>Task of Dictionary&lt;string, int?&gt;</returns>
public async System.Threading.Tasks.Task<Dictionary<string, int?>> GetInventoryAsync ()
/// <returns>Task of Dictionary&lt;string, int&gt;</returns>
public async System.Threading.Tasks.Task<Dictionary<string, int>> GetInventoryAsync ()
{
Org.OpenAPITools.Client.ApiResponse<Dictionary<string, int?>> localVarResponse = await GetInventoryAsyncWithHttpInfo();
Org.OpenAPITools.Client.ApiResponse<Dictionary<string, int>> localVarResponse = await GetInventoryAsyncWithHttpInfo();
return localVarResponse.Data;
}
@@ -502,8 +502,8 @@ namespace Org.OpenAPITools.Api
/// Returns pet inventories by status Returns a map of status codes to quantities
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <returns>Task of ApiResponse (Dictionary&lt;string, int?&gt;)</returns>
public async System.Threading.Tasks.Task<Org.OpenAPITools.Client.ApiResponse<Dictionary<string, int?>>> GetInventoryAsyncWithHttpInfo ()
/// <returns>Task of ApiResponse (Dictionary&lt;string, int&gt;)</returns>
public async System.Threading.Tasks.Task<Org.OpenAPITools.Client.ApiResponse<Dictionary<string, int>>> GetInventoryAsyncWithHttpInfo ()
{
Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions();
@@ -531,7 +531,7 @@ namespace Org.OpenAPITools.Api
// make the HTTP request
var response = await this.AsynchronousClient.GetAsync<Dictionary<string, int?>>("/store/inventory", requestOptions, this.Configuration);
var response = await this.AsynchronousClient.GetAsync<Dictionary<string, int>>("/store/inventory", requestOptions, this.Configuration);
if (this.ExceptionFactory != null)
{
@@ -548,7 +548,7 @@ namespace Org.OpenAPITools.Api
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="orderId">ID of pet that needs to be fetched</param>
/// <returns>Order</returns>
public Order GetOrderById (long? orderId)
public Order GetOrderById (long orderId)
{
Org.OpenAPITools.Client.ApiResponse<Order> localVarResponse = GetOrderByIdWithHttpInfo(orderId);
return localVarResponse.Data;
@@ -560,7 +560,7 @@ namespace Org.OpenAPITools.Api
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="orderId">ID of pet that needs to be fetched</param>
/// <returns>ApiResponse of Order</returns>
public Org.OpenAPITools.Client.ApiResponse< Order > GetOrderByIdWithHttpInfo (long? orderId)
public Org.OpenAPITools.Client.ApiResponse< Order > GetOrderByIdWithHttpInfo (long orderId)
{
// verify the required parameter 'orderId' is set
if (orderId == null)
@@ -606,7 +606,7 @@ namespace Org.OpenAPITools.Api
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="orderId">ID of pet that needs to be fetched</param>
/// <returns>Task of Order</returns>
public async System.Threading.Tasks.Task<Order> GetOrderByIdAsync (long? orderId)
public async System.Threading.Tasks.Task<Order> GetOrderByIdAsync (long orderId)
{
Org.OpenAPITools.Client.ApiResponse<Order> localVarResponse = await GetOrderByIdAsyncWithHttpInfo(orderId);
return localVarResponse.Data;
@@ -619,12 +619,13 @@ namespace Org.OpenAPITools.Api
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="orderId">ID of pet that needs to be fetched</param>
/// <returns>Task of ApiResponse (Order)</returns>
public async System.Threading.Tasks.Task<Org.OpenAPITools.Client.ApiResponse<Order>> GetOrderByIdAsyncWithHttpInfo (long? orderId)
public async System.Threading.Tasks.Task<Org.OpenAPITools.Client.ApiResponse<Order>> GetOrderByIdAsyncWithHttpInfo (long orderId)
{
// verify the required parameter 'orderId' is set
if (orderId == null)
throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'orderId' when calling StoreApi->GetOrderById");
Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions();
String[] @contentTypes = new String[] {
@@ -741,6 +742,7 @@ namespace Org.OpenAPITools.Api
if (body == null)
throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'body' when calling StoreApi->PlaceOrder");
Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions();
String[] @contentTypes = new String[] {

View File

@@ -384,7 +384,7 @@ namespace Org.OpenAPITools.Api
/// </summary>
public interface IUserApi : IUserApiSync, IUserApiAsync
{
}
/// <summary>
@@ -393,7 +393,7 @@ namespace Org.OpenAPITools.Api
public partial class UserApi : IUserApi
{
private Org.OpenAPITools.Client.ExceptionFactory _exceptionFactory = (name, response) => null;
/// <summary>
/// Initializes a new instance of the <see cref="UserApi"/> class.
/// </summary>
@@ -448,7 +448,7 @@ namespace Org.OpenAPITools.Api
if(client == null) throw new ArgumentNullException("client");
if(asyncClient == null) throw new ArgumentNullException("asyncClient");
if(configuration == null) throw new ArgumentNullException("configuration");
this.Client = client;
this.AsynchronousClient = asyncClient;
this.Configuration = configuration;
@@ -574,6 +574,7 @@ namespace Org.OpenAPITools.Api
if (body == null)
throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'body' when calling UserApi->CreateUser");
Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions();
String[] @contentTypes = new String[] {
@@ -683,6 +684,7 @@ namespace Org.OpenAPITools.Api
if (body == null)
throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'body' when calling UserApi->CreateUsersWithArrayInput");
Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions();
String[] @contentTypes = new String[] {
@@ -792,6 +794,7 @@ namespace Org.OpenAPITools.Api
if (body == null)
throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'body' when calling UserApi->CreateUsersWithListInput");
Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions();
String[] @contentTypes = new String[] {
@@ -902,6 +905,7 @@ namespace Org.OpenAPITools.Api
if (username == null)
throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'username' when calling UserApi->DeleteUser");
Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions();
String[] @contentTypes = new String[] {
@@ -1017,6 +1021,7 @@ namespace Org.OpenAPITools.Api
if (username == null)
throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'username' when calling UserApi->GetUserByName");
Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions();
String[] @contentTypes = new String[] {
@@ -1076,6 +1081,7 @@ namespace Org.OpenAPITools.Api
// verify the required parameter 'username' is set
if (username == null)
throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'username' when calling UserApi->LoginUser");
// verify the required parameter 'password' is set
if (password == null)
throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'password' when calling UserApi->LoginUser");
@@ -1158,10 +1164,12 @@ namespace Org.OpenAPITools.Api
// verify the required parameter 'username' is set
if (username == null)
throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'username' when calling UserApi->LoginUser");
// verify the required parameter 'password' is set
if (password == null)
throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'password' when calling UserApi->LoginUser");
Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions();
String[] @contentTypes = new String[] {
@@ -1231,7 +1239,6 @@ namespace Org.OpenAPITools.Api
/// <returns>ApiResponse of Object(void)</returns>
public Org.OpenAPITools.Client.ApiResponse<Object> LogoutUserWithHttpInfo ()
{
Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions();
String[] @contentTypes = new String[] {
@@ -1335,6 +1342,7 @@ namespace Org.OpenAPITools.Api
// verify the required parameter 'username' is set
if (username == null)
throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'username' when calling UserApi->UpdateUser");
// verify the required parameter 'body' is set
if (body == null)
throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'body' when calling UserApi->UpdateUser");
@@ -1397,10 +1405,12 @@ namespace Org.OpenAPITools.Api
// verify the required parameter 'username' is set
if (username == null)
throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'username' when calling UserApi->UpdateUser");
// verify the required parameter 'body' is set
if (body == null)
throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'body' when calling UserApi->UpdateUser");
Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions();
String[] @contentTypes = new String[] {

View File

@@ -38,7 +38,7 @@ namespace Org.OpenAPITools.Model
/// <param name="code">code.</param>
/// <param name="type">type.</param>
/// <param name="message">message.</param>
public ApiResponse(int? code = default(int?), string type = default(string), string message = default(string))
public ApiResponse(int code = default(int), string type = default(string), string message = default(string))
{
this.Code = code;
this.Type = type;
@@ -49,7 +49,7 @@ namespace Org.OpenAPITools.Model
/// Gets or Sets Code
/// </summary>
[DataMember(Name="code", EmitDefaultValue=false)]
public int? Code { get; set; }
public int Code { get; set; }
/// <summary>
/// Gets or Sets Type

View File

@@ -36,7 +36,7 @@ namespace Org.OpenAPITools.Model
/// Initializes a new instance of the <see cref="ArrayOfArrayOfNumberOnly" /> class.
/// </summary>
/// <param name="arrayArrayNumber">arrayArrayNumber.</param>
public ArrayOfArrayOfNumberOnly(List<List<decimal?>> arrayArrayNumber = default(List<List<decimal?>>))
public ArrayOfArrayOfNumberOnly(List<List<decimal>> arrayArrayNumber = default(List<List<decimal>>))
{
this.ArrayArrayNumber = arrayArrayNumber;
}
@@ -45,7 +45,7 @@ namespace Org.OpenAPITools.Model
/// Gets or Sets ArrayArrayNumber
/// </summary>
[DataMember(Name="ArrayArrayNumber", EmitDefaultValue=false)]
public List<List<decimal?>> ArrayArrayNumber { get; set; }
public List<List<decimal>> ArrayArrayNumber { get; set; }
/// <summary>
/// Returns the string presentation of the object

View File

@@ -36,7 +36,7 @@ namespace Org.OpenAPITools.Model
/// Initializes a new instance of the <see cref="ArrayOfNumberOnly" /> class.
/// </summary>
/// <param name="arrayNumber">arrayNumber.</param>
public ArrayOfNumberOnly(List<decimal?> arrayNumber = default(List<decimal?>))
public ArrayOfNumberOnly(List<decimal> arrayNumber = default(List<decimal>))
{
this.ArrayNumber = arrayNumber;
}
@@ -45,7 +45,7 @@ namespace Org.OpenAPITools.Model
/// Gets or Sets ArrayNumber
/// </summary>
[DataMember(Name="ArrayNumber", EmitDefaultValue=false)]
public List<decimal?> ArrayNumber { get; set; }
public List<decimal> ArrayNumber { get; set; }
/// <summary>
/// Returns the string presentation of the object

View File

@@ -38,7 +38,7 @@ namespace Org.OpenAPITools.Model
/// <param name="arrayOfString">arrayOfString.</param>
/// <param name="arrayArrayOfInteger">arrayArrayOfInteger.</param>
/// <param name="arrayArrayOfModel">arrayArrayOfModel.</param>
public ArrayTest(List<string> arrayOfString = default(List<string>), List<List<long?>> arrayArrayOfInteger = default(List<List<long?>>), List<List<ReadOnlyFirst>> arrayArrayOfModel = default(List<List<ReadOnlyFirst>>))
public ArrayTest(List<string> arrayOfString = default(List<string>), List<List<long>> arrayArrayOfInteger = default(List<List<long>>), List<List<ReadOnlyFirst>> arrayArrayOfModel = default(List<List<ReadOnlyFirst>>))
{
this.ArrayOfString = arrayOfString;
this.ArrayArrayOfInteger = arrayArrayOfInteger;
@@ -55,7 +55,7 @@ namespace Org.OpenAPITools.Model
/// Gets or Sets ArrayArrayOfInteger
/// </summary>
[DataMember(Name="array_array_of_integer", EmitDefaultValue=false)]
public List<List<long?>> ArrayArrayOfInteger { get; set; }
public List<List<long>> ArrayArrayOfInteger { get; set; }
/// <summary>
/// Gets or Sets ArrayArrayOfModel

View File

@@ -43,7 +43,7 @@ namespace Org.OpenAPITools.Model
/// <param name="declawed">declawed.</param>
/// <param name="className">className (required).</param>
/// <param name="color">color (default to &quot;red&quot;).</param>
public Cat(bool? declawed = default(bool?), string className = default(string), string color = "red") : base(className, color)
public Cat(bool declawed = default(bool), string className = default(string), string color = "red") : base(className, color)
{
this.Declawed = declawed;
}
@@ -52,7 +52,7 @@ namespace Org.OpenAPITools.Model
/// Gets or Sets Declawed
/// </summary>
[DataMember(Name="declawed", EmitDefaultValue=false)]
public bool? Declawed { get; set; }
public bool Declawed { get; set; }
/// <summary>
/// Returns the string presentation of the object

View File

@@ -42,7 +42,7 @@ namespace Org.OpenAPITools.Model
/// </summary>
/// <param name="id">id.</param>
/// <param name="name">name (required) (default to &quot;default-name&quot;).</param>
public Category(long? id = default(long?), string name = "default-name")
public Category(long id = default(long), string name = "default-name")
{
// to ensure "name" is required (not null)
if (name == null)
@@ -60,7 +60,7 @@ namespace Org.OpenAPITools.Model
/// Gets or Sets Id
/// </summary>
[DataMember(Name="id", EmitDefaultValue=false)]
public long? Id { get; set; }
public long Id { get; set; }
/// <summary>
/// Gets or Sets Name

View File

@@ -53,7 +53,7 @@ namespace Org.OpenAPITools.Model
/// <param name="dateTime">dateTime.</param>
/// <param name="uuid">uuid.</param>
/// <param name="password">password (required).</param>
public FormatTest(int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), decimal? number = default(decimal?), float? _float = default(float?), double? _double = default(double?), string _string = default(string), byte[] _byte = default(byte[]), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), Guid? uuid = default(Guid?), string password = default(string))
public FormatTest(int integer = default(int), int int32 = default(int), long int64 = default(long), decimal number = default(decimal), float _float = default(float), double _double = default(double), string _string = default(string), byte[] _byte = default(byte[]), System.IO.Stream binary = default(System.IO.Stream), DateTime date = default(DateTime), DateTime dateTime = default(DateTime), Guid uuid = default(Guid), string password = default(string))
{
// to ensure "number" is required (not null)
if (number == null)
@@ -106,37 +106,37 @@ namespace Org.OpenAPITools.Model
/// Gets or Sets Integer
/// </summary>
[DataMember(Name="integer", EmitDefaultValue=false)]
public int? Integer { get; set; }
public int Integer { get; set; }
/// <summary>
/// Gets or Sets Int32
/// </summary>
[DataMember(Name="int32", EmitDefaultValue=false)]
public int? Int32 { get; set; }
public int Int32 { get; set; }
/// <summary>
/// Gets or Sets Int64
/// </summary>
[DataMember(Name="int64", EmitDefaultValue=false)]
public long? Int64 { get; set; }
public long Int64 { get; set; }
/// <summary>
/// Gets or Sets Number
/// </summary>
[DataMember(Name="number", EmitDefaultValue=false)]
public decimal? Number { get; set; }
public decimal Number { get; set; }
/// <summary>
/// Gets or Sets Float
/// </summary>
[DataMember(Name="float", EmitDefaultValue=false)]
public float? Float { get; set; }
public float Float { get; set; }
/// <summary>
/// Gets or Sets Double
/// </summary>
[DataMember(Name="double", EmitDefaultValue=false)]
public double? Double { get; set; }
public double Double { get; set; }
/// <summary>
/// Gets or Sets String
@@ -161,19 +161,19 @@ namespace Org.OpenAPITools.Model
/// </summary>
[DataMember(Name="date", EmitDefaultValue=false)]
[JsonConverter(typeof(OpenAPIDateConverter))]
public DateTime? Date { get; set; }
public DateTime Date { get; set; }
/// <summary>
/// Gets or Sets DateTime
/// </summary>
[DataMember(Name="dateTime", EmitDefaultValue=false)]
public DateTime? DateTime { get; set; }
public DateTime DateTime { get; set; }
/// <summary>
/// Gets or Sets Uuid
/// </summary>
[DataMember(Name="uuid", EmitDefaultValue=false)]
public Guid? Uuid { get; set; }
public Guid Uuid { get; set; }
/// <summary>
/// Gets or Sets Password
@@ -281,62 +281,62 @@ namespace Org.OpenAPITools.Model
/// <returns>Validation Result</returns>
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
{
// Integer (int?) maximum
if(this.Integer > (int?)100)
// Integer (int) maximum
if(this.Integer > (int)100)
{
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Integer, must be a value less than or equal to 100.", new [] { "Integer" });
}
// Integer (int?) minimum
if(this.Integer < (int?)10)
// Integer (int) minimum
if(this.Integer < (int)10)
{
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Integer, must be a value greater than or equal to 10.", new [] { "Integer" });
}
// Int32 (int?) maximum
if(this.Int32 > (int?)200)
// Int32 (int) maximum
if(this.Int32 > (int)200)
{
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Int32, must be a value less than or equal to 200.", new [] { "Int32" });
}
// Int32 (int?) minimum
if(this.Int32 < (int?)20)
// Int32 (int) minimum
if(this.Int32 < (int)20)
{
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Int32, must be a value greater than or equal to 20.", new [] { "Int32" });
}
// Number (decimal?) maximum
if(this.Number > (decimal?)543.2)
// Number (decimal) maximum
if(this.Number > (decimal)543.2)
{
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Number, must be a value less than or equal to 543.2.", new [] { "Number" });
}
// Number (decimal?) minimum
if(this.Number < (decimal?)32.1)
// Number (decimal) minimum
if(this.Number < (decimal)32.1)
{
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Number, must be a value greater than or equal to 32.1.", new [] { "Number" });
}
// Float (float?) maximum
if(this.Float > (float?)987.6)
// Float (float) maximum
if(this.Float > (float)987.6)
{
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Float, must be a value less than or equal to 987.6.", new [] { "Float" });
}
// Float (float?) minimum
if(this.Float < (float?)54.3)
// Float (float) minimum
if(this.Float < (float)54.3)
{
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Float, must be a value greater than or equal to 54.3.", new [] { "Float" });
}
// Double (double?) maximum
if(this.Double > (double?)123.4)
// Double (double) maximum
if(this.Double > (double)123.4)
{
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Double, must be a value less than or equal to 123.4.", new [] { "Double" });
}
// Double (double?) minimum
if(this.Double < (double?)67.8)
// Double (double) minimum
if(this.Double < (double)67.8)
{
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Double, must be a value greater than or equal to 67.8.", new [] { "Double" });
}

View File

@@ -65,7 +65,7 @@ namespace Org.OpenAPITools.Model
/// <param name="mapOfEnumString">mapOfEnumString.</param>
/// <param name="directMap">directMap.</param>
/// <param name="indirectMap">indirectMap.</param>
public MapTest(Dictionary<string, Dictionary<string, string>> mapMapOfString = default(Dictionary<string, Dictionary<string, string>>), Dictionary<string, InnerEnum> mapOfEnumString = default(Dictionary<string, InnerEnum>), Dictionary<string, bool?> directMap = default(Dictionary<string, bool?>), Dictionary<string, bool?> indirectMap = default(Dictionary<string, bool?>))
public MapTest(Dictionary<string, Dictionary<string, string>> mapMapOfString = default(Dictionary<string, Dictionary<string, string>>), Dictionary<string, InnerEnum> mapOfEnumString = default(Dictionary<string, InnerEnum>), Dictionary<string, bool> directMap = default(Dictionary<string, bool>), Dictionary<string, bool> indirectMap = default(Dictionary<string, bool>))
{
this.MapMapOfString = mapMapOfString;
this.MapOfEnumString = mapOfEnumString;
@@ -83,13 +83,13 @@ namespace Org.OpenAPITools.Model
/// Gets or Sets DirectMap
/// </summary>
[DataMember(Name="direct_map", EmitDefaultValue=false)]
public Dictionary<string, bool?> DirectMap { get; set; }
public Dictionary<string, bool> DirectMap { get; set; }
/// <summary>
/// Gets or Sets IndirectMap
/// </summary>
[DataMember(Name="indirect_map", EmitDefaultValue=false)]
public Dictionary<string, bool?> IndirectMap { get; set; }
public Dictionary<string, bool> IndirectMap { get; set; }
/// <summary>
/// Returns the string presentation of the object

View File

@@ -38,7 +38,7 @@ namespace Org.OpenAPITools.Model
/// <param name="uuid">uuid.</param>
/// <param name="dateTime">dateTime.</param>
/// <param name="map">map.</param>
public MixedPropertiesAndAdditionalPropertiesClass(Guid? uuid = default(Guid?), DateTime? dateTime = default(DateTime?), Dictionary<string, Animal> map = default(Dictionary<string, Animal>))
public MixedPropertiesAndAdditionalPropertiesClass(Guid uuid = default(Guid), DateTime dateTime = default(DateTime), Dictionary<string, Animal> map = default(Dictionary<string, Animal>))
{
this.Uuid = uuid;
this.DateTime = dateTime;
@@ -49,13 +49,13 @@ namespace Org.OpenAPITools.Model
/// Gets or Sets Uuid
/// </summary>
[DataMember(Name="uuid", EmitDefaultValue=false)]
public Guid? Uuid { get; set; }
public Guid Uuid { get; set; }
/// <summary>
/// Gets or Sets DateTime
/// </summary>
[DataMember(Name="dateTime", EmitDefaultValue=false)]
public DateTime? DateTime { get; set; }
public DateTime DateTime { get; set; }
/// <summary>
/// Gets or Sets Map

View File

@@ -37,7 +37,7 @@ namespace Org.OpenAPITools.Model
/// </summary>
/// <param name="name">name.</param>
/// <param name="_class">_class.</param>
public Model200Response(int? name = default(int?), string _class = default(string))
public Model200Response(int name = default(int), string _class = default(string))
{
this.Name = name;
this.Class = _class;
@@ -47,7 +47,7 @@ namespace Org.OpenAPITools.Model
/// Gets or Sets Name
/// </summary>
[DataMember(Name="name", EmitDefaultValue=false)]
public int? Name { get; set; }
public int Name { get; set; }
/// <summary>
/// Gets or Sets Class

View File

@@ -42,7 +42,7 @@ namespace Org.OpenAPITools.Model
/// </summary>
/// <param name="name">name (required).</param>
/// <param name="property">property.</param>
public Name(int? name = default(int?), string property = default(string))
public Name(int name = default(int), string property = default(string))
{
// to ensure "name" is required (not null)
if (name == null)
@@ -60,13 +60,13 @@ namespace Org.OpenAPITools.Model
/// Gets or Sets _Name
/// </summary>
[DataMember(Name="name", EmitDefaultValue=false)]
public int? _Name { get; set; }
public int _Name { get; set; }
/// <summary>
/// Gets or Sets SnakeCase
/// </summary>
[DataMember(Name="snake_case", EmitDefaultValue=false)]
public int? SnakeCase { get; private set; }
public int SnakeCase { get; private set; }
/// <summary>
/// Gets or Sets Property
@@ -78,7 +78,7 @@ namespace Org.OpenAPITools.Model
/// Gets or Sets _123Number
/// </summary>
[DataMember(Name="123Number", EmitDefaultValue=false)]
public int? _123Number { get; private set; }
public int _123Number { get; private set; }
/// <summary>
/// Returns the string presentation of the object

View File

@@ -36,7 +36,7 @@ namespace Org.OpenAPITools.Model
/// Initializes a new instance of the <see cref="NumberOnly" /> class.
/// </summary>
/// <param name="justNumber">justNumber.</param>
public NumberOnly(decimal? justNumber = default(decimal?))
public NumberOnly(decimal justNumber = default(decimal))
{
this.JustNumber = justNumber;
}
@@ -45,7 +45,7 @@ namespace Org.OpenAPITools.Model
/// Gets or Sets JustNumber
/// </summary>
[DataMember(Name="JustNumber", EmitDefaultValue=false)]
public decimal? JustNumber { get; set; }
public decimal JustNumber { get; set; }
/// <summary>
/// Returns the string presentation of the object

View File

@@ -74,7 +74,7 @@ namespace Org.OpenAPITools.Model
/// <param name="shipDate">shipDate.</param>
/// <param name="status">Order Status.</param>
/// <param name="complete">complete (default to false).</param>
public Order(long? id = default(long?), long? petId = default(long?), int? quantity = default(int?), DateTime? shipDate = default(DateTime?), StatusEnum? status = default(StatusEnum?), bool? complete = false)
public Order(long id = default(long), long petId = default(long), int quantity = default(int), DateTime shipDate = default(DateTime), StatusEnum? status = default(StatusEnum?), bool complete = false)
{
this.Id = id;
this.PetId = petId;
@@ -96,31 +96,31 @@ namespace Org.OpenAPITools.Model
/// Gets or Sets Id
/// </summary>
[DataMember(Name="id", EmitDefaultValue=false)]
public long? Id { get; set; }
public long Id { get; set; }
/// <summary>
/// Gets or Sets PetId
/// </summary>
[DataMember(Name="petId", EmitDefaultValue=false)]
public long? PetId { get; set; }
public long PetId { get; set; }
/// <summary>
/// Gets or Sets Quantity
/// </summary>
[DataMember(Name="quantity", EmitDefaultValue=false)]
public int? Quantity { get; set; }
public int Quantity { get; set; }
/// <summary>
/// Gets or Sets ShipDate
/// </summary>
[DataMember(Name="shipDate", EmitDefaultValue=false)]
public DateTime? ShipDate { get; set; }
public DateTime ShipDate { get; set; }
/// <summary>
/// Gets or Sets Complete
/// </summary>
[DataMember(Name="complete", EmitDefaultValue=false)]
public bool? Complete { get; set; }
public bool Complete { get; set; }
/// <summary>
/// Returns the string presentation of the object

View File

@@ -38,7 +38,7 @@ namespace Org.OpenAPITools.Model
/// <param name="myNumber">myNumber.</param>
/// <param name="myString">myString.</param>
/// <param name="myBoolean">myBoolean.</param>
public OuterComposite(decimal? myNumber = default(decimal?), string myString = default(string), bool? myBoolean = default(bool?))
public OuterComposite(decimal myNumber = default(decimal), string myString = default(string), bool myBoolean = default(bool))
{
this.MyNumber = myNumber;
this.MyString = myString;
@@ -49,7 +49,7 @@ namespace Org.OpenAPITools.Model
/// Gets or Sets MyNumber
/// </summary>
[DataMember(Name="my_number", EmitDefaultValue=false)]
public decimal? MyNumber { get; set; }
public decimal MyNumber { get; set; }
/// <summary>
/// Gets or Sets MyString
@@ -61,7 +61,7 @@ namespace Org.OpenAPITools.Model
/// Gets or Sets MyBoolean
/// </summary>
[DataMember(Name="my_boolean", EmitDefaultValue=false)]
public bool? MyBoolean { get; set; }
public bool MyBoolean { get; set; }
/// <summary>
/// Returns the string presentation of the object

View File

@@ -79,7 +79,7 @@ namespace Org.OpenAPITools.Model
/// <param name="photoUrls">photoUrls (required).</param>
/// <param name="tags">tags.</param>
/// <param name="status">pet status in the store.</param>
public Pet(long? id = default(long?), Category category = default(Category), string name = default(string), List<string> photoUrls = default(List<string>), List<Tag> tags = default(List<Tag>), StatusEnum? status = default(StatusEnum?))
public Pet(long id = default(long), Category category = default(Category), string name = default(string), List<string> photoUrls = default(List<string>), List<Tag> tags = default(List<Tag>), StatusEnum? status = default(StatusEnum?))
{
// to ensure "name" is required (not null)
if (name == null)
@@ -109,7 +109,7 @@ namespace Org.OpenAPITools.Model
/// Gets or Sets Id
/// </summary>
[DataMember(Name="id", EmitDefaultValue=false)]
public long? Id { get; set; }
public long Id { get; set; }
/// <summary>
/// Gets or Sets Category

View File

@@ -36,7 +36,7 @@ namespace Org.OpenAPITools.Model
/// Initializes a new instance of the <see cref="Return" /> class.
/// </summary>
/// <param name="_return">_return.</param>
public Return(int? _return = default(int?))
public Return(int _return = default(int))
{
this._Return = _return;
}
@@ -45,7 +45,7 @@ namespace Org.OpenAPITools.Model
/// Gets or Sets _Return
/// </summary>
[DataMember(Name="return", EmitDefaultValue=false)]
public int? _Return { get; set; }
public int _Return { get; set; }
/// <summary>
/// Returns the string presentation of the object

View File

@@ -36,7 +36,7 @@ namespace Org.OpenAPITools.Model
/// Initializes a new instance of the <see cref="SpecialModelName" /> class.
/// </summary>
/// <param name="specialPropertyName">specialPropertyName.</param>
public SpecialModelName(long? specialPropertyName = default(long?))
public SpecialModelName(long specialPropertyName = default(long))
{
this.SpecialPropertyName = specialPropertyName;
}
@@ -45,7 +45,7 @@ namespace Org.OpenAPITools.Model
/// Gets or Sets SpecialPropertyName
/// </summary>
[DataMember(Name="$special[property.name]", EmitDefaultValue=false)]
public long? SpecialPropertyName { get; set; }
public long SpecialPropertyName { get; set; }
/// <summary>
/// Returns the string presentation of the object

View File

@@ -37,7 +37,7 @@ namespace Org.OpenAPITools.Model
/// </summary>
/// <param name="id">id.</param>
/// <param name="name">name.</param>
public Tag(long? id = default(long?), string name = default(string))
public Tag(long id = default(long), string name = default(string))
{
this.Id = id;
this.Name = name;
@@ -47,7 +47,7 @@ namespace Org.OpenAPITools.Model
/// Gets or Sets Id
/// </summary>
[DataMember(Name="id", EmitDefaultValue=false)]
public long? Id { get; set; }
public long Id { get; set; }
/// <summary>
/// Gets or Sets Name

View File

@@ -43,7 +43,7 @@ namespace Org.OpenAPITools.Model
/// <param name="password">password.</param>
/// <param name="phone">phone.</param>
/// <param name="userStatus">User Status.</param>
public User(long? id = default(long?), string username = default(string), string firstName = default(string), string lastName = default(string), string email = default(string), string password = default(string), string phone = default(string), int? userStatus = default(int?))
public User(long id = default(long), string username = default(string), string firstName = default(string), string lastName = default(string), string email = default(string), string password = default(string), string phone = default(string), int userStatus = default(int))
{
this.Id = id;
this.Username = username;
@@ -59,7 +59,7 @@ namespace Org.OpenAPITools.Model
/// Gets or Sets Id
/// </summary>
[DataMember(Name="id", EmitDefaultValue=false)]
public long? Id { get; set; }
public long Id { get; set; }
/// <summary>
/// Gets or Sets Username
@@ -102,7 +102,7 @@ namespace Org.OpenAPITools.Model
/// </summary>
/// <value>User Status</value>
[DataMember(Name="userStatus", EmitDefaultValue=false)]
public int? UserStatus { get; set; }
public int UserStatus { get; set; }
/// <summary>
/// Returns the string presentation of the object

View File

@@ -116,7 +116,7 @@
</dependencies>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<openapi-generator-version>4.0.0-SNAPSHOT</openapi-generator-version>
<openapi-generator-version>4.0.0-beta</openapi-generator-version>
<maven-plugin-version>1.0.0</maven-plugin-version>
<junit-version>4.8.1</junit-version>
</properties>