diff --git a/appveyor.yml b/appveyor.yml
index d3c02aa19f1..0da5ff07a0c 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -32,7 +32,7 @@ install:
- git clone https://github.com/wing328/swagger-samples
- ps: Start-Process -FilePath 'C:\maven\apache-maven-3.2.5\bin\mvn' -ArgumentList 'jetty:run' -WorkingDirectory "$env:appveyor_build_folder\swagger-samples\java\java-jersey-jaxrs-ci"
- ps: $PSVersionTable.PSVersion
- - ps: Install-Module Pester -Force -Scope CurrentUser -RequiredVersion 4.3.1
+ - ps: Install-Module Pester -Force -Scope CurrentUser
build_script:
- dotnet --info
# build C# API client (netcore)
diff --git a/docs/generators/go-experimental.md b/docs/generators/go-experimental.md
index d5298fd44f1..5866c95004e 100644
--- a/docs/generators/go-experimental.md
+++ b/docs/generators/go-experimental.md
@@ -12,6 +12,7 @@ sidebar_label: go-experimental
|packageVersion|Go package version.| |1.0.0|
|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false|
|structPrefix|whether to prefix struct with the class name. e.g. DeletePetOpts => PetApiDeletePetOpts| |false|
+|useOneOfDiscriminatorLookup|Use the discriminator's mapping in oneOf to speed up the model lookup. IMPORTANT: Validation (e.g. one and onlye one match in oneOf's schemas) will be skipped.| |false|
|withAWSV4Signature|whether to include AWS v4 signature support| |false|
|withGoCodegenComment|whether to include Go codegen comment to disable Go Lint and collapse by default in GitHub PRs and diffs| |false|
|withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false|
diff --git a/docs/generators/powershell.md b/docs/generators/powershell.md
index 2ce5aad8675..2b16a319698 100644
--- a/docs/generators/powershell.md
+++ b/docs/generators/powershell.md
@@ -11,6 +11,7 @@ sidebar_label: powershell
|packageName|Client package name (e.g. PSTwitter).| |PSOpenAPITools|
|packageVersion|Package version (e.g. 0.1.2).| |0.1.2|
|powershellGalleryUrl|URL to the module in PowerShell Gallery (e.g. https://www.powershellgallery.com/packages/PSTwitter/).| |null|
+|useOneOfDiscriminatorLookup|Use the discriminator's mapping in oneOf to speed up the model lookup. IMPORTANT: Validation (e.g. one and onlye one match in oneOf's schemas) will be skipped.| |null|
## IMPORT MAPPING
diff --git a/docs/installation.md b/docs/installation.md
index f3015d1e7a1..697764a1470 100644
--- a/docs/installation.md
+++ b/docs/installation.md
@@ -33,7 +33,7 @@ npm install @openapitools/openapi-generator-cli -D
Then, **generate** a ruby client from a valid [petstore.yaml](https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/2_0/petstore.yaml) doc:
```bash
-npx openapi-generator generate -i petstore.yaml -g ruby -o /tmp/test/
+npx @openapitools/openapi-generator-cli generate -i petstore.yaml -g ruby -o /tmp/test/
```
> `npx` will execute a globally available `openapi-generator`, and if not found it will fall back to project-local commands. The result is that the above command will work regardless of which installation method you've chosen.
diff --git a/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/Generate.java b/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/Generate.java
index b7f989eeaac..3387a404748 100644
--- a/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/Generate.java
+++ b/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/Generate.java
@@ -230,7 +230,7 @@ public class Generate extends OpenApiGeneratorCommand {
@Option(name = {"--log-to-stderr"},
title = "Log to STDERR",
description = "write all log messages (not just errors) to STDOUT."
- + " Useful for piping the JSON output of debug options (e.g. `-DdebugOperations`) to an external parser directly while testing a generator.")
+ + " Useful for piping the JSON output of debug options (e.g. `--global-property debugOperations`) to an external parser directly while testing a generator.")
private Boolean logToStderr;
@Option(name = {"--enable-post-process-file"}, title = "enable post-process file", description = CodegenConstants.ENABLE_POST_PROCESS_FILE_DESC)
@@ -407,7 +407,6 @@ public class Generate extends OpenApiGeneratorCommand {
}
if (globalProperties != null && !globalProperties.isEmpty()) {
- System.err.println("[DEPRECATED] -D arguments after 'generate' are application arguments and not Java System Properties, please consider changing to --global-property, apply your system properties to JAVA_OPTS, or move the -D arguments before the jar option.");
applyGlobalPropertiesKvpList(globalProperties, configurator);
}
applyInstantiationTypesKvpList(instantiationTypes, configurator);
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenConstants.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenConstants.java
index fded4a05766..0fcb5199840 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenConstants.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenConstants.java
@@ -375,4 +375,6 @@ public class CodegenConstants {
" 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed." +
"Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.";
+ public static final String USE_ONEOF_DISCRIMINATOR_LOOKUP = "useOneOfDiscriminatorLookup";
+ public static final String USE_ONEOF_DISCRIMINATOR_LOOKUP_DESC = "Use the discriminator's mapping in oneOf to speed up the model lookup. IMPORTANT: Validation (e.g. one and onlye one match in oneOf's schemas) will be skipped.";
}
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractGoCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractGoCodegen.java
index 262ecaad0e2..762f75e35d2 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractGoCodegen.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractGoCodegen.java
@@ -29,7 +29,6 @@ import org.slf4j.LoggerFactory;
import java.io.File;
import java.util.*;
-import static org.openapitools.codegen.utils.OnceLogger.once;
import static org.openapitools.codegen.utils.StringUtils.camelize;
import static org.openapitools.codegen.utils.StringUtils.underscore;
@@ -94,7 +93,7 @@ public abstract class AbstractGoCodegen extends DefaultCodegen implements Codege
"byte",
"map[string]interface{}",
"interface{}"
- )
+ )
);
instantiationTypes.clear();
@@ -210,6 +209,11 @@ public abstract class AbstractGoCodegen extends DefaultCodegen implements Codege
if (name.matches("^\\d.*"))
name = "Var" + name;
+ if ("AdditionalProperties".equals(name)) {
+ // AdditionalProperties is a reserved field (additionalProperties: true), use AdditionalPropertiesField instead
+ return "AdditionalPropertiesField";
+ }
+
return name;
}
@@ -320,7 +324,7 @@ public abstract class AbstractGoCodegen extends DefaultCodegen implements Codege
/**
* Return the golang implementation type for the specified property.
- *
+ *
* @param p the OAS property.
* @return the golang implementation type.
*/
@@ -378,7 +382,7 @@ public abstract class AbstractGoCodegen extends DefaultCodegen implements Codege
/**
* Return the OpenAPI type for the property.
- *
+ *
* @param p the OAS property.
* @return the OpenAPI type.
*/
@@ -404,20 +408,19 @@ public abstract class AbstractGoCodegen extends DefaultCodegen implements Codege
/**
* Determines the golang instantiation type of the specified schema.
- *
+ *
* This function is called when the input schema is a map, and specifically
* when the 'additionalProperties' attribute is present in the OAS specification.
* Codegen invokes this function to resolve the "parent" association to
* 'additionalProperties'.
- *
+ *
* Note the 'parent' attribute in the codegen model is used in the following scenarios:
* - Indicate a polymorphic association with some other type (e.g. class inheritance).
* - If the specification has a discriminator, cogegen create a “parent” based on the discriminator.
* - Use of the 'additionalProperties' attribute in the OAS specification.
- * This is the specific scenario when codegen invokes this function.
+ * This is the specific scenario when codegen invokes this function.
*
* @param property the input schema
- *
* @return the golang instantiation type of the specified property.
*/
@Override
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppUE4ClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppUE4ClientCodegen.java
index 064b5282f62..dd71b9008f7 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppUE4ClientCodegen.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppUE4ClientCodegen.java
@@ -497,13 +497,20 @@ public class CppUE4ClientCodegen extends AbstractCppCodegen {
name = name.toLowerCase(Locale.ROOT);
}
+ //Unreal variable names are CamelCase
+ String camelCaseName = camelize(name, false);
+
+ //Avoid empty variable name at all costs
+ if(!camelCaseName.isEmpty()) {
+ name = camelCaseName;
+ }
+
// for reserved word or word starting with number, append _
if (isReservedWord(name) || name.matches("^\\d.*")) {
name = escapeReservedWord(name);
}
-
- //Unreal variable names are CamelCase
- return camelize(name, false);
+
+ return name;
}
@Override
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GoClientExperimentalCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GoClientExperimentalCodegen.java
index a72d18959b1..b9e9fbedbec 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GoClientExperimentalCodegen.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GoClientExperimentalCodegen.java
@@ -35,6 +35,7 @@ public class GoClientExperimentalCodegen extends GoClientCodegen {
private static final Logger LOGGER = LoggerFactory.getLogger(GoClientExperimentalCodegen.class);
protected String goImportAlias = "openapiclient";
+ protected boolean useOneOfDiscriminatorLookup = false; // use oneOf discriminator's mapping for model lookup
public GoClientExperimentalCodegen() {
super();
@@ -44,6 +45,8 @@ public class GoClientExperimentalCodegen extends GoClientCodegen {
usesOptionals = false;
generatorMetadata = GeneratorMetadata.newBuilder(generatorMetadata).stability(Stability.EXPERIMENTAL).build();
+
+ cliOptions.add(new CliOption(CodegenConstants.USE_ONEOF_DISCRIMINATOR_LOOKUP, CodegenConstants.USE_ONEOF_DISCRIMINATOR_LOOKUP_DESC).defaultValue("false"));
}
/**
@@ -93,6 +96,20 @@ public class GoClientExperimentalCodegen extends GoClientCodegen {
additionalProperties.put("goImportAlias", goImportAlias);
}
+ if (additionalProperties.containsKey(CodegenConstants.USE_ONEOF_DISCRIMINATOR_LOOKUP)) {
+ setUseOneOfDiscriminatorLookup(convertPropertyToBooleanAndWriteBack(CodegenConstants.USE_ONEOF_DISCRIMINATOR_LOOKUP));
+ } else {
+ additionalProperties.put(CodegenConstants.USE_ONEOF_DISCRIMINATOR_LOOKUP, useOneOfDiscriminatorLookup);
+ }
+
+ }
+
+ public void setUseOneOfDiscriminatorLookup(boolean useOneOfDiscriminatorLookup) {
+ this.useOneOfDiscriminatorLookup = useOneOfDiscriminatorLookup;
+ }
+
+ public boolean getUseOneOfDiscriminatorLookup() {
+ return this.useOneOfDiscriminatorLookup;
}
public void setGoImportAlias(String goImportAlias) {
@@ -205,9 +222,12 @@ public class GoClientExperimentalCodegen extends GoClientCodegen {
if (model.anyOf != null && !model.anyOf.isEmpty()) {
imports.add(createMapping("import", "fmt"));
}
+
+ // add x-additional-properties
+ if ("map[string]map[string]interface{}".equals(model.parent)) {
+ model.vendorExtensions.put("x-additional-properties", true);
+ }
}
-
-
}
return objs;
}
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PowerShellClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PowerShellClientCodegen.java
index e81406fcbbf..d3e519a9a7f 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PowerShellClientCodegen.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PowerShellClientCodegen.java
@@ -53,6 +53,7 @@ public class PowerShellClientCodegen extends DefaultCodegen implements CodegenCo
protected HashSet powershellVerbs;
protected Map commonVerbs; // verbs not in the official ps verb list but can be mapped to one of the verbs
protected HashSet methodNames; // store a list of method names to detect duplicates
+ protected boolean useOneOfDiscriminatorLookup = false; // use oneOf discriminator's mapping for model lookup
/**
* Constructs an instance of `PowerShellClientCodegen`.
@@ -498,7 +499,7 @@ public class PowerShellClientCodegen extends DefaultCodegen implements CodegenCo
cliOptions.add(new CliOption(CodegenConstants.OPTIONAL_PROJECT_GUID, "GUID for PowerShell module (e.g. a27b908d-2a20-467f-bc32-af6f3a654ac5). A random GUID will be generated by default."));
cliOptions.add(new CliOption(CodegenConstants.API_NAME_PREFIX, "Prefix that will be appended to all PS objects. Default: empty string. e.g. Pet => PSPet."));
cliOptions.add(new CliOption("commonVerbs", "PS common verb mappings. e.g. Delete=Remove:Patch=Update to map Delete with Remove and Patch with Update accordingly."));
-
+ cliOptions.add(new CliOption(CodegenConstants.USE_ONEOF_DISCRIMINATOR_LOOKUP, CodegenConstants.USE_ONEOF_DISCRIMINATOR_LOOKUP_DESC));
}
public CodegenType getTag() {
@@ -535,6 +536,14 @@ public class PowerShellClientCodegen extends DefaultCodegen implements CodegenCo
this.powershellGalleryUrl = powershellGalleryUrl;
}
+ public void setUseOneOfDiscriminatorLookup(boolean useOneOfDiscriminatorLookup) {
+ this.useOneOfDiscriminatorLookup = useOneOfDiscriminatorLookup;
+ }
+
+ public boolean getUseOneOfDiscriminatorLookup() {
+ return this.useOneOfDiscriminatorLookup;
+ }
+
@Override
public void processOpts() {
super.processOpts();
@@ -550,6 +559,12 @@ public class PowerShellClientCodegen extends DefaultCodegen implements CodegenCo
additionalProperties.put("powershellGalleryUrl", powershellGalleryUrl);
}
+ if (additionalProperties.containsKey(CodegenConstants.USE_ONEOF_DISCRIMINATOR_LOOKUP)) {
+ setUseOneOfDiscriminatorLookup(convertPropertyToBooleanAndWriteBack(CodegenConstants.USE_ONEOF_DISCRIMINATOR_LOOKUP));
+ } else {
+ additionalProperties.put(CodegenConstants.USE_ONEOF_DISCRIMINATOR_LOOKUP, useOneOfDiscriminatorLookup);
+ }
+
if (StringUtils.isNotBlank(powershellGalleryUrl)) {
// get the last segment of the URL
// e.g. https://www.powershellgallery.com/packages/PSTwitter => PSTwitter
@@ -907,6 +922,31 @@ public class PowerShellClientCodegen extends DefaultCodegen implements CodegenCo
model.anyOf.remove("ModelNull");
}
+ // add vendor extension for additonalProperties: true
+ if ("null".equals(model.parent)) {
+ model.vendorExtensions.put("x-additional-properties", true);
+ }
+
+ // automatically create discriminator mapping for oneOf/anyOf if not present
+ if (((model.oneOf != null && !model.oneOf.isEmpty()) || (model.anyOf != null && !model.anyOf.isEmpty())) &&
+ model.discriminator != null && model.discriminator.getMapping() == null) {
+ // create mappedModels
+ Set schemas = new HashSet<>();
+ if (model.oneOf != null && !model.oneOf.isEmpty()) {
+ schemas = model.oneOf;
+ } else if (model.anyOf != null && !model.anyOf.isEmpty()) {
+ schemas = model.anyOf;
+ }
+
+ HashSet mappedModels = new HashSet<>();
+
+ for (String s: schemas) {
+ mappedModels.add(new CodegenDiscriminator.MappedModel(s, s));
+ }
+
+ model.discriminator.setMappedModels(mappedModels);
+
+ }
}
return objs;
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientCodegen.java
index 5c0df0ab817..dffc0c62a19 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientCodegen.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientCodegen.java
@@ -722,7 +722,7 @@ public class PythonClientCodegen extends DefaultCodegen implements CodegenConfig
}
// correct "'"s into "'"s after toString()
- if (ModelUtils.isStringSchema(schema) && schema.getDefault() != null) {
+ if (ModelUtils.isStringSchema(schema) && schema.getDefault() != null && !ModelUtils.isDateSchema(schema) && !ModelUtils.isDateTimeSchema(schema)) {
example = (String) schema.getDefault();
}
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientExperimentalCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientExperimentalCodegen.java
index 38496001238..e5adf04afdf 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientExperimentalCodegen.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientExperimentalCodegen.java
@@ -38,8 +38,9 @@ import org.openapitools.codegen.meta.Stability;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import java.text.DateFormat;
-import java.text.SimpleDateFormat;
+import java.time.OffsetDateTime;
+import java.time.ZoneOffset;
+import java.time.format.DateTimeFormatter;
import java.io.File;
import java.util.*;
import java.util.regex.Pattern;
@@ -196,15 +197,15 @@ public class PythonClientExperimentalCodegen extends PythonClientCodegen {
return "python-experimental";
}
- public String dateToString(Schema p, Date date, DateFormat dateFormatter, DateFormat dateTimeFormatter) {
+ public String dateToString(Schema p, OffsetDateTime date, DateTimeFormatter dateFormatter, DateTimeFormatter dateTimeFormatter) {
// converts a date into a date or date-time python string
if (!(ModelUtils.isDateSchema(p) || ModelUtils.isDateTimeSchema(p))) {
throw new RuntimeException("passed schema must be of type Date or DateTime");
}
if (ModelUtils.isDateSchema(p)) {
- return "dateutil_parser('" + dateFormatter.format(date) + "').date()";
+ return "dateutil_parser('" + date.format(dateFormatter) + "').date()";
}
- return "dateutil_parser('" + dateTimeFormatter.format(date) + "')";
+ return "dateutil_parser('" + date.format(dateTimeFormatter) + "')";
}
/**
@@ -228,20 +229,17 @@ public class PythonClientExperimentalCodegen extends PythonClientCodegen {
}
// convert datetime and date enums if they exist
- DateFormat iso8601Date = new SimpleDateFormat("yyyy-MM-dd", Locale.ROOT);
- DateFormat iso8601DateTime = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSXXX", Locale.ROOT);
- TimeZone utc = TimeZone.getTimeZone("UTC");
- iso8601Date.setTimeZone(utc);
- iso8601DateTime.setTimeZone(utc);
+ DateTimeFormatter iso8601Date = DateTimeFormatter.ISO_DATE;
+ DateTimeFormatter iso8601DateTime = DateTimeFormatter.ISO_DATE_TIME;
if (ModelUtils.isDateSchema(p) || ModelUtils.isDateTimeSchema(p)) {
List currentEnum = p.getEnum();
List fixedEnum = new ArrayList();
String fixedValue = null;
- Date date = null;
+ OffsetDateTime date = null;
if (currentEnum != null && !currentEnum.isEmpty()) {
for (Object enumItem : currentEnum) {
- date = (Date) enumItem;
+ date = (OffsetDateTime) enumItem;
fixedValue = dateToString(p, date, iso8601Date, iso8601DateTime);
fixedEnum.add(fixedValue);
}
@@ -251,15 +249,21 @@ public class PythonClientExperimentalCodegen extends PythonClientCodegen {
// convert the example if it exists
Object currentExample = p.getExample();
if (currentExample != null) {
- date = (Date) currentExample;
+ try {
+ date = (OffsetDateTime) currentExample;
+ } catch (ClassCastException e) {
+ date = ((Date) currentExample).toInstant().atOffset(ZoneOffset.UTC);
+ LOGGER.warn("Invalid `date-time` format for value {}", currentExample);
+ }
fixedValue = dateToString(p, date, iso8601Date, iso8601DateTime);
fixedEnum.add(fixedValue);
p.setExample(fixedValue);
+ LOGGER.warn(fixedValue);
}
// fix defaultObject
if (defaultObject != null) {
- date = (Date) defaultObject;
+ date = (OffsetDateTime) defaultObject;
fixedValue = dateToString(p, date, iso8601Date, iso8601DateTime);
p.setDefault(fixedValue);
defaultObject = fixedValue;
@@ -377,7 +381,7 @@ public class PythonClientExperimentalCodegen extends PythonClientCodegen {
/**
* Override with special post-processing for all models.
- */
+ */
@SuppressWarnings({"static-method", "unchecked"})
public Map postProcessAllModels(Map objs) {
// loop through all models and delete ones where type!=object and the model has no validations and enums
@@ -417,14 +421,12 @@ public class PythonClientExperimentalCodegen extends PythonClientCodegen {
Schema modelSchema = ModelUtils.getSchema(this.openAPI, cm.name);
CodegenProperty modelProperty = fromProperty("value", modelSchema);
+
if (cm.isEnum || cm.isAlias) {
- if (!modelProperty.isEnum && !modelProperty.hasValidation) {
+ if (!modelProperty.isEnum && !modelProperty.hasValidation && !cm.isArrayModel) {
// remove these models because they are aliases and do not have any enums or validations
modelSchemasToRemove.put(cm.name, modelSchema);
}
- } else if (cm.isArrayModel && !modelProperty.isEnum && !modelProperty.hasValidation) {
- // remove any ArrayModels which lack validation and enums
- modelSchemasToRemove.put(cm.name, modelSchema);
}
}
}
@@ -825,10 +827,10 @@ public class PythonClientExperimentalCodegen extends PythonClientCodegen {
result.unescapedDescription = simpleModelName(name);
// make non-object type models have one property so we can use it to store enums and validations
- if (result.isAlias || result.isEnum) {
+ if (result.isAlias || result.isEnum || result.isArrayModel) {
Schema modelSchema = ModelUtils.getSchema(this.openAPI, result.name);
CodegenProperty modelProperty = fromProperty("value", modelSchema);
- if (modelProperty.isEnum == true || modelProperty.hasValidation == true) {
+ if (modelProperty.isEnum == true || modelProperty.hasValidation == true || result.isArrayModel) {
// these models are non-object models with enums and/or validations
// add a single property to the model so we can have a way to access validations
result.isAlias = true;
@@ -843,7 +845,6 @@ public class PythonClientExperimentalCodegen extends PythonClientCodegen {
postProcessModelProperty(result, prop);
}
}
-
}
}
@@ -905,7 +906,7 @@ public class PythonClientExperimentalCodegen extends PythonClientCodegen {
* Primitive types in the OAS specification are implemented in Python using the corresponding
* Python primitive types.
* Composed types (e.g. allAll, oneOf, anyOf) are represented in Python using list of types.
- *
+ *
* The caller should set the prefix and suffix arguments to empty string, except when
* getTypeString invokes itself recursively. A non-empty prefix/suffix may be specified
* to wrap the return value in a python dict, list or tuple.
@@ -913,7 +914,7 @@ public class PythonClientExperimentalCodegen extends PythonClientCodegen {
* Examples:
* - "bool, date, float" The data must be a bool, date or float.
* - "[bool, date]" The data must be an array, and the array items must be a bool or date.
- *
+ *
* @param p The OAS schema.
* @param prefix prepended to the returned value.
* @param suffix appended to the returned value.
@@ -922,7 +923,6 @@ public class PythonClientExperimentalCodegen extends PythonClientCodegen {
* @return a comma-separated string representation of the Python types
*/
private String getTypeString(Schema p, String prefix, String suffix, List referencedModelNames) {
- // this is used to set dataType, which defines a python tuple of classes
String fullSuffix = suffix;
if (")".equals(suffix)) {
fullSuffix = "," + suffix;
@@ -968,7 +968,7 @@ public class PythonClientExperimentalCodegen extends PythonClientCodegen {
} else {
return prefix + getTypeString(inner, "[", "]", referencedModelNames) + fullSuffix;
}
- }
+ }
if (ModelUtils.isFileSchema(p)) {
return prefix + "file_type" + fullSuffix;
}
diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-cloud/clientConfiguration.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-cloud/clientConfiguration.mustache
index c1feeb51599..3d0ccc7d2c5 100644
--- a/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-cloud/clientConfiguration.mustache
+++ b/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-cloud/clientConfiguration.mustache
@@ -23,6 +23,7 @@ import org.springframework.context.annotation.Configuration;
{{#isOAuth}}
import org.springframework.cloud.security.oauth2.client.feign.OAuth2FeignRequestInterceptor;
import org.springframework.security.oauth2.client.DefaultOAuth2ClientContext;
+import org.springframework.security.oauth2.client.OAuth2ClientContext;
{{#isApplication}}
import org.springframework.security.oauth2.client.token.grant.client.ClientCredentialsResourceDetails;
{{/isApplication}}
@@ -71,8 +72,14 @@ public class ClientConfiguration {
{{#isOAuth}}
@Bean
@ConditionalOnProperty("{{#lambda.lowercase}}{{{title}}}{{/lambda.lowercase}}.security.{{{name}}}.client-id")
- public OAuth2FeignRequestInterceptor {{{name}}}RequestInterceptor() {
- return new OAuth2FeignRequestInterceptor(new DefaultOAuth2ClientContext(), {{{name}}}ResourceDetails());
+ public OAuth2FeignRequestInterceptor {{{name}}}RequestInterceptor(OAuth2ClientContext oAuth2ClientContext) {
+ return new OAuth2FeignRequestInterceptor(oAuth2ClientContext, {{{name}}}ResourceDetails());
+ }
+
+ @Bean
+ @ConditionalOnProperty("{{#lambda.lowercase}}{{{title}}}{{/lambda.lowercase}}.security.{{{name}}}.client-id")
+ public OAuth2ClientContext oAuth2ClientContext() {
+ return new DefaultOAuth2ClientContext();
}
{{#isCode}}
diff --git a/modules/openapi-generator/src/main/resources/cpp-ue4/Build.cs.mustache b/modules/openapi-generator/src/main/resources/cpp-ue4/Build.cs.mustache
index a6fe9bd84ec..9b33c5d3d57 100644
--- a/modules/openapi-generator/src/main/resources/cpp-ue4/Build.cs.mustache
+++ b/modules/openapi-generator/src/main/resources/cpp-ue4/Build.cs.mustache
@@ -15,5 +15,6 @@ public class {{unrealModuleName}} : ModuleRules
"Json",
}
);
+ PCHUsage = PCHUsageMode.NoPCHs;
}
}
\ No newline at end of file
diff --git a/modules/openapi-generator/src/main/resources/cpp-ue4/api-operations-header.mustache b/modules/openapi-generator/src/main/resources/cpp-ue4/api-operations-header.mustache
index 1486ef60e2c..bd168101e38 100644
--- a/modules/openapi-generator/src/main/resources/cpp-ue4/api-operations-header.mustache
+++ b/modules/openapi-generator/src/main/resources/cpp-ue4/api-operations-header.mustache
@@ -52,7 +52,7 @@ public:
{{#responses.0}}
void SetHttpResponseCode(EHttpResponseCodes::Type InHttpResponseCode) final;
{{/responses.0}}
- bool FromJson(const TSharedPtr& JsonObject) final;
+ bool FromJson(const TSharedPtr& JsonValue) final;
{{#returnType}}{{{returnType}}} Content;{{/returnType}}
};
diff --git a/modules/openapi-generator/src/main/resources/cpp-ue4/helpers-header.mustache b/modules/openapi-generator/src/main/resources/cpp-ue4/helpers-header.mustache
index adbff0c0e88..1750a6f8e95 100644
--- a/modules/openapi-generator/src/main/resources/cpp-ue4/helpers-header.mustache
+++ b/modules/openapi-generator/src/main/resources/cpp-ue4/helpers-header.mustache
@@ -6,6 +6,7 @@
#include "Serialization/JsonSerializer.h"
#include "Dom/JsonObject.h"
#include "Misc/Base64.h"
+#include "PlatformHttp.h"
class IHttpRequest;
@@ -196,10 +197,22 @@ inline FString CollectionToUrlString_multi(const TArray& Collection, const TC
//////////////////////////////////////////////////////////////////////////
-template::value, int>::type = 0>
-inline void WriteJsonValue(JsonWriter& Writer, const T& Value)
+inline void WriteJsonValue(JsonWriter& Writer, const TSharedPtr& Value)
{
- Writer->WriteValue(Value);
+ if (Value.IsValid())
+ {
+ FJsonSerializer::Serialize(Value.ToSharedRef(), Writer, false);
+ }
+ else
+ {
+ Writer->WriteObjectStart();
+ Writer->WriteObjectEnd();
+ }
+}
+
+inline void WriteJsonValue(JsonWriter& Writer, const TArray& Value)
+{
+ Writer->WriteValue(ToString(Value));
}
inline void WriteJsonValue(JsonWriter& Writer, const FDateTime& Value)
@@ -212,6 +225,12 @@ inline void WriteJsonValue(JsonWriter& Writer, const Model& Value)
Value.WriteJson(Writer);
}
+template::value, int>::type = 0>
+inline void WriteJsonValue(JsonWriter& Writer, const T& Value)
+{
+ Writer->WriteValue(Value);
+}
+
template
inline void WriteJsonValue(JsonWriter& Writer, const TArray& Value)
{
@@ -235,54 +254,8 @@ inline void WriteJsonValue(JsonWriter& Writer, const TMap& Value)
Writer->WriteObjectEnd();
}
-inline void WriteJsonValue(JsonWriter& Writer, const TSharedPtr& Value)
-{
- if (Value.IsValid())
- {
- FJsonSerializer::Serialize(Value.ToSharedRef(), Writer, false);
- }
- else
- {
- Writer->WriteObjectStart();
- Writer->WriteObjectEnd();
- }
-}
-
-inline void WriteJsonValue(JsonWriter& Writer, const TArray& Value)
-{
- Writer->WriteValue(ToString(Value));
-}
-
//////////////////////////////////////////////////////////////////////////
-template
-inline bool TryGetJsonValue(const TSharedPtr& JsonObject, const FString& Key, T& Value)
-{
- const TSharedPtr JsonValue = JsonObject->TryGetField(Key);
- if (JsonValue.IsValid() && !JsonValue->IsNull())
- {
- return TryGetJsonValue(JsonValue, Value);
- }
- return false;
-}
-
-template
-inline bool TryGetJsonValue(const TSharedPtr& JsonObject, const FString& Key, TOptional& OptionalValue)
-{
- if(JsonObject->HasField(Key))
- {
- T Value;
- if (TryGetJsonValue(JsonObject, Key, Value))
- {
- OptionalValue = Value;
- return true;
- }
- else
- return false;
- }
- return true; // Absence of optional value is not a parsing error
-}
-
inline bool TryGetJsonValue(const TSharedPtr& JsonValue, FString& Value)
{
FString TmpValue;
@@ -316,6 +289,34 @@ inline bool TryGetJsonValue(const TSharedPtr& JsonValue, bool& Value
return false;
}
+inline bool TryGetJsonValue(const TSharedPtr& JsonValue, TSharedPtr& JsonObjectValue)
+{
+ const TSharedPtr* Object;
+ if (JsonValue->TryGetObject(Object))
+ {
+ JsonObjectValue = *Object;
+ return true;
+ }
+ return false;
+}
+
+inline bool TryGetJsonValue(const TSharedPtr& JsonValue, TArray& Value)
+{
+ FString TmpValue;
+ if (JsonValue->TryGetString(TmpValue))
+ {
+ Base64UrlDecode(TmpValue, Value);
+ return true;
+ }
+ else
+ return false;
+}
+
+inline bool TryGetJsonValue(const TSharedPtr& JsonValue, Model& Value)
+{
+ return Value.FromJson(JsonValue);
+}
+
template::value, int>::type = 0>
inline bool TryGetJsonValue(const TSharedPtr& JsonValue, T& Value)
{
@@ -329,15 +330,6 @@ inline bool TryGetJsonValue(const TSharedPtr& JsonValue, T& Value)
return false;
}
-inline bool TryGetJsonValue(const TSharedPtr& JsonValue, Model& Value)
-{
- const TSharedPtr* Object;
- if (JsonValue->TryGetObject(Object))
- return Value.FromJson(*Object);
- else
- return false;
-}
-
template
inline bool TryGetJsonValue(const TSharedPtr& JsonValue, TArray& ArrayValue)
{
@@ -377,27 +369,32 @@ inline bool TryGetJsonValue(const TSharedPtr& JsonValue, TMap& JsonValue, TSharedPtr& JsonObjectValue)
+template
+inline bool TryGetJsonValue(const TSharedPtr& JsonObject, const FString& Key, T& Value)
{
- const TSharedPtr* Object;
- if (JsonValue->TryGetObject(Object))
+ const TSharedPtr JsonValue = JsonObject->TryGetField(Key);
+ if (JsonValue.IsValid() && !JsonValue->IsNull())
{
- JsonObjectValue = *Object;
- return true;
+ return TryGetJsonValue(JsonValue, Value);
}
return false;
}
-inline bool TryGetJsonValue(const TSharedPtr& JsonValue, TArray& Value)
+template
+inline bool TryGetJsonValue(const TSharedPtr& JsonObject, const FString& Key, TOptional& OptionalValue)
{
- FString TmpValue;
- if (JsonValue->TryGetString(TmpValue))
+ if(JsonObject->HasField(Key))
{
- Base64UrlDecode(TmpValue, Value);
- return true;
+ T Value;
+ if (TryGetJsonValue(JsonObject, Key, Value))
+ {
+ OptionalValue = Value;
+ return true;
+ }
+ else
+ return false;
}
- else
- return false;
+ return true; // Absence of optional value is not a parsing error
}
{{#cppNamespaceDeclarations}}
diff --git a/modules/openapi-generator/src/main/resources/cpp-ue4/helpers-source.mustache b/modules/openapi-generator/src/main/resources/cpp-ue4/helpers-source.mustache
index 1ae8bad54c6..ea97911bbd9 100644
--- a/modules/openapi-generator/src/main/resources/cpp-ue4/helpers-source.mustache
+++ b/modules/openapi-generator/src/main/resources/cpp-ue4/helpers-source.mustache
@@ -6,6 +6,7 @@
#include "Interfaces/IHttpRequest.h"
#include "PlatformHttp.h"
#include "Misc/FileHelper.h"
+#include "Misc/Paths.h"
{{#cppNamespaceDeclarations}}
namespace {{this}}
diff --git a/modules/openapi-generator/src/main/resources/cpp-ue4/model-base-header.mustache b/modules/openapi-generator/src/main/resources/cpp-ue4/model-base-header.mustache
index 67280bde989..94edaaf4327 100644
--- a/modules/openapi-generator/src/main/resources/cpp-ue4/model-base-header.mustache
+++ b/modules/openapi-generator/src/main/resources/cpp-ue4/model-base-header.mustache
@@ -18,7 +18,7 @@ class {{dllapi}} Model
public:
virtual ~Model() {}
virtual void WriteJson(JsonWriter& Writer) const = 0;
- virtual bool FromJson(const TSharedPtr& JsonObject) = 0;
+ virtual bool FromJson(const TSharedPtr& JsonValue) = 0;
};
class {{dllapi}} Request
@@ -33,7 +33,7 @@ class {{dllapi}} Response
{
public:
virtual ~Response() {}
- virtual bool FromJson(const TSharedPtr& JsonObject) = 0;
+ virtual bool FromJson(const TSharedPtr& JsonValue) = 0;
void SetSuccessful(bool InSuccessful) { Successful = InSuccessful; }
bool IsSuccessful() const { return Successful; }
diff --git a/modules/openapi-generator/src/main/resources/cpp-ue4/model-header.mustache b/modules/openapi-generator/src/main/resources/cpp-ue4/model-header.mustache
index 6af8c720f0e..900dcf7f318 100644
--- a/modules/openapi-generator/src/main/resources/cpp-ue4/model-header.mustache
+++ b/modules/openapi-generator/src/main/resources/cpp-ue4/model-header.mustache
@@ -21,9 +21,26 @@ class {{dllapi}} {{classname}} : public Model
{
public:
virtual ~{{classname}}() {}
- bool FromJson(const TSharedPtr& JsonObject) final;
+ bool FromJson(const TSharedPtr& JsonValue) final;
void WriteJson(JsonWriter& Writer) const final;
+ {{#isString}}
+ {{#isEnum}}
+ {{#allowableValues}}
+ enum class Values
+ {
+ {{#enumVars}}
+ {{name}},
+ {{/enumVars}}
+ };
+
+ Values Value{{#defaultValue}} = {{{defaultValue}}}{{/defaultValue}};
+ {{/allowableValues}}
+ {{/isEnum}}
+ {{^isEnum}}
+ FString Value{{#defaultValue}} = {{{defaultValue}}}{{/defaultValue}};
+ {{/isEnum}}
+ {{/isString}}
{{#vars}}
{{#isEnum}}
{{#allowableValues}}
diff --git a/modules/openapi-generator/src/main/resources/cpp-ue4/model-source.mustache b/modules/openapi-generator/src/main/resources/cpp-ue4/model-source.mustache
index 3e9b14788a6..f26df2ec50f 100644
--- a/modules/openapi-generator/src/main/resources/cpp-ue4/model-source.mustache
+++ b/modules/openapi-generator/src/main/resources/cpp-ue4/model-source.mustache
@@ -11,6 +11,54 @@ namespace {{this}}
{
{{/cppNamespaceDeclarations}}
{{#models}}{{#model}}
+{{#isEnum}}
+inline FString ToString(const {{classname}}::Values& Value)
+{
+ {{#allowableValues}}
+ switch (Value)
+ {
+ {{#enumVars}}
+ case {{classname}}::Values::{{name}}:
+ return TEXT({{{value}}});
+ {{/enumVars}}
+ }
+ {{/allowableValues}}
+
+ UE_LOG(Log{{unrealModuleName}}, Error, TEXT("Invalid {{classname}}::Values Value (%d)"), (int)Value);
+ return TEXT("");
+}
+
+inline FStringFormatArg ToStringFormatArg(const {{classname}}::Values& Value)
+{
+ return FStringFormatArg(ToString(Value));
+}
+
+inline void WriteJsonValue(JsonWriter& Writer, const {{classname}}::Values& Value)
+{
+ WriteJsonValue(Writer, ToString(Value));
+}
+
+inline bool TryGetJsonValue(const TSharedPtr& JsonValue, {{classname}}::Values& Value)
+{
+ {{#allowableValues}}
+ FString TmpValue;
+ if (JsonValue->TryGetString(TmpValue))
+ {
+ static TMap StringToEnum = { {{#enumVars}}
+ { TEXT({{{value}}}), {{classname}}::Values::{{name}} },{{/enumVars}} };
+
+ const auto Found = StringToEnum.Find(TmpValue);
+ if(Found)
+ {
+ Value = *Found;
+ return true;
+ }
+ }
+ {{/allowableValues}}
+ return false;
+}
+
+{{/isEnum}}
{{#hasEnums}}
{{#vars}}
{{#isEnum}}
@@ -65,9 +113,10 @@ inline bool TryGetJsonValue(const TSharedPtr& JsonValue, {{classname
{{/hasEnums}}
void {{classname}}::WriteJson(JsonWriter& Writer) const
{
- {{#parent}}
- #error inheritance not handled right now
- {{/parent}}
+ {{#isString}}
+ WriteJsonValue(Writer, Value);
+ {{/isString}}
+ {{^isString}}
Writer->WriteObjectStart();
{{#vars}}
{{#required}}
@@ -81,18 +130,29 @@ void {{classname}}::WriteJson(JsonWriter& Writer) const
{{/required}}
{{/vars}}
Writer->WriteObjectEnd();
+ {{/isString}}
}
-bool {{classname}}::FromJson(const TSharedPtr& JsonObject)
+bool {{classname}}::FromJson(const TSharedPtr& JsonValue)
{
+ {{#isString}}
+ return TryGetJsonValue(JsonValue, Value);
+ {{/isString}}
+ {{^isString}}
+ const TSharedPtr* Object;
+ if (!JsonValue->TryGetObject(Object))
+ return false;
+
bool ParseSuccess = true;
{{#vars}}
- ParseSuccess &= TryGetJsonValue(JsonObject, TEXT("{{baseName}}"), {{name}});
+ ParseSuccess &= TryGetJsonValue(*Object, TEXT("{{baseName}}"), {{name}});
{{/vars}}
return ParseSuccess;
+ {{/isString}}
}
+
{{/model}}
{{/models}}
{{#cppNamespaceDeclarations}}
diff --git a/modules/openapi-generator/src/main/resources/go-experimental/model_anyof.mustache b/modules/openapi-generator/src/main/resources/go-experimental/model_anyof.mustache
index 86cda3bc747..dcf8c9f8df1 100644
--- a/modules/openapi-generator/src/main/resources/go-experimental/model_anyof.mustache
+++ b/modules/openapi-generator/src/main/resources/go-experimental/model_anyof.mustache
@@ -15,6 +15,35 @@ func (dst *{{classname}}) UnmarshalJSON(data []byte) error {
}
{{/isNullable}}
+ {{#discriminator}}
+ {{#mappedModels}}
+ {{#-first}}
+ // use discriminator value to speed up the lookup
+ var jsonDict map[string]interface{}
+ err := json.Unmarshal(data, &jsonDict)
+ if err != nil {
+ return fmt.Errorf("Failed to unmarshal JSON into map for the discrimintor lookup.")
+ }
+
+ {{/-first}}
+ // check if the discriminator value is '{{{mappingName}}}'
+ if jsonDict["{{{propertyBaseName}}}"] == "{{{mappingName}}}" {
+ // try to unmarshal JSON data into {{{modelName}}}
+ err = json.Unmarshal(data, &dst.{{{modelName}}});
+ if err == nil {
+ json{{{modelName}}}, _ := json.Marshal(dst.{{{modelName}}})
+ if string(json{{{modelName}}}) == "{}" { // empty struct
+ dst.{{{modelName}}} = nil
+ } else {
+ return nil // data stored in dst.{{{modelName}}}, return on the first match
+ }
+ } else {
+ dst.{{{modelName}}} = nil
+ }
+ }
+
+ {{/mappedModels}}
+ {{/discriminator}}
{{#anyOf}}
// try to unmarshal JSON data into {{{.}}}
err = json.Unmarshal(data, &dst.{{{.}}});
@@ -44,4 +73,4 @@ func (src *{{classname}}) MarshalJSON() ([]byte, error) {
return nil, nil // no data in anyOf schemas
}
-{{>nullable_model}}
\ No newline at end of file
+{{>nullable_model}}
diff --git a/modules/openapi-generator/src/main/resources/go-experimental/model_oneof.mustache b/modules/openapi-generator/src/main/resources/go-experimental/model_oneof.mustache
index 20cb13d541b..c86af51efb9 100644
--- a/modules/openapi-generator/src/main/resources/go-experimental/model_oneof.mustache
+++ b/modules/openapi-generator/src/main/resources/go-experimental/model_oneof.mustache
@@ -24,9 +24,40 @@ func (dst *{{classname}}) UnmarshalJSON(data []byte) error {
}
{{/isNullable}}
+ {{#useOneOfDiscriminatorLookup}}
+ {{#discriminator}}
+ {{#mappedModels}}
+ {{#-first}}
+ // use discriminator value to speed up the lookup
+ var jsonDict map[string]interface{}
+ err = json.Unmarshal(data, &jsonDict)
+ if err != nil {
+ return fmt.Errorf("Failed to unmarshal JSON into map for the discrimintor lookup.")
+ }
+
+ {{/-first}}
+ // check if the discriminator value is '{{{mappingName}}}'
+ if jsonDict["{{{propertyBaseName}}}"] == "{{{mappingName}}}" {
+ // try to unmarshal JSON data into {{{modelName}}}
+ err = json.Unmarshal(data, &dst.{{{modelName}}})
+ if err == nil {
+ json{{{modelName}}}, _ := json.Marshal(dst.{{{modelName}}})
+ if string(json{{{modelName}}}) == "{}" { // empty struct
+ dst.{{{modelName}}} = nil
+ } else {
+ return nil // data stored in dst.{{{modelName}}}, return on the first match
+ }
+ } else {
+ dst.{{{modelName}}} = nil
+ }
+ }
+
+ {{/mappedModels}}
+ {{/discriminator}}
+ {{/useOneOfDiscriminatorLookup}}
{{#oneOf}}
// try to unmarshal data into {{{.}}}
- err = json.Unmarshal(data, &dst.{{{.}}});
+ err = json.Unmarshal(data, &dst.{{{.}}})
if err == nil {
json{{{.}}}, _ := json.Marshal(dst.{{{.}}})
if string(json{{{.}}}) == "{}" { // empty struct
@@ -76,4 +107,4 @@ func (obj *{{classname}}) GetActualInstance() (interface{}) {
return nil
}
-{{>nullable_model}}
\ No newline at end of file
+{{>nullable_model}}
diff --git a/modules/openapi-generator/src/main/resources/go-experimental/model_simple.mustache b/modules/openapi-generator/src/main/resources/go-experimental/model_simple.mustache
index 1078787c86d..c4d8d5f684f 100644
--- a/modules/openapi-generator/src/main/resources/go-experimental/model_simple.mustache
+++ b/modules/openapi-generator/src/main/resources/go-experimental/model_simple.mustache
@@ -13,8 +13,15 @@ type {{classname}} struct {
{{/description}}
{{name}} {{^required}}{{^isNullable}}*{{/isNullable}}{{/required}}{{{dataType}}} `json:"{{baseName}}{{^required}},omitempty{{/required}}"{{#withXml}} xml:"{{baseName}}{{#isXmlAttribute}},attr{{/isXmlAttribute}}"{{/withXml}}{{#vendorExtensions.x-go-custom-tag}} {{{.}}}{{/vendorExtensions.x-go-custom-tag}}`
{{/vars}}
+{{#vendorExtensions.x-additional-properties}}
+ AdditionalProperties map[string]interface{}
+{{/vendorExtensions.x-additional-properties}}
}
+{{#vendorExtensions.x-additional-properties}}
+type _{{{classname}}} {{{classname}}}
+
+{{/vendorExtensions.x-additional-properties}}
// New{{classname}} instantiates a new {{classname}} object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
@@ -246,7 +253,35 @@ func (o {{classname}}) MarshalJSON() ([]byte, error) {
}
{{/isNullable}}
{{/vars}}
+ {{#vendorExtensions.x-additional-properties}}
+
+ for key, value := range o.AdditionalProperties {
+ toSerialize[key] = value
+ }
+
+ {{/vendorExtensions.x-additional-properties}}
return json.Marshal(toSerialize)
}
-{{>nullable_model}}
\ No newline at end of file
+{{#vendorExtensions.x-additional-properties}}
+func (o *{{{classname}}}) UnmarshalJSON(bytes []byte) (err error) {
+ var{{{classname}}} := _{{{classname}}}{}
+
+ if err = json.Unmarshal(bytes, &var{{{classname}}}); err == nil {
+ *o = {{{classname}}}(var{{{classname}}})
+ }
+
+ additionalProperties := make(map[string]interface{})
+
+ if err = json.Unmarshal(bytes, &additionalProperties); err == nil {
+ {{#vars}}
+ delete(additionalProperties, "{{{baseName}}}")
+ {{/vars}}
+ o.AdditionalProperties = additionalProperties
+ }
+
+ return err
+}
+
+{{/vendorExtensions.x-additional-properties}}
+{{>nullable_model}}
diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/data_class.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/data_class.mustache
index ec0fdf07b2d..e1f5062f2e2 100644
--- a/modules/openapi-generator/src/main/resources/kotlin-client/data_class.mustache
+++ b/modules/openapi-generator/src/main/resources/kotlin-client/data_class.mustache
@@ -48,9 +48,9 @@ import java.io.Serializable
){{/discriminator}}{{#parent}}{{^serializableModel}}{{^parcelizeModels}} : {{{parent}}}{{#isMapModel}}(){{/isMapModel}}{{#isArrayModel}}(){{/isArrayModel}}{{/parcelizeModels}}{{/serializableModel}}{{/parent}}{{#parent}}{{#serializableModel}}{{^parcelizeModels}} : {{{parent}}}{{#isMapModel}}(){{/isMapModel}}{{#isArrayModel}}(){{/isArrayModel}}, Serializable{{/parcelizeModels}}{{/serializableModel}}{{/parent}}{{#parent}}{{^serializableModel}}{{#parcelizeModels}} : {{{parent}}}{{#isMapModel}}(){{/isMapModel}}{{#isArrayModel}}(){{/isArrayModel}}, Parcelable{{/parcelizeModels}}{{/serializableModel}}{{/parent}}{{#parent}}{{#serializableModel}}{{#parcelizeModels}} : {{{parent}}}{{#isMapModel}}(){{/isMapModel}}{{#isArrayModel}}(){{/isArrayModel}}, Serializable, Parcelable{{/parcelizeModels}}{{/serializableModel}}{{/parent}}{{^parent}}{{#serializableModel}}{{^parcelizeModels}} : Serializable{{/parcelizeModels}}{{/serializableModel}}{{/parent}}{{^parent}}{{^serializableModel}}{{#parcelizeModels}} : Parcelable{{/parcelizeModels}}{{/serializableModel}}{{/parent}}{{^parent}}{{#serializableModel}}{{#parcelizeModels}} : Serializable, Parcelable{{/parcelizeModels}}{{/serializableModel}}{{/parent}}{{#vendorExtensions.x-has-data-class-body}} {
{{/vendorExtensions.x-has-data-class-body}}
{{#serializableModel}}
- {{#nonPublicApi}}internal {{/nonPublicApi}}companion object {
- private const val serialVersionUID: Long = 123
- }
+ {{#nonPublicApi}}internal {{/nonPublicApi}}companion object {
+ private const val serialVersionUID: Long = 123
+ }
{{/serializableModel}}
{{#discriminator}}{{#vars}}{{#required}}
{{>interface_req_var}}{{/required}}{{^required}}
diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/enum_class.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/enum_class.mustache
index 4704fcfabf8..8de73d46049 100644
--- a/modules/openapi-generator/src/main/resources/kotlin-client/enum_class.mustache
+++ b/modules/openapi-generator/src/main/resources/kotlin-client/enum_class.mustache
@@ -47,11 +47,11 @@ import kotlinx.serialization.internal.CommonEnumSerializer
{{/enumVars}}{{/allowableValues}}
- /**
- This override toString avoids using the enum var name and uses the actual api value instead.
- In cases the var name and value are different, the client would send incorrect enums to the server.
- **/
- override fun toString(): String {
+ /**
+ This override toString avoids using the enum var name and uses the actual api value instead.
+ In cases the var name and value are different, the client would send incorrect enums to the server.
+ **/
+ override fun toString(): String {
return value{{^isString}}.toString(){{/isString}}
}
diff --git a/modules/openapi-generator/src/main/resources/kotlin-spring/queryParams.mustache b/modules/openapi-generator/src/main/resources/kotlin-spring/queryParams.mustache
index ecceefb0856..e769fa0ce08 100644
--- a/modules/openapi-generator/src/main/resources/kotlin-spring/queryParams.mustache
+++ b/modules/openapi-generator/src/main/resources/kotlin-spring/queryParams.mustache
@@ -1 +1 @@
-{{#isQueryParam}}{{#useBeanValidation}}{{>beanValidationQueryParams}}{{/useBeanValidation}}{{#swaggerAnnotations}}@ApiParam(value = "{{{description}}}"{{#required}}, required = true{{/required}}{{#allowableValues}}, allowableValues = "{{#values}}{{{.}}}{{^-last}}, {{/-last}}{{#-last}}{{/-last}}{{/values}}"{{/allowableValues}}{{#defaultValue}}, defaultValue = "{{{defaultValue}}}"{{/defaultValue}}) {{#useBeanValidation}}@Valid{{/useBeanValidation}}{{/swaggerAnnotations}} @RequestParam(value = "{{baseName}}"{{#required}}, required = true{{/required}}{{^required}}, required = false{{/required}}{{#defaultValue}}, defaultValue="{{{defaultValue}}}"{{/defaultValue}}) {{paramName}}: {{>optionalDataType}}{{/isQueryParam}}
\ No newline at end of file
+{{#isQueryParam}}{{#useBeanValidation}}{{>beanValidationQueryParams}}{{/useBeanValidation}}{{#swaggerAnnotations}}@ApiParam(value = "{{{description}}}"{{#required}}, required = true{{/required}}{{#allowableValues}}, allowableValues = "{{#values}}{{{.}}}{{^-last}}, {{/-last}}{{#-last}}{{/-last}}{{/values}}"{{/allowableValues}}{{#defaultValue}}, defaultValue = {{^isString}}"{{/isString}}{{#isString}}{{#isEnum}}"{{/isEnum}}{{/isString}}{{{defaultValue}}}{{^isString}}"{{/isString}}{{#isString}}{{#isEnum}}"{{/isEnum}}{{/isString}}{{/defaultValue}}) {{#useBeanValidation}}@Valid{{/useBeanValidation}}{{/swaggerAnnotations}} @RequestParam(value = "{{baseName}}"{{#required}}, required = true{{/required}}{{^required}}, required = false{{/required}}{{#defaultValue}}, defaultValue={{^isString}}"{{/isString}}{{#isString}}{{#isEnum}}"{{/isEnum}}{{/isString}}{{{defaultValue}}}{{^isString}}"{{/isString}}{{#isString}}{{#isEnum}}"{{/isEnum}}{{/isString}}{{/defaultValue}}) {{paramName}}: {{>optionalDataType}}{{/isQueryParam}}
\ No newline at end of file
diff --git a/modules/openapi-generator/src/main/resources/powershell/api_test.mustache b/modules/openapi-generator/src/main/resources/powershell/api_test.mustache
index 52fe4b5f16f..9c3362aad55 100644
--- a/modules/openapi-generator/src/main/resources/powershell/api_test.mustache
+++ b/modules/openapi-generator/src/main/resources/powershell/api_test.mustache
@@ -5,8 +5,8 @@ Describe -tag '{{{packageName}}}' -name '{{{apiNamePrefix}}}{{{classname}}}' {
Context '{{{vendorExtensions.x-powershell-method-name}}}' {
It 'Test {{{vendorExtensions.x-powershell-method-name}}}' {
#$TestResult = Invoke-PetApiGetPetById{{#allParams}} -{{{paramName}}} "TEST_VALUE"{{/allParams}}
- #$TestResult | Should BeOfType TODO
- #$TestResult.property | Should Be 0
+ #$TestResult | Should -BeOfType TODO
+ #$TestResult.property | Should -Be 0
}
}
diff --git a/modules/openapi-generator/src/main/resources/powershell/model_anyof.mustache b/modules/openapi-generator/src/main/resources/powershell/model_anyof.mustache
index f58773df049..62991addbe2 100644
--- a/modules/openapi-generator/src/main/resources/powershell/model_anyof.mustache
+++ b/modules/openapi-generator/src/main/resources/powershell/model_anyof.mustache
@@ -38,6 +38,35 @@ function ConvertFrom-{{{apiNamePrefix}}}JsonTo{{{classname}}} {
}
{{/isNullable}}
+ {{#discriminator}}
+ {{#mappedModels}}
+ {{#-first}}
+ $JsonData = ConvertFrom-Json -InputObject $Json
+ {{/-first}}
+ # check if the discriminator value is '{{{mappingName}}}'
+ if ($JsonData.PSobject.Properties["{{{propertyBaseName}}}"].value -eq "{{{mappingName}}}") {
+ # try to match {{{modelName}}} defined in the anyOf schemas
+ try {
+ $matchInstance = ConvertFrom-{{{apiNamePrefix}}}JsonTo{{{modelName}}} $Json
+
+ foreach($property in $matchInstance.PsObject.Properties) {
+ if ($null -ne $property.Value) {
+ $matchType = "{{{modelName}}}"
+ return [PSCustomObject]@{
+ "ActualType" = ${matchType}
+ "ActualInstance" = ${matchInstance}
+ "anyOfSchemas" = @({{#anyOf}}"{{{.}}}"{{^-last}}, {{/-last}}{{/anyOf}})
+ }
+ }
+ }
+ } catch {
+ # fail to match the schema defined in anyOf with the discriminator lookup, proceed to the next one
+ Write-Debug "Failed to match '{{{modelName}}}' defined in anyOf ({{{apiNamePrefix}}}{{{classname}}}) using the discriminator lookup ({{{mappingName}}}). Proceeding with the typical anyOf type matching."
+ }
+ }
+
+ {{/mappedModels}}
+ {{/discriminator}}
{{#anyOf}}
if ($match -ne 0) { # no match yet
# try to match {{{.}}} defined in the anyOf schemas
diff --git a/modules/openapi-generator/src/main/resources/powershell/model_oneof.mustache b/modules/openapi-generator/src/main/resources/powershell/model_oneof.mustache
index 5ff351bc4a8..e71d77814d2 100644
--- a/modules/openapi-generator/src/main/resources/powershell/model_oneof.mustache
+++ b/modules/openapi-generator/src/main/resources/powershell/model_oneof.mustache
@@ -38,6 +38,37 @@ function ConvertFrom-{{{apiNamePrefix}}}JsonTo{{{classname}}} {
}
{{/isNullable}}
+ {{#useOneOfDiscriminatorLookup}}
+ {{#discriminator}}
+ {{#mappedModels}}
+ {{#-first}}
+ $JsonData = ConvertFrom-Json -InputObject $Json
+ {{/-first}}
+ # check if the discriminator value is '{{{mappingName}}}'
+ if ($JsonData.PSobject.Properties["{{{propertyBaseName}}}"].value -eq "{{{mappingName}}}") {
+ # try to match {{{modelName}}} defined in the oneOf schemas
+ try {
+ $matchInstance = ConvertFrom-{{{apiNamePrefix}}}JsonTo{{{modelName}}} $Json
+
+ foreach($property in $matchInstance.PsObject.Properties) {
+ if ($null -ne $property.Value) {
+ $matchType = "{{{modelName}}}"
+ return [PSCustomObject]@{
+ "ActualType" = ${matchType}
+ "ActualInstance" = ${matchInstance}
+ "oneOfSchemas" = @({{#oneOf}}"{{{.}}}"{{^-last}}, {{/-last}}{{/oneOf}})
+ }
+ }
+ }
+ } catch {
+ # fail to match the schema defined in oneOf with the discriminator lookup, proceed to the next one
+ Write-Debug "Failed to match '{{{modelName}}}' defined in oneOf ({{{apiNamePrefix}}}{{{classname}}}) using the discriminator lookup ({{{mappingName}}}). Proceeding with the typical oneOf type matching."
+ }
+ }
+
+ {{/mappedModels}}
+ {{/discriminator}}
+ {{/useOneOfDiscriminatorLookup}}
{{#oneOf}}
# try to match {{{.}}} defined in the oneOf schemas
try {
diff --git a/modules/openapi-generator/src/main/resources/powershell/model_simple.mustache b/modules/openapi-generator/src/main/resources/powershell/model_simple.mustache
index 6e7eadef78d..ab7098fe9f9 100644
--- a/modules/openapi-generator/src/main/resources/powershell/model_simple.mustache
+++ b/modules/openapi-generator/src/main/resources/powershell/model_simple.mustache
@@ -129,13 +129,24 @@ function ConvertFrom-{{{apiNamePrefix}}}JsonTo{{{classname}}} {
$PSBoundParameters | Out-DebugParameter | Write-Debug
$JsonParameters = ConvertFrom-Json -InputObject $Json
+ {{#vendorExtensions.x-additional-properties}}
+ ${{{apiNamePrefix}}}{{{classname}}}AdditionalProperties = @{}
+ {{/vendorExtensions.x-additional-properties}}
# check if Json contains properties not defined in {{{apiNamePrefix}}}{{{classname}}}
$AllProperties = ({{#allVars}}"{{{baseName}}}"{{^-last}}, {{/-last}}{{/allVars}})
foreach ($name in $JsonParameters.PsObject.Properties.Name) {
+ {{^vendorExtensions.x-additional-properties}}
if (!($AllProperties.Contains($name))) {
throw "Error! JSON key '$name' not found in the properties: $($AllProperties)"
}
+ {{/vendorExtensions.x-additional-properties}}
+ {{#vendorExtensions.x-additional-properties}}
+ # store undefined properties in additionalProperties
+ if (!($AllProperties.Contains($name))) {
+ ${{{apiNamePrefix}}}{{{classname}}}AdditionalProperties[$name] = $JsonParameters.PSobject.Properties[$name].value
+ }
+ {{/vendorExtensions.x-additional-properties}}
}
{{#requiredVars}}
@@ -166,6 +177,9 @@ function ConvertFrom-{{{apiNamePrefix}}}JsonTo{{{classname}}} {
"<>" = ${<>}
<>
<<={{ }}=>>
+ {{#vendorExtensions.x-additional-properties}}
+ "AdditionalProperties" = ${{{apiNamePrefix}}}{{{classname}}}AdditionalProperties
+ {{/vendorExtensions.x-additional-properties}}
}
return $PSO
diff --git a/modules/openapi-generator/src/main/resources/powershell/model_test.mustache b/modules/openapi-generator/src/main/resources/powershell/model_test.mustache
index f2d67a306ea..411fd29efb8 100644
--- a/modules/openapi-generator/src/main/resources/powershell/model_test.mustache
+++ b/modules/openapi-generator/src/main/resources/powershell/model_test.mustache
@@ -6,8 +6,8 @@ Describe -tag '{{{packageName}}}' -name '{{{apiNamePrefix}}}{{{classname}}}' {
It 'Initialize-{{{apiNamePrefix}}}{{{classname}}}' {
# a simple test to create an object
#$NewObject = Initialize-{{{apiNamePrefix}}}{{{classname}}}{{#vars}} -{{name}} "TEST_VALUE"{{/vars}}
- #$NewObject | Should BeOfType {{classname}}
- #$NewObject.property | Should Be 0
+ #$NewObject | Should -BeOfType {{classname}}
+ #$NewObject.property | Should -Be 0
}
}
}
diff --git a/modules/openapi-generator/src/main/resources/python/api.mustache b/modules/openapi-generator/src/main/resources/python/api.mustache
index f2c55418354..18ced57845e 100644
--- a/modules/openapi-generator/src/main/resources/python/api.mustache
+++ b/modules/openapi-generator/src/main/resources/python/api.mustache
@@ -38,6 +38,7 @@ class {{classname}}(object):
{{/notes}}
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
{{#sortParamsByRequiredFlag}}
>>> thread = api.{{operationId}}({{#allParams}}{{#required}}{{paramName}}, {{/required}}{{/allParams}}async_req=True)
{{/sortParamsByRequiredFlag}}
@@ -46,20 +47,24 @@ class {{classname}}(object):
{{/sortParamsByRequiredFlag}}
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
{{#allParams}}
- :param {{dataType}} {{paramName}}:{{#description}} {{{description}}}{{/description}}{{#required}} (required){{/required}}{{#optional}}(optional){{/optional}}
+ :param {{paramName}}:{{#description}} {{{description}}}{{/description}}{{#required}} (required){{/required}}{{#optional}}(optional){{/optional}}
+ :type {{paramName}}: {{dataType}}{{#optional}}, optional{{/optional}}
{{/allParams}}
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: {{#returnType}}{{returnType}}{{/returnType}}{{^returnType}}None{{/returnType}}
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: {{#returnType}}{{returnType}}{{/returnType}}{{^returnType}}None{{/returnType}}
"""
kwargs['_return_http_data_only'] = True
return self.{{operationId}}_with_http_info({{#sortParamsByRequiredFlag}}{{#allParams}}{{#required}}{{paramName}}, {{/required}}{{/allParams}}{{/sortParamsByRequiredFlag}}**kwargs) # noqa: E501
@@ -72,6 +77,7 @@ class {{classname}}(object):
{{/notes}}
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
{{#sortParamsByRequiredFlag}}
>>> thread = api.{{operationId}}_with_http_info({{#allParams}}{{#required}}{{paramName}}, {{/required}}{{/allParams}}async_req=True)
{{/sortParamsByRequiredFlag}}
@@ -80,22 +86,27 @@ class {{classname}}(object):
{{/sortParamsByRequiredFlag}}
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
{{#allParams}}
- :param {{dataType}} {{paramName}}:{{#description}} {{{description}}}{{/description}}{{#required}} (required){{/required}}{{#optional}}(optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/optional}}
+ :param {{paramName}}:{{#description}} {{{description}}}{{/description}}{{#required}} (required){{/required}}{{#optional}}(optional){{/optional}}
+ :type {{paramName}}: {{dataType}}{{#optional}}, optional{{/optional}}
{{/allParams}}
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _return_http_data_only: response data without head status code
and headers
+ :type _return_http_data_only: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: {{#returnType}}tuple({{returnType}}, status_code(int), headers(HTTPHeaderDict)){{/returnType}}{{^returnType}}None{{/returnType}}
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: {{#returnType}}tuple({{returnType}}, status_code(int), headers(HTTPHeaderDict)){{/returnType}}{{^returnType}}None{{/returnType}}
"""
{{#servers.0}}
diff --git a/modules/openapi-generator/src/main/resources/python/model.mustache b/modules/openapi-generator/src/main/resources/python/model.mustache
index 112246604dc..2b3299a6f2b 100644
--- a/modules/openapi-generator/src/main/resources/python/model.mustache
+++ b/modules/openapi-generator/src/main/resources/python/model.mustache
@@ -107,7 +107,7 @@ class {{classname}}(object):
{{/description}}
:param {{name}}: The {{name}} of this {{classname}}. # noqa: E501
- :type: {{dataType}}
+ :type {{name}}: {{dataType}}
"""
{{^isNullable}}
{{#required}}
diff --git a/modules/openapi-generator/src/main/resources/python/python-experimental/api.mustache b/modules/openapi-generator/src/main/resources/python/python-experimental/api.mustache
index 44fc3a89970..92e909165d6 100644
--- a/modules/openapi-generator/src/main/resources/python/python-experimental/api.mustache
+++ b/modules/openapi-generator/src/main/resources/python/python-experimental/api.mustache
@@ -66,6 +66,7 @@ class {{classname}}(object):
{{/notes}}
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.{{operationId}}({{#requiredParams}}{{^defaultValue}}{{paramName}}, {{/defaultValue}}{{/requiredParams}}{{#requiredParams}}{{#defaultValue}}{{paramName}}={{{defaultValue}}}, {{/defaultValue}}{{/requiredParams}}async_req=True)
>>> result = thread.get()
diff --git a/modules/openapi-generator/src/main/resources/python/python-experimental/api_client.mustache b/modules/openapi-generator/src/main/resources/python/python-experimental/api_client.mustache
index 5285a7b8064..d17177a8328 100644
--- a/modules/openapi-generator/src/main/resources/python/python-experimental/api_client.mustache
+++ b/modules/openapi-generator/src/main/resources/python/python-experimental/api_client.mustache
@@ -291,6 +291,7 @@ class ApiClient(object):
({str: (bool, str, int, float, date, datetime, str, none_type)},)
:param _check_type: boolean, whether to check the types of the data
received from the server
+ :type _check_type: bool
:return: deserialized object.
"""
@@ -350,22 +351,28 @@ class ApiClient(object):
(float, none_type)
([int, none_type],)
({str: (bool, str, int, float, date, datetime, str, none_type)},)
- :param files dict: key -> field name, value -> a list of open file
+ :param files: key -> field name, value -> a list of open file
objects for `multipart/form-data`.
+ :type files: dict
:param async_req bool: execute request asynchronously
+ :type async_req: bool, optional
:param _return_http_data_only: response data without head status code
and headers
+ :type _return_http_data_only: bool, optional
:param collection_formats: dict of collection formats for path, query,
header, and post parameters.
+ :type collection_formats: dict, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:param _check_type: boolean describing if the data back from the server
should have its type checked.
+ :type _check_type: bool, optional
:return:
If async_req parameter is True,
the request will be called asynchronously.
@@ -559,9 +566,9 @@ class ApiClient(object):
:param headers: Header parameters dict to be updated.
:param querys: Query parameters tuple list to be updated.
:param auth_settings: Authentication setting identifiers list.
- :resource_path: A string representation of the HTTP request resource path.
- :method: A string representation of the HTTP request method.
- :body: A object representing the body of the HTTP request.
+ :param resource_path: A string representation of the HTTP request resource path.
+ :param method: A string representation of the HTTP request method.
+ :param body: A object representing the body of the HTTP request.
The object type is the return value of sanitize_for_serialization().
"""
if not auth_settings:
diff --git a/modules/openapi-generator/src/main/resources/python/python-experimental/model.mustache b/modules/openapi-generator/src/main/resources/python/python-experimental/model.mustache
index 0790c614357..490629c5a38 100644
--- a/modules/openapi-generator/src/main/resources/python/python-experimental/model.mustache
+++ b/modules/openapi-generator/src/main/resources/python/python-experimental/model.mustache
@@ -37,7 +37,12 @@ from {{packageName}}.model_utils import ( # noqa: F401
{{> python-experimental/model_templates/model_simple }}
{{/isAlias}}
{{^isAlias}}
+{{#isArrayModel}}
+{{> python-experimental/model_templates/model_simple }}
+{{/isArrayModel}}
+{{^isArrayModel}}
{{> python-experimental/model_templates/model_normal }}
+{{/isArrayModel}}
{{/isAlias}}
{{/interfaces}}
{{#interfaces}}
diff --git a/modules/openapi-generator/src/main/resources/typescript-rxjs/apis.mustache b/modules/openapi-generator/src/main/resources/typescript-rxjs/apis.mustache
index 6fc3928c487..4aae18a02f0 100644
--- a/modules/openapi-generator/src/main/resources/typescript-rxjs/apis.mustache
+++ b/modules/openapi-generator/src/main/resources/typescript-rxjs/apis.mustache
@@ -41,7 +41,7 @@ export class {{classname}} extends BaseAPI {
{{#hasParams}}
{{#allParams}}
{{#required}}
- throwIfNullOrUndefined({{> paramNamePartial}}, '{{nickname}}');
+ throwIfNullOrUndefined({{> paramNamePartial}}, '{{> paramNamePartial}}', '{{nickname}}');
{{/required}}
{{/allParams}}
diff --git a/modules/openapi-generator/src/main/resources/typescript-rxjs/runtime.mustache b/modules/openapi-generator/src/main/resources/typescript-rxjs/runtime.mustache
index 97989df889a..db845a85945 100644
--- a/modules/openapi-generator/src/main/resources/typescript-rxjs/runtime.mustache
+++ b/modules/openapi-generator/src/main/resources/typescript-rxjs/runtime.mustache
@@ -178,9 +178,9 @@ export const throwIfRequired = (params: {[key: string]: any}, key: string, nickn
}
};
-export const throwIfNullOrUndefined = (value: any, nickname?: string) => {
+export const throwIfNullOrUndefined = (value: any, paramName: string, nickname: string) => {
if (value == null) {
- throw new Error(`Parameter "${value}" was null or undefined when calling "${nickname}".`);
+ throw new Error(`Parameter "${paramName}" was null or undefined when calling "${nickname}".`);
}
};
diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/python/PythonClientExperimentalTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/python/PythonClientExperimentalTest.java
index c7988952b7f..143429cb2ac 100644
--- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/python/PythonClientExperimentalTest.java
+++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/python/PythonClientExperimentalTest.java
@@ -21,8 +21,10 @@ import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.oas.models.Operation;
import io.swagger.v3.oas.models.media.*;
import io.swagger.v3.parser.util.SchemaTypeUtil;
+import java.time.OffsetDateTime;
import org.openapitools.codegen.*;
import org.openapitools.codegen.languages.PythonClientExperimentalCodegen;
+import org.openapitools.codegen.utils.ModelUtils;
import org.testng.Assert;
import org.testng.annotations.Test;
@@ -268,7 +270,7 @@ public class PythonClientExperimentalTest {
Assert.assertEquals(cm.classname, "sample.Sample");
Assert.assertEquals(cm.classVarName, "sample");
Assert.assertEquals(cm.description, "an array model");
- Assert.assertEquals(cm.vars.size(), 0);
+ Assert.assertEquals(cm.vars.size(), 1); // there is one value for Childer definition
Assert.assertEquals(cm.parent, "list");
Assert.assertEquals(cm.imports.size(), 1);
Assert.assertEquals(Sets.intersection(cm.imports, Sets.newHashSet("children.Children")).size(), 1);
@@ -293,4 +295,14 @@ public class PythonClientExperimentalTest {
Assert.assertEquals(cm.imports.size(), 0);
}
+ @Test(description = "parse date and date-time example value")
+ public void parseDateAndDateTimeExamplesTest() {
+ final OpenAPI openAPI = TestUtils.parseFlattenSpec("src/test/resources/3_0/python-experimental/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml");
+ final DefaultCodegen codegen = new PythonClientExperimentalCodegen();
+
+ Schema modelSchema = ModelUtils.getSchema(openAPI, "DateTimeTest");
+ String defaultValue = codegen.toDefaultValue(modelSchema);
+ Assert.assertEquals(defaultValue, "dateutil_parser('2010-01-01T10:10:10.000111+01:00')");
+ }
+
}
diff --git a/modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml b/modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml
index 74598c6ce70..81c4cf697c0 100644
--- a/modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml
+++ b/modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml
@@ -1810,6 +1810,7 @@ components:
type: string
banana:
type: object
+ additionalProperties: true
properties:
lengthCm:
type: number
diff --git a/modules/openapi-generator/src/test/resources/3_0/powershell/petstore.yaml b/modules/openapi-generator/src/test/resources/3_0/powershell/petstore.yaml
index 11ed2854ba5..b3a0dfd3c11 100644
--- a/modules/openapi-generator/src/test/resources/3_0/powershell/petstore.yaml
+++ b/modules/openapi-generator/src/test/resources/3_0/powershell/petstore.yaml
@@ -699,6 +699,7 @@ components:
xml:
name: User
Tag:
+ additionalProperties: true
title: Pet Tag
description: A tag for a pet
type: object
diff --git a/modules/openapi-generator/src/test/resources/3_0/python-experimental/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml b/modules/openapi-generator/src/test/resources/3_0/python-experimental/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml
index 6fb6d09416e..a0f064611b1 100644
--- a/modules/openapi-generator/src/test/resources/3_0/python-experimental/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml
+++ b/modules/openapi-generator/src/test/resources/3_0/python-experimental/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml
@@ -758,6 +758,8 @@ paths:
description: None
type: string
format: date-time
+ default: '2010-02-01T10:20:10.11111+01:00'
+ example: '2020-02-02T20:20:20.22222Z'
password:
description: None
type: string
@@ -1097,6 +1099,19 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/HealthCheckResult'
+ /fake/array-of-enums:
+ get:
+ tags:
+ - fake
+ summary: Array of Enums
+ operationId: getArrayOfEnums
+ responses:
+ 200:
+ description: Got named array of enums
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ArrayOfEnums'
servers:
- url: 'http://{server}.swagger.io:{port}/v2'
description: petstore server
@@ -1202,6 +1217,7 @@ components:
shipDate:
type: string
format: date-time
+ example: '2020-02-02T20:20:20.000222Z'
status:
type: string
description: Order Status
@@ -1443,7 +1459,7 @@ components:
maximum: 543.2
minimum: 32.1
type: number
- multipleOf: 32.5
+ multipleOf: 32.5
float:
type: number
format: float
@@ -1466,9 +1482,11 @@ components:
date:
type: string
format: date
+ example: '2020-02-02'
dateTime:
type: string
format: date-time
+ example: '2007-12-03T10:15:30+01:00'
uuid:
type: string
format: uuid
@@ -1969,7 +1987,7 @@ components:
# Here the additional properties are specified using a referenced schema.
# This is just to validate the generated code works when using $ref
# under 'additionalProperties'.
- $ref: '#/components/schemas/fruit'
+ $ref: '#/components/schemas/fruit'
Shape:
oneOf:
- $ref: '#/components/schemas/Triangle'
@@ -2069,3 +2087,12 @@ components:
properties:
name:
type: string
+ ArrayOfEnums:
+ type: array
+ items:
+ $ref: '#/components/schemas/OuterEnum'
+ DateTimeTest:
+ type: string
+ default: '2010-01-01T10:10:10.000111+01:00'
+ example: '2010-01-01T10:10:10.000111+01:00'
+ format: date-time
diff --git a/pom.xml b/pom.xml
index 913ac1c96c3..a1406c2471d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1294,7 +1294,7 @@
samples/client/petstore/java/feign10x
samples/client/petstore/java/jersey1
samples/client/petstore/java/jersey2-java8
- samples/openapi3/client/petstore/java/jersey2-java8
+
samples/client/petstore/java/okhttp-gson
samples/client/petstore/java/retrofit2
samples/client/petstore/java/retrofit2rx
diff --git a/samples/client/petstore/cpp-ue4/OpenAPI.Build.cs b/samples/client/petstore/cpp-ue4/OpenAPI.Build.cs
index 48294bae4e4..f6d2f83eba8 100644
--- a/samples/client/petstore/cpp-ue4/OpenAPI.Build.cs
+++ b/samples/client/petstore/cpp-ue4/OpenAPI.Build.cs
@@ -26,5 +26,6 @@ public class OpenAPI : ModuleRules
"Json",
}
);
+ PCHUsage = PCHUsageMode.NoPCHs;
}
}
\ No newline at end of file
diff --git a/samples/client/petstore/cpp-ue4/Private/OpenAPIApiResponse.cpp b/samples/client/petstore/cpp-ue4/Private/OpenAPIApiResponse.cpp
index 54254095989..bd248608e46 100644
--- a/samples/client/petstore/cpp-ue4/Private/OpenAPIApiResponse.cpp
+++ b/samples/client/petstore/cpp-ue4/Private/OpenAPIApiResponse.cpp
@@ -38,14 +38,19 @@ void OpenAPIApiResponse::WriteJson(JsonWriter& Writer) const
Writer->WriteObjectEnd();
}
-bool OpenAPIApiResponse::FromJson(const TSharedPtr& JsonObject)
+bool OpenAPIApiResponse::FromJson(const TSharedPtr& JsonValue)
{
+ const TSharedPtr* Object;
+ if (!JsonValue->TryGetObject(Object))
+ return false;
+
bool ParseSuccess = true;
- ParseSuccess &= TryGetJsonValue(JsonObject, TEXT("code"), Code);
- ParseSuccess &= TryGetJsonValue(JsonObject, TEXT("type"), Type);
- ParseSuccess &= TryGetJsonValue(JsonObject, TEXT("message"), Message);
+ ParseSuccess &= TryGetJsonValue(*Object, TEXT("code"), Code);
+ ParseSuccess &= TryGetJsonValue(*Object, TEXT("type"), Type);
+ ParseSuccess &= TryGetJsonValue(*Object, TEXT("message"), Message);
return ParseSuccess;
}
+
}
diff --git a/samples/client/petstore/cpp-ue4/Private/OpenAPICategory.cpp b/samples/client/petstore/cpp-ue4/Private/OpenAPICategory.cpp
index 2f3b816d3c9..109decaa0df 100644
--- a/samples/client/petstore/cpp-ue4/Private/OpenAPICategory.cpp
+++ b/samples/client/petstore/cpp-ue4/Private/OpenAPICategory.cpp
@@ -34,13 +34,18 @@ void OpenAPICategory::WriteJson(JsonWriter& Writer) const
Writer->WriteObjectEnd();
}
-bool OpenAPICategory::FromJson(const TSharedPtr& JsonObject)
+bool OpenAPICategory::FromJson(const TSharedPtr& JsonValue)
{
+ const TSharedPtr* Object;
+ if (!JsonValue->TryGetObject(Object))
+ return false;
+
bool ParseSuccess = true;
- ParseSuccess &= TryGetJsonValue(JsonObject, TEXT("id"), Id);
- ParseSuccess &= TryGetJsonValue(JsonObject, TEXT("name"), Name);
+ ParseSuccess &= TryGetJsonValue(*Object, TEXT("id"), Id);
+ ParseSuccess &= TryGetJsonValue(*Object, TEXT("name"), Name);
return ParseSuccess;
}
+
}
diff --git a/samples/client/petstore/cpp-ue4/Private/OpenAPIHelpers.cpp b/samples/client/petstore/cpp-ue4/Private/OpenAPIHelpers.cpp
index 0a3be0adee2..7361ddf5fe3 100644
--- a/samples/client/petstore/cpp-ue4/Private/OpenAPIHelpers.cpp
+++ b/samples/client/petstore/cpp-ue4/Private/OpenAPIHelpers.cpp
@@ -17,6 +17,7 @@
#include "Interfaces/IHttpRequest.h"
#include "PlatformHttp.h"
#include "Misc/FileHelper.h"
+#include "Misc/Paths.h"
namespace OpenAPI
{
diff --git a/samples/client/petstore/cpp-ue4/Private/OpenAPIOrder.cpp b/samples/client/petstore/cpp-ue4/Private/OpenAPIOrder.cpp
index f125c7ae40b..4442b2a1c10 100644
--- a/samples/client/petstore/cpp-ue4/Private/OpenAPIOrder.cpp
+++ b/samples/client/petstore/cpp-ue4/Private/OpenAPIOrder.cpp
@@ -96,17 +96,22 @@ void OpenAPIOrder::WriteJson(JsonWriter& Writer) const
Writer->WriteObjectEnd();
}
-bool OpenAPIOrder::FromJson(const TSharedPtr& JsonObject)
+bool OpenAPIOrder::FromJson(const TSharedPtr& JsonValue)
{
+ const TSharedPtr* Object;
+ if (!JsonValue->TryGetObject(Object))
+ return false;
+
bool ParseSuccess = true;
- ParseSuccess &= TryGetJsonValue(JsonObject, TEXT("id"), Id);
- ParseSuccess &= TryGetJsonValue(JsonObject, TEXT("petId"), PetId);
- ParseSuccess &= TryGetJsonValue(JsonObject, TEXT("quantity"), Quantity);
- ParseSuccess &= TryGetJsonValue(JsonObject, TEXT("shipDate"), ShipDate);
- ParseSuccess &= TryGetJsonValue(JsonObject, TEXT("status"), Status);
- ParseSuccess &= TryGetJsonValue(JsonObject, TEXT("complete"), Complete);
+ ParseSuccess &= TryGetJsonValue(*Object, TEXT("id"), Id);
+ ParseSuccess &= TryGetJsonValue(*Object, TEXT("petId"), PetId);
+ ParseSuccess &= TryGetJsonValue(*Object, TEXT("quantity"), Quantity);
+ ParseSuccess &= TryGetJsonValue(*Object, TEXT("shipDate"), ShipDate);
+ ParseSuccess &= TryGetJsonValue(*Object, TEXT("status"), Status);
+ ParseSuccess &= TryGetJsonValue(*Object, TEXT("complete"), Complete);
return ParseSuccess;
}
+
}
diff --git a/samples/client/petstore/cpp-ue4/Private/OpenAPIPet.cpp b/samples/client/petstore/cpp-ue4/Private/OpenAPIPet.cpp
index b36df84ae6b..9cc4f201362 100644
--- a/samples/client/petstore/cpp-ue4/Private/OpenAPIPet.cpp
+++ b/samples/client/petstore/cpp-ue4/Private/OpenAPIPet.cpp
@@ -90,17 +90,22 @@ void OpenAPIPet::WriteJson(JsonWriter& Writer) const
Writer->WriteObjectEnd();
}
-bool OpenAPIPet::FromJson(const TSharedPtr& JsonObject)
+bool OpenAPIPet::FromJson(const TSharedPtr& JsonValue)
{
+ const TSharedPtr* Object;
+ if (!JsonValue->TryGetObject(Object))
+ return false;
+
bool ParseSuccess = true;
- ParseSuccess &= TryGetJsonValue(JsonObject, TEXT("id"), Id);
- ParseSuccess &= TryGetJsonValue(JsonObject, TEXT("category"), Category);
- ParseSuccess &= TryGetJsonValue(JsonObject, TEXT("name"), Name);
- ParseSuccess &= TryGetJsonValue(JsonObject, TEXT("photoUrls"), PhotoUrls);
- ParseSuccess &= TryGetJsonValue(JsonObject, TEXT("tags"), Tags);
- ParseSuccess &= TryGetJsonValue(JsonObject, TEXT("status"), Status);
+ ParseSuccess &= TryGetJsonValue(*Object, TEXT("id"), Id);
+ ParseSuccess &= TryGetJsonValue(*Object, TEXT("category"), Category);
+ ParseSuccess &= TryGetJsonValue(*Object, TEXT("name"), Name);
+ ParseSuccess &= TryGetJsonValue(*Object, TEXT("photoUrls"), PhotoUrls);
+ ParseSuccess &= TryGetJsonValue(*Object, TEXT("tags"), Tags);
+ ParseSuccess &= TryGetJsonValue(*Object, TEXT("status"), Status);
return ParseSuccess;
}
+
}
diff --git a/samples/client/petstore/cpp-ue4/Private/OpenAPITag.cpp b/samples/client/petstore/cpp-ue4/Private/OpenAPITag.cpp
index 4f399573c7e..4714f75bf53 100644
--- a/samples/client/petstore/cpp-ue4/Private/OpenAPITag.cpp
+++ b/samples/client/petstore/cpp-ue4/Private/OpenAPITag.cpp
@@ -34,13 +34,18 @@ void OpenAPITag::WriteJson(JsonWriter& Writer) const
Writer->WriteObjectEnd();
}
-bool OpenAPITag::FromJson(const TSharedPtr& JsonObject)
+bool OpenAPITag::FromJson(const TSharedPtr& JsonValue)
{
+ const TSharedPtr* Object;
+ if (!JsonValue->TryGetObject(Object))
+ return false;
+
bool ParseSuccess = true;
- ParseSuccess &= TryGetJsonValue(JsonObject, TEXT("id"), Id);
- ParseSuccess &= TryGetJsonValue(JsonObject, TEXT("name"), Name);
+ ParseSuccess &= TryGetJsonValue(*Object, TEXT("id"), Id);
+ ParseSuccess &= TryGetJsonValue(*Object, TEXT("name"), Name);
return ParseSuccess;
}
+
}
diff --git a/samples/client/petstore/cpp-ue4/Private/OpenAPIUser.cpp b/samples/client/petstore/cpp-ue4/Private/OpenAPIUser.cpp
index bb0fe0292bf..90eb9fc9b43 100644
--- a/samples/client/petstore/cpp-ue4/Private/OpenAPIUser.cpp
+++ b/samples/client/petstore/cpp-ue4/Private/OpenAPIUser.cpp
@@ -58,19 +58,24 @@ void OpenAPIUser::WriteJson(JsonWriter& Writer) const
Writer->WriteObjectEnd();
}
-bool OpenAPIUser::FromJson(const TSharedPtr& JsonObject)
+bool OpenAPIUser::FromJson(const TSharedPtr& JsonValue)
{
+ const TSharedPtr* Object;
+ if (!JsonValue->TryGetObject(Object))
+ return false;
+
bool ParseSuccess = true;
- ParseSuccess &= TryGetJsonValue(JsonObject, TEXT("id"), Id);
- ParseSuccess &= TryGetJsonValue(JsonObject, TEXT("username"), Username);
- ParseSuccess &= TryGetJsonValue(JsonObject, TEXT("firstName"), FirstName);
- ParseSuccess &= TryGetJsonValue(JsonObject, TEXT("lastName"), LastName);
- ParseSuccess &= TryGetJsonValue(JsonObject, TEXT("email"), Email);
- ParseSuccess &= TryGetJsonValue(JsonObject, TEXT("password"), Password);
- ParseSuccess &= TryGetJsonValue(JsonObject, TEXT("phone"), Phone);
- ParseSuccess &= TryGetJsonValue(JsonObject, TEXT("userStatus"), UserStatus);
+ ParseSuccess &= TryGetJsonValue(*Object, TEXT("id"), Id);
+ ParseSuccess &= TryGetJsonValue(*Object, TEXT("username"), Username);
+ ParseSuccess &= TryGetJsonValue(*Object, TEXT("firstName"), FirstName);
+ ParseSuccess &= TryGetJsonValue(*Object, TEXT("lastName"), LastName);
+ ParseSuccess &= TryGetJsonValue(*Object, TEXT("email"), Email);
+ ParseSuccess &= TryGetJsonValue(*Object, TEXT("password"), Password);
+ ParseSuccess &= TryGetJsonValue(*Object, TEXT("phone"), Phone);
+ ParseSuccess &= TryGetJsonValue(*Object, TEXT("userStatus"), UserStatus);
return ParseSuccess;
}
+
}
diff --git a/samples/client/petstore/cpp-ue4/Public/OpenAPIApiResponse.h b/samples/client/petstore/cpp-ue4/Public/OpenAPIApiResponse.h
index 9eca3a5e273..2924d49d26e 100644
--- a/samples/client/petstore/cpp-ue4/Public/OpenAPIApiResponse.h
+++ b/samples/client/petstore/cpp-ue4/Public/OpenAPIApiResponse.h
@@ -26,7 +26,7 @@ class OPENAPI_API OpenAPIApiResponse : public Model
{
public:
virtual ~OpenAPIApiResponse() {}
- bool FromJson(const TSharedPtr& JsonObject) final;
+ bool FromJson(const TSharedPtr& JsonValue) final;
void WriteJson(JsonWriter& Writer) const final;
TOptional Code;
diff --git a/samples/client/petstore/cpp-ue4/Public/OpenAPIBaseModel.h b/samples/client/petstore/cpp-ue4/Public/OpenAPIBaseModel.h
index 26efc0d9c6a..defa1b49263 100644
--- a/samples/client/petstore/cpp-ue4/Public/OpenAPIBaseModel.h
+++ b/samples/client/petstore/cpp-ue4/Public/OpenAPIBaseModel.h
@@ -27,7 +27,7 @@ class OPENAPI_API Model
public:
virtual ~Model() {}
virtual void WriteJson(JsonWriter& Writer) const = 0;
- virtual bool FromJson(const TSharedPtr& JsonObject) = 0;
+ virtual bool FromJson(const TSharedPtr& JsonValue) = 0;
};
class OPENAPI_API Request
@@ -42,7 +42,7 @@ class OPENAPI_API Response
{
public:
virtual ~Response() {}
- virtual bool FromJson(const TSharedPtr& JsonObject) = 0;
+ virtual bool FromJson(const TSharedPtr& JsonValue) = 0;
void SetSuccessful(bool InSuccessful) { Successful = InSuccessful; }
bool IsSuccessful() const { return Successful; }
diff --git a/samples/client/petstore/cpp-ue4/Public/OpenAPICategory.h b/samples/client/petstore/cpp-ue4/Public/OpenAPICategory.h
index b375f23e71a..a38dd8a632d 100644
--- a/samples/client/petstore/cpp-ue4/Public/OpenAPICategory.h
+++ b/samples/client/petstore/cpp-ue4/Public/OpenAPICategory.h
@@ -26,7 +26,7 @@ class OPENAPI_API OpenAPICategory : public Model
{
public:
virtual ~OpenAPICategory() {}
- bool FromJson(const TSharedPtr& JsonObject) final;
+ bool FromJson(const TSharedPtr& JsonValue) final;
void WriteJson(JsonWriter& Writer) const final;
TOptional Id;
diff --git a/samples/client/petstore/cpp-ue4/Public/OpenAPIHelpers.h b/samples/client/petstore/cpp-ue4/Public/OpenAPIHelpers.h
index 42c7c6bd122..74e9e079610 100644
--- a/samples/client/petstore/cpp-ue4/Public/OpenAPIHelpers.h
+++ b/samples/client/petstore/cpp-ue4/Public/OpenAPIHelpers.h
@@ -17,6 +17,7 @@
#include "Serialization/JsonSerializer.h"
#include "Dom/JsonObject.h"
#include "Misc/Base64.h"
+#include "PlatformHttp.h"
class IHttpRequest;
@@ -205,10 +206,22 @@ inline FString CollectionToUrlString_multi(const TArray& Collection, const TC
//////////////////////////////////////////////////////////////////////////
-template::value, int>::type = 0>
-inline void WriteJsonValue(JsonWriter& Writer, const T& Value)
+inline void WriteJsonValue(JsonWriter& Writer, const TSharedPtr& Value)
{
- Writer->WriteValue(Value);
+ if (Value.IsValid())
+ {
+ FJsonSerializer::Serialize(Value.ToSharedRef(), Writer, false);
+ }
+ else
+ {
+ Writer->WriteObjectStart();
+ Writer->WriteObjectEnd();
+ }
+}
+
+inline void WriteJsonValue(JsonWriter& Writer, const TArray& Value)
+{
+ Writer->WriteValue(ToString(Value));
}
inline void WriteJsonValue(JsonWriter& Writer, const FDateTime& Value)
@@ -221,6 +234,12 @@ inline void WriteJsonValue(JsonWriter& Writer, const Model& Value)
Value.WriteJson(Writer);
}
+template::value, int>::type = 0>
+inline void WriteJsonValue(JsonWriter& Writer, const T& Value)
+{
+ Writer->WriteValue(Value);
+}
+
template
inline void WriteJsonValue(JsonWriter& Writer, const TArray& Value)
{
@@ -244,54 +263,8 @@ inline void WriteJsonValue(JsonWriter& Writer, const TMap& Value)
Writer->WriteObjectEnd();
}
-inline void WriteJsonValue(JsonWriter& Writer, const TSharedPtr& Value)
-{
- if (Value.IsValid())
- {
- FJsonSerializer::Serialize(Value.ToSharedRef(), Writer, false);
- }
- else
- {
- Writer->WriteObjectStart();
- Writer->WriteObjectEnd();
- }
-}
-
-inline void WriteJsonValue(JsonWriter& Writer, const TArray& Value)
-{
- Writer->WriteValue(ToString(Value));
-}
-
//////////////////////////////////////////////////////////////////////////
-template
-inline bool TryGetJsonValue(const TSharedPtr& JsonObject, const FString& Key, T& Value)
-{
- const TSharedPtr JsonValue = JsonObject->TryGetField(Key);
- if (JsonValue.IsValid() && !JsonValue->IsNull())
- {
- return TryGetJsonValue(JsonValue, Value);
- }
- return false;
-}
-
-template
-inline bool TryGetJsonValue(const TSharedPtr& JsonObject, const FString& Key, TOptional& OptionalValue)
-{
- if(JsonObject->HasField(Key))
- {
- T Value;
- if (TryGetJsonValue(JsonObject, Key, Value))
- {
- OptionalValue = Value;
- return true;
- }
- else
- return false;
- }
- return true; // Absence of optional value is not a parsing error
-}
-
inline bool TryGetJsonValue(const TSharedPtr& JsonValue, FString& Value)
{
FString TmpValue;
@@ -325,6 +298,34 @@ inline bool TryGetJsonValue(const TSharedPtr& JsonValue, bool& Value
return false;
}
+inline bool TryGetJsonValue(const TSharedPtr& JsonValue, TSharedPtr& JsonObjectValue)
+{
+ const TSharedPtr* Object;
+ if (JsonValue->TryGetObject(Object))
+ {
+ JsonObjectValue = *Object;
+ return true;
+ }
+ return false;
+}
+
+inline bool TryGetJsonValue(const TSharedPtr& JsonValue, TArray& Value)
+{
+ FString TmpValue;
+ if (JsonValue->TryGetString(TmpValue))
+ {
+ Base64UrlDecode(TmpValue, Value);
+ return true;
+ }
+ else
+ return false;
+}
+
+inline bool TryGetJsonValue(const TSharedPtr& JsonValue, Model& Value)
+{
+ return Value.FromJson(JsonValue);
+}
+
template::value, int>::type = 0>
inline bool TryGetJsonValue(const TSharedPtr& JsonValue, T& Value)
{
@@ -338,15 +339,6 @@ inline bool TryGetJsonValue(const TSharedPtr& JsonValue, T& Value)
return false;
}
-inline bool TryGetJsonValue(const TSharedPtr& JsonValue, Model& Value)
-{
- const TSharedPtr* Object;
- if (JsonValue->TryGetObject(Object))
- return Value.FromJson(*Object);
- else
- return false;
-}
-
template
inline bool TryGetJsonValue(const TSharedPtr& JsonValue, TArray& ArrayValue)
{
@@ -386,27 +378,32 @@ inline bool TryGetJsonValue(const TSharedPtr& JsonValue, TMap& JsonValue, TSharedPtr& JsonObjectValue)
+template
+inline bool TryGetJsonValue(const TSharedPtr& JsonObject, const FString& Key, T& Value)
{
- const TSharedPtr* Object;
- if (JsonValue->TryGetObject(Object))
+ const TSharedPtr JsonValue = JsonObject->TryGetField(Key);
+ if (JsonValue.IsValid() && !JsonValue->IsNull())
{
- JsonObjectValue = *Object;
- return true;
+ return TryGetJsonValue(JsonValue, Value);
}
return false;
}
-inline bool TryGetJsonValue(const TSharedPtr& JsonValue, TArray& Value)
+template
+inline bool TryGetJsonValue(const TSharedPtr& JsonObject, const FString& Key, TOptional& OptionalValue)
{
- FString TmpValue;
- if (JsonValue->TryGetString(TmpValue))
+ if(JsonObject->HasField(Key))
{
- Base64UrlDecode(TmpValue, Value);
- return true;
+ T Value;
+ if (TryGetJsonValue(JsonObject, Key, Value))
+ {
+ OptionalValue = Value;
+ return true;
+ }
+ else
+ return false;
}
- else
- return false;
+ return true; // Absence of optional value is not a parsing error
}
}
diff --git a/samples/client/petstore/cpp-ue4/Public/OpenAPIOrder.h b/samples/client/petstore/cpp-ue4/Public/OpenAPIOrder.h
index e3207190e29..f8bcaadde53 100644
--- a/samples/client/petstore/cpp-ue4/Public/OpenAPIOrder.h
+++ b/samples/client/petstore/cpp-ue4/Public/OpenAPIOrder.h
@@ -26,7 +26,7 @@ class OPENAPI_API OpenAPIOrder : public Model
{
public:
virtual ~OpenAPIOrder() {}
- bool FromJson(const TSharedPtr& JsonObject) final;
+ bool FromJson(const TSharedPtr& JsonValue) final;
void WriteJson(JsonWriter& Writer) const final;
TOptional Id;
diff --git a/samples/client/petstore/cpp-ue4/Public/OpenAPIPet.h b/samples/client/petstore/cpp-ue4/Public/OpenAPIPet.h
index 0e81e5fe0f9..b916d319819 100644
--- a/samples/client/petstore/cpp-ue4/Public/OpenAPIPet.h
+++ b/samples/client/petstore/cpp-ue4/Public/OpenAPIPet.h
@@ -28,7 +28,7 @@ class OPENAPI_API OpenAPIPet : public Model
{
public:
virtual ~OpenAPIPet() {}
- bool FromJson(const TSharedPtr& JsonObject) final;
+ bool FromJson(const TSharedPtr& JsonValue) final;
void WriteJson(JsonWriter& Writer) const final;
TOptional Id;
diff --git a/samples/client/petstore/cpp-ue4/Public/OpenAPIPetApiOperations.h b/samples/client/petstore/cpp-ue4/Public/OpenAPIPetApiOperations.h
index a93365d9546..5b5c2511869 100644
--- a/samples/client/petstore/cpp-ue4/Public/OpenAPIPetApiOperations.h
+++ b/samples/client/petstore/cpp-ue4/Public/OpenAPIPetApiOperations.h
@@ -41,7 +41,7 @@ class OPENAPI_API OpenAPIPetApi::AddPetResponse : public Response
public:
virtual ~AddPetResponse() {}
void SetHttpResponseCode(EHttpResponseCodes::Type InHttpResponseCode) final;
- bool FromJson(const TSharedPtr& JsonObject) final;
+ bool FromJson(const TSharedPtr& JsonValue) final;
};
@@ -66,7 +66,7 @@ class OPENAPI_API OpenAPIPetApi::DeletePetResponse : public Response
public:
virtual ~DeletePetResponse() {}
void SetHttpResponseCode(EHttpResponseCodes::Type InHttpResponseCode) final;
- bool FromJson(const TSharedPtr& JsonObject) final;
+ bool FromJson(const TSharedPtr& JsonValue) final;
};
@@ -97,7 +97,7 @@ class OPENAPI_API OpenAPIPetApi::FindPetsByStatusResponse : public Response
public:
virtual ~FindPetsByStatusResponse() {}
void SetHttpResponseCode(EHttpResponseCodes::Type InHttpResponseCode) final;
- bool FromJson(const TSharedPtr& JsonObject) final;
+ bool FromJson(const TSharedPtr& JsonValue) final;
TArray Content;
};
@@ -122,7 +122,7 @@ class OPENAPI_API OpenAPIPetApi::FindPetsByTagsResponse : public Response
public:
virtual ~FindPetsByTagsResponse() {}
void SetHttpResponseCode(EHttpResponseCodes::Type InHttpResponseCode) final;
- bool FromJson(const TSharedPtr& JsonObject) final;
+ bool FromJson(const TSharedPtr& JsonValue) final;
TArray Content;
};
@@ -147,7 +147,7 @@ class OPENAPI_API OpenAPIPetApi::GetPetByIdResponse : public Response
public:
virtual ~GetPetByIdResponse() {}
void SetHttpResponseCode(EHttpResponseCodes::Type InHttpResponseCode) final;
- bool FromJson(const TSharedPtr& JsonObject) final;
+ bool FromJson(const TSharedPtr& JsonValue) final;
OpenAPIPet Content;
};
@@ -171,7 +171,7 @@ class OPENAPI_API OpenAPIPetApi::UpdatePetResponse : public Response
public:
virtual ~UpdatePetResponse() {}
void SetHttpResponseCode(EHttpResponseCodes::Type InHttpResponseCode) final;
- bool FromJson(const TSharedPtr& JsonObject) final;
+ bool FromJson(const TSharedPtr& JsonValue) final;
};
@@ -199,7 +199,7 @@ class OPENAPI_API OpenAPIPetApi::UpdatePetWithFormResponse : public Response
public:
virtual ~UpdatePetWithFormResponse() {}
void SetHttpResponseCode(EHttpResponseCodes::Type InHttpResponseCode) final;
- bool FromJson(const TSharedPtr& JsonObject) final;
+ bool FromJson(const TSharedPtr& JsonValue) final;
};
@@ -227,7 +227,7 @@ class OPENAPI_API OpenAPIPetApi::UploadFileResponse : public Response
public:
virtual ~UploadFileResponse() {}
void SetHttpResponseCode(EHttpResponseCodes::Type InHttpResponseCode) final;
- bool FromJson(const TSharedPtr& JsonObject) final;
+ bool FromJson(const TSharedPtr& JsonValue) final;
OpenAPIApiResponse Content;
};
diff --git a/samples/client/petstore/cpp-ue4/Public/OpenAPIStoreApiOperations.h b/samples/client/petstore/cpp-ue4/Public/OpenAPIStoreApiOperations.h
index 06e6809c185..84a4fd6cf0e 100644
--- a/samples/client/petstore/cpp-ue4/Public/OpenAPIStoreApiOperations.h
+++ b/samples/client/petstore/cpp-ue4/Public/OpenAPIStoreApiOperations.h
@@ -40,7 +40,7 @@ class OPENAPI_API OpenAPIStoreApi::DeleteOrderResponse : public Response
public:
virtual ~DeleteOrderResponse() {}
void SetHttpResponseCode(EHttpResponseCodes::Type InHttpResponseCode) final;
- bool FromJson(const TSharedPtr& JsonObject) final;
+ bool FromJson(const TSharedPtr& JsonValue) final;
};
@@ -63,7 +63,7 @@ class OPENAPI_API OpenAPIStoreApi::GetInventoryResponse : public Response
public:
virtual ~GetInventoryResponse() {}
void SetHttpResponseCode(EHttpResponseCodes::Type InHttpResponseCode) final;
- bool FromJson(const TSharedPtr& JsonObject) final;
+ bool FromJson(const TSharedPtr& JsonValue) final;
TMap Content;
};
@@ -88,7 +88,7 @@ class OPENAPI_API OpenAPIStoreApi::GetOrderByIdResponse : public Response
public:
virtual ~GetOrderByIdResponse() {}
void SetHttpResponseCode(EHttpResponseCodes::Type InHttpResponseCode) final;
- bool FromJson(const TSharedPtr& JsonObject) final;
+ bool FromJson(const TSharedPtr& JsonValue) final;
OpenAPIOrder Content;
};
@@ -112,7 +112,7 @@ class OPENAPI_API OpenAPIStoreApi::PlaceOrderResponse : public Response
public:
virtual ~PlaceOrderResponse() {}
void SetHttpResponseCode(EHttpResponseCodes::Type InHttpResponseCode) final;
- bool FromJson(const TSharedPtr& JsonObject) final;
+ bool FromJson(const TSharedPtr& JsonValue) final;
OpenAPIOrder Content;
};
diff --git a/samples/client/petstore/cpp-ue4/Public/OpenAPITag.h b/samples/client/petstore/cpp-ue4/Public/OpenAPITag.h
index 72bc6d130da..ab8a2646beb 100644
--- a/samples/client/petstore/cpp-ue4/Public/OpenAPITag.h
+++ b/samples/client/petstore/cpp-ue4/Public/OpenAPITag.h
@@ -26,7 +26,7 @@ class OPENAPI_API OpenAPITag : public Model
{
public:
virtual ~OpenAPITag() {}
- bool FromJson(const TSharedPtr& JsonObject) final;
+ bool FromJson(const TSharedPtr& JsonValue) final;
void WriteJson(JsonWriter& Writer) const final;
TOptional Id;
diff --git a/samples/client/petstore/cpp-ue4/Public/OpenAPIUser.h b/samples/client/petstore/cpp-ue4/Public/OpenAPIUser.h
index 55494d8ec0b..fe4e1affa9f 100644
--- a/samples/client/petstore/cpp-ue4/Public/OpenAPIUser.h
+++ b/samples/client/petstore/cpp-ue4/Public/OpenAPIUser.h
@@ -26,7 +26,7 @@ class OPENAPI_API OpenAPIUser : public Model
{
public:
virtual ~OpenAPIUser() {}
- bool FromJson(const TSharedPtr& JsonObject) final;
+ bool FromJson(const TSharedPtr& JsonValue) final;
void WriteJson(JsonWriter& Writer) const final;
TOptional Id;
diff --git a/samples/client/petstore/cpp-ue4/Public/OpenAPIUserApiOperations.h b/samples/client/petstore/cpp-ue4/Public/OpenAPIUserApiOperations.h
index 3e050a41ef0..8c287474ed3 100644
--- a/samples/client/petstore/cpp-ue4/Public/OpenAPIUserApiOperations.h
+++ b/samples/client/petstore/cpp-ue4/Public/OpenAPIUserApiOperations.h
@@ -40,7 +40,7 @@ class OPENAPI_API OpenAPIUserApi::CreateUserResponse : public Response
public:
virtual ~CreateUserResponse() {}
void SetHttpResponseCode(EHttpResponseCodes::Type InHttpResponseCode) final;
- bool FromJson(const TSharedPtr& JsonObject) final;
+ bool FromJson(const TSharedPtr& JsonValue) final;
};
@@ -64,7 +64,7 @@ class OPENAPI_API OpenAPIUserApi::CreateUsersWithArrayInputResponse : public Res
public:
virtual ~CreateUsersWithArrayInputResponse() {}
void SetHttpResponseCode(EHttpResponseCodes::Type InHttpResponseCode) final;
- bool FromJson(const TSharedPtr& JsonObject) final;
+ bool FromJson(const TSharedPtr& JsonValue) final;
};
@@ -88,7 +88,7 @@ class OPENAPI_API OpenAPIUserApi::CreateUsersWithListInputResponse : public Resp
public:
virtual ~CreateUsersWithListInputResponse() {}
void SetHttpResponseCode(EHttpResponseCodes::Type InHttpResponseCode) final;
- bool FromJson(const TSharedPtr& JsonObject) final;
+ bool FromJson(const TSharedPtr& JsonValue) final;
};
@@ -113,7 +113,7 @@ class OPENAPI_API OpenAPIUserApi::DeleteUserResponse : public Response
public:
virtual ~DeleteUserResponse() {}
void SetHttpResponseCode(EHttpResponseCodes::Type InHttpResponseCode) final;
- bool FromJson(const TSharedPtr& JsonObject) final;
+ bool FromJson(const TSharedPtr& JsonValue) final;
};
@@ -137,7 +137,7 @@ class OPENAPI_API OpenAPIUserApi::GetUserByNameResponse : public Response
public:
virtual ~GetUserByNameResponse() {}
void SetHttpResponseCode(EHttpResponseCodes::Type InHttpResponseCode) final;
- bool FromJson(const TSharedPtr& JsonObject) final;
+ bool FromJson(const TSharedPtr& JsonValue) final;
OpenAPIUser Content;
};
@@ -163,7 +163,7 @@ class OPENAPI_API OpenAPIUserApi::LoginUserResponse : public Response
public:
virtual ~LoginUserResponse() {}
void SetHttpResponseCode(EHttpResponseCodes::Type InHttpResponseCode) final;
- bool FromJson(const TSharedPtr& JsonObject) final;
+ bool FromJson(const TSharedPtr& JsonValue) final;
FString Content;
};
@@ -185,7 +185,7 @@ class OPENAPI_API OpenAPIUserApi::LogoutUserResponse : public Response
public:
virtual ~LogoutUserResponse() {}
void SetHttpResponseCode(EHttpResponseCodes::Type InHttpResponseCode) final;
- bool FromJson(const TSharedPtr& JsonObject) final;
+ bool FromJson(const TSharedPtr& JsonValue) final;
};
@@ -212,7 +212,7 @@ class OPENAPI_API OpenAPIUserApi::UpdateUserResponse : public Response
public:
virtual ~UpdateUserResponse() {}
void SetHttpResponseCode(EHttpResponseCodes::Type InHttpResponseCode) final;
- bool FromJson(const TSharedPtr& JsonObject) final;
+ bool FromJson(const TSharedPtr& JsonValue) final;
};
diff --git a/samples/client/petstore/go-experimental/go-petstore/model_200_response.go b/samples/client/petstore/go-experimental/go-petstore/model_200_response.go
index 0eea6ec0447..c23c13c54c2 100644
--- a/samples/client/petstore/go-experimental/go-petstore/model_200_response.go
+++ b/samples/client/petstore/go-experimental/go-petstore/model_200_response.go
@@ -147,3 +147,4 @@ func (v *NullableModel200Response) UnmarshalJSON(src []byte) error {
return json.Unmarshal(src, &v.value)
}
+
diff --git a/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_any_type.go b/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_any_type.go
index 9618b3d2a26..59e7a4dec0a 100644
--- a/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_any_type.go
+++ b/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_any_type.go
@@ -16,8 +16,11 @@ import (
// AdditionalPropertiesAnyType struct for AdditionalPropertiesAnyType
type AdditionalPropertiesAnyType struct {
Name *string `json:"name,omitempty"`
+ AdditionalProperties map[string]interface{}
}
+type _AdditionalPropertiesAnyType AdditionalPropertiesAnyType
+
// NewAdditionalPropertiesAnyType instantiates a new AdditionalPropertiesAnyType object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
@@ -72,9 +75,31 @@ func (o AdditionalPropertiesAnyType) MarshalJSON() ([]byte, error) {
if o.Name != nil {
toSerialize["name"] = o.Name
}
+
+ for key, value := range o.AdditionalProperties {
+ toSerialize[key] = value
+ }
+
return json.Marshal(toSerialize)
}
+func (o *AdditionalPropertiesAnyType) UnmarshalJSON(bytes []byte) (err error) {
+ varAdditionalPropertiesAnyType := _AdditionalPropertiesAnyType{}
+
+ if err = json.Unmarshal(bytes, &varAdditionalPropertiesAnyType); err == nil {
+ *o = AdditionalPropertiesAnyType(varAdditionalPropertiesAnyType)
+ }
+
+ additionalProperties := make(map[string]interface{})
+
+ if err = json.Unmarshal(bytes, &additionalProperties); err == nil {
+ delete(additionalProperties, "name")
+ o.AdditionalProperties = additionalProperties
+ }
+
+ return err
+}
+
type NullableAdditionalPropertiesAnyType struct {
value *AdditionalPropertiesAnyType
isSet bool
@@ -111,3 +136,4 @@ func (v *NullableAdditionalPropertiesAnyType) UnmarshalJSON(src []byte) error {
return json.Unmarshal(src, &v.value)
}
+
diff --git a/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_array.go b/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_array.go
index 32b38620ad4..7952e9cd56a 100644
--- a/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_array.go
+++ b/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_array.go
@@ -111,3 +111,4 @@ func (v *NullableAdditionalPropertiesArray) UnmarshalJSON(src []byte) error {
return json.Unmarshal(src, &v.value)
}
+
diff --git a/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_boolean.go b/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_boolean.go
index 098e83c9c42..f64d9633a47 100644
--- a/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_boolean.go
+++ b/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_boolean.go
@@ -111,3 +111,4 @@ func (v *NullableAdditionalPropertiesBoolean) UnmarshalJSON(src []byte) error {
return json.Unmarshal(src, &v.value)
}
+
diff --git a/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_class.go b/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_class.go
index 046e91b9075..d60a6889b74 100644
--- a/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_class.go
+++ b/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_class.go
@@ -471,3 +471,4 @@ func (v *NullableAdditionalPropertiesClass) UnmarshalJSON(src []byte) error {
return json.Unmarshal(src, &v.value)
}
+
diff --git a/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_integer.go b/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_integer.go
index dfedb1bc545..eeb60fc08db 100644
--- a/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_integer.go
+++ b/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_integer.go
@@ -111,3 +111,4 @@ func (v *NullableAdditionalPropertiesInteger) UnmarshalJSON(src []byte) error {
return json.Unmarshal(src, &v.value)
}
+
diff --git a/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_number.go b/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_number.go
index 10428e020c0..bd385cbe088 100644
--- a/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_number.go
+++ b/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_number.go
@@ -111,3 +111,4 @@ func (v *NullableAdditionalPropertiesNumber) UnmarshalJSON(src []byte) error {
return json.Unmarshal(src, &v.value)
}
+
diff --git a/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_object.go b/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_object.go
index 6f16a067a4a..69fb5e31044 100644
--- a/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_object.go
+++ b/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_object.go
@@ -111,3 +111,4 @@ func (v *NullableAdditionalPropertiesObject) UnmarshalJSON(src []byte) error {
return json.Unmarshal(src, &v.value)
}
+
diff --git a/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_string.go b/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_string.go
index b3f971dd13a..54928c3a1c9 100644
--- a/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_string.go
+++ b/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_string.go
@@ -111,3 +111,4 @@ func (v *NullableAdditionalPropertiesString) UnmarshalJSON(src []byte) error {
return json.Unmarshal(src, &v.value)
}
+
diff --git a/samples/client/petstore/go-experimental/go-petstore/model_animal.go b/samples/client/petstore/go-experimental/go-petstore/model_animal.go
index a1a7f99db9d..5aa1f60f02f 100644
--- a/samples/client/petstore/go-experimental/go-petstore/model_animal.go
+++ b/samples/client/petstore/go-experimental/go-petstore/model_animal.go
@@ -144,3 +144,4 @@ func (v *NullableAnimal) UnmarshalJSON(src []byte) error {
return json.Unmarshal(src, &v.value)
}
+
diff --git a/samples/client/petstore/go-experimental/go-petstore/model_api_response.go b/samples/client/petstore/go-experimental/go-petstore/model_api_response.go
index f66dd2b120d..17bf558d1c9 100644
--- a/samples/client/petstore/go-experimental/go-petstore/model_api_response.go
+++ b/samples/client/petstore/go-experimental/go-petstore/model_api_response.go
@@ -183,3 +183,4 @@ func (v *NullableApiResponse) UnmarshalJSON(src []byte) error {
return json.Unmarshal(src, &v.value)
}
+
diff --git a/samples/client/petstore/go-experimental/go-petstore/model_array_of_array_of_number_only.go b/samples/client/petstore/go-experimental/go-petstore/model_array_of_array_of_number_only.go
index 27cc790083d..6b81323ac4d 100644
--- a/samples/client/petstore/go-experimental/go-petstore/model_array_of_array_of_number_only.go
+++ b/samples/client/petstore/go-experimental/go-petstore/model_array_of_array_of_number_only.go
@@ -111,3 +111,4 @@ func (v *NullableArrayOfArrayOfNumberOnly) UnmarshalJSON(src []byte) error {
return json.Unmarshal(src, &v.value)
}
+
diff --git a/samples/client/petstore/go-experimental/go-petstore/model_array_of_number_only.go b/samples/client/petstore/go-experimental/go-petstore/model_array_of_number_only.go
index ba3cdec1dde..f43bffc1c87 100644
--- a/samples/client/petstore/go-experimental/go-petstore/model_array_of_number_only.go
+++ b/samples/client/petstore/go-experimental/go-petstore/model_array_of_number_only.go
@@ -111,3 +111,4 @@ func (v *NullableArrayOfNumberOnly) UnmarshalJSON(src []byte) error {
return json.Unmarshal(src, &v.value)
}
+
diff --git a/samples/client/petstore/go-experimental/go-petstore/model_array_test_.go b/samples/client/petstore/go-experimental/go-petstore/model_array_test_.go
index bcb08067162..42e2be66d62 100644
--- a/samples/client/petstore/go-experimental/go-petstore/model_array_test_.go
+++ b/samples/client/petstore/go-experimental/go-petstore/model_array_test_.go
@@ -183,3 +183,4 @@ func (v *NullableArrayTest) UnmarshalJSON(src []byte) error {
return json.Unmarshal(src, &v.value)
}
+
diff --git a/samples/client/petstore/go-experimental/go-petstore/model_big_cat.go b/samples/client/petstore/go-experimental/go-petstore/model_big_cat.go
index f4457f7a83c..27b8085b241 100644
--- a/samples/client/petstore/go-experimental/go-petstore/model_big_cat.go
+++ b/samples/client/petstore/go-experimental/go-petstore/model_big_cat.go
@@ -120,3 +120,4 @@ func (v *NullableBigCat) UnmarshalJSON(src []byte) error {
return json.Unmarshal(src, &v.value)
}
+
diff --git a/samples/client/petstore/go-experimental/go-petstore/model_big_cat_all_of.go b/samples/client/petstore/go-experimental/go-petstore/model_big_cat_all_of.go
index f5594871944..6434cd11d7c 100644
--- a/samples/client/petstore/go-experimental/go-petstore/model_big_cat_all_of.go
+++ b/samples/client/petstore/go-experimental/go-petstore/model_big_cat_all_of.go
@@ -111,3 +111,4 @@ func (v *NullableBigCatAllOf) UnmarshalJSON(src []byte) error {
return json.Unmarshal(src, &v.value)
}
+
diff --git a/samples/client/petstore/go-experimental/go-petstore/model_capitalization.go b/samples/client/petstore/go-experimental/go-petstore/model_capitalization.go
index 782bbab9b1f..7f2c90863e0 100644
--- a/samples/client/petstore/go-experimental/go-petstore/model_capitalization.go
+++ b/samples/client/petstore/go-experimental/go-petstore/model_capitalization.go
@@ -292,3 +292,4 @@ func (v *NullableCapitalization) UnmarshalJSON(src []byte) error {
return json.Unmarshal(src, &v.value)
}
+
diff --git a/samples/client/petstore/go-experimental/go-petstore/model_cat.go b/samples/client/petstore/go-experimental/go-petstore/model_cat.go
index 6f7425873cd..d6573c99bac 100644
--- a/samples/client/petstore/go-experimental/go-petstore/model_cat.go
+++ b/samples/client/petstore/go-experimental/go-petstore/model_cat.go
@@ -120,3 +120,4 @@ func (v *NullableCat) UnmarshalJSON(src []byte) error {
return json.Unmarshal(src, &v.value)
}
+
diff --git a/samples/client/petstore/go-experimental/go-petstore/model_cat_all_of.go b/samples/client/petstore/go-experimental/go-petstore/model_cat_all_of.go
index 2efc62d2022..643ba03973f 100644
--- a/samples/client/petstore/go-experimental/go-petstore/model_cat_all_of.go
+++ b/samples/client/petstore/go-experimental/go-petstore/model_cat_all_of.go
@@ -111,3 +111,4 @@ func (v *NullableCatAllOf) UnmarshalJSON(src []byte) error {
return json.Unmarshal(src, &v.value)
}
+
diff --git a/samples/client/petstore/go-experimental/go-petstore/model_category.go b/samples/client/petstore/go-experimental/go-petstore/model_category.go
index e00cc7ba84b..0c462889533 100644
--- a/samples/client/petstore/go-experimental/go-petstore/model_category.go
+++ b/samples/client/petstore/go-experimental/go-petstore/model_category.go
@@ -142,3 +142,4 @@ func (v *NullableCategory) UnmarshalJSON(src []byte) error {
return json.Unmarshal(src, &v.value)
}
+
diff --git a/samples/client/petstore/go-experimental/go-petstore/model_class_model.go b/samples/client/petstore/go-experimental/go-petstore/model_class_model.go
index 5213ad9d879..7236de0ee07 100644
--- a/samples/client/petstore/go-experimental/go-petstore/model_class_model.go
+++ b/samples/client/petstore/go-experimental/go-petstore/model_class_model.go
@@ -111,3 +111,4 @@ func (v *NullableClassModel) UnmarshalJSON(src []byte) error {
return json.Unmarshal(src, &v.value)
}
+
diff --git a/samples/client/petstore/go-experimental/go-petstore/model_client.go b/samples/client/petstore/go-experimental/go-petstore/model_client.go
index d1b9ffcc287..edfdde067ef 100644
--- a/samples/client/petstore/go-experimental/go-petstore/model_client.go
+++ b/samples/client/petstore/go-experimental/go-petstore/model_client.go
@@ -111,3 +111,4 @@ func (v *NullableClient) UnmarshalJSON(src []byte) error {
return json.Unmarshal(src, &v.value)
}
+
diff --git a/samples/client/petstore/go-experimental/go-petstore/model_dog.go b/samples/client/petstore/go-experimental/go-petstore/model_dog.go
index 12a5bee4876..ebbedeec53e 100644
--- a/samples/client/petstore/go-experimental/go-petstore/model_dog.go
+++ b/samples/client/petstore/go-experimental/go-petstore/model_dog.go
@@ -120,3 +120,4 @@ func (v *NullableDog) UnmarshalJSON(src []byte) error {
return json.Unmarshal(src, &v.value)
}
+
diff --git a/samples/client/petstore/go-experimental/go-petstore/model_dog_all_of.go b/samples/client/petstore/go-experimental/go-petstore/model_dog_all_of.go
index a5a791e50f0..c13aa2b2cd5 100644
--- a/samples/client/petstore/go-experimental/go-petstore/model_dog_all_of.go
+++ b/samples/client/petstore/go-experimental/go-petstore/model_dog_all_of.go
@@ -111,3 +111,4 @@ func (v *NullableDogAllOf) UnmarshalJSON(src []byte) error {
return json.Unmarshal(src, &v.value)
}
+
diff --git a/samples/client/petstore/go-experimental/go-petstore/model_enum_arrays.go b/samples/client/petstore/go-experimental/go-petstore/model_enum_arrays.go
index 1fbadb34e71..b18984ce730 100644
--- a/samples/client/petstore/go-experimental/go-petstore/model_enum_arrays.go
+++ b/samples/client/petstore/go-experimental/go-petstore/model_enum_arrays.go
@@ -147,3 +147,4 @@ func (v *NullableEnumArrays) UnmarshalJSON(src []byte) error {
return json.Unmarshal(src, &v.value)
}
+
diff --git a/samples/client/petstore/go-experimental/go-petstore/model_enum_test_.go b/samples/client/petstore/go-experimental/go-petstore/model_enum_test_.go
index 852dd860739..c39d045e5a6 100644
--- a/samples/client/petstore/go-experimental/go-petstore/model_enum_test_.go
+++ b/samples/client/petstore/go-experimental/go-petstore/model_enum_test_.go
@@ -248,3 +248,4 @@ func (v *NullableEnumTest) UnmarshalJSON(src []byte) error {
return json.Unmarshal(src, &v.value)
}
+
diff --git a/samples/client/petstore/go-experimental/go-petstore/model_file.go b/samples/client/petstore/go-experimental/go-petstore/model_file.go
index d7a50dc683a..43ec19f8638 100644
--- a/samples/client/petstore/go-experimental/go-petstore/model_file.go
+++ b/samples/client/petstore/go-experimental/go-petstore/model_file.go
@@ -112,3 +112,4 @@ func (v *NullableFile) UnmarshalJSON(src []byte) error {
return json.Unmarshal(src, &v.value)
}
+
diff --git a/samples/client/petstore/go-experimental/go-petstore/model_file_schema_test_class.go b/samples/client/petstore/go-experimental/go-petstore/model_file_schema_test_class.go
index 887cd35c752..626a3765173 100644
--- a/samples/client/petstore/go-experimental/go-petstore/model_file_schema_test_class.go
+++ b/samples/client/petstore/go-experimental/go-petstore/model_file_schema_test_class.go
@@ -147,3 +147,4 @@ func (v *NullableFileSchemaTestClass) UnmarshalJSON(src []byte) error {
return json.Unmarshal(src, &v.value)
}
+
diff --git a/samples/client/petstore/go-experimental/go-petstore/model_format_test_.go b/samples/client/petstore/go-experimental/go-petstore/model_format_test_.go
index dbccde98dc4..aa1889aedda 100644
--- a/samples/client/petstore/go-experimental/go-petstore/model_format_test_.go
+++ b/samples/client/petstore/go-experimental/go-petstore/model_format_test_.go
@@ -553,3 +553,4 @@ func (v *NullableFormatTest) UnmarshalJSON(src []byte) error {
return json.Unmarshal(src, &v.value)
}
+
diff --git a/samples/client/petstore/go-experimental/go-petstore/model_has_only_read_only.go b/samples/client/petstore/go-experimental/go-petstore/model_has_only_read_only.go
index 0aa39e6de8c..3400c73dca6 100644
--- a/samples/client/petstore/go-experimental/go-petstore/model_has_only_read_only.go
+++ b/samples/client/petstore/go-experimental/go-petstore/model_has_only_read_only.go
@@ -147,3 +147,4 @@ func (v *NullableHasOnlyReadOnly) UnmarshalJSON(src []byte) error {
return json.Unmarshal(src, &v.value)
}
+
diff --git a/samples/client/petstore/go-experimental/go-petstore/model_list.go b/samples/client/petstore/go-experimental/go-petstore/model_list.go
index 7966d7b337c..f49afaa71f3 100644
--- a/samples/client/petstore/go-experimental/go-petstore/model_list.go
+++ b/samples/client/petstore/go-experimental/go-petstore/model_list.go
@@ -111,3 +111,4 @@ func (v *NullableList) UnmarshalJSON(src []byte) error {
return json.Unmarshal(src, &v.value)
}
+
diff --git a/samples/client/petstore/go-experimental/go-petstore/model_map_test_.go b/samples/client/petstore/go-experimental/go-petstore/model_map_test_.go
index 42724f8d875..4fc2c0b4799 100644
--- a/samples/client/petstore/go-experimental/go-petstore/model_map_test_.go
+++ b/samples/client/petstore/go-experimental/go-petstore/model_map_test_.go
@@ -219,3 +219,4 @@ func (v *NullableMapTest) UnmarshalJSON(src []byte) error {
return json.Unmarshal(src, &v.value)
}
+
diff --git a/samples/client/petstore/go-experimental/go-petstore/model_mixed_properties_and_additional_properties_class.go b/samples/client/petstore/go-experimental/go-petstore/model_mixed_properties_and_additional_properties_class.go
index 21b7cb60ab4..69cc134169e 100644
--- a/samples/client/petstore/go-experimental/go-petstore/model_mixed_properties_and_additional_properties_class.go
+++ b/samples/client/petstore/go-experimental/go-petstore/model_mixed_properties_and_additional_properties_class.go
@@ -184,3 +184,4 @@ func (v *NullableMixedPropertiesAndAdditionalPropertiesClass) UnmarshalJSON(src
return json.Unmarshal(src, &v.value)
}
+
diff --git a/samples/client/petstore/go-experimental/go-petstore/model_name.go b/samples/client/petstore/go-experimental/go-petstore/model_name.go
index f910dc37c0c..82e49591874 100644
--- a/samples/client/petstore/go-experimental/go-petstore/model_name.go
+++ b/samples/client/petstore/go-experimental/go-petstore/model_name.go
@@ -212,3 +212,4 @@ func (v *NullableName) UnmarshalJSON(src []byte) error {
return json.Unmarshal(src, &v.value)
}
+
diff --git a/samples/client/petstore/go-experimental/go-petstore/model_number_only.go b/samples/client/petstore/go-experimental/go-petstore/model_number_only.go
index 6307b2871e9..efa8b66a5bc 100644
--- a/samples/client/petstore/go-experimental/go-petstore/model_number_only.go
+++ b/samples/client/petstore/go-experimental/go-petstore/model_number_only.go
@@ -111,3 +111,4 @@ func (v *NullableNumberOnly) UnmarshalJSON(src []byte) error {
return json.Unmarshal(src, &v.value)
}
+
diff --git a/samples/client/petstore/go-experimental/go-petstore/model_order.go b/samples/client/petstore/go-experimental/go-petstore/model_order.go
index 797c8e9236f..b20a1429848 100644
--- a/samples/client/petstore/go-experimental/go-petstore/model_order.go
+++ b/samples/client/petstore/go-experimental/go-petstore/model_order.go
@@ -297,3 +297,4 @@ func (v *NullableOrder) UnmarshalJSON(src []byte) error {
return json.Unmarshal(src, &v.value)
}
+
diff --git a/samples/client/petstore/go-experimental/go-petstore/model_outer_composite.go b/samples/client/petstore/go-experimental/go-petstore/model_outer_composite.go
index 88049de0dac..9a76c753b64 100644
--- a/samples/client/petstore/go-experimental/go-petstore/model_outer_composite.go
+++ b/samples/client/petstore/go-experimental/go-petstore/model_outer_composite.go
@@ -183,3 +183,4 @@ func (v *NullableOuterComposite) UnmarshalJSON(src []byte) error {
return json.Unmarshal(src, &v.value)
}
+
diff --git a/samples/client/petstore/go-experimental/go-petstore/model_pet.go b/samples/client/petstore/go-experimental/go-petstore/model_pet.go
index 876af8724d7..8bc4457fc37 100644
--- a/samples/client/petstore/go-experimental/go-petstore/model_pet.go
+++ b/samples/client/petstore/go-experimental/go-petstore/model_pet.go
@@ -278,3 +278,4 @@ func (v *NullablePet) UnmarshalJSON(src []byte) error {
return json.Unmarshal(src, &v.value)
}
+
diff --git a/samples/client/petstore/go-experimental/go-petstore/model_read_only_first.go b/samples/client/petstore/go-experimental/go-petstore/model_read_only_first.go
index af6291b4c82..dd00212c1d0 100644
--- a/samples/client/petstore/go-experimental/go-petstore/model_read_only_first.go
+++ b/samples/client/petstore/go-experimental/go-petstore/model_read_only_first.go
@@ -147,3 +147,4 @@ func (v *NullableReadOnlyFirst) UnmarshalJSON(src []byte) error {
return json.Unmarshal(src, &v.value)
}
+
diff --git a/samples/client/petstore/go-experimental/go-petstore/model_return.go b/samples/client/petstore/go-experimental/go-petstore/model_return.go
index e6350da030c..2ed729e12ec 100644
--- a/samples/client/petstore/go-experimental/go-petstore/model_return.go
+++ b/samples/client/petstore/go-experimental/go-petstore/model_return.go
@@ -111,3 +111,4 @@ func (v *NullableReturn) UnmarshalJSON(src []byte) error {
return json.Unmarshal(src, &v.value)
}
+
diff --git a/samples/client/petstore/go-experimental/go-petstore/model_special_model_name.go b/samples/client/petstore/go-experimental/go-petstore/model_special_model_name.go
index e50eb5d32d1..bbef383b796 100644
--- a/samples/client/petstore/go-experimental/go-petstore/model_special_model_name.go
+++ b/samples/client/petstore/go-experimental/go-petstore/model_special_model_name.go
@@ -111,3 +111,4 @@ func (v *NullableSpecialModelName) UnmarshalJSON(src []byte) error {
return json.Unmarshal(src, &v.value)
}
+
diff --git a/samples/client/petstore/go-experimental/go-petstore/model_tag.go b/samples/client/petstore/go-experimental/go-petstore/model_tag.go
index 0f8157a6b7a..99135ba946b 100644
--- a/samples/client/petstore/go-experimental/go-petstore/model_tag.go
+++ b/samples/client/petstore/go-experimental/go-petstore/model_tag.go
@@ -147,3 +147,4 @@ func (v *NullableTag) UnmarshalJSON(src []byte) error {
return json.Unmarshal(src, &v.value)
}
+
diff --git a/samples/client/petstore/go-experimental/go-petstore/model_type_holder_default.go b/samples/client/petstore/go-experimental/go-petstore/model_type_holder_default.go
index 3ff4e709be1..d45748bf769 100644
--- a/samples/client/petstore/go-experimental/go-petstore/model_type_holder_default.go
+++ b/samples/client/petstore/go-experimental/go-petstore/model_type_holder_default.go
@@ -224,3 +224,4 @@ func (v *NullableTypeHolderDefault) UnmarshalJSON(src []byte) error {
return json.Unmarshal(src, &v.value)
}
+
diff --git a/samples/client/petstore/go-experimental/go-petstore/model_type_holder_example.go b/samples/client/petstore/go-experimental/go-petstore/model_type_holder_example.go
index 4996f734edc..3f74c433f71 100644
--- a/samples/client/petstore/go-experimental/go-petstore/model_type_holder_example.go
+++ b/samples/client/petstore/go-experimental/go-petstore/model_type_holder_example.go
@@ -249,3 +249,4 @@ func (v *NullableTypeHolderExample) UnmarshalJSON(src []byte) error {
return json.Unmarshal(src, &v.value)
}
+
diff --git a/samples/client/petstore/go-experimental/go-petstore/model_user.go b/samples/client/petstore/go-experimental/go-petstore/model_user.go
index 29f2e3f2652..7dff4e8b36b 100644
--- a/samples/client/petstore/go-experimental/go-petstore/model_user.go
+++ b/samples/client/petstore/go-experimental/go-petstore/model_user.go
@@ -364,3 +364,4 @@ func (v *NullableUser) UnmarshalJSON(src []byte) error {
return json.Unmarshal(src, &v.value)
}
+
diff --git a/samples/client/petstore/go-experimental/go-petstore/model_xml_item.go b/samples/client/petstore/go-experimental/go-petstore/model_xml_item.go
index 1d78601f060..8bf7f3ef707 100644
--- a/samples/client/petstore/go-experimental/go-petstore/model_xml_item.go
+++ b/samples/client/petstore/go-experimental/go-petstore/model_xml_item.go
@@ -1119,3 +1119,4 @@ func (v *NullableXmlItem) UnmarshalJSON(src []byte) error {
return json.Unmarshal(src, &v.value)
}
+
diff --git a/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/src/main/kotlin/org/openapitools/client/models/ApiResponse.kt b/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/src/main/kotlin/org/openapitools/client/models/ApiResponse.kt
index b4c9c9b7674..83b19bd556f 100644
--- a/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/src/main/kotlin/org/openapitools/client/models/ApiResponse.kt
+++ b/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/src/main/kotlin/org/openapitools/client/models/ApiResponse.kt
@@ -29,9 +29,9 @@ data class ApiResponse (
@SerializedName("message")
val message: kotlin.String? = null
) : Serializable {
- companion object {
- private const val serialVersionUID: Long = 123
- }
+ companion object {
+ private const val serialVersionUID: Long = 123
+ }
}
diff --git a/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/src/main/kotlin/org/openapitools/client/models/Category.kt b/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/src/main/kotlin/org/openapitools/client/models/Category.kt
index 6dfe689dd04..60962ece7d4 100644
--- a/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/src/main/kotlin/org/openapitools/client/models/Category.kt
+++ b/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/src/main/kotlin/org/openapitools/client/models/Category.kt
@@ -26,9 +26,9 @@ data class Category (
@SerializedName("name")
val name: kotlin.String? = null
) : Serializable {
- companion object {
- private const val serialVersionUID: Long = 123
- }
+ companion object {
+ private const val serialVersionUID: Long = 123
+ }
}
diff --git a/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/src/main/kotlin/org/openapitools/client/models/Order.kt b/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/src/main/kotlin/org/openapitools/client/models/Order.kt
index 0a049435cdb..474530938cf 100644
--- a/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/src/main/kotlin/org/openapitools/client/models/Order.kt
+++ b/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/src/main/kotlin/org/openapitools/client/models/Order.kt
@@ -39,9 +39,9 @@ data class Order (
@SerializedName("complete")
val complete: kotlin.Boolean? = null
) : Serializable {
- companion object {
- private const val serialVersionUID: Long = 123
- }
+ companion object {
+ private const val serialVersionUID: Long = 123
+ }
/**
* Order Status
diff --git a/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/src/main/kotlin/org/openapitools/client/models/Pet.kt b/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/src/main/kotlin/org/openapitools/client/models/Pet.kt
index 0290ccbb124..2fc4113d205 100644
--- a/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/src/main/kotlin/org/openapitools/client/models/Pet.kt
+++ b/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/src/main/kotlin/org/openapitools/client/models/Pet.kt
@@ -41,9 +41,9 @@ data class Pet (
@SerializedName("status")
val status: Pet.Status? = null
) : Serializable {
- companion object {
- private const val serialVersionUID: Long = 123
- }
+ companion object {
+ private const val serialVersionUID: Long = 123
+ }
/**
* pet status in the store
diff --git a/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/src/main/kotlin/org/openapitools/client/models/Tag.kt b/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/src/main/kotlin/org/openapitools/client/models/Tag.kt
index 68c1ca9365f..0e178691762 100644
--- a/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/src/main/kotlin/org/openapitools/client/models/Tag.kt
+++ b/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/src/main/kotlin/org/openapitools/client/models/Tag.kt
@@ -26,9 +26,9 @@ data class Tag (
@SerializedName("name")
val name: kotlin.String? = null
) : Serializable {
- companion object {
- private const val serialVersionUID: Long = 123
- }
+ companion object {
+ private const val serialVersionUID: Long = 123
+ }
}
diff --git a/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/src/main/kotlin/org/openapitools/client/models/User.kt b/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/src/main/kotlin/org/openapitools/client/models/User.kt
index 32eaba94d25..daa32971736 100644
--- a/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/src/main/kotlin/org/openapitools/client/models/User.kt
+++ b/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/src/main/kotlin/org/openapitools/client/models/User.kt
@@ -45,9 +45,9 @@ data class User (
@SerializedName("userStatus")
val userStatus: kotlin.Int? = null
) : Serializable {
- companion object {
- private const val serialVersionUID: Long = 123
- }
+ companion object {
+ private const val serialVersionUID: Long = 123
+ }
}
diff --git a/samples/client/petstore/kotlin-nullable/src/main/kotlin/org/openapitools/client/models/ApiResponse.kt b/samples/client/petstore/kotlin-nullable/src/main/kotlin/org/openapitools/client/models/ApiResponse.kt
index eed5027e801..3c715519085 100644
--- a/samples/client/petstore/kotlin-nullable/src/main/kotlin/org/openapitools/client/models/ApiResponse.kt
+++ b/samples/client/petstore/kotlin-nullable/src/main/kotlin/org/openapitools/client/models/ApiResponse.kt
@@ -29,9 +29,9 @@ data class ApiResponse (
@Json(name = "message")
val message: kotlin.String? = null
) : Serializable {
- companion object {
- private const val serialVersionUID: Long = 123
- }
+ companion object {
+ private const val serialVersionUID: Long = 123
+ }
}
diff --git a/samples/client/petstore/kotlin-nullable/src/main/kotlin/org/openapitools/client/models/Category.kt b/samples/client/petstore/kotlin-nullable/src/main/kotlin/org/openapitools/client/models/Category.kt
index f29e6833057..07955e4ff49 100644
--- a/samples/client/petstore/kotlin-nullable/src/main/kotlin/org/openapitools/client/models/Category.kt
+++ b/samples/client/petstore/kotlin-nullable/src/main/kotlin/org/openapitools/client/models/Category.kt
@@ -26,9 +26,9 @@ data class Category (
@Json(name = "name")
val name: kotlin.String? = null
) : Serializable {
- companion object {
- private const val serialVersionUID: Long = 123
- }
+ companion object {
+ private const val serialVersionUID: Long = 123
+ }
}
diff --git a/samples/client/petstore/kotlin-nullable/src/main/kotlin/org/openapitools/client/models/Order.kt b/samples/client/petstore/kotlin-nullable/src/main/kotlin/org/openapitools/client/models/Order.kt
index 2b92b4375d1..d5048059d44 100644
--- a/samples/client/petstore/kotlin-nullable/src/main/kotlin/org/openapitools/client/models/Order.kt
+++ b/samples/client/petstore/kotlin-nullable/src/main/kotlin/org/openapitools/client/models/Order.kt
@@ -39,9 +39,9 @@ data class Order (
@Json(name = "complete")
val complete: kotlin.Boolean? = null
) : Serializable {
- companion object {
- private const val serialVersionUID: Long = 123
- }
+ companion object {
+ private const val serialVersionUID: Long = 123
+ }
/**
* Order Status
diff --git a/samples/client/petstore/kotlin-nullable/src/main/kotlin/org/openapitools/client/models/Pet.kt b/samples/client/petstore/kotlin-nullable/src/main/kotlin/org/openapitools/client/models/Pet.kt
index bb0a5df6e19..0f72fb6bd36 100644
--- a/samples/client/petstore/kotlin-nullable/src/main/kotlin/org/openapitools/client/models/Pet.kt
+++ b/samples/client/petstore/kotlin-nullable/src/main/kotlin/org/openapitools/client/models/Pet.kt
@@ -41,9 +41,9 @@ data class Pet (
@Json(name = "status")
val status: Pet.Status? = null
) : Serializable {
- companion object {
- private const val serialVersionUID: Long = 123
- }
+ companion object {
+ private const val serialVersionUID: Long = 123
+ }
/**
* pet status in the store
diff --git a/samples/client/petstore/kotlin-nullable/src/main/kotlin/org/openapitools/client/models/Tag.kt b/samples/client/petstore/kotlin-nullable/src/main/kotlin/org/openapitools/client/models/Tag.kt
index aa93e435695..fa228fbe1f4 100644
--- a/samples/client/petstore/kotlin-nullable/src/main/kotlin/org/openapitools/client/models/Tag.kt
+++ b/samples/client/petstore/kotlin-nullable/src/main/kotlin/org/openapitools/client/models/Tag.kt
@@ -26,9 +26,9 @@ data class Tag (
@Json(name = "name")
val name: kotlin.String? = null
) : Serializable {
- companion object {
- private const val serialVersionUID: Long = 123
- }
+ companion object {
+ private const val serialVersionUID: Long = 123
+ }
}
diff --git a/samples/client/petstore/kotlin-nullable/src/main/kotlin/org/openapitools/client/models/User.kt b/samples/client/petstore/kotlin-nullable/src/main/kotlin/org/openapitools/client/models/User.kt
index 7487ed927d1..d02cbd91abd 100644
--- a/samples/client/petstore/kotlin-nullable/src/main/kotlin/org/openapitools/client/models/User.kt
+++ b/samples/client/petstore/kotlin-nullable/src/main/kotlin/org/openapitools/client/models/User.kt
@@ -45,9 +45,9 @@ data class User (
@Json(name = "userStatus")
val userStatus: kotlin.Int? = null
) : Serializable {
- companion object {
- private const val serialVersionUID: Long = 123
- }
+ companion object {
+ private const val serialVersionUID: Long = 123
+ }
}
diff --git a/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/models/ApiResponse.kt b/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/models/ApiResponse.kt
index eed5027e801..3c715519085 100644
--- a/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/models/ApiResponse.kt
+++ b/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/models/ApiResponse.kt
@@ -29,9 +29,9 @@ data class ApiResponse (
@Json(name = "message")
val message: kotlin.String? = null
) : Serializable {
- companion object {
- private const val serialVersionUID: Long = 123
- }
+ companion object {
+ private const val serialVersionUID: Long = 123
+ }
}
diff --git a/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/models/Category.kt b/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/models/Category.kt
index f29e6833057..07955e4ff49 100644
--- a/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/models/Category.kt
+++ b/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/models/Category.kt
@@ -26,9 +26,9 @@ data class Category (
@Json(name = "name")
val name: kotlin.String? = null
) : Serializable {
- companion object {
- private const val serialVersionUID: Long = 123
- }
+ companion object {
+ private const val serialVersionUID: Long = 123
+ }
}
diff --git a/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/models/Order.kt b/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/models/Order.kt
index 847b3ff5e28..c71bb5bda0d 100644
--- a/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/models/Order.kt
+++ b/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/models/Order.kt
@@ -39,9 +39,9 @@ data class Order (
@Json(name = "complete")
val complete: kotlin.Boolean? = null
) : Serializable {
- companion object {
- private const val serialVersionUID: Long = 123
- }
+ companion object {
+ private const val serialVersionUID: Long = 123
+ }
/**
* Order Status
diff --git a/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/models/Pet.kt b/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/models/Pet.kt
index d3a480e2f14..0dd3a58bcae 100644
--- a/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/models/Pet.kt
+++ b/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/models/Pet.kt
@@ -41,9 +41,9 @@ data class Pet (
@Json(name = "status")
val status: Pet.Status? = null
) : Serializable {
- companion object {
- private const val serialVersionUID: Long = 123
- }
+ companion object {
+ private const val serialVersionUID: Long = 123
+ }
/**
* pet status in the store
diff --git a/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/models/Tag.kt b/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/models/Tag.kt
index aa93e435695..fa228fbe1f4 100644
--- a/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/models/Tag.kt
+++ b/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/models/Tag.kt
@@ -26,9 +26,9 @@ data class Tag (
@Json(name = "name")
val name: kotlin.String? = null
) : Serializable {
- companion object {
- private const val serialVersionUID: Long = 123
- }
+ companion object {
+ private const val serialVersionUID: Long = 123
+ }
}
diff --git a/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/models/User.kt b/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/models/User.kt
index 7487ed927d1..d02cbd91abd 100644
--- a/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/models/User.kt
+++ b/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/models/User.kt
@@ -45,9 +45,9 @@ data class User (
@Json(name = "userStatus")
val userStatus: kotlin.Int? = null
) : Serializable {
- companion object {
- private const val serialVersionUID: Long = 123
- }
+ companion object {
+ private const val serialVersionUID: Long = 123
+ }
}
diff --git a/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/ApiResponse.kt b/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/ApiResponse.kt
index eed5027e801..3c715519085 100644
--- a/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/ApiResponse.kt
+++ b/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/ApiResponse.kt
@@ -29,9 +29,9 @@ data class ApiResponse (
@Json(name = "message")
val message: kotlin.String? = null
) : Serializable {
- companion object {
- private const val serialVersionUID: Long = 123
- }
+ companion object {
+ private const val serialVersionUID: Long = 123
+ }
}
diff --git a/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Category.kt b/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Category.kt
index f29e6833057..07955e4ff49 100644
--- a/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Category.kt
+++ b/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Category.kt
@@ -26,9 +26,9 @@ data class Category (
@Json(name = "name")
val name: kotlin.String? = null
) : Serializable {
- companion object {
- private const val serialVersionUID: Long = 123
- }
+ companion object {
+ private const val serialVersionUID: Long = 123
+ }
}
diff --git a/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Order.kt b/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Order.kt
index 2b92b4375d1..d5048059d44 100644
--- a/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Order.kt
+++ b/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Order.kt
@@ -39,9 +39,9 @@ data class Order (
@Json(name = "complete")
val complete: kotlin.Boolean? = null
) : Serializable {
- companion object {
- private const val serialVersionUID: Long = 123
- }
+ companion object {
+ private const val serialVersionUID: Long = 123
+ }
/**
* Order Status
diff --git a/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Pet.kt b/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Pet.kt
index bb0a5df6e19..0f72fb6bd36 100644
--- a/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Pet.kt
+++ b/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Pet.kt
@@ -41,9 +41,9 @@ data class Pet (
@Json(name = "status")
val status: Pet.Status? = null
) : Serializable {
- companion object {
- private const val serialVersionUID: Long = 123
- }
+ companion object {
+ private const val serialVersionUID: Long = 123
+ }
/**
* pet status in the store
diff --git a/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Tag.kt b/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Tag.kt
index aa93e435695..fa228fbe1f4 100644
--- a/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Tag.kt
+++ b/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Tag.kt
@@ -26,9 +26,9 @@ data class Tag (
@Json(name = "name")
val name: kotlin.String? = null
) : Serializable {
- companion object {
- private const val serialVersionUID: Long = 123
- }
+ companion object {
+ private const val serialVersionUID: Long = 123
+ }
}
diff --git a/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/User.kt b/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/User.kt
index 7487ed927d1..d02cbd91abd 100644
--- a/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/User.kt
+++ b/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/User.kt
@@ -45,9 +45,9 @@ data class User (
@Json(name = "userStatus")
val userStatus: kotlin.Int? = null
) : Serializable {
- companion object {
- private const val serialVersionUID: Long = 123
- }
+ companion object {
+ private const val serialVersionUID: Long = 123
+ }
}
diff --git a/samples/client/petstore/powershell/src/PSPetstore/Client/PSConfiguration.ps1 b/samples/client/petstore/powershell/src/PSPetstore/Client/PSConfiguration.ps1
index ddb37a19c6e..8e6910f1970 100644
--- a/samples/client/petstore/powershell/src/PSPetstore/Client/PSConfiguration.ps1
+++ b/samples/client/petstore/powershell/src/PSPetstore/Client/PSConfiguration.ps1
@@ -388,3 +388,140 @@ function Get-PSUrlFromHostSetting {
}
}
+
+<#
+.SYNOPSIS
+Sets the configuration for http signing.
+.DESCRIPTION
+
+Sets the configuration for the HTTP signature security scheme.
+The HTTP signature security scheme is used to sign HTTP requests with a key
+which is in possession of the API client.
+An 'Authorization' header is calculated by creating a hash of select headers,
+and optionally the body of the HTTP request, then signing the hash value using
+a key. The 'Authorization' header is added to outbound HTTP requests.
+
+Ref: https://openapi-generator.tech
+
+.PARAMETER KeyId
+KeyId for HTTP signing
+
+.PARAMETER KeyFilePath
+KeyFilePath for HTTP signing
+
+.PARAMETER KeyPassPhrase
+KeyPassPhrase, if the HTTP signing key is protected
+
+.PARAMETER HttpSigningHeader
+HttpSigningHeader list of HTTP headers used to calculate the signature. The two special signature headers '(request-target)' and '(created)'
+SHOULD be included.
+ The '(created)' header expresses when the signature was created.
+ The '(request-target)' header is a concatenation of the lowercased :method, an
+ ASCII space, and the :path pseudo-headers.
+If no headers are specified then '(created)' sets as default.
+
+.PARAMETER HashAlgorithm
+HashAlgrithm to calculate the hash, Supported values are "sha256" and "sha512"
+
+.PARAMETER SigningAlgorithm
+SigningAlgorithm specifies the signature algorithm, supported values are "RSASSA-PKCS1-v1_5" and "RSASSA-PSS"
+RSA key : Supported values "RSASSA-PKCS1-v1_5" and "RSASSA-PSS", for ECDSA key this parameter is not applicable
+
+.PARAMETER SignatureValidityPeriod
+SignatureValidityPeriod specifies the signature maximum validity time in seconds. It accepts integer value
+
+.OUTPUTS
+
+System.Collections.Hashtable
+#>
+function Set-PSConfigurationHttpSigning {
+ [CmdletBinding()]
+ param(
+ [Parameter(Mandatory = $true)]
+ [ValidateNotNullOrEmpty()]
+ [string]$KeyId,
+ [Parameter(Mandatory = $true)]
+ [string]$KeyFilePath,
+ [Parameter(Mandatory = $false)]
+ [securestring]$KeyPassPhrase,
+ [Parameter(Mandatory = $false)]
+ [ValidateNotNullOrEmpty()]
+ [string[]] $HttpSigningHeader = @("(created)"),
+ [Parameter(Mandatory = $false)]
+ [ValidateSet("sha256", "sha512")]
+ [string] $HashAlgorithm = "sha256",
+ [Parameter(Mandatory = $false)]
+ [ValidateSet("RSASSA-PKCS1-v1_5", "RSASSA-PSS")]
+ [string]$SigningAlgorithm ,
+ [Parameter(Mandatory = $false)]
+ [int]$SignatureValidityPeriod
+ )
+
+ Process {
+ $httpSignatureConfiguration = @{ }
+
+ if (Test-Path -Path $KeyFilePath) {
+ $httpSignatureConfiguration["KeyId"] = $KeyId
+ $httpSignatureConfiguration["KeyFilePath"] = $KeyFilePath
+ }
+ else {
+ throw "Private key file path does not exist"
+ }
+
+ $keyType = Get-PSKeyTypeFromFile -KeyFilePath $KeyFilePath
+ if ([String]::IsNullOrEmpty($SigningAlgorithm)) {
+ if ($keyType -eq "RSA") {
+ $SigningAlgorithm = "RSASSA-PKCS1-v1_5"
+ }
+ }
+
+ if ($keyType -eq "RSA" -and
+ ($SigningAlgorithm -ne "RSASSA-PKCS1-v1_5" -and $SigningAlgorithm -ne "RSASSA-PSS" )) {
+ throw "Provided Key and SigningAlgorithm : $SigningAlgorithm is not compatible."
+ }
+
+ if ($HttpSigningHeader -contains "(expires)" -and $SignatureValidityPeriod -le 0) {
+ throw "SignatureValidityPeriod must be greater than 0 seconds."
+ }
+
+ if ($HttpSigningHeader -contains "(expires)") {
+ $httpSignatureConfiguration["SignatureValidityPeriod"] = $SignatureValidityPeriod
+ }
+ if ($null -ne $HttpSigningHeader -and $HttpSigningHeader.Length -gt 0) {
+ $httpSignatureConfiguration["HttpSigningHeader"] = $HttpSigningHeader
+ }
+
+ if ($null -ne $HashAlgorithm ) {
+ $httpSignatureConfiguration["HashAlgorithm"] = $HashAlgorithm
+ }
+
+ if ($null -ne $SigningAlgorithm) {
+ $httpSignatureConfiguration["SigningAlgorithm"] = $SigningAlgorithm
+ }
+
+ if ($null -ne $KeyPassPhrase) {
+ $httpSignatureConfiguration["KeyPassPhrase"] = $KeyPassPhrase
+ }
+
+ $Script:Configuration["HttpSigning"] = New-Object -TypeName PSCustomObject -Property $httpSignatureConfiguration
+ }
+}
+
+<#
+.SYNOPSIS
+
+Get the configuration object 'PSConfigurationHttpSigning'.
+
+.DESCRIPTION
+
+Get the configuration object 'PSConfigurationHttpSigning'.
+
+.OUTPUTS
+
+[PSCustomObject]
+#>
+function Get-PSConfigurationHttpSigning{
+
+ $httpSignatureConfiguration = $Script:Configuration["HttpSigning"]
+ return $httpSignatureConfiguration
+}
diff --git a/samples/client/petstore/powershell/src/PSPetstore/Model/Tag.ps1 b/samples/client/petstore/powershell/src/PSPetstore/Model/Tag.ps1
index 0f0044ef35c..8a7caf8d562 100644
--- a/samples/client/petstore/powershell/src/PSPetstore/Model/Tag.ps1
+++ b/samples/client/petstore/powershell/src/PSPetstore/Model/Tag.ps1
@@ -77,12 +77,14 @@ function ConvertFrom-PSJsonToTag {
$PSBoundParameters | Out-DebugParameter | Write-Debug
$JsonParameters = ConvertFrom-Json -InputObject $Json
+ $PSTagAdditionalProperties = @{}
# check if Json contains properties not defined in PSTag
$AllProperties = ("id", "name")
foreach ($name in $JsonParameters.PsObject.Properties.Name) {
+ # store undefined properties in additionalProperties
if (!($AllProperties.Contains($name))) {
- throw "Error! JSON key '$name' not found in the properties: $($AllProperties)"
+ $PSTagAdditionalProperties[$name] = $JsonParameters.PSobject.Properties[$name].value
}
}
@@ -101,6 +103,7 @@ function ConvertFrom-PSJsonToTag {
$PSO = [PSCustomObject]@{
"id" = ${Id}
"name" = ${Name}
+ "AdditionalProperties" = $PSTagAdditionalProperties
}
return $PSO
diff --git a/samples/client/petstore/powershell/src/PSPetstore/PSPetstore.psd1 b/samples/client/petstore/powershell/src/PSPetstore/PSPetstore.psd1
index 9b7ca03faf5..4322e265be2 100644
--- a/samples/client/petstore/powershell/src/PSPetstore/PSPetstore.psd1
+++ b/samples/client/petstore/powershell/src/PSPetstore/PSPetstore.psd1
@@ -3,7 +3,7 @@
#
# Generated by: OpenAPI Generator Team
#
-# Generated on: 5/19/20
+# Generated on: 6/4/20
#
@{
@@ -87,7 +87,8 @@ FunctionsToExport = 'Add-PSPet', 'Remove-Pet', 'Find-PSPetsByStatus', 'Find-PSPe
'Set-PSConfiguration', 'Set-PSConfigurationApiKey',
'Set-PSConfigurationApiKeyPrefix',
'Set-PSConfigurationDefaultHeader', 'Get-PSHostSetting',
- 'Get-PSUrlFromHostSetting'
+ 'Get-PSUrlFromHostSetting', 'Set-PSConfigurationHttpSigning',
+ 'Get-PSConfigurationHttpSigning'
# Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export.
CmdletsToExport = @()
diff --git a/samples/client/petstore/powershell/src/PSPetstore/Private/PSHttpSignatureAuth.ps1 b/samples/client/petstore/powershell/src/PSPetstore/Private/PSHttpSignatureAuth.ps1
index 1eabb0a2f54..d3fed6ead98 100644
--- a/samples/client/petstore/powershell/src/PSPetstore/Private/PSHttpSignatureAuth.ps1
+++ b/samples/client/petstore/powershell/src/PSPetstore/Private/PSHttpSignatureAuth.ps1
@@ -7,64 +7,11 @@
<#
.SYNOPSIS
-Get the API key Id and API key file path.
-
+ Gets the headers for HTTP signature.
.DESCRIPTION
-Get the API key Id and API key file path. If no api prefix is provided then it use default api key prefix 'Signature'
-.OUTPUTS
-PSCustomObject : This contains APIKeyId, APIKeyFilePath, APIKeyPrefix
-#>
-function Get-PSAPIKeyInfo {
- $ApiKeysList = $Script:Configuration['ApiKey']
- $ApiKeyPrefixList = $Script:Configuration['ApiKeyPrefix']
- $apiPrefix = "Signature"
-
- if ($null -eq $ApiKeysList -or $ApiKeysList.Count -eq 0) {
- throw "Unable to reterieve the api key details"
- }
-
- if ($null -eq $ApiKeyPrefixList -or $ApiKeyPrefixList.Count -eq 0) {
- Write-Verbose "Unable to reterieve the api key prefix details,setting it to default ""Signature"""
- }
-
- foreach ($item in $ApiKeysList.GetEnumerator()) {
- if (![string]::IsNullOrEmpty($item.Name)) {
- if (Test-Path -Path $item.Value) {
- $apiKey = $item.Value
- $apikeyId = $item.Name
- break;
- }
- else {
- throw "API key file path does not exist."
- }
- }
- }
-
- if ($ApiKeyPrefixList.ContainsKey($apikeyId)) {
- $apiPrefix = ApiKeyPrefixList[$apikeyId]
- }
-
- if ($apikeyId -and $apiKey -and $apiPrefix) {
- $result = New-Object -Type PSCustomObject -Property @{
- ApiKeyId = $apikeyId;
- ApiKeyFilePath = $apiKey
- ApiKeyPrefix = $apiPrefix
- }
- }
- else {
- return $null
- }
- return $result
-}
-
-<#
-.SYNOPSIS
- Gets the headers for http signed auth.
-
-.DESCRIPTION
- Gets the headers for the http signed auth. It use (targetpath), date, host and body digest to create authorization header.
+ Gets the headers for the http sigature.
.PARAMETER Method
- Http method
+ HTTP method
.PARAMETER UriBuilder
UriBuilder for url and query parameter
.PARAMETER Body
@@ -76,93 +23,393 @@ function Get-PSHttpSignedHeader {
param(
[string]$Method,
[System.UriBuilder]$UriBuilder,
- [string]$Body
+ [string]$Body,
+ [hashtable]$RequestHeader
)
+ $HEADER_REQUEST_TARGET = '(request-target)'
+ # The time when the HTTP signature was generated.
+ $HEADER_CREATED = '(created)'
+ # The time when the HTTP signature expires. The API server should reject HTTP requests
+ # that have expired.
+ $HEADER_EXPIRES = '(expires)'
+ # The 'Host' header.
+ $HEADER_HOST = 'Host'
+ # The 'Date' header.
+ $HEADER_DATE = 'Date'
+ # When the 'Digest' header is included in the HTTP signature, the client automatically
+ # computes the digest of the HTTP request body, per RFC 3230.
+ $HEADER_DIGEST = 'Digest'
+ # The 'Authorization' header is automatically generated by the client. It includes
+ # the list of signed headers and a base64-encoded signature.
+ $HEADER_AUTHORIZATION = 'Authorization'
+
#Hash table to store singed headers
- $HttpSignedHeader = @{}
+ $HttpSignedRequestHeader = @{ }
+ $HttpSignatureHeader = @{ }
$TargetHost = $UriBuilder.Host
-
- #Check for Authentication type
- $apiKeyInfo = Get-PSAPIKeyInfo
- if ($null -eq $apiKeyInfo) {
- throw "Unable to reterieve the api key info "
- }
-
+ $httpSigningConfiguration = Get-PSConfigurationHttpSigning
+ $Digest = $null
+
#get the body digest
- $bodyHash = Get-PSStringHash -String $Body
- $Digest = [String]::Format("SHA-256={0}", [Convert]::ToBase64String($bodyHash))
-
- #get the date in UTC
+ $bodyHash = Get-PSStringHash -String $Body -HashName $httpSigningConfiguration.HashAlgorithm
+ if ($httpSigningConfiguration.HashAlgorithm -eq "SHA256") {
+ $Digest = [String]::Format("SHA-256={0}", [Convert]::ToBase64String($bodyHash))
+ }
+ elseif ($httpSigningConfiguration.HashAlgorithm -eq "SHA512") {
+ $Digest = [String]::Format("SHA-512={0}", [Convert]::ToBase64String($bodyHash))
+ }
+
$dateTime = Get-Date
+ #get the date in UTC
$currentDate = $dateTime.ToUniversalTime().ToString("r")
- $requestTargetPath = [string]::Format("{0} {1}{2}",$Method.ToLower(),$UriBuilder.Path.ToLower(),$UriBuilder.Query)
- $h_requestTarget = [string]::Format("(request-target): {0}",$requestTargetPath)
- $h_cdate = [string]::Format("date: {0}",$currentDate)
- $h_digest = [string]::Format("digest: {0}",$Digest)
- $h_targetHost = [string]::Format("host: {0}",$TargetHost)
+ foreach ($headerItem in $httpSigningConfiguration.HttpSigningHeader) {
+
+ if ($headerItem -eq $HEADER_REQUEST_TARGET) {
+ $requestTargetPath = [string]::Format("{0} {1}{2}", $Method.ToLower(), $UriBuilder.Path, $UriBuilder.Query)
+ $HttpSignatureHeader.Add($HEADER_REQUEST_TARGET, $requestTargetPath)
+ }
+ elseif ($headerItem -eq $HEADER_CREATED) {
+ $created = Get-PSUnixTime -Date $dateTime -TotalTime TotalSeconds
+ $HttpSignatureHeader.Add($HEADER_CREATED, $created)
+ }
+ elseif ($headerItem -eq $HEADER_EXPIRES) {
+ $expire = $dateTime.AddSeconds($httpSigningConfiguration.SignatureValidityPeriod)
+ $expireEpocTime = Get-PSUnixTime -Date $expire -TotalTime TotalSeconds
+ $HttpSignatureHeader.Add($HEADER_EXPIRES, $expireEpocTime)
+ }
+ elseif ($headerItem -eq $HEADER_HOST) {
+ $HttpSignedRequestHeader[$HEADER_HOST] = $TargetHost
+ $HttpSignatureHeader.Add($HEADER_HOST.ToLower(), $TargetHost)
+ }
+ elseif ($headerItem -eq $HEADER_DATE) {
+ $HttpSignedRequestHeader[$HEADER_DATE] = $currentDate
+ $HttpSignatureHeader.Add($HEADER_DATE.ToLower(), $currentDate)
+ }
+ elseif ($headerItem -eq $HEADER_DIGEST) {
+ $HttpSignedRequestHeader[$HEADER_DIGEST] = $Digest
+ $HttpSignatureHeader.Add($HEADER_DIGEST.ToLower(), $Digest)
+ }elseif($RequestHeader.ContainsKey($headerItem)){
+ $HttpSignatureHeader.Add($headerItem.ToLower(), $RequestHeader[$headerItem])
+ }else{
+ throw "Cannot sign HTTP request. Request does not contain the $headerItem header."
+ }
+ }
- $stringToSign = [String]::Format("{0}`n{1}`n{2}`n{3}",
- $h_requestTarget,$h_cdate,
- $h_targetHost,$h_digest)
+ # header's name separated by space
+ $headersKeysString = $HttpSignatureHeader.Keys -join " "
+ $headerValuesList = @()
+ foreach ($item in $HttpSignatureHeader.GetEnumerator()) {
+ $headerValuesList += [string]::Format("{0}: {1}", $item.Name, $item.Value)
+ }
+ #Concatinate headers value separated by new line
+ $headerValuesString = $headerValuesList -join "`n"
- $hashedString = Get-PSStringHash -String $stringToSign
- $signedHeader = Get-PSRSASHA256SignedString -APIKeyFilePath $apiKeyInfo.ApiKeyFilePath -DataToSign $hashedString
- $authorizationHeader = [string]::Format("{0} keyId=""{1}"",algorithm=""rsa-sha256"",headers=""(request-target) date host digest"",signature=""{2}""",
- $apiKeyInfo.ApiKeyPrefix, $apiKeyInfo.ApiKeyId, $signedHeader)
+ #Gets the hash of the headers value
+ $signatureHashString = Get-PSStringHash -String $headerValuesString -HashName $httpSigningConfiguration.HashAlgorithm
+
+ #Gets the Key type to select the correct signing alogorithm
+ $KeyType = Get-PSKeyTypeFromFile -KeyFilePath $httpSigningConfiguration.KeyFilePath
+
+ if ($keyType -eq "RSA") {
+ $headerSignatureStr = Get-PSRSASignature -PrivateKeyFilePath $httpSigningConfiguration.KeyFilePath `
+ -DataToSign $signatureHashString `
+ -HashAlgorithmName $httpSigningConfiguration.HashAlgorithm `
+ -KeyPassPhrase $httpSigningConfiguration.KeyPassPhrase `
+ -SigningAlgorithm $httpSigningConfiguration.SigningAlgorithm
+ }
+ elseif ($KeyType -eq "EC") {
+ $headerSignatureStr = Get-PSECDSASignature -ECKeyFilePath $httpSigningConfiguration.KeyFilePath `
+ -DataToSign $signatureHashString `
+ -HashAlgorithmName $httpSigningConfiguration.HashAlgorithm `
+ -KeyPassPhrase $httpSigningConfiguration.KeyPassPhrase
+ }
+ #Depricated
+ <#$cryptographicScheme = Get-PSCryptographicScheme -SigningAlgorithm $httpSigningConfiguration.SigningAlgorithm `
+ -HashAlgorithm $httpSigningConfiguration.HashAlgorithm
+ #>
+ $cryptographicScheme = "hs2019"
+ $authorizationHeaderValue = [string]::Format("Signature keyId=""{0}"",algorithm=""{1}""",
+ $httpSigningConfiguration.KeyId, $cryptographicScheme)
+
+ if ($HttpSignatureHeader.ContainsKey($HEADER_CREATED)) {
+ $authorizationHeaderValue += [string]::Format(",created={0}", $HttpSignatureHeader[$HEADER_CREATED])
+ }
+
+ if ($HttpSignatureHeader.ContainsKey($HEADER_EXPIRES)) {
+ $authorizationHeaderValue += [string]::Format(",expires={0}", $HttpSignatureHeader[$HEADER_EXPIRES])
+ }
- $HttpSignedHeader["Date"] = $currentDate
- $HttpSignedHeader["Host"] = $TargetHost
- $HttpSignedHeader["Content-Type"] = "application/json"
- $HttpSignedHeader["Digest"] = $Digest
- $HttpSignedHeader["Authorization"] = $authorizationHeader
- return $HttpSignedHeader
+ $authorizationHeaderValue += [string]::Format(",headers=""{0}"",signature=""{1}""",
+ $headersKeysString , $headerSignatureStr)
+
+ $HttpSignedRequestHeader[$HEADER_AUTHORIZATION] = $authorizationHeaderValue
+ return $HttpSignedRequestHeader
}
<#
.SYNOPSIS
- Gets the headers for http signed auth.
+ Gets the RSA signature
.DESCRIPTION
- Gets the headers for the http signed auth. It use (targetpath), date, host and body digest to create authorization header.
-.PARAMETER APIKeyFilePath
+ Gets the RSA signature for the http signing
+.PARAMETER PrivateKeyFilePath
Specify the API key file path
.PARAMETER DataToSign
Specify the data to sign
+.PARAMETER HashAlgorithmName
+ HashAlgorithm to calculate the hash
+.PARAMETER KeyPassPhrase
+ KeyPassPhrase for the encrypted key
.OUTPUTS
- String
+ Base64String
#>
-function Get-PSRSASHA256SignedString {
+function Get-PSRSASignature {
Param(
- [string]$APIKeyFilePath,
- [byte[]]$DataToSign
+ [string]$PrivateKeyFilePath,
+ [byte[]]$DataToSign,
+ [string]$HashAlgorithmName,
+ [string]$SigningAlgorithm,
+ [securestring]$KeyPassPhrase
)
try {
- $rsa_provider_path = Join-Path -Path $PSScriptRoot -ChildPath "PSRSAEncryptionProvider.cs"
- $rsa_provider_sourceCode = Get-Content -Path $rsa_provider_path -Raw
- Add-Type -TypeDefinition $rsa_provider_sourceCode
- $signed_string = [RSAEncryption.RSAEncryptionProvider]::GetRSASignb64encode($APIKeyFilePath, $DataToSign)
- if ($null -eq $signed_string) {
- throw "Unable to sign the header using the API key"
+ if ($hashAlgorithmName -eq "sha256") {
+ $hashAlgo = [System.Security.Cryptography.HashAlgorithmName]::SHA256
}
- return $signed_string
+ elseif ($hashAlgorithmName -eq "sha512") {
+ $hashAlgo = [System.Security.Cryptography.HashAlgorithmName]::SHA512
+ }
+
+ if ($PSVersionTable.PSVersion.Major -ge 7) {
+ $ecKeyHeader = "-----BEGIN RSA PRIVATE KEY-----"
+ $ecKeyFooter = "-----END RSA PRIVATE KEY-----"
+ $keyStr = Get-Content -Path $PrivateKeyFilePath -Raw
+ $ecKeyBase64String = $keyStr.Replace($ecKeyHeader, "").Replace($ecKeyFooter, "").Trim()
+ $keyBytes = [System.Convert]::FromBase64String($ecKeyBase64String)
+ $rsa = [System.Security.Cryptography.RSACng]::new()
+ [int]$bytCount = 0
+ $rsa.ImportRSAPrivateKey($keyBytes, [ref] $bytCount)
+
+ if ($SigningAlgorithm -eq "RSASSA-PSS") {
+ $signedBytes = $rsa.SignHash($DataToSign, $hashAlgo, [System.Security.Cryptography.RSASignaturePadding]::Pss)
+ }
+ else {
+ $signedBytes = $rsa.SignHash($DataToSign, $hashAlgo, [System.Security.Cryptography.RSASignaturePadding]::Pkcs1)
+ }
+ }
+ else {
+ $rsa_provider_path = Join-Path -Path $PSScriptRoot -ChildPath "PSRSAEncryptionProvider.cs"
+ $rsa_provider_sourceCode = Get-Content -Path $rsa_provider_path -Raw
+ Add-Type -TypeDefinition $rsa_provider_sourceCode
+
+ [System.Security.Cryptography.RSA]$rsa = [RSAEncryption.RSAEncryptionProvider]::GetRSAProviderFromPemFile($PrivateKeyFilePath, $KeyPassPhrase)
+
+ if ($SigningAlgorithm -eq "RSASSA-PSS") {
+ throw "$SigningAlgorithm is not supported on $($PSVersionTable.PSVersion)"
+ }
+ else {
+ $signedBytes = $rsa.SignHash($DataToSign, $hashAlgo, [System.Security.Cryptography.RSASignaturePadding]::Pkcs1)
+ }
+
+ }
+
+ $signedString = [Convert]::ToBase64String($signedBytes)
+ return $signedString
}
catch {
throw $_
}
}
+
+<#
+.SYNOPSIS
+ Gets the ECDSA signature
+
+.DESCRIPTION
+ Gets the ECDSA signature for the http signing
+.PARAMETER PrivateKeyFilePath
+ Specify the API key file path
+.PARAMETER DataToSign
+ Specify the data to sign
+.PARAMETER HashAlgorithmName
+ HashAlgorithm to calculate the hash
+.PARAMETER KeyPassPhrase
+ KeyPassPhrase for the encrypted key
+.OUTPUTS
+ Base64String
+#>
+function Get-PSECDSASignature {
+ param(
+ [Parameter(Mandatory = $true)]
+ [string]$ECKeyFilePath,
+ [Parameter(Mandatory = $true)]
+ [byte[]]$DataToSign,
+ [Parameter(Mandatory = $false)]
+ [String]$HashAlgorithmName,
+ [Parameter(Mandatory = $false)]
+ [securestring]$KeyPassPhrase
+ )
+ if (!(Test-Path -Path $ECKeyFilePath)) {
+ throw "key file path does not exist."
+ }
+
+ if($PSVersionTable.PSVersion.Major -lt 7){
+ throw "ECDSA key is not supported on $($PSVersionTable.PSVersion), Use PSVersion 7.0 and above"
+ }
+
+ $ecKeyHeader = "-----BEGIN EC PRIVATE KEY-----"
+ $ecKeyFooter = "-----END EC PRIVATE KEY-----"
+ $keyStr = Get-Content -Path $ECKeyFilePath -Raw
+ $ecKeyBase64String = $keyStr.Replace($ecKeyHeader, "").Replace($ecKeyFooter, "").Trim()
+ $keyBytes = [System.Convert]::FromBase64String($ecKeyBase64String)
+
+ #$cngKey = [System.Security.Cryptography.CngKey]::Import($keyBytes,[System.Security.Cryptography.CngKeyBlobFormat]::Pkcs8PrivateBlob)
+ #$ecdsa = [System.Security.Cryptography.ECDsaCng]::New($cngKey)
+ $ecdsa = [System.Security.Cryptography.ECDsaCng]::New()
+ [int]$bytCount =0
+ if(![string]::IsNullOrEmpty($KeyPassPhrase)){
+ $ecdsa.ImportEncryptedPkcs8PrivateKey($KeyPassPhrase,$keyBytes,[ref]$bytCount)
+ }
+ else{
+ $ecdsa.ImportPkcs8PrivateKey($keyBytes,[ref]$bytCount)
+ }
+
+ if ($HashAlgorithmName -eq "sha512") {
+ $ecdsa.HashAlgorithm = [System.Security.Cryptography.CngAlgorithm]::Sha512
+ }
+ else {
+ $ecdsa.HashAlgorithm = [System.Security.Cryptography.CngAlgorithm]::Sha256
+ }
+
+ $signedBytes = $ecdsa.SignHash($DataToSign)
+ $signedString = [System.Convert]::ToBase64String($signedBytes)
+ return $signedString
+
+}
+
+
<#
.Synopsis
Gets the hash of string.
.Description
Gets the hash of string
+.Parameter String
+ Specifies the string to calculate the hash
+.Parameter HashName
+ Specifies the hash name to calculate the hash, Accepted values are "SHA1", "SHA256" and "SHA512"
+ It is recommneded not to use "SHA1" to calculate the Hash
.Outputs
String
#>
-Function Get-PSStringHash([String] $String, $HashName = "SHA256") {
-
+Function Get-PSStringHash {
+ param(
+ [Parameter(Mandatory = $true)]
+ [AllowEmptyString()]
+ [string]$String,
+ [Parameter(Mandatory = $true)]
+ [ValidateSet("SHA1", "SHA256", "SHA512")]
+ $HashName
+ )
$hashAlogrithm = [System.Security.Cryptography.HashAlgorithm]::Create($HashName)
$hashAlogrithm.ComputeHash([System.Text.Encoding]::UTF8.GetBytes($String))
+}
+
+<#
+.Synopsis
+ Gets the Unix time.
+.Description
+ Gets the Unix time
+.Parameter Date
+ Specifies the date to calculate the unix time
+.Parameter ToTalTime
+ Specifies the total time , Accepted values are "TotalDays", "TotalHours", "TotalMinutes", "TotalSeconds" and "TotalMilliseconds"
+.Outputs
+Integer
+#>
+function Get-PSUnixTime {
+ param(
+ [Parameter(Mandatory = $true)]
+ [DateTime]$Date,
+ [Parameter(Mandatory = $false)]
+ [ValidateSet("TotalDays", "TotalHours", "TotalMinutes", "TotalSeconds", "TotalMilliseconds")]
+ [string]$TotalTime = "TotalSeconds"
+ )
+ $date1 = Get-Date -Date "01/01/1970"
+ $timespan = New-TimeSpan -Start $date1 -End $Date
+ switch ($TotalTime) {
+ "TotalDays" { [int]$timespan.TotalDays }
+ "TotalHours" { [int]$timespan.TotalHours }
+ "TotalMinutes" { [int]$timespan.TotalMinutes }
+ "TotalSeconds" { [int]$timespan.TotalSeconds }
+ "TotalMilliseconds" { [int]$timespan.TotalMilliseconds }
+ }
+}
+
+function Get-PSCryptographicScheme {
+ param(
+ [Parameter(Mandatory = $true)]
+ [string]$SigningAlgorithm,
+ [Parameter(Mandatory = $true)]
+ [string]$HashAlgorithm
+ )
+ $rsaSigntureType = @("RSASSA-PKCS1-v1_5", "RSASSA-PSS")
+ $SigningAlgorithm = $null
+ if ($rsaSigntureType -contains $SigningAlgorithm) {
+ switch ($HashAlgorithm) {
+ "sha256" { $SigningAlgorithm = "rsa-sha256" }
+ "sha512" { $SigningAlgorithm = "rsa-sha512" }
+ }
+ }
+ return $SigningAlgorithm
+}
+
+
+<#
+.Synopsis
+ Gets the key type from the pem file.
+.Description
+ Gets the key type from the pem file.
+.Parameter KeyFilePath
+ Specifies the key file path (pem file)
+.Outputs
+String
+#>
+function Get-PSKeyTypeFromFile {
+ param(
+ [Parameter(Mandatory = $true)]
+ [string]$KeyFilePath
+ )
+
+ if (-not(Test-Path -Path $KeyFilePath)) {
+ throw "Key file path does not exist."
+ }
+ $ecPrivateKeyHeader = "BEGIN EC PRIVATE KEY"
+ $ecPrivateKeyFooter = "END EC PRIVATE KEY"
+ $rsaPrivateKeyHeader = "BEGIN RSA PRIVATE KEY"
+ $rsaPrivateFooter = "END RSA PRIVATE KEY"
+ $pkcs8Header = "BEGIN PRIVATE KEY"
+ $pkcs8Footer = "END PRIVATE KEY"
+ $keyType = $null
+ $key = Get-Content -Path $KeyFilePath
+
+ if ($key[0] -match $rsaPrivateKeyHeader -and $key[$key.Length - 1] -match $rsaPrivateFooter) {
+ $KeyType = "RSA"
+
+ }
+ elseif ($key[0] -match $ecPrivateKeyHeader -and $key[$key.Length - 1] -match $ecPrivateKeyFooter) {
+ $keyType = "EC"
+ }
+ elseif ($key[0] -match $ecPrivateKeyHeader -and $key[$key.Length - 1] -match $ecPrivateKeyFooter) {
+ <#this type of key can hold many type different types of private key, but here due lack of pem header
+ Considering this as EC key
+ #>
+ #TODO :- update the key based on oid
+ $keyType = "EC"
+ }
+ else {
+ throw "Either the key is invalid or key is not supported"
+ }
+ return $keyType
}
\ No newline at end of file
diff --git a/samples/client/petstore/powershell/src/PSPetstore/Private/PSRSAEncryptionProvider.cs b/samples/client/petstore/powershell/src/PSPetstore/Private/PSRSAEncryptionProvider.cs
index a23490b366e..7a671929fb2 100644
--- a/samples/client/petstore/powershell/src/PSPetstore/Private/PSRSAEncryptionProvider.cs
+++ b/samples/client/petstore/powershell/src/PSPetstore/Private/PSRSAEncryptionProvider.cs
@@ -1,6 +1,7 @@
using System;
using System.Collections.Generic;
using System.IO;
+using System.Net;
using System.Runtime.InteropServices;
using System.Security;
using System.Security.Cryptography;
@@ -10,15 +11,97 @@ namespace RSAEncryption
{
public class RSAEncryptionProvider
{
+ public static RSACryptoServiceProvider GetRSAProviderFromPemFile(String pemfile,SecureString keyPassPharse = null)
+ {
+ const String pempubheader = "-----BEGIN PUBLIC KEY-----";
+ const String pempubfooter = "-----END PUBLIC KEY-----";
+ bool isPrivateKeyFile = true;
+ byte[] pemkey = null;
+
+ if (!File.Exists(pemfile))
+ {
+ throw new Exception("private key file does not exist.");
+ }
+ string pemstr = File.ReadAllText(pemfile).Trim();
+
+ if (pemstr.StartsWith(pempubheader) && pemstr.EndsWith(pempubfooter))
+ {
+ isPrivateKeyFile = false;
+ }
+
+ if (isPrivateKeyFile)
+ {
+ pemkey = ConvertPrivateKeyToBytes(pemstr,keyPassPharse);
+ if (pemkey == null)
+ {
+ return null;
+ }
+ return DecodeRSAPrivateKey(pemkey);
+ }
+ return null ;
+ }
+
+ static byte[] ConvertPrivateKeyToBytes(String instr, SecureString keyPassPharse = null)
+ {
+ const String pemprivheader = "-----BEGIN RSA PRIVATE KEY-----";
+ const String pemprivfooter = "-----END RSA PRIVATE KEY-----";
+ String pemstr = instr.Trim();
+ byte[] binkey;
+
+ if (!pemstr.StartsWith(pemprivheader) || !pemstr.EndsWith(pemprivfooter))
+ {
+ return null;
+ }
+
+ StringBuilder sb = new StringBuilder(pemstr);
+ sb.Replace(pemprivheader, "");
+ sb.Replace(pemprivfooter, "");
+ String pvkstr = sb.ToString().Trim();
+
+ try
+ { // if there are no PEM encryption info lines, this is an UNencrypted PEM private key
+ binkey = Convert.FromBase64String(pvkstr);
+ return binkey;
+ }
+ catch (System.FormatException)
+ {
+ StringReader str = new StringReader(pvkstr);
+
+ //-------- read PEM encryption info. lines and extract salt -----
+ if (!str.ReadLine().StartsWith("Proc-Type: 4,ENCRYPTED"))
+ return null;
+ String saltline = str.ReadLine();
+ if (!saltline.StartsWith("DEK-Info: DES-EDE3-CBC,"))
+ return null;
+ String saltstr = saltline.Substring(saltline.IndexOf(",") + 1).Trim();
+ byte[] salt = new byte[saltstr.Length / 2];
+ for (int i = 0; i < salt.Length; i++)
+ salt[i] = Convert.ToByte(saltstr.Substring(i * 2, 2), 16);
+ if (!(str.ReadLine() == ""))
+ return null;
+
+ //------ remaining b64 data is encrypted RSA key ----
+ String encryptedstr = str.ReadToEnd();
+
+ try
+ { //should have b64 encrypted RSA key now
+ binkey = Convert.FromBase64String(encryptedstr);
+ }
+ catch (System.FormatException)
+ { //data is not in base64 fromat
+ return null;
+ }
+
+ byte[] deskey = GetEncryptedKey(salt, keyPassPharse, 1, 2); // count=1 (for OpenSSL implementation); 2 iterations to get at least 24 bytes
+ if (deskey == null)
+ return null;
+
+ //------ Decrypt the encrypted 3des-encrypted RSA private key ------
+ byte[] rsakey = DecryptKey(binkey, deskey, salt); //OpenSSL uses salt value in PEM header also as 3DES IV
+ return rsakey;
+ }
+ }
- const String pemprivheader = "-----BEGIN RSA PRIVATE KEY-----";
- const String pemprivfooter = "-----END RSA PRIVATE KEY-----";
- const String pempubheader = "-----BEGIN PUBLIC KEY-----";
- const String pempubfooter = "-----END PUBLIC KEY-----";
- const String pemp8header = "-----BEGIN PRIVATE KEY-----";
- const String pemp8footer = "-----END PRIVATE KEY-----";
- const String pemp8encheader = "-----BEGIN ENCRYPTED PRIVATE KEY-----";
- const String pemp8encfooter = "-----END ENCRYPTED PRIVATE KEY-----";
public static RSACryptoServiceProvider DecodeRSAPrivateKey(byte[] privkey)
{
byte[] MODULUS, E, D, P, Q, DP, DQ, IQ;
@@ -46,7 +129,6 @@ namespace RSAEncryption
if (bt != 0x00)
return null;
-
//------ all private key components are Integer sequences ----
elems = GetIntegerSize(binr);
MODULUS = binr.ReadBytes(elems);
@@ -72,19 +154,6 @@ namespace RSAEncryption
elems = GetIntegerSize(binr);
IQ = binr.ReadBytes(elems);
- /*Console.WriteLine("showing components ..");
- if (true)
- {
- showBytes("\nModulus", MODULUS);
- showBytes("\nExponent", E);
- showBytes("\nD", D);
- showBytes("\nP", P);
- showBytes("\nQ", Q);
- showBytes("\nDP", DP);
- showBytes("\nDQ", DQ);
- showBytes("\nIQ", IQ);
- }*/
-
// ------- create RSACryptoServiceProvider instance and initialize with public key -----
RSACryptoServiceProvider RSA = new RSACryptoServiceProvider();
RSAParameters RSAparams = new RSAParameters();
@@ -140,94 +209,17 @@ namespace RSAEncryption
return count;
}
- static byte[] DecodeOpenSSLPrivateKey(String instr)
- {
- const String pemprivheader = "-----BEGIN RSA PRIVATE KEY-----";
- const String pemprivfooter = "-----END RSA PRIVATE KEY-----";
- String pemstr = instr.Trim();
- byte[] binkey;
- if (!pemstr.StartsWith(pemprivheader) || !pemstr.EndsWith(pemprivfooter))
- return null;
-
- StringBuilder sb = new StringBuilder(pemstr);
- sb.Replace(pemprivheader, ""); //remove headers/footers, if present
- sb.Replace(pemprivfooter, "");
-
- String pvkstr = sb.ToString().Trim(); //get string after removing leading/trailing whitespace
-
- try
- { // if there are no PEM encryption info lines, this is an UNencrypted PEM private key
- binkey = Convert.FromBase64String(pvkstr);
- return binkey;
- }
- catch (System.FormatException)
- { //if can't b64 decode, it must be an encrypted private key
- //Console.WriteLine("Not an unencrypted OpenSSL PEM private key");
- }
-
- StringReader str = new StringReader(pvkstr);
-
- //-------- read PEM encryption info. lines and extract salt -----
- if (!str.ReadLine().StartsWith("Proc-Type: 4,ENCRYPTED"))
- return null;
- String saltline = str.ReadLine();
- if (!saltline.StartsWith("DEK-Info: DES-EDE3-CBC,"))
- return null;
- String saltstr = saltline.Substring(saltline.IndexOf(",") + 1).Trim();
- byte[] salt = new byte[saltstr.Length / 2];
- for (int i = 0; i < salt.Length; i++)
- salt[i] = Convert.ToByte(saltstr.Substring(i * 2, 2), 16);
- if (!(str.ReadLine() == ""))
- return null;
-
- //------ remaining b64 data is encrypted RSA key ----
- String encryptedstr = str.ReadToEnd();
-
- try
- { //should have b64 encrypted RSA key now
- binkey = Convert.FromBase64String(encryptedstr);
- }
- catch (System.FormatException)
- { // bad b64 data.
- return null;
- }
-
- //------ Get the 3DES 24 byte key using PDK used by OpenSSL ----
-
- SecureString despswd = GetSecPswd("Enter password to derive 3DES key==>");
- //Console.Write("\nEnter password to derive 3DES key: ");
- //String pswd = Console.ReadLine();
- byte[] deskey = GetOpenSSL3deskey(salt, despswd, 1, 2); // count=1 (for OpenSSL implementation); 2 iterations to get at least 24 bytes
- if (deskey == null)
- return null;
- //showBytes("3DES key", deskey) ;
-
- //------ Decrypt the encrypted 3des-encrypted RSA private key ------
- byte[] rsakey = DecryptKey(binkey, deskey, salt); //OpenSSL uses salt value in PEM header also as 3DES IV
- if (rsakey != null)
- return rsakey; //we have a decrypted RSA private key
- else
- {
- Console.WriteLine("Failed to decrypt RSA private key; probably wrong password.");
- return null;
- }
- }
-
- static byte[] GetOpenSSL3deskey(byte[] salt, SecureString secpswd, int count, int miter)
+ static byte[] GetEncryptedKey(byte[] salt, SecureString secpswd, int count, int miter)
{
IntPtr unmanagedPswd = IntPtr.Zero;
int HASHLENGTH = 16; //MD5 bytes
byte[] keymaterial = new byte[HASHLENGTH * miter]; //to store contatenated Mi hashed results
-
byte[] psbytes = new byte[secpswd.Length];
unmanagedPswd = Marshal.SecureStringToGlobalAllocAnsi(secpswd);
Marshal.Copy(unmanagedPswd, psbytes, 0, psbytes.Length);
Marshal.ZeroFreeGlobalAllocAnsi(unmanagedPswd);
- //UTF8Encoding utf8 = new UTF8Encoding();
- //byte[] psbytes = utf8.GetBytes(pswd);
-
// --- contatenate salt and pswd bytes into fixed data array ---
byte[] data00 = new byte[psbytes.Length + salt.Length];
Array.Copy(psbytes, data00, psbytes.Length); //copy the pswd bytes
@@ -248,15 +240,12 @@ namespace RSAEncryption
Array.Copy(result, hashtarget, result.Length);
Array.Copy(data00, 0, hashtarget, result.Length, data00.Length);
result = hashtarget;
- //Console.WriteLine("Updated new initial hash target:") ;
- //showBytes(result) ;
}
for (int i = 0; i < count; i++)
result = md5.ComputeHash(result);
Array.Copy(result, 0, keymaterial, j * HASHLENGTH, result.Length); //contatenate to keymaterial
}
- //showBytes("Final key material", keymaterial);
byte[] deskey = new byte[24];
Array.Copy(keymaterial, deskey, deskey.Length);
@@ -265,46 +254,9 @@ namespace RSAEncryption
Array.Clear(result, 0, result.Length);
Array.Clear(hashtarget, 0, hashtarget.Length);
Array.Clear(keymaterial, 0, keymaterial.Length);
-
return deskey;
}
- public static string GetRSASignb64encode(string private_key_path, byte[] digest)
- {
- RSACryptoServiceProvider cipher = new RSACryptoServiceProvider();
- cipher = GetRSAProviderFromPemFile(private_key_path);
- RSAPKCS1SignatureFormatter RSAFormatter = new RSAPKCS1SignatureFormatter(cipher);
- RSAFormatter.SetHashAlgorithm("SHA256");
- byte[] signedHash = RSAFormatter.CreateSignature(digest);
- return Convert.ToBase64String(signedHash);
- }
-
- public static RSACryptoServiceProvider GetRSAProviderFromPemFile(String pemfile)
- {
- bool isPrivateKeyFile = true;
- if (!File.Exists(pemfile))
- {
- throw new Exception("pemfile does not exist.");
- }
- string pemstr = File.ReadAllText(pemfile).Trim();
- if (pemstr.StartsWith(pempubheader) && pemstr.EndsWith(pempubfooter))
- isPrivateKeyFile = false;
-
- byte[] pemkey = null;
- if (isPrivateKeyFile)
- pemkey = DecodeOpenSSLPrivateKey(pemstr);
-
-
- if (pemkey == null)
- return null;
-
- if (isPrivateKeyFile)
- {
- return DecodeRSAPrivateKey(pemkey);
- }
- return null;
- }
-
static byte[] DecryptKey(byte[] cipherData, byte[] desKey, byte[] IV)
{
MemoryStream memst = new MemoryStream();
@@ -317,61 +269,11 @@ namespace RSAEncryption
cs.Write(cipherData, 0, cipherData.Length);
cs.Close();
}
- catch (Exception exc)
- {
- Console.WriteLine(exc.Message);
+ catch (Exception){
return null;
}
byte[] decryptedData = memst.ToArray();
return decryptedData;
}
-
- static SecureString GetSecPswd(String prompt)
- {
- SecureString password = new SecureString();
-
- Console.ForegroundColor = ConsoleColor.Gray;
- Console.ForegroundColor = ConsoleColor.Magenta;
-
- while (true)
- {
- ConsoleKeyInfo cki = Console.ReadKey(true);
- if (cki.Key == ConsoleKey.Enter)
- {
- Console.ForegroundColor = ConsoleColor.Gray;
- return password;
- }
- else if (cki.Key == ConsoleKey.Backspace)
- {
- // remove the last asterisk from the screen...
- if (password.Length > 0)
- {
- Console.SetCursorPosition(Console.CursorLeft - 1, Console.CursorTop);
- Console.SetCursorPosition(Console.CursorLeft - 1, Console.CursorTop);
- password.RemoveAt(password.Length - 1);
- }
- }
- else if (cki.Key == ConsoleKey.Escape)
- {
- Console.ForegroundColor = ConsoleColor.Gray;
- return password;
- }
- else if (Char.IsLetterOrDigit(cki.KeyChar) || Char.IsSymbol(cki.KeyChar))
- {
- if (password.Length < 20)
- {
- password.AppendChar(cki.KeyChar);
- }
- else
- {
- Console.Beep();
- }
- }
- else
- {
- Console.Beep();
- }
- }
- }
}
-}
+}
\ No newline at end of file
diff --git a/samples/client/petstore/powershell/tests/Api/PSPetApi.Tests.ps1 b/samples/client/petstore/powershell/tests/Api/PSPetApi.Tests.ps1
index 75635ae54f5..a64121dd996 100644
--- a/samples/client/petstore/powershell/tests/Api/PSPetApi.Tests.ps1
+++ b/samples/client/petstore/powershell/tests/Api/PSPetApi.Tests.ps1
@@ -5,68 +5,68 @@
# Generated by OpenAPI Generator: https://openapi-generator.tech
#
-Describe -tag 'PSPetstore' -name 'PSPetApi' {
+Describe -tag 'PSPetstore' -name 'PSPSPetApi' {
Context 'Add-PSPet' {
It 'Test Add-PSPet' {
#$TestResult = Invoke-PetApiGetPetById -Pet "TEST_VALUE"
- #$TestResult | Should BeOfType TODO
- #$TestResult.property | Should Be 0
+ #$TestResult | Should -BeOfType TODO
+ #$TestResult.property | Should -Be 0
}
}
Context 'Remove-Pet' {
It 'Test Remove-Pet' {
#$TestResult = Invoke-PetApiGetPetById -PetId "TEST_VALUE" -ApiKey "TEST_VALUE"
- #$TestResult | Should BeOfType TODO
- #$TestResult.property | Should Be 0
+ #$TestResult | Should -BeOfType TODO
+ #$TestResult.property | Should -Be 0
}
}
Context 'Find-PSPetsByStatus' {
It 'Test Find-PSPetsByStatus' {
#$TestResult = Invoke-PetApiGetPetById -Status "TEST_VALUE"
- #$TestResult | Should BeOfType TODO
- #$TestResult.property | Should Be 0
+ #$TestResult | Should -BeOfType TODO
+ #$TestResult.property | Should -Be 0
}
}
Context 'Find-PSPetsByTags' {
It 'Test Find-PSPetsByTags' {
#$TestResult = Invoke-PetApiGetPetById -Tags "TEST_VALUE"
- #$TestResult | Should BeOfType TODO
- #$TestResult.property | Should Be 0
+ #$TestResult | Should -BeOfType TODO
+ #$TestResult.property | Should -Be 0
}
}
Context 'Get-PSPetById' {
It 'Test Get-PSPetById' {
#$TestResult = Invoke-PetApiGetPetById -PetId "TEST_VALUE"
- #$TestResult | Should BeOfType TODO
- #$TestResult.property | Should Be 0
+ #$TestResult | Should -BeOfType TODO
+ #$TestResult.property | Should -Be 0
}
}
Context 'Update-PSPet' {
It 'Test Update-PSPet' {
#$TestResult = Invoke-PetApiGetPetById -Pet "TEST_VALUE"
- #$TestResult | Should BeOfType TODO
- #$TestResult.property | Should Be 0
+ #$TestResult | Should -BeOfType TODO
+ #$TestResult.property | Should -Be 0
}
}
Context 'Update-PSPetWithForm' {
It 'Test Update-PSPetWithForm' {
#$TestResult = Invoke-PetApiGetPetById -PetId "TEST_VALUE" -Name "TEST_VALUE" -Status "TEST_VALUE"
- #$TestResult | Should BeOfType TODO
- #$TestResult.property | Should Be 0
+ #$TestResult | Should -BeOfType TODO
+ #$TestResult.property | Should -Be 0
}
}
Context 'Invoke-PSUploadFile' {
It 'Test Invoke-PSUploadFile' {
#$TestResult = Invoke-PetApiGetPetById -PetId "TEST_VALUE" -AdditionalMetadata "TEST_VALUE" -File "TEST_VALUE"
- #$TestResult | Should BeOfType TODO
- #$TestResult.property | Should Be 0
+ #$TestResult | Should -BeOfType TODO
+ #$TestResult.property | Should -Be 0
}
}
diff --git a/samples/client/petstore/powershell/tests/Api/PSStoreApi.Tests.ps1 b/samples/client/petstore/powershell/tests/Api/PSStoreApi.Tests.ps1
index de3c4226f94..95399b034f7 100644
--- a/samples/client/petstore/powershell/tests/Api/PSStoreApi.Tests.ps1
+++ b/samples/client/petstore/powershell/tests/Api/PSStoreApi.Tests.ps1
@@ -5,36 +5,36 @@
# Generated by OpenAPI Generator: https://openapi-generator.tech
#
-Describe -tag 'PSPetstore' -name 'PSStoreApi' {
+Describe -tag 'PSPetstore' -name 'PSPSStoreApi' {
Context 'Remove-PSOrder' {
It 'Test Remove-PSOrder' {
#$TestResult = Invoke-PetApiGetPetById -OrderId "TEST_VALUE"
- #$TestResult | Should BeOfType TODO
- #$TestResult.property | Should Be 0
+ #$TestResult | Should -BeOfType TODO
+ #$TestResult.property | Should -Be 0
}
}
Context 'Get-PSInventory' {
It 'Test Get-PSInventory' {
#$TestResult = Invoke-PetApiGetPetById
- #$TestResult | Should BeOfType TODO
- #$TestResult.property | Should Be 0
+ #$TestResult | Should -BeOfType TODO
+ #$TestResult.property | Should -Be 0
}
}
Context 'Get-PSOrderById' {
It 'Test Get-PSOrderById' {
#$TestResult = Invoke-PetApiGetPetById -OrderId "TEST_VALUE"
- #$TestResult | Should BeOfType TODO
- #$TestResult.property | Should Be 0
+ #$TestResult | Should -BeOfType TODO
+ #$TestResult.property | Should -Be 0
}
}
Context 'Invoke-PSPlaceOrder' {
It 'Test Invoke-PSPlaceOrder' {
#$TestResult = Invoke-PetApiGetPetById -Order "TEST_VALUE"
- #$TestResult | Should BeOfType TODO
- #$TestResult.property | Should Be 0
+ #$TestResult | Should -BeOfType TODO
+ #$TestResult.property | Should -Be 0
}
}
diff --git a/samples/client/petstore/powershell/tests/Api/PSUserApi.Tests.ps1 b/samples/client/petstore/powershell/tests/Api/PSUserApi.Tests.ps1
index 757592bd932..6a7f50b9f57 100644
--- a/samples/client/petstore/powershell/tests/Api/PSUserApi.Tests.ps1
+++ b/samples/client/petstore/powershell/tests/Api/PSUserApi.Tests.ps1
@@ -5,68 +5,68 @@
# Generated by OpenAPI Generator: https://openapi-generator.tech
#
-Describe -tag 'PSPetstore' -name 'PSUserApi' {
+Describe -tag 'PSPetstore' -name 'PSPSUserApi' {
Context 'New-PSUser' {
It 'Test New-PSUser' {
#$TestResult = Invoke-PetApiGetPetById -User "TEST_VALUE"
- #$TestResult | Should BeOfType TODO
- #$TestResult.property | Should Be 0
+ #$TestResult | Should -BeOfType TODO
+ #$TestResult.property | Should -Be 0
}
}
Context 'New-PSUsersWithArrayInput' {
It 'Test New-PSUsersWithArrayInput' {
#$TestResult = Invoke-PetApiGetPetById -User "TEST_VALUE"
- #$TestResult | Should BeOfType TODO
- #$TestResult.property | Should Be 0
+ #$TestResult | Should -BeOfType TODO
+ #$TestResult.property | Should -Be 0
}
}
Context 'New-PSUsersWithListInput' {
It 'Test New-PSUsersWithListInput' {
#$TestResult = Invoke-PetApiGetPetById -User "TEST_VALUE"
- #$TestResult | Should BeOfType TODO
- #$TestResult.property | Should Be 0
+ #$TestResult | Should -BeOfType TODO
+ #$TestResult.property | Should -Be 0
}
}
Context 'Remove-PSUser' {
It 'Test Remove-PSUser' {
#$TestResult = Invoke-PetApiGetPetById -Username "TEST_VALUE"
- #$TestResult | Should BeOfType TODO
- #$TestResult.property | Should Be 0
+ #$TestResult | Should -BeOfType TODO
+ #$TestResult.property | Should -Be 0
}
}
Context 'Get-PSUserByName' {
It 'Test Get-PSUserByName' {
#$TestResult = Invoke-PetApiGetPetById -Username "TEST_VALUE"
- #$TestResult | Should BeOfType TODO
- #$TestResult.property | Should Be 0
+ #$TestResult | Should -BeOfType TODO
+ #$TestResult.property | Should -Be 0
}
}
Context 'Invoke-PSLoginUser' {
It 'Test Invoke-PSLoginUser' {
#$TestResult = Invoke-PetApiGetPetById -Username "TEST_VALUE" -Password "TEST_VALUE"
- #$TestResult | Should BeOfType TODO
- #$TestResult.property | Should Be 0
+ #$TestResult | Should -BeOfType TODO
+ #$TestResult.property | Should -Be 0
}
}
Context 'Invoke-PSLogoutUser' {
It 'Test Invoke-PSLogoutUser' {
#$TestResult = Invoke-PetApiGetPetById
- #$TestResult | Should BeOfType TODO
- #$TestResult.property | Should Be 0
+ #$TestResult | Should -BeOfType TODO
+ #$TestResult.property | Should -Be 0
}
}
Context 'Update-PSUser' {
It 'Test Update-PSUser' {
#$TestResult = Invoke-PetApiGetPetById -Username "TEST_VALUE" -User "TEST_VALUE"
- #$TestResult | Should BeOfType TODO
- #$TestResult.property | Should Be 0
+ #$TestResult | Should -BeOfType TODO
+ #$TestResult.property | Should -Be 0
}
}
diff --git a/samples/client/petstore/powershell/tests/Model/ApiResponse.Tests.ps1 b/samples/client/petstore/powershell/tests/Model/ApiResponse.Tests.ps1
index e0c9985b2d9..79252634714 100644
--- a/samples/client/petstore/powershell/tests/Model/ApiResponse.Tests.ps1
+++ b/samples/client/petstore/powershell/tests/Model/ApiResponse.Tests.ps1
@@ -10,8 +10,8 @@ Describe -tag 'PSPetstore' -name 'PSApiResponse' {
It 'Initialize-PSApiResponse' {
# a simple test to create an object
#$NewObject = Initialize-PSApiResponse -Code "TEST_VALUE" -Type "TEST_VALUE" -Message "TEST_VALUE"
- #$NewObject | Should BeOfType ApiResponse
- #$NewObject.property | Should Be 0
+ #$NewObject | Should -BeOfType ApiResponse
+ #$NewObject.property | Should -Be 0
}
}
}
diff --git a/samples/client/petstore/powershell/tests/Model/Category.Tests.ps1 b/samples/client/petstore/powershell/tests/Model/Category.Tests.ps1
index b405e070643..b4782f412b4 100644
--- a/samples/client/petstore/powershell/tests/Model/Category.Tests.ps1
+++ b/samples/client/petstore/powershell/tests/Model/Category.Tests.ps1
@@ -10,8 +10,8 @@ Describe -tag 'PSPetstore' -name 'PSCategory' {
It 'Initialize-PSCategory' {
# a simple test to create an object
#$NewObject = Initialize-PSCategory -Id "TEST_VALUE" -Name "TEST_VALUE"
- #$NewObject | Should BeOfType Category
- #$NewObject.property | Should Be 0
+ #$NewObject | Should -BeOfType Category
+ #$NewObject.property | Should -Be 0
}
}
}
diff --git a/samples/client/petstore/powershell/tests/Model/InlineObject.Tests.ps1 b/samples/client/petstore/powershell/tests/Model/InlineObject.Tests.ps1
index aa18bd03aad..ff544575a27 100644
--- a/samples/client/petstore/powershell/tests/Model/InlineObject.Tests.ps1
+++ b/samples/client/petstore/powershell/tests/Model/InlineObject.Tests.ps1
@@ -10,8 +10,8 @@ Describe -tag 'PSPetstore' -name 'PSInlineObject' {
It 'Initialize-PSInlineObject' {
# a simple test to create an object
#$NewObject = Initialize-PSInlineObject -Name "TEST_VALUE" -Status "TEST_VALUE"
- #$NewObject | Should BeOfType InlineObject
- #$NewObject.property | Should Be 0
+ #$NewObject | Should -BeOfType InlineObject
+ #$NewObject.property | Should -Be 0
}
}
}
diff --git a/samples/client/petstore/powershell/tests/Model/InlineObject1.Tests.ps1 b/samples/client/petstore/powershell/tests/Model/InlineObject1.Tests.ps1
index 1435f1826f4..01af66de646 100644
--- a/samples/client/petstore/powershell/tests/Model/InlineObject1.Tests.ps1
+++ b/samples/client/petstore/powershell/tests/Model/InlineObject1.Tests.ps1
@@ -10,8 +10,8 @@ Describe -tag 'PSPetstore' -name 'PSInlineObject1' {
It 'Initialize-PSInlineObject1' {
# a simple test to create an object
#$NewObject = Initialize-PSInlineObject1 -AdditionalMetadata "TEST_VALUE" -File "TEST_VALUE"
- #$NewObject | Should BeOfType InlineObject1
- #$NewObject.property | Should Be 0
+ #$NewObject | Should -BeOfType InlineObject1
+ #$NewObject.property | Should -Be 0
}
}
}
diff --git a/samples/client/petstore/powershell/tests/Model/Order.Tests.ps1 b/samples/client/petstore/powershell/tests/Model/Order.Tests.ps1
index 2c24df69c58..5bf036e01fa 100644
--- a/samples/client/petstore/powershell/tests/Model/Order.Tests.ps1
+++ b/samples/client/petstore/powershell/tests/Model/Order.Tests.ps1
@@ -10,8 +10,8 @@ Describe -tag 'PSPetstore' -name 'PSOrder' {
It 'Initialize-PSOrder' {
# a simple test to create an object
#$NewObject = Initialize-PSOrder -Id "TEST_VALUE" -PetId "TEST_VALUE" -Quantity "TEST_VALUE" -ShipDate "TEST_VALUE" -Status "TEST_VALUE" -Complete "TEST_VALUE"
- #$NewObject | Should BeOfType Order
- #$NewObject.property | Should Be 0
+ #$NewObject | Should -BeOfType Order
+ #$NewObject.property | Should -Be 0
}
}
}
diff --git a/samples/client/petstore/powershell/tests/Model/Pet.Tests.ps1 b/samples/client/petstore/powershell/tests/Model/Pet.Tests.ps1
index 5cfcdc67e83..1f6e189b836 100644
--- a/samples/client/petstore/powershell/tests/Model/Pet.Tests.ps1
+++ b/samples/client/petstore/powershell/tests/Model/Pet.Tests.ps1
@@ -10,8 +10,8 @@ Describe -tag 'PSPetstore' -name 'PSPet' {
It 'Initialize-PSPet' {
# a simple test to create an object
#$NewObject = Initialize-PSPet -Id "TEST_VALUE" -Category "TEST_VALUE" -Name "TEST_VALUE" -PhotoUrls "TEST_VALUE" -Tags "TEST_VALUE" -Status "TEST_VALUE"
- #$NewObject | Should BeOfType Pet
- #$NewObject.property | Should Be 0
+ #$NewObject | Should -BeOfType Pet
+ #$NewObject.property | Should -Be 0
}
}
}
diff --git a/samples/client/petstore/powershell/tests/Model/Tag.Tests.ps1 b/samples/client/petstore/powershell/tests/Model/Tag.Tests.ps1
index d2e0b220380..ae168f27dc7 100644
--- a/samples/client/petstore/powershell/tests/Model/Tag.Tests.ps1
+++ b/samples/client/petstore/powershell/tests/Model/Tag.Tests.ps1
@@ -10,8 +10,8 @@ Describe -tag 'PSPetstore' -name 'PSTag' {
It 'Initialize-PSTag' {
# a simple test to create an object
#$NewObject = Initialize-PSTag -Id "TEST_VALUE" -Name "TEST_VALUE"
- #$NewObject | Should BeOfType Tag
- #$NewObject.property | Should Be 0
+ #$NewObject | Should -BeOfType Tag
+ #$NewObject.property | Should -Be 0
}
}
}
diff --git a/samples/client/petstore/powershell/tests/Model/User.Tests.ps1 b/samples/client/petstore/powershell/tests/Model/User.Tests.ps1
index 2919e4adb4b..1c9f4d6dee4 100644
--- a/samples/client/petstore/powershell/tests/Model/User.Tests.ps1
+++ b/samples/client/petstore/powershell/tests/Model/User.Tests.ps1
@@ -10,8 +10,8 @@ Describe -tag 'PSPetstore' -name 'PSUser' {
It 'Initialize-PSUser' {
# a simple test to create an object
#$NewObject = Initialize-PSUser -Id "TEST_VALUE" -Username "TEST_VALUE" -FirstName "TEST_VALUE" -LastName "TEST_VALUE" -Email "TEST_VALUE" -Password "TEST_VALUE" -Phone "TEST_VALUE" -UserStatus "TEST_VALUE"
- #$NewObject | Should BeOfType User
- #$NewObject.property | Should Be 0
+ #$NewObject | Should -BeOfType User
+ #$NewObject.property | Should -Be 0
}
}
}
diff --git a/samples/client/petstore/powershell/tests/Petstore.Tests.ps1 b/samples/client/petstore/powershell/tests/Petstore.Tests.ps1
index cfcb506984d..09e8b9a7771 100644
--- a/samples/client/petstore/powershell/tests/Petstore.Tests.ps1
+++ b/samples/client/petstore/powershell/tests/Petstore.Tests.ps1
@@ -23,21 +23,21 @@ Describe -tag 'PSOpenAPITools' -name 'Integration Tests' {
# Get
$Result = Get-PSPetById -petId $Id
- $Result."id" | Should Be 38369
- $Result."name" | Should Be "PowerShell"
- $Result."status" | Should Be "Available"
- $Result."category"."id" | Should Be $Id
- $Result."category"."name" | Should Be 'PSCategory'
+ $Result."id" | Should -Be 38369
+ $Result."name" | Should -Be "PowerShell"
+ $Result."status" | Should -Be "Available"
+ $Result."category"."id" | Should -Be $Id
+ $Result."category"."name" | Should -Be 'PSCategory'
- $Result.GetType().fullname | Should Be "System.Management.Automation.PSCustomObject"
+ $Result.GetType().fullname | Should -Be "System.Management.Automation.PSCustomObject"
# Update (form)
$Result = Update-PSPetWithForm -petId $Id -Name "PowerShell Update" -Status "Pending"
$Result = Get-PSPetById -petId $Id
- $Result."id" | Should Be 38369
- $Result."name" | Should Be "PowerShell Update"
- $Result."status" | Should Be "Pending"
+ $Result."id" | Should -Be 38369
+ $Result."name" | Should -Be "PowerShell Update"
+ $Result."status" | Should -Be "Pending"
# Update (put)
$NewPet = Initialize-PSPet -Id $Id -Name 'PowerShell2' -Category (
@@ -51,13 +51,13 @@ Describe -tag 'PSOpenAPITools' -name 'Integration Tests' {
$Result = Update-PSPet -Pet $NewPet
$Result = Get-PSPetById -petId $Id -WithHttpInfo
- $Result.GetType().fullname | Should Be "System.Collections.Hashtable"
- #$Result["Response"].GetType().fullanme | Should Be "System.Management.Automation.PSCustomObject"
- $Result["Response"]."id" | Should Be 38369
- $Result["Response"]."name" | Should Be "PowerShell2"
- $Result["Response"]."status" | Should Be "Sold"
- $Result["StatusCode"] | Should Be 200
- $Result["Headers"]["Content-Type"] | Should Be "application/json"
+ $Result.GetType().fullname | Should -Be "System.Collections.Hashtable"
+ #$Result["Response"].GetType().fullanme | Should -Be "System.Management.Automation.PSCustomObject"
+ $Result["Response"]."id" | Should -Be 38369
+ $Result["Response"]."name" | Should -Be "PowerShell2"
+ $Result["Response"]."status" | Should -Be "Sold"
+ $Result["StatusCode"] | Should -Be 200
+ $Result["Headers"]["Content-Type"] | Should -Be "application/json"
# upload file
$file = Get-Item "./plus.gif"
@@ -72,8 +72,8 @@ Describe -tag 'PSOpenAPITools' -name 'Integration Tests' {
$Result = Update-PSPet -Pet $NewPet
$Result = Get-PSPetById -petId $NewPet."id" -WithHttpInfo
- $Result["Response"]."id" | Should Be $NewPet."id"
- $Result["Response"]."name" | Should Be $NewPet."name"
+ $Result["Response"]."id" | Should -Be $NewPet."id"
+ $Result["Response"]."name" | Should -Be $NewPet."name"
# Delete
$Result = Remove-Pet -petId $Id
@@ -109,19 +109,19 @@ Describe -tag 'PSOpenAPITools' -name 'Integration Tests' {
# test find pets by tags
$Results = Find-PSPetsByTags 'bazbaz'
- $Results.GetType().FullName| Should Be "System.Object[]"
- $Results.Count | Should Be 2
+ $Results.GetType().FullName| Should -Be "System.Object[]"
+ $Results.Count | Should -Be 2
if ($Results[0]."id" -gt 10129) {
- $Results[0]."id" | Should Be 20129
+ $Results[0]."id" | Should -Be 20129
} else {
- $Results[0]."id" | Should Be 10129
+ $Results[0]."id" | Should -Be 10129
}
if ($Results[1]."id" -gt 10129) {
- $Results[1]."id" | Should Be 20129
+ $Results[1]."id" | Should -Be 20129
} else {
- $Results[1]."id" | Should Be 10129
+ $Results[1]."id" | Should -Be 10129
}
}
@@ -132,22 +132,22 @@ Describe -tag 'PSOpenAPITools' -name 'Integration Tests' {
$HS = Get-PSHostSetting
- $HS[0]["Url"] | Should Be "http://{server}.swagger.io:{port}/v2"
- $HS[0]["Description"] | Should Be "petstore server"
- $HS[0]["Variables"]["server"]["Description"] | Should Be "No description provided"
- $HS[0]["Variables"]["server"]["DefaultValue"] | Should Be "petstore"
- $HS[0]["Variables"]["server"]["EnumValues"] | Should Be @("petstore",
+ $HS[0]["Url"] | Should -Be "http://{server}.swagger.io:{port}/v2"
+ $HS[0]["Description"] | Should -Be "petstore server"
+ $HS[0]["Variables"]["server"]["Description"] | Should -Be "No description provided"
+ $HS[0]["Variables"]["server"]["DefaultValue"] | Should -Be "petstore"
+ $HS[0]["Variables"]["server"]["EnumValues"] | Should -Be @("petstore",
"qa-petstore",
"dev-petstore")
}
It "Get-PSUrlFromHostSetting tests" {
- Get-PSUrlFromHostSetting -Index 0 | Should Be "http://petstore.swagger.io:80/v2"
- Get-PSUrlFromHostSetting -Index 0 -Variables @{ "port" = "8080" } | Should Be "http://petstore.swagger.io:8080/v2"
+ Get-PSUrlFromHostSetting -Index 0 | Should -Be "http://petstore.swagger.io:80/v2"
+ Get-PSUrlFromHostSetting -Index 0 -Variables @{ "port" = "8080" } | Should -Be "http://petstore.swagger.io:8080/v2"
#Get-PSUrlFromHostSetting -Index 2 | Should -Throw -ExceptionType ([RuntimeException])
- #Get-PSUrlFromHostSetting -Index 2 -ErrorAction Stop | Should -Throw "RuntimeException: Invalid index 2 when selecting the host. Must be less than 2"
- #Get-PSUrlFromHostSetting -Index 0 -Variables @{ "port" = "1234" } -ErrorAction Stop | Should -Throw "RuntimeException: The variable 'port' in the host URL has invalid value 1234. Must be 80,8080"
+ #Get-PSUrlFromHostSetting -Index 2 -ErrorAction Stop | Should -Throw "RuntimeException: Invalid index 2 when selecting the host. Must -Be less than 2"
+ #Get-PSUrlFromHostSetting -Index 0 -Variables @{ "port" = "1234" } -ErrorAction Stop | Should -Throw "RuntimeException: The variable 'port' in the host URL has invalid value 1234. Must -Be 80,8080"
}
@@ -156,16 +156,16 @@ Describe -tag 'PSOpenAPITools' -name 'Integration Tests' {
Set-PSConfigurationDefaultHeader -Key "TestKey" -Value "TestValue"
$Configuration = Get-PSConfiguration
- $Configuration["DefaultHeaders"].Count | Should Be 1
- $Configuration["DefaultHeaders"]["TestKey"] | Should Be "TestValue"
+ $Configuration["DefaultHeaders"].Count | Should -Be 1
+ $Configuration["DefaultHeaders"]["TestKey"] | Should -Be "TestValue"
}
It "Configuration tests" {
$Conf = Get-PSConfiguration
- $Conf["SkipCertificateCheck"] | Should Be $false
+ $Conf["SkipCertificateCheck"] | Should -Be $false
$Conf = Set-PSConfiguration -PassThru -SkipCertificateCheck
- $Conf["SkipCertificateCheck"] | Should Be $true
+ $Conf["SkipCertificateCheck"] | Should -Be $true
$Conf = Set-PSConfiguration -PassThru # reset SkipCertificateCheck
}
@@ -179,10 +179,10 @@ Describe -tag 'PSOpenAPITools' -name 'Integration Tests' {
It "Create Object from JSON tests" {
$Result = ConvertFrom-PSJsonToPet '{"id": 345, "name": "json name test", "status": "available", "photoUrls": ["https://photo.test"]}'
- $Result."id" | Should Be 345
- $Result."name" | Should Be "json name test"
- $Result."status" | Should Be "available"
- $Result."photoUrls" | Should Be @("https://photo.test")
+ $Result."id" | Should -Be 345
+ $Result."name" | Should -Be "json name test"
+ $Result."status" | Should -Be "available"
+ $Result."photoUrls" | Should -Be @("https://photo.test")
}
}
diff --git a/samples/client/petstore/python-asyncio/petstore_api/api/another_fake_api.py b/samples/client/petstore/python-asyncio/petstore_api/api/another_fake_api.py
index 77c4c003fe4..4d69b287ca8 100644
--- a/samples/client/petstore/python-asyncio/petstore_api/api/another_fake_api.py
+++ b/samples/client/petstore/python-asyncio/petstore_api/api/another_fake_api.py
@@ -42,21 +42,26 @@ class AnotherFakeApi(object):
To test special tags and operation ID starting with number # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.call_123_test_special_tags(body, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param Client body: client model (required)
+ :param body: client model (required)
+ :type body: Client
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: Client
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: Client
"""
kwargs['_return_http_data_only'] = True
return self.call_123_test_special_tags_with_http_info(body, **kwargs) # noqa: E501
@@ -67,23 +72,29 @@ class AnotherFakeApi(object):
To test special tags and operation ID starting with number # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.call_123_test_special_tags_with_http_info(body, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param Client body: client model (required)
+ :param body: client model (required)
+ :type body: Client
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _return_http_data_only: response data without head status code
and headers
+ :type _return_http_data_only: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: tuple(Client, status_code(int), headers(HTTPHeaderDict))
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: tuple(Client, status_code(int), headers(HTTPHeaderDict))
"""
local_var_params = locals()
diff --git a/samples/client/petstore/python-asyncio/petstore_api/api/fake_api.py b/samples/client/petstore/python-asyncio/petstore_api/api/fake_api.py
index 667c50612ce..e1d9ffebebf 100644
--- a/samples/client/petstore/python-asyncio/petstore_api/api/fake_api.py
+++ b/samples/client/petstore/python-asyncio/petstore_api/api/fake_api.py
@@ -42,21 +42,26 @@ class FakeApi(object):
this route creates an XmlItem # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.create_xml_item(xml_item, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param XmlItem xml_item: XmlItem Body (required)
+ :param xml_item: XmlItem Body (required)
+ :type xml_item: XmlItem
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: None
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: None
"""
kwargs['_return_http_data_only'] = True
return self.create_xml_item_with_http_info(xml_item, **kwargs) # noqa: E501
@@ -67,23 +72,29 @@ class FakeApi(object):
this route creates an XmlItem # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.create_xml_item_with_http_info(xml_item, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param XmlItem xml_item: XmlItem Body (required)
+ :param xml_item: XmlItem Body (required)
+ :type xml_item: XmlItem
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _return_http_data_only: response data without head status code
and headers
+ :type _return_http_data_only: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: None
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: None
"""
local_var_params = locals()
@@ -156,21 +167,26 @@ class FakeApi(object):
Test serialization of outer boolean types # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.fake_outer_boolean_serialize(async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param bool body: Input boolean as post body
+ :param body: Input boolean as post body
+ :type body: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: bool
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: bool
"""
kwargs['_return_http_data_only'] = True
return self.fake_outer_boolean_serialize_with_http_info(**kwargs) # noqa: E501
@@ -181,23 +197,29 @@ class FakeApi(object):
Test serialization of outer boolean types # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.fake_outer_boolean_serialize_with_http_info(async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param bool body: Input boolean as post body
+ :param body: Input boolean as post body
+ :type body: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _return_http_data_only: response data without head status code
and headers
+ :type _return_http_data_only: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: tuple(bool, status_code(int), headers(HTTPHeaderDict))
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: tuple(bool, status_code(int), headers(HTTPHeaderDict))
"""
local_var_params = locals()
@@ -266,21 +288,26 @@ class FakeApi(object):
Test serialization of object with outer number type # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.fake_outer_composite_serialize(async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param OuterComposite body: Input composite as post body
+ :param body: Input composite as post body
+ :type body: OuterComposite
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: OuterComposite
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: OuterComposite
"""
kwargs['_return_http_data_only'] = True
return self.fake_outer_composite_serialize_with_http_info(**kwargs) # noqa: E501
@@ -291,23 +318,29 @@ class FakeApi(object):
Test serialization of object with outer number type # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.fake_outer_composite_serialize_with_http_info(async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param OuterComposite body: Input composite as post body
+ :param body: Input composite as post body
+ :type body: OuterComposite
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _return_http_data_only: response data without head status code
and headers
+ :type _return_http_data_only: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: tuple(OuterComposite, status_code(int), headers(HTTPHeaderDict))
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: tuple(OuterComposite, status_code(int), headers(HTTPHeaderDict))
"""
local_var_params = locals()
@@ -376,21 +409,26 @@ class FakeApi(object):
Test serialization of outer number types # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.fake_outer_number_serialize(async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param float body: Input number as post body
+ :param body: Input number as post body
+ :type body: float
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: float
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: float
"""
kwargs['_return_http_data_only'] = True
return self.fake_outer_number_serialize_with_http_info(**kwargs) # noqa: E501
@@ -401,23 +439,29 @@ class FakeApi(object):
Test serialization of outer number types # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.fake_outer_number_serialize_with_http_info(async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param float body: Input number as post body
+ :param body: Input number as post body
+ :type body: float
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _return_http_data_only: response data without head status code
and headers
+ :type _return_http_data_only: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: tuple(float, status_code(int), headers(HTTPHeaderDict))
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: tuple(float, status_code(int), headers(HTTPHeaderDict))
"""
local_var_params = locals()
@@ -486,21 +530,26 @@ class FakeApi(object):
Test serialization of outer string types # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.fake_outer_string_serialize(async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param str body: Input string as post body
+ :param body: Input string as post body
+ :type body: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: str
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: str
"""
kwargs['_return_http_data_only'] = True
return self.fake_outer_string_serialize_with_http_info(**kwargs) # noqa: E501
@@ -511,23 +560,29 @@ class FakeApi(object):
Test serialization of outer string types # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.fake_outer_string_serialize_with_http_info(async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param str body: Input string as post body
+ :param body: Input string as post body
+ :type body: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _return_http_data_only: response data without head status code
and headers
+ :type _return_http_data_only: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: tuple(str, status_code(int), headers(HTTPHeaderDict))
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: tuple(str, status_code(int), headers(HTTPHeaderDict))
"""
local_var_params = locals()
@@ -596,21 +651,26 @@ class FakeApi(object):
For this test, the body for this request much reference a schema named `File`. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.test_body_with_file_schema(body, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param FileSchemaTestClass body: (required)
+ :param body: (required)
+ :type body: FileSchemaTestClass
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: None
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: None
"""
kwargs['_return_http_data_only'] = True
return self.test_body_with_file_schema_with_http_info(body, **kwargs) # noqa: E501
@@ -621,23 +681,29 @@ class FakeApi(object):
For this test, the body for this request much reference a schema named `File`. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.test_body_with_file_schema_with_http_info(body, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param FileSchemaTestClass body: (required)
+ :param body: (required)
+ :type body: FileSchemaTestClass
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _return_http_data_only: response data without head status code
and headers
+ :type _return_http_data_only: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: None
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: None
"""
local_var_params = locals()
@@ -709,22 +775,28 @@ class FakeApi(object):
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.test_body_with_query_params(query, body, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param str query: (required)
- :param User body: (required)
+ :param query: (required)
+ :type query: str
+ :param body: (required)
+ :type body: User
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: None
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: None
"""
kwargs['_return_http_data_only'] = True
return self.test_body_with_query_params_with_http_info(query, body, **kwargs) # noqa: E501
@@ -734,24 +806,31 @@ class FakeApi(object):
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.test_body_with_query_params_with_http_info(query, body, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param str query: (required)
- :param User body: (required)
+ :param query: (required)
+ :type query: str
+ :param body: (required)
+ :type body: User
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _return_http_data_only: response data without head status code
and headers
+ :type _return_http_data_only: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: None
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: None
"""
local_var_params = locals()
@@ -831,21 +910,26 @@ class FakeApi(object):
To test \"client\" model # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.test_client_model(body, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param Client body: client model (required)
+ :param body: client model (required)
+ :type body: Client
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: Client
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: Client
"""
kwargs['_return_http_data_only'] = True
return self.test_client_model_with_http_info(body, **kwargs) # noqa: E501
@@ -856,23 +940,29 @@ class FakeApi(object):
To test \"client\" model # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.test_client_model_with_http_info(body, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param Client body: client model (required)
+ :param body: client model (required)
+ :type body: Client
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _return_http_data_only: response data without head status code
and headers
+ :type _return_http_data_only: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: tuple(Client, status_code(int), headers(HTTPHeaderDict))
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: tuple(Client, status_code(int), headers(HTTPHeaderDict))
"""
local_var_params = locals()
@@ -949,34 +1039,52 @@ class FakeApi(object):
Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.test_endpoint_parameters(number, double, pattern_without_delimiter, byte, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param float number: None (required)
- :param float double: None (required)
- :param str pattern_without_delimiter: None (required)
- :param str byte: None (required)
- :param int integer: None
- :param int int32: None
- :param int int64: None
- :param float float: None
- :param str string: None
- :param file binary: None
- :param date date: None
- :param datetime date_time: None
- :param str password: None
- :param str param_callback: None
+ :param number: None (required)
+ :type number: float
+ :param double: None (required)
+ :type double: float
+ :param pattern_without_delimiter: None (required)
+ :type pattern_without_delimiter: str
+ :param byte: None (required)
+ :type byte: str
+ :param integer: None
+ :type integer: int
+ :param int32: None
+ :type int32: int
+ :param int64: None
+ :type int64: int
+ :param float: None
+ :type float: float
+ :param string: None
+ :type string: str
+ :param binary: None
+ :type binary: file
+ :param date: None
+ :type date: date
+ :param date_time: None
+ :type date_time: datetime
+ :param password: None
+ :type password: str
+ :param param_callback: None
+ :type param_callback: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: None
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: None
"""
kwargs['_return_http_data_only'] = True
return self.test_endpoint_parameters_with_http_info(number, double, pattern_without_delimiter, byte, **kwargs) # noqa: E501
@@ -987,36 +1095,55 @@ class FakeApi(object):
Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.test_endpoint_parameters_with_http_info(number, double, pattern_without_delimiter, byte, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param float number: None (required)
- :param float double: None (required)
- :param str pattern_without_delimiter: None (required)
- :param str byte: None (required)
- :param int integer: None
- :param int int32: None
- :param int int64: None
- :param float float: None
- :param str string: None
- :param file binary: None
- :param date date: None
- :param datetime date_time: None
- :param str password: None
- :param str param_callback: None
+ :param number: None (required)
+ :type number: float
+ :param double: None (required)
+ :type double: float
+ :param pattern_without_delimiter: None (required)
+ :type pattern_without_delimiter: str
+ :param byte: None (required)
+ :type byte: str
+ :param integer: None
+ :type integer: int
+ :param int32: None
+ :type int32: int
+ :param int64: None
+ :type int64: int
+ :param float: None
+ :type float: float
+ :param string: None
+ :type string: str
+ :param binary: None
+ :type binary: file
+ :param date: None
+ :type date: date
+ :param date_time: None
+ :type date_time: datetime
+ :param password: None
+ :type password: str
+ :param param_callback: None
+ :type param_callback: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _return_http_data_only: response data without head status code
and headers
+ :type _return_http_data_only: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: None
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: None
"""
local_var_params = locals()
@@ -1168,28 +1295,40 @@ class FakeApi(object):
To test enum parameters # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.test_enum_parameters(async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param list[str] enum_header_string_array: Header parameter enum test (string array)
- :param str enum_header_string: Header parameter enum test (string)
- :param list[str] enum_query_string_array: Query parameter enum test (string array)
- :param str enum_query_string: Query parameter enum test (string)
- :param int enum_query_integer: Query parameter enum test (double)
- :param float enum_query_double: Query parameter enum test (double)
- :param list[str] enum_form_string_array: Form parameter enum test (string array)
- :param str enum_form_string: Form parameter enum test (string)
+ :param enum_header_string_array: Header parameter enum test (string array)
+ :type enum_header_string_array: list[str]
+ :param enum_header_string: Header parameter enum test (string)
+ :type enum_header_string: str
+ :param enum_query_string_array: Query parameter enum test (string array)
+ :type enum_query_string_array: list[str]
+ :param enum_query_string: Query parameter enum test (string)
+ :type enum_query_string: str
+ :param enum_query_integer: Query parameter enum test (double)
+ :type enum_query_integer: int
+ :param enum_query_double: Query parameter enum test (double)
+ :type enum_query_double: float
+ :param enum_form_string_array: Form parameter enum test (string array)
+ :type enum_form_string_array: list[str]
+ :param enum_form_string: Form parameter enum test (string)
+ :type enum_form_string: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: None
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: None
"""
kwargs['_return_http_data_only'] = True
return self.test_enum_parameters_with_http_info(**kwargs) # noqa: E501
@@ -1200,30 +1339,43 @@ class FakeApi(object):
To test enum parameters # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.test_enum_parameters_with_http_info(async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param list[str] enum_header_string_array: Header parameter enum test (string array)
- :param str enum_header_string: Header parameter enum test (string)
- :param list[str] enum_query_string_array: Query parameter enum test (string array)
- :param str enum_query_string: Query parameter enum test (string)
- :param int enum_query_integer: Query parameter enum test (double)
- :param float enum_query_double: Query parameter enum test (double)
- :param list[str] enum_form_string_array: Form parameter enum test (string array)
- :param str enum_form_string: Form parameter enum test (string)
+ :param enum_header_string_array: Header parameter enum test (string array)
+ :type enum_header_string_array: list[str]
+ :param enum_header_string: Header parameter enum test (string)
+ :type enum_header_string: str
+ :param enum_query_string_array: Query parameter enum test (string array)
+ :type enum_query_string_array: list[str]
+ :param enum_query_string: Query parameter enum test (string)
+ :type enum_query_string: str
+ :param enum_query_integer: Query parameter enum test (double)
+ :type enum_query_integer: int
+ :param enum_query_double: Query parameter enum test (double)
+ :type enum_query_double: float
+ :param enum_form_string_array: Form parameter enum test (string array)
+ :type enum_form_string_array: list[str]
+ :param enum_form_string: Form parameter enum test (string)
+ :type enum_form_string: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _return_http_data_only: response data without head status code
and headers
+ :type _return_http_data_only: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: None
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: None
"""
local_var_params = locals()
@@ -1316,26 +1468,36 @@ class FakeApi(object):
Fake endpoint to test group parameters (optional) # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.test_group_parameters(required_string_group, required_boolean_group, required_int64_group, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param int required_string_group: Required String in group parameters (required)
- :param bool required_boolean_group: Required Boolean in group parameters (required)
- :param int required_int64_group: Required Integer in group parameters (required)
- :param int string_group: String in group parameters
- :param bool boolean_group: Boolean in group parameters
- :param int int64_group: Integer in group parameters
+ :param required_string_group: Required String in group parameters (required)
+ :type required_string_group: int
+ :param required_boolean_group: Required Boolean in group parameters (required)
+ :type required_boolean_group: bool
+ :param required_int64_group: Required Integer in group parameters (required)
+ :type required_int64_group: int
+ :param string_group: String in group parameters
+ :type string_group: int
+ :param boolean_group: Boolean in group parameters
+ :type boolean_group: bool
+ :param int64_group: Integer in group parameters
+ :type int64_group: int
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: None
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: None
"""
kwargs['_return_http_data_only'] = True
return self.test_group_parameters_with_http_info(required_string_group, required_boolean_group, required_int64_group, **kwargs) # noqa: E501
@@ -1346,28 +1508,39 @@ class FakeApi(object):
Fake endpoint to test group parameters (optional) # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.test_group_parameters_with_http_info(required_string_group, required_boolean_group, required_int64_group, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param int required_string_group: Required String in group parameters (required)
- :param bool required_boolean_group: Required Boolean in group parameters (required)
- :param int required_int64_group: Required Integer in group parameters (required)
- :param int string_group: String in group parameters
- :param bool boolean_group: Boolean in group parameters
- :param int int64_group: Integer in group parameters
+ :param required_string_group: Required String in group parameters (required)
+ :type required_string_group: int
+ :param required_boolean_group: Required Boolean in group parameters (required)
+ :type required_boolean_group: bool
+ :param required_int64_group: Required Integer in group parameters (required)
+ :type required_int64_group: int
+ :param string_group: String in group parameters
+ :type string_group: int
+ :param boolean_group: Boolean in group parameters
+ :type boolean_group: bool
+ :param int64_group: Integer in group parameters
+ :type int64_group: int
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _return_http_data_only: response data without head status code
and headers
+ :type _return_http_data_only: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: None
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: None
"""
local_var_params = locals()
@@ -1458,21 +1631,26 @@ class FakeApi(object):
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.test_inline_additional_properties(param, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param dict(str, str) param: request body (required)
+ :param param: request body (required)
+ :type param: dict(str, str)
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: None
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: None
"""
kwargs['_return_http_data_only'] = True
return self.test_inline_additional_properties_with_http_info(param, **kwargs) # noqa: E501
@@ -1482,23 +1660,29 @@ class FakeApi(object):
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.test_inline_additional_properties_with_http_info(param, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param dict(str, str) param: request body (required)
+ :param param: request body (required)
+ :type param: dict(str, str)
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _return_http_data_only: response data without head status code
and headers
+ :type _return_http_data_only: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: None
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: None
"""
local_var_params = locals()
@@ -1570,22 +1754,28 @@ class FakeApi(object):
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.test_json_form_data(param, param2, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param str param: field1 (required)
- :param str param2: field2 (required)
+ :param param: field1 (required)
+ :type param: str
+ :param param2: field2 (required)
+ :type param2: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: None
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: None
"""
kwargs['_return_http_data_only'] = True
return self.test_json_form_data_with_http_info(param, param2, **kwargs) # noqa: E501
@@ -1595,24 +1785,31 @@ class FakeApi(object):
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.test_json_form_data_with_http_info(param, param2, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param str param: field1 (required)
- :param str param2: field2 (required)
+ :param param: field1 (required)
+ :type param: str
+ :param param2: field2 (required)
+ :type param2: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _return_http_data_only: response data without head status code
and headers
+ :type _return_http_data_only: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: None
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: None
"""
local_var_params = locals()
@@ -1692,25 +1889,34 @@ class FakeApi(object):
To test the collection format in query parameters # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.test_query_parameter_collection_format(pipe, ioutil, http, url, context, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param list[str] pipe: (required)
- :param list[str] ioutil: (required)
- :param list[str] http: (required)
- :param list[str] url: (required)
- :param list[str] context: (required)
+ :param pipe: (required)
+ :type pipe: list[str]
+ :param ioutil: (required)
+ :type ioutil: list[str]
+ :param http: (required)
+ :type http: list[str]
+ :param url: (required)
+ :type url: list[str]
+ :param context: (required)
+ :type context: list[str]
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: None
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: None
"""
kwargs['_return_http_data_only'] = True
return self.test_query_parameter_collection_format_with_http_info(pipe, ioutil, http, url, context, **kwargs) # noqa: E501
@@ -1721,27 +1927,37 @@ class FakeApi(object):
To test the collection format in query parameters # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.test_query_parameter_collection_format_with_http_info(pipe, ioutil, http, url, context, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param list[str] pipe: (required)
- :param list[str] ioutil: (required)
- :param list[str] http: (required)
- :param list[str] url: (required)
- :param list[str] context: (required)
+ :param pipe: (required)
+ :type pipe: list[str]
+ :param ioutil: (required)
+ :type ioutil: list[str]
+ :param http: (required)
+ :type http: list[str]
+ :param url: (required)
+ :type url: list[str]
+ :param context: (required)
+ :type context: list[str]
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _return_http_data_only: response data without head status code
and headers
+ :type _return_http_data_only: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: None
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: None
"""
local_var_params = locals()
diff --git a/samples/client/petstore/python-asyncio/petstore_api/api/fake_classname_tags_123_api.py b/samples/client/petstore/python-asyncio/petstore_api/api/fake_classname_tags_123_api.py
index 2bb189bd01b..d963591a49a 100644
--- a/samples/client/petstore/python-asyncio/petstore_api/api/fake_classname_tags_123_api.py
+++ b/samples/client/petstore/python-asyncio/petstore_api/api/fake_classname_tags_123_api.py
@@ -42,21 +42,26 @@ class FakeClassnameTags123Api(object):
To test class name in snake case # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.test_classname(body, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param Client body: client model (required)
+ :param body: client model (required)
+ :type body: Client
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: Client
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: Client
"""
kwargs['_return_http_data_only'] = True
return self.test_classname_with_http_info(body, **kwargs) # noqa: E501
@@ -67,23 +72,29 @@ class FakeClassnameTags123Api(object):
To test class name in snake case # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.test_classname_with_http_info(body, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param Client body: client model (required)
+ :param body: client model (required)
+ :type body: Client
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _return_http_data_only: response data without head status code
and headers
+ :type _return_http_data_only: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: tuple(Client, status_code(int), headers(HTTPHeaderDict))
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: tuple(Client, status_code(int), headers(HTTPHeaderDict))
"""
local_var_params = locals()
diff --git a/samples/client/petstore/python-asyncio/petstore_api/api/pet_api.py b/samples/client/petstore/python-asyncio/petstore_api/api/pet_api.py
index 5a297a57647..7002fe32740 100644
--- a/samples/client/petstore/python-asyncio/petstore_api/api/pet_api.py
+++ b/samples/client/petstore/python-asyncio/petstore_api/api/pet_api.py
@@ -41,21 +41,26 @@ class PetApi(object):
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.add_pet(body, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param Pet body: Pet object that needs to be added to the store (required)
+ :param body: Pet object that needs to be added to the store (required)
+ :type body: Pet
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: None
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: None
"""
kwargs['_return_http_data_only'] = True
return self.add_pet_with_http_info(body, **kwargs) # noqa: E501
@@ -65,23 +70,29 @@ class PetApi(object):
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.add_pet_with_http_info(body, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param Pet body: Pet object that needs to be added to the store (required)
+ :param body: Pet object that needs to be added to the store (required)
+ :type body: Pet
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _return_http_data_only: response data without head status code
and headers
+ :type _return_http_data_only: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: None
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: None
"""
local_var_params = locals()
@@ -153,22 +164,28 @@ class PetApi(object):
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.delete_pet(pet_id, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param int pet_id: Pet id to delete (required)
- :param str api_key:
+ :param pet_id: Pet id to delete (required)
+ :type pet_id: int
+ :param api_key:
+ :type api_key: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: None
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: None
"""
kwargs['_return_http_data_only'] = True
return self.delete_pet_with_http_info(pet_id, **kwargs) # noqa: E501
@@ -178,24 +195,31 @@ class PetApi(object):
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.delete_pet_with_http_info(pet_id, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param int pet_id: Pet id to delete (required)
- :param str api_key:
+ :param pet_id: Pet id to delete (required)
+ :type pet_id: int
+ :param api_key:
+ :type api_key: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _return_http_data_only: response data without head status code
and headers
+ :type _return_http_data_only: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: None
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: None
"""
local_var_params = locals()
@@ -267,21 +291,26 @@ class PetApi(object):
Multiple status values can be provided with comma separated strings # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.find_pets_by_status(status, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param list[str] status: Status values that need to be considered for filter (required)
+ :param status: Status values that need to be considered for filter (required)
+ :type status: list[str]
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: list[Pet]
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: list[Pet]
"""
kwargs['_return_http_data_only'] = True
return self.find_pets_by_status_with_http_info(status, **kwargs) # noqa: E501
@@ -292,23 +321,29 @@ class PetApi(object):
Multiple status values can be provided with comma separated strings # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.find_pets_by_status_with_http_info(status, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param list[str] status: Status values that need to be considered for filter (required)
+ :param status: Status values that need to be considered for filter (required)
+ :type status: list[str]
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _return_http_data_only: response data without head status code
and headers
+ :type _return_http_data_only: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: tuple(list[Pet], status_code(int), headers(HTTPHeaderDict))
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: tuple(list[Pet], status_code(int), headers(HTTPHeaderDict))
"""
local_var_params = locals()
@@ -382,21 +417,26 @@ class PetApi(object):
Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.find_pets_by_tags(tags, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param list[str] tags: Tags to filter by (required)
+ :param tags: Tags to filter by (required)
+ :type tags: list[str]
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: list[Pet]
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: list[Pet]
"""
kwargs['_return_http_data_only'] = True
return self.find_pets_by_tags_with_http_info(tags, **kwargs) # noqa: E501
@@ -407,23 +447,29 @@ class PetApi(object):
Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.find_pets_by_tags_with_http_info(tags, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param list[str] tags: Tags to filter by (required)
+ :param tags: Tags to filter by (required)
+ :type tags: list[str]
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _return_http_data_only: response data without head status code
and headers
+ :type _return_http_data_only: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: tuple(list[Pet], status_code(int), headers(HTTPHeaderDict))
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: tuple(list[Pet], status_code(int), headers(HTTPHeaderDict))
"""
local_var_params = locals()
@@ -497,21 +543,26 @@ class PetApi(object):
Returns a single pet # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.get_pet_by_id(pet_id, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param int pet_id: ID of pet to return (required)
+ :param pet_id: ID of pet to return (required)
+ :type pet_id: int
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: Pet
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: Pet
"""
kwargs['_return_http_data_only'] = True
return self.get_pet_by_id_with_http_info(pet_id, **kwargs) # noqa: E501
@@ -522,23 +573,29 @@ class PetApi(object):
Returns a single pet # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.get_pet_by_id_with_http_info(pet_id, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param int pet_id: ID of pet to return (required)
+ :param pet_id: ID of pet to return (required)
+ :type pet_id: int
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _return_http_data_only: response data without head status code
and headers
+ :type _return_http_data_only: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: tuple(Pet, status_code(int), headers(HTTPHeaderDict))
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: tuple(Pet, status_code(int), headers(HTTPHeaderDict))
"""
local_var_params = locals()
@@ -610,21 +667,26 @@ class PetApi(object):
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.update_pet(body, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param Pet body: Pet object that needs to be added to the store (required)
+ :param body: Pet object that needs to be added to the store (required)
+ :type body: Pet
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: None
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: None
"""
kwargs['_return_http_data_only'] = True
return self.update_pet_with_http_info(body, **kwargs) # noqa: E501
@@ -634,23 +696,29 @@ class PetApi(object):
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.update_pet_with_http_info(body, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param Pet body: Pet object that needs to be added to the store (required)
+ :param body: Pet object that needs to be added to the store (required)
+ :type body: Pet
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _return_http_data_only: response data without head status code
and headers
+ :type _return_http_data_only: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: None
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: None
"""
local_var_params = locals()
@@ -722,23 +790,30 @@ class PetApi(object):
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.update_pet_with_form(pet_id, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param int pet_id: ID of pet that needs to be updated (required)
- :param str name: Updated name of the pet
- :param str status: Updated status of the pet
+ :param pet_id: ID of pet that needs to be updated (required)
+ :type pet_id: int
+ :param name: Updated name of the pet
+ :type name: str
+ :param status: Updated status of the pet
+ :type status: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: None
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: None
"""
kwargs['_return_http_data_only'] = True
return self.update_pet_with_form_with_http_info(pet_id, **kwargs) # noqa: E501
@@ -748,25 +823,33 @@ class PetApi(object):
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.update_pet_with_form_with_http_info(pet_id, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param int pet_id: ID of pet that needs to be updated (required)
- :param str name: Updated name of the pet
- :param str status: Updated status of the pet
+ :param pet_id: ID of pet that needs to be updated (required)
+ :type pet_id: int
+ :param name: Updated name of the pet
+ :type name: str
+ :param status: Updated status of the pet
+ :type status: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _return_http_data_only: response data without head status code
and headers
+ :type _return_http_data_only: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: None
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: None
"""
local_var_params = locals()
@@ -844,23 +927,30 @@ class PetApi(object):
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.upload_file(pet_id, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param int pet_id: ID of pet to update (required)
- :param str additional_metadata: Additional data to pass to server
- :param file file: file to upload
+ :param pet_id: ID of pet to update (required)
+ :type pet_id: int
+ :param additional_metadata: Additional data to pass to server
+ :type additional_metadata: str
+ :param file: file to upload
+ :type file: file
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: ApiResponse
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: ApiResponse
"""
kwargs['_return_http_data_only'] = True
return self.upload_file_with_http_info(pet_id, **kwargs) # noqa: E501
@@ -870,25 +960,33 @@ class PetApi(object):
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.upload_file_with_http_info(pet_id, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param int pet_id: ID of pet to update (required)
- :param str additional_metadata: Additional data to pass to server
- :param file file: file to upload
+ :param pet_id: ID of pet to update (required)
+ :type pet_id: int
+ :param additional_metadata: Additional data to pass to server
+ :type additional_metadata: str
+ :param file: file to upload
+ :type file: file
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _return_http_data_only: response data without head status code
and headers
+ :type _return_http_data_only: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: tuple(ApiResponse, status_code(int), headers(HTTPHeaderDict))
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: tuple(ApiResponse, status_code(int), headers(HTTPHeaderDict))
"""
local_var_params = locals()
@@ -970,23 +1068,30 @@ class PetApi(object):
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.upload_file_with_required_file(pet_id, required_file, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param int pet_id: ID of pet to update (required)
- :param file required_file: file to upload (required)
- :param str additional_metadata: Additional data to pass to server
+ :param pet_id: ID of pet to update (required)
+ :type pet_id: int
+ :param required_file: file to upload (required)
+ :type required_file: file
+ :param additional_metadata: Additional data to pass to server
+ :type additional_metadata: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: ApiResponse
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: ApiResponse
"""
kwargs['_return_http_data_only'] = True
return self.upload_file_with_required_file_with_http_info(pet_id, required_file, **kwargs) # noqa: E501
@@ -996,25 +1101,33 @@ class PetApi(object):
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.upload_file_with_required_file_with_http_info(pet_id, required_file, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param int pet_id: ID of pet to update (required)
- :param file required_file: file to upload (required)
- :param str additional_metadata: Additional data to pass to server
+ :param pet_id: ID of pet to update (required)
+ :type pet_id: int
+ :param required_file: file to upload (required)
+ :type required_file: file
+ :param additional_metadata: Additional data to pass to server
+ :type additional_metadata: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _return_http_data_only: response data without head status code
and headers
+ :type _return_http_data_only: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: tuple(ApiResponse, status_code(int), headers(HTTPHeaderDict))
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: tuple(ApiResponse, status_code(int), headers(HTTPHeaderDict))
"""
local_var_params = locals()
diff --git a/samples/client/petstore/python-asyncio/petstore_api/api/store_api.py b/samples/client/petstore/python-asyncio/petstore_api/api/store_api.py
index f693f755b74..0ede23f05ba 100644
--- a/samples/client/petstore/python-asyncio/petstore_api/api/store_api.py
+++ b/samples/client/petstore/python-asyncio/petstore_api/api/store_api.py
@@ -42,21 +42,26 @@ class StoreApi(object):
For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.delete_order(order_id, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param str order_id: ID of the order that needs to be deleted (required)
+ :param order_id: ID of the order that needs to be deleted (required)
+ :type order_id: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: None
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: None
"""
kwargs['_return_http_data_only'] = True
return self.delete_order_with_http_info(order_id, **kwargs) # noqa: E501
@@ -67,23 +72,29 @@ class StoreApi(object):
For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.delete_order_with_http_info(order_id, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param str order_id: ID of the order that needs to be deleted (required)
+ :param order_id: ID of the order that needs to be deleted (required)
+ :type order_id: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _return_http_data_only: response data without head status code
and headers
+ :type _return_http_data_only: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: None
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: None
"""
local_var_params = locals()
@@ -152,20 +163,24 @@ class StoreApi(object):
Returns a map of status codes to quantities # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.get_inventory(async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: dict(str, int)
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: dict(str, int)
"""
kwargs['_return_http_data_only'] = True
return self.get_inventory_with_http_info(**kwargs) # noqa: E501
@@ -176,22 +191,27 @@ class StoreApi(object):
Returns a map of status codes to quantities # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.get_inventory_with_http_info(async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _return_http_data_only: response data without head status code
and headers
+ :type _return_http_data_only: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: tuple(dict(str, int), status_code(int), headers(HTTPHeaderDict))
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: tuple(dict(str, int), status_code(int), headers(HTTPHeaderDict))
"""
local_var_params = locals()
@@ -257,21 +277,26 @@ class StoreApi(object):
For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.get_order_by_id(order_id, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param int order_id: ID of pet that needs to be fetched (required)
+ :param order_id: ID of pet that needs to be fetched (required)
+ :type order_id: int
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: Order
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: Order
"""
kwargs['_return_http_data_only'] = True
return self.get_order_by_id_with_http_info(order_id, **kwargs) # noqa: E501
@@ -282,23 +307,29 @@ class StoreApi(object):
For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.get_order_by_id_with_http_info(order_id, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param int order_id: ID of pet that needs to be fetched (required)
+ :param order_id: ID of pet that needs to be fetched (required)
+ :type order_id: int
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _return_http_data_only: response data without head status code
and headers
+ :type _return_http_data_only: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: tuple(Order, status_code(int), headers(HTTPHeaderDict))
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: tuple(Order, status_code(int), headers(HTTPHeaderDict))
"""
local_var_params = locals()
@@ -374,21 +405,26 @@ class StoreApi(object):
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.place_order(body, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param Order body: order placed for purchasing the pet (required)
+ :param body: order placed for purchasing the pet (required)
+ :type body: Order
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: Order
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: Order
"""
kwargs['_return_http_data_only'] = True
return self.place_order_with_http_info(body, **kwargs) # noqa: E501
@@ -398,23 +434,29 @@ class StoreApi(object):
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.place_order_with_http_info(body, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param Order body: order placed for purchasing the pet (required)
+ :param body: order placed for purchasing the pet (required)
+ :type body: Order
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _return_http_data_only: response data without head status code
and headers
+ :type _return_http_data_only: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: tuple(Order, status_code(int), headers(HTTPHeaderDict))
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: tuple(Order, status_code(int), headers(HTTPHeaderDict))
"""
local_var_params = locals()
diff --git a/samples/client/petstore/python-asyncio/petstore_api/api/user_api.py b/samples/client/petstore/python-asyncio/petstore_api/api/user_api.py
index 9462f00716a..a912483b023 100644
--- a/samples/client/petstore/python-asyncio/petstore_api/api/user_api.py
+++ b/samples/client/petstore/python-asyncio/petstore_api/api/user_api.py
@@ -42,21 +42,26 @@ class UserApi(object):
This can only be done by the logged in user. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.create_user(body, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param User body: Created user object (required)
+ :param body: Created user object (required)
+ :type body: User
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: None
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: None
"""
kwargs['_return_http_data_only'] = True
return self.create_user_with_http_info(body, **kwargs) # noqa: E501
@@ -67,23 +72,29 @@ class UserApi(object):
This can only be done by the logged in user. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.create_user_with_http_info(body, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param User body: Created user object (required)
+ :param body: Created user object (required)
+ :type body: User
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _return_http_data_only: response data without head status code
and headers
+ :type _return_http_data_only: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: None
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: None
"""
local_var_params = locals()
@@ -151,21 +162,26 @@ class UserApi(object):
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.create_users_with_array_input(body, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param list[User] body: List of user object (required)
+ :param body: List of user object (required)
+ :type body: list[User]
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: None
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: None
"""
kwargs['_return_http_data_only'] = True
return self.create_users_with_array_input_with_http_info(body, **kwargs) # noqa: E501
@@ -175,23 +191,29 @@ class UserApi(object):
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.create_users_with_array_input_with_http_info(body, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param list[User] body: List of user object (required)
+ :param body: List of user object (required)
+ :type body: list[User]
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _return_http_data_only: response data without head status code
and headers
+ :type _return_http_data_only: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: None
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: None
"""
local_var_params = locals()
@@ -259,21 +281,26 @@ class UserApi(object):
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.create_users_with_list_input(body, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param list[User] body: List of user object (required)
+ :param body: List of user object (required)
+ :type body: list[User]
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: None
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: None
"""
kwargs['_return_http_data_only'] = True
return self.create_users_with_list_input_with_http_info(body, **kwargs) # noqa: E501
@@ -283,23 +310,29 @@ class UserApi(object):
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.create_users_with_list_input_with_http_info(body, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param list[User] body: List of user object (required)
+ :param body: List of user object (required)
+ :type body: list[User]
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _return_http_data_only: response data without head status code
and headers
+ :type _return_http_data_only: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: None
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: None
"""
local_var_params = locals()
@@ -368,21 +401,26 @@ class UserApi(object):
This can only be done by the logged in user. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.delete_user(username, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param str username: The name that needs to be deleted (required)
+ :param username: The name that needs to be deleted (required)
+ :type username: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: None
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: None
"""
kwargs['_return_http_data_only'] = True
return self.delete_user_with_http_info(username, **kwargs) # noqa: E501
@@ -393,23 +431,29 @@ class UserApi(object):
This can only be done by the logged in user. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.delete_user_with_http_info(username, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param str username: The name that needs to be deleted (required)
+ :param username: The name that needs to be deleted (required)
+ :type username: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _return_http_data_only: response data without head status code
and headers
+ :type _return_http_data_only: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: None
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: None
"""
local_var_params = locals()
@@ -477,21 +521,26 @@ class UserApi(object):
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.get_user_by_name(username, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param str username: The name that needs to be fetched. Use user1 for testing. (required)
+ :param username: The name that needs to be fetched. Use user1 for testing. (required)
+ :type username: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: User
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: User
"""
kwargs['_return_http_data_only'] = True
return self.get_user_by_name_with_http_info(username, **kwargs) # noqa: E501
@@ -501,23 +550,29 @@ class UserApi(object):
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.get_user_by_name_with_http_info(username, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param str username: The name that needs to be fetched. Use user1 for testing. (required)
+ :param username: The name that needs to be fetched. Use user1 for testing. (required)
+ :type username: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _return_http_data_only: response data without head status code
and headers
+ :type _return_http_data_only: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: tuple(User, status_code(int), headers(HTTPHeaderDict))
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: tuple(User, status_code(int), headers(HTTPHeaderDict))
"""
local_var_params = locals()
@@ -589,22 +644,28 @@ class UserApi(object):
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.login_user(username, password, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param str username: The user name for login (required)
- :param str password: The password for login in clear text (required)
+ :param username: The user name for login (required)
+ :type username: str
+ :param password: The password for login in clear text (required)
+ :type password: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: str
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: str
"""
kwargs['_return_http_data_only'] = True
return self.login_user_with_http_info(username, password, **kwargs) # noqa: E501
@@ -614,24 +675,31 @@ class UserApi(object):
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.login_user_with_http_info(username, password, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param str username: The user name for login (required)
- :param str password: The password for login in clear text (required)
+ :param username: The user name for login (required)
+ :type username: str
+ :param password: The password for login in clear text (required)
+ :type password: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _return_http_data_only: response data without head status code
and headers
+ :type _return_http_data_only: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: tuple(str, status_code(int), headers(HTTPHeaderDict))
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: tuple(str, status_code(int), headers(HTTPHeaderDict))
"""
local_var_params = locals()
@@ -710,20 +778,24 @@ class UserApi(object):
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.logout_user(async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: None
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: None
"""
kwargs['_return_http_data_only'] = True
return self.logout_user_with_http_info(**kwargs) # noqa: E501
@@ -733,22 +805,27 @@ class UserApi(object):
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.logout_user_with_http_info(async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _return_http_data_only: response data without head status code
and headers
+ :type _return_http_data_only: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: None
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: None
"""
local_var_params = locals()
@@ -810,22 +887,28 @@ class UserApi(object):
This can only be done by the logged in user. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.update_user(username, body, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param str username: name that need to be deleted (required)
- :param User body: Updated user object (required)
+ :param username: name that need to be deleted (required)
+ :type username: str
+ :param body: Updated user object (required)
+ :type body: User
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: None
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: None
"""
kwargs['_return_http_data_only'] = True
return self.update_user_with_http_info(username, body, **kwargs) # noqa: E501
@@ -836,24 +919,31 @@ class UserApi(object):
This can only be done by the logged in user. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.update_user_with_http_info(username, body, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param str username: name that need to be deleted (required)
- :param User body: Updated user object (required)
+ :param username: name that need to be deleted (required)
+ :type username: str
+ :param body: Updated user object (required)
+ :type body: User
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _return_http_data_only: response data without head status code
and headers
+ :type _return_http_data_only: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: None
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: None
"""
local_var_params = locals()
diff --git a/samples/client/petstore/python-asyncio/petstore_api/models/additional_properties_any_type.py b/samples/client/petstore/python-asyncio/petstore_api/models/additional_properties_any_type.py
index 2954285de87..690c71705b9 100644
--- a/samples/client/petstore/python-asyncio/petstore_api/models/additional_properties_any_type.py
+++ b/samples/client/petstore/python-asyncio/petstore_api/models/additional_properties_any_type.py
@@ -68,7 +68,7 @@ class AdditionalPropertiesAnyType(object):
:param name: The name of this AdditionalPropertiesAnyType. # noqa: E501
- :type: str
+ :type name: str
"""
self._name = name
diff --git a/samples/client/petstore/python-asyncio/petstore_api/models/additional_properties_array.py b/samples/client/petstore/python-asyncio/petstore_api/models/additional_properties_array.py
index c6369c22a12..f0902bdaffa 100644
--- a/samples/client/petstore/python-asyncio/petstore_api/models/additional_properties_array.py
+++ b/samples/client/petstore/python-asyncio/petstore_api/models/additional_properties_array.py
@@ -68,7 +68,7 @@ class AdditionalPropertiesArray(object):
:param name: The name of this AdditionalPropertiesArray. # noqa: E501
- :type: str
+ :type name: str
"""
self._name = name
diff --git a/samples/client/petstore/python-asyncio/petstore_api/models/additional_properties_boolean.py b/samples/client/petstore/python-asyncio/petstore_api/models/additional_properties_boolean.py
index 599b7c8b884..f79d2609a1d 100644
--- a/samples/client/petstore/python-asyncio/petstore_api/models/additional_properties_boolean.py
+++ b/samples/client/petstore/python-asyncio/petstore_api/models/additional_properties_boolean.py
@@ -68,7 +68,7 @@ class AdditionalPropertiesBoolean(object):
:param name: The name of this AdditionalPropertiesBoolean. # noqa: E501
- :type: str
+ :type name: str
"""
self._name = name
diff --git a/samples/client/petstore/python-asyncio/petstore_api/models/additional_properties_class.py b/samples/client/petstore/python-asyncio/petstore_api/models/additional_properties_class.py
index be4455c683b..ca334635175 100644
--- a/samples/client/petstore/python-asyncio/petstore_api/models/additional_properties_class.py
+++ b/samples/client/petstore/python-asyncio/petstore_api/models/additional_properties_class.py
@@ -118,7 +118,7 @@ class AdditionalPropertiesClass(object):
:param map_string: The map_string of this AdditionalPropertiesClass. # noqa: E501
- :type: dict(str, str)
+ :type map_string: dict(str, str)
"""
self._map_string = map_string
@@ -139,7 +139,7 @@ class AdditionalPropertiesClass(object):
:param map_number: The map_number of this AdditionalPropertiesClass. # noqa: E501
- :type: dict(str, float)
+ :type map_number: dict(str, float)
"""
self._map_number = map_number
@@ -160,7 +160,7 @@ class AdditionalPropertiesClass(object):
:param map_integer: The map_integer of this AdditionalPropertiesClass. # noqa: E501
- :type: dict(str, int)
+ :type map_integer: dict(str, int)
"""
self._map_integer = map_integer
@@ -181,7 +181,7 @@ class AdditionalPropertiesClass(object):
:param map_boolean: The map_boolean of this AdditionalPropertiesClass. # noqa: E501
- :type: dict(str, bool)
+ :type map_boolean: dict(str, bool)
"""
self._map_boolean = map_boolean
@@ -202,7 +202,7 @@ class AdditionalPropertiesClass(object):
:param map_array_integer: The map_array_integer of this AdditionalPropertiesClass. # noqa: E501
- :type: dict(str, list[int])
+ :type map_array_integer: dict(str, list[int])
"""
self._map_array_integer = map_array_integer
@@ -223,7 +223,7 @@ class AdditionalPropertiesClass(object):
:param map_array_anytype: The map_array_anytype of this AdditionalPropertiesClass. # noqa: E501
- :type: dict(str, list[object])
+ :type map_array_anytype: dict(str, list[object])
"""
self._map_array_anytype = map_array_anytype
@@ -244,7 +244,7 @@ class AdditionalPropertiesClass(object):
:param map_map_string: The map_map_string of this AdditionalPropertiesClass. # noqa: E501
- :type: dict(str, dict(str, str))
+ :type map_map_string: dict(str, dict(str, str))
"""
self._map_map_string = map_map_string
@@ -265,7 +265,7 @@ class AdditionalPropertiesClass(object):
:param map_map_anytype: The map_map_anytype of this AdditionalPropertiesClass. # noqa: E501
- :type: dict(str, dict(str, object))
+ :type map_map_anytype: dict(str, dict(str, object))
"""
self._map_map_anytype = map_map_anytype
@@ -286,7 +286,7 @@ class AdditionalPropertiesClass(object):
:param anytype_1: The anytype_1 of this AdditionalPropertiesClass. # noqa: E501
- :type: object
+ :type anytype_1: object
"""
self._anytype_1 = anytype_1
@@ -307,7 +307,7 @@ class AdditionalPropertiesClass(object):
:param anytype_2: The anytype_2 of this AdditionalPropertiesClass. # noqa: E501
- :type: object
+ :type anytype_2: object
"""
self._anytype_2 = anytype_2
@@ -328,7 +328,7 @@ class AdditionalPropertiesClass(object):
:param anytype_3: The anytype_3 of this AdditionalPropertiesClass. # noqa: E501
- :type: object
+ :type anytype_3: object
"""
self._anytype_3 = anytype_3
diff --git a/samples/client/petstore/python-asyncio/petstore_api/models/additional_properties_integer.py b/samples/client/petstore/python-asyncio/petstore_api/models/additional_properties_integer.py
index ddbb85fdf33..5c3ebf230d1 100644
--- a/samples/client/petstore/python-asyncio/petstore_api/models/additional_properties_integer.py
+++ b/samples/client/petstore/python-asyncio/petstore_api/models/additional_properties_integer.py
@@ -68,7 +68,7 @@ class AdditionalPropertiesInteger(object):
:param name: The name of this AdditionalPropertiesInteger. # noqa: E501
- :type: str
+ :type name: str
"""
self._name = name
diff --git a/samples/client/petstore/python-asyncio/petstore_api/models/additional_properties_number.py b/samples/client/petstore/python-asyncio/petstore_api/models/additional_properties_number.py
index 8bbeda83ecc..0e7f34ed329 100644
--- a/samples/client/petstore/python-asyncio/petstore_api/models/additional_properties_number.py
+++ b/samples/client/petstore/python-asyncio/petstore_api/models/additional_properties_number.py
@@ -68,7 +68,7 @@ class AdditionalPropertiesNumber(object):
:param name: The name of this AdditionalPropertiesNumber. # noqa: E501
- :type: str
+ :type name: str
"""
self._name = name
diff --git a/samples/client/petstore/python-asyncio/petstore_api/models/additional_properties_object.py b/samples/client/petstore/python-asyncio/petstore_api/models/additional_properties_object.py
index af87595b3e4..5a8ea94b929 100644
--- a/samples/client/petstore/python-asyncio/petstore_api/models/additional_properties_object.py
+++ b/samples/client/petstore/python-asyncio/petstore_api/models/additional_properties_object.py
@@ -68,7 +68,7 @@ class AdditionalPropertiesObject(object):
:param name: The name of this AdditionalPropertiesObject. # noqa: E501
- :type: str
+ :type name: str
"""
self._name = name
diff --git a/samples/client/petstore/python-asyncio/petstore_api/models/additional_properties_string.py b/samples/client/petstore/python-asyncio/petstore_api/models/additional_properties_string.py
index 6ab2c91feda..8436a1e345b 100644
--- a/samples/client/petstore/python-asyncio/petstore_api/models/additional_properties_string.py
+++ b/samples/client/petstore/python-asyncio/petstore_api/models/additional_properties_string.py
@@ -68,7 +68,7 @@ class AdditionalPropertiesString(object):
:param name: The name of this AdditionalPropertiesString. # noqa: E501
- :type: str
+ :type name: str
"""
self._name = name
diff --git a/samples/client/petstore/python-asyncio/petstore_api/models/animal.py b/samples/client/petstore/python-asyncio/petstore_api/models/animal.py
index b338e0eb18e..eef35ab093a 100644
--- a/samples/client/petstore/python-asyncio/petstore_api/models/animal.py
+++ b/samples/client/petstore/python-asyncio/petstore_api/models/animal.py
@@ -78,7 +78,7 @@ class Animal(object):
:param class_name: The class_name of this Animal. # noqa: E501
- :type: str
+ :type class_name: str
"""
if self.local_vars_configuration.client_side_validation and class_name is None: # noqa: E501
raise ValueError("Invalid value for `class_name`, must not be `None`") # noqa: E501
@@ -101,7 +101,7 @@ class Animal(object):
:param color: The color of this Animal. # noqa: E501
- :type: str
+ :type color: str
"""
self._color = color
diff --git a/samples/client/petstore/python-asyncio/petstore_api/models/api_response.py b/samples/client/petstore/python-asyncio/petstore_api/models/api_response.py
index 24e80d02aea..8cb64673c35 100644
--- a/samples/client/petstore/python-asyncio/petstore_api/models/api_response.py
+++ b/samples/client/petstore/python-asyncio/petstore_api/models/api_response.py
@@ -78,7 +78,7 @@ class ApiResponse(object):
:param code: The code of this ApiResponse. # noqa: E501
- :type: int
+ :type code: int
"""
self._code = code
@@ -99,7 +99,7 @@ class ApiResponse(object):
:param type: The type of this ApiResponse. # noqa: E501
- :type: str
+ :type type: str
"""
self._type = type
@@ -120,7 +120,7 @@ class ApiResponse(object):
:param message: The message of this ApiResponse. # noqa: E501
- :type: str
+ :type message: str
"""
self._message = message
diff --git a/samples/client/petstore/python-asyncio/petstore_api/models/array_of_array_of_number_only.py b/samples/client/petstore/python-asyncio/petstore_api/models/array_of_array_of_number_only.py
index 1f654452077..41a689c534a 100644
--- a/samples/client/petstore/python-asyncio/petstore_api/models/array_of_array_of_number_only.py
+++ b/samples/client/petstore/python-asyncio/petstore_api/models/array_of_array_of_number_only.py
@@ -68,7 +68,7 @@ class ArrayOfArrayOfNumberOnly(object):
:param array_array_number: The array_array_number of this ArrayOfArrayOfNumberOnly. # noqa: E501
- :type: list[list[float]]
+ :type array_array_number: list[list[float]]
"""
self._array_array_number = array_array_number
diff --git a/samples/client/petstore/python-asyncio/petstore_api/models/array_of_number_only.py b/samples/client/petstore/python-asyncio/petstore_api/models/array_of_number_only.py
index 27ba1f58e31..ddb7f7c7abe 100644
--- a/samples/client/petstore/python-asyncio/petstore_api/models/array_of_number_only.py
+++ b/samples/client/petstore/python-asyncio/petstore_api/models/array_of_number_only.py
@@ -68,7 +68,7 @@ class ArrayOfNumberOnly(object):
:param array_number: The array_number of this ArrayOfNumberOnly. # noqa: E501
- :type: list[float]
+ :type array_number: list[float]
"""
self._array_number = array_number
diff --git a/samples/client/petstore/python-asyncio/petstore_api/models/array_test.py b/samples/client/petstore/python-asyncio/petstore_api/models/array_test.py
index f34a372f6f3..e8e5c378f98 100644
--- a/samples/client/petstore/python-asyncio/petstore_api/models/array_test.py
+++ b/samples/client/petstore/python-asyncio/petstore_api/models/array_test.py
@@ -78,7 +78,7 @@ class ArrayTest(object):
:param array_of_string: The array_of_string of this ArrayTest. # noqa: E501
- :type: list[str]
+ :type array_of_string: list[str]
"""
self._array_of_string = array_of_string
@@ -99,7 +99,7 @@ class ArrayTest(object):
:param array_array_of_integer: The array_array_of_integer of this ArrayTest. # noqa: E501
- :type: list[list[int]]
+ :type array_array_of_integer: list[list[int]]
"""
self._array_array_of_integer = array_array_of_integer
@@ -120,7 +120,7 @@ class ArrayTest(object):
:param array_array_of_model: The array_array_of_model of this ArrayTest. # noqa: E501
- :type: list[list[ReadOnlyFirst]]
+ :type array_array_of_model: list[list[ReadOnlyFirst]]
"""
self._array_array_of_model = array_array_of_model
diff --git a/samples/client/petstore/python-asyncio/petstore_api/models/big_cat.py b/samples/client/petstore/python-asyncio/petstore_api/models/big_cat.py
index fe52c3650ac..946981f5b7f 100644
--- a/samples/client/petstore/python-asyncio/petstore_api/models/big_cat.py
+++ b/samples/client/petstore/python-asyncio/petstore_api/models/big_cat.py
@@ -68,7 +68,7 @@ class BigCat(object):
:param kind: The kind of this BigCat. # noqa: E501
- :type: str
+ :type kind: str
"""
allowed_values = ["lions", "tigers", "leopards", "jaguars"] # noqa: E501
if self.local_vars_configuration.client_side_validation and kind not in allowed_values: # noqa: E501
diff --git a/samples/client/petstore/python-asyncio/petstore_api/models/big_cat_all_of.py b/samples/client/petstore/python-asyncio/petstore_api/models/big_cat_all_of.py
index b75500db987..41c205d2576 100644
--- a/samples/client/petstore/python-asyncio/petstore_api/models/big_cat_all_of.py
+++ b/samples/client/petstore/python-asyncio/petstore_api/models/big_cat_all_of.py
@@ -68,7 +68,7 @@ class BigCatAllOf(object):
:param kind: The kind of this BigCatAllOf. # noqa: E501
- :type: str
+ :type kind: str
"""
allowed_values = ["lions", "tigers", "leopards", "jaguars"] # noqa: E501
if self.local_vars_configuration.client_side_validation and kind not in allowed_values: # noqa: E501
diff --git a/samples/client/petstore/python-asyncio/petstore_api/models/capitalization.py b/samples/client/petstore/python-asyncio/petstore_api/models/capitalization.py
index cef34c5f6dc..967d324a0ab 100644
--- a/samples/client/petstore/python-asyncio/petstore_api/models/capitalization.py
+++ b/samples/client/petstore/python-asyncio/petstore_api/models/capitalization.py
@@ -93,7 +93,7 @@ class Capitalization(object):
:param small_camel: The small_camel of this Capitalization. # noqa: E501
- :type: str
+ :type small_camel: str
"""
self._small_camel = small_camel
@@ -114,7 +114,7 @@ class Capitalization(object):
:param capital_camel: The capital_camel of this Capitalization. # noqa: E501
- :type: str
+ :type capital_camel: str
"""
self._capital_camel = capital_camel
@@ -135,7 +135,7 @@ class Capitalization(object):
:param small_snake: The small_snake of this Capitalization. # noqa: E501
- :type: str
+ :type small_snake: str
"""
self._small_snake = small_snake
@@ -156,7 +156,7 @@ class Capitalization(object):
:param capital_snake: The capital_snake of this Capitalization. # noqa: E501
- :type: str
+ :type capital_snake: str
"""
self._capital_snake = capital_snake
@@ -177,7 +177,7 @@ class Capitalization(object):
:param sca_eth_flow_points: The sca_eth_flow_points of this Capitalization. # noqa: E501
- :type: str
+ :type sca_eth_flow_points: str
"""
self._sca_eth_flow_points = sca_eth_flow_points
@@ -200,7 +200,7 @@ class Capitalization(object):
Name of the pet # noqa: E501
:param att_name: The att_name of this Capitalization. # noqa: E501
- :type: str
+ :type att_name: str
"""
self._att_name = att_name
diff --git a/samples/client/petstore/python-asyncio/petstore_api/models/cat.py b/samples/client/petstore/python-asyncio/petstore_api/models/cat.py
index e39c1c82508..b3b0d868c7f 100644
--- a/samples/client/petstore/python-asyncio/petstore_api/models/cat.py
+++ b/samples/client/petstore/python-asyncio/petstore_api/models/cat.py
@@ -68,7 +68,7 @@ class Cat(object):
:param declawed: The declawed of this Cat. # noqa: E501
- :type: bool
+ :type declawed: bool
"""
self._declawed = declawed
diff --git a/samples/client/petstore/python-asyncio/petstore_api/models/cat_all_of.py b/samples/client/petstore/python-asyncio/petstore_api/models/cat_all_of.py
index 7e90fab9348..f573a04636c 100644
--- a/samples/client/petstore/python-asyncio/petstore_api/models/cat_all_of.py
+++ b/samples/client/petstore/python-asyncio/petstore_api/models/cat_all_of.py
@@ -68,7 +68,7 @@ class CatAllOf(object):
:param declawed: The declawed of this CatAllOf. # noqa: E501
- :type: bool
+ :type declawed: bool
"""
self._declawed = declawed
diff --git a/samples/client/petstore/python-asyncio/petstore_api/models/category.py b/samples/client/petstore/python-asyncio/petstore_api/models/category.py
index b47c148953e..11a7bf85f3a 100644
--- a/samples/client/petstore/python-asyncio/petstore_api/models/category.py
+++ b/samples/client/petstore/python-asyncio/petstore_api/models/category.py
@@ -72,7 +72,7 @@ class Category(object):
:param id: The id of this Category. # noqa: E501
- :type: int
+ :type id: int
"""
self._id = id
@@ -93,7 +93,7 @@ class Category(object):
:param name: The name of this Category. # noqa: E501
- :type: str
+ :type name: str
"""
if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501
raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501
diff --git a/samples/client/petstore/python-asyncio/petstore_api/models/class_model.py b/samples/client/petstore/python-asyncio/petstore_api/models/class_model.py
index ef6060ffa70..aac505ea064 100644
--- a/samples/client/petstore/python-asyncio/petstore_api/models/class_model.py
+++ b/samples/client/petstore/python-asyncio/petstore_api/models/class_model.py
@@ -68,7 +68,7 @@ class ClassModel(object):
:param _class: The _class of this ClassModel. # noqa: E501
- :type: str
+ :type _class: str
"""
self.__class = _class
diff --git a/samples/client/petstore/python-asyncio/petstore_api/models/client.py b/samples/client/petstore/python-asyncio/petstore_api/models/client.py
index ee5dbf1c43a..2006350b210 100644
--- a/samples/client/petstore/python-asyncio/petstore_api/models/client.py
+++ b/samples/client/petstore/python-asyncio/petstore_api/models/client.py
@@ -68,7 +68,7 @@ class Client(object):
:param client: The client of this Client. # noqa: E501
- :type: str
+ :type client: str
"""
self._client = client
diff --git a/samples/client/petstore/python-asyncio/petstore_api/models/dog.py b/samples/client/petstore/python-asyncio/petstore_api/models/dog.py
index eacb63eedb0..fb9024d0bb7 100644
--- a/samples/client/petstore/python-asyncio/petstore_api/models/dog.py
+++ b/samples/client/petstore/python-asyncio/petstore_api/models/dog.py
@@ -68,7 +68,7 @@ class Dog(object):
:param breed: The breed of this Dog. # noqa: E501
- :type: str
+ :type breed: str
"""
self._breed = breed
diff --git a/samples/client/petstore/python-asyncio/petstore_api/models/dog_all_of.py b/samples/client/petstore/python-asyncio/petstore_api/models/dog_all_of.py
index 48e04855708..5943ba900dd 100644
--- a/samples/client/petstore/python-asyncio/petstore_api/models/dog_all_of.py
+++ b/samples/client/petstore/python-asyncio/petstore_api/models/dog_all_of.py
@@ -68,7 +68,7 @@ class DogAllOf(object):
:param breed: The breed of this DogAllOf. # noqa: E501
- :type: str
+ :type breed: str
"""
self._breed = breed
diff --git a/samples/client/petstore/python-asyncio/petstore_api/models/enum_arrays.py b/samples/client/petstore/python-asyncio/petstore_api/models/enum_arrays.py
index 819ff322157..ae2ea1d4251 100644
--- a/samples/client/petstore/python-asyncio/petstore_api/models/enum_arrays.py
+++ b/samples/client/petstore/python-asyncio/petstore_api/models/enum_arrays.py
@@ -73,7 +73,7 @@ class EnumArrays(object):
:param just_symbol: The just_symbol of this EnumArrays. # noqa: E501
- :type: str
+ :type just_symbol: str
"""
allowed_values = [">=", "$"] # noqa: E501
if self.local_vars_configuration.client_side_validation and just_symbol not in allowed_values: # noqa: E501
@@ -100,7 +100,7 @@ class EnumArrays(object):
:param array_enum: The array_enum of this EnumArrays. # noqa: E501
- :type: list[str]
+ :type array_enum: list[str]
"""
allowed_values = ["fish", "crab"] # noqa: E501
if (self.local_vars_configuration.client_side_validation and
diff --git a/samples/client/petstore/python-asyncio/petstore_api/models/enum_test.py b/samples/client/petstore/python-asyncio/petstore_api/models/enum_test.py
index 464281b3ec0..e9872c4d005 100644
--- a/samples/client/petstore/python-asyncio/petstore_api/models/enum_test.py
+++ b/samples/client/petstore/python-asyncio/petstore_api/models/enum_test.py
@@ -87,7 +87,7 @@ class EnumTest(object):
:param enum_string: The enum_string of this EnumTest. # noqa: E501
- :type: str
+ :type enum_string: str
"""
allowed_values = ["UPPER", "lower", ""] # noqa: E501
if self.local_vars_configuration.client_side_validation and enum_string not in allowed_values: # noqa: E501
@@ -114,7 +114,7 @@ class EnumTest(object):
:param enum_string_required: The enum_string_required of this EnumTest. # noqa: E501
- :type: str
+ :type enum_string_required: str
"""
if self.local_vars_configuration.client_side_validation and enum_string_required is None: # noqa: E501
raise ValueError("Invalid value for `enum_string_required`, must not be `None`") # noqa: E501
@@ -143,7 +143,7 @@ class EnumTest(object):
:param enum_integer: The enum_integer of this EnumTest. # noqa: E501
- :type: int
+ :type enum_integer: int
"""
allowed_values = [1, -1] # noqa: E501
if self.local_vars_configuration.client_side_validation and enum_integer not in allowed_values: # noqa: E501
@@ -170,7 +170,7 @@ class EnumTest(object):
:param enum_number: The enum_number of this EnumTest. # noqa: E501
- :type: float
+ :type enum_number: float
"""
allowed_values = [1.1, -1.2] # noqa: E501
if self.local_vars_configuration.client_side_validation and enum_number not in allowed_values: # noqa: E501
@@ -197,7 +197,7 @@ class EnumTest(object):
:param outer_enum: The outer_enum of this EnumTest. # noqa: E501
- :type: OuterEnum
+ :type outer_enum: OuterEnum
"""
self._outer_enum = outer_enum
diff --git a/samples/client/petstore/python-asyncio/petstore_api/models/file.py b/samples/client/petstore/python-asyncio/petstore_api/models/file.py
index 282df2957e6..4fb5c31762e 100644
--- a/samples/client/petstore/python-asyncio/petstore_api/models/file.py
+++ b/samples/client/petstore/python-asyncio/petstore_api/models/file.py
@@ -70,7 +70,7 @@ class File(object):
Test capitalization # noqa: E501
:param source_uri: The source_uri of this File. # noqa: E501
- :type: str
+ :type source_uri: str
"""
self._source_uri = source_uri
diff --git a/samples/client/petstore/python-asyncio/petstore_api/models/file_schema_test_class.py b/samples/client/petstore/python-asyncio/petstore_api/models/file_schema_test_class.py
index de7f865b47e..2f2d44a7b33 100644
--- a/samples/client/petstore/python-asyncio/petstore_api/models/file_schema_test_class.py
+++ b/samples/client/petstore/python-asyncio/petstore_api/models/file_schema_test_class.py
@@ -73,7 +73,7 @@ class FileSchemaTestClass(object):
:param file: The file of this FileSchemaTestClass. # noqa: E501
- :type: File
+ :type file: File
"""
self._file = file
@@ -94,7 +94,7 @@ class FileSchemaTestClass(object):
:param files: The files of this FileSchemaTestClass. # noqa: E501
- :type: list[File]
+ :type files: list[File]
"""
self._files = files
diff --git a/samples/client/petstore/python-asyncio/petstore_api/models/format_test.py b/samples/client/petstore/python-asyncio/petstore_api/models/format_test.py
index 6396c442f62..c96f8132fa6 100644
--- a/samples/client/petstore/python-asyncio/petstore_api/models/format_test.py
+++ b/samples/client/petstore/python-asyncio/petstore_api/models/format_test.py
@@ -129,7 +129,7 @@ class FormatTest(object):
:param integer: The integer of this FormatTest. # noqa: E501
- :type: int
+ :type integer: int
"""
if (self.local_vars_configuration.client_side_validation and
integer is not None and integer > 100): # noqa: E501
@@ -156,7 +156,7 @@ class FormatTest(object):
:param int32: The int32 of this FormatTest. # noqa: E501
- :type: int
+ :type int32: int
"""
if (self.local_vars_configuration.client_side_validation and
int32 is not None and int32 > 200): # noqa: E501
@@ -183,7 +183,7 @@ class FormatTest(object):
:param int64: The int64 of this FormatTest. # noqa: E501
- :type: int
+ :type int64: int
"""
self._int64 = int64
@@ -204,7 +204,7 @@ class FormatTest(object):
:param number: The number of this FormatTest. # noqa: E501
- :type: float
+ :type number: float
"""
if self.local_vars_configuration.client_side_validation and number is None: # noqa: E501
raise ValueError("Invalid value for `number`, must not be `None`") # noqa: E501
@@ -233,7 +233,7 @@ class FormatTest(object):
:param float: The float of this FormatTest. # noqa: E501
- :type: float
+ :type float: float
"""
if (self.local_vars_configuration.client_side_validation and
float is not None and float > 987.6): # noqa: E501
@@ -260,7 +260,7 @@ class FormatTest(object):
:param double: The double of this FormatTest. # noqa: E501
- :type: float
+ :type double: float
"""
if (self.local_vars_configuration.client_side_validation and
double is not None and double > 123.4): # noqa: E501
@@ -287,7 +287,7 @@ class FormatTest(object):
:param string: The string of this FormatTest. # noqa: E501
- :type: str
+ :type string: str
"""
if (self.local_vars_configuration.client_side_validation and
string is not None and not re.search(r'[a-z]', string, flags=re.IGNORECASE)): # noqa: E501
@@ -311,7 +311,7 @@ class FormatTest(object):
:param byte: The byte of this FormatTest. # noqa: E501
- :type: str
+ :type byte: str
"""
if self.local_vars_configuration.client_side_validation and byte is None: # noqa: E501
raise ValueError("Invalid value for `byte`, must not be `None`") # noqa: E501
@@ -337,7 +337,7 @@ class FormatTest(object):
:param binary: The binary of this FormatTest. # noqa: E501
- :type: file
+ :type binary: file
"""
self._binary = binary
@@ -358,7 +358,7 @@ class FormatTest(object):
:param date: The date of this FormatTest. # noqa: E501
- :type: date
+ :type date: date
"""
if self.local_vars_configuration.client_side_validation and date is None: # noqa: E501
raise ValueError("Invalid value for `date`, must not be `None`") # noqa: E501
@@ -381,7 +381,7 @@ class FormatTest(object):
:param date_time: The date_time of this FormatTest. # noqa: E501
- :type: datetime
+ :type date_time: datetime
"""
self._date_time = date_time
@@ -402,7 +402,7 @@ class FormatTest(object):
:param uuid: The uuid of this FormatTest. # noqa: E501
- :type: str
+ :type uuid: str
"""
self._uuid = uuid
@@ -423,7 +423,7 @@ class FormatTest(object):
:param password: The password of this FormatTest. # noqa: E501
- :type: str
+ :type password: str
"""
if self.local_vars_configuration.client_side_validation and password is None: # noqa: E501
raise ValueError("Invalid value for `password`, must not be `None`") # noqa: E501
@@ -452,7 +452,7 @@ class FormatTest(object):
:param big_decimal: The big_decimal of this FormatTest. # noqa: E501
- :type: BigDecimal
+ :type big_decimal: BigDecimal
"""
self._big_decimal = big_decimal
diff --git a/samples/client/petstore/python-asyncio/petstore_api/models/has_only_read_only.py b/samples/client/petstore/python-asyncio/petstore_api/models/has_only_read_only.py
index 5fc2f8a9ebd..fa496519ecb 100644
--- a/samples/client/petstore/python-asyncio/petstore_api/models/has_only_read_only.py
+++ b/samples/client/petstore/python-asyncio/petstore_api/models/has_only_read_only.py
@@ -73,7 +73,7 @@ class HasOnlyReadOnly(object):
:param bar: The bar of this HasOnlyReadOnly. # noqa: E501
- :type: str
+ :type bar: str
"""
self._bar = bar
@@ -94,7 +94,7 @@ class HasOnlyReadOnly(object):
:param foo: The foo of this HasOnlyReadOnly. # noqa: E501
- :type: str
+ :type foo: str
"""
self._foo = foo
diff --git a/samples/client/petstore/python-asyncio/petstore_api/models/list.py b/samples/client/petstore/python-asyncio/petstore_api/models/list.py
index d58d13e90fb..e21a220f71c 100644
--- a/samples/client/petstore/python-asyncio/petstore_api/models/list.py
+++ b/samples/client/petstore/python-asyncio/petstore_api/models/list.py
@@ -68,7 +68,7 @@ class List(object):
:param _123_list: The _123_list of this List. # noqa: E501
- :type: str
+ :type _123_list: str
"""
self.__123_list = _123_list
diff --git a/samples/client/petstore/python-asyncio/petstore_api/models/map_test.py b/samples/client/petstore/python-asyncio/petstore_api/models/map_test.py
index f0cfba5073b..8afc875ce51 100644
--- a/samples/client/petstore/python-asyncio/petstore_api/models/map_test.py
+++ b/samples/client/petstore/python-asyncio/petstore_api/models/map_test.py
@@ -83,7 +83,7 @@ class MapTest(object):
:param map_map_of_string: The map_map_of_string of this MapTest. # noqa: E501
- :type: dict(str, dict(str, str))
+ :type map_map_of_string: dict(str, dict(str, str))
"""
self._map_map_of_string = map_map_of_string
@@ -104,7 +104,7 @@ class MapTest(object):
:param map_of_enum_string: The map_of_enum_string of this MapTest. # noqa: E501
- :type: dict(str, str)
+ :type map_of_enum_string: dict(str, str)
"""
allowed_values = ["UPPER", "lower"] # noqa: E501
if (self.local_vars_configuration.client_side_validation and
@@ -133,7 +133,7 @@ class MapTest(object):
:param direct_map: The direct_map of this MapTest. # noqa: E501
- :type: dict(str, bool)
+ :type direct_map: dict(str, bool)
"""
self._direct_map = direct_map
@@ -154,7 +154,7 @@ class MapTest(object):
:param indirect_map: The indirect_map of this MapTest. # noqa: E501
- :type: dict(str, bool)
+ :type indirect_map: dict(str, bool)
"""
self._indirect_map = indirect_map
diff --git a/samples/client/petstore/python-asyncio/petstore_api/models/mixed_properties_and_additional_properties_class.py b/samples/client/petstore/python-asyncio/petstore_api/models/mixed_properties_and_additional_properties_class.py
index 5da34f8830e..8aecbf0f558 100644
--- a/samples/client/petstore/python-asyncio/petstore_api/models/mixed_properties_and_additional_properties_class.py
+++ b/samples/client/petstore/python-asyncio/petstore_api/models/mixed_properties_and_additional_properties_class.py
@@ -78,7 +78,7 @@ class MixedPropertiesAndAdditionalPropertiesClass(object):
:param uuid: The uuid of this MixedPropertiesAndAdditionalPropertiesClass. # noqa: E501
- :type: str
+ :type uuid: str
"""
self._uuid = uuid
@@ -99,7 +99,7 @@ class MixedPropertiesAndAdditionalPropertiesClass(object):
:param date_time: The date_time of this MixedPropertiesAndAdditionalPropertiesClass. # noqa: E501
- :type: datetime
+ :type date_time: datetime
"""
self._date_time = date_time
@@ -120,7 +120,7 @@ class MixedPropertiesAndAdditionalPropertiesClass(object):
:param map: The map of this MixedPropertiesAndAdditionalPropertiesClass. # noqa: E501
- :type: dict(str, Animal)
+ :type map: dict(str, Animal)
"""
self._map = map
diff --git a/samples/client/petstore/python-asyncio/petstore_api/models/model200_response.py b/samples/client/petstore/python-asyncio/petstore_api/models/model200_response.py
index 841ce1f18f3..3f4c4e2bd2a 100644
--- a/samples/client/petstore/python-asyncio/petstore_api/models/model200_response.py
+++ b/samples/client/petstore/python-asyncio/petstore_api/models/model200_response.py
@@ -73,7 +73,7 @@ class Model200Response(object):
:param name: The name of this Model200Response. # noqa: E501
- :type: int
+ :type name: int
"""
self._name = name
@@ -94,7 +94,7 @@ class Model200Response(object):
:param _class: The _class of this Model200Response. # noqa: E501
- :type: str
+ :type _class: str
"""
self.__class = _class
diff --git a/samples/client/petstore/python-asyncio/petstore_api/models/model_return.py b/samples/client/petstore/python-asyncio/petstore_api/models/model_return.py
index fdd8d72314a..1009c50ef08 100644
--- a/samples/client/petstore/python-asyncio/petstore_api/models/model_return.py
+++ b/samples/client/petstore/python-asyncio/petstore_api/models/model_return.py
@@ -68,7 +68,7 @@ class ModelReturn(object):
:param _return: The _return of this ModelReturn. # noqa: E501
- :type: int
+ :type _return: int
"""
self.__return = _return
diff --git a/samples/client/petstore/python-asyncio/petstore_api/models/name.py b/samples/client/petstore/python-asyncio/petstore_api/models/name.py
index bb2c1fbd73c..6ee8261e782 100644
--- a/samples/client/petstore/python-asyncio/petstore_api/models/name.py
+++ b/samples/client/petstore/python-asyncio/petstore_api/models/name.py
@@ -82,7 +82,7 @@ class Name(object):
:param name: The name of this Name. # noqa: E501
- :type: int
+ :type name: int
"""
if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501
raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501
@@ -105,7 +105,7 @@ class Name(object):
:param snake_case: The snake_case of this Name. # noqa: E501
- :type: int
+ :type snake_case: int
"""
self._snake_case = snake_case
@@ -126,7 +126,7 @@ class Name(object):
:param _property: The _property of this Name. # noqa: E501
- :type: str
+ :type _property: str
"""
self.__property = _property
@@ -147,7 +147,7 @@ class Name(object):
:param _123_number: The _123_number of this Name. # noqa: E501
- :type: int
+ :type _123_number: int
"""
self.__123_number = _123_number
diff --git a/samples/client/petstore/python-asyncio/petstore_api/models/number_only.py b/samples/client/petstore/python-asyncio/petstore_api/models/number_only.py
index 99b2424852f..90f09d8b7d5 100644
--- a/samples/client/petstore/python-asyncio/petstore_api/models/number_only.py
+++ b/samples/client/petstore/python-asyncio/petstore_api/models/number_only.py
@@ -68,7 +68,7 @@ class NumberOnly(object):
:param just_number: The just_number of this NumberOnly. # noqa: E501
- :type: float
+ :type just_number: float
"""
self._just_number = just_number
diff --git a/samples/client/petstore/python-asyncio/petstore_api/models/order.py b/samples/client/petstore/python-asyncio/petstore_api/models/order.py
index 8c863cce8fe..8f298aa3d9c 100644
--- a/samples/client/petstore/python-asyncio/petstore_api/models/order.py
+++ b/samples/client/petstore/python-asyncio/petstore_api/models/order.py
@@ -93,7 +93,7 @@ class Order(object):
:param id: The id of this Order. # noqa: E501
- :type: int
+ :type id: int
"""
self._id = id
@@ -114,7 +114,7 @@ class Order(object):
:param pet_id: The pet_id of this Order. # noqa: E501
- :type: int
+ :type pet_id: int
"""
self._pet_id = pet_id
@@ -135,7 +135,7 @@ class Order(object):
:param quantity: The quantity of this Order. # noqa: E501
- :type: int
+ :type quantity: int
"""
self._quantity = quantity
@@ -156,7 +156,7 @@ class Order(object):
:param ship_date: The ship_date of this Order. # noqa: E501
- :type: datetime
+ :type ship_date: datetime
"""
self._ship_date = ship_date
@@ -179,7 +179,7 @@ class Order(object):
Order Status # noqa: E501
:param status: The status of this Order. # noqa: E501
- :type: str
+ :type status: str
"""
allowed_values = ["placed", "approved", "delivered"] # noqa: E501
if self.local_vars_configuration.client_side_validation and status not in allowed_values: # noqa: E501
@@ -206,7 +206,7 @@ class Order(object):
:param complete: The complete of this Order. # noqa: E501
- :type: bool
+ :type complete: bool
"""
self._complete = complete
diff --git a/samples/client/petstore/python-asyncio/petstore_api/models/outer_composite.py b/samples/client/petstore/python-asyncio/petstore_api/models/outer_composite.py
index c11859114a5..85fe36c7ef0 100644
--- a/samples/client/petstore/python-asyncio/petstore_api/models/outer_composite.py
+++ b/samples/client/petstore/python-asyncio/petstore_api/models/outer_composite.py
@@ -78,7 +78,7 @@ class OuterComposite(object):
:param my_number: The my_number of this OuterComposite. # noqa: E501
- :type: float
+ :type my_number: float
"""
self._my_number = my_number
@@ -99,7 +99,7 @@ class OuterComposite(object):
:param my_string: The my_string of this OuterComposite. # noqa: E501
- :type: str
+ :type my_string: str
"""
self._my_string = my_string
@@ -120,7 +120,7 @@ class OuterComposite(object):
:param my_boolean: The my_boolean of this OuterComposite. # noqa: E501
- :type: bool
+ :type my_boolean: bool
"""
self._my_boolean = my_boolean
diff --git a/samples/client/petstore/python-asyncio/petstore_api/models/pet.py b/samples/client/petstore/python-asyncio/petstore_api/models/pet.py
index edbf73f5312..b948a6436db 100644
--- a/samples/client/petstore/python-asyncio/petstore_api/models/pet.py
+++ b/samples/client/petstore/python-asyncio/petstore_api/models/pet.py
@@ -91,7 +91,7 @@ class Pet(object):
:param id: The id of this Pet. # noqa: E501
- :type: int
+ :type id: int
"""
self._id = id
@@ -112,7 +112,7 @@ class Pet(object):
:param category: The category of this Pet. # noqa: E501
- :type: Category
+ :type category: Category
"""
self._category = category
@@ -133,7 +133,7 @@ class Pet(object):
:param name: The name of this Pet. # noqa: E501
- :type: str
+ :type name: str
"""
if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501
raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501
@@ -156,7 +156,7 @@ class Pet(object):
:param photo_urls: The photo_urls of this Pet. # noqa: E501
- :type: list[str]
+ :type photo_urls: list[str]
"""
if self.local_vars_configuration.client_side_validation and photo_urls is None: # noqa: E501
raise ValueError("Invalid value for `photo_urls`, must not be `None`") # noqa: E501
@@ -179,7 +179,7 @@ class Pet(object):
:param tags: The tags of this Pet. # noqa: E501
- :type: list[Tag]
+ :type tags: list[Tag]
"""
self._tags = tags
@@ -202,7 +202,7 @@ class Pet(object):
pet status in the store # noqa: E501
:param status: The status of this Pet. # noqa: E501
- :type: str
+ :type status: str
"""
allowed_values = ["available", "pending", "sold"] # noqa: E501
if self.local_vars_configuration.client_side_validation and status not in allowed_values: # noqa: E501
diff --git a/samples/client/petstore/python-asyncio/petstore_api/models/read_only_first.py b/samples/client/petstore/python-asyncio/petstore_api/models/read_only_first.py
index a84679e98de..3a305087dc2 100644
--- a/samples/client/petstore/python-asyncio/petstore_api/models/read_only_first.py
+++ b/samples/client/petstore/python-asyncio/petstore_api/models/read_only_first.py
@@ -73,7 +73,7 @@ class ReadOnlyFirst(object):
:param bar: The bar of this ReadOnlyFirst. # noqa: E501
- :type: str
+ :type bar: str
"""
self._bar = bar
@@ -94,7 +94,7 @@ class ReadOnlyFirst(object):
:param baz: The baz of this ReadOnlyFirst. # noqa: E501
- :type: str
+ :type baz: str
"""
self._baz = baz
diff --git a/samples/client/petstore/python-asyncio/petstore_api/models/special_model_name.py b/samples/client/petstore/python-asyncio/petstore_api/models/special_model_name.py
index 396e75bcee5..d2535eb65ac 100644
--- a/samples/client/petstore/python-asyncio/petstore_api/models/special_model_name.py
+++ b/samples/client/petstore/python-asyncio/petstore_api/models/special_model_name.py
@@ -68,7 +68,7 @@ class SpecialModelName(object):
:param special_property_name: The special_property_name of this SpecialModelName. # noqa: E501
- :type: int
+ :type special_property_name: int
"""
self._special_property_name = special_property_name
diff --git a/samples/client/petstore/python-asyncio/petstore_api/models/tag.py b/samples/client/petstore/python-asyncio/petstore_api/models/tag.py
index d6137fdd47f..7492d30d9eb 100644
--- a/samples/client/petstore/python-asyncio/petstore_api/models/tag.py
+++ b/samples/client/petstore/python-asyncio/petstore_api/models/tag.py
@@ -73,7 +73,7 @@ class Tag(object):
:param id: The id of this Tag. # noqa: E501
- :type: int
+ :type id: int
"""
self._id = id
@@ -94,7 +94,7 @@ class Tag(object):
:param name: The name of this Tag. # noqa: E501
- :type: str
+ :type name: str
"""
self._name = name
diff --git a/samples/client/petstore/python-asyncio/petstore_api/models/type_holder_default.py b/samples/client/petstore/python-asyncio/petstore_api/models/type_holder_default.py
index 8163ea77aa7..fbef6b4b157 100644
--- a/samples/client/petstore/python-asyncio/petstore_api/models/type_holder_default.py
+++ b/samples/client/petstore/python-asyncio/petstore_api/models/type_holder_default.py
@@ -83,7 +83,7 @@ class TypeHolderDefault(object):
:param string_item: The string_item of this TypeHolderDefault. # noqa: E501
- :type: str
+ :type string_item: str
"""
if self.local_vars_configuration.client_side_validation and string_item is None: # noqa: E501
raise ValueError("Invalid value for `string_item`, must not be `None`") # noqa: E501
@@ -106,7 +106,7 @@ class TypeHolderDefault(object):
:param number_item: The number_item of this TypeHolderDefault. # noqa: E501
- :type: float
+ :type number_item: float
"""
if self.local_vars_configuration.client_side_validation and number_item is None: # noqa: E501
raise ValueError("Invalid value for `number_item`, must not be `None`") # noqa: E501
@@ -129,7 +129,7 @@ class TypeHolderDefault(object):
:param integer_item: The integer_item of this TypeHolderDefault. # noqa: E501
- :type: int
+ :type integer_item: int
"""
if self.local_vars_configuration.client_side_validation and integer_item is None: # noqa: E501
raise ValueError("Invalid value for `integer_item`, must not be `None`") # noqa: E501
@@ -152,7 +152,7 @@ class TypeHolderDefault(object):
:param bool_item: The bool_item of this TypeHolderDefault. # noqa: E501
- :type: bool
+ :type bool_item: bool
"""
if self.local_vars_configuration.client_side_validation and bool_item is None: # noqa: E501
raise ValueError("Invalid value for `bool_item`, must not be `None`") # noqa: E501
@@ -175,7 +175,7 @@ class TypeHolderDefault(object):
:param array_item: The array_item of this TypeHolderDefault. # noqa: E501
- :type: list[int]
+ :type array_item: list[int]
"""
if self.local_vars_configuration.client_side_validation and array_item is None: # noqa: E501
raise ValueError("Invalid value for `array_item`, must not be `None`") # noqa: E501
diff --git a/samples/client/petstore/python-asyncio/petstore_api/models/type_holder_example.py b/samples/client/petstore/python-asyncio/petstore_api/models/type_holder_example.py
index 34481fd21e3..b7320bed0ca 100644
--- a/samples/client/petstore/python-asyncio/petstore_api/models/type_holder_example.py
+++ b/samples/client/petstore/python-asyncio/petstore_api/models/type_holder_example.py
@@ -87,7 +87,7 @@ class TypeHolderExample(object):
:param string_item: The string_item of this TypeHolderExample. # noqa: E501
- :type: str
+ :type string_item: str
"""
if self.local_vars_configuration.client_side_validation and string_item is None: # noqa: E501
raise ValueError("Invalid value for `string_item`, must not be `None`") # noqa: E501
@@ -110,7 +110,7 @@ class TypeHolderExample(object):
:param number_item: The number_item of this TypeHolderExample. # noqa: E501
- :type: float
+ :type number_item: float
"""
if self.local_vars_configuration.client_side_validation and number_item is None: # noqa: E501
raise ValueError("Invalid value for `number_item`, must not be `None`") # noqa: E501
@@ -133,7 +133,7 @@ class TypeHolderExample(object):
:param float_item: The float_item of this TypeHolderExample. # noqa: E501
- :type: float
+ :type float_item: float
"""
if self.local_vars_configuration.client_side_validation and float_item is None: # noqa: E501
raise ValueError("Invalid value for `float_item`, must not be `None`") # noqa: E501
@@ -156,7 +156,7 @@ class TypeHolderExample(object):
:param integer_item: The integer_item of this TypeHolderExample. # noqa: E501
- :type: int
+ :type integer_item: int
"""
if self.local_vars_configuration.client_side_validation and integer_item is None: # noqa: E501
raise ValueError("Invalid value for `integer_item`, must not be `None`") # noqa: E501
@@ -179,7 +179,7 @@ class TypeHolderExample(object):
:param bool_item: The bool_item of this TypeHolderExample. # noqa: E501
- :type: bool
+ :type bool_item: bool
"""
if self.local_vars_configuration.client_side_validation and bool_item is None: # noqa: E501
raise ValueError("Invalid value for `bool_item`, must not be `None`") # noqa: E501
@@ -202,7 +202,7 @@ class TypeHolderExample(object):
:param array_item: The array_item of this TypeHolderExample. # noqa: E501
- :type: list[int]
+ :type array_item: list[int]
"""
if self.local_vars_configuration.client_side_validation and array_item is None: # noqa: E501
raise ValueError("Invalid value for `array_item`, must not be `None`") # noqa: E501
diff --git a/samples/client/petstore/python-asyncio/petstore_api/models/user.py b/samples/client/petstore/python-asyncio/petstore_api/models/user.py
index de88bda4cde..0e25f9f1710 100644
--- a/samples/client/petstore/python-asyncio/petstore_api/models/user.py
+++ b/samples/client/petstore/python-asyncio/petstore_api/models/user.py
@@ -103,7 +103,7 @@ class User(object):
:param id: The id of this User. # noqa: E501
- :type: int
+ :type id: int
"""
self._id = id
@@ -124,7 +124,7 @@ class User(object):
:param username: The username of this User. # noqa: E501
- :type: str
+ :type username: str
"""
self._username = username
@@ -145,7 +145,7 @@ class User(object):
:param first_name: The first_name of this User. # noqa: E501
- :type: str
+ :type first_name: str
"""
self._first_name = first_name
@@ -166,7 +166,7 @@ class User(object):
:param last_name: The last_name of this User. # noqa: E501
- :type: str
+ :type last_name: str
"""
self._last_name = last_name
@@ -187,7 +187,7 @@ class User(object):
:param email: The email of this User. # noqa: E501
- :type: str
+ :type email: str
"""
self._email = email
@@ -208,7 +208,7 @@ class User(object):
:param password: The password of this User. # noqa: E501
- :type: str
+ :type password: str
"""
self._password = password
@@ -229,7 +229,7 @@ class User(object):
:param phone: The phone of this User. # noqa: E501
- :type: str
+ :type phone: str
"""
self._phone = phone
@@ -252,7 +252,7 @@ class User(object):
User Status # noqa: E501
:param user_status: The user_status of this User. # noqa: E501
- :type: int
+ :type user_status: int
"""
self._user_status = user_status
diff --git a/samples/client/petstore/python-asyncio/petstore_api/models/xml_item.py b/samples/client/petstore/python-asyncio/petstore_api/models/xml_item.py
index 52ecc9aa522..afb75967cb0 100644
--- a/samples/client/petstore/python-asyncio/petstore_api/models/xml_item.py
+++ b/samples/client/petstore/python-asyncio/petstore_api/models/xml_item.py
@@ -208,7 +208,7 @@ class XmlItem(object):
:param attribute_string: The attribute_string of this XmlItem. # noqa: E501
- :type: str
+ :type attribute_string: str
"""
self._attribute_string = attribute_string
@@ -229,7 +229,7 @@ class XmlItem(object):
:param attribute_number: The attribute_number of this XmlItem. # noqa: E501
- :type: float
+ :type attribute_number: float
"""
self._attribute_number = attribute_number
@@ -250,7 +250,7 @@ class XmlItem(object):
:param attribute_integer: The attribute_integer of this XmlItem. # noqa: E501
- :type: int
+ :type attribute_integer: int
"""
self._attribute_integer = attribute_integer
@@ -271,7 +271,7 @@ class XmlItem(object):
:param attribute_boolean: The attribute_boolean of this XmlItem. # noqa: E501
- :type: bool
+ :type attribute_boolean: bool
"""
self._attribute_boolean = attribute_boolean
@@ -292,7 +292,7 @@ class XmlItem(object):
:param wrapped_array: The wrapped_array of this XmlItem. # noqa: E501
- :type: list[int]
+ :type wrapped_array: list[int]
"""
self._wrapped_array = wrapped_array
@@ -313,7 +313,7 @@ class XmlItem(object):
:param name_string: The name_string of this XmlItem. # noqa: E501
- :type: str
+ :type name_string: str
"""
self._name_string = name_string
@@ -334,7 +334,7 @@ class XmlItem(object):
:param name_number: The name_number of this XmlItem. # noqa: E501
- :type: float
+ :type name_number: float
"""
self._name_number = name_number
@@ -355,7 +355,7 @@ class XmlItem(object):
:param name_integer: The name_integer of this XmlItem. # noqa: E501
- :type: int
+ :type name_integer: int
"""
self._name_integer = name_integer
@@ -376,7 +376,7 @@ class XmlItem(object):
:param name_boolean: The name_boolean of this XmlItem. # noqa: E501
- :type: bool
+ :type name_boolean: bool
"""
self._name_boolean = name_boolean
@@ -397,7 +397,7 @@ class XmlItem(object):
:param name_array: The name_array of this XmlItem. # noqa: E501
- :type: list[int]
+ :type name_array: list[int]
"""
self._name_array = name_array
@@ -418,7 +418,7 @@ class XmlItem(object):
:param name_wrapped_array: The name_wrapped_array of this XmlItem. # noqa: E501
- :type: list[int]
+ :type name_wrapped_array: list[int]
"""
self._name_wrapped_array = name_wrapped_array
@@ -439,7 +439,7 @@ class XmlItem(object):
:param prefix_string: The prefix_string of this XmlItem. # noqa: E501
- :type: str
+ :type prefix_string: str
"""
self._prefix_string = prefix_string
@@ -460,7 +460,7 @@ class XmlItem(object):
:param prefix_number: The prefix_number of this XmlItem. # noqa: E501
- :type: float
+ :type prefix_number: float
"""
self._prefix_number = prefix_number
@@ -481,7 +481,7 @@ class XmlItem(object):
:param prefix_integer: The prefix_integer of this XmlItem. # noqa: E501
- :type: int
+ :type prefix_integer: int
"""
self._prefix_integer = prefix_integer
@@ -502,7 +502,7 @@ class XmlItem(object):
:param prefix_boolean: The prefix_boolean of this XmlItem. # noqa: E501
- :type: bool
+ :type prefix_boolean: bool
"""
self._prefix_boolean = prefix_boolean
@@ -523,7 +523,7 @@ class XmlItem(object):
:param prefix_array: The prefix_array of this XmlItem. # noqa: E501
- :type: list[int]
+ :type prefix_array: list[int]
"""
self._prefix_array = prefix_array
@@ -544,7 +544,7 @@ class XmlItem(object):
:param prefix_wrapped_array: The prefix_wrapped_array of this XmlItem. # noqa: E501
- :type: list[int]
+ :type prefix_wrapped_array: list[int]
"""
self._prefix_wrapped_array = prefix_wrapped_array
@@ -565,7 +565,7 @@ class XmlItem(object):
:param namespace_string: The namespace_string of this XmlItem. # noqa: E501
- :type: str
+ :type namespace_string: str
"""
self._namespace_string = namespace_string
@@ -586,7 +586,7 @@ class XmlItem(object):
:param namespace_number: The namespace_number of this XmlItem. # noqa: E501
- :type: float
+ :type namespace_number: float
"""
self._namespace_number = namespace_number
@@ -607,7 +607,7 @@ class XmlItem(object):
:param namespace_integer: The namespace_integer of this XmlItem. # noqa: E501
- :type: int
+ :type namespace_integer: int
"""
self._namespace_integer = namespace_integer
@@ -628,7 +628,7 @@ class XmlItem(object):
:param namespace_boolean: The namespace_boolean of this XmlItem. # noqa: E501
- :type: bool
+ :type namespace_boolean: bool
"""
self._namespace_boolean = namespace_boolean
@@ -649,7 +649,7 @@ class XmlItem(object):
:param namespace_array: The namespace_array of this XmlItem. # noqa: E501
- :type: list[int]
+ :type namespace_array: list[int]
"""
self._namespace_array = namespace_array
@@ -670,7 +670,7 @@ class XmlItem(object):
:param namespace_wrapped_array: The namespace_wrapped_array of this XmlItem. # noqa: E501
- :type: list[int]
+ :type namespace_wrapped_array: list[int]
"""
self._namespace_wrapped_array = namespace_wrapped_array
@@ -691,7 +691,7 @@ class XmlItem(object):
:param prefix_ns_string: The prefix_ns_string of this XmlItem. # noqa: E501
- :type: str
+ :type prefix_ns_string: str
"""
self._prefix_ns_string = prefix_ns_string
@@ -712,7 +712,7 @@ class XmlItem(object):
:param prefix_ns_number: The prefix_ns_number of this XmlItem. # noqa: E501
- :type: float
+ :type prefix_ns_number: float
"""
self._prefix_ns_number = prefix_ns_number
@@ -733,7 +733,7 @@ class XmlItem(object):
:param prefix_ns_integer: The prefix_ns_integer of this XmlItem. # noqa: E501
- :type: int
+ :type prefix_ns_integer: int
"""
self._prefix_ns_integer = prefix_ns_integer
@@ -754,7 +754,7 @@ class XmlItem(object):
:param prefix_ns_boolean: The prefix_ns_boolean of this XmlItem. # noqa: E501
- :type: bool
+ :type prefix_ns_boolean: bool
"""
self._prefix_ns_boolean = prefix_ns_boolean
@@ -775,7 +775,7 @@ class XmlItem(object):
:param prefix_ns_array: The prefix_ns_array of this XmlItem. # noqa: E501
- :type: list[int]
+ :type prefix_ns_array: list[int]
"""
self._prefix_ns_array = prefix_ns_array
@@ -796,7 +796,7 @@ class XmlItem(object):
:param prefix_ns_wrapped_array: The prefix_ns_wrapped_array of this XmlItem. # noqa: E501
- :type: list[int]
+ :type prefix_ns_wrapped_array: list[int]
"""
self._prefix_ns_wrapped_array = prefix_ns_wrapped_array
diff --git a/samples/client/petstore/python-experimental/.openapi-generator/FILES b/samples/client/petstore/python-experimental/.openapi-generator/FILES
index d282130ffbc..6e7ed3cb31a 100644
--- a/samples/client/petstore/python-experimental/.openapi-generator/FILES
+++ b/samples/client/petstore/python-experimental/.openapi-generator/FILES
@@ -11,6 +11,7 @@ docs/AdditionalPropertiesNumber.md
docs/AdditionalPropertiesObject.md
docs/AdditionalPropertiesString.md
docs/Animal.md
+docs/AnimalFarm.md
docs/AnotherFakeApi.md
docs/ApiResponse.md
docs/ArrayOfArrayOfNumberOnly.md
@@ -93,6 +94,7 @@ petstore_api/model/additional_properties_number.py
petstore_api/model/additional_properties_object.py
petstore_api/model/additional_properties_string.py
petstore_api/model/animal.py
+petstore_api/model/animal_farm.py
petstore_api/model/api_response.py
petstore_api/model/array_of_array_of_number_only.py
petstore_api/model/array_of_number_only.py
diff --git a/samples/client/petstore/python-experimental/README.md b/samples/client/petstore/python-experimental/README.md
index d6b85d02a55..9826cfaf987 100644
--- a/samples/client/petstore/python-experimental/README.md
+++ b/samples/client/petstore/python-experimental/README.md
@@ -131,6 +131,7 @@ Class | Method | HTTP request | Description
- [additional_properties_object.AdditionalPropertiesObject](docs/AdditionalPropertiesObject.md)
- [additional_properties_string.AdditionalPropertiesString](docs/AdditionalPropertiesString.md)
- [animal.Animal](docs/Animal.md)
+ - [animal_farm.AnimalFarm](docs/AnimalFarm.md)
- [api_response.ApiResponse](docs/ApiResponse.md)
- [array_of_array_of_number_only.ArrayOfArrayOfNumberOnly](docs/ArrayOfArrayOfNumberOnly.md)
- [array_of_number_only.ArrayOfNumberOnly](docs/ArrayOfNumberOnly.md)
diff --git a/samples/client/petstore/python-experimental/docs/AnimalFarm.md b/samples/client/petstore/python-experimental/docs/AnimalFarm.md
new file mode 100644
index 00000000000..c9976c7ddab
--- /dev/null
+++ b/samples/client/petstore/python-experimental/docs/AnimalFarm.md
@@ -0,0 +1,10 @@
+# animal_farm.AnimalFarm
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**value** | [**[animal.Animal]**](Animal.md) | |
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/client/petstore/python-experimental/petstore_api/api/another_fake_api.py b/samples/client/petstore/python-experimental/petstore_api/api/another_fake_api.py
index 3f277311b8f..49f60348997 100644
--- a/samples/client/petstore/python-experimental/petstore_api/api/another_fake_api.py
+++ b/samples/client/petstore/python-experimental/petstore_api/api/another_fake_api.py
@@ -59,6 +59,7 @@ class AnotherFakeApi(object):
To test special tags and operation ID starting with number # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.call_123_test_special_tags(body, async_req=True)
>>> result = thread.get()
diff --git a/samples/client/petstore/python-experimental/petstore_api/api/fake_api.py b/samples/client/petstore/python-experimental/petstore_api/api/fake_api.py
index a05c8e947b3..3f2e1ae4bd9 100644
--- a/samples/client/petstore/python-experimental/petstore_api/api/fake_api.py
+++ b/samples/client/petstore/python-experimental/petstore_api/api/fake_api.py
@@ -65,6 +65,7 @@ class FakeApi(object):
this route creates an XmlItem # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.create_xml_item(xml_item, async_req=True)
>>> result = thread.get()
@@ -184,6 +185,7 @@ class FakeApi(object):
Test serialization of outer boolean types # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.fake_outer_boolean_serialize(async_req=True)
>>> result = thread.get()
@@ -293,6 +295,7 @@ class FakeApi(object):
Test serialization of object with outer number type # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.fake_outer_composite_serialize(async_req=True)
>>> result = thread.get()
@@ -402,6 +405,7 @@ class FakeApi(object):
Test serialization of outer enum # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.fake_outer_enum_serialize(async_req=True)
>>> result = thread.get()
@@ -511,6 +515,7 @@ class FakeApi(object):
Test serialization of outer number types # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.fake_outer_number_serialize(async_req=True)
>>> result = thread.get()
@@ -620,6 +625,7 @@ class FakeApi(object):
Test serialization of outer string types # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.fake_outer_string_serialize(async_req=True)
>>> result = thread.get()
@@ -730,6 +736,7 @@ class FakeApi(object):
For this test, the body for this request much reference a schema named `File`. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.test_body_with_file_schema(body, async_req=True)
>>> result = thread.get()
@@ -845,6 +852,7 @@ class FakeApi(object):
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.test_body_with_query_params(query, body, async_req=True)
>>> result = thread.get()
@@ -969,6 +977,7 @@ class FakeApi(object):
To test \"client\" model # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.test_client_model(body, async_req=True)
>>> result = thread.get()
@@ -1090,6 +1099,7 @@ class FakeApi(object):
This route has required values with enums of 1 # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.test_endpoint_enums_length_one(query_integer=3, query_string='brillig', path_string='hello', path_integer=34, header_number=1.234, async_req=True)
>>> result = thread.get()
@@ -1268,6 +1278,7 @@ class FakeApi(object):
Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.test_endpoint_parameters(number, double, pattern_without_delimiter, byte, async_req=True)
>>> result = thread.get()
@@ -1521,6 +1532,7 @@ class FakeApi(object):
To test enum parameters # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.test_enum_parameters(async_req=True)
>>> result = thread.get()
@@ -1730,6 +1742,7 @@ class FakeApi(object):
Fake endpoint to test group parameters (optional) # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.test_group_parameters(required_string_group, required_boolean_group, required_int64_group, async_req=True)
>>> result = thread.get()
@@ -1879,6 +1892,7 @@ class FakeApi(object):
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.test_inline_additional_properties(param, async_req=True)
>>> result = thread.get()
@@ -1994,6 +2008,7 @@ class FakeApi(object):
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.test_json_form_data(param, param2, async_req=True)
>>> result = thread.get()
diff --git a/samples/client/petstore/python-experimental/petstore_api/api/fake_classname_tags_123_api.py b/samples/client/petstore/python-experimental/petstore_api/api/fake_classname_tags_123_api.py
index be57432ae68..22b66a6a6c0 100644
--- a/samples/client/petstore/python-experimental/petstore_api/api/fake_classname_tags_123_api.py
+++ b/samples/client/petstore/python-experimental/petstore_api/api/fake_classname_tags_123_api.py
@@ -59,6 +59,7 @@ class FakeClassnameTags123Api(object):
To test class name in snake case # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.test_classname(body, async_req=True)
>>> result = thread.get()
diff --git a/samples/client/petstore/python-experimental/petstore_api/api/pet_api.py b/samples/client/petstore/python-experimental/petstore_api/api/pet_api.py
index 6ec1e6d5c5c..d917cb3cd67 100644
--- a/samples/client/petstore/python-experimental/petstore_api/api/pet_api.py
+++ b/samples/client/petstore/python-experimental/petstore_api/api/pet_api.py
@@ -59,6 +59,7 @@ class PetApi(object):
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.add_pet(body, async_req=True)
>>> result = thread.get()
@@ -176,6 +177,7 @@ class PetApi(object):
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.delete_pet(pet_id, async_req=True)
>>> result = thread.get()
@@ -298,6 +300,7 @@ class PetApi(object):
Multiple status values can be provided with comma separated strings # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.find_pets_by_status(status, async_req=True)
>>> result = thread.get()
@@ -425,6 +428,7 @@ class PetApi(object):
Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.find_pets_by_tags(tags, async_req=True)
>>> result = thread.get()
@@ -545,6 +549,7 @@ class PetApi(object):
Returns a single pet # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.get_pet_by_id(pet_id, async_req=True)
>>> result = thread.get()
@@ -663,6 +668,7 @@ class PetApi(object):
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.update_pet(body, async_req=True)
>>> result = thread.get()
@@ -780,6 +786,7 @@ class PetApi(object):
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.update_pet_with_form(pet_id, async_req=True)
>>> result = thread.get()
@@ -909,6 +916,7 @@ class PetApi(object):
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.upload_file(pet_id, async_req=True)
>>> result = thread.get()
@@ -1048,6 +1056,7 @@ class PetApi(object):
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.upload_file_with_required_file(pet_id, required_file, async_req=True)
>>> result = thread.get()
diff --git a/samples/client/petstore/python-experimental/petstore_api/api/store_api.py b/samples/client/petstore/python-experimental/petstore_api/api/store_api.py
index e612a43704f..bd4c0e0a25e 100644
--- a/samples/client/petstore/python-experimental/petstore_api/api/store_api.py
+++ b/samples/client/petstore/python-experimental/petstore_api/api/store_api.py
@@ -59,6 +59,7 @@ class StoreApi(object):
For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.delete_order(order_id, async_req=True)
>>> result = thread.get()
@@ -172,6 +173,7 @@ class StoreApi(object):
Returns a map of status codes to quantities # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.get_inventory(async_req=True)
>>> result = thread.get()
@@ -279,6 +281,7 @@ class StoreApi(object):
For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.get_order_by_id(order_id, async_req=True)
>>> result = thread.get()
@@ -401,6 +404,7 @@ class StoreApi(object):
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.place_order(body, async_req=True)
>>> result = thread.get()
diff --git a/samples/client/petstore/python-experimental/petstore_api/api/user_api.py b/samples/client/petstore/python-experimental/petstore_api/api/user_api.py
index 930ae821f2c..f313a230354 100644
--- a/samples/client/petstore/python-experimental/petstore_api/api/user_api.py
+++ b/samples/client/petstore/python-experimental/petstore_api/api/user_api.py
@@ -59,6 +59,7 @@ class UserApi(object):
This can only be done by the logged in user. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.create_user(body, async_req=True)
>>> result = thread.get()
@@ -171,6 +172,7 @@ class UserApi(object):
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.create_users_with_array_input(body, async_req=True)
>>> result = thread.get()
@@ -283,6 +285,7 @@ class UserApi(object):
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.create_users_with_list_input(body, async_req=True)
>>> result = thread.get()
@@ -396,6 +399,7 @@ class UserApi(object):
This can only be done by the logged in user. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.delete_user(username, async_req=True)
>>> result = thread.get()
@@ -509,6 +513,7 @@ class UserApi(object):
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.get_user_by_name(username, async_req=True)
>>> result = thread.get()
@@ -626,6 +631,7 @@ class UserApi(object):
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.login_user(username, password, async_req=True)
>>> result = thread.get()
@@ -750,6 +756,7 @@ class UserApi(object):
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.logout_user(async_req=True)
>>> result = thread.get()
@@ -854,6 +861,7 @@ class UserApi(object):
This can only be done by the logged in user. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.update_user(username, body, async_req=True)
>>> result = thread.get()
diff --git a/samples/client/petstore/python-experimental/petstore_api/api_client.py b/samples/client/petstore/python-experimental/petstore_api/api_client.py
index 39833326818..58430c7459e 100644
--- a/samples/client/petstore/python-experimental/petstore_api/api_client.py
+++ b/samples/client/petstore/python-experimental/petstore_api/api_client.py
@@ -279,6 +279,7 @@ class ApiClient(object):
({str: (bool, str, int, float, date, datetime, str, none_type)},)
:param _check_type: boolean, whether to check the types of the data
received from the server
+ :type _check_type: bool
:return: deserialized object.
"""
@@ -338,22 +339,28 @@ class ApiClient(object):
(float, none_type)
([int, none_type],)
({str: (bool, str, int, float, date, datetime, str, none_type)},)
- :param files dict: key -> field name, value -> a list of open file
+ :param files: key -> field name, value -> a list of open file
objects for `multipart/form-data`.
+ :type files: dict
:param async_req bool: execute request asynchronously
+ :type async_req: bool, optional
:param _return_http_data_only: response data without head status code
and headers
+ :type _return_http_data_only: bool, optional
:param collection_formats: dict of collection formats for path, query,
header, and post parameters.
+ :type collection_formats: dict, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:param _check_type: boolean describing if the data back from the server
should have its type checked.
+ :type _check_type: bool, optional
:return:
If async_req parameter is True,
the request will be called asynchronously.
@@ -547,9 +554,9 @@ class ApiClient(object):
:param headers: Header parameters dict to be updated.
:param querys: Query parameters tuple list to be updated.
:param auth_settings: Authentication setting identifiers list.
- :resource_path: A string representation of the HTTP request resource path.
- :method: A string representation of the HTTP request method.
- :body: A object representing the body of the HTTP request.
+ :param resource_path: A string representation of the HTTP request resource path.
+ :param method: A string representation of the HTTP request method.
+ :param body: A object representing the body of the HTTP request.
The object type is the return value of sanitize_for_serialization().
"""
if not auth_settings:
diff --git a/samples/client/petstore/python-experimental/petstore_api/model/animal_farm.py b/samples/client/petstore/python-experimental/petstore_api/model/animal_farm.py
new file mode 100644
index 00000000000..3e6d723ff2b
--- /dev/null
+++ b/samples/client/petstore/python-experimental/petstore_api/model/animal_farm.py
@@ -0,0 +1,173 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+from __future__ import absolute_import
+import re # noqa: F401
+import sys # noqa: F401
+
+import six # noqa: F401
+import nulltype # noqa: F401
+
+from petstore_api.model_utils import ( # noqa: F401
+ ApiTypeError,
+ ModelComposed,
+ ModelNormal,
+ ModelSimple,
+ cached_property,
+ change_keys_js_to_python,
+ convert_js_args_to_python_args,
+ date,
+ datetime,
+ file_type,
+ int,
+ none_type,
+ str,
+ validate_get_composed_info,
+)
+try:
+ from petstore_api.model import animal
+except ImportError:
+ animal = sys.modules[
+ 'petstore_api.model.animal']
+
+
+class AnimalFarm(ModelSimple):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+
+ Attributes:
+ allowed_values (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ with a capitalized key describing the allowed value and an allowed
+ value. These dicts store the allowed enum values.
+ validations (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ that stores validations for max_length, min_length, max_items,
+ min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
+ inclusive_minimum, and regex.
+ additional_properties_type (tuple): A tuple of classes accepted
+ as additional properties values.
+ """
+
+ allowed_values = {
+ }
+
+ validations = {
+ }
+
+ additional_properties_type = None
+
+ _nullable = False
+
+ @cached_property
+ def openapi_types():
+ """
+ This must be a class method so a model may have properties that are
+ of type self, this ensures that we don't create a cyclic import
+
+ Returns
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ """
+ return {
+ 'value': ([animal.Animal],), # noqa: E501
+ }
+
+ @cached_property
+ def discriminator():
+ return None
+
+ _composed_schemas = None
+
+ required_properties = set([
+ '_data_store',
+ '_check_type',
+ '_spec_property_naming',
+ '_path_to_item',
+ '_configuration',
+ '_visited_composed_classes',
+ ])
+
+ @convert_js_args_to_python_args
+ def __init__(self, value, *args, **kwargs): # noqa: E501
+ """animal_farm.AnimalFarm - a model defined in OpenAPI
+
+ Args:
+ value ([animal.Animal]):
+
+ Keyword Args:
+ _check_type (bool): if True, values for parameters in openapi_types
+ will be type checked and a TypeError will be
+ raised if the wrong type is input.
+ Defaults to True
+ _path_to_item (tuple/list): This is a list of keys or values to
+ drill down to the model in received_data
+ when deserializing a response
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _configuration (Configuration): the instance to use when
+ deserializing a file_type parameter.
+ If passed, type conversion is attempted
+ If omitted no type conversion is done.
+ _visited_composed_classes (tuple): This stores a tuple of
+ classes that we have traveled through so that
+ if we see that class again we will not use its
+ discriminator again.
+ When traveling through a discriminator, the
+ composed schema that is
+ is traveled through is added to this set.
+ For example if Animal has a discriminator
+ petType and we pass in "Dog", and the class Dog
+ allOf includes Animal, we move through Animal
+ once using the discriminator, and pick Dog.
+ Then in Dog, we will make an instance of the
+ Animal class but this time we won't travel
+ through its discriminator because we passed in
+ _visited_composed_classes = (Animal,)
+ """
+
+ _check_type = kwargs.pop('_check_type', True)
+ _spec_property_naming = kwargs.pop('_spec_property_naming', False)
+ _path_to_item = kwargs.pop('_path_to_item', ())
+ _configuration = kwargs.pop('_configuration', None)
+ _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
+
+ if args:
+ raise ApiTypeError(
+ "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
+ args,
+ self.__class__.__name__,
+ ),
+ path_to_item=_path_to_item,
+ valid_classes=(self.__class__,),
+ )
+
+ self._data_store = {}
+ self._check_type = _check_type
+ self._spec_property_naming = _spec_property_naming
+ self._path_to_item = _path_to_item
+ self._configuration = _configuration
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
+
+ self.value = value
+ for var_name, var_value in six.iteritems(kwargs):
+ if var_name not in self.attribute_map and \
+ self._configuration is not None and \
+ self._configuration.discard_unknown_keys and \
+ self.additional_properties_type is None:
+ # discard variable.
+ continue
+ setattr(self, var_name, var_value)
diff --git a/samples/client/petstore/python-experimental/petstore_api/models/__init__.py b/samples/client/petstore/python-experimental/petstore_api/models/__init__.py
index 51bdb1a85a5..e70777afd69 100644
--- a/samples/client/petstore/python-experimental/petstore_api/models/__init__.py
+++ b/samples/client/petstore/python-experimental/petstore_api/models/__init__.py
@@ -20,6 +20,7 @@ from petstore_api.model.additional_properties_number import AdditionalProperties
from petstore_api.model.additional_properties_object import AdditionalPropertiesObject
from petstore_api.model.additional_properties_string import AdditionalPropertiesString
from petstore_api.model.animal import Animal
+from petstore_api.model.animal_farm import AnimalFarm
from petstore_api.model.api_response import ApiResponse
from petstore_api.model.array_of_array_of_number_only import ArrayOfArrayOfNumberOnly
from petstore_api.model.array_of_number_only import ArrayOfNumberOnly
diff --git a/samples/client/petstore/python-experimental/test/test_animal_farm.py b/samples/client/petstore/python-experimental/test/test_animal_farm.py
new file mode 100644
index 00000000000..7117d42b430
--- /dev/null
+++ b/samples/client/petstore/python-experimental/test/test_animal_farm.py
@@ -0,0 +1,43 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+from __future__ import absolute_import
+import sys
+import unittest
+
+import petstore_api
+try:
+ from petstore_api.model import animal
+except ImportError:
+ animal = sys.modules[
+ 'petstore_api.model.animal']
+from petstore_api.model.animal_farm import AnimalFarm
+
+
+class TestAnimalFarm(unittest.TestCase):
+ """AnimalFarm unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def testAnimalFarm(self):
+ """Test AnimalFarm"""
+ # FIXME: construct object with mandatory attributes with example values
+ # model = AnimalFarm() # noqa: E501
+ pass
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/samples/client/petstore/python-tornado/petstore_api/api/another_fake_api.py b/samples/client/petstore/python-tornado/petstore_api/api/another_fake_api.py
index 77c4c003fe4..4d69b287ca8 100644
--- a/samples/client/petstore/python-tornado/petstore_api/api/another_fake_api.py
+++ b/samples/client/petstore/python-tornado/petstore_api/api/another_fake_api.py
@@ -42,21 +42,26 @@ class AnotherFakeApi(object):
To test special tags and operation ID starting with number # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.call_123_test_special_tags(body, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param Client body: client model (required)
+ :param body: client model (required)
+ :type body: Client
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: Client
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: Client
"""
kwargs['_return_http_data_only'] = True
return self.call_123_test_special_tags_with_http_info(body, **kwargs) # noqa: E501
@@ -67,23 +72,29 @@ class AnotherFakeApi(object):
To test special tags and operation ID starting with number # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.call_123_test_special_tags_with_http_info(body, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param Client body: client model (required)
+ :param body: client model (required)
+ :type body: Client
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _return_http_data_only: response data without head status code
and headers
+ :type _return_http_data_only: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: tuple(Client, status_code(int), headers(HTTPHeaderDict))
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: tuple(Client, status_code(int), headers(HTTPHeaderDict))
"""
local_var_params = locals()
diff --git a/samples/client/petstore/python-tornado/petstore_api/api/fake_api.py b/samples/client/petstore/python-tornado/petstore_api/api/fake_api.py
index 667c50612ce..e1d9ffebebf 100644
--- a/samples/client/petstore/python-tornado/petstore_api/api/fake_api.py
+++ b/samples/client/petstore/python-tornado/petstore_api/api/fake_api.py
@@ -42,21 +42,26 @@ class FakeApi(object):
this route creates an XmlItem # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.create_xml_item(xml_item, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param XmlItem xml_item: XmlItem Body (required)
+ :param xml_item: XmlItem Body (required)
+ :type xml_item: XmlItem
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: None
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: None
"""
kwargs['_return_http_data_only'] = True
return self.create_xml_item_with_http_info(xml_item, **kwargs) # noqa: E501
@@ -67,23 +72,29 @@ class FakeApi(object):
this route creates an XmlItem # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.create_xml_item_with_http_info(xml_item, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param XmlItem xml_item: XmlItem Body (required)
+ :param xml_item: XmlItem Body (required)
+ :type xml_item: XmlItem
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _return_http_data_only: response data without head status code
and headers
+ :type _return_http_data_only: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: None
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: None
"""
local_var_params = locals()
@@ -156,21 +167,26 @@ class FakeApi(object):
Test serialization of outer boolean types # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.fake_outer_boolean_serialize(async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param bool body: Input boolean as post body
+ :param body: Input boolean as post body
+ :type body: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: bool
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: bool
"""
kwargs['_return_http_data_only'] = True
return self.fake_outer_boolean_serialize_with_http_info(**kwargs) # noqa: E501
@@ -181,23 +197,29 @@ class FakeApi(object):
Test serialization of outer boolean types # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.fake_outer_boolean_serialize_with_http_info(async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param bool body: Input boolean as post body
+ :param body: Input boolean as post body
+ :type body: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _return_http_data_only: response data without head status code
and headers
+ :type _return_http_data_only: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: tuple(bool, status_code(int), headers(HTTPHeaderDict))
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: tuple(bool, status_code(int), headers(HTTPHeaderDict))
"""
local_var_params = locals()
@@ -266,21 +288,26 @@ class FakeApi(object):
Test serialization of object with outer number type # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.fake_outer_composite_serialize(async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param OuterComposite body: Input composite as post body
+ :param body: Input composite as post body
+ :type body: OuterComposite
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: OuterComposite
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: OuterComposite
"""
kwargs['_return_http_data_only'] = True
return self.fake_outer_composite_serialize_with_http_info(**kwargs) # noqa: E501
@@ -291,23 +318,29 @@ class FakeApi(object):
Test serialization of object with outer number type # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.fake_outer_composite_serialize_with_http_info(async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param OuterComposite body: Input composite as post body
+ :param body: Input composite as post body
+ :type body: OuterComposite
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _return_http_data_only: response data without head status code
and headers
+ :type _return_http_data_only: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: tuple(OuterComposite, status_code(int), headers(HTTPHeaderDict))
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: tuple(OuterComposite, status_code(int), headers(HTTPHeaderDict))
"""
local_var_params = locals()
@@ -376,21 +409,26 @@ class FakeApi(object):
Test serialization of outer number types # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.fake_outer_number_serialize(async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param float body: Input number as post body
+ :param body: Input number as post body
+ :type body: float
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: float
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: float
"""
kwargs['_return_http_data_only'] = True
return self.fake_outer_number_serialize_with_http_info(**kwargs) # noqa: E501
@@ -401,23 +439,29 @@ class FakeApi(object):
Test serialization of outer number types # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.fake_outer_number_serialize_with_http_info(async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param float body: Input number as post body
+ :param body: Input number as post body
+ :type body: float
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _return_http_data_only: response data without head status code
and headers
+ :type _return_http_data_only: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: tuple(float, status_code(int), headers(HTTPHeaderDict))
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: tuple(float, status_code(int), headers(HTTPHeaderDict))
"""
local_var_params = locals()
@@ -486,21 +530,26 @@ class FakeApi(object):
Test serialization of outer string types # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.fake_outer_string_serialize(async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param str body: Input string as post body
+ :param body: Input string as post body
+ :type body: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: str
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: str
"""
kwargs['_return_http_data_only'] = True
return self.fake_outer_string_serialize_with_http_info(**kwargs) # noqa: E501
@@ -511,23 +560,29 @@ class FakeApi(object):
Test serialization of outer string types # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.fake_outer_string_serialize_with_http_info(async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param str body: Input string as post body
+ :param body: Input string as post body
+ :type body: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _return_http_data_only: response data without head status code
and headers
+ :type _return_http_data_only: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: tuple(str, status_code(int), headers(HTTPHeaderDict))
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: tuple(str, status_code(int), headers(HTTPHeaderDict))
"""
local_var_params = locals()
@@ -596,21 +651,26 @@ class FakeApi(object):
For this test, the body for this request much reference a schema named `File`. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.test_body_with_file_schema(body, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param FileSchemaTestClass body: (required)
+ :param body: (required)
+ :type body: FileSchemaTestClass
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: None
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: None
"""
kwargs['_return_http_data_only'] = True
return self.test_body_with_file_schema_with_http_info(body, **kwargs) # noqa: E501
@@ -621,23 +681,29 @@ class FakeApi(object):
For this test, the body for this request much reference a schema named `File`. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.test_body_with_file_schema_with_http_info(body, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param FileSchemaTestClass body: (required)
+ :param body: (required)
+ :type body: FileSchemaTestClass
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _return_http_data_only: response data without head status code
and headers
+ :type _return_http_data_only: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: None
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: None
"""
local_var_params = locals()
@@ -709,22 +775,28 @@ class FakeApi(object):
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.test_body_with_query_params(query, body, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param str query: (required)
- :param User body: (required)
+ :param query: (required)
+ :type query: str
+ :param body: (required)
+ :type body: User
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: None
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: None
"""
kwargs['_return_http_data_only'] = True
return self.test_body_with_query_params_with_http_info(query, body, **kwargs) # noqa: E501
@@ -734,24 +806,31 @@ class FakeApi(object):
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.test_body_with_query_params_with_http_info(query, body, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param str query: (required)
- :param User body: (required)
+ :param query: (required)
+ :type query: str
+ :param body: (required)
+ :type body: User
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _return_http_data_only: response data without head status code
and headers
+ :type _return_http_data_only: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: None
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: None
"""
local_var_params = locals()
@@ -831,21 +910,26 @@ class FakeApi(object):
To test \"client\" model # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.test_client_model(body, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param Client body: client model (required)
+ :param body: client model (required)
+ :type body: Client
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: Client
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: Client
"""
kwargs['_return_http_data_only'] = True
return self.test_client_model_with_http_info(body, **kwargs) # noqa: E501
@@ -856,23 +940,29 @@ class FakeApi(object):
To test \"client\" model # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.test_client_model_with_http_info(body, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param Client body: client model (required)
+ :param body: client model (required)
+ :type body: Client
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _return_http_data_only: response data without head status code
and headers
+ :type _return_http_data_only: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: tuple(Client, status_code(int), headers(HTTPHeaderDict))
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: tuple(Client, status_code(int), headers(HTTPHeaderDict))
"""
local_var_params = locals()
@@ -949,34 +1039,52 @@ class FakeApi(object):
Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.test_endpoint_parameters(number, double, pattern_without_delimiter, byte, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param float number: None (required)
- :param float double: None (required)
- :param str pattern_without_delimiter: None (required)
- :param str byte: None (required)
- :param int integer: None
- :param int int32: None
- :param int int64: None
- :param float float: None
- :param str string: None
- :param file binary: None
- :param date date: None
- :param datetime date_time: None
- :param str password: None
- :param str param_callback: None
+ :param number: None (required)
+ :type number: float
+ :param double: None (required)
+ :type double: float
+ :param pattern_without_delimiter: None (required)
+ :type pattern_without_delimiter: str
+ :param byte: None (required)
+ :type byte: str
+ :param integer: None
+ :type integer: int
+ :param int32: None
+ :type int32: int
+ :param int64: None
+ :type int64: int
+ :param float: None
+ :type float: float
+ :param string: None
+ :type string: str
+ :param binary: None
+ :type binary: file
+ :param date: None
+ :type date: date
+ :param date_time: None
+ :type date_time: datetime
+ :param password: None
+ :type password: str
+ :param param_callback: None
+ :type param_callback: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: None
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: None
"""
kwargs['_return_http_data_only'] = True
return self.test_endpoint_parameters_with_http_info(number, double, pattern_without_delimiter, byte, **kwargs) # noqa: E501
@@ -987,36 +1095,55 @@ class FakeApi(object):
Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.test_endpoint_parameters_with_http_info(number, double, pattern_without_delimiter, byte, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param float number: None (required)
- :param float double: None (required)
- :param str pattern_without_delimiter: None (required)
- :param str byte: None (required)
- :param int integer: None
- :param int int32: None
- :param int int64: None
- :param float float: None
- :param str string: None
- :param file binary: None
- :param date date: None
- :param datetime date_time: None
- :param str password: None
- :param str param_callback: None
+ :param number: None (required)
+ :type number: float
+ :param double: None (required)
+ :type double: float
+ :param pattern_without_delimiter: None (required)
+ :type pattern_without_delimiter: str
+ :param byte: None (required)
+ :type byte: str
+ :param integer: None
+ :type integer: int
+ :param int32: None
+ :type int32: int
+ :param int64: None
+ :type int64: int
+ :param float: None
+ :type float: float
+ :param string: None
+ :type string: str
+ :param binary: None
+ :type binary: file
+ :param date: None
+ :type date: date
+ :param date_time: None
+ :type date_time: datetime
+ :param password: None
+ :type password: str
+ :param param_callback: None
+ :type param_callback: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _return_http_data_only: response data without head status code
and headers
+ :type _return_http_data_only: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: None
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: None
"""
local_var_params = locals()
@@ -1168,28 +1295,40 @@ class FakeApi(object):
To test enum parameters # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.test_enum_parameters(async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param list[str] enum_header_string_array: Header parameter enum test (string array)
- :param str enum_header_string: Header parameter enum test (string)
- :param list[str] enum_query_string_array: Query parameter enum test (string array)
- :param str enum_query_string: Query parameter enum test (string)
- :param int enum_query_integer: Query parameter enum test (double)
- :param float enum_query_double: Query parameter enum test (double)
- :param list[str] enum_form_string_array: Form parameter enum test (string array)
- :param str enum_form_string: Form parameter enum test (string)
+ :param enum_header_string_array: Header parameter enum test (string array)
+ :type enum_header_string_array: list[str]
+ :param enum_header_string: Header parameter enum test (string)
+ :type enum_header_string: str
+ :param enum_query_string_array: Query parameter enum test (string array)
+ :type enum_query_string_array: list[str]
+ :param enum_query_string: Query parameter enum test (string)
+ :type enum_query_string: str
+ :param enum_query_integer: Query parameter enum test (double)
+ :type enum_query_integer: int
+ :param enum_query_double: Query parameter enum test (double)
+ :type enum_query_double: float
+ :param enum_form_string_array: Form parameter enum test (string array)
+ :type enum_form_string_array: list[str]
+ :param enum_form_string: Form parameter enum test (string)
+ :type enum_form_string: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: None
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: None
"""
kwargs['_return_http_data_only'] = True
return self.test_enum_parameters_with_http_info(**kwargs) # noqa: E501
@@ -1200,30 +1339,43 @@ class FakeApi(object):
To test enum parameters # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.test_enum_parameters_with_http_info(async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param list[str] enum_header_string_array: Header parameter enum test (string array)
- :param str enum_header_string: Header parameter enum test (string)
- :param list[str] enum_query_string_array: Query parameter enum test (string array)
- :param str enum_query_string: Query parameter enum test (string)
- :param int enum_query_integer: Query parameter enum test (double)
- :param float enum_query_double: Query parameter enum test (double)
- :param list[str] enum_form_string_array: Form parameter enum test (string array)
- :param str enum_form_string: Form parameter enum test (string)
+ :param enum_header_string_array: Header parameter enum test (string array)
+ :type enum_header_string_array: list[str]
+ :param enum_header_string: Header parameter enum test (string)
+ :type enum_header_string: str
+ :param enum_query_string_array: Query parameter enum test (string array)
+ :type enum_query_string_array: list[str]
+ :param enum_query_string: Query parameter enum test (string)
+ :type enum_query_string: str
+ :param enum_query_integer: Query parameter enum test (double)
+ :type enum_query_integer: int
+ :param enum_query_double: Query parameter enum test (double)
+ :type enum_query_double: float
+ :param enum_form_string_array: Form parameter enum test (string array)
+ :type enum_form_string_array: list[str]
+ :param enum_form_string: Form parameter enum test (string)
+ :type enum_form_string: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _return_http_data_only: response data without head status code
and headers
+ :type _return_http_data_only: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: None
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: None
"""
local_var_params = locals()
@@ -1316,26 +1468,36 @@ class FakeApi(object):
Fake endpoint to test group parameters (optional) # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.test_group_parameters(required_string_group, required_boolean_group, required_int64_group, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param int required_string_group: Required String in group parameters (required)
- :param bool required_boolean_group: Required Boolean in group parameters (required)
- :param int required_int64_group: Required Integer in group parameters (required)
- :param int string_group: String in group parameters
- :param bool boolean_group: Boolean in group parameters
- :param int int64_group: Integer in group parameters
+ :param required_string_group: Required String in group parameters (required)
+ :type required_string_group: int
+ :param required_boolean_group: Required Boolean in group parameters (required)
+ :type required_boolean_group: bool
+ :param required_int64_group: Required Integer in group parameters (required)
+ :type required_int64_group: int
+ :param string_group: String in group parameters
+ :type string_group: int
+ :param boolean_group: Boolean in group parameters
+ :type boolean_group: bool
+ :param int64_group: Integer in group parameters
+ :type int64_group: int
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: None
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: None
"""
kwargs['_return_http_data_only'] = True
return self.test_group_parameters_with_http_info(required_string_group, required_boolean_group, required_int64_group, **kwargs) # noqa: E501
@@ -1346,28 +1508,39 @@ class FakeApi(object):
Fake endpoint to test group parameters (optional) # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.test_group_parameters_with_http_info(required_string_group, required_boolean_group, required_int64_group, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param int required_string_group: Required String in group parameters (required)
- :param bool required_boolean_group: Required Boolean in group parameters (required)
- :param int required_int64_group: Required Integer in group parameters (required)
- :param int string_group: String in group parameters
- :param bool boolean_group: Boolean in group parameters
- :param int int64_group: Integer in group parameters
+ :param required_string_group: Required String in group parameters (required)
+ :type required_string_group: int
+ :param required_boolean_group: Required Boolean in group parameters (required)
+ :type required_boolean_group: bool
+ :param required_int64_group: Required Integer in group parameters (required)
+ :type required_int64_group: int
+ :param string_group: String in group parameters
+ :type string_group: int
+ :param boolean_group: Boolean in group parameters
+ :type boolean_group: bool
+ :param int64_group: Integer in group parameters
+ :type int64_group: int
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _return_http_data_only: response data without head status code
and headers
+ :type _return_http_data_only: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: None
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: None
"""
local_var_params = locals()
@@ -1458,21 +1631,26 @@ class FakeApi(object):
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.test_inline_additional_properties(param, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param dict(str, str) param: request body (required)
+ :param param: request body (required)
+ :type param: dict(str, str)
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: None
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: None
"""
kwargs['_return_http_data_only'] = True
return self.test_inline_additional_properties_with_http_info(param, **kwargs) # noqa: E501
@@ -1482,23 +1660,29 @@ class FakeApi(object):
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.test_inline_additional_properties_with_http_info(param, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param dict(str, str) param: request body (required)
+ :param param: request body (required)
+ :type param: dict(str, str)
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _return_http_data_only: response data without head status code
and headers
+ :type _return_http_data_only: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: None
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: None
"""
local_var_params = locals()
@@ -1570,22 +1754,28 @@ class FakeApi(object):
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.test_json_form_data(param, param2, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param str param: field1 (required)
- :param str param2: field2 (required)
+ :param param: field1 (required)
+ :type param: str
+ :param param2: field2 (required)
+ :type param2: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: None
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: None
"""
kwargs['_return_http_data_only'] = True
return self.test_json_form_data_with_http_info(param, param2, **kwargs) # noqa: E501
@@ -1595,24 +1785,31 @@ class FakeApi(object):
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.test_json_form_data_with_http_info(param, param2, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param str param: field1 (required)
- :param str param2: field2 (required)
+ :param param: field1 (required)
+ :type param: str
+ :param param2: field2 (required)
+ :type param2: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _return_http_data_only: response data without head status code
and headers
+ :type _return_http_data_only: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: None
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: None
"""
local_var_params = locals()
@@ -1692,25 +1889,34 @@ class FakeApi(object):
To test the collection format in query parameters # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.test_query_parameter_collection_format(pipe, ioutil, http, url, context, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param list[str] pipe: (required)
- :param list[str] ioutil: (required)
- :param list[str] http: (required)
- :param list[str] url: (required)
- :param list[str] context: (required)
+ :param pipe: (required)
+ :type pipe: list[str]
+ :param ioutil: (required)
+ :type ioutil: list[str]
+ :param http: (required)
+ :type http: list[str]
+ :param url: (required)
+ :type url: list[str]
+ :param context: (required)
+ :type context: list[str]
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: None
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: None
"""
kwargs['_return_http_data_only'] = True
return self.test_query_parameter_collection_format_with_http_info(pipe, ioutil, http, url, context, **kwargs) # noqa: E501
@@ -1721,27 +1927,37 @@ class FakeApi(object):
To test the collection format in query parameters # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.test_query_parameter_collection_format_with_http_info(pipe, ioutil, http, url, context, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param list[str] pipe: (required)
- :param list[str] ioutil: (required)
- :param list[str] http: (required)
- :param list[str] url: (required)
- :param list[str] context: (required)
+ :param pipe: (required)
+ :type pipe: list[str]
+ :param ioutil: (required)
+ :type ioutil: list[str]
+ :param http: (required)
+ :type http: list[str]
+ :param url: (required)
+ :type url: list[str]
+ :param context: (required)
+ :type context: list[str]
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _return_http_data_only: response data without head status code
and headers
+ :type _return_http_data_only: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: None
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: None
"""
local_var_params = locals()
diff --git a/samples/client/petstore/python-tornado/petstore_api/api/fake_classname_tags_123_api.py b/samples/client/petstore/python-tornado/petstore_api/api/fake_classname_tags_123_api.py
index 2bb189bd01b..d963591a49a 100644
--- a/samples/client/petstore/python-tornado/petstore_api/api/fake_classname_tags_123_api.py
+++ b/samples/client/petstore/python-tornado/petstore_api/api/fake_classname_tags_123_api.py
@@ -42,21 +42,26 @@ class FakeClassnameTags123Api(object):
To test class name in snake case # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.test_classname(body, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param Client body: client model (required)
+ :param body: client model (required)
+ :type body: Client
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: Client
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: Client
"""
kwargs['_return_http_data_only'] = True
return self.test_classname_with_http_info(body, **kwargs) # noqa: E501
@@ -67,23 +72,29 @@ class FakeClassnameTags123Api(object):
To test class name in snake case # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.test_classname_with_http_info(body, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param Client body: client model (required)
+ :param body: client model (required)
+ :type body: Client
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _return_http_data_only: response data without head status code
and headers
+ :type _return_http_data_only: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: tuple(Client, status_code(int), headers(HTTPHeaderDict))
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: tuple(Client, status_code(int), headers(HTTPHeaderDict))
"""
local_var_params = locals()
diff --git a/samples/client/petstore/python-tornado/petstore_api/api/pet_api.py b/samples/client/petstore/python-tornado/petstore_api/api/pet_api.py
index 5a297a57647..7002fe32740 100644
--- a/samples/client/petstore/python-tornado/petstore_api/api/pet_api.py
+++ b/samples/client/petstore/python-tornado/petstore_api/api/pet_api.py
@@ -41,21 +41,26 @@ class PetApi(object):
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.add_pet(body, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param Pet body: Pet object that needs to be added to the store (required)
+ :param body: Pet object that needs to be added to the store (required)
+ :type body: Pet
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: None
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: None
"""
kwargs['_return_http_data_only'] = True
return self.add_pet_with_http_info(body, **kwargs) # noqa: E501
@@ -65,23 +70,29 @@ class PetApi(object):
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.add_pet_with_http_info(body, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param Pet body: Pet object that needs to be added to the store (required)
+ :param body: Pet object that needs to be added to the store (required)
+ :type body: Pet
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _return_http_data_only: response data without head status code
and headers
+ :type _return_http_data_only: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: None
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: None
"""
local_var_params = locals()
@@ -153,22 +164,28 @@ class PetApi(object):
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.delete_pet(pet_id, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param int pet_id: Pet id to delete (required)
- :param str api_key:
+ :param pet_id: Pet id to delete (required)
+ :type pet_id: int
+ :param api_key:
+ :type api_key: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: None
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: None
"""
kwargs['_return_http_data_only'] = True
return self.delete_pet_with_http_info(pet_id, **kwargs) # noqa: E501
@@ -178,24 +195,31 @@ class PetApi(object):
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.delete_pet_with_http_info(pet_id, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param int pet_id: Pet id to delete (required)
- :param str api_key:
+ :param pet_id: Pet id to delete (required)
+ :type pet_id: int
+ :param api_key:
+ :type api_key: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _return_http_data_only: response data without head status code
and headers
+ :type _return_http_data_only: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: None
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: None
"""
local_var_params = locals()
@@ -267,21 +291,26 @@ class PetApi(object):
Multiple status values can be provided with comma separated strings # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.find_pets_by_status(status, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param list[str] status: Status values that need to be considered for filter (required)
+ :param status: Status values that need to be considered for filter (required)
+ :type status: list[str]
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: list[Pet]
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: list[Pet]
"""
kwargs['_return_http_data_only'] = True
return self.find_pets_by_status_with_http_info(status, **kwargs) # noqa: E501
@@ -292,23 +321,29 @@ class PetApi(object):
Multiple status values can be provided with comma separated strings # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.find_pets_by_status_with_http_info(status, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param list[str] status: Status values that need to be considered for filter (required)
+ :param status: Status values that need to be considered for filter (required)
+ :type status: list[str]
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _return_http_data_only: response data without head status code
and headers
+ :type _return_http_data_only: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: tuple(list[Pet], status_code(int), headers(HTTPHeaderDict))
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: tuple(list[Pet], status_code(int), headers(HTTPHeaderDict))
"""
local_var_params = locals()
@@ -382,21 +417,26 @@ class PetApi(object):
Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.find_pets_by_tags(tags, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param list[str] tags: Tags to filter by (required)
+ :param tags: Tags to filter by (required)
+ :type tags: list[str]
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: list[Pet]
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: list[Pet]
"""
kwargs['_return_http_data_only'] = True
return self.find_pets_by_tags_with_http_info(tags, **kwargs) # noqa: E501
@@ -407,23 +447,29 @@ class PetApi(object):
Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.find_pets_by_tags_with_http_info(tags, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param list[str] tags: Tags to filter by (required)
+ :param tags: Tags to filter by (required)
+ :type tags: list[str]
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _return_http_data_only: response data without head status code
and headers
+ :type _return_http_data_only: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: tuple(list[Pet], status_code(int), headers(HTTPHeaderDict))
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: tuple(list[Pet], status_code(int), headers(HTTPHeaderDict))
"""
local_var_params = locals()
@@ -497,21 +543,26 @@ class PetApi(object):
Returns a single pet # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.get_pet_by_id(pet_id, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param int pet_id: ID of pet to return (required)
+ :param pet_id: ID of pet to return (required)
+ :type pet_id: int
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: Pet
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: Pet
"""
kwargs['_return_http_data_only'] = True
return self.get_pet_by_id_with_http_info(pet_id, **kwargs) # noqa: E501
@@ -522,23 +573,29 @@ class PetApi(object):
Returns a single pet # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.get_pet_by_id_with_http_info(pet_id, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param int pet_id: ID of pet to return (required)
+ :param pet_id: ID of pet to return (required)
+ :type pet_id: int
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _return_http_data_only: response data without head status code
and headers
+ :type _return_http_data_only: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: tuple(Pet, status_code(int), headers(HTTPHeaderDict))
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: tuple(Pet, status_code(int), headers(HTTPHeaderDict))
"""
local_var_params = locals()
@@ -610,21 +667,26 @@ class PetApi(object):
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.update_pet(body, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param Pet body: Pet object that needs to be added to the store (required)
+ :param body: Pet object that needs to be added to the store (required)
+ :type body: Pet
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: None
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: None
"""
kwargs['_return_http_data_only'] = True
return self.update_pet_with_http_info(body, **kwargs) # noqa: E501
@@ -634,23 +696,29 @@ class PetApi(object):
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.update_pet_with_http_info(body, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param Pet body: Pet object that needs to be added to the store (required)
+ :param body: Pet object that needs to be added to the store (required)
+ :type body: Pet
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _return_http_data_only: response data without head status code
and headers
+ :type _return_http_data_only: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: None
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: None
"""
local_var_params = locals()
@@ -722,23 +790,30 @@ class PetApi(object):
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.update_pet_with_form(pet_id, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param int pet_id: ID of pet that needs to be updated (required)
- :param str name: Updated name of the pet
- :param str status: Updated status of the pet
+ :param pet_id: ID of pet that needs to be updated (required)
+ :type pet_id: int
+ :param name: Updated name of the pet
+ :type name: str
+ :param status: Updated status of the pet
+ :type status: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: None
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: None
"""
kwargs['_return_http_data_only'] = True
return self.update_pet_with_form_with_http_info(pet_id, **kwargs) # noqa: E501
@@ -748,25 +823,33 @@ class PetApi(object):
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.update_pet_with_form_with_http_info(pet_id, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param int pet_id: ID of pet that needs to be updated (required)
- :param str name: Updated name of the pet
- :param str status: Updated status of the pet
+ :param pet_id: ID of pet that needs to be updated (required)
+ :type pet_id: int
+ :param name: Updated name of the pet
+ :type name: str
+ :param status: Updated status of the pet
+ :type status: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _return_http_data_only: response data without head status code
and headers
+ :type _return_http_data_only: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: None
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: None
"""
local_var_params = locals()
@@ -844,23 +927,30 @@ class PetApi(object):
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.upload_file(pet_id, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param int pet_id: ID of pet to update (required)
- :param str additional_metadata: Additional data to pass to server
- :param file file: file to upload
+ :param pet_id: ID of pet to update (required)
+ :type pet_id: int
+ :param additional_metadata: Additional data to pass to server
+ :type additional_metadata: str
+ :param file: file to upload
+ :type file: file
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: ApiResponse
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: ApiResponse
"""
kwargs['_return_http_data_only'] = True
return self.upload_file_with_http_info(pet_id, **kwargs) # noqa: E501
@@ -870,25 +960,33 @@ class PetApi(object):
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.upload_file_with_http_info(pet_id, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param int pet_id: ID of pet to update (required)
- :param str additional_metadata: Additional data to pass to server
- :param file file: file to upload
+ :param pet_id: ID of pet to update (required)
+ :type pet_id: int
+ :param additional_metadata: Additional data to pass to server
+ :type additional_metadata: str
+ :param file: file to upload
+ :type file: file
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _return_http_data_only: response data without head status code
and headers
+ :type _return_http_data_only: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: tuple(ApiResponse, status_code(int), headers(HTTPHeaderDict))
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: tuple(ApiResponse, status_code(int), headers(HTTPHeaderDict))
"""
local_var_params = locals()
@@ -970,23 +1068,30 @@ class PetApi(object):
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.upload_file_with_required_file(pet_id, required_file, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param int pet_id: ID of pet to update (required)
- :param file required_file: file to upload (required)
- :param str additional_metadata: Additional data to pass to server
+ :param pet_id: ID of pet to update (required)
+ :type pet_id: int
+ :param required_file: file to upload (required)
+ :type required_file: file
+ :param additional_metadata: Additional data to pass to server
+ :type additional_metadata: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: ApiResponse
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: ApiResponse
"""
kwargs['_return_http_data_only'] = True
return self.upload_file_with_required_file_with_http_info(pet_id, required_file, **kwargs) # noqa: E501
@@ -996,25 +1101,33 @@ class PetApi(object):
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.upload_file_with_required_file_with_http_info(pet_id, required_file, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param int pet_id: ID of pet to update (required)
- :param file required_file: file to upload (required)
- :param str additional_metadata: Additional data to pass to server
+ :param pet_id: ID of pet to update (required)
+ :type pet_id: int
+ :param required_file: file to upload (required)
+ :type required_file: file
+ :param additional_metadata: Additional data to pass to server
+ :type additional_metadata: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _return_http_data_only: response data without head status code
and headers
+ :type _return_http_data_only: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: tuple(ApiResponse, status_code(int), headers(HTTPHeaderDict))
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: tuple(ApiResponse, status_code(int), headers(HTTPHeaderDict))
"""
local_var_params = locals()
diff --git a/samples/client/petstore/python-tornado/petstore_api/api/store_api.py b/samples/client/petstore/python-tornado/petstore_api/api/store_api.py
index f693f755b74..0ede23f05ba 100644
--- a/samples/client/petstore/python-tornado/petstore_api/api/store_api.py
+++ b/samples/client/petstore/python-tornado/petstore_api/api/store_api.py
@@ -42,21 +42,26 @@ class StoreApi(object):
For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.delete_order(order_id, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param str order_id: ID of the order that needs to be deleted (required)
+ :param order_id: ID of the order that needs to be deleted (required)
+ :type order_id: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: None
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: None
"""
kwargs['_return_http_data_only'] = True
return self.delete_order_with_http_info(order_id, **kwargs) # noqa: E501
@@ -67,23 +72,29 @@ class StoreApi(object):
For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.delete_order_with_http_info(order_id, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param str order_id: ID of the order that needs to be deleted (required)
+ :param order_id: ID of the order that needs to be deleted (required)
+ :type order_id: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _return_http_data_only: response data without head status code
and headers
+ :type _return_http_data_only: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: None
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: None
"""
local_var_params = locals()
@@ -152,20 +163,24 @@ class StoreApi(object):
Returns a map of status codes to quantities # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.get_inventory(async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: dict(str, int)
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: dict(str, int)
"""
kwargs['_return_http_data_only'] = True
return self.get_inventory_with_http_info(**kwargs) # noqa: E501
@@ -176,22 +191,27 @@ class StoreApi(object):
Returns a map of status codes to quantities # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.get_inventory_with_http_info(async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _return_http_data_only: response data without head status code
and headers
+ :type _return_http_data_only: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: tuple(dict(str, int), status_code(int), headers(HTTPHeaderDict))
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: tuple(dict(str, int), status_code(int), headers(HTTPHeaderDict))
"""
local_var_params = locals()
@@ -257,21 +277,26 @@ class StoreApi(object):
For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.get_order_by_id(order_id, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param int order_id: ID of pet that needs to be fetched (required)
+ :param order_id: ID of pet that needs to be fetched (required)
+ :type order_id: int
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: Order
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: Order
"""
kwargs['_return_http_data_only'] = True
return self.get_order_by_id_with_http_info(order_id, **kwargs) # noqa: E501
@@ -282,23 +307,29 @@ class StoreApi(object):
For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.get_order_by_id_with_http_info(order_id, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param int order_id: ID of pet that needs to be fetched (required)
+ :param order_id: ID of pet that needs to be fetched (required)
+ :type order_id: int
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _return_http_data_only: response data without head status code
and headers
+ :type _return_http_data_only: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: tuple(Order, status_code(int), headers(HTTPHeaderDict))
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: tuple(Order, status_code(int), headers(HTTPHeaderDict))
"""
local_var_params = locals()
@@ -374,21 +405,26 @@ class StoreApi(object):
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.place_order(body, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param Order body: order placed for purchasing the pet (required)
+ :param body: order placed for purchasing the pet (required)
+ :type body: Order
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: Order
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: Order
"""
kwargs['_return_http_data_only'] = True
return self.place_order_with_http_info(body, **kwargs) # noqa: E501
@@ -398,23 +434,29 @@ class StoreApi(object):
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.place_order_with_http_info(body, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param Order body: order placed for purchasing the pet (required)
+ :param body: order placed for purchasing the pet (required)
+ :type body: Order
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _return_http_data_only: response data without head status code
and headers
+ :type _return_http_data_only: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: tuple(Order, status_code(int), headers(HTTPHeaderDict))
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: tuple(Order, status_code(int), headers(HTTPHeaderDict))
"""
local_var_params = locals()
diff --git a/samples/client/petstore/python-tornado/petstore_api/api/user_api.py b/samples/client/petstore/python-tornado/petstore_api/api/user_api.py
index 9462f00716a..a912483b023 100644
--- a/samples/client/petstore/python-tornado/petstore_api/api/user_api.py
+++ b/samples/client/petstore/python-tornado/petstore_api/api/user_api.py
@@ -42,21 +42,26 @@ class UserApi(object):
This can only be done by the logged in user. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.create_user(body, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param User body: Created user object (required)
+ :param body: Created user object (required)
+ :type body: User
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: None
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: None
"""
kwargs['_return_http_data_only'] = True
return self.create_user_with_http_info(body, **kwargs) # noqa: E501
@@ -67,23 +72,29 @@ class UserApi(object):
This can only be done by the logged in user. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.create_user_with_http_info(body, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param User body: Created user object (required)
+ :param body: Created user object (required)
+ :type body: User
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _return_http_data_only: response data without head status code
and headers
+ :type _return_http_data_only: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: None
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: None
"""
local_var_params = locals()
@@ -151,21 +162,26 @@ class UserApi(object):
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.create_users_with_array_input(body, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param list[User] body: List of user object (required)
+ :param body: List of user object (required)
+ :type body: list[User]
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: None
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: None
"""
kwargs['_return_http_data_only'] = True
return self.create_users_with_array_input_with_http_info(body, **kwargs) # noqa: E501
@@ -175,23 +191,29 @@ class UserApi(object):
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.create_users_with_array_input_with_http_info(body, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param list[User] body: List of user object (required)
+ :param body: List of user object (required)
+ :type body: list[User]
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _return_http_data_only: response data without head status code
and headers
+ :type _return_http_data_only: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: None
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: None
"""
local_var_params = locals()
@@ -259,21 +281,26 @@ class UserApi(object):
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.create_users_with_list_input(body, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param list[User] body: List of user object (required)
+ :param body: List of user object (required)
+ :type body: list[User]
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: None
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: None
"""
kwargs['_return_http_data_only'] = True
return self.create_users_with_list_input_with_http_info(body, **kwargs) # noqa: E501
@@ -283,23 +310,29 @@ class UserApi(object):
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.create_users_with_list_input_with_http_info(body, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param list[User] body: List of user object (required)
+ :param body: List of user object (required)
+ :type body: list[User]
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _return_http_data_only: response data without head status code
and headers
+ :type _return_http_data_only: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: None
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: None
"""
local_var_params = locals()
@@ -368,21 +401,26 @@ class UserApi(object):
This can only be done by the logged in user. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.delete_user(username, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param str username: The name that needs to be deleted (required)
+ :param username: The name that needs to be deleted (required)
+ :type username: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: None
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: None
"""
kwargs['_return_http_data_only'] = True
return self.delete_user_with_http_info(username, **kwargs) # noqa: E501
@@ -393,23 +431,29 @@ class UserApi(object):
This can only be done by the logged in user. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.delete_user_with_http_info(username, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param str username: The name that needs to be deleted (required)
+ :param username: The name that needs to be deleted (required)
+ :type username: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _return_http_data_only: response data without head status code
and headers
+ :type _return_http_data_only: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: None
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: None
"""
local_var_params = locals()
@@ -477,21 +521,26 @@ class UserApi(object):
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.get_user_by_name(username, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param str username: The name that needs to be fetched. Use user1 for testing. (required)
+ :param username: The name that needs to be fetched. Use user1 for testing. (required)
+ :type username: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: User
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: User
"""
kwargs['_return_http_data_only'] = True
return self.get_user_by_name_with_http_info(username, **kwargs) # noqa: E501
@@ -501,23 +550,29 @@ class UserApi(object):
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.get_user_by_name_with_http_info(username, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param str username: The name that needs to be fetched. Use user1 for testing. (required)
+ :param username: The name that needs to be fetched. Use user1 for testing. (required)
+ :type username: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _return_http_data_only: response data without head status code
and headers
+ :type _return_http_data_only: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: tuple(User, status_code(int), headers(HTTPHeaderDict))
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: tuple(User, status_code(int), headers(HTTPHeaderDict))
"""
local_var_params = locals()
@@ -589,22 +644,28 @@ class UserApi(object):
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.login_user(username, password, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param str username: The user name for login (required)
- :param str password: The password for login in clear text (required)
+ :param username: The user name for login (required)
+ :type username: str
+ :param password: The password for login in clear text (required)
+ :type password: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: str
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: str
"""
kwargs['_return_http_data_only'] = True
return self.login_user_with_http_info(username, password, **kwargs) # noqa: E501
@@ -614,24 +675,31 @@ class UserApi(object):
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.login_user_with_http_info(username, password, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param str username: The user name for login (required)
- :param str password: The password for login in clear text (required)
+ :param username: The user name for login (required)
+ :type username: str
+ :param password: The password for login in clear text (required)
+ :type password: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _return_http_data_only: response data without head status code
and headers
+ :type _return_http_data_only: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: tuple(str, status_code(int), headers(HTTPHeaderDict))
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: tuple(str, status_code(int), headers(HTTPHeaderDict))
"""
local_var_params = locals()
@@ -710,20 +778,24 @@ class UserApi(object):
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.logout_user(async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: None
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: None
"""
kwargs['_return_http_data_only'] = True
return self.logout_user_with_http_info(**kwargs) # noqa: E501
@@ -733,22 +805,27 @@ class UserApi(object):
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.logout_user_with_http_info(async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _return_http_data_only: response data without head status code
and headers
+ :type _return_http_data_only: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: None
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: None
"""
local_var_params = locals()
@@ -810,22 +887,28 @@ class UserApi(object):
This can only be done by the logged in user. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.update_user(username, body, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param str username: name that need to be deleted (required)
- :param User body: Updated user object (required)
+ :param username: name that need to be deleted (required)
+ :type username: str
+ :param body: Updated user object (required)
+ :type body: User
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: None
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: None
"""
kwargs['_return_http_data_only'] = True
return self.update_user_with_http_info(username, body, **kwargs) # noqa: E501
@@ -836,24 +919,31 @@ class UserApi(object):
This can only be done by the logged in user. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.update_user_with_http_info(username, body, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param str username: name that need to be deleted (required)
- :param User body: Updated user object (required)
+ :param username: name that need to be deleted (required)
+ :type username: str
+ :param body: Updated user object (required)
+ :type body: User
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _return_http_data_only: response data without head status code
and headers
+ :type _return_http_data_only: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: None
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: None
"""
local_var_params = locals()
diff --git a/samples/client/petstore/python-tornado/petstore_api/models/additional_properties_any_type.py b/samples/client/petstore/python-tornado/petstore_api/models/additional_properties_any_type.py
index 2954285de87..690c71705b9 100644
--- a/samples/client/petstore/python-tornado/petstore_api/models/additional_properties_any_type.py
+++ b/samples/client/petstore/python-tornado/petstore_api/models/additional_properties_any_type.py
@@ -68,7 +68,7 @@ class AdditionalPropertiesAnyType(object):
:param name: The name of this AdditionalPropertiesAnyType. # noqa: E501
- :type: str
+ :type name: str
"""
self._name = name
diff --git a/samples/client/petstore/python-tornado/petstore_api/models/additional_properties_array.py b/samples/client/petstore/python-tornado/petstore_api/models/additional_properties_array.py
index c6369c22a12..f0902bdaffa 100644
--- a/samples/client/petstore/python-tornado/petstore_api/models/additional_properties_array.py
+++ b/samples/client/petstore/python-tornado/petstore_api/models/additional_properties_array.py
@@ -68,7 +68,7 @@ class AdditionalPropertiesArray(object):
:param name: The name of this AdditionalPropertiesArray. # noqa: E501
- :type: str
+ :type name: str
"""
self._name = name
diff --git a/samples/client/petstore/python-tornado/petstore_api/models/additional_properties_boolean.py b/samples/client/petstore/python-tornado/petstore_api/models/additional_properties_boolean.py
index 599b7c8b884..f79d2609a1d 100644
--- a/samples/client/petstore/python-tornado/petstore_api/models/additional_properties_boolean.py
+++ b/samples/client/petstore/python-tornado/petstore_api/models/additional_properties_boolean.py
@@ -68,7 +68,7 @@ class AdditionalPropertiesBoolean(object):
:param name: The name of this AdditionalPropertiesBoolean. # noqa: E501
- :type: str
+ :type name: str
"""
self._name = name
diff --git a/samples/client/petstore/python-tornado/petstore_api/models/additional_properties_class.py b/samples/client/petstore/python-tornado/petstore_api/models/additional_properties_class.py
index be4455c683b..ca334635175 100644
--- a/samples/client/petstore/python-tornado/petstore_api/models/additional_properties_class.py
+++ b/samples/client/petstore/python-tornado/petstore_api/models/additional_properties_class.py
@@ -118,7 +118,7 @@ class AdditionalPropertiesClass(object):
:param map_string: The map_string of this AdditionalPropertiesClass. # noqa: E501
- :type: dict(str, str)
+ :type map_string: dict(str, str)
"""
self._map_string = map_string
@@ -139,7 +139,7 @@ class AdditionalPropertiesClass(object):
:param map_number: The map_number of this AdditionalPropertiesClass. # noqa: E501
- :type: dict(str, float)
+ :type map_number: dict(str, float)
"""
self._map_number = map_number
@@ -160,7 +160,7 @@ class AdditionalPropertiesClass(object):
:param map_integer: The map_integer of this AdditionalPropertiesClass. # noqa: E501
- :type: dict(str, int)
+ :type map_integer: dict(str, int)
"""
self._map_integer = map_integer
@@ -181,7 +181,7 @@ class AdditionalPropertiesClass(object):
:param map_boolean: The map_boolean of this AdditionalPropertiesClass. # noqa: E501
- :type: dict(str, bool)
+ :type map_boolean: dict(str, bool)
"""
self._map_boolean = map_boolean
@@ -202,7 +202,7 @@ class AdditionalPropertiesClass(object):
:param map_array_integer: The map_array_integer of this AdditionalPropertiesClass. # noqa: E501
- :type: dict(str, list[int])
+ :type map_array_integer: dict(str, list[int])
"""
self._map_array_integer = map_array_integer
@@ -223,7 +223,7 @@ class AdditionalPropertiesClass(object):
:param map_array_anytype: The map_array_anytype of this AdditionalPropertiesClass. # noqa: E501
- :type: dict(str, list[object])
+ :type map_array_anytype: dict(str, list[object])
"""
self._map_array_anytype = map_array_anytype
@@ -244,7 +244,7 @@ class AdditionalPropertiesClass(object):
:param map_map_string: The map_map_string of this AdditionalPropertiesClass. # noqa: E501
- :type: dict(str, dict(str, str))
+ :type map_map_string: dict(str, dict(str, str))
"""
self._map_map_string = map_map_string
@@ -265,7 +265,7 @@ class AdditionalPropertiesClass(object):
:param map_map_anytype: The map_map_anytype of this AdditionalPropertiesClass. # noqa: E501
- :type: dict(str, dict(str, object))
+ :type map_map_anytype: dict(str, dict(str, object))
"""
self._map_map_anytype = map_map_anytype
@@ -286,7 +286,7 @@ class AdditionalPropertiesClass(object):
:param anytype_1: The anytype_1 of this AdditionalPropertiesClass. # noqa: E501
- :type: object
+ :type anytype_1: object
"""
self._anytype_1 = anytype_1
@@ -307,7 +307,7 @@ class AdditionalPropertiesClass(object):
:param anytype_2: The anytype_2 of this AdditionalPropertiesClass. # noqa: E501
- :type: object
+ :type anytype_2: object
"""
self._anytype_2 = anytype_2
@@ -328,7 +328,7 @@ class AdditionalPropertiesClass(object):
:param anytype_3: The anytype_3 of this AdditionalPropertiesClass. # noqa: E501
- :type: object
+ :type anytype_3: object
"""
self._anytype_3 = anytype_3
diff --git a/samples/client/petstore/python-tornado/petstore_api/models/additional_properties_integer.py b/samples/client/petstore/python-tornado/petstore_api/models/additional_properties_integer.py
index ddbb85fdf33..5c3ebf230d1 100644
--- a/samples/client/petstore/python-tornado/petstore_api/models/additional_properties_integer.py
+++ b/samples/client/petstore/python-tornado/petstore_api/models/additional_properties_integer.py
@@ -68,7 +68,7 @@ class AdditionalPropertiesInteger(object):
:param name: The name of this AdditionalPropertiesInteger. # noqa: E501
- :type: str
+ :type name: str
"""
self._name = name
diff --git a/samples/client/petstore/python-tornado/petstore_api/models/additional_properties_number.py b/samples/client/petstore/python-tornado/petstore_api/models/additional_properties_number.py
index 8bbeda83ecc..0e7f34ed329 100644
--- a/samples/client/petstore/python-tornado/petstore_api/models/additional_properties_number.py
+++ b/samples/client/petstore/python-tornado/petstore_api/models/additional_properties_number.py
@@ -68,7 +68,7 @@ class AdditionalPropertiesNumber(object):
:param name: The name of this AdditionalPropertiesNumber. # noqa: E501
- :type: str
+ :type name: str
"""
self._name = name
diff --git a/samples/client/petstore/python-tornado/petstore_api/models/additional_properties_object.py b/samples/client/petstore/python-tornado/petstore_api/models/additional_properties_object.py
index af87595b3e4..5a8ea94b929 100644
--- a/samples/client/petstore/python-tornado/petstore_api/models/additional_properties_object.py
+++ b/samples/client/petstore/python-tornado/petstore_api/models/additional_properties_object.py
@@ -68,7 +68,7 @@ class AdditionalPropertiesObject(object):
:param name: The name of this AdditionalPropertiesObject. # noqa: E501
- :type: str
+ :type name: str
"""
self._name = name
diff --git a/samples/client/petstore/python-tornado/petstore_api/models/additional_properties_string.py b/samples/client/petstore/python-tornado/petstore_api/models/additional_properties_string.py
index 6ab2c91feda..8436a1e345b 100644
--- a/samples/client/petstore/python-tornado/petstore_api/models/additional_properties_string.py
+++ b/samples/client/petstore/python-tornado/petstore_api/models/additional_properties_string.py
@@ -68,7 +68,7 @@ class AdditionalPropertiesString(object):
:param name: The name of this AdditionalPropertiesString. # noqa: E501
- :type: str
+ :type name: str
"""
self._name = name
diff --git a/samples/client/petstore/python-tornado/petstore_api/models/animal.py b/samples/client/petstore/python-tornado/petstore_api/models/animal.py
index b338e0eb18e..eef35ab093a 100644
--- a/samples/client/petstore/python-tornado/petstore_api/models/animal.py
+++ b/samples/client/petstore/python-tornado/petstore_api/models/animal.py
@@ -78,7 +78,7 @@ class Animal(object):
:param class_name: The class_name of this Animal. # noqa: E501
- :type: str
+ :type class_name: str
"""
if self.local_vars_configuration.client_side_validation and class_name is None: # noqa: E501
raise ValueError("Invalid value for `class_name`, must not be `None`") # noqa: E501
@@ -101,7 +101,7 @@ class Animal(object):
:param color: The color of this Animal. # noqa: E501
- :type: str
+ :type color: str
"""
self._color = color
diff --git a/samples/client/petstore/python-tornado/petstore_api/models/api_response.py b/samples/client/petstore/python-tornado/petstore_api/models/api_response.py
index 24e80d02aea..8cb64673c35 100644
--- a/samples/client/petstore/python-tornado/petstore_api/models/api_response.py
+++ b/samples/client/petstore/python-tornado/petstore_api/models/api_response.py
@@ -78,7 +78,7 @@ class ApiResponse(object):
:param code: The code of this ApiResponse. # noqa: E501
- :type: int
+ :type code: int
"""
self._code = code
@@ -99,7 +99,7 @@ class ApiResponse(object):
:param type: The type of this ApiResponse. # noqa: E501
- :type: str
+ :type type: str
"""
self._type = type
@@ -120,7 +120,7 @@ class ApiResponse(object):
:param message: The message of this ApiResponse. # noqa: E501
- :type: str
+ :type message: str
"""
self._message = message
diff --git a/samples/client/petstore/python-tornado/petstore_api/models/array_of_array_of_number_only.py b/samples/client/petstore/python-tornado/petstore_api/models/array_of_array_of_number_only.py
index 1f654452077..41a689c534a 100644
--- a/samples/client/petstore/python-tornado/petstore_api/models/array_of_array_of_number_only.py
+++ b/samples/client/petstore/python-tornado/petstore_api/models/array_of_array_of_number_only.py
@@ -68,7 +68,7 @@ class ArrayOfArrayOfNumberOnly(object):
:param array_array_number: The array_array_number of this ArrayOfArrayOfNumberOnly. # noqa: E501
- :type: list[list[float]]
+ :type array_array_number: list[list[float]]
"""
self._array_array_number = array_array_number
diff --git a/samples/client/petstore/python-tornado/petstore_api/models/array_of_number_only.py b/samples/client/petstore/python-tornado/petstore_api/models/array_of_number_only.py
index 27ba1f58e31..ddb7f7c7abe 100644
--- a/samples/client/petstore/python-tornado/petstore_api/models/array_of_number_only.py
+++ b/samples/client/petstore/python-tornado/petstore_api/models/array_of_number_only.py
@@ -68,7 +68,7 @@ class ArrayOfNumberOnly(object):
:param array_number: The array_number of this ArrayOfNumberOnly. # noqa: E501
- :type: list[float]
+ :type array_number: list[float]
"""
self._array_number = array_number
diff --git a/samples/client/petstore/python-tornado/petstore_api/models/array_test.py b/samples/client/petstore/python-tornado/petstore_api/models/array_test.py
index f34a372f6f3..e8e5c378f98 100644
--- a/samples/client/petstore/python-tornado/petstore_api/models/array_test.py
+++ b/samples/client/petstore/python-tornado/petstore_api/models/array_test.py
@@ -78,7 +78,7 @@ class ArrayTest(object):
:param array_of_string: The array_of_string of this ArrayTest. # noqa: E501
- :type: list[str]
+ :type array_of_string: list[str]
"""
self._array_of_string = array_of_string
@@ -99,7 +99,7 @@ class ArrayTest(object):
:param array_array_of_integer: The array_array_of_integer of this ArrayTest. # noqa: E501
- :type: list[list[int]]
+ :type array_array_of_integer: list[list[int]]
"""
self._array_array_of_integer = array_array_of_integer
@@ -120,7 +120,7 @@ class ArrayTest(object):
:param array_array_of_model: The array_array_of_model of this ArrayTest. # noqa: E501
- :type: list[list[ReadOnlyFirst]]
+ :type array_array_of_model: list[list[ReadOnlyFirst]]
"""
self._array_array_of_model = array_array_of_model
diff --git a/samples/client/petstore/python-tornado/petstore_api/models/big_cat.py b/samples/client/petstore/python-tornado/petstore_api/models/big_cat.py
index fe52c3650ac..946981f5b7f 100644
--- a/samples/client/petstore/python-tornado/petstore_api/models/big_cat.py
+++ b/samples/client/petstore/python-tornado/petstore_api/models/big_cat.py
@@ -68,7 +68,7 @@ class BigCat(object):
:param kind: The kind of this BigCat. # noqa: E501
- :type: str
+ :type kind: str
"""
allowed_values = ["lions", "tigers", "leopards", "jaguars"] # noqa: E501
if self.local_vars_configuration.client_side_validation and kind not in allowed_values: # noqa: E501
diff --git a/samples/client/petstore/python-tornado/petstore_api/models/big_cat_all_of.py b/samples/client/petstore/python-tornado/petstore_api/models/big_cat_all_of.py
index b75500db987..41c205d2576 100644
--- a/samples/client/petstore/python-tornado/petstore_api/models/big_cat_all_of.py
+++ b/samples/client/petstore/python-tornado/petstore_api/models/big_cat_all_of.py
@@ -68,7 +68,7 @@ class BigCatAllOf(object):
:param kind: The kind of this BigCatAllOf. # noqa: E501
- :type: str
+ :type kind: str
"""
allowed_values = ["lions", "tigers", "leopards", "jaguars"] # noqa: E501
if self.local_vars_configuration.client_side_validation and kind not in allowed_values: # noqa: E501
diff --git a/samples/client/petstore/python-tornado/petstore_api/models/capitalization.py b/samples/client/petstore/python-tornado/petstore_api/models/capitalization.py
index cef34c5f6dc..967d324a0ab 100644
--- a/samples/client/petstore/python-tornado/petstore_api/models/capitalization.py
+++ b/samples/client/petstore/python-tornado/petstore_api/models/capitalization.py
@@ -93,7 +93,7 @@ class Capitalization(object):
:param small_camel: The small_camel of this Capitalization. # noqa: E501
- :type: str
+ :type small_camel: str
"""
self._small_camel = small_camel
@@ -114,7 +114,7 @@ class Capitalization(object):
:param capital_camel: The capital_camel of this Capitalization. # noqa: E501
- :type: str
+ :type capital_camel: str
"""
self._capital_camel = capital_camel
@@ -135,7 +135,7 @@ class Capitalization(object):
:param small_snake: The small_snake of this Capitalization. # noqa: E501
- :type: str
+ :type small_snake: str
"""
self._small_snake = small_snake
@@ -156,7 +156,7 @@ class Capitalization(object):
:param capital_snake: The capital_snake of this Capitalization. # noqa: E501
- :type: str
+ :type capital_snake: str
"""
self._capital_snake = capital_snake
@@ -177,7 +177,7 @@ class Capitalization(object):
:param sca_eth_flow_points: The sca_eth_flow_points of this Capitalization. # noqa: E501
- :type: str
+ :type sca_eth_flow_points: str
"""
self._sca_eth_flow_points = sca_eth_flow_points
@@ -200,7 +200,7 @@ class Capitalization(object):
Name of the pet # noqa: E501
:param att_name: The att_name of this Capitalization. # noqa: E501
- :type: str
+ :type att_name: str
"""
self._att_name = att_name
diff --git a/samples/client/petstore/python-tornado/petstore_api/models/cat.py b/samples/client/petstore/python-tornado/petstore_api/models/cat.py
index e39c1c82508..b3b0d868c7f 100644
--- a/samples/client/petstore/python-tornado/petstore_api/models/cat.py
+++ b/samples/client/petstore/python-tornado/petstore_api/models/cat.py
@@ -68,7 +68,7 @@ class Cat(object):
:param declawed: The declawed of this Cat. # noqa: E501
- :type: bool
+ :type declawed: bool
"""
self._declawed = declawed
diff --git a/samples/client/petstore/python-tornado/petstore_api/models/cat_all_of.py b/samples/client/petstore/python-tornado/petstore_api/models/cat_all_of.py
index 7e90fab9348..f573a04636c 100644
--- a/samples/client/petstore/python-tornado/petstore_api/models/cat_all_of.py
+++ b/samples/client/petstore/python-tornado/petstore_api/models/cat_all_of.py
@@ -68,7 +68,7 @@ class CatAllOf(object):
:param declawed: The declawed of this CatAllOf. # noqa: E501
- :type: bool
+ :type declawed: bool
"""
self._declawed = declawed
diff --git a/samples/client/petstore/python-tornado/petstore_api/models/category.py b/samples/client/petstore/python-tornado/petstore_api/models/category.py
index b47c148953e..11a7bf85f3a 100644
--- a/samples/client/petstore/python-tornado/petstore_api/models/category.py
+++ b/samples/client/petstore/python-tornado/petstore_api/models/category.py
@@ -72,7 +72,7 @@ class Category(object):
:param id: The id of this Category. # noqa: E501
- :type: int
+ :type id: int
"""
self._id = id
@@ -93,7 +93,7 @@ class Category(object):
:param name: The name of this Category. # noqa: E501
- :type: str
+ :type name: str
"""
if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501
raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501
diff --git a/samples/client/petstore/python-tornado/petstore_api/models/class_model.py b/samples/client/petstore/python-tornado/petstore_api/models/class_model.py
index ef6060ffa70..aac505ea064 100644
--- a/samples/client/petstore/python-tornado/petstore_api/models/class_model.py
+++ b/samples/client/petstore/python-tornado/petstore_api/models/class_model.py
@@ -68,7 +68,7 @@ class ClassModel(object):
:param _class: The _class of this ClassModel. # noqa: E501
- :type: str
+ :type _class: str
"""
self.__class = _class
diff --git a/samples/client/petstore/python-tornado/petstore_api/models/client.py b/samples/client/petstore/python-tornado/petstore_api/models/client.py
index ee5dbf1c43a..2006350b210 100644
--- a/samples/client/petstore/python-tornado/petstore_api/models/client.py
+++ b/samples/client/petstore/python-tornado/petstore_api/models/client.py
@@ -68,7 +68,7 @@ class Client(object):
:param client: The client of this Client. # noqa: E501
- :type: str
+ :type client: str
"""
self._client = client
diff --git a/samples/client/petstore/python-tornado/petstore_api/models/dog.py b/samples/client/petstore/python-tornado/petstore_api/models/dog.py
index eacb63eedb0..fb9024d0bb7 100644
--- a/samples/client/petstore/python-tornado/petstore_api/models/dog.py
+++ b/samples/client/petstore/python-tornado/petstore_api/models/dog.py
@@ -68,7 +68,7 @@ class Dog(object):
:param breed: The breed of this Dog. # noqa: E501
- :type: str
+ :type breed: str
"""
self._breed = breed
diff --git a/samples/client/petstore/python-tornado/petstore_api/models/dog_all_of.py b/samples/client/petstore/python-tornado/petstore_api/models/dog_all_of.py
index 48e04855708..5943ba900dd 100644
--- a/samples/client/petstore/python-tornado/petstore_api/models/dog_all_of.py
+++ b/samples/client/petstore/python-tornado/petstore_api/models/dog_all_of.py
@@ -68,7 +68,7 @@ class DogAllOf(object):
:param breed: The breed of this DogAllOf. # noqa: E501
- :type: str
+ :type breed: str
"""
self._breed = breed
diff --git a/samples/client/petstore/python-tornado/petstore_api/models/enum_arrays.py b/samples/client/petstore/python-tornado/petstore_api/models/enum_arrays.py
index 819ff322157..ae2ea1d4251 100644
--- a/samples/client/petstore/python-tornado/petstore_api/models/enum_arrays.py
+++ b/samples/client/petstore/python-tornado/petstore_api/models/enum_arrays.py
@@ -73,7 +73,7 @@ class EnumArrays(object):
:param just_symbol: The just_symbol of this EnumArrays. # noqa: E501
- :type: str
+ :type just_symbol: str
"""
allowed_values = [">=", "$"] # noqa: E501
if self.local_vars_configuration.client_side_validation and just_symbol not in allowed_values: # noqa: E501
@@ -100,7 +100,7 @@ class EnumArrays(object):
:param array_enum: The array_enum of this EnumArrays. # noqa: E501
- :type: list[str]
+ :type array_enum: list[str]
"""
allowed_values = ["fish", "crab"] # noqa: E501
if (self.local_vars_configuration.client_side_validation and
diff --git a/samples/client/petstore/python-tornado/petstore_api/models/enum_test.py b/samples/client/petstore/python-tornado/petstore_api/models/enum_test.py
index 464281b3ec0..e9872c4d005 100644
--- a/samples/client/petstore/python-tornado/petstore_api/models/enum_test.py
+++ b/samples/client/petstore/python-tornado/petstore_api/models/enum_test.py
@@ -87,7 +87,7 @@ class EnumTest(object):
:param enum_string: The enum_string of this EnumTest. # noqa: E501
- :type: str
+ :type enum_string: str
"""
allowed_values = ["UPPER", "lower", ""] # noqa: E501
if self.local_vars_configuration.client_side_validation and enum_string not in allowed_values: # noqa: E501
@@ -114,7 +114,7 @@ class EnumTest(object):
:param enum_string_required: The enum_string_required of this EnumTest. # noqa: E501
- :type: str
+ :type enum_string_required: str
"""
if self.local_vars_configuration.client_side_validation and enum_string_required is None: # noqa: E501
raise ValueError("Invalid value for `enum_string_required`, must not be `None`") # noqa: E501
@@ -143,7 +143,7 @@ class EnumTest(object):
:param enum_integer: The enum_integer of this EnumTest. # noqa: E501
- :type: int
+ :type enum_integer: int
"""
allowed_values = [1, -1] # noqa: E501
if self.local_vars_configuration.client_side_validation and enum_integer not in allowed_values: # noqa: E501
@@ -170,7 +170,7 @@ class EnumTest(object):
:param enum_number: The enum_number of this EnumTest. # noqa: E501
- :type: float
+ :type enum_number: float
"""
allowed_values = [1.1, -1.2] # noqa: E501
if self.local_vars_configuration.client_side_validation and enum_number not in allowed_values: # noqa: E501
@@ -197,7 +197,7 @@ class EnumTest(object):
:param outer_enum: The outer_enum of this EnumTest. # noqa: E501
- :type: OuterEnum
+ :type outer_enum: OuterEnum
"""
self._outer_enum = outer_enum
diff --git a/samples/client/petstore/python-tornado/petstore_api/models/file.py b/samples/client/petstore/python-tornado/petstore_api/models/file.py
index 282df2957e6..4fb5c31762e 100644
--- a/samples/client/petstore/python-tornado/petstore_api/models/file.py
+++ b/samples/client/petstore/python-tornado/petstore_api/models/file.py
@@ -70,7 +70,7 @@ class File(object):
Test capitalization # noqa: E501
:param source_uri: The source_uri of this File. # noqa: E501
- :type: str
+ :type source_uri: str
"""
self._source_uri = source_uri
diff --git a/samples/client/petstore/python-tornado/petstore_api/models/file_schema_test_class.py b/samples/client/petstore/python-tornado/petstore_api/models/file_schema_test_class.py
index de7f865b47e..2f2d44a7b33 100644
--- a/samples/client/petstore/python-tornado/petstore_api/models/file_schema_test_class.py
+++ b/samples/client/petstore/python-tornado/petstore_api/models/file_schema_test_class.py
@@ -73,7 +73,7 @@ class FileSchemaTestClass(object):
:param file: The file of this FileSchemaTestClass. # noqa: E501
- :type: File
+ :type file: File
"""
self._file = file
@@ -94,7 +94,7 @@ class FileSchemaTestClass(object):
:param files: The files of this FileSchemaTestClass. # noqa: E501
- :type: list[File]
+ :type files: list[File]
"""
self._files = files
diff --git a/samples/client/petstore/python-tornado/petstore_api/models/format_test.py b/samples/client/petstore/python-tornado/petstore_api/models/format_test.py
index 6396c442f62..c96f8132fa6 100644
--- a/samples/client/petstore/python-tornado/petstore_api/models/format_test.py
+++ b/samples/client/petstore/python-tornado/petstore_api/models/format_test.py
@@ -129,7 +129,7 @@ class FormatTest(object):
:param integer: The integer of this FormatTest. # noqa: E501
- :type: int
+ :type integer: int
"""
if (self.local_vars_configuration.client_side_validation and
integer is not None and integer > 100): # noqa: E501
@@ -156,7 +156,7 @@ class FormatTest(object):
:param int32: The int32 of this FormatTest. # noqa: E501
- :type: int
+ :type int32: int
"""
if (self.local_vars_configuration.client_side_validation and
int32 is not None and int32 > 200): # noqa: E501
@@ -183,7 +183,7 @@ class FormatTest(object):
:param int64: The int64 of this FormatTest. # noqa: E501
- :type: int
+ :type int64: int
"""
self._int64 = int64
@@ -204,7 +204,7 @@ class FormatTest(object):
:param number: The number of this FormatTest. # noqa: E501
- :type: float
+ :type number: float
"""
if self.local_vars_configuration.client_side_validation and number is None: # noqa: E501
raise ValueError("Invalid value for `number`, must not be `None`") # noqa: E501
@@ -233,7 +233,7 @@ class FormatTest(object):
:param float: The float of this FormatTest. # noqa: E501
- :type: float
+ :type float: float
"""
if (self.local_vars_configuration.client_side_validation and
float is not None and float > 987.6): # noqa: E501
@@ -260,7 +260,7 @@ class FormatTest(object):
:param double: The double of this FormatTest. # noqa: E501
- :type: float
+ :type double: float
"""
if (self.local_vars_configuration.client_side_validation and
double is not None and double > 123.4): # noqa: E501
@@ -287,7 +287,7 @@ class FormatTest(object):
:param string: The string of this FormatTest. # noqa: E501
- :type: str
+ :type string: str
"""
if (self.local_vars_configuration.client_side_validation and
string is not None and not re.search(r'[a-z]', string, flags=re.IGNORECASE)): # noqa: E501
@@ -311,7 +311,7 @@ class FormatTest(object):
:param byte: The byte of this FormatTest. # noqa: E501
- :type: str
+ :type byte: str
"""
if self.local_vars_configuration.client_side_validation and byte is None: # noqa: E501
raise ValueError("Invalid value for `byte`, must not be `None`") # noqa: E501
@@ -337,7 +337,7 @@ class FormatTest(object):
:param binary: The binary of this FormatTest. # noqa: E501
- :type: file
+ :type binary: file
"""
self._binary = binary
@@ -358,7 +358,7 @@ class FormatTest(object):
:param date: The date of this FormatTest. # noqa: E501
- :type: date
+ :type date: date
"""
if self.local_vars_configuration.client_side_validation and date is None: # noqa: E501
raise ValueError("Invalid value for `date`, must not be `None`") # noqa: E501
@@ -381,7 +381,7 @@ class FormatTest(object):
:param date_time: The date_time of this FormatTest. # noqa: E501
- :type: datetime
+ :type date_time: datetime
"""
self._date_time = date_time
@@ -402,7 +402,7 @@ class FormatTest(object):
:param uuid: The uuid of this FormatTest. # noqa: E501
- :type: str
+ :type uuid: str
"""
self._uuid = uuid
@@ -423,7 +423,7 @@ class FormatTest(object):
:param password: The password of this FormatTest. # noqa: E501
- :type: str
+ :type password: str
"""
if self.local_vars_configuration.client_side_validation and password is None: # noqa: E501
raise ValueError("Invalid value for `password`, must not be `None`") # noqa: E501
@@ -452,7 +452,7 @@ class FormatTest(object):
:param big_decimal: The big_decimal of this FormatTest. # noqa: E501
- :type: BigDecimal
+ :type big_decimal: BigDecimal
"""
self._big_decimal = big_decimal
diff --git a/samples/client/petstore/python-tornado/petstore_api/models/has_only_read_only.py b/samples/client/petstore/python-tornado/petstore_api/models/has_only_read_only.py
index 5fc2f8a9ebd..fa496519ecb 100644
--- a/samples/client/petstore/python-tornado/petstore_api/models/has_only_read_only.py
+++ b/samples/client/petstore/python-tornado/petstore_api/models/has_only_read_only.py
@@ -73,7 +73,7 @@ class HasOnlyReadOnly(object):
:param bar: The bar of this HasOnlyReadOnly. # noqa: E501
- :type: str
+ :type bar: str
"""
self._bar = bar
@@ -94,7 +94,7 @@ class HasOnlyReadOnly(object):
:param foo: The foo of this HasOnlyReadOnly. # noqa: E501
- :type: str
+ :type foo: str
"""
self._foo = foo
diff --git a/samples/client/petstore/python-tornado/petstore_api/models/list.py b/samples/client/petstore/python-tornado/petstore_api/models/list.py
index d58d13e90fb..e21a220f71c 100644
--- a/samples/client/petstore/python-tornado/petstore_api/models/list.py
+++ b/samples/client/petstore/python-tornado/petstore_api/models/list.py
@@ -68,7 +68,7 @@ class List(object):
:param _123_list: The _123_list of this List. # noqa: E501
- :type: str
+ :type _123_list: str
"""
self.__123_list = _123_list
diff --git a/samples/client/petstore/python-tornado/petstore_api/models/map_test.py b/samples/client/petstore/python-tornado/petstore_api/models/map_test.py
index f0cfba5073b..8afc875ce51 100644
--- a/samples/client/petstore/python-tornado/petstore_api/models/map_test.py
+++ b/samples/client/petstore/python-tornado/petstore_api/models/map_test.py
@@ -83,7 +83,7 @@ class MapTest(object):
:param map_map_of_string: The map_map_of_string of this MapTest. # noqa: E501
- :type: dict(str, dict(str, str))
+ :type map_map_of_string: dict(str, dict(str, str))
"""
self._map_map_of_string = map_map_of_string
@@ -104,7 +104,7 @@ class MapTest(object):
:param map_of_enum_string: The map_of_enum_string of this MapTest. # noqa: E501
- :type: dict(str, str)
+ :type map_of_enum_string: dict(str, str)
"""
allowed_values = ["UPPER", "lower"] # noqa: E501
if (self.local_vars_configuration.client_side_validation and
@@ -133,7 +133,7 @@ class MapTest(object):
:param direct_map: The direct_map of this MapTest. # noqa: E501
- :type: dict(str, bool)
+ :type direct_map: dict(str, bool)
"""
self._direct_map = direct_map
@@ -154,7 +154,7 @@ class MapTest(object):
:param indirect_map: The indirect_map of this MapTest. # noqa: E501
- :type: dict(str, bool)
+ :type indirect_map: dict(str, bool)
"""
self._indirect_map = indirect_map
diff --git a/samples/client/petstore/python-tornado/petstore_api/models/mixed_properties_and_additional_properties_class.py b/samples/client/petstore/python-tornado/petstore_api/models/mixed_properties_and_additional_properties_class.py
index 5da34f8830e..8aecbf0f558 100644
--- a/samples/client/petstore/python-tornado/petstore_api/models/mixed_properties_and_additional_properties_class.py
+++ b/samples/client/petstore/python-tornado/petstore_api/models/mixed_properties_and_additional_properties_class.py
@@ -78,7 +78,7 @@ class MixedPropertiesAndAdditionalPropertiesClass(object):
:param uuid: The uuid of this MixedPropertiesAndAdditionalPropertiesClass. # noqa: E501
- :type: str
+ :type uuid: str
"""
self._uuid = uuid
@@ -99,7 +99,7 @@ class MixedPropertiesAndAdditionalPropertiesClass(object):
:param date_time: The date_time of this MixedPropertiesAndAdditionalPropertiesClass. # noqa: E501
- :type: datetime
+ :type date_time: datetime
"""
self._date_time = date_time
@@ -120,7 +120,7 @@ class MixedPropertiesAndAdditionalPropertiesClass(object):
:param map: The map of this MixedPropertiesAndAdditionalPropertiesClass. # noqa: E501
- :type: dict(str, Animal)
+ :type map: dict(str, Animal)
"""
self._map = map
diff --git a/samples/client/petstore/python-tornado/petstore_api/models/model200_response.py b/samples/client/petstore/python-tornado/petstore_api/models/model200_response.py
index 841ce1f18f3..3f4c4e2bd2a 100644
--- a/samples/client/petstore/python-tornado/petstore_api/models/model200_response.py
+++ b/samples/client/petstore/python-tornado/petstore_api/models/model200_response.py
@@ -73,7 +73,7 @@ class Model200Response(object):
:param name: The name of this Model200Response. # noqa: E501
- :type: int
+ :type name: int
"""
self._name = name
@@ -94,7 +94,7 @@ class Model200Response(object):
:param _class: The _class of this Model200Response. # noqa: E501
- :type: str
+ :type _class: str
"""
self.__class = _class
diff --git a/samples/client/petstore/python-tornado/petstore_api/models/model_return.py b/samples/client/petstore/python-tornado/petstore_api/models/model_return.py
index fdd8d72314a..1009c50ef08 100644
--- a/samples/client/petstore/python-tornado/petstore_api/models/model_return.py
+++ b/samples/client/petstore/python-tornado/petstore_api/models/model_return.py
@@ -68,7 +68,7 @@ class ModelReturn(object):
:param _return: The _return of this ModelReturn. # noqa: E501
- :type: int
+ :type _return: int
"""
self.__return = _return
diff --git a/samples/client/petstore/python-tornado/petstore_api/models/name.py b/samples/client/petstore/python-tornado/petstore_api/models/name.py
index bb2c1fbd73c..6ee8261e782 100644
--- a/samples/client/petstore/python-tornado/petstore_api/models/name.py
+++ b/samples/client/petstore/python-tornado/petstore_api/models/name.py
@@ -82,7 +82,7 @@ class Name(object):
:param name: The name of this Name. # noqa: E501
- :type: int
+ :type name: int
"""
if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501
raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501
@@ -105,7 +105,7 @@ class Name(object):
:param snake_case: The snake_case of this Name. # noqa: E501
- :type: int
+ :type snake_case: int
"""
self._snake_case = snake_case
@@ -126,7 +126,7 @@ class Name(object):
:param _property: The _property of this Name. # noqa: E501
- :type: str
+ :type _property: str
"""
self.__property = _property
@@ -147,7 +147,7 @@ class Name(object):
:param _123_number: The _123_number of this Name. # noqa: E501
- :type: int
+ :type _123_number: int
"""
self.__123_number = _123_number
diff --git a/samples/client/petstore/python-tornado/petstore_api/models/number_only.py b/samples/client/petstore/python-tornado/petstore_api/models/number_only.py
index 99b2424852f..90f09d8b7d5 100644
--- a/samples/client/petstore/python-tornado/petstore_api/models/number_only.py
+++ b/samples/client/petstore/python-tornado/petstore_api/models/number_only.py
@@ -68,7 +68,7 @@ class NumberOnly(object):
:param just_number: The just_number of this NumberOnly. # noqa: E501
- :type: float
+ :type just_number: float
"""
self._just_number = just_number
diff --git a/samples/client/petstore/python-tornado/petstore_api/models/order.py b/samples/client/petstore/python-tornado/petstore_api/models/order.py
index 8c863cce8fe..8f298aa3d9c 100644
--- a/samples/client/petstore/python-tornado/petstore_api/models/order.py
+++ b/samples/client/petstore/python-tornado/petstore_api/models/order.py
@@ -93,7 +93,7 @@ class Order(object):
:param id: The id of this Order. # noqa: E501
- :type: int
+ :type id: int
"""
self._id = id
@@ -114,7 +114,7 @@ class Order(object):
:param pet_id: The pet_id of this Order. # noqa: E501
- :type: int
+ :type pet_id: int
"""
self._pet_id = pet_id
@@ -135,7 +135,7 @@ class Order(object):
:param quantity: The quantity of this Order. # noqa: E501
- :type: int
+ :type quantity: int
"""
self._quantity = quantity
@@ -156,7 +156,7 @@ class Order(object):
:param ship_date: The ship_date of this Order. # noqa: E501
- :type: datetime
+ :type ship_date: datetime
"""
self._ship_date = ship_date
@@ -179,7 +179,7 @@ class Order(object):
Order Status # noqa: E501
:param status: The status of this Order. # noqa: E501
- :type: str
+ :type status: str
"""
allowed_values = ["placed", "approved", "delivered"] # noqa: E501
if self.local_vars_configuration.client_side_validation and status not in allowed_values: # noqa: E501
@@ -206,7 +206,7 @@ class Order(object):
:param complete: The complete of this Order. # noqa: E501
- :type: bool
+ :type complete: bool
"""
self._complete = complete
diff --git a/samples/client/petstore/python-tornado/petstore_api/models/outer_composite.py b/samples/client/petstore/python-tornado/petstore_api/models/outer_composite.py
index c11859114a5..85fe36c7ef0 100644
--- a/samples/client/petstore/python-tornado/petstore_api/models/outer_composite.py
+++ b/samples/client/petstore/python-tornado/petstore_api/models/outer_composite.py
@@ -78,7 +78,7 @@ class OuterComposite(object):
:param my_number: The my_number of this OuterComposite. # noqa: E501
- :type: float
+ :type my_number: float
"""
self._my_number = my_number
@@ -99,7 +99,7 @@ class OuterComposite(object):
:param my_string: The my_string of this OuterComposite. # noqa: E501
- :type: str
+ :type my_string: str
"""
self._my_string = my_string
@@ -120,7 +120,7 @@ class OuterComposite(object):
:param my_boolean: The my_boolean of this OuterComposite. # noqa: E501
- :type: bool
+ :type my_boolean: bool
"""
self._my_boolean = my_boolean
diff --git a/samples/client/petstore/python-tornado/petstore_api/models/pet.py b/samples/client/petstore/python-tornado/petstore_api/models/pet.py
index edbf73f5312..b948a6436db 100644
--- a/samples/client/petstore/python-tornado/petstore_api/models/pet.py
+++ b/samples/client/petstore/python-tornado/petstore_api/models/pet.py
@@ -91,7 +91,7 @@ class Pet(object):
:param id: The id of this Pet. # noqa: E501
- :type: int
+ :type id: int
"""
self._id = id
@@ -112,7 +112,7 @@ class Pet(object):
:param category: The category of this Pet. # noqa: E501
- :type: Category
+ :type category: Category
"""
self._category = category
@@ -133,7 +133,7 @@ class Pet(object):
:param name: The name of this Pet. # noqa: E501
- :type: str
+ :type name: str
"""
if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501
raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501
@@ -156,7 +156,7 @@ class Pet(object):
:param photo_urls: The photo_urls of this Pet. # noqa: E501
- :type: list[str]
+ :type photo_urls: list[str]
"""
if self.local_vars_configuration.client_side_validation and photo_urls is None: # noqa: E501
raise ValueError("Invalid value for `photo_urls`, must not be `None`") # noqa: E501
@@ -179,7 +179,7 @@ class Pet(object):
:param tags: The tags of this Pet. # noqa: E501
- :type: list[Tag]
+ :type tags: list[Tag]
"""
self._tags = tags
@@ -202,7 +202,7 @@ class Pet(object):
pet status in the store # noqa: E501
:param status: The status of this Pet. # noqa: E501
- :type: str
+ :type status: str
"""
allowed_values = ["available", "pending", "sold"] # noqa: E501
if self.local_vars_configuration.client_side_validation and status not in allowed_values: # noqa: E501
diff --git a/samples/client/petstore/python-tornado/petstore_api/models/read_only_first.py b/samples/client/petstore/python-tornado/petstore_api/models/read_only_first.py
index a84679e98de..3a305087dc2 100644
--- a/samples/client/petstore/python-tornado/petstore_api/models/read_only_first.py
+++ b/samples/client/petstore/python-tornado/petstore_api/models/read_only_first.py
@@ -73,7 +73,7 @@ class ReadOnlyFirst(object):
:param bar: The bar of this ReadOnlyFirst. # noqa: E501
- :type: str
+ :type bar: str
"""
self._bar = bar
@@ -94,7 +94,7 @@ class ReadOnlyFirst(object):
:param baz: The baz of this ReadOnlyFirst. # noqa: E501
- :type: str
+ :type baz: str
"""
self._baz = baz
diff --git a/samples/client/petstore/python-tornado/petstore_api/models/special_model_name.py b/samples/client/petstore/python-tornado/petstore_api/models/special_model_name.py
index 396e75bcee5..d2535eb65ac 100644
--- a/samples/client/petstore/python-tornado/petstore_api/models/special_model_name.py
+++ b/samples/client/petstore/python-tornado/petstore_api/models/special_model_name.py
@@ -68,7 +68,7 @@ class SpecialModelName(object):
:param special_property_name: The special_property_name of this SpecialModelName. # noqa: E501
- :type: int
+ :type special_property_name: int
"""
self._special_property_name = special_property_name
diff --git a/samples/client/petstore/python-tornado/petstore_api/models/tag.py b/samples/client/petstore/python-tornado/petstore_api/models/tag.py
index d6137fdd47f..7492d30d9eb 100644
--- a/samples/client/petstore/python-tornado/petstore_api/models/tag.py
+++ b/samples/client/petstore/python-tornado/petstore_api/models/tag.py
@@ -73,7 +73,7 @@ class Tag(object):
:param id: The id of this Tag. # noqa: E501
- :type: int
+ :type id: int
"""
self._id = id
@@ -94,7 +94,7 @@ class Tag(object):
:param name: The name of this Tag. # noqa: E501
- :type: str
+ :type name: str
"""
self._name = name
diff --git a/samples/client/petstore/python-tornado/petstore_api/models/type_holder_default.py b/samples/client/petstore/python-tornado/petstore_api/models/type_holder_default.py
index 8163ea77aa7..fbef6b4b157 100644
--- a/samples/client/petstore/python-tornado/petstore_api/models/type_holder_default.py
+++ b/samples/client/petstore/python-tornado/petstore_api/models/type_holder_default.py
@@ -83,7 +83,7 @@ class TypeHolderDefault(object):
:param string_item: The string_item of this TypeHolderDefault. # noqa: E501
- :type: str
+ :type string_item: str
"""
if self.local_vars_configuration.client_side_validation and string_item is None: # noqa: E501
raise ValueError("Invalid value for `string_item`, must not be `None`") # noqa: E501
@@ -106,7 +106,7 @@ class TypeHolderDefault(object):
:param number_item: The number_item of this TypeHolderDefault. # noqa: E501
- :type: float
+ :type number_item: float
"""
if self.local_vars_configuration.client_side_validation and number_item is None: # noqa: E501
raise ValueError("Invalid value for `number_item`, must not be `None`") # noqa: E501
@@ -129,7 +129,7 @@ class TypeHolderDefault(object):
:param integer_item: The integer_item of this TypeHolderDefault. # noqa: E501
- :type: int
+ :type integer_item: int
"""
if self.local_vars_configuration.client_side_validation and integer_item is None: # noqa: E501
raise ValueError("Invalid value for `integer_item`, must not be `None`") # noqa: E501
@@ -152,7 +152,7 @@ class TypeHolderDefault(object):
:param bool_item: The bool_item of this TypeHolderDefault. # noqa: E501
- :type: bool
+ :type bool_item: bool
"""
if self.local_vars_configuration.client_side_validation and bool_item is None: # noqa: E501
raise ValueError("Invalid value for `bool_item`, must not be `None`") # noqa: E501
@@ -175,7 +175,7 @@ class TypeHolderDefault(object):
:param array_item: The array_item of this TypeHolderDefault. # noqa: E501
- :type: list[int]
+ :type array_item: list[int]
"""
if self.local_vars_configuration.client_side_validation and array_item is None: # noqa: E501
raise ValueError("Invalid value for `array_item`, must not be `None`") # noqa: E501
diff --git a/samples/client/petstore/python-tornado/petstore_api/models/type_holder_example.py b/samples/client/petstore/python-tornado/petstore_api/models/type_holder_example.py
index 34481fd21e3..b7320bed0ca 100644
--- a/samples/client/petstore/python-tornado/petstore_api/models/type_holder_example.py
+++ b/samples/client/petstore/python-tornado/petstore_api/models/type_holder_example.py
@@ -87,7 +87,7 @@ class TypeHolderExample(object):
:param string_item: The string_item of this TypeHolderExample. # noqa: E501
- :type: str
+ :type string_item: str
"""
if self.local_vars_configuration.client_side_validation and string_item is None: # noqa: E501
raise ValueError("Invalid value for `string_item`, must not be `None`") # noqa: E501
@@ -110,7 +110,7 @@ class TypeHolderExample(object):
:param number_item: The number_item of this TypeHolderExample. # noqa: E501
- :type: float
+ :type number_item: float
"""
if self.local_vars_configuration.client_side_validation and number_item is None: # noqa: E501
raise ValueError("Invalid value for `number_item`, must not be `None`") # noqa: E501
@@ -133,7 +133,7 @@ class TypeHolderExample(object):
:param float_item: The float_item of this TypeHolderExample. # noqa: E501
- :type: float
+ :type float_item: float
"""
if self.local_vars_configuration.client_side_validation and float_item is None: # noqa: E501
raise ValueError("Invalid value for `float_item`, must not be `None`") # noqa: E501
@@ -156,7 +156,7 @@ class TypeHolderExample(object):
:param integer_item: The integer_item of this TypeHolderExample. # noqa: E501
- :type: int
+ :type integer_item: int
"""
if self.local_vars_configuration.client_side_validation and integer_item is None: # noqa: E501
raise ValueError("Invalid value for `integer_item`, must not be `None`") # noqa: E501
@@ -179,7 +179,7 @@ class TypeHolderExample(object):
:param bool_item: The bool_item of this TypeHolderExample. # noqa: E501
- :type: bool
+ :type bool_item: bool
"""
if self.local_vars_configuration.client_side_validation and bool_item is None: # noqa: E501
raise ValueError("Invalid value for `bool_item`, must not be `None`") # noqa: E501
@@ -202,7 +202,7 @@ class TypeHolderExample(object):
:param array_item: The array_item of this TypeHolderExample. # noqa: E501
- :type: list[int]
+ :type array_item: list[int]
"""
if self.local_vars_configuration.client_side_validation and array_item is None: # noqa: E501
raise ValueError("Invalid value for `array_item`, must not be `None`") # noqa: E501
diff --git a/samples/client/petstore/python-tornado/petstore_api/models/user.py b/samples/client/petstore/python-tornado/petstore_api/models/user.py
index de88bda4cde..0e25f9f1710 100644
--- a/samples/client/petstore/python-tornado/petstore_api/models/user.py
+++ b/samples/client/petstore/python-tornado/petstore_api/models/user.py
@@ -103,7 +103,7 @@ class User(object):
:param id: The id of this User. # noqa: E501
- :type: int
+ :type id: int
"""
self._id = id
@@ -124,7 +124,7 @@ class User(object):
:param username: The username of this User. # noqa: E501
- :type: str
+ :type username: str
"""
self._username = username
@@ -145,7 +145,7 @@ class User(object):
:param first_name: The first_name of this User. # noqa: E501
- :type: str
+ :type first_name: str
"""
self._first_name = first_name
@@ -166,7 +166,7 @@ class User(object):
:param last_name: The last_name of this User. # noqa: E501
- :type: str
+ :type last_name: str
"""
self._last_name = last_name
@@ -187,7 +187,7 @@ class User(object):
:param email: The email of this User. # noqa: E501
- :type: str
+ :type email: str
"""
self._email = email
@@ -208,7 +208,7 @@ class User(object):
:param password: The password of this User. # noqa: E501
- :type: str
+ :type password: str
"""
self._password = password
@@ -229,7 +229,7 @@ class User(object):
:param phone: The phone of this User. # noqa: E501
- :type: str
+ :type phone: str
"""
self._phone = phone
@@ -252,7 +252,7 @@ class User(object):
User Status # noqa: E501
:param user_status: The user_status of this User. # noqa: E501
- :type: int
+ :type user_status: int
"""
self._user_status = user_status
diff --git a/samples/client/petstore/python-tornado/petstore_api/models/xml_item.py b/samples/client/petstore/python-tornado/petstore_api/models/xml_item.py
index 52ecc9aa522..afb75967cb0 100644
--- a/samples/client/petstore/python-tornado/petstore_api/models/xml_item.py
+++ b/samples/client/petstore/python-tornado/petstore_api/models/xml_item.py
@@ -208,7 +208,7 @@ class XmlItem(object):
:param attribute_string: The attribute_string of this XmlItem. # noqa: E501
- :type: str
+ :type attribute_string: str
"""
self._attribute_string = attribute_string
@@ -229,7 +229,7 @@ class XmlItem(object):
:param attribute_number: The attribute_number of this XmlItem. # noqa: E501
- :type: float
+ :type attribute_number: float
"""
self._attribute_number = attribute_number
@@ -250,7 +250,7 @@ class XmlItem(object):
:param attribute_integer: The attribute_integer of this XmlItem. # noqa: E501
- :type: int
+ :type attribute_integer: int
"""
self._attribute_integer = attribute_integer
@@ -271,7 +271,7 @@ class XmlItem(object):
:param attribute_boolean: The attribute_boolean of this XmlItem. # noqa: E501
- :type: bool
+ :type attribute_boolean: bool
"""
self._attribute_boolean = attribute_boolean
@@ -292,7 +292,7 @@ class XmlItem(object):
:param wrapped_array: The wrapped_array of this XmlItem. # noqa: E501
- :type: list[int]
+ :type wrapped_array: list[int]
"""
self._wrapped_array = wrapped_array
@@ -313,7 +313,7 @@ class XmlItem(object):
:param name_string: The name_string of this XmlItem. # noqa: E501
- :type: str
+ :type name_string: str
"""
self._name_string = name_string
@@ -334,7 +334,7 @@ class XmlItem(object):
:param name_number: The name_number of this XmlItem. # noqa: E501
- :type: float
+ :type name_number: float
"""
self._name_number = name_number
@@ -355,7 +355,7 @@ class XmlItem(object):
:param name_integer: The name_integer of this XmlItem. # noqa: E501
- :type: int
+ :type name_integer: int
"""
self._name_integer = name_integer
@@ -376,7 +376,7 @@ class XmlItem(object):
:param name_boolean: The name_boolean of this XmlItem. # noqa: E501
- :type: bool
+ :type name_boolean: bool
"""
self._name_boolean = name_boolean
@@ -397,7 +397,7 @@ class XmlItem(object):
:param name_array: The name_array of this XmlItem. # noqa: E501
- :type: list[int]
+ :type name_array: list[int]
"""
self._name_array = name_array
@@ -418,7 +418,7 @@ class XmlItem(object):
:param name_wrapped_array: The name_wrapped_array of this XmlItem. # noqa: E501
- :type: list[int]
+ :type name_wrapped_array: list[int]
"""
self._name_wrapped_array = name_wrapped_array
@@ -439,7 +439,7 @@ class XmlItem(object):
:param prefix_string: The prefix_string of this XmlItem. # noqa: E501
- :type: str
+ :type prefix_string: str
"""
self._prefix_string = prefix_string
@@ -460,7 +460,7 @@ class XmlItem(object):
:param prefix_number: The prefix_number of this XmlItem. # noqa: E501
- :type: float
+ :type prefix_number: float
"""
self._prefix_number = prefix_number
@@ -481,7 +481,7 @@ class XmlItem(object):
:param prefix_integer: The prefix_integer of this XmlItem. # noqa: E501
- :type: int
+ :type prefix_integer: int
"""
self._prefix_integer = prefix_integer
@@ -502,7 +502,7 @@ class XmlItem(object):
:param prefix_boolean: The prefix_boolean of this XmlItem. # noqa: E501
- :type: bool
+ :type prefix_boolean: bool
"""
self._prefix_boolean = prefix_boolean
@@ -523,7 +523,7 @@ class XmlItem(object):
:param prefix_array: The prefix_array of this XmlItem. # noqa: E501
- :type: list[int]
+ :type prefix_array: list[int]
"""
self._prefix_array = prefix_array
@@ -544,7 +544,7 @@ class XmlItem(object):
:param prefix_wrapped_array: The prefix_wrapped_array of this XmlItem. # noqa: E501
- :type: list[int]
+ :type prefix_wrapped_array: list[int]
"""
self._prefix_wrapped_array = prefix_wrapped_array
@@ -565,7 +565,7 @@ class XmlItem(object):
:param namespace_string: The namespace_string of this XmlItem. # noqa: E501
- :type: str
+ :type namespace_string: str
"""
self._namespace_string = namespace_string
@@ -586,7 +586,7 @@ class XmlItem(object):
:param namespace_number: The namespace_number of this XmlItem. # noqa: E501
- :type: float
+ :type namespace_number: float
"""
self._namespace_number = namespace_number
@@ -607,7 +607,7 @@ class XmlItem(object):
:param namespace_integer: The namespace_integer of this XmlItem. # noqa: E501
- :type: int
+ :type namespace_integer: int
"""
self._namespace_integer = namespace_integer
@@ -628,7 +628,7 @@ class XmlItem(object):
:param namespace_boolean: The namespace_boolean of this XmlItem. # noqa: E501
- :type: bool
+ :type namespace_boolean: bool
"""
self._namespace_boolean = namespace_boolean
@@ -649,7 +649,7 @@ class XmlItem(object):
:param namespace_array: The namespace_array of this XmlItem. # noqa: E501
- :type: list[int]
+ :type namespace_array: list[int]
"""
self._namespace_array = namespace_array
@@ -670,7 +670,7 @@ class XmlItem(object):
:param namespace_wrapped_array: The namespace_wrapped_array of this XmlItem. # noqa: E501
- :type: list[int]
+ :type namespace_wrapped_array: list[int]
"""
self._namespace_wrapped_array = namespace_wrapped_array
@@ -691,7 +691,7 @@ class XmlItem(object):
:param prefix_ns_string: The prefix_ns_string of this XmlItem. # noqa: E501
- :type: str
+ :type prefix_ns_string: str
"""
self._prefix_ns_string = prefix_ns_string
@@ -712,7 +712,7 @@ class XmlItem(object):
:param prefix_ns_number: The prefix_ns_number of this XmlItem. # noqa: E501
- :type: float
+ :type prefix_ns_number: float
"""
self._prefix_ns_number = prefix_ns_number
@@ -733,7 +733,7 @@ class XmlItem(object):
:param prefix_ns_integer: The prefix_ns_integer of this XmlItem. # noqa: E501
- :type: int
+ :type prefix_ns_integer: int
"""
self._prefix_ns_integer = prefix_ns_integer
@@ -754,7 +754,7 @@ class XmlItem(object):
:param prefix_ns_boolean: The prefix_ns_boolean of this XmlItem. # noqa: E501
- :type: bool
+ :type prefix_ns_boolean: bool
"""
self._prefix_ns_boolean = prefix_ns_boolean
@@ -775,7 +775,7 @@ class XmlItem(object):
:param prefix_ns_array: The prefix_ns_array of this XmlItem. # noqa: E501
- :type: list[int]
+ :type prefix_ns_array: list[int]
"""
self._prefix_ns_array = prefix_ns_array
@@ -796,7 +796,7 @@ class XmlItem(object):
:param prefix_ns_wrapped_array: The prefix_ns_wrapped_array of this XmlItem. # noqa: E501
- :type: list[int]
+ :type prefix_ns_wrapped_array: list[int]
"""
self._prefix_ns_wrapped_array = prefix_ns_wrapped_array
diff --git a/samples/client/petstore/python/petstore_api/api/another_fake_api.py b/samples/client/petstore/python/petstore_api/api/another_fake_api.py
index 77c4c003fe4..4d69b287ca8 100644
--- a/samples/client/petstore/python/petstore_api/api/another_fake_api.py
+++ b/samples/client/petstore/python/petstore_api/api/another_fake_api.py
@@ -42,21 +42,26 @@ class AnotherFakeApi(object):
To test special tags and operation ID starting with number # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.call_123_test_special_tags(body, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param Client body: client model (required)
+ :param body: client model (required)
+ :type body: Client
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: Client
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: Client
"""
kwargs['_return_http_data_only'] = True
return self.call_123_test_special_tags_with_http_info(body, **kwargs) # noqa: E501
@@ -67,23 +72,29 @@ class AnotherFakeApi(object):
To test special tags and operation ID starting with number # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.call_123_test_special_tags_with_http_info(body, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param Client body: client model (required)
+ :param body: client model (required)
+ :type body: Client
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _return_http_data_only: response data without head status code
and headers
+ :type _return_http_data_only: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: tuple(Client, status_code(int), headers(HTTPHeaderDict))
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: tuple(Client, status_code(int), headers(HTTPHeaderDict))
"""
local_var_params = locals()
diff --git a/samples/client/petstore/python/petstore_api/api/fake_api.py b/samples/client/petstore/python/petstore_api/api/fake_api.py
index 667c50612ce..e1d9ffebebf 100644
--- a/samples/client/petstore/python/petstore_api/api/fake_api.py
+++ b/samples/client/petstore/python/petstore_api/api/fake_api.py
@@ -42,21 +42,26 @@ class FakeApi(object):
this route creates an XmlItem # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.create_xml_item(xml_item, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param XmlItem xml_item: XmlItem Body (required)
+ :param xml_item: XmlItem Body (required)
+ :type xml_item: XmlItem
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: None
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: None
"""
kwargs['_return_http_data_only'] = True
return self.create_xml_item_with_http_info(xml_item, **kwargs) # noqa: E501
@@ -67,23 +72,29 @@ class FakeApi(object):
this route creates an XmlItem # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.create_xml_item_with_http_info(xml_item, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param XmlItem xml_item: XmlItem Body (required)
+ :param xml_item: XmlItem Body (required)
+ :type xml_item: XmlItem
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _return_http_data_only: response data without head status code
and headers
+ :type _return_http_data_only: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: None
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: None
"""
local_var_params = locals()
@@ -156,21 +167,26 @@ class FakeApi(object):
Test serialization of outer boolean types # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.fake_outer_boolean_serialize(async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param bool body: Input boolean as post body
+ :param body: Input boolean as post body
+ :type body: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: bool
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: bool
"""
kwargs['_return_http_data_only'] = True
return self.fake_outer_boolean_serialize_with_http_info(**kwargs) # noqa: E501
@@ -181,23 +197,29 @@ class FakeApi(object):
Test serialization of outer boolean types # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.fake_outer_boolean_serialize_with_http_info(async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param bool body: Input boolean as post body
+ :param body: Input boolean as post body
+ :type body: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _return_http_data_only: response data without head status code
and headers
+ :type _return_http_data_only: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: tuple(bool, status_code(int), headers(HTTPHeaderDict))
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: tuple(bool, status_code(int), headers(HTTPHeaderDict))
"""
local_var_params = locals()
@@ -266,21 +288,26 @@ class FakeApi(object):
Test serialization of object with outer number type # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.fake_outer_composite_serialize(async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param OuterComposite body: Input composite as post body
+ :param body: Input composite as post body
+ :type body: OuterComposite
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: OuterComposite
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: OuterComposite
"""
kwargs['_return_http_data_only'] = True
return self.fake_outer_composite_serialize_with_http_info(**kwargs) # noqa: E501
@@ -291,23 +318,29 @@ class FakeApi(object):
Test serialization of object with outer number type # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.fake_outer_composite_serialize_with_http_info(async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param OuterComposite body: Input composite as post body
+ :param body: Input composite as post body
+ :type body: OuterComposite
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _return_http_data_only: response data without head status code
and headers
+ :type _return_http_data_only: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: tuple(OuterComposite, status_code(int), headers(HTTPHeaderDict))
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: tuple(OuterComposite, status_code(int), headers(HTTPHeaderDict))
"""
local_var_params = locals()
@@ -376,21 +409,26 @@ class FakeApi(object):
Test serialization of outer number types # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.fake_outer_number_serialize(async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param float body: Input number as post body
+ :param body: Input number as post body
+ :type body: float
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: float
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: float
"""
kwargs['_return_http_data_only'] = True
return self.fake_outer_number_serialize_with_http_info(**kwargs) # noqa: E501
@@ -401,23 +439,29 @@ class FakeApi(object):
Test serialization of outer number types # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.fake_outer_number_serialize_with_http_info(async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param float body: Input number as post body
+ :param body: Input number as post body
+ :type body: float
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _return_http_data_only: response data without head status code
and headers
+ :type _return_http_data_only: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: tuple(float, status_code(int), headers(HTTPHeaderDict))
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: tuple(float, status_code(int), headers(HTTPHeaderDict))
"""
local_var_params = locals()
@@ -486,21 +530,26 @@ class FakeApi(object):
Test serialization of outer string types # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.fake_outer_string_serialize(async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param str body: Input string as post body
+ :param body: Input string as post body
+ :type body: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: str
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: str
"""
kwargs['_return_http_data_only'] = True
return self.fake_outer_string_serialize_with_http_info(**kwargs) # noqa: E501
@@ -511,23 +560,29 @@ class FakeApi(object):
Test serialization of outer string types # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.fake_outer_string_serialize_with_http_info(async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param str body: Input string as post body
+ :param body: Input string as post body
+ :type body: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _return_http_data_only: response data without head status code
and headers
+ :type _return_http_data_only: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: tuple(str, status_code(int), headers(HTTPHeaderDict))
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: tuple(str, status_code(int), headers(HTTPHeaderDict))
"""
local_var_params = locals()
@@ -596,21 +651,26 @@ class FakeApi(object):
For this test, the body for this request much reference a schema named `File`. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.test_body_with_file_schema(body, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param FileSchemaTestClass body: (required)
+ :param body: (required)
+ :type body: FileSchemaTestClass
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: None
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: None
"""
kwargs['_return_http_data_only'] = True
return self.test_body_with_file_schema_with_http_info(body, **kwargs) # noqa: E501
@@ -621,23 +681,29 @@ class FakeApi(object):
For this test, the body for this request much reference a schema named `File`. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.test_body_with_file_schema_with_http_info(body, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param FileSchemaTestClass body: (required)
+ :param body: (required)
+ :type body: FileSchemaTestClass
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _return_http_data_only: response data without head status code
and headers
+ :type _return_http_data_only: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: None
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: None
"""
local_var_params = locals()
@@ -709,22 +775,28 @@ class FakeApi(object):
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.test_body_with_query_params(query, body, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param str query: (required)
- :param User body: (required)
+ :param query: (required)
+ :type query: str
+ :param body: (required)
+ :type body: User
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: None
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: None
"""
kwargs['_return_http_data_only'] = True
return self.test_body_with_query_params_with_http_info(query, body, **kwargs) # noqa: E501
@@ -734,24 +806,31 @@ class FakeApi(object):
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.test_body_with_query_params_with_http_info(query, body, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param str query: (required)
- :param User body: (required)
+ :param query: (required)
+ :type query: str
+ :param body: (required)
+ :type body: User
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _return_http_data_only: response data without head status code
and headers
+ :type _return_http_data_only: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: None
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: None
"""
local_var_params = locals()
@@ -831,21 +910,26 @@ class FakeApi(object):
To test \"client\" model # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.test_client_model(body, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param Client body: client model (required)
+ :param body: client model (required)
+ :type body: Client
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: Client
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: Client
"""
kwargs['_return_http_data_only'] = True
return self.test_client_model_with_http_info(body, **kwargs) # noqa: E501
@@ -856,23 +940,29 @@ class FakeApi(object):
To test \"client\" model # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.test_client_model_with_http_info(body, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param Client body: client model (required)
+ :param body: client model (required)
+ :type body: Client
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _return_http_data_only: response data without head status code
and headers
+ :type _return_http_data_only: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: tuple(Client, status_code(int), headers(HTTPHeaderDict))
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: tuple(Client, status_code(int), headers(HTTPHeaderDict))
"""
local_var_params = locals()
@@ -949,34 +1039,52 @@ class FakeApi(object):
Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.test_endpoint_parameters(number, double, pattern_without_delimiter, byte, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param float number: None (required)
- :param float double: None (required)
- :param str pattern_without_delimiter: None (required)
- :param str byte: None (required)
- :param int integer: None
- :param int int32: None
- :param int int64: None
- :param float float: None
- :param str string: None
- :param file binary: None
- :param date date: None
- :param datetime date_time: None
- :param str password: None
- :param str param_callback: None
+ :param number: None (required)
+ :type number: float
+ :param double: None (required)
+ :type double: float
+ :param pattern_without_delimiter: None (required)
+ :type pattern_without_delimiter: str
+ :param byte: None (required)
+ :type byte: str
+ :param integer: None
+ :type integer: int
+ :param int32: None
+ :type int32: int
+ :param int64: None
+ :type int64: int
+ :param float: None
+ :type float: float
+ :param string: None
+ :type string: str
+ :param binary: None
+ :type binary: file
+ :param date: None
+ :type date: date
+ :param date_time: None
+ :type date_time: datetime
+ :param password: None
+ :type password: str
+ :param param_callback: None
+ :type param_callback: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: None
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: None
"""
kwargs['_return_http_data_only'] = True
return self.test_endpoint_parameters_with_http_info(number, double, pattern_without_delimiter, byte, **kwargs) # noqa: E501
@@ -987,36 +1095,55 @@ class FakeApi(object):
Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.test_endpoint_parameters_with_http_info(number, double, pattern_without_delimiter, byte, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param float number: None (required)
- :param float double: None (required)
- :param str pattern_without_delimiter: None (required)
- :param str byte: None (required)
- :param int integer: None
- :param int int32: None
- :param int int64: None
- :param float float: None
- :param str string: None
- :param file binary: None
- :param date date: None
- :param datetime date_time: None
- :param str password: None
- :param str param_callback: None
+ :param number: None (required)
+ :type number: float
+ :param double: None (required)
+ :type double: float
+ :param pattern_without_delimiter: None (required)
+ :type pattern_without_delimiter: str
+ :param byte: None (required)
+ :type byte: str
+ :param integer: None
+ :type integer: int
+ :param int32: None
+ :type int32: int
+ :param int64: None
+ :type int64: int
+ :param float: None
+ :type float: float
+ :param string: None
+ :type string: str
+ :param binary: None
+ :type binary: file
+ :param date: None
+ :type date: date
+ :param date_time: None
+ :type date_time: datetime
+ :param password: None
+ :type password: str
+ :param param_callback: None
+ :type param_callback: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _return_http_data_only: response data without head status code
and headers
+ :type _return_http_data_only: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: None
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: None
"""
local_var_params = locals()
@@ -1168,28 +1295,40 @@ class FakeApi(object):
To test enum parameters # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.test_enum_parameters(async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param list[str] enum_header_string_array: Header parameter enum test (string array)
- :param str enum_header_string: Header parameter enum test (string)
- :param list[str] enum_query_string_array: Query parameter enum test (string array)
- :param str enum_query_string: Query parameter enum test (string)
- :param int enum_query_integer: Query parameter enum test (double)
- :param float enum_query_double: Query parameter enum test (double)
- :param list[str] enum_form_string_array: Form parameter enum test (string array)
- :param str enum_form_string: Form parameter enum test (string)
+ :param enum_header_string_array: Header parameter enum test (string array)
+ :type enum_header_string_array: list[str]
+ :param enum_header_string: Header parameter enum test (string)
+ :type enum_header_string: str
+ :param enum_query_string_array: Query parameter enum test (string array)
+ :type enum_query_string_array: list[str]
+ :param enum_query_string: Query parameter enum test (string)
+ :type enum_query_string: str
+ :param enum_query_integer: Query parameter enum test (double)
+ :type enum_query_integer: int
+ :param enum_query_double: Query parameter enum test (double)
+ :type enum_query_double: float
+ :param enum_form_string_array: Form parameter enum test (string array)
+ :type enum_form_string_array: list[str]
+ :param enum_form_string: Form parameter enum test (string)
+ :type enum_form_string: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: None
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: None
"""
kwargs['_return_http_data_only'] = True
return self.test_enum_parameters_with_http_info(**kwargs) # noqa: E501
@@ -1200,30 +1339,43 @@ class FakeApi(object):
To test enum parameters # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.test_enum_parameters_with_http_info(async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param list[str] enum_header_string_array: Header parameter enum test (string array)
- :param str enum_header_string: Header parameter enum test (string)
- :param list[str] enum_query_string_array: Query parameter enum test (string array)
- :param str enum_query_string: Query parameter enum test (string)
- :param int enum_query_integer: Query parameter enum test (double)
- :param float enum_query_double: Query parameter enum test (double)
- :param list[str] enum_form_string_array: Form parameter enum test (string array)
- :param str enum_form_string: Form parameter enum test (string)
+ :param enum_header_string_array: Header parameter enum test (string array)
+ :type enum_header_string_array: list[str]
+ :param enum_header_string: Header parameter enum test (string)
+ :type enum_header_string: str
+ :param enum_query_string_array: Query parameter enum test (string array)
+ :type enum_query_string_array: list[str]
+ :param enum_query_string: Query parameter enum test (string)
+ :type enum_query_string: str
+ :param enum_query_integer: Query parameter enum test (double)
+ :type enum_query_integer: int
+ :param enum_query_double: Query parameter enum test (double)
+ :type enum_query_double: float
+ :param enum_form_string_array: Form parameter enum test (string array)
+ :type enum_form_string_array: list[str]
+ :param enum_form_string: Form parameter enum test (string)
+ :type enum_form_string: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _return_http_data_only: response data without head status code
and headers
+ :type _return_http_data_only: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: None
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: None
"""
local_var_params = locals()
@@ -1316,26 +1468,36 @@ class FakeApi(object):
Fake endpoint to test group parameters (optional) # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.test_group_parameters(required_string_group, required_boolean_group, required_int64_group, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param int required_string_group: Required String in group parameters (required)
- :param bool required_boolean_group: Required Boolean in group parameters (required)
- :param int required_int64_group: Required Integer in group parameters (required)
- :param int string_group: String in group parameters
- :param bool boolean_group: Boolean in group parameters
- :param int int64_group: Integer in group parameters
+ :param required_string_group: Required String in group parameters (required)
+ :type required_string_group: int
+ :param required_boolean_group: Required Boolean in group parameters (required)
+ :type required_boolean_group: bool
+ :param required_int64_group: Required Integer in group parameters (required)
+ :type required_int64_group: int
+ :param string_group: String in group parameters
+ :type string_group: int
+ :param boolean_group: Boolean in group parameters
+ :type boolean_group: bool
+ :param int64_group: Integer in group parameters
+ :type int64_group: int
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: None
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: None
"""
kwargs['_return_http_data_only'] = True
return self.test_group_parameters_with_http_info(required_string_group, required_boolean_group, required_int64_group, **kwargs) # noqa: E501
@@ -1346,28 +1508,39 @@ class FakeApi(object):
Fake endpoint to test group parameters (optional) # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.test_group_parameters_with_http_info(required_string_group, required_boolean_group, required_int64_group, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param int required_string_group: Required String in group parameters (required)
- :param bool required_boolean_group: Required Boolean in group parameters (required)
- :param int required_int64_group: Required Integer in group parameters (required)
- :param int string_group: String in group parameters
- :param bool boolean_group: Boolean in group parameters
- :param int int64_group: Integer in group parameters
+ :param required_string_group: Required String in group parameters (required)
+ :type required_string_group: int
+ :param required_boolean_group: Required Boolean in group parameters (required)
+ :type required_boolean_group: bool
+ :param required_int64_group: Required Integer in group parameters (required)
+ :type required_int64_group: int
+ :param string_group: String in group parameters
+ :type string_group: int
+ :param boolean_group: Boolean in group parameters
+ :type boolean_group: bool
+ :param int64_group: Integer in group parameters
+ :type int64_group: int
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _return_http_data_only: response data without head status code
and headers
+ :type _return_http_data_only: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: None
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: None
"""
local_var_params = locals()
@@ -1458,21 +1631,26 @@ class FakeApi(object):
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.test_inline_additional_properties(param, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param dict(str, str) param: request body (required)
+ :param param: request body (required)
+ :type param: dict(str, str)
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: None
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: None
"""
kwargs['_return_http_data_only'] = True
return self.test_inline_additional_properties_with_http_info(param, **kwargs) # noqa: E501
@@ -1482,23 +1660,29 @@ class FakeApi(object):
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.test_inline_additional_properties_with_http_info(param, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param dict(str, str) param: request body (required)
+ :param param: request body (required)
+ :type param: dict(str, str)
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _return_http_data_only: response data without head status code
and headers
+ :type _return_http_data_only: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: None
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: None
"""
local_var_params = locals()
@@ -1570,22 +1754,28 @@ class FakeApi(object):
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.test_json_form_data(param, param2, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param str param: field1 (required)
- :param str param2: field2 (required)
+ :param param: field1 (required)
+ :type param: str
+ :param param2: field2 (required)
+ :type param2: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: None
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: None
"""
kwargs['_return_http_data_only'] = True
return self.test_json_form_data_with_http_info(param, param2, **kwargs) # noqa: E501
@@ -1595,24 +1785,31 @@ class FakeApi(object):
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.test_json_form_data_with_http_info(param, param2, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param str param: field1 (required)
- :param str param2: field2 (required)
+ :param param: field1 (required)
+ :type param: str
+ :param param2: field2 (required)
+ :type param2: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _return_http_data_only: response data without head status code
and headers
+ :type _return_http_data_only: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: None
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: None
"""
local_var_params = locals()
@@ -1692,25 +1889,34 @@ class FakeApi(object):
To test the collection format in query parameters # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.test_query_parameter_collection_format(pipe, ioutil, http, url, context, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param list[str] pipe: (required)
- :param list[str] ioutil: (required)
- :param list[str] http: (required)
- :param list[str] url: (required)
- :param list[str] context: (required)
+ :param pipe: (required)
+ :type pipe: list[str]
+ :param ioutil: (required)
+ :type ioutil: list[str]
+ :param http: (required)
+ :type http: list[str]
+ :param url: (required)
+ :type url: list[str]
+ :param context: (required)
+ :type context: list[str]
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: None
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: None
"""
kwargs['_return_http_data_only'] = True
return self.test_query_parameter_collection_format_with_http_info(pipe, ioutil, http, url, context, **kwargs) # noqa: E501
@@ -1721,27 +1927,37 @@ class FakeApi(object):
To test the collection format in query parameters # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.test_query_parameter_collection_format_with_http_info(pipe, ioutil, http, url, context, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param list[str] pipe: (required)
- :param list[str] ioutil: (required)
- :param list[str] http: (required)
- :param list[str] url: (required)
- :param list[str] context: (required)
+ :param pipe: (required)
+ :type pipe: list[str]
+ :param ioutil: (required)
+ :type ioutil: list[str]
+ :param http: (required)
+ :type http: list[str]
+ :param url: (required)
+ :type url: list[str]
+ :param context: (required)
+ :type context: list[str]
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _return_http_data_only: response data without head status code
and headers
+ :type _return_http_data_only: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: None
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: None
"""
local_var_params = locals()
diff --git a/samples/client/petstore/python/petstore_api/api/fake_classname_tags_123_api.py b/samples/client/petstore/python/petstore_api/api/fake_classname_tags_123_api.py
index 2bb189bd01b..d963591a49a 100644
--- a/samples/client/petstore/python/petstore_api/api/fake_classname_tags_123_api.py
+++ b/samples/client/petstore/python/petstore_api/api/fake_classname_tags_123_api.py
@@ -42,21 +42,26 @@ class FakeClassnameTags123Api(object):
To test class name in snake case # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.test_classname(body, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param Client body: client model (required)
+ :param body: client model (required)
+ :type body: Client
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: Client
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: Client
"""
kwargs['_return_http_data_only'] = True
return self.test_classname_with_http_info(body, **kwargs) # noqa: E501
@@ -67,23 +72,29 @@ class FakeClassnameTags123Api(object):
To test class name in snake case # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.test_classname_with_http_info(body, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param Client body: client model (required)
+ :param body: client model (required)
+ :type body: Client
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _return_http_data_only: response data without head status code
and headers
+ :type _return_http_data_only: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: tuple(Client, status_code(int), headers(HTTPHeaderDict))
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: tuple(Client, status_code(int), headers(HTTPHeaderDict))
"""
local_var_params = locals()
diff --git a/samples/client/petstore/python/petstore_api/api/pet_api.py b/samples/client/petstore/python/petstore_api/api/pet_api.py
index 5a297a57647..7002fe32740 100644
--- a/samples/client/petstore/python/petstore_api/api/pet_api.py
+++ b/samples/client/petstore/python/petstore_api/api/pet_api.py
@@ -41,21 +41,26 @@ class PetApi(object):
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.add_pet(body, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param Pet body: Pet object that needs to be added to the store (required)
+ :param body: Pet object that needs to be added to the store (required)
+ :type body: Pet
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: None
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: None
"""
kwargs['_return_http_data_only'] = True
return self.add_pet_with_http_info(body, **kwargs) # noqa: E501
@@ -65,23 +70,29 @@ class PetApi(object):
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.add_pet_with_http_info(body, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param Pet body: Pet object that needs to be added to the store (required)
+ :param body: Pet object that needs to be added to the store (required)
+ :type body: Pet
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _return_http_data_only: response data without head status code
and headers
+ :type _return_http_data_only: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: None
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: None
"""
local_var_params = locals()
@@ -153,22 +164,28 @@ class PetApi(object):
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.delete_pet(pet_id, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param int pet_id: Pet id to delete (required)
- :param str api_key:
+ :param pet_id: Pet id to delete (required)
+ :type pet_id: int
+ :param api_key:
+ :type api_key: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: None
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: None
"""
kwargs['_return_http_data_only'] = True
return self.delete_pet_with_http_info(pet_id, **kwargs) # noqa: E501
@@ -178,24 +195,31 @@ class PetApi(object):
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.delete_pet_with_http_info(pet_id, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param int pet_id: Pet id to delete (required)
- :param str api_key:
+ :param pet_id: Pet id to delete (required)
+ :type pet_id: int
+ :param api_key:
+ :type api_key: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _return_http_data_only: response data without head status code
and headers
+ :type _return_http_data_only: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: None
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: None
"""
local_var_params = locals()
@@ -267,21 +291,26 @@ class PetApi(object):
Multiple status values can be provided with comma separated strings # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.find_pets_by_status(status, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param list[str] status: Status values that need to be considered for filter (required)
+ :param status: Status values that need to be considered for filter (required)
+ :type status: list[str]
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: list[Pet]
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: list[Pet]
"""
kwargs['_return_http_data_only'] = True
return self.find_pets_by_status_with_http_info(status, **kwargs) # noqa: E501
@@ -292,23 +321,29 @@ class PetApi(object):
Multiple status values can be provided with comma separated strings # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.find_pets_by_status_with_http_info(status, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param list[str] status: Status values that need to be considered for filter (required)
+ :param status: Status values that need to be considered for filter (required)
+ :type status: list[str]
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _return_http_data_only: response data without head status code
and headers
+ :type _return_http_data_only: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: tuple(list[Pet], status_code(int), headers(HTTPHeaderDict))
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: tuple(list[Pet], status_code(int), headers(HTTPHeaderDict))
"""
local_var_params = locals()
@@ -382,21 +417,26 @@ class PetApi(object):
Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.find_pets_by_tags(tags, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param list[str] tags: Tags to filter by (required)
+ :param tags: Tags to filter by (required)
+ :type tags: list[str]
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: list[Pet]
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: list[Pet]
"""
kwargs['_return_http_data_only'] = True
return self.find_pets_by_tags_with_http_info(tags, **kwargs) # noqa: E501
@@ -407,23 +447,29 @@ class PetApi(object):
Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.find_pets_by_tags_with_http_info(tags, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param list[str] tags: Tags to filter by (required)
+ :param tags: Tags to filter by (required)
+ :type tags: list[str]
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _return_http_data_only: response data without head status code
and headers
+ :type _return_http_data_only: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: tuple(list[Pet], status_code(int), headers(HTTPHeaderDict))
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: tuple(list[Pet], status_code(int), headers(HTTPHeaderDict))
"""
local_var_params = locals()
@@ -497,21 +543,26 @@ class PetApi(object):
Returns a single pet # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.get_pet_by_id(pet_id, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param int pet_id: ID of pet to return (required)
+ :param pet_id: ID of pet to return (required)
+ :type pet_id: int
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: Pet
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: Pet
"""
kwargs['_return_http_data_only'] = True
return self.get_pet_by_id_with_http_info(pet_id, **kwargs) # noqa: E501
@@ -522,23 +573,29 @@ class PetApi(object):
Returns a single pet # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.get_pet_by_id_with_http_info(pet_id, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param int pet_id: ID of pet to return (required)
+ :param pet_id: ID of pet to return (required)
+ :type pet_id: int
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _return_http_data_only: response data without head status code
and headers
+ :type _return_http_data_only: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: tuple(Pet, status_code(int), headers(HTTPHeaderDict))
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: tuple(Pet, status_code(int), headers(HTTPHeaderDict))
"""
local_var_params = locals()
@@ -610,21 +667,26 @@ class PetApi(object):
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.update_pet(body, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param Pet body: Pet object that needs to be added to the store (required)
+ :param body: Pet object that needs to be added to the store (required)
+ :type body: Pet
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: None
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: None
"""
kwargs['_return_http_data_only'] = True
return self.update_pet_with_http_info(body, **kwargs) # noqa: E501
@@ -634,23 +696,29 @@ class PetApi(object):
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.update_pet_with_http_info(body, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param Pet body: Pet object that needs to be added to the store (required)
+ :param body: Pet object that needs to be added to the store (required)
+ :type body: Pet
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _return_http_data_only: response data without head status code
and headers
+ :type _return_http_data_only: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: None
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: None
"""
local_var_params = locals()
@@ -722,23 +790,30 @@ class PetApi(object):
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.update_pet_with_form(pet_id, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param int pet_id: ID of pet that needs to be updated (required)
- :param str name: Updated name of the pet
- :param str status: Updated status of the pet
+ :param pet_id: ID of pet that needs to be updated (required)
+ :type pet_id: int
+ :param name: Updated name of the pet
+ :type name: str
+ :param status: Updated status of the pet
+ :type status: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: None
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: None
"""
kwargs['_return_http_data_only'] = True
return self.update_pet_with_form_with_http_info(pet_id, **kwargs) # noqa: E501
@@ -748,25 +823,33 @@ class PetApi(object):
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.update_pet_with_form_with_http_info(pet_id, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param int pet_id: ID of pet that needs to be updated (required)
- :param str name: Updated name of the pet
- :param str status: Updated status of the pet
+ :param pet_id: ID of pet that needs to be updated (required)
+ :type pet_id: int
+ :param name: Updated name of the pet
+ :type name: str
+ :param status: Updated status of the pet
+ :type status: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _return_http_data_only: response data without head status code
and headers
+ :type _return_http_data_only: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: None
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: None
"""
local_var_params = locals()
@@ -844,23 +927,30 @@ class PetApi(object):
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.upload_file(pet_id, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param int pet_id: ID of pet to update (required)
- :param str additional_metadata: Additional data to pass to server
- :param file file: file to upload
+ :param pet_id: ID of pet to update (required)
+ :type pet_id: int
+ :param additional_metadata: Additional data to pass to server
+ :type additional_metadata: str
+ :param file: file to upload
+ :type file: file
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: ApiResponse
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: ApiResponse
"""
kwargs['_return_http_data_only'] = True
return self.upload_file_with_http_info(pet_id, **kwargs) # noqa: E501
@@ -870,25 +960,33 @@ class PetApi(object):
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.upload_file_with_http_info(pet_id, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param int pet_id: ID of pet to update (required)
- :param str additional_metadata: Additional data to pass to server
- :param file file: file to upload
+ :param pet_id: ID of pet to update (required)
+ :type pet_id: int
+ :param additional_metadata: Additional data to pass to server
+ :type additional_metadata: str
+ :param file: file to upload
+ :type file: file
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _return_http_data_only: response data without head status code
and headers
+ :type _return_http_data_only: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: tuple(ApiResponse, status_code(int), headers(HTTPHeaderDict))
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: tuple(ApiResponse, status_code(int), headers(HTTPHeaderDict))
"""
local_var_params = locals()
@@ -970,23 +1068,30 @@ class PetApi(object):
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.upload_file_with_required_file(pet_id, required_file, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param int pet_id: ID of pet to update (required)
- :param file required_file: file to upload (required)
- :param str additional_metadata: Additional data to pass to server
+ :param pet_id: ID of pet to update (required)
+ :type pet_id: int
+ :param required_file: file to upload (required)
+ :type required_file: file
+ :param additional_metadata: Additional data to pass to server
+ :type additional_metadata: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: ApiResponse
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: ApiResponse
"""
kwargs['_return_http_data_only'] = True
return self.upload_file_with_required_file_with_http_info(pet_id, required_file, **kwargs) # noqa: E501
@@ -996,25 +1101,33 @@ class PetApi(object):
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.upload_file_with_required_file_with_http_info(pet_id, required_file, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param int pet_id: ID of pet to update (required)
- :param file required_file: file to upload (required)
- :param str additional_metadata: Additional data to pass to server
+ :param pet_id: ID of pet to update (required)
+ :type pet_id: int
+ :param required_file: file to upload (required)
+ :type required_file: file
+ :param additional_metadata: Additional data to pass to server
+ :type additional_metadata: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _return_http_data_only: response data without head status code
and headers
+ :type _return_http_data_only: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: tuple(ApiResponse, status_code(int), headers(HTTPHeaderDict))
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: tuple(ApiResponse, status_code(int), headers(HTTPHeaderDict))
"""
local_var_params = locals()
diff --git a/samples/client/petstore/python/petstore_api/api/store_api.py b/samples/client/petstore/python/petstore_api/api/store_api.py
index f693f755b74..0ede23f05ba 100644
--- a/samples/client/petstore/python/petstore_api/api/store_api.py
+++ b/samples/client/petstore/python/petstore_api/api/store_api.py
@@ -42,21 +42,26 @@ class StoreApi(object):
For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.delete_order(order_id, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param str order_id: ID of the order that needs to be deleted (required)
+ :param order_id: ID of the order that needs to be deleted (required)
+ :type order_id: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: None
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: None
"""
kwargs['_return_http_data_only'] = True
return self.delete_order_with_http_info(order_id, **kwargs) # noqa: E501
@@ -67,23 +72,29 @@ class StoreApi(object):
For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.delete_order_with_http_info(order_id, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param str order_id: ID of the order that needs to be deleted (required)
+ :param order_id: ID of the order that needs to be deleted (required)
+ :type order_id: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _return_http_data_only: response data without head status code
and headers
+ :type _return_http_data_only: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: None
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: None
"""
local_var_params = locals()
@@ -152,20 +163,24 @@ class StoreApi(object):
Returns a map of status codes to quantities # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.get_inventory(async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: dict(str, int)
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: dict(str, int)
"""
kwargs['_return_http_data_only'] = True
return self.get_inventory_with_http_info(**kwargs) # noqa: E501
@@ -176,22 +191,27 @@ class StoreApi(object):
Returns a map of status codes to quantities # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.get_inventory_with_http_info(async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _return_http_data_only: response data without head status code
and headers
+ :type _return_http_data_only: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: tuple(dict(str, int), status_code(int), headers(HTTPHeaderDict))
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: tuple(dict(str, int), status_code(int), headers(HTTPHeaderDict))
"""
local_var_params = locals()
@@ -257,21 +277,26 @@ class StoreApi(object):
For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.get_order_by_id(order_id, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param int order_id: ID of pet that needs to be fetched (required)
+ :param order_id: ID of pet that needs to be fetched (required)
+ :type order_id: int
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: Order
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: Order
"""
kwargs['_return_http_data_only'] = True
return self.get_order_by_id_with_http_info(order_id, **kwargs) # noqa: E501
@@ -282,23 +307,29 @@ class StoreApi(object):
For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.get_order_by_id_with_http_info(order_id, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param int order_id: ID of pet that needs to be fetched (required)
+ :param order_id: ID of pet that needs to be fetched (required)
+ :type order_id: int
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _return_http_data_only: response data without head status code
and headers
+ :type _return_http_data_only: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: tuple(Order, status_code(int), headers(HTTPHeaderDict))
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: tuple(Order, status_code(int), headers(HTTPHeaderDict))
"""
local_var_params = locals()
@@ -374,21 +405,26 @@ class StoreApi(object):
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.place_order(body, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param Order body: order placed for purchasing the pet (required)
+ :param body: order placed for purchasing the pet (required)
+ :type body: Order
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: Order
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: Order
"""
kwargs['_return_http_data_only'] = True
return self.place_order_with_http_info(body, **kwargs) # noqa: E501
@@ -398,23 +434,29 @@ class StoreApi(object):
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.place_order_with_http_info(body, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param Order body: order placed for purchasing the pet (required)
+ :param body: order placed for purchasing the pet (required)
+ :type body: Order
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _return_http_data_only: response data without head status code
and headers
+ :type _return_http_data_only: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: tuple(Order, status_code(int), headers(HTTPHeaderDict))
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: tuple(Order, status_code(int), headers(HTTPHeaderDict))
"""
local_var_params = locals()
diff --git a/samples/client/petstore/python/petstore_api/api/user_api.py b/samples/client/petstore/python/petstore_api/api/user_api.py
index 9462f00716a..a912483b023 100644
--- a/samples/client/petstore/python/petstore_api/api/user_api.py
+++ b/samples/client/petstore/python/petstore_api/api/user_api.py
@@ -42,21 +42,26 @@ class UserApi(object):
This can only be done by the logged in user. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.create_user(body, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param User body: Created user object (required)
+ :param body: Created user object (required)
+ :type body: User
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: None
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: None
"""
kwargs['_return_http_data_only'] = True
return self.create_user_with_http_info(body, **kwargs) # noqa: E501
@@ -67,23 +72,29 @@ class UserApi(object):
This can only be done by the logged in user. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.create_user_with_http_info(body, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param User body: Created user object (required)
+ :param body: Created user object (required)
+ :type body: User
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _return_http_data_only: response data without head status code
and headers
+ :type _return_http_data_only: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: None
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: None
"""
local_var_params = locals()
@@ -151,21 +162,26 @@ class UserApi(object):
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.create_users_with_array_input(body, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param list[User] body: List of user object (required)
+ :param body: List of user object (required)
+ :type body: list[User]
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: None
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: None
"""
kwargs['_return_http_data_only'] = True
return self.create_users_with_array_input_with_http_info(body, **kwargs) # noqa: E501
@@ -175,23 +191,29 @@ class UserApi(object):
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.create_users_with_array_input_with_http_info(body, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param list[User] body: List of user object (required)
+ :param body: List of user object (required)
+ :type body: list[User]
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _return_http_data_only: response data without head status code
and headers
+ :type _return_http_data_only: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: None
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: None
"""
local_var_params = locals()
@@ -259,21 +281,26 @@ class UserApi(object):
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.create_users_with_list_input(body, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param list[User] body: List of user object (required)
+ :param body: List of user object (required)
+ :type body: list[User]
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: None
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: None
"""
kwargs['_return_http_data_only'] = True
return self.create_users_with_list_input_with_http_info(body, **kwargs) # noqa: E501
@@ -283,23 +310,29 @@ class UserApi(object):
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.create_users_with_list_input_with_http_info(body, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param list[User] body: List of user object (required)
+ :param body: List of user object (required)
+ :type body: list[User]
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _return_http_data_only: response data without head status code
and headers
+ :type _return_http_data_only: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: None
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: None
"""
local_var_params = locals()
@@ -368,21 +401,26 @@ class UserApi(object):
This can only be done by the logged in user. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.delete_user(username, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param str username: The name that needs to be deleted (required)
+ :param username: The name that needs to be deleted (required)
+ :type username: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: None
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: None
"""
kwargs['_return_http_data_only'] = True
return self.delete_user_with_http_info(username, **kwargs) # noqa: E501
@@ -393,23 +431,29 @@ class UserApi(object):
This can only be done by the logged in user. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.delete_user_with_http_info(username, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param str username: The name that needs to be deleted (required)
+ :param username: The name that needs to be deleted (required)
+ :type username: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _return_http_data_only: response data without head status code
and headers
+ :type _return_http_data_only: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: None
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: None
"""
local_var_params = locals()
@@ -477,21 +521,26 @@ class UserApi(object):
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.get_user_by_name(username, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param str username: The name that needs to be fetched. Use user1 for testing. (required)
+ :param username: The name that needs to be fetched. Use user1 for testing. (required)
+ :type username: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: User
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: User
"""
kwargs['_return_http_data_only'] = True
return self.get_user_by_name_with_http_info(username, **kwargs) # noqa: E501
@@ -501,23 +550,29 @@ class UserApi(object):
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.get_user_by_name_with_http_info(username, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param str username: The name that needs to be fetched. Use user1 for testing. (required)
+ :param username: The name that needs to be fetched. Use user1 for testing. (required)
+ :type username: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _return_http_data_only: response data without head status code
and headers
+ :type _return_http_data_only: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: tuple(User, status_code(int), headers(HTTPHeaderDict))
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: tuple(User, status_code(int), headers(HTTPHeaderDict))
"""
local_var_params = locals()
@@ -589,22 +644,28 @@ class UserApi(object):
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.login_user(username, password, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param str username: The user name for login (required)
- :param str password: The password for login in clear text (required)
+ :param username: The user name for login (required)
+ :type username: str
+ :param password: The password for login in clear text (required)
+ :type password: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: str
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: str
"""
kwargs['_return_http_data_only'] = True
return self.login_user_with_http_info(username, password, **kwargs) # noqa: E501
@@ -614,24 +675,31 @@ class UserApi(object):
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.login_user_with_http_info(username, password, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param str username: The user name for login (required)
- :param str password: The password for login in clear text (required)
+ :param username: The user name for login (required)
+ :type username: str
+ :param password: The password for login in clear text (required)
+ :type password: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _return_http_data_only: response data without head status code
and headers
+ :type _return_http_data_only: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: tuple(str, status_code(int), headers(HTTPHeaderDict))
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: tuple(str, status_code(int), headers(HTTPHeaderDict))
"""
local_var_params = locals()
@@ -710,20 +778,24 @@ class UserApi(object):
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.logout_user(async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: None
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: None
"""
kwargs['_return_http_data_only'] = True
return self.logout_user_with_http_info(**kwargs) # noqa: E501
@@ -733,22 +805,27 @@ class UserApi(object):
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.logout_user_with_http_info(async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _return_http_data_only: response data without head status code
and headers
+ :type _return_http_data_only: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: None
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: None
"""
local_var_params = locals()
@@ -810,22 +887,28 @@ class UserApi(object):
This can only be done by the logged in user. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.update_user(username, body, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param str username: name that need to be deleted (required)
- :param User body: Updated user object (required)
+ :param username: name that need to be deleted (required)
+ :type username: str
+ :param body: Updated user object (required)
+ :type body: User
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: None
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: None
"""
kwargs['_return_http_data_only'] = True
return self.update_user_with_http_info(username, body, **kwargs) # noqa: E501
@@ -836,24 +919,31 @@ class UserApi(object):
This can only be done by the logged in user. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
+
>>> thread = api.update_user_with_http_info(username, body, async_req=True)
>>> result = thread.get()
- :param async_req bool: execute request asynchronously
- :param str username: name that need to be deleted (required)
- :param User body: Updated user object (required)
+ :param username: name that need to be deleted (required)
+ :type username: str
+ :param body: Updated user object (required)
+ :type body: User
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
:param _return_http_data_only: response data without head status code
and headers
+ :type _return_http_data_only: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: None
+ :return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
+ :rtype: None
"""
local_var_params = locals()
diff --git a/samples/client/petstore/python/petstore_api/models/additional_properties_any_type.py b/samples/client/petstore/python/petstore_api/models/additional_properties_any_type.py
index 2954285de87..690c71705b9 100644
--- a/samples/client/petstore/python/petstore_api/models/additional_properties_any_type.py
+++ b/samples/client/petstore/python/petstore_api/models/additional_properties_any_type.py
@@ -68,7 +68,7 @@ class AdditionalPropertiesAnyType(object):
:param name: The name of this AdditionalPropertiesAnyType. # noqa: E501
- :type: str
+ :type name: str
"""
self._name = name
diff --git a/samples/client/petstore/python/petstore_api/models/additional_properties_array.py b/samples/client/petstore/python/petstore_api/models/additional_properties_array.py
index c6369c22a12..f0902bdaffa 100644
--- a/samples/client/petstore/python/petstore_api/models/additional_properties_array.py
+++ b/samples/client/petstore/python/petstore_api/models/additional_properties_array.py
@@ -68,7 +68,7 @@ class AdditionalPropertiesArray(object):
:param name: The name of this AdditionalPropertiesArray. # noqa: E501
- :type: str
+ :type name: str
"""
self._name = name
diff --git a/samples/client/petstore/python/petstore_api/models/additional_properties_boolean.py b/samples/client/petstore/python/petstore_api/models/additional_properties_boolean.py
index 599b7c8b884..f79d2609a1d 100644
--- a/samples/client/petstore/python/petstore_api/models/additional_properties_boolean.py
+++ b/samples/client/petstore/python/petstore_api/models/additional_properties_boolean.py
@@ -68,7 +68,7 @@ class AdditionalPropertiesBoolean(object):
:param name: The name of this AdditionalPropertiesBoolean. # noqa: E501
- :type: str
+ :type name: str
"""
self._name = name
diff --git a/samples/client/petstore/python/petstore_api/models/additional_properties_class.py b/samples/client/petstore/python/petstore_api/models/additional_properties_class.py
index be4455c683b..ca334635175 100644
--- a/samples/client/petstore/python/petstore_api/models/additional_properties_class.py
+++ b/samples/client/petstore/python/petstore_api/models/additional_properties_class.py
@@ -118,7 +118,7 @@ class AdditionalPropertiesClass(object):
:param map_string: The map_string of this AdditionalPropertiesClass. # noqa: E501
- :type: dict(str, str)
+ :type map_string: dict(str, str)
"""
self._map_string = map_string
@@ -139,7 +139,7 @@ class AdditionalPropertiesClass(object):
:param map_number: The map_number of this AdditionalPropertiesClass. # noqa: E501
- :type: dict(str, float)
+ :type map_number: dict(str, float)
"""
self._map_number = map_number
@@ -160,7 +160,7 @@ class AdditionalPropertiesClass(object):
:param map_integer: The map_integer of this AdditionalPropertiesClass. # noqa: E501
- :type: dict(str, int)
+ :type map_integer: dict(str, int)
"""
self._map_integer = map_integer
@@ -181,7 +181,7 @@ class AdditionalPropertiesClass(object):
:param map_boolean: The map_boolean of this AdditionalPropertiesClass. # noqa: E501
- :type: dict(str, bool)
+ :type map_boolean: dict(str, bool)
"""
self._map_boolean = map_boolean
@@ -202,7 +202,7 @@ class AdditionalPropertiesClass(object):
:param map_array_integer: The map_array_integer of this AdditionalPropertiesClass. # noqa: E501
- :type: dict(str, list[int])
+ :type map_array_integer: dict(str, list[int])
"""
self._map_array_integer = map_array_integer
@@ -223,7 +223,7 @@ class AdditionalPropertiesClass(object):
:param map_array_anytype: The map_array_anytype of this AdditionalPropertiesClass. # noqa: E501
- :type: dict(str, list[object])
+ :type map_array_anytype: dict(str, list[object])
"""
self._map_array_anytype = map_array_anytype
@@ -244,7 +244,7 @@ class AdditionalPropertiesClass(object):
:param map_map_string: The map_map_string of this AdditionalPropertiesClass. # noqa: E501
- :type: dict(str, dict(str, str))
+ :type map_map_string: dict(str, dict(str, str))
"""
self._map_map_string = map_map_string
@@ -265,7 +265,7 @@ class AdditionalPropertiesClass(object):
:param map_map_anytype: The map_map_anytype of this AdditionalPropertiesClass. # noqa: E501
- :type: dict(str, dict(str, object))
+ :type map_map_anytype: dict(str, dict(str, object))
"""
self._map_map_anytype = map_map_anytype
@@ -286,7 +286,7 @@ class AdditionalPropertiesClass(object):
:param anytype_1: The anytype_1 of this AdditionalPropertiesClass. # noqa: E501
- :type: object
+ :type anytype_1: object
"""
self._anytype_1 = anytype_1
@@ -307,7 +307,7 @@ class AdditionalPropertiesClass(object):
:param anytype_2: The anytype_2 of this AdditionalPropertiesClass. # noqa: E501
- :type: object
+ :type anytype_2: object
"""
self._anytype_2 = anytype_2
@@ -328,7 +328,7 @@ class AdditionalPropertiesClass(object):
:param anytype_3: The anytype_3 of this AdditionalPropertiesClass. # noqa: E501
- :type: object
+ :type anytype_3: object
"""
self._anytype_3 = anytype_3
diff --git a/samples/client/petstore/python/petstore_api/models/additional_properties_integer.py b/samples/client/petstore/python/petstore_api/models/additional_properties_integer.py
index ddbb85fdf33..5c3ebf230d1 100644
--- a/samples/client/petstore/python/petstore_api/models/additional_properties_integer.py
+++ b/samples/client/petstore/python/petstore_api/models/additional_properties_integer.py
@@ -68,7 +68,7 @@ class AdditionalPropertiesInteger(object):
:param name: The name of this AdditionalPropertiesInteger. # noqa: E501
- :type: str
+ :type name: str
"""
self._name = name
diff --git a/samples/client/petstore/python/petstore_api/models/additional_properties_number.py b/samples/client/petstore/python/petstore_api/models/additional_properties_number.py
index 8bbeda83ecc..0e7f34ed329 100644
--- a/samples/client/petstore/python/petstore_api/models/additional_properties_number.py
+++ b/samples/client/petstore/python/petstore_api/models/additional_properties_number.py
@@ -68,7 +68,7 @@ class AdditionalPropertiesNumber(object):
:param name: The name of this AdditionalPropertiesNumber. # noqa: E501
- :type: str
+ :type name: str
"""
self._name = name
diff --git a/samples/client/petstore/python/petstore_api/models/additional_properties_object.py b/samples/client/petstore/python/petstore_api/models/additional_properties_object.py
index af87595b3e4..5a8ea94b929 100644
--- a/samples/client/petstore/python/petstore_api/models/additional_properties_object.py
+++ b/samples/client/petstore/python/petstore_api/models/additional_properties_object.py
@@ -68,7 +68,7 @@ class AdditionalPropertiesObject(object):
:param name: The name of this AdditionalPropertiesObject. # noqa: E501
- :type: str
+ :type name: str
"""
self._name = name
diff --git a/samples/client/petstore/python/petstore_api/models/additional_properties_string.py b/samples/client/petstore/python/petstore_api/models/additional_properties_string.py
index 6ab2c91feda..8436a1e345b 100644
--- a/samples/client/petstore/python/petstore_api/models/additional_properties_string.py
+++ b/samples/client/petstore/python/petstore_api/models/additional_properties_string.py
@@ -68,7 +68,7 @@ class AdditionalPropertiesString(object):
:param name: The name of this AdditionalPropertiesString. # noqa: E501
- :type: str
+ :type name: str
"""
self._name = name
diff --git a/samples/client/petstore/python/petstore_api/models/animal.py b/samples/client/petstore/python/petstore_api/models/animal.py
index b338e0eb18e..eef35ab093a 100644
--- a/samples/client/petstore/python/petstore_api/models/animal.py
+++ b/samples/client/petstore/python/petstore_api/models/animal.py
@@ -78,7 +78,7 @@ class Animal(object):
:param class_name: The class_name of this Animal. # noqa: E501
- :type: str
+ :type class_name: str
"""
if self.local_vars_configuration.client_side_validation and class_name is None: # noqa: E501
raise ValueError("Invalid value for `class_name`, must not be `None`") # noqa: E501
@@ -101,7 +101,7 @@ class Animal(object):
:param color: The color of this Animal. # noqa: E501
- :type: str
+ :type color: str
"""
self._color = color
diff --git a/samples/client/petstore/python/petstore_api/models/api_response.py b/samples/client/petstore/python/petstore_api/models/api_response.py
index 24e80d02aea..8cb64673c35 100644
--- a/samples/client/petstore/python/petstore_api/models/api_response.py
+++ b/samples/client/petstore/python/petstore_api/models/api_response.py
@@ -78,7 +78,7 @@ class ApiResponse(object):
:param code: The code of this ApiResponse. # noqa: E501
- :type: int
+ :type code: int
"""
self._code = code
@@ -99,7 +99,7 @@ class ApiResponse(object):
:param type: The type of this ApiResponse. # noqa: E501
- :type: str
+ :type type: str
"""
self._type = type
@@ -120,7 +120,7 @@ class ApiResponse(object):
:param message: The message of this ApiResponse. # noqa: E501
- :type: str
+ :type message: str
"""
self._message = message
diff --git a/samples/client/petstore/python/petstore_api/models/array_of_array_of_number_only.py b/samples/client/petstore/python/petstore_api/models/array_of_array_of_number_only.py
index 1f654452077..41a689c534a 100644
--- a/samples/client/petstore/python/petstore_api/models/array_of_array_of_number_only.py
+++ b/samples/client/petstore/python/petstore_api/models/array_of_array_of_number_only.py
@@ -68,7 +68,7 @@ class ArrayOfArrayOfNumberOnly(object):
:param array_array_number: The array_array_number of this ArrayOfArrayOfNumberOnly. # noqa: E501
- :type: list[list[float]]
+ :type array_array_number: list[list[float]]
"""
self._array_array_number = array_array_number
diff --git a/samples/client/petstore/python/petstore_api/models/array_of_number_only.py b/samples/client/petstore/python/petstore_api/models/array_of_number_only.py
index 27ba1f58e31..ddb7f7c7abe 100644
--- a/samples/client/petstore/python/petstore_api/models/array_of_number_only.py
+++ b/samples/client/petstore/python/petstore_api/models/array_of_number_only.py
@@ -68,7 +68,7 @@ class ArrayOfNumberOnly(object):
:param array_number: The array_number of this ArrayOfNumberOnly. # noqa: E501
- :type: list[float]
+ :type array_number: list[float]
"""
self._array_number = array_number
diff --git a/samples/client/petstore/python/petstore_api/models/array_test.py b/samples/client/petstore/python/petstore_api/models/array_test.py
index f34a372f6f3..e8e5c378f98 100644
--- a/samples/client/petstore/python/petstore_api/models/array_test.py
+++ b/samples/client/petstore/python/petstore_api/models/array_test.py
@@ -78,7 +78,7 @@ class ArrayTest(object):
:param array_of_string: The array_of_string of this ArrayTest. # noqa: E501
- :type: list[str]
+ :type array_of_string: list[str]
"""
self._array_of_string = array_of_string
@@ -99,7 +99,7 @@ class ArrayTest(object):
:param array_array_of_integer: The array_array_of_integer of this ArrayTest. # noqa: E501
- :type: list[list[int]]
+ :type array_array_of_integer: list[list[int]]
"""
self._array_array_of_integer = array_array_of_integer
@@ -120,7 +120,7 @@ class ArrayTest(object):
:param array_array_of_model: The array_array_of_model of this ArrayTest. # noqa: E501
- :type: list[list[ReadOnlyFirst]]
+ :type array_array_of_model: list[list[ReadOnlyFirst]]
"""
self._array_array_of_model = array_array_of_model
diff --git a/samples/client/petstore/python/petstore_api/models/big_cat.py b/samples/client/petstore/python/petstore_api/models/big_cat.py
index fe52c3650ac..946981f5b7f 100644
--- a/samples/client/petstore/python/petstore_api/models/big_cat.py
+++ b/samples/client/petstore/python/petstore_api/models/big_cat.py
@@ -68,7 +68,7 @@ class BigCat(object):
:param kind: The kind of this BigCat. # noqa: E501
- :type: str
+ :type kind: str
"""
allowed_values = ["lions", "tigers", "leopards", "jaguars"] # noqa: E501
if self.local_vars_configuration.client_side_validation and kind not in allowed_values: # noqa: E501
diff --git a/samples/client/petstore/python/petstore_api/models/big_cat_all_of.py b/samples/client/petstore/python/petstore_api/models/big_cat_all_of.py
index b75500db987..41c205d2576 100644
--- a/samples/client/petstore/python/petstore_api/models/big_cat_all_of.py
+++ b/samples/client/petstore/python/petstore_api/models/big_cat_all_of.py
@@ -68,7 +68,7 @@ class BigCatAllOf(object):
:param kind: The kind of this BigCatAllOf. # noqa: E501
- :type: str
+ :type kind: str
"""
allowed_values = ["lions", "tigers", "leopards", "jaguars"] # noqa: E501
if self.local_vars_configuration.client_side_validation and kind not in allowed_values: # noqa: E501
diff --git a/samples/client/petstore/python/petstore_api/models/capitalization.py b/samples/client/petstore/python/petstore_api/models/capitalization.py
index cef34c5f6dc..967d324a0ab 100644
--- a/samples/client/petstore/python/petstore_api/models/capitalization.py
+++ b/samples/client/petstore/python/petstore_api/models/capitalization.py
@@ -93,7 +93,7 @@ class Capitalization(object):
:param small_camel: The small_camel of this Capitalization. # noqa: E501
- :type: str
+ :type small_camel: str
"""
self._small_camel = small_camel
@@ -114,7 +114,7 @@ class Capitalization(object):
:param capital_camel: The capital_camel of this Capitalization. # noqa: E501
- :type: str
+ :type capital_camel: str
"""
self._capital_camel = capital_camel
@@ -135,7 +135,7 @@ class Capitalization(object):
:param small_snake: The small_snake of this Capitalization. # noqa: E501
- :type: str
+ :type small_snake: str
"""
self._small_snake = small_snake
@@ -156,7 +156,7 @@ class Capitalization(object):
:param capital_snake: The capital_snake of this Capitalization. # noqa: E501
- :type: str
+ :type capital_snake: str
"""
self._capital_snake = capital_snake
@@ -177,7 +177,7 @@ class Capitalization(object):
:param sca_eth_flow_points: The sca_eth_flow_points of this Capitalization. # noqa: E501
- :type: str
+ :type sca_eth_flow_points: str
"""
self._sca_eth_flow_points = sca_eth_flow_points
@@ -200,7 +200,7 @@ class Capitalization(object):
Name of the pet # noqa: E501
:param att_name: The att_name of this Capitalization. # noqa: E501
- :type: str
+ :type att_name: str
"""
self._att_name = att_name
diff --git a/samples/client/petstore/python/petstore_api/models/cat.py b/samples/client/petstore/python/petstore_api/models/cat.py
index e39c1c82508..b3b0d868c7f 100644
--- a/samples/client/petstore/python/petstore_api/models/cat.py
+++ b/samples/client/petstore/python/petstore_api/models/cat.py
@@ -68,7 +68,7 @@ class Cat(object):
:param declawed: The declawed of this Cat. # noqa: E501
- :type: bool
+ :type declawed: bool
"""
self._declawed = declawed
diff --git a/samples/client/petstore/python/petstore_api/models/cat_all_of.py b/samples/client/petstore/python/petstore_api/models/cat_all_of.py
index 7e90fab9348..f573a04636c 100644
--- a/samples/client/petstore/python/petstore_api/models/cat_all_of.py
+++ b/samples/client/petstore/python/petstore_api/models/cat_all_of.py
@@ -68,7 +68,7 @@ class CatAllOf(object):
:param declawed: The declawed of this CatAllOf. # noqa: E501
- :type: bool
+ :type declawed: bool
"""
self._declawed = declawed
diff --git a/samples/client/petstore/python/petstore_api/models/category.py b/samples/client/petstore/python/petstore_api/models/category.py
index b47c148953e..11a7bf85f3a 100644
--- a/samples/client/petstore/python/petstore_api/models/category.py
+++ b/samples/client/petstore/python/petstore_api/models/category.py
@@ -72,7 +72,7 @@ class Category(object):
:param id: The id of this Category. # noqa: E501
- :type: int
+ :type id: int
"""
self._id = id
@@ -93,7 +93,7 @@ class Category(object):
:param name: The name of this Category. # noqa: E501
- :type: str
+ :type name: str
"""
if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501
raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501
diff --git a/samples/client/petstore/python/petstore_api/models/class_model.py b/samples/client/petstore/python/petstore_api/models/class_model.py
index ef6060ffa70..aac505ea064 100644
--- a/samples/client/petstore/python/petstore_api/models/class_model.py
+++ b/samples/client/petstore/python/petstore_api/models/class_model.py
@@ -68,7 +68,7 @@ class ClassModel(object):
:param _class: The _class of this ClassModel. # noqa: E501
- :type: str
+ :type _class: str
"""
self.__class = _class
diff --git a/samples/client/petstore/python/petstore_api/models/client.py b/samples/client/petstore/python/petstore_api/models/client.py
index ee5dbf1c43a..2006350b210 100644
--- a/samples/client/petstore/python/petstore_api/models/client.py
+++ b/samples/client/petstore/python/petstore_api/models/client.py
@@ -68,7 +68,7 @@ class Client(object):
:param client: The client of this Client. # noqa: E501
- :type: str
+ :type client: str
"""
self._client = client
diff --git a/samples/client/petstore/python/petstore_api/models/dog.py b/samples/client/petstore/python/petstore_api/models/dog.py
index eacb63eedb0..fb9024d0bb7 100644
--- a/samples/client/petstore/python/petstore_api/models/dog.py
+++ b/samples/client/petstore/python/petstore_api/models/dog.py
@@ -68,7 +68,7 @@ class Dog(object):
:param breed: The breed of this Dog. # noqa: E501
- :type: str
+ :type breed: str
"""
self._breed = breed
diff --git a/samples/client/petstore/python/petstore_api/models/dog_all_of.py b/samples/client/petstore/python/petstore_api/models/dog_all_of.py
index 48e04855708..5943ba900dd 100644
--- a/samples/client/petstore/python/petstore_api/models/dog_all_of.py
+++ b/samples/client/petstore/python/petstore_api/models/dog_all_of.py
@@ -68,7 +68,7 @@ class DogAllOf(object):
:param breed: The breed of this DogAllOf. # noqa: E501
- :type: str
+ :type breed: str
"""
self._breed = breed
diff --git a/samples/client/petstore/python/petstore_api/models/enum_arrays.py b/samples/client/petstore/python/petstore_api/models/enum_arrays.py
index 819ff322157..ae2ea1d4251 100644
--- a/samples/client/petstore/python/petstore_api/models/enum_arrays.py
+++ b/samples/client/petstore/python/petstore_api/models/enum_arrays.py
@@ -73,7 +73,7 @@ class EnumArrays(object):
:param just_symbol: The just_symbol of this EnumArrays. # noqa: E501
- :type: str
+ :type just_symbol: str
"""
allowed_values = [">=", "$"] # noqa: E501
if self.local_vars_configuration.client_side_validation and just_symbol not in allowed_values: # noqa: E501
@@ -100,7 +100,7 @@ class EnumArrays(object):
:param array_enum: The array_enum of this EnumArrays. # noqa: E501
- :type: list[str]
+ :type array_enum: list[str]
"""
allowed_values = ["fish", "crab"] # noqa: E501
if (self.local_vars_configuration.client_side_validation and
diff --git a/samples/client/petstore/python/petstore_api/models/enum_test.py b/samples/client/petstore/python/petstore_api/models/enum_test.py
index 464281b3ec0..e9872c4d005 100644
--- a/samples/client/petstore/python/petstore_api/models/enum_test.py
+++ b/samples/client/petstore/python/petstore_api/models/enum_test.py
@@ -87,7 +87,7 @@ class EnumTest(object):
:param enum_string: The enum_string of this EnumTest. # noqa: E501
- :type: str
+ :type enum_string: str
"""
allowed_values = ["UPPER", "lower", ""] # noqa: E501
if self.local_vars_configuration.client_side_validation and enum_string not in allowed_values: # noqa: E501
@@ -114,7 +114,7 @@ class EnumTest(object):
:param enum_string_required: The enum_string_required of this EnumTest. # noqa: E501
- :type: str
+ :type enum_string_required: str
"""
if self.local_vars_configuration.client_side_validation and enum_string_required is None: # noqa: E501
raise ValueError("Invalid value for `enum_string_required`, must not be `None`") # noqa: E501
@@ -143,7 +143,7 @@ class EnumTest(object):
:param enum_integer: The enum_integer of this EnumTest. # noqa: E501
- :type: int
+ :type enum_integer: int
"""
allowed_values = [1, -1] # noqa: E501
if self.local_vars_configuration.client_side_validation and enum_integer not in allowed_values: # noqa: E501
@@ -170,7 +170,7 @@ class EnumTest(object):
:param enum_number: The enum_number of this EnumTest. # noqa: E501
- :type: float
+ :type enum_number: float
"""
allowed_values = [1.1, -1.2] # noqa: E501
if self.local_vars_configuration.client_side_validation and enum_number not in allowed_values: # noqa: E501
@@ -197,7 +197,7 @@ class EnumTest(object):
:param outer_enum: The outer_enum of this EnumTest. # noqa: E501
- :type: OuterEnum
+ :type outer_enum: OuterEnum
"""
self._outer_enum = outer_enum
diff --git a/samples/client/petstore/python/petstore_api/models/file.py b/samples/client/petstore/python/petstore_api/models/file.py
index 282df2957e6..4fb5c31762e 100644
--- a/samples/client/petstore/python/petstore_api/models/file.py
+++ b/samples/client/petstore/python/petstore_api/models/file.py
@@ -70,7 +70,7 @@ class File(object):
Test capitalization # noqa: E501
:param source_uri: The source_uri of this File. # noqa: E501
- :type: str
+ :type source_uri: str
"""
self._source_uri = source_uri
diff --git a/samples/client/petstore/python/petstore_api/models/file_schema_test_class.py b/samples/client/petstore/python/petstore_api/models/file_schema_test_class.py
index de7f865b47e..2f2d44a7b33 100644
--- a/samples/client/petstore/python/petstore_api/models/file_schema_test_class.py
+++ b/samples/client/petstore/python/petstore_api/models/file_schema_test_class.py
@@ -73,7 +73,7 @@ class FileSchemaTestClass(object):
:param file: The file of this FileSchemaTestClass. # noqa: E501
- :type: File
+ :type file: File
"""
self._file = file
@@ -94,7 +94,7 @@ class FileSchemaTestClass(object):
:param files: The files of this FileSchemaTestClass. # noqa: E501
- :type: list[File]
+ :type files: list[File]
"""
self._files = files
diff --git a/samples/client/petstore/python/petstore_api/models/format_test.py b/samples/client/petstore/python/petstore_api/models/format_test.py
index 6396c442f62..c96f8132fa6 100644
--- a/samples/client/petstore/python/petstore_api/models/format_test.py
+++ b/samples/client/petstore/python/petstore_api/models/format_test.py
@@ -129,7 +129,7 @@ class FormatTest(object):
:param integer: The integer of this FormatTest. # noqa: E501
- :type: int
+ :type integer: int
"""
if (self.local_vars_configuration.client_side_validation and
integer is not None and integer > 100): # noqa: E501
@@ -156,7 +156,7 @@ class FormatTest(object):
:param int32: The int32 of this FormatTest. # noqa: E501
- :type: int
+ :type int32: int
"""
if (self.local_vars_configuration.client_side_validation and
int32 is not None and int32 > 200): # noqa: E501
@@ -183,7 +183,7 @@ class FormatTest(object):
:param int64: The int64 of this FormatTest. # noqa: E501
- :type: int
+ :type int64: int
"""
self._int64 = int64
@@ -204,7 +204,7 @@ class FormatTest(object):
:param number: The number of this FormatTest. # noqa: E501
- :type: float
+ :type number: float
"""
if self.local_vars_configuration.client_side_validation and number is None: # noqa: E501
raise ValueError("Invalid value for `number`, must not be `None`") # noqa: E501
@@ -233,7 +233,7 @@ class FormatTest(object):
:param float: The float of this FormatTest. # noqa: E501
- :type: float
+ :type float: float
"""
if (self.local_vars_configuration.client_side_validation and
float is not None and float > 987.6): # noqa: E501
@@ -260,7 +260,7 @@ class FormatTest(object):
:param double: The double of this FormatTest. # noqa: E501
- :type: float
+ :type double: float
"""
if (self.local_vars_configuration.client_side_validation and
double is not None and double > 123.4): # noqa: E501
@@ -287,7 +287,7 @@ class FormatTest(object):
:param string: The string of this FormatTest. # noqa: E501
- :type: str
+ :type string: str
"""
if (self.local_vars_configuration.client_side_validation and
string is not None and not re.search(r'[a-z]', string, flags=re.IGNORECASE)): # noqa: E501
@@ -311,7 +311,7 @@ class FormatTest(object):
:param byte: The byte of this FormatTest. # noqa: E501
- :type: str
+ :type byte: str
"""
if self.local_vars_configuration.client_side_validation and byte is None: # noqa: E501
raise ValueError("Invalid value for `byte`, must not be `None`") # noqa: E501
@@ -337,7 +337,7 @@ class FormatTest(object):
:param binary: The binary of this FormatTest. # noqa: E501
- :type: file
+ :type binary: file
"""
self._binary = binary
@@ -358,7 +358,7 @@ class FormatTest(object):
:param date: The date of this FormatTest. # noqa: E501
- :type: date
+ :type date: date
"""
if self.local_vars_configuration.client_side_validation and date is None: # noqa: E501
raise ValueError("Invalid value for `date`, must not be `None`") # noqa: E501
@@ -381,7 +381,7 @@ class FormatTest(object):
:param date_time: The date_time of this FormatTest. # noqa: E501
- :type: datetime
+ :type date_time: datetime
"""
self._date_time = date_time
@@ -402,7 +402,7 @@ class FormatTest(object):
:param uuid: The uuid of this FormatTest. # noqa: E501
- :type: str
+ :type uuid: str
"""
self._uuid = uuid
@@ -423,7 +423,7 @@ class FormatTest(object):
:param password: The password of this FormatTest. # noqa: E501
- :type: str
+ :type password: str
"""
if self.local_vars_configuration.client_side_validation and password is None: # noqa: E501
raise ValueError("Invalid value for `password`, must not be `None`") # noqa: E501
@@ -452,7 +452,7 @@ class FormatTest(object):
:param big_decimal: The big_decimal of this FormatTest. # noqa: E501
- :type: BigDecimal
+ :type big_decimal: BigDecimal
"""
self._big_decimal = big_decimal
diff --git a/samples/client/petstore/python/petstore_api/models/has_only_read_only.py b/samples/client/petstore/python/petstore_api/models/has_only_read_only.py
index 5fc2f8a9ebd..fa496519ecb 100644
--- a/samples/client/petstore/python/petstore_api/models/has_only_read_only.py
+++ b/samples/client/petstore/python/petstore_api/models/has_only_read_only.py
@@ -73,7 +73,7 @@ class HasOnlyReadOnly(object):
:param bar: The bar of this HasOnlyReadOnly. # noqa: E501
- :type: str
+ :type bar: str
"""
self._bar = bar
@@ -94,7 +94,7 @@ class HasOnlyReadOnly(object):
:param foo: The foo of this HasOnlyReadOnly. # noqa: E501
- :type: str
+ :type foo: str
"""
self._foo = foo
diff --git a/samples/client/petstore/python/petstore_api/models/list.py b/samples/client/petstore/python/petstore_api/models/list.py
index d58d13e90fb..e21a220f71c 100644
--- a/samples/client/petstore/python/petstore_api/models/list.py
+++ b/samples/client/petstore/python/petstore_api/models/list.py
@@ -68,7 +68,7 @@ class List(object):
:param _123_list: The _123_list of this List. # noqa: E501
- :type: str
+ :type _123_list: str
"""
self.__123_list = _123_list
diff --git a/samples/client/petstore/python/petstore_api/models/map_test.py b/samples/client/petstore/python/petstore_api/models/map_test.py
index f0cfba5073b..8afc875ce51 100644
--- a/samples/client/petstore/python/petstore_api/models/map_test.py
+++ b/samples/client/petstore/python/petstore_api/models/map_test.py
@@ -83,7 +83,7 @@ class MapTest(object):
:param map_map_of_string: The map_map_of_string of this MapTest. # noqa: E501
- :type: dict(str, dict(str, str))
+ :type map_map_of_string: dict(str, dict(str, str))
"""
self._map_map_of_string = map_map_of_string
@@ -104,7 +104,7 @@ class MapTest(object):
:param map_of_enum_string: The map_of_enum_string of this MapTest. # noqa: E501
- :type: dict(str, str)
+ :type map_of_enum_string: dict(str, str)
"""
allowed_values = ["UPPER", "lower"] # noqa: E501
if (self.local_vars_configuration.client_side_validation and
@@ -133,7 +133,7 @@ class MapTest(object):
:param direct_map: The direct_map of this MapTest. # noqa: E501
- :type: dict(str, bool)
+ :type direct_map: dict(str, bool)
"""
self._direct_map = direct_map
@@ -154,7 +154,7 @@ class MapTest(object):
:param indirect_map: The indirect_map of this MapTest. # noqa: E501
- :type: dict(str, bool)
+ :type indirect_map: dict(str, bool)
"""
self._indirect_map = indirect_map
diff --git a/samples/client/petstore/python/petstore_api/models/mixed_properties_and_additional_properties_class.py b/samples/client/petstore/python/petstore_api/models/mixed_properties_and_additional_properties_class.py
index 5da34f8830e..8aecbf0f558 100644
--- a/samples/client/petstore/python/petstore_api/models/mixed_properties_and_additional_properties_class.py
+++ b/samples/client/petstore/python/petstore_api/models/mixed_properties_and_additional_properties_class.py
@@ -78,7 +78,7 @@ class MixedPropertiesAndAdditionalPropertiesClass(object):
:param uuid: The uuid of this MixedPropertiesAndAdditionalPropertiesClass. # noqa: E501
- :type: str
+ :type uuid: str
"""
self._uuid = uuid
@@ -99,7 +99,7 @@ class MixedPropertiesAndAdditionalPropertiesClass(object):
:param date_time: The date_time of this MixedPropertiesAndAdditionalPropertiesClass. # noqa: E501
- :type: datetime
+ :type date_time: datetime
"""
self._date_time = date_time
@@ -120,7 +120,7 @@ class MixedPropertiesAndAdditionalPropertiesClass(object):
:param map: The map of this MixedPropertiesAndAdditionalPropertiesClass. # noqa: E501
- :type: dict(str, Animal)
+ :type map: dict(str, Animal)
"""
self._map = map
diff --git a/samples/client/petstore/python/petstore_api/models/model200_response.py b/samples/client/petstore/python/petstore_api/models/model200_response.py
index 841ce1f18f3..3f4c4e2bd2a 100644
--- a/samples/client/petstore/python/petstore_api/models/model200_response.py
+++ b/samples/client/petstore/python/petstore_api/models/model200_response.py
@@ -73,7 +73,7 @@ class Model200Response(object):
:param name: The name of this Model200Response. # noqa: E501
- :type: int
+ :type name: int
"""
self._name = name
@@ -94,7 +94,7 @@ class Model200Response(object):
:param _class: The _class of this Model200Response. # noqa: E501
- :type: str
+ :type _class: str
"""
self.__class = _class
diff --git a/samples/client/petstore/python/petstore_api/models/model_return.py b/samples/client/petstore/python/petstore_api/models/model_return.py
index fdd8d72314a..1009c50ef08 100644
--- a/samples/client/petstore/python/petstore_api/models/model_return.py
+++ b/samples/client/petstore/python/petstore_api/models/model_return.py
@@ -68,7 +68,7 @@ class ModelReturn(object):
:param _return: The _return of this ModelReturn. # noqa: E501
- :type: int
+ :type _return: int
"""
self.__return = _return
diff --git a/samples/client/petstore/python/petstore_api/models/name.py b/samples/client/petstore/python/petstore_api/models/name.py
index bb2c1fbd73c..6ee8261e782 100644
--- a/samples/client/petstore/python/petstore_api/models/name.py
+++ b/samples/client/petstore/python/petstore_api/models/name.py
@@ -82,7 +82,7 @@ class Name(object):
:param name: The name of this Name. # noqa: E501
- :type: int
+ :type name: int
"""
if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501
raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501
@@ -105,7 +105,7 @@ class Name(object):
:param snake_case: The snake_case of this Name. # noqa: E501
- :type: int
+ :type snake_case: int
"""
self._snake_case = snake_case
@@ -126,7 +126,7 @@ class Name(object):
:param _property: The _property of this Name. # noqa: E501
- :type: str
+ :type _property: str
"""
self.__property = _property
@@ -147,7 +147,7 @@ class Name(object):
:param _123_number: The _123_number of this Name. # noqa: E501
- :type: int
+ :type _123_number: int
"""
self.__123_number = _123_number
diff --git a/samples/client/petstore/python/petstore_api/models/number_only.py b/samples/client/petstore/python/petstore_api/models/number_only.py
index 99b2424852f..90f09d8b7d5 100644
--- a/samples/client/petstore/python/petstore_api/models/number_only.py
+++ b/samples/client/petstore/python/petstore_api/models/number_only.py
@@ -68,7 +68,7 @@ class NumberOnly(object):
:param just_number: The just_number of this NumberOnly. # noqa: E501
- :type: float
+ :type just_number: float
"""
self._just_number = just_number
diff --git a/samples/client/petstore/python/petstore_api/models/order.py b/samples/client/petstore/python/petstore_api/models/order.py
index 8c863cce8fe..8f298aa3d9c 100644
--- a/samples/client/petstore/python/petstore_api/models/order.py
+++ b/samples/client/petstore/python/petstore_api/models/order.py
@@ -93,7 +93,7 @@ class Order(object):
:param id: The id of this Order. # noqa: E501
- :type: int
+ :type id: int
"""
self._id = id
@@ -114,7 +114,7 @@ class Order(object):
:param pet_id: The pet_id of this Order. # noqa: E501
- :type: int
+ :type pet_id: int
"""
self._pet_id = pet_id
@@ -135,7 +135,7 @@ class Order(object):
:param quantity: The quantity of this Order. # noqa: E501
- :type: int
+ :type quantity: int
"""
self._quantity = quantity
@@ -156,7 +156,7 @@ class Order(object):
:param ship_date: The ship_date of this Order. # noqa: E501
- :type: datetime
+ :type ship_date: datetime
"""
self._ship_date = ship_date
@@ -179,7 +179,7 @@ class Order(object):
Order Status # noqa: E501
:param status: The status of this Order. # noqa: E501
- :type: str
+ :type status: str
"""
allowed_values = ["placed", "approved", "delivered"] # noqa: E501
if self.local_vars_configuration.client_side_validation and status not in allowed_values: # noqa: E501
@@ -206,7 +206,7 @@ class Order(object):
:param complete: The complete of this Order. # noqa: E501
- :type: bool
+ :type complete: bool
"""
self._complete = complete
diff --git a/samples/client/petstore/python/petstore_api/models/outer_composite.py b/samples/client/petstore/python/petstore_api/models/outer_composite.py
index c11859114a5..85fe36c7ef0 100644
--- a/samples/client/petstore/python/petstore_api/models/outer_composite.py
+++ b/samples/client/petstore/python/petstore_api/models/outer_composite.py
@@ -78,7 +78,7 @@ class OuterComposite(object):
:param my_number: The my_number of this OuterComposite. # noqa: E501
- :type: float
+ :type my_number: float
"""
self._my_number = my_number
@@ -99,7 +99,7 @@ class OuterComposite(object):
:param my_string: The my_string of this OuterComposite. # noqa: E501
- :type: str
+ :type my_string: str
"""
self._my_string = my_string
@@ -120,7 +120,7 @@ class OuterComposite(object):
:param my_boolean: The my_boolean of this OuterComposite. # noqa: E501
- :type: bool
+ :type my_boolean: bool
"""
self._my_boolean = my_boolean
diff --git a/samples/client/petstore/python/petstore_api/models/pet.py b/samples/client/petstore/python/petstore_api/models/pet.py
index edbf73f5312..b948a6436db 100644
--- a/samples/client/petstore/python/petstore_api/models/pet.py
+++ b/samples/client/petstore/python/petstore_api/models/pet.py
@@ -91,7 +91,7 @@ class Pet(object):
:param id: The id of this Pet. # noqa: E501
- :type: int
+ :type id: int
"""
self._id = id
@@ -112,7 +112,7 @@ class Pet(object):
:param category: The category of this Pet. # noqa: E501
- :type: Category
+ :type category: Category
"""
self._category = category
@@ -133,7 +133,7 @@ class Pet(object):
:param name: The name of this Pet. # noqa: E501
- :type: str
+ :type name: str
"""
if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501
raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501
@@ -156,7 +156,7 @@ class Pet(object):
:param photo_urls: The photo_urls of this Pet. # noqa: E501
- :type: list[str]
+ :type photo_urls: list[str]
"""
if self.local_vars_configuration.client_side_validation and photo_urls is None: # noqa: E501
raise ValueError("Invalid value for `photo_urls`, must not be `None`") # noqa: E501
@@ -179,7 +179,7 @@ class Pet(object):
:param tags: The tags of this Pet. # noqa: E501
- :type: list[Tag]
+ :type tags: list[Tag]
"""
self._tags = tags
@@ -202,7 +202,7 @@ class Pet(object):
pet status in the store # noqa: E501
:param status: The status of this Pet. # noqa: E501
- :type: str
+ :type status: str
"""
allowed_values = ["available", "pending", "sold"] # noqa: E501
if self.local_vars_configuration.client_side_validation and status not in allowed_values: # noqa: E501
diff --git a/samples/client/petstore/python/petstore_api/models/read_only_first.py b/samples/client/petstore/python/petstore_api/models/read_only_first.py
index a84679e98de..3a305087dc2 100644
--- a/samples/client/petstore/python/petstore_api/models/read_only_first.py
+++ b/samples/client/petstore/python/petstore_api/models/read_only_first.py
@@ -73,7 +73,7 @@ class ReadOnlyFirst(object):
:param bar: The bar of this ReadOnlyFirst. # noqa: E501
- :type: str
+ :type bar: str
"""
self._bar = bar
@@ -94,7 +94,7 @@ class ReadOnlyFirst(object):
:param baz: The baz of this ReadOnlyFirst. # noqa: E501
- :type: str
+ :type baz: str
"""
self._baz = baz
diff --git a/samples/client/petstore/python/petstore_api/models/special_model_name.py b/samples/client/petstore/python/petstore_api/models/special_model_name.py
index 396e75bcee5..d2535eb65ac 100644
--- a/samples/client/petstore/python/petstore_api/models/special_model_name.py
+++ b/samples/client/petstore/python/petstore_api/models/special_model_name.py
@@ -68,7 +68,7 @@ class SpecialModelName(object):
:param special_property_name: The special_property_name of this SpecialModelName. # noqa: E501
- :type: int
+ :type special_property_name: int
"""
self._special_property_name = special_property_name
diff --git a/samples/client/petstore/python/petstore_api/models/tag.py b/samples/client/petstore/python/petstore_api/models/tag.py
index d6137fdd47f..7492d30d9eb 100644
--- a/samples/client/petstore/python/petstore_api/models/tag.py
+++ b/samples/client/petstore/python/petstore_api/models/tag.py
@@ -73,7 +73,7 @@ class Tag(object):
:param id: The id of this Tag. # noqa: E501
- :type: int
+ :type id: int
"""
self._id = id
@@ -94,7 +94,7 @@ class Tag(object):
:param name: The name of this Tag. # noqa: E501
- :type: str
+ :type name: str
"""
self._name = name
diff --git a/samples/client/petstore/python/petstore_api/models/type_holder_default.py b/samples/client/petstore/python/petstore_api/models/type_holder_default.py
index 8163ea77aa7..fbef6b4b157 100644
--- a/samples/client/petstore/python/petstore_api/models/type_holder_default.py
+++ b/samples/client/petstore/python/petstore_api/models/type_holder_default.py
@@ -83,7 +83,7 @@ class TypeHolderDefault(object):
:param string_item: The string_item of this TypeHolderDefault. # noqa: E501
- :type: str
+ :type string_item: str
"""
if self.local_vars_configuration.client_side_validation and string_item is None: # noqa: E501
raise ValueError("Invalid value for `string_item`, must not be `None`") # noqa: E501
@@ -106,7 +106,7 @@ class TypeHolderDefault(object):
:param number_item: The number_item of this TypeHolderDefault. # noqa: E501
- :type: float
+ :type number_item: float
"""
if self.local_vars_configuration.client_side_validation and number_item is None: # noqa: E501
raise ValueError("Invalid value for `number_item`, must not be `None`") # noqa: E501
@@ -129,7 +129,7 @@ class TypeHolderDefault(object):
:param integer_item: The integer_item of this TypeHolderDefault. # noqa: E501
- :type: int
+ :type integer_item: int
"""
if self.local_vars_configuration.client_side_validation and integer_item is None: # noqa: E501
raise ValueError("Invalid value for `integer_item`, must not be `None`") # noqa: E501
@@ -152,7 +152,7 @@ class TypeHolderDefault(object):
:param bool_item: The bool_item of this TypeHolderDefault. # noqa: E501
- :type: bool
+ :type bool_item: bool
"""
if self.local_vars_configuration.client_side_validation and bool_item is None: # noqa: E501
raise ValueError("Invalid value for `bool_item`, must not be `None`") # noqa: E501
@@ -175,7 +175,7 @@ class TypeHolderDefault(object):
:param array_item: The array_item of this TypeHolderDefault. # noqa: E501
- :type: list[int]
+ :type array_item: list[int]
"""
if self.local_vars_configuration.client_side_validation and array_item is None: # noqa: E501
raise ValueError("Invalid value for `array_item`, must not be `None`") # noqa: E501
diff --git a/samples/client/petstore/python/petstore_api/models/type_holder_example.py b/samples/client/petstore/python/petstore_api/models/type_holder_example.py
index 34481fd21e3..b7320bed0ca 100644
--- a/samples/client/petstore/python/petstore_api/models/type_holder_example.py
+++ b/samples/client/petstore/python/petstore_api/models/type_holder_example.py
@@ -87,7 +87,7 @@ class TypeHolderExample(object):
:param string_item: The string_item of this TypeHolderExample. # noqa: E501
- :type: str
+ :type string_item: str
"""
if self.local_vars_configuration.client_side_validation and string_item is None: # noqa: E501
raise ValueError("Invalid value for `string_item`, must not be `None`") # noqa: E501
@@ -110,7 +110,7 @@ class TypeHolderExample(object):
:param number_item: The number_item of this TypeHolderExample. # noqa: E501
- :type: float
+ :type number_item: float
"""
if self.local_vars_configuration.client_side_validation and number_item is None: # noqa: E501
raise ValueError("Invalid value for `number_item`, must not be `None`") # noqa: E501
@@ -133,7 +133,7 @@ class TypeHolderExample(object):
:param float_item: The float_item of this TypeHolderExample. # noqa: E501
- :type: float
+ :type float_item: float
"""
if self.local_vars_configuration.client_side_validation and float_item is None: # noqa: E501
raise ValueError("Invalid value for `float_item`, must not be `None`") # noqa: E501
@@ -156,7 +156,7 @@ class TypeHolderExample(object):
:param integer_item: The integer_item of this TypeHolderExample. # noqa: E501
- :type: int
+ :type integer_item: int
"""
if self.local_vars_configuration.client_side_validation and integer_item is None: # noqa: E501
raise ValueError("Invalid value for `integer_item`, must not be `None`") # noqa: E501
@@ -179,7 +179,7 @@ class TypeHolderExample(object):
:param bool_item: The bool_item of this TypeHolderExample. # noqa: E501
- :type: bool
+ :type bool_item: bool
"""
if self.local_vars_configuration.client_side_validation and bool_item is None: # noqa: E501
raise ValueError("Invalid value for `bool_item`, must not be `None`") # noqa: E501
@@ -202,7 +202,7 @@ class TypeHolderExample(object):
:param array_item: The array_item of this TypeHolderExample. # noqa: E501
- :type: list[int]
+ :type array_item: list[int]
"""
if self.local_vars_configuration.client_side_validation and array_item is None: # noqa: E501
raise ValueError("Invalid value for `array_item`, must not be `None`") # noqa: E501
diff --git a/samples/client/petstore/python/petstore_api/models/user.py b/samples/client/petstore/python/petstore_api/models/user.py
index de88bda4cde..0e25f9f1710 100644
--- a/samples/client/petstore/python/petstore_api/models/user.py
+++ b/samples/client/petstore/python/petstore_api/models/user.py
@@ -103,7 +103,7 @@ class User(object):
:param id: The id of this User. # noqa: E501
- :type: int
+ :type id: int
"""
self._id = id
@@ -124,7 +124,7 @@ class User(object):
:param username: The username of this User. # noqa: E501
- :type: str
+ :type username: str
"""
self._username = username
@@ -145,7 +145,7 @@ class User(object):
:param first_name: The first_name of this User. # noqa: E501
- :type: str
+ :type first_name: str
"""
self._first_name = first_name
@@ -166,7 +166,7 @@ class User(object):
:param last_name: The last_name of this User. # noqa: E501
- :type: str
+ :type last_name: str
"""
self._last_name = last_name
@@ -187,7 +187,7 @@ class User(object):
:param email: The email of this User. # noqa: E501
- :type: str
+ :type email: str
"""
self._email = email
@@ -208,7 +208,7 @@ class User(object):
:param password: The password of this User. # noqa: E501
- :type: str
+ :type password: str
"""
self._password = password
@@ -229,7 +229,7 @@ class User(object):
:param phone: The phone of this User. # noqa: E501
- :type: str
+ :type phone: str
"""
self._phone = phone
@@ -252,7 +252,7 @@ class User(object):
User Status # noqa: E501
:param user_status: The user_status of this User. # noqa: E501
- :type: int
+ :type user_status: int
"""
self._user_status = user_status
diff --git a/samples/client/petstore/python/petstore_api/models/xml_item.py b/samples/client/petstore/python/petstore_api/models/xml_item.py
index 52ecc9aa522..afb75967cb0 100644
--- a/samples/client/petstore/python/petstore_api/models/xml_item.py
+++ b/samples/client/petstore/python/petstore_api/models/xml_item.py
@@ -208,7 +208,7 @@ class XmlItem(object):
:param attribute_string: The attribute_string of this XmlItem. # noqa: E501
- :type: str
+ :type attribute_string: str
"""
self._attribute_string = attribute_string
@@ -229,7 +229,7 @@ class XmlItem(object):
:param attribute_number: The attribute_number of this XmlItem. # noqa: E501
- :type: float
+ :type attribute_number: float
"""
self._attribute_number = attribute_number
@@ -250,7 +250,7 @@ class XmlItem(object):
:param attribute_integer: The attribute_integer of this XmlItem. # noqa: E501
- :type: int
+ :type attribute_integer: int
"""
self._attribute_integer = attribute_integer
@@ -271,7 +271,7 @@ class XmlItem(object):
:param attribute_boolean: The attribute_boolean of this XmlItem. # noqa: E501
- :type: bool
+ :type attribute_boolean: bool
"""
self._attribute_boolean = attribute_boolean
@@ -292,7 +292,7 @@ class XmlItem(object):
:param wrapped_array: The wrapped_array of this XmlItem. # noqa: E501
- :type: list[int]
+ :type wrapped_array: list[int]
"""
self._wrapped_array = wrapped_array
@@ -313,7 +313,7 @@ class XmlItem(object):
:param name_string: The name_string of this XmlItem. # noqa: E501
- :type: str
+ :type name_string: str
"""
self._name_string = name_string
@@ -334,7 +334,7 @@ class XmlItem(object):
:param name_number: The name_number of this XmlItem. # noqa: E501
- :type: float
+ :type name_number: float
"""
self._name_number = name_number
@@ -355,7 +355,7 @@ class XmlItem(object):
:param name_integer: The name_integer of this XmlItem. # noqa: E501
- :type: int
+ :type name_integer: int
"""
self._name_integer = name_integer
@@ -376,7 +376,7 @@ class XmlItem(object):
:param name_boolean: The name_boolean of this XmlItem. # noqa: E501
- :type: bool
+ :type name_boolean: bool
"""
self._name_boolean = name_boolean
@@ -397,7 +397,7 @@ class XmlItem(object):
:param name_array: The name_array of this XmlItem. # noqa: E501
- :type: list[int]
+ :type name_array: list[int]
"""
self._name_array = name_array
@@ -418,7 +418,7 @@ class XmlItem(object):
:param name_wrapped_array: The name_wrapped_array of this XmlItem. # noqa: E501
- :type: list[int]
+ :type name_wrapped_array: list[int]
"""
self._name_wrapped_array = name_wrapped_array
@@ -439,7 +439,7 @@ class XmlItem(object):
:param prefix_string: The prefix_string of this XmlItem. # noqa: E501
- :type: str
+ :type prefix_string: str
"""
self._prefix_string = prefix_string
@@ -460,7 +460,7 @@ class XmlItem(object):
:param prefix_number: The prefix_number of this XmlItem. # noqa: E501
- :type: float
+ :type prefix_number: float
"""
self._prefix_number = prefix_number
@@ -481,7 +481,7 @@ class XmlItem(object):
:param prefix_integer: The prefix_integer of this XmlItem. # noqa: E501
- :type: int
+ :type prefix_integer: int
"""
self._prefix_integer = prefix_integer
@@ -502,7 +502,7 @@ class XmlItem(object):
:param prefix_boolean: The prefix_boolean of this XmlItem. # noqa: E501
- :type: bool
+ :type prefix_boolean: bool
"""
self._prefix_boolean = prefix_boolean
@@ -523,7 +523,7 @@ class XmlItem(object):
:param prefix_array: The prefix_array of this XmlItem. # noqa: E501
- :type: list[int]
+ :type prefix_array: list[int]
"""
self._prefix_array = prefix_array
@@ -544,7 +544,7 @@ class XmlItem(object):
:param prefix_wrapped_array: The prefix_wrapped_array of this XmlItem. # noqa: E501
- :type: list[int]
+ :type prefix_wrapped_array: list[int]
"""
self._prefix_wrapped_array = prefix_wrapped_array
@@ -565,7 +565,7 @@ class XmlItem(object):
:param namespace_string: The namespace_string of this XmlItem. # noqa: E501
- :type: str
+ :type namespace_string: str
"""
self._namespace_string = namespace_string
@@ -586,7 +586,7 @@ class XmlItem(object):
:param namespace_number: The namespace_number of this XmlItem. # noqa: E501
- :type: float
+ :type namespace_number: float
"""
self._namespace_number = namespace_number
@@ -607,7 +607,7 @@ class XmlItem(object):
:param namespace_integer: The namespace_integer of this XmlItem. # noqa: E501
- :type: int
+ :type namespace_integer: int
"""
self._namespace_integer = namespace_integer
@@ -628,7 +628,7 @@ class XmlItem(object):
:param namespace_boolean: The namespace_boolean of this XmlItem. # noqa: E501
- :type: bool
+ :type namespace_boolean: bool
"""
self._namespace_boolean = namespace_boolean
@@ -649,7 +649,7 @@ class XmlItem(object):
:param namespace_array: The namespace_array of this XmlItem. # noqa: E501
- :type: list[int]
+ :type namespace_array: list[int]
"""
self._namespace_array = namespace_array
@@ -670,7 +670,7 @@ class XmlItem(object):
:param namespace_wrapped_array: The namespace_wrapped_array of this XmlItem. # noqa: E501
- :type: list[int]
+ :type namespace_wrapped_array: list[int]
"""
self._namespace_wrapped_array = namespace_wrapped_array
@@ -691,7 +691,7 @@ class XmlItem(object):
:param prefix_ns_string: The prefix_ns_string of this XmlItem. # noqa: E501
- :type: str
+ :type prefix_ns_string: str
"""
self._prefix_ns_string = prefix_ns_string
@@ -712,7 +712,7 @@ class XmlItem(object):
:param prefix_ns_number: The prefix_ns_number of this XmlItem. # noqa: E501
- :type: float
+ :type prefix_ns_number: float
"""
self._prefix_ns_number = prefix_ns_number
@@ -733,7 +733,7 @@ class XmlItem(object):
:param prefix_ns_integer: The prefix_ns_integer of this XmlItem. # noqa: E501
- :type: int
+ :type prefix_ns_integer: int
"""
self._prefix_ns_integer = prefix_ns_integer
@@ -754,7 +754,7 @@ class XmlItem(object):
:param prefix_ns_boolean: The prefix_ns_boolean of this XmlItem. # noqa: E501
- :type: bool
+ :type prefix_ns_boolean: bool
"""
self._prefix_ns_boolean = prefix_ns_boolean
@@ -775,7 +775,7 @@ class XmlItem(object):
:param prefix_ns_array: The prefix_ns_array of this XmlItem. # noqa: E501
- :type: list[int]
+ :type prefix_ns_array: list[int]
"""
self._prefix_ns_array = prefix_ns_array
@@ -796,7 +796,7 @@ class XmlItem(object):
:param prefix_ns_wrapped_array: The prefix_ns_wrapped_array of this XmlItem. # noqa: E501
- :type: list[int]
+ :type prefix_ns_wrapped_array: list[int]
"""
self._prefix_ns_wrapped_array = prefix_ns_wrapped_array
diff --git a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/configuration/ClientConfiguration.java b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/configuration/ClientConfiguration.java
index ae8ce0ea3f6..8f503c9cf22 100644
--- a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/configuration/ClientConfiguration.java
+++ b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/configuration/ClientConfiguration.java
@@ -8,6 +8,7 @@ import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.cloud.security.oauth2.client.feign.OAuth2FeignRequestInterceptor;
import org.springframework.security.oauth2.client.DefaultOAuth2ClientContext;
+import org.springframework.security.oauth2.client.OAuth2ClientContext;
import org.springframework.security.oauth2.client.token.grant.implicit.ImplicitResourceDetails;
@Configuration
@@ -25,8 +26,14 @@ public class ClientConfiguration {
@Bean
@ConditionalOnProperty("openapipetstore.security.petstoreAuth.client-id")
- public OAuth2FeignRequestInterceptor petstoreAuthRequestInterceptor() {
- return new OAuth2FeignRequestInterceptor(new DefaultOAuth2ClientContext(), petstoreAuthResourceDetails());
+ public OAuth2FeignRequestInterceptor petstoreAuthRequestInterceptor(OAuth2ClientContext oAuth2ClientContext) {
+ return new OAuth2FeignRequestInterceptor(oAuth2ClientContext, petstoreAuthResourceDetails());
+ }
+
+ @Bean
+ @ConditionalOnProperty("openapipetstore.security.petstoreAuth.client-id")
+ public OAuth2ClientContext oAuth2ClientContext() {
+ return new DefaultOAuth2ClientContext();
}
@Bean
diff --git a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/configuration/ClientConfiguration.java b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/configuration/ClientConfiguration.java
index ae8ce0ea3f6..8f503c9cf22 100644
--- a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/configuration/ClientConfiguration.java
+++ b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/configuration/ClientConfiguration.java
@@ -8,6 +8,7 @@ import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.cloud.security.oauth2.client.feign.OAuth2FeignRequestInterceptor;
import org.springframework.security.oauth2.client.DefaultOAuth2ClientContext;
+import org.springframework.security.oauth2.client.OAuth2ClientContext;
import org.springframework.security.oauth2.client.token.grant.implicit.ImplicitResourceDetails;
@Configuration
@@ -25,8 +26,14 @@ public class ClientConfiguration {
@Bean
@ConditionalOnProperty("openapipetstore.security.petstoreAuth.client-id")
- public OAuth2FeignRequestInterceptor petstoreAuthRequestInterceptor() {
- return new OAuth2FeignRequestInterceptor(new DefaultOAuth2ClientContext(), petstoreAuthResourceDetails());
+ public OAuth2FeignRequestInterceptor petstoreAuthRequestInterceptor(OAuth2ClientContext oAuth2ClientContext) {
+ return new OAuth2FeignRequestInterceptor(oAuth2ClientContext, petstoreAuthResourceDetails());
+ }
+
+ @Bean
+ @ConditionalOnProperty("openapipetstore.security.petstoreAuth.client-id")
+ public OAuth2ClientContext oAuth2ClientContext() {
+ return new DefaultOAuth2ClientContext();
}
@Bean
diff --git a/samples/client/petstore/typescript-rxjs/builds/default/apis/PetApi.ts b/samples/client/petstore/typescript-rxjs/builds/default/apis/PetApi.ts
index 3b3232c44db..021781fd7ab 100644
--- a/samples/client/petstore/typescript-rxjs/builds/default/apis/PetApi.ts
+++ b/samples/client/petstore/typescript-rxjs/builds/default/apis/PetApi.ts
@@ -64,7 +64,7 @@ export class PetApi extends BaseAPI {
* Add a new pet to the store
*/
addPet = ({ body }: AddPetRequest): Observable => {
- throwIfNullOrUndefined(body, 'addPet');
+ throwIfNullOrUndefined(body, 'body', 'addPet');
const headers: HttpHeaders = {
'Content-Type': 'application/json',
@@ -89,7 +89,7 @@ export class PetApi extends BaseAPI {
* Deletes a pet
*/
deletePet = ({ petId, apiKey }: DeletePetRequest): Observable => {
- throwIfNullOrUndefined(petId, 'deletePet');
+ throwIfNullOrUndefined(petId, 'petId', 'deletePet');
const headers: HttpHeaders = {
...(apiKey != null ? { 'api_key': String(apiKey) } : undefined),
@@ -114,7 +114,7 @@ export class PetApi extends BaseAPI {
* Finds Pets by status
*/
findPetsByStatus = ({ status }: FindPetsByStatusRequest): Observable> => {
- throwIfNullOrUndefined(status, 'findPetsByStatus');
+ throwIfNullOrUndefined(status, 'status', 'findPetsByStatus');
const headers: HttpHeaders = {
// oauth required
@@ -143,7 +143,7 @@ export class PetApi extends BaseAPI {
* Finds Pets by tags
*/
findPetsByTags = ({ tags }: FindPetsByTagsRequest): Observable> => {
- throwIfNullOrUndefined(tags, 'findPetsByTags');
+ throwIfNullOrUndefined(tags, 'tags', 'findPetsByTags');
const headers: HttpHeaders = {
// oauth required
@@ -172,7 +172,7 @@ export class PetApi extends BaseAPI {
* Find pet by ID
*/
getPetById = ({ petId }: GetPetByIdRequest): Observable => {
- throwIfNullOrUndefined(petId, 'getPetById');
+ throwIfNullOrUndefined(petId, 'petId', 'getPetById');
const headers: HttpHeaders = {
...(this.configuration.apiKey && { 'api_key': this.configuration.apiKey('api_key') }), // api_key authentication
@@ -189,7 +189,7 @@ export class PetApi extends BaseAPI {
* Update an existing pet
*/
updatePet = ({ body }: UpdatePetRequest): Observable => {
- throwIfNullOrUndefined(body, 'updatePet');
+ throwIfNullOrUndefined(body, 'body', 'updatePet');
const headers: HttpHeaders = {
'Content-Type': 'application/json',
@@ -214,7 +214,7 @@ export class PetApi extends BaseAPI {
* Updates a pet in the store with form data
*/
updatePetWithForm = ({ petId, name, status }: UpdatePetWithFormRequest): Observable => {
- throwIfNullOrUndefined(petId, 'updatePetWithForm');
+ throwIfNullOrUndefined(petId, 'petId', 'updatePetWithForm');
const headers: HttpHeaders = {
// oauth required
@@ -242,7 +242,7 @@ export class PetApi extends BaseAPI {
* uploads an image
*/
uploadFile = ({ petId, additionalMetadata, file }: UploadFileRequest): Observable => {
- throwIfNullOrUndefined(petId, 'uploadFile');
+ throwIfNullOrUndefined(petId, 'petId', 'uploadFile');
const headers: HttpHeaders = {
// oauth required
diff --git a/samples/client/petstore/typescript-rxjs/builds/default/apis/StoreApi.ts b/samples/client/petstore/typescript-rxjs/builds/default/apis/StoreApi.ts
index aac36206d60..8ce04d16aa0 100644
--- a/samples/client/petstore/typescript-rxjs/builds/default/apis/StoreApi.ts
+++ b/samples/client/petstore/typescript-rxjs/builds/default/apis/StoreApi.ts
@@ -39,7 +39,7 @@ export class StoreApi extends BaseAPI {
* Delete purchase order by ID
*/
deleteOrder = ({ orderId }: DeleteOrderRequest): Observable => {
- throwIfNullOrUndefined(orderId, 'deleteOrder');
+ throwIfNullOrUndefined(orderId, 'orderId', 'deleteOrder');
return this.request({
path: '/store/order/{orderId}'.replace('{orderId}', encodeURI(orderId)),
@@ -68,7 +68,7 @@ export class StoreApi extends BaseAPI {
* Find purchase order by ID
*/
getOrderById = ({ orderId }: GetOrderByIdRequest): Observable => {
- throwIfNullOrUndefined(orderId, 'getOrderById');
+ throwIfNullOrUndefined(orderId, 'orderId', 'getOrderById');
return this.request({
path: '/store/order/{orderId}'.replace('{orderId}', encodeURI(orderId)),
@@ -80,7 +80,7 @@ export class StoreApi extends BaseAPI {
* Place an order for a pet
*/
placeOrder = ({ body }: PlaceOrderRequest): Observable => {
- throwIfNullOrUndefined(body, 'placeOrder');
+ throwIfNullOrUndefined(body, 'body', 'placeOrder');
const headers: HttpHeaders = {
'Content-Type': 'application/json',
diff --git a/samples/client/petstore/typescript-rxjs/builds/default/apis/UserApi.ts b/samples/client/petstore/typescript-rxjs/builds/default/apis/UserApi.ts
index 1b3c07eea4f..a223874786e 100644
--- a/samples/client/petstore/typescript-rxjs/builds/default/apis/UserApi.ts
+++ b/samples/client/petstore/typescript-rxjs/builds/default/apis/UserApi.ts
@@ -57,7 +57,7 @@ export class UserApi extends BaseAPI {
* Create user
*/
createUser = ({ body }: CreateUserRequest): Observable => {
- throwIfNullOrUndefined(body, 'createUser');
+ throwIfNullOrUndefined(body, 'body', 'createUser');
const headers: HttpHeaders = {
'Content-Type': 'application/json',
@@ -75,7 +75,7 @@ export class UserApi extends BaseAPI {
* Creates list of users with given input array
*/
createUsersWithArrayInput = ({ body }: CreateUsersWithArrayInputRequest): Observable => {
- throwIfNullOrUndefined(body, 'createUsersWithArrayInput');
+ throwIfNullOrUndefined(body, 'body', 'createUsersWithArrayInput');
const headers: HttpHeaders = {
'Content-Type': 'application/json',
@@ -93,7 +93,7 @@ export class UserApi extends BaseAPI {
* Creates list of users with given input array
*/
createUsersWithListInput = ({ body }: CreateUsersWithListInputRequest): Observable => {
- throwIfNullOrUndefined(body, 'createUsersWithListInput');
+ throwIfNullOrUndefined(body, 'body', 'createUsersWithListInput');
const headers: HttpHeaders = {
'Content-Type': 'application/json',
@@ -112,7 +112,7 @@ export class UserApi extends BaseAPI {
* Delete user
*/
deleteUser = ({ username }: DeleteUserRequest): Observable => {
- throwIfNullOrUndefined(username, 'deleteUser');
+ throwIfNullOrUndefined(username, 'username', 'deleteUser');
return this.request({
path: '/user/{username}'.replace('{username}', encodeURI(username)),
@@ -124,7 +124,7 @@ export class UserApi extends BaseAPI {
* Get user by user name
*/
getUserByName = ({ username }: GetUserByNameRequest): Observable => {
- throwIfNullOrUndefined(username, 'getUserByName');
+ throwIfNullOrUndefined(username, 'username', 'getUserByName');
return this.request({
path: '/user/{username}'.replace('{username}', encodeURI(username)),
@@ -136,8 +136,8 @@ export class UserApi extends BaseAPI {
* Logs user into the system
*/
loginUser = ({ username, password }: LoginUserRequest): Observable => {
- throwIfNullOrUndefined(username, 'loginUser');
- throwIfNullOrUndefined(password, 'loginUser');
+ throwIfNullOrUndefined(username, 'username', 'loginUser');
+ throwIfNullOrUndefined(password, 'password', 'loginUser');
const query: HttpQuery = { // required parameters are used directly since they are already checked by throwIfNullOrUndefined
'username': username,
@@ -166,8 +166,8 @@ export class UserApi extends BaseAPI {
* Updated user
*/
updateUser = ({ username, body }: UpdateUserRequest): Observable => {
- throwIfNullOrUndefined(username, 'updateUser');
- throwIfNullOrUndefined(body, 'updateUser');
+ throwIfNullOrUndefined(username, 'username', 'updateUser');
+ throwIfNullOrUndefined(body, 'body', 'updateUser');
const headers: HttpHeaders = {
'Content-Type': 'application/json',
diff --git a/samples/client/petstore/typescript-rxjs/builds/default/runtime.ts b/samples/client/petstore/typescript-rxjs/builds/default/runtime.ts
index ad383a11642..42ddef55ae1 100644
--- a/samples/client/petstore/typescript-rxjs/builds/default/runtime.ts
+++ b/samples/client/petstore/typescript-rxjs/builds/default/runtime.ts
@@ -189,9 +189,9 @@ export const throwIfRequired = (params: {[key: string]: any}, key: string, nickn
}
};
-export const throwIfNullOrUndefined = (value: any, nickname?: string) => {
+export const throwIfNullOrUndefined = (value: any, paramName: string, nickname: string) => {
if (value == null) {
- throw new Error(`Parameter "${value}" was null or undefined when calling "${nickname}".`);
+ throw new Error(`Parameter "${paramName}" was null or undefined when calling "${nickname}".`);
}
};
diff --git a/samples/client/petstore/typescript-rxjs/builds/es6-target/apis/PetApi.ts b/samples/client/petstore/typescript-rxjs/builds/es6-target/apis/PetApi.ts
index 3b3232c44db..021781fd7ab 100644
--- a/samples/client/petstore/typescript-rxjs/builds/es6-target/apis/PetApi.ts
+++ b/samples/client/petstore/typescript-rxjs/builds/es6-target/apis/PetApi.ts
@@ -64,7 +64,7 @@ export class PetApi extends BaseAPI {
* Add a new pet to the store
*/
addPet = ({ body }: AddPetRequest): Observable => {
- throwIfNullOrUndefined(body, 'addPet');
+ throwIfNullOrUndefined(body, 'body', 'addPet');
const headers: HttpHeaders = {
'Content-Type': 'application/json',
@@ -89,7 +89,7 @@ export class PetApi extends BaseAPI {
* Deletes a pet
*/
deletePet = ({ petId, apiKey }: DeletePetRequest): Observable => {
- throwIfNullOrUndefined(petId, 'deletePet');
+ throwIfNullOrUndefined(petId, 'petId', 'deletePet');
const headers: HttpHeaders = {
...(apiKey != null ? { 'api_key': String(apiKey) } : undefined),
@@ -114,7 +114,7 @@ export class PetApi extends BaseAPI {
* Finds Pets by status
*/
findPetsByStatus = ({ status }: FindPetsByStatusRequest): Observable> => {
- throwIfNullOrUndefined(status, 'findPetsByStatus');
+ throwIfNullOrUndefined(status, 'status', 'findPetsByStatus');
const headers: HttpHeaders = {
// oauth required
@@ -143,7 +143,7 @@ export class PetApi extends BaseAPI {
* Finds Pets by tags
*/
findPetsByTags = ({ tags }: FindPetsByTagsRequest): Observable> => {
- throwIfNullOrUndefined(tags, 'findPetsByTags');
+ throwIfNullOrUndefined(tags, 'tags', 'findPetsByTags');
const headers: HttpHeaders = {
// oauth required
@@ -172,7 +172,7 @@ export class PetApi extends BaseAPI {
* Find pet by ID
*/
getPetById = ({ petId }: GetPetByIdRequest): Observable => {
- throwIfNullOrUndefined(petId, 'getPetById');
+ throwIfNullOrUndefined(petId, 'petId', 'getPetById');
const headers: HttpHeaders = {
...(this.configuration.apiKey && { 'api_key': this.configuration.apiKey('api_key') }), // api_key authentication
@@ -189,7 +189,7 @@ export class PetApi extends BaseAPI {
* Update an existing pet
*/
updatePet = ({ body }: UpdatePetRequest): Observable => {
- throwIfNullOrUndefined(body, 'updatePet');
+ throwIfNullOrUndefined(body, 'body', 'updatePet');
const headers: HttpHeaders = {
'Content-Type': 'application/json',
@@ -214,7 +214,7 @@ export class PetApi extends BaseAPI {
* Updates a pet in the store with form data
*/
updatePetWithForm = ({ petId, name, status }: UpdatePetWithFormRequest): Observable => {
- throwIfNullOrUndefined(petId, 'updatePetWithForm');
+ throwIfNullOrUndefined(petId, 'petId', 'updatePetWithForm');
const headers: HttpHeaders = {
// oauth required
@@ -242,7 +242,7 @@ export class PetApi extends BaseAPI {
* uploads an image
*/
uploadFile = ({ petId, additionalMetadata, file }: UploadFileRequest): Observable => {
- throwIfNullOrUndefined(petId, 'uploadFile');
+ throwIfNullOrUndefined(petId, 'petId', 'uploadFile');
const headers: HttpHeaders = {
// oauth required
diff --git a/samples/client/petstore/typescript-rxjs/builds/es6-target/apis/StoreApi.ts b/samples/client/petstore/typescript-rxjs/builds/es6-target/apis/StoreApi.ts
index aac36206d60..8ce04d16aa0 100644
--- a/samples/client/petstore/typescript-rxjs/builds/es6-target/apis/StoreApi.ts
+++ b/samples/client/petstore/typescript-rxjs/builds/es6-target/apis/StoreApi.ts
@@ -39,7 +39,7 @@ export class StoreApi extends BaseAPI {
* Delete purchase order by ID
*/
deleteOrder = ({ orderId }: DeleteOrderRequest): Observable => {
- throwIfNullOrUndefined(orderId, 'deleteOrder');
+ throwIfNullOrUndefined(orderId, 'orderId', 'deleteOrder');
return this.request({
path: '/store/order/{orderId}'.replace('{orderId}', encodeURI(orderId)),
@@ -68,7 +68,7 @@ export class StoreApi extends BaseAPI {
* Find purchase order by ID
*/
getOrderById = ({ orderId }: GetOrderByIdRequest): Observable => {
- throwIfNullOrUndefined(orderId, 'getOrderById');
+ throwIfNullOrUndefined(orderId, 'orderId', 'getOrderById');
return this.request({
path: '/store/order/{orderId}'.replace('{orderId}', encodeURI(orderId)),
@@ -80,7 +80,7 @@ export class StoreApi extends BaseAPI {
* Place an order for a pet
*/
placeOrder = ({ body }: PlaceOrderRequest): Observable => {
- throwIfNullOrUndefined(body, 'placeOrder');
+ throwIfNullOrUndefined(body, 'body', 'placeOrder');
const headers: HttpHeaders = {
'Content-Type': 'application/json',
diff --git a/samples/client/petstore/typescript-rxjs/builds/es6-target/apis/UserApi.ts b/samples/client/petstore/typescript-rxjs/builds/es6-target/apis/UserApi.ts
index 1b3c07eea4f..a223874786e 100644
--- a/samples/client/petstore/typescript-rxjs/builds/es6-target/apis/UserApi.ts
+++ b/samples/client/petstore/typescript-rxjs/builds/es6-target/apis/UserApi.ts
@@ -57,7 +57,7 @@ export class UserApi extends BaseAPI {
* Create user
*/
createUser = ({ body }: CreateUserRequest): Observable => {
- throwIfNullOrUndefined(body, 'createUser');
+ throwIfNullOrUndefined(body, 'body', 'createUser');
const headers: HttpHeaders = {
'Content-Type': 'application/json',
@@ -75,7 +75,7 @@ export class UserApi extends BaseAPI {
* Creates list of users with given input array
*/
createUsersWithArrayInput = ({ body }: CreateUsersWithArrayInputRequest): Observable => {
- throwIfNullOrUndefined(body, 'createUsersWithArrayInput');
+ throwIfNullOrUndefined(body, 'body', 'createUsersWithArrayInput');
const headers: HttpHeaders = {
'Content-Type': 'application/json',
@@ -93,7 +93,7 @@ export class UserApi extends BaseAPI {
* Creates list of users with given input array
*/
createUsersWithListInput = ({ body }: CreateUsersWithListInputRequest): Observable => {
- throwIfNullOrUndefined(body, 'createUsersWithListInput');
+ throwIfNullOrUndefined(body, 'body', 'createUsersWithListInput');
const headers: HttpHeaders = {
'Content-Type': 'application/json',
@@ -112,7 +112,7 @@ export class UserApi extends BaseAPI {
* Delete user
*/
deleteUser = ({ username }: DeleteUserRequest): Observable => {
- throwIfNullOrUndefined(username, 'deleteUser');
+ throwIfNullOrUndefined(username, 'username', 'deleteUser');
return this.request({
path: '/user/{username}'.replace('{username}', encodeURI(username)),
@@ -124,7 +124,7 @@ export class UserApi extends BaseAPI {
* Get user by user name
*/
getUserByName = ({ username }: GetUserByNameRequest): Observable => {
- throwIfNullOrUndefined(username, 'getUserByName');
+ throwIfNullOrUndefined(username, 'username', 'getUserByName');
return this.request({
path: '/user/{username}'.replace('{username}', encodeURI(username)),
@@ -136,8 +136,8 @@ export class UserApi extends BaseAPI {
* Logs user into the system
*/
loginUser = ({ username, password }: LoginUserRequest): Observable => {
- throwIfNullOrUndefined(username, 'loginUser');
- throwIfNullOrUndefined(password, 'loginUser');
+ throwIfNullOrUndefined(username, 'username', 'loginUser');
+ throwIfNullOrUndefined(password, 'password', 'loginUser');
const query: HttpQuery = { // required parameters are used directly since they are already checked by throwIfNullOrUndefined
'username': username,
@@ -166,8 +166,8 @@ export class UserApi extends BaseAPI {
* Updated user
*/
updateUser = ({ username, body }: UpdateUserRequest): Observable => {
- throwIfNullOrUndefined(username, 'updateUser');
- throwIfNullOrUndefined(body, 'updateUser');
+ throwIfNullOrUndefined(username, 'username', 'updateUser');
+ throwIfNullOrUndefined(body, 'body', 'updateUser');
const headers: HttpHeaders = {
'Content-Type': 'application/json',
diff --git a/samples/client/petstore/typescript-rxjs/builds/es6-target/runtime.ts b/samples/client/petstore/typescript-rxjs/builds/es6-target/runtime.ts
index ad383a11642..42ddef55ae1 100644
--- a/samples/client/petstore/typescript-rxjs/builds/es6-target/runtime.ts
+++ b/samples/client/petstore/typescript-rxjs/builds/es6-target/runtime.ts
@@ -189,9 +189,9 @@ export const throwIfRequired = (params: {[key: string]: any}, key: string, nickn
}
};
-export const throwIfNullOrUndefined = (value: any, nickname?: string) => {
+export const throwIfNullOrUndefined = (value: any, paramName: string, nickname: string) => {
if (value == null) {
- throw new Error(`Parameter "${value}" was null or undefined when calling "${nickname}".`);
+ throw new Error(`Parameter "${paramName}" was null or undefined when calling "${nickname}".`);
}
};
diff --git a/samples/client/petstore/typescript-rxjs/builds/with-interfaces/apis/PetApi.ts b/samples/client/petstore/typescript-rxjs/builds/with-interfaces/apis/PetApi.ts
index 3b3232c44db..021781fd7ab 100644
--- a/samples/client/petstore/typescript-rxjs/builds/with-interfaces/apis/PetApi.ts
+++ b/samples/client/petstore/typescript-rxjs/builds/with-interfaces/apis/PetApi.ts
@@ -64,7 +64,7 @@ export class PetApi extends BaseAPI {
* Add a new pet to the store
*/
addPet = ({ body }: AddPetRequest): Observable => {
- throwIfNullOrUndefined(body, 'addPet');
+ throwIfNullOrUndefined(body, 'body', 'addPet');
const headers: HttpHeaders = {
'Content-Type': 'application/json',
@@ -89,7 +89,7 @@ export class PetApi extends BaseAPI {
* Deletes a pet
*/
deletePet = ({ petId, apiKey }: DeletePetRequest): Observable => {
- throwIfNullOrUndefined(petId, 'deletePet');
+ throwIfNullOrUndefined(petId, 'petId', 'deletePet');
const headers: HttpHeaders = {
...(apiKey != null ? { 'api_key': String(apiKey) } : undefined),
@@ -114,7 +114,7 @@ export class PetApi extends BaseAPI {
* Finds Pets by status
*/
findPetsByStatus = ({ status }: FindPetsByStatusRequest): Observable> => {
- throwIfNullOrUndefined(status, 'findPetsByStatus');
+ throwIfNullOrUndefined(status, 'status', 'findPetsByStatus');
const headers: HttpHeaders = {
// oauth required
@@ -143,7 +143,7 @@ export class PetApi extends BaseAPI {
* Finds Pets by tags
*/
findPetsByTags = ({ tags }: FindPetsByTagsRequest): Observable> => {
- throwIfNullOrUndefined(tags, 'findPetsByTags');
+ throwIfNullOrUndefined(tags, 'tags', 'findPetsByTags');
const headers: HttpHeaders = {
// oauth required
@@ -172,7 +172,7 @@ export class PetApi extends BaseAPI {
* Find pet by ID
*/
getPetById = ({ petId }: GetPetByIdRequest): Observable => {
- throwIfNullOrUndefined(petId, 'getPetById');
+ throwIfNullOrUndefined(petId, 'petId', 'getPetById');
const headers: HttpHeaders = {
...(this.configuration.apiKey && { 'api_key': this.configuration.apiKey('api_key') }), // api_key authentication
@@ -189,7 +189,7 @@ export class PetApi extends BaseAPI {
* Update an existing pet
*/
updatePet = ({ body }: UpdatePetRequest): Observable => {
- throwIfNullOrUndefined(body, 'updatePet');
+ throwIfNullOrUndefined(body, 'body', 'updatePet');
const headers: HttpHeaders = {
'Content-Type': 'application/json',
@@ -214,7 +214,7 @@ export class PetApi extends BaseAPI {
* Updates a pet in the store with form data
*/
updatePetWithForm = ({ petId, name, status }: UpdatePetWithFormRequest): Observable => {
- throwIfNullOrUndefined(petId, 'updatePetWithForm');
+ throwIfNullOrUndefined(petId, 'petId', 'updatePetWithForm');
const headers: HttpHeaders = {
// oauth required
@@ -242,7 +242,7 @@ export class PetApi extends BaseAPI {
* uploads an image
*/
uploadFile = ({ petId, additionalMetadata, file }: UploadFileRequest): Observable => {
- throwIfNullOrUndefined(petId, 'uploadFile');
+ throwIfNullOrUndefined(petId, 'petId', 'uploadFile');
const headers: HttpHeaders = {
// oauth required
diff --git a/samples/client/petstore/typescript-rxjs/builds/with-interfaces/apis/StoreApi.ts b/samples/client/petstore/typescript-rxjs/builds/with-interfaces/apis/StoreApi.ts
index aac36206d60..8ce04d16aa0 100644
--- a/samples/client/petstore/typescript-rxjs/builds/with-interfaces/apis/StoreApi.ts
+++ b/samples/client/petstore/typescript-rxjs/builds/with-interfaces/apis/StoreApi.ts
@@ -39,7 +39,7 @@ export class StoreApi extends BaseAPI {
* Delete purchase order by ID
*/
deleteOrder = ({ orderId }: DeleteOrderRequest): Observable => {
- throwIfNullOrUndefined(orderId, 'deleteOrder');
+ throwIfNullOrUndefined(orderId, 'orderId', 'deleteOrder');
return this.request({
path: '/store/order/{orderId}'.replace('{orderId}', encodeURI(orderId)),
@@ -68,7 +68,7 @@ export class StoreApi extends BaseAPI {
* Find purchase order by ID
*/
getOrderById = ({ orderId }: GetOrderByIdRequest): Observable => {
- throwIfNullOrUndefined(orderId, 'getOrderById');
+ throwIfNullOrUndefined(orderId, 'orderId', 'getOrderById');
return this.request