diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenModel.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenModel.java
index a8107fb07d00..a53ab1b85bc3 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenModel.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenModel.java
@@ -164,6 +164,7 @@ public class CodegenModel implements IJsonSchemaValidationProperties {
private boolean hasDiscriminatorWithNonEmptyMapping;
private boolean isAnyType;
private boolean isUuid;
+ private Map requiredVarsMap;
public String getAdditionalPropertiesType() {
return additionalPropertiesType;
@@ -928,6 +929,7 @@ public boolean equals(Object o) {
getUniqueItems() == that.getUniqueItems() &&
getExclusiveMinimum() == that.getExclusiveMinimum() &&
getExclusiveMaximum() == that.getExclusiveMaximum() &&
+ Objects.equals(requiredVarsMap, that.getRequiredVarsMap()) &&
Objects.equals(composedSchemas, that.composedSchemas) &&
Objects.equals(parent, that.parent) &&
Objects.equals(parentSchema, that.parentSchema) &&
@@ -1000,7 +1002,7 @@ hasChildren, isMap, isDeprecated, hasOnlyReadOnly, getExternalDocumentation(), g
getMinItems(), getMaxLength(), getMinLength(), getExclusiveMinimum(), getExclusiveMaximum(), getMinimum(),
getMaximum(), getPattern(), getMultipleOf(), getItems(), getAdditionalProperties(), getIsModel(),
getAdditionalPropertiesIsAnyType(), hasDiscriminatorWithNonEmptyMapping,
- isAnyType, getComposedSchemas(), hasMultipleTypes, isDecimal, isUuid);
+ isAnyType, getComposedSchemas(), hasMultipleTypes, isDecimal, isUuid, requiredVarsMap);
}
@Override
@@ -1097,6 +1099,7 @@ public String toString() {
sb.append(", hasMultipleTypes=").append(hasMultipleTypes);
sb.append(", isDecimal=").append(isDecimal);
sb.append(", isUUID=").append(isUuid);
+ sb.append(", requiredVarsMap=").append(requiredVarsMap);
sb.append('}');
return sb.toString();
}
@@ -1124,6 +1127,12 @@ public boolean getHasItems() {
return this.items != null;
}
+ @Override
+ public Map getRequiredVarsMap() { return requiredVarsMap; }
+
+ @Override
+ public void setRequiredVarsMap(Map requiredVarsMap) { this.requiredVarsMap=requiredVarsMap; }
+
/**
* Remove duplicated properties in all variable list
*/
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenParameter.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenParameter.java
index af222869bfe1..c69b44cefc63 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenParameter.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenParameter.java
@@ -111,6 +111,7 @@ public class CodegenParameter implements IJsonSchemaValidationProperties {
private CodegenComposedSchemas composedSchemas;
private boolean hasMultipleTypes = false;
private LinkedHashMap content;
+ private Map requiredVarsMap;
public CodegenParameter copy() {
CodegenParameter output = new CodegenParameter();
@@ -194,6 +195,9 @@ public CodegenParameter copy() {
if (this.vendorExtensions != null) {
output.vendorExtensions = new HashMap(this.vendorExtensions);
}
+ if (this.requiredVarsMap != null) {
+ output.setRequiredVarsMap(this.requiredVarsMap);
+ }
output.hasValidation = this.hasValidation;
output.isNullable = this.isNullable;
output.isDeprecated = this.isDeprecated;
@@ -230,7 +234,7 @@ public CodegenParameter copy() {
@Override
public int hashCode() {
- return Objects.hash(isFormParam, isQueryParam, isPathParam, isHeaderParam, isCookieParam, isBodyParam, isContainer, isCollectionFormatMulti, isPrimitiveType, isModel, isExplode, baseName, paramName, dataType, datatypeWithEnum, dataFormat, collectionFormat, description, unescapedDescription, baseType, defaultValue, enumName, style, isDeepObject, isAllowEmptyValue, example, jsonSchema, isString, isNumeric, isInteger, isLong, isNumber, isFloat, isDouble, isDecimal, isByteArray, isBinary, isBoolean, isDate, isDateTime, isUuid, isUri, isEmail, isFreeFormObject, isAnyType, isArray, isMap, isFile, isEnum, _enum, allowableValues, items, mostInnerItems, additionalProperties, vars, requiredVars, vendorExtensions, hasValidation, getMaxProperties(), getMinProperties(), isNullable, isDeprecated, required, getMaximum(), getExclusiveMaximum(), getMinimum(), getExclusiveMinimum(), getMaxLength(), getMinLength(), getPattern(), getMaxItems(), getMinItems(), getUniqueItems(), contentType, multipleOf, isNull, additionalPropertiesIsAnyType, hasVars, hasRequired, isShort, isUnboundedInteger, hasDiscriminatorWithNonEmptyMapping, composedSchemas, hasMultipleTypes, schema, content);
+ return Objects.hash(isFormParam, isQueryParam, isPathParam, isHeaderParam, isCookieParam, isBodyParam, isContainer, isCollectionFormatMulti, isPrimitiveType, isModel, isExplode, baseName, paramName, dataType, datatypeWithEnum, dataFormat, collectionFormat, description, unescapedDescription, baseType, defaultValue, enumName, style, isDeepObject, isAllowEmptyValue, example, jsonSchema, isString, isNumeric, isInteger, isLong, isNumber, isFloat, isDouble, isDecimal, isByteArray, isBinary, isBoolean, isDate, isDateTime, isUuid, isUri, isEmail, isFreeFormObject, isAnyType, isArray, isMap, isFile, isEnum, _enum, allowableValues, items, mostInnerItems, additionalProperties, vars, requiredVars, vendorExtensions, hasValidation, getMaxProperties(), getMinProperties(), isNullable, isDeprecated, required, getMaximum(), getExclusiveMaximum(), getMinimum(), getExclusiveMinimum(), getMaxLength(), getMinLength(), getPattern(), getMaxItems(), getMinItems(), getUniqueItems(), contentType, multipleOf, isNull, additionalPropertiesIsAnyType, hasVars, hasRequired, isShort, isUnboundedInteger, hasDiscriminatorWithNonEmptyMapping, composedSchemas, hasMultipleTypes, schema, content, requiredVarsMap);
}
@Override
@@ -286,6 +290,7 @@ public boolean equals(Object o) {
getExclusiveMaximum() == that.getExclusiveMaximum() &&
getExclusiveMinimum() == that.getExclusiveMinimum() &&
getUniqueItems() == that.getUniqueItems() &&
+ Objects.equals(requiredVarsMap, that.getRequiredVarsMap()) &&
Objects.equals(content, that.getContent()) &&
Objects.equals(schema, that.getSchema()) &&
Objects.equals(composedSchemas, that.getComposedSchemas()) &&
@@ -415,6 +420,7 @@ public String toString() {
sb.append(", hasMultipleTypes=").append(hasMultipleTypes);
sb.append(", schema=").append(schema);
sb.append(", content=").append(content);
+ sb.append(", requiredVarsMap=").append(requiredVarsMap);
sb.append('}');
return sb.toString();
}
@@ -815,5 +821,11 @@ public void setContent(LinkedHashMap content) {
public String getBaseType() {
return baseType;
}
+
+ @Override
+ public Map getRequiredVarsMap() { return requiredVarsMap; }
+
+ @Override
+ public void setRequiredVarsMap(Map requiredVarsMap) { this.requiredVarsMap=requiredVarsMap; }
}
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenProperty.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenProperty.java
index b2eab698e126..8d92cd6a0feb 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenProperty.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenProperty.java
@@ -194,6 +194,7 @@ public class CodegenProperty implements Cloneable, IJsonSchemaValidationProperti
private boolean hasDiscriminatorWithNonEmptyMapping;
private CodegenComposedSchemas composedSchemas = null;
private boolean hasMultipleTypes = false;
+ private Map requiredVarsMap;
public String getBaseName() {
return baseName;
@@ -690,6 +691,9 @@ public CodegenProperty clone() {
if (this.composedSchemas != null) {
cp.composedSchemas = this.composedSchemas;
}
+ if (this.requiredVarsMap != null) {
+ cp.setRequiredVarsMap(this.requiredVarsMap);
+ }
return cp;
} catch (CloneNotSupportedException e) {
@@ -867,6 +871,12 @@ public void setHasMultipleTypes(boolean hasMultipleTypes) {
public void setIsUuid(boolean isUuid) { this.isUuid = isUuid; }
+ @Override
+ public Map getRequiredVarsMap() { return requiredVarsMap; }
+
+ @Override
+ public void setRequiredVarsMap(Map requiredVarsMap) { this.requiredVarsMap=requiredVarsMap; }
+
@Override
public String toString() {
final StringBuilder sb = new StringBuilder("CodegenProperty{");
@@ -966,6 +976,7 @@ public String toString() {
sb.append(", getHasDiscriminatorWithNonEmptyMapping=").append(hasDiscriminatorWithNonEmptyMapping);
sb.append(", composedSchemas=").append(composedSchemas);
sb.append(", hasMultipleTypes=").append(hasMultipleTypes);
+ sb.append(", requiredVarsMap=").append(requiredVarsMap);
sb.append('}');
return sb.toString();
}
@@ -1024,6 +1035,7 @@ public boolean equals(Object o) {
getAdditionalPropertiesIsAnyType() == that.getAdditionalPropertiesIsAnyType() &&
getHasVars() == that.getHasVars() &&
getHasRequired() == that.getHasRequired() &&
+ Objects.equals(requiredVarsMap, that.getRequiredVarsMap()) &&
Objects.equals(composedSchemas, that.composedSchemas) &&
Objects.equals(openApiType, that.openApiType) &&
Objects.equals(baseName, that.baseName) &&
@@ -1087,6 +1099,6 @@ public int hashCode() {
vendorExtensions, hasValidation, isInherited, discriminatorValue, nameInCamelCase,
nameInSnakeCase, enumName, maxItems, minItems, isXmlAttribute, xmlPrefix, xmlName,
xmlNamespace, isXmlWrapped, isNull, additionalPropertiesIsAnyType, hasVars, hasRequired,
- hasDiscriminatorWithNonEmptyMapping, composedSchemas, hasMultipleTypes);
+ hasDiscriminatorWithNonEmptyMapping, composedSchemas, hasMultipleTypes, requiredVarsMap);
}
}
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenResponse.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenResponse.java
index f27d5bb13aac..6cdcb3837bd4 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenResponse.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenResponse.java
@@ -89,6 +89,7 @@ public class CodegenResponse implements IJsonSchemaValidationProperties {
private CodegenComposedSchemas composedSchemas;
private boolean hasMultipleTypes = false;
private LinkedHashMap content;
+ private Map requiredVarsMap;
@Override
public int hashCode() {
@@ -100,7 +101,8 @@ public int hashCode() {
getMaxProperties(), getMinProperties(), uniqueItems, getMaxItems(), getMinItems(), getMaxLength(),
getMinLength(), exclusiveMinimum, exclusiveMaximum, getMinimum(), getMaximum(), getPattern(),
is1xx, is2xx, is3xx, is4xx, is5xx, additionalPropertiesIsAnyType, hasVars, hasRequired,
- hasDiscriminatorWithNonEmptyMapping, composedSchemas, hasMultipleTypes, responseHeaders, content);
+ hasDiscriminatorWithNonEmptyMapping, composedSchemas, hasMultipleTypes, responseHeaders, content,
+ requiredVarsMap);
}
@Override
@@ -149,6 +151,7 @@ public boolean equals(Object o) {
getAdditionalPropertiesIsAnyType() == that.getAdditionalPropertiesIsAnyType() &&
getHasVars() == that.getHasVars() &&
getHasRequired() == that.getHasRequired() &&
+ Objects.equals(requiredVarsMap, that.getRequiredVarsMap()) &&
Objects.equals(content, that.getContent()) &&
Objects.equals(responseHeaders, that.getResponseHeaders()) &&
Objects.equals(composedSchemas, that.getComposedSchemas()) &&
@@ -538,6 +541,7 @@ public String toString() {
sb.append(", hasMultipleTypes=").append(hasMultipleTypes);
sb.append(", responseHeaders=").append(responseHeaders);
sb.append(", content=").append(content);
+ sb.append(", requiredVarsMap=").append(requiredVarsMap);
sb.append('}');
return sb.toString();
}
@@ -665,4 +669,10 @@ public void setHasMultipleTypes(boolean hasMultipleTypes) {
public String getBaseType() {
return baseType;
}
+
+ @Override
+ public Map getRequiredVarsMap() { return requiredVarsMap; }
+
+ @Override
+ public void setRequiredVarsMap(Map requiredVarsMap) { this.requiredVarsMap=requiredVarsMap; }
}
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java
index a64b807bb2d7..80672fd4ab09 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java
@@ -2692,6 +2692,7 @@ protected void updateModelForObject(CodegenModel m, Schema schema) {
}
// process 'additionalProperties'
setAddProps(schema, m);
+ addRequiredVarsMap(schema, m);
}
protected void updateModelForAnyType(CodegenModel m, Schema schema) {
@@ -2712,6 +2713,7 @@ protected void updateModelForAnyType(CodegenModel m, Schema schema) {
}
// process 'additionalProperties'
setAddProps(schema, m);
+ addRequiredVarsMap(schema, m);
}
protected String toTestCaseName(String specTestCaseName) {
@@ -7100,11 +7102,70 @@ public CodegenParameter fromRequestBody(RequestBody body, Set imports, S
return codegenParameter;
}
+ protected void addRequiredVarsMap(Schema schema, IJsonSchemaValidationProperties property) {
+ /*
+ this should be called after vars and additionalProperties are set
+ Features added by storing codegenProperty values:
+ - complexType stores reference to additionalProperties definition
+ - baseName stores original name (can be invalid in a programming language)
+ - nameInSnakeCase can store valid name for a programming language
+ */
+ Map properties = schema.getProperties();
+ Map requiredVarsMap = new HashMap<>();
+ List requiredPropertyNames = schema.getRequired();
+ if (requiredPropertyNames == null) {
+ return;
+ }
+ for (String requiredPropertyName: requiredPropertyNames) {
+ // required property is defined in properties, value is that CodegenProperty
+ String usedRequiredPropertyName = handleSpecialCharacters(requiredPropertyName);
+ if (properties != null && properties.containsKey(requiredPropertyName)) {
+ // get cp from property
+ boolean found = false;
+ for (CodegenProperty cp: property.getVars()) {
+ if (cp.baseName.equals(requiredPropertyName)) {
+ found = true;
+ requiredVarsMap.put(requiredPropertyName, cp);
+ }
+ }
+ if (found == false) {
+ throw new RuntimeException("Property " + requiredPropertyName + " is missing from getVars");
+ }
+ } else if (schema.getAdditionalProperties() instanceof Boolean && Boolean.FALSE.equals(schema.getAdditionalProperties())) {
+ // TODO add processing for requiredPropertyName
+ // required property is not defined in properties, and additionalProperties is false, value is null
+ requiredVarsMap.put(usedRequiredPropertyName, null);
+ } else {
+ // required property is not defined in properties, and additionalProperties is true or unset value is CodegenProperty made from empty schema
+ // required property is not defined in properties, and additionalProperties is schema, value is CodegenProperty made from schema
+ if (supportsAdditionalPropertiesWithComposedSchema && !disallowAdditionalPropertiesIfNotPresent) {
+ if (property.getAdditionalProperties() == null) {
+ throw new RuntimeException("additionalProperties is unset and should be set in" + schema.toString());
+ }
+ CodegenProperty cp;
+ if (schema.getAdditionalProperties() == null) {
+ cp = fromProperty(usedRequiredPropertyName, new Schema(), true);
+ } else if (schema.getAdditionalProperties() instanceof Boolean && Boolean.TRUE.equals(schema.getAdditionalProperties())) {
+ cp = fromProperty(requiredPropertyName, new Schema(), true);
+ } else {
+ CodegenProperty addPropsProp = property.getAdditionalProperties();
+ cp = addPropsProp;
+ }
+ requiredVarsMap.put(usedRequiredPropertyName, cp);
+ }
+ }
+ }
+ if (!requiredVarsMap.isEmpty()) {
+ property.setRequiredVarsMap(requiredVarsMap);
+ }
+ }
+
protected void addVarsRequiredVarsAdditionalProps(Schema schema, IJsonSchemaValidationProperties property) {
setAddProps(schema, property);
Set mandatory = schema.getRequired() == null ? Collections.emptySet()
: new TreeSet<>(schema.getRequired());
addVars(property, property.getVars(), schema.getProperties(), mandatory);
+ addRequiredVarsMap(schema, property);
}
private void addJsonSchemaForBodyRequestInCaseItsNotPresent(CodegenParameter codegenParameter, RequestBody body) {
@@ -7666,4 +7727,11 @@ public List getSupportedVendorExtensions() {
@Override
public boolean getUseInlineModelResolver() { return true; }
+
+ /*
+ A function to convert yaml or json ingested strings like property names
+ And convert special characters like newline, tab, carriage return
+ Into strings that can be rendered in the language that the generator will output to
+ */
+ protected String handleSpecialCharacters(String name) { return name; }
}
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/IJsonSchemaValidationProperties.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/IJsonSchemaValidationProperties.java
index c3cf15fc36fc..1bb16a6bc3a7 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/IJsonSchemaValidationProperties.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/IJsonSchemaValidationProperties.java
@@ -3,6 +3,7 @@
import java.util.Collections;
import java.util.HashSet;
import java.util.List;
+import java.util.Map;
import java.util.Set;
import java.util.stream.Stream;
@@ -115,6 +116,17 @@ public interface IJsonSchemaValidationProperties {
void setRequiredVars(List requiredVars);
+ Map getRequiredVarsMap();
+
+ // goes from required propertyName to its CodegenProperty
+ // Use Cases:
+ // 1. required property is defined in properties, value is that CodegenProperty
+ // 2. required property is not defined in properties, and additionalProperties is true or unset value is CodegenProperty made from empty schema
+ // 3. required property is not defined in properties, and additionalProperties is schema, value is CodegenProperty made from schema
+ // 4. required property is not defined in properties, and additionalProperties is false, value is null
+ void setRequiredVarsMap(Map requiredVarsMap);
+
+
boolean getIsNull();
void setIsNull(boolean isNull);
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonExperimentalClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonExperimentalClientCodegen.java
index 6f334fd78999..7c81911e8089 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonExperimentalClientCodegen.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonExperimentalClientCodegen.java
@@ -661,6 +661,7 @@ protected void addVarsRequiredVarsAdditionalProps(Schema schema, IJsonSchemaVali
}
addVars(property, property.getVars(), schema.getProperties(), requiredVars);
}
+ addRequiredVarsMap(schema, property);
return;
} else if (ModelUtils.isTypeObjectSchema(schema)) {
HashSet requiredVars = new HashSet<>();
@@ -673,6 +674,7 @@ protected void addVarsRequiredVarsAdditionalProps(Schema schema, IJsonSchemaVali
property.setHasVars(true);
}
}
+ addRequiredVarsMap(schema, property);
return;
}
@@ -997,6 +999,7 @@ private boolean isValidPythonVarOrClassName(String name) {
@Override
public CodegenProperty fromProperty(String name, Schema p, boolean required) {
CodegenProperty cp = super.fromProperty(name, p, required);
+
if (cp.isAnyType && cp.isNullable) {
cp.isNullable = false;
}
@@ -1339,7 +1342,7 @@ protected String toTestCaseName(String specTestCaseName) {
return CaseFormat.UPPER_CAMEL.to(CaseFormat.LOWER_UNDERSCORE, specTestCaseName);
}
- private String processStringValue(String value) {
+ protected String handleSpecialCharacters(String value) {
// handles escape characters and the like
String stringValue = value;
String backslash = "\\";
@@ -1379,7 +1382,7 @@ protected Object processTestExampleData(Object value) {
} else if (value instanceof Double || value instanceof Float || value instanceof Boolean){
return value;
} else if (value instanceof String) {
- return processStringValue((String) value);
+ return handleSpecialCharacters((String) value);
} else if (value instanceof LinkedHashMap) {
LinkedHashMap fixedValues = new LinkedHashMap();
for (Map.Entry entry: ((LinkedHashMap) value).entrySet()) {
@@ -1835,7 +1838,7 @@ private String toExampleValueRecursive(String modelName, Schema schema, Object o
return fullPrefix + example + closeChars;
} else if (ModelUtils.isStringSchema(schema)) {
if (example != null) {
- return fullPrefix + ensureQuotes(processStringValue(example)) + closeChars;
+ return fullPrefix + ensureQuotes(handleSpecialCharacters(example)) + closeChars;
}
if (ModelUtils.isDateSchema(schema)) {
if (objExample == null) {
@@ -2328,6 +2331,7 @@ protected void updatePropertyForAnyType(CodegenProperty property, Schema p) {
@Override
protected void updateModelForObject(CodegenModel m, Schema schema) {
+ // custom version of this method so properties are always added with addVars
if (schema.getProperties() != null || schema.getRequired() != null) {
// passing null to allProperties and allRequired as there's no parent
addVars(m, unaliasPropertySchema(schema.getProperties()), schema.getRequired(), null, null);
@@ -2336,6 +2340,7 @@ protected void updateModelForObject(CodegenModel m, Schema schema) {
addAdditionPropertiesToCodeGenModel(m, schema);
// process 'additionalProperties'
setAddProps(schema, m);
+ addRequiredVarsMap(schema, m);
}
@Override
@@ -2353,6 +2358,7 @@ protected void updateModelForAnyType(CodegenModel m, Schema schema) {
addAdditionPropertiesToCodeGenModel(m, schema);
// process 'additionalProperties'
setAddProps(schema, m);
+ addRequiredVarsMap(schema, m);
}
@Override
diff --git a/modules/openapi-generator/src/main/resources/python-experimental/model_templates/dict_partial.handlebars b/modules/openapi-generator/src/main/resources/python-experimental/model_templates/dict_partial.handlebars
index 15338b38f1db..94eadd05472b 100644
--- a/modules/openapi-generator/src/main/resources/python-experimental/model_templates/dict_partial.handlebars
+++ b/modules/openapi-generator/src/main/resources/python-experimental/model_templates/dict_partial.handlebars
@@ -1,9 +1,9 @@
-{{#if getHasRequired}}
- _required_property_names = set((
- {{#each requiredVars}}
- '{{baseName}}',
+{{#if getRequiredVarsMap}}
+ _required_property_names = {
+ {{#each getRequiredVarsMap}}
+ "{{{@key}}}",
{{/each}}
- ))
+ }
{{/if}}
{{#each vars}}
{{#if complexType}}
diff --git a/modules/openapi-generator/src/main/resources/python-experimental/model_templates/new.handlebars b/modules/openapi-generator/src/main/resources/python-experimental/model_templates/new.handlebars
index a05493c42e3d..31177f07d0c0 100644
--- a/modules/openapi-generator/src/main/resources/python-experimental/model_templates/new.handlebars
+++ b/modules/openapi-generator/src/main/resources/python-experimental/model_templates/new.handlebars
@@ -3,10 +3,12 @@ def __new__(
*args: typing.Union[{{#if isAnyType}}dict, frozendict, str, date, datetime, int, float, decimal.Decimal, None, list, tuple, bytes{{/if}}{{#if isUnboundedInteger}}int, {{/if}}{{#if isNumber}}float, {{/if}}{{#if isBoolean}}bool, {{/if}}{{#if isArray}}list, tuple, {{/if}}{{#if isMap}}dict, frozendict, {{/if}}{{#if isString}}str, {{/if}}{{#if isNull}}None, {{/if}}],
{{#unless isNull}}
{{#if getHasRequired}}
-{{#each requiredVars}}
+{{#each getRequiredVarsMap}}
+{{#with this}}
{{#unless nameInSnakeCase}}
{{baseName}}: {{baseName}},
{{/unless}}
+{{/with}}
{{/each}}
{{/if}}
{{/unless}}
@@ -32,10 +34,12 @@ def __new__(
*args,
{{#unless isNull}}
{{#if getHasRequired}}
-{{#each requiredVars}}
+{{#each getRequiredVarsMap}}
+{{#with this}}
{{#unless nameInSnakeCase}}
{{baseName}}={{baseName}},
{{/unless}}
+{{/with}}
{{/each}}
{{/if}}
{{/unless}}
diff --git a/modules/openapi-generator/src/main/resources/python-experimental/model_templates/schema.handlebars b/modules/openapi-generator/src/main/resources/python-experimental/model_templates/schema.handlebars
index 8b5774184102..3fed0491def7 100644
--- a/modules/openapi-generator/src/main/resources/python-experimental/model_templates/schema.handlebars
+++ b/modules/openapi-generator/src/main/resources/python-experimental/model_templates/schema.handlebars
@@ -7,7 +7,7 @@
{{else}}
{{#or isMap isArray isAnyType}}
{{#if isMap}}
- {{#or hasVars hasValidation hasRequiredVars getHasDiscriminatorWithNonEmptyMapping}}
+ {{#or hasVars hasValidation getRequiredVarsMap getHasDiscriminatorWithNonEmptyMapping}}
{{> model_templates/schema_dict }}
{{else}}
{{#if additionalPropertiesIsAnyType}}
@@ -25,7 +25,7 @@
{{/or}}
{{/if}}
{{#if isAnyType}}
- {{#or isEnum hasVars hasValidation hasRequiredVars getHasDiscriminatorWithNonEmptyMapping items}}
+ {{#or isEnum hasVars hasValidation getRequiredVarsMap getHasDiscriminatorWithNonEmptyMapping items}}
{{> model_templates/schema_composed_or_anytype }}
{{else}}
{{> model_templates/var_equals_cls }}
diff --git a/modules/openapi-generator/src/main/resources/python-experimental/schema_doc.handlebars b/modules/openapi-generator/src/main/resources/python-experimental/schema_doc.handlebars
index 5fe246825e59..38e09c2306cb 100644
--- a/modules/openapi-generator/src/main/resources/python-experimental/schema_doc.handlebars
+++ b/modules/openapi-generator/src/main/resources/python-experimental/schema_doc.handlebars
@@ -7,8 +7,13 @@
#### Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
+ {{#each getRequiredVarsMap}}
+**{{{@key}}}** | {{#with this}}{{#unless complexType}}**{{dataType}}**{{/unless}}{{#if complexType}}[**{{dataType}}**]({{complexType}}.md){{/if}} | {{#if description}}{{description}}{{/if}} | {{#if isReadOnly}}[readonly] {{/if}}{{#if defaultValue}} if omitted the server will use the default value of {{{defaultValue}}}{{/if}}{{/with}}
+ {{/each}}
{{#each vars}}
+ {{#unless required}}
**{{baseName}}** | {{#unless complexType}}**{{dataType}}**{{/unless}}{{#if complexType}}[**{{dataType}}**]({{complexType}}.md){{/if}} | {{#if description}}{{description}}{{/if}} | {{#unless required}}[optional] {{/unless}}{{#if isReadOnly}}[readonly] {{/if}}{{#if defaultValue}} if omitted the server will use the default value of {{{defaultValue}}}{{/if}}
+ {{/unless}}
{{/each}}
{{#with additionalProperties}}
**any string name** | **{{dataType}}** | any string name can be used but the value must be the correct type | [optional]
diff --git a/modules/openapi-generator/src/main/resources/python-experimental/schemas.handlebars b/modules/openapi-generator/src/main/resources/python-experimental/schemas.handlebars
index a23f3a6a4fe7..3c75af2b8ed1 100644
--- a/modules/openapi-generator/src/main/resources/python-experimental/schemas.handlebars
+++ b/modules/openapi-generator/src/main/resources/python-experimental/schemas.handlebars
@@ -1061,7 +1061,7 @@ class DictBase(Discriminable):
"""
path_to_schemas = {}
for property_name, value in arg.items():
- if property_name in cls._required_property_names or property_name in cls._property_names:
+ if property_name in cls._property_names:
schema = getattr(cls, property_name)
elif cls._additional_properties:
schema = cls._additional_properties
diff --git a/modules/openapi-generator/src/test/resources/3_0/unit_test_spec/3_0_3_unit_test_spec.yaml b/modules/openapi-generator/src/test/resources/3_0/unit_test_spec/3_0_3_unit_test_spec.yaml
index 3caf4f5d0427..e0c8d0a1dfed 100644
--- a/modules/openapi-generator/src/test/resources/3_0/unit_test_spec/3_0_3_unit_test_spec.yaml
+++ b/modules/openapi-generator/src/test/resources/3_0/unit_test_spec/3_0_3_unit_test_spec.yaml
@@ -2196,6 +2196,42 @@ paths:
- path.post
- contentType_json
- oneOf
+ /requestBody/postOneofWithRequiredRequestBody:
+ post:
+ operationId: postOneofWithRequiredRequestBody
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/OneofWithRequired'
+ x-schema-test-examples:
+ $ref: '#/components/x-schema-test-examples/OneofWithRequired'
+ required: true
+ responses:
+ '200':
+ description: success
+ tags:
+ - operation.requestBody
+ - path.post
+ - contentType_json
+ - oneOf
+ /responseBody/postOneofWithRequiredResponseBodyForContentTypes:
+ post:
+ operationId: postOneofWithRequiredResponseBodyForContentTypes
+ responses:
+ '200':
+ description: success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/OneofWithRequired'
+ x-schema-test-examples:
+ $ref: '#/components/x-schema-test-examples/OneofWithRequired'
+ tags:
+ - response.content.contentType.schema
+ - path.post
+ - contentType_json
+ - oneOf
/requestBody/postNestedOneofToCheckValidationSemanticsRequestBody:
post:
operationId: postNestedOneofToCheckValidationSemanticsRequestBody
@@ -2736,6 +2772,42 @@ paths:
- path.post
- contentType_json
- required
+ /requestBody/postRequiredWithEscapedCharactersRequestBody:
+ post:
+ operationId: postRequiredWithEscapedCharactersRequestBody
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/RequiredWithEscapedCharacters'
+ x-schema-test-examples:
+ $ref: '#/components/x-schema-test-examples/RequiredWithEscapedCharacters'
+ required: true
+ responses:
+ '200':
+ description: success
+ tags:
+ - operation.requestBody
+ - path.post
+ - contentType_json
+ - required
+ /responseBody/postRequiredWithEscapedCharactersResponseBodyForContentTypes:
+ post:
+ operationId: postRequiredWithEscapedCharactersResponseBodyForContentTypes
+ responses:
+ '200':
+ description: success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/RequiredWithEscapedCharacters'
+ x-schema-test-examples:
+ $ref: '#/components/x-schema-test-examples/RequiredWithEscapedCharacters'
+ tags:
+ - response.content.contentType.schema
+ - path.post
+ - contentType_json
+ - required
/requestBody/postIntegerTypeMatchesIntegersRequestBody:
post:
operationId: postIntegerTypeMatchesIntegersRequestBody
@@ -3316,6 +3388,15 @@ components:
oneOf:
- type: number
- {}
+ OneofWithRequired:
+ type: object
+ oneOf:
+ - required:
+ - foo
+ - bar
+ - required:
+ - foo
+ - baz
NestedOneofToCheckValidationSemantics:
oneOf:
- oneOf:
@@ -3382,6 +3463,16 @@ components:
properties:
foo: {}
required: []
+ RequiredWithEscapedCharacters:
+ required:
+ - 'foo
+
+ bar'
+ - foo"bar
+ - foo\bar
+ - "foo\rbar"
+ - "foo\tbar"
+ - "foo\fbar"
IntegerTypeMatchesIntegers:
type: integer
NumberTypeMatchesNumbers:
@@ -4438,6 +4529,31 @@ components:
description: both valid - invalid
data: 123
valid: false
+ OneofWithRequired:
+ BothInvalidInvalid:
+ description: both invalid - invalid
+ data:
+ bar: 2
+ valid: false
+ FirstValidValid:
+ description: first valid - valid
+ data:
+ foo: 1
+ bar: 2
+ valid: true
+ SecondValidValid:
+ description: second valid - valid
+ data:
+ foo: 1
+ baz: 3
+ valid: true
+ BothValidInvalid:
+ description: both valid - invalid
+ data:
+ foo: 1
+ bar: 2
+ baz: 3
+ valid: false
NestedOneofToCheckValidationSemantics:
NullIsValid:
description: null is valid
@@ -4658,6 +4774,29 @@ components:
description: property not required
data: {}
valid: true
+ RequiredWithEscapedCharacters:
+ ObjectWithAllPropertiesPresentIsValid:
+ description: object with all properties present is valid
+ data:
+ ? 'foo
+
+ bar'
+ : 1
+ foo"bar: 1
+ foo\bar: 1
+ "foo\rbar": 1
+ "foo\tbar": 1
+ "foo\fbar": 1
+ valid: true
+ ObjectWithSomePropertiesMissingIsInvalid:
+ description: object with some properties missing is invalid
+ data:
+ ? 'foo
+
+ bar'
+ : '1'
+ foo"bar: '1'
+ valid: false
IntegerTypeMatchesIntegers:
AnIntegerIsAnInteger:
description: an integer is an integer
diff --git a/modules/openapi-generator/src/test/resources/3_0/unit_test_spec/spec_writer.py b/modules/openapi-generator/src/test/resources/3_0/unit_test_spec/spec_writer.py
index 7261aec2075d..aef9d513fc30 100644
--- a/modules/openapi-generator/src/test/resources/3_0/unit_test_spec/spec_writer.py
+++ b/modules/openapi-generator/src/test/resources/3_0/unit_test_spec/spec_writer.py
@@ -100,7 +100,6 @@ class ExclusionReason:
swagger_parser_anytype_bug = 'Swagger parser sets type incorrectly for this anyType schema https://github.com/swagger-api/swagger-parser/issues/1603'
component_ref_component_bug = 'A component refing another component does not work, issue at https://github.com/OpenAPITools/openapi-generator/issues/12730'
not_running_the_localhost_server = 'the openapo-generator is not running the localhost server needed to serve remoteRef files'
- required_vars_missing_for_anytype_schema_bug = 'fails because of a bug where required vars are forgotten, see issue https://github.com/OpenAPITools/openapi-generator/issues/8906'
v303_requires_that_the_default_value_is_an_allowed_type = 'v3.0.3 requires that the default value is an allowed type per the schema'
not_ref_import_missing = 'this test fails because of this open issue https://github.com/OpenAPITools/openapi-generator/issues/12756'
@@ -149,7 +148,6 @@ class ExclusionReason:
'oneOf with boolean schemas, one true': ExclusionReason.v303_does_not_support_boolean_schemas_in_location,
'oneOf with boolean schemas, more than one true': ExclusionReason.v303_does_not_support_boolean_schemas_in_location,
'oneOf with boolean schemas, all false': ExclusionReason.v303_does_not_support_boolean_schemas_in_location,
- 'oneOf with required': ExclusionReason.required_vars_missing_for_anytype_schema_bug,
},
(json_schema_test_draft, 'properties.json'): {
'properties, patternProperties, additionalProperties interaction': ExclusionReason.v303_does_not_support_patternProperties,
@@ -193,9 +191,6 @@ class ExclusionReason:
'fragment within remote ref': ExclusionReason.not_running_the_localhost_server,
'ref within remote ref': ExclusionReason.not_running_the_localhost_server,
},
- (json_schema_test_draft, 'required.json'): {
- 'required with escaped characters': ExclusionReason.required_vars_missing_for_anytype_schema_bug,
- },
(json_schema_test_draft, 'type.json'): {
'multiple types can be specified in an array': ExclusionReason.v303_does_not_support_array_of_types,
'type as array with one item': ExclusionReason.v303_does_not_support_array_of_types,
diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/.openapi-generator/FILES b/samples/openapi3/client/3_0_3_unit_test/python-experimental/.openapi-generator/FILES
index 5aafcd15a2c8..a24115946722 100644
--- a/samples/openapi3/client/3_0_3_unit_test/python-experimental/.openapi-generator/FILES
+++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/.openapi-generator/FILES
@@ -92,6 +92,7 @@ docs/models/Oneof.md
docs/models/OneofComplexTypes.md
docs/models/OneofWithBaseSchema.md
docs/models/OneofWithEmptySchema.md
+docs/models/OneofWithRequired.md
docs/models/PatternIsNotAnchored.md
docs/models/PatternValidation.md
docs/models/PropertiesWithEscapedCharacters.md
@@ -105,6 +106,7 @@ docs/models/RefInProperty.md
docs/models/RequiredDefaultValidation.md
docs/models/RequiredValidation.md
docs/models/RequiredWithEmptyArray.md
+docs/models/RequiredWithEscapedCharacters.md
docs/models/SimpleEnumValidation.md
docs/models/StringTypeMatchesStrings.md
docs/models/TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing.md
@@ -182,6 +184,7 @@ test/test_models/test_oneof.py
test/test_models/test_oneof_complex_types.py
test/test_models/test_oneof_with_base_schema.py
test/test_models/test_oneof_with_empty_schema.py
+test/test_models/test_oneof_with_required.py
test/test_models/test_pattern_is_not_anchored.py
test/test_models/test_pattern_validation.py
test/test_models/test_properties_with_escaped_characters.py
@@ -195,6 +198,7 @@ test/test_models/test_ref_in_property.py
test/test_models/test_required_default_validation.py
test/test_models/test_required_validation.py
test/test_models/test_required_with_empty_array.py
+test/test_models/test_required_with_escaped_characters.py
test/test_models/test_simple_enum_validation.py
test/test_models/test_string_type_matches_strings.py
test/test_models/test_the_default_keyword_does_not_do_anything_if_the_property_is_missing.py
@@ -300,6 +304,7 @@ unit_test_api/model/oneof.py
unit_test_api/model/oneof_complex_types.py
unit_test_api/model/oneof_with_base_schema.py
unit_test_api/model/oneof_with_empty_schema.py
+unit_test_api/model/oneof_with_required.py
unit_test_api/model/pattern_is_not_anchored.py
unit_test_api/model/pattern_validation.py
unit_test_api/model/properties_with_escaped_characters.py
@@ -313,6 +318,7 @@ unit_test_api/model/ref_in_property.py
unit_test_api/model/required_default_validation.py
unit_test_api/model/required_validation.py
unit_test_api/model/required_with_empty_array.py
+unit_test_api/model/required_with_escaped_characters.py
unit_test_api/model/simple_enum_validation.py
unit_test_api/model/string_type_matches_strings.py
unit_test_api/model/the_default_keyword_does_not_do_anything_if_the_property_is_missing.py
diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/README.md b/samples/openapi3/client/3_0_3_unit_test/python-experimental/README.md
index 97f7812b4d4b..86018df9fe3d 100644
--- a/samples/openapi3/client/3_0_3_unit_test/python-experimental/README.md
+++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/README.md
@@ -260,6 +260,8 @@ Class | Method | HTTP request | Description
*ContentTypeJsonApi* | [**post_oneof_with_base_schema_response_body_for_content_types**](docs/apis/tags/ContentTypeJsonApi.md#post_oneof_with_base_schema_response_body_for_content_types) | **post** /responseBody/postOneofWithBaseSchemaResponseBodyForContentTypes |
*ContentTypeJsonApi* | [**post_oneof_with_empty_schema_request_body**](docs/apis/tags/ContentTypeJsonApi.md#post_oneof_with_empty_schema_request_body) | **post** /requestBody/postOneofWithEmptySchemaRequestBody |
*ContentTypeJsonApi* | [**post_oneof_with_empty_schema_response_body_for_content_types**](docs/apis/tags/ContentTypeJsonApi.md#post_oneof_with_empty_schema_response_body_for_content_types) | **post** /responseBody/postOneofWithEmptySchemaResponseBodyForContentTypes |
+*ContentTypeJsonApi* | [**post_oneof_with_required_request_body**](docs/apis/tags/ContentTypeJsonApi.md#post_oneof_with_required_request_body) | **post** /requestBody/postOneofWithRequiredRequestBody |
+*ContentTypeJsonApi* | [**post_oneof_with_required_response_body_for_content_types**](docs/apis/tags/ContentTypeJsonApi.md#post_oneof_with_required_response_body_for_content_types) | **post** /responseBody/postOneofWithRequiredResponseBodyForContentTypes |
*ContentTypeJsonApi* | [**post_pattern_is_not_anchored_request_body**](docs/apis/tags/ContentTypeJsonApi.md#post_pattern_is_not_anchored_request_body) | **post** /requestBody/postPatternIsNotAnchoredRequestBody |
*ContentTypeJsonApi* | [**post_pattern_is_not_anchored_response_body_for_content_types**](docs/apis/tags/ContentTypeJsonApi.md#post_pattern_is_not_anchored_response_body_for_content_types) | **post** /responseBody/postPatternIsNotAnchoredResponseBodyForContentTypes |
*ContentTypeJsonApi* | [**post_pattern_validation_request_body**](docs/apis/tags/ContentTypeJsonApi.md#post_pattern_validation_request_body) | **post** /requestBody/postPatternValidationRequestBody |
@@ -286,6 +288,8 @@ Class | Method | HTTP request | Description
*ContentTypeJsonApi* | [**post_required_validation_response_body_for_content_types**](docs/apis/tags/ContentTypeJsonApi.md#post_required_validation_response_body_for_content_types) | **post** /responseBody/postRequiredValidationResponseBodyForContentTypes |
*ContentTypeJsonApi* | [**post_required_with_empty_array_request_body**](docs/apis/tags/ContentTypeJsonApi.md#post_required_with_empty_array_request_body) | **post** /requestBody/postRequiredWithEmptyArrayRequestBody |
*ContentTypeJsonApi* | [**post_required_with_empty_array_response_body_for_content_types**](docs/apis/tags/ContentTypeJsonApi.md#post_required_with_empty_array_response_body_for_content_types) | **post** /responseBody/postRequiredWithEmptyArrayResponseBodyForContentTypes |
+*ContentTypeJsonApi* | [**post_required_with_escaped_characters_request_body**](docs/apis/tags/ContentTypeJsonApi.md#post_required_with_escaped_characters_request_body) | **post** /requestBody/postRequiredWithEscapedCharactersRequestBody |
+*ContentTypeJsonApi* | [**post_required_with_escaped_characters_response_body_for_content_types**](docs/apis/tags/ContentTypeJsonApi.md#post_required_with_escaped_characters_response_body_for_content_types) | **post** /responseBody/postRequiredWithEscapedCharactersResponseBodyForContentTypes |
*ContentTypeJsonApi* | [**post_simple_enum_validation_request_body**](docs/apis/tags/ContentTypeJsonApi.md#post_simple_enum_validation_request_body) | **post** /requestBody/postSimpleEnumValidationRequestBody |
*ContentTypeJsonApi* | [**post_simple_enum_validation_response_body_for_content_types**](docs/apis/tags/ContentTypeJsonApi.md#post_simple_enum_validation_response_body_for_content_types) | **post** /responseBody/postSimpleEnumValidationResponseBodyForContentTypes |
*ContentTypeJsonApi* | [**post_string_type_matches_strings_request_body**](docs/apis/tags/ContentTypeJsonApi.md#post_string_type_matches_strings_request_body) | **post** /requestBody/postStringTypeMatchesStringsRequestBody |
@@ -388,6 +392,8 @@ Class | Method | HTTP request | Description
*OneOfApi* | [**post_oneof_with_base_schema_response_body_for_content_types**](docs/apis/tags/OneOfApi.md#post_oneof_with_base_schema_response_body_for_content_types) | **post** /responseBody/postOneofWithBaseSchemaResponseBodyForContentTypes |
*OneOfApi* | [**post_oneof_with_empty_schema_request_body**](docs/apis/tags/OneOfApi.md#post_oneof_with_empty_schema_request_body) | **post** /requestBody/postOneofWithEmptySchemaRequestBody |
*OneOfApi* | [**post_oneof_with_empty_schema_response_body_for_content_types**](docs/apis/tags/OneOfApi.md#post_oneof_with_empty_schema_response_body_for_content_types) | **post** /responseBody/postOneofWithEmptySchemaResponseBodyForContentTypes |
+*OneOfApi* | [**post_oneof_with_required_request_body**](docs/apis/tags/OneOfApi.md#post_oneof_with_required_request_body) | **post** /requestBody/postOneofWithRequiredRequestBody |
+*OneOfApi* | [**post_oneof_with_required_response_body_for_content_types**](docs/apis/tags/OneOfApi.md#post_oneof_with_required_response_body_for_content_types) | **post** /responseBody/postOneofWithRequiredResponseBodyForContentTypes |
*OperationRequestBodyApi* | [**post_additionalproperties_allows_a_schema_which_should_validate_request_body**](docs/apis/tags/OperationRequestBodyApi.md#post_additionalproperties_allows_a_schema_which_should_validate_request_body) | **post** /requestBody/postAdditionalpropertiesAllowsASchemaWhichShouldValidateRequestBody |
*OperationRequestBodyApi* | [**post_additionalproperties_are_allowed_by_default_request_body**](docs/apis/tags/OperationRequestBodyApi.md#post_additionalproperties_are_allowed_by_default_request_body) | **post** /requestBody/postAdditionalpropertiesAreAllowedByDefaultRequestBody |
*OperationRequestBodyApi* | [**post_additionalproperties_can_exist_by_itself_request_body**](docs/apis/tags/OperationRequestBodyApi.md#post_additionalproperties_can_exist_by_itself_request_body) | **post** /requestBody/postAdditionalpropertiesCanExistByItselfRequestBody |
@@ -451,6 +457,7 @@ Class | Method | HTTP request | Description
*OperationRequestBodyApi* | [**post_oneof_request_body**](docs/apis/tags/OperationRequestBodyApi.md#post_oneof_request_body) | **post** /requestBody/postOneofRequestBody |
*OperationRequestBodyApi* | [**post_oneof_with_base_schema_request_body**](docs/apis/tags/OperationRequestBodyApi.md#post_oneof_with_base_schema_request_body) | **post** /requestBody/postOneofWithBaseSchemaRequestBody |
*OperationRequestBodyApi* | [**post_oneof_with_empty_schema_request_body**](docs/apis/tags/OperationRequestBodyApi.md#post_oneof_with_empty_schema_request_body) | **post** /requestBody/postOneofWithEmptySchemaRequestBody |
+*OperationRequestBodyApi* | [**post_oneof_with_required_request_body**](docs/apis/tags/OperationRequestBodyApi.md#post_oneof_with_required_request_body) | **post** /requestBody/postOneofWithRequiredRequestBody |
*OperationRequestBodyApi* | [**post_pattern_is_not_anchored_request_body**](docs/apis/tags/OperationRequestBodyApi.md#post_pattern_is_not_anchored_request_body) | **post** /requestBody/postPatternIsNotAnchoredRequestBody |
*OperationRequestBodyApi* | [**post_pattern_validation_request_body**](docs/apis/tags/OperationRequestBodyApi.md#post_pattern_validation_request_body) | **post** /requestBody/postPatternValidationRequestBody |
*OperationRequestBodyApi* | [**post_properties_with_escaped_characters_request_body**](docs/apis/tags/OperationRequestBodyApi.md#post_properties_with_escaped_characters_request_body) | **post** /requestBody/postPropertiesWithEscapedCharactersRequestBody |
@@ -464,6 +471,7 @@ Class | Method | HTTP request | Description
*OperationRequestBodyApi* | [**post_required_default_validation_request_body**](docs/apis/tags/OperationRequestBodyApi.md#post_required_default_validation_request_body) | **post** /requestBody/postRequiredDefaultValidationRequestBody |
*OperationRequestBodyApi* | [**post_required_validation_request_body**](docs/apis/tags/OperationRequestBodyApi.md#post_required_validation_request_body) | **post** /requestBody/postRequiredValidationRequestBody |
*OperationRequestBodyApi* | [**post_required_with_empty_array_request_body**](docs/apis/tags/OperationRequestBodyApi.md#post_required_with_empty_array_request_body) | **post** /requestBody/postRequiredWithEmptyArrayRequestBody |
+*OperationRequestBodyApi* | [**post_required_with_escaped_characters_request_body**](docs/apis/tags/OperationRequestBodyApi.md#post_required_with_escaped_characters_request_body) | **post** /requestBody/postRequiredWithEscapedCharactersRequestBody |
*OperationRequestBodyApi* | [**post_simple_enum_validation_request_body**](docs/apis/tags/OperationRequestBodyApi.md#post_simple_enum_validation_request_body) | **post** /requestBody/postSimpleEnumValidationRequestBody |
*OperationRequestBodyApi* | [**post_string_type_matches_strings_request_body**](docs/apis/tags/OperationRequestBodyApi.md#post_string_type_matches_strings_request_body) | **post** /requestBody/postStringTypeMatchesStringsRequestBody |
*OperationRequestBodyApi* | [**post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body**](docs/apis/tags/OperationRequestBodyApi.md#post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body) | **post** /requestBody/postTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingRequestBody |
@@ -598,6 +606,8 @@ Class | Method | HTTP request | Description
*PathPostApi* | [**post_oneof_with_base_schema_response_body_for_content_types**](docs/apis/tags/PathPostApi.md#post_oneof_with_base_schema_response_body_for_content_types) | **post** /responseBody/postOneofWithBaseSchemaResponseBodyForContentTypes |
*PathPostApi* | [**post_oneof_with_empty_schema_request_body**](docs/apis/tags/PathPostApi.md#post_oneof_with_empty_schema_request_body) | **post** /requestBody/postOneofWithEmptySchemaRequestBody |
*PathPostApi* | [**post_oneof_with_empty_schema_response_body_for_content_types**](docs/apis/tags/PathPostApi.md#post_oneof_with_empty_schema_response_body_for_content_types) | **post** /responseBody/postOneofWithEmptySchemaResponseBodyForContentTypes |
+*PathPostApi* | [**post_oneof_with_required_request_body**](docs/apis/tags/PathPostApi.md#post_oneof_with_required_request_body) | **post** /requestBody/postOneofWithRequiredRequestBody |
+*PathPostApi* | [**post_oneof_with_required_response_body_for_content_types**](docs/apis/tags/PathPostApi.md#post_oneof_with_required_response_body_for_content_types) | **post** /responseBody/postOneofWithRequiredResponseBodyForContentTypes |
*PathPostApi* | [**post_pattern_is_not_anchored_request_body**](docs/apis/tags/PathPostApi.md#post_pattern_is_not_anchored_request_body) | **post** /requestBody/postPatternIsNotAnchoredRequestBody |
*PathPostApi* | [**post_pattern_is_not_anchored_response_body_for_content_types**](docs/apis/tags/PathPostApi.md#post_pattern_is_not_anchored_response_body_for_content_types) | **post** /responseBody/postPatternIsNotAnchoredResponseBodyForContentTypes |
*PathPostApi* | [**post_pattern_validation_request_body**](docs/apis/tags/PathPostApi.md#post_pattern_validation_request_body) | **post** /requestBody/postPatternValidationRequestBody |
@@ -624,6 +634,8 @@ Class | Method | HTTP request | Description
*PathPostApi* | [**post_required_validation_response_body_for_content_types**](docs/apis/tags/PathPostApi.md#post_required_validation_response_body_for_content_types) | **post** /responseBody/postRequiredValidationResponseBodyForContentTypes |
*PathPostApi* | [**post_required_with_empty_array_request_body**](docs/apis/tags/PathPostApi.md#post_required_with_empty_array_request_body) | **post** /requestBody/postRequiredWithEmptyArrayRequestBody |
*PathPostApi* | [**post_required_with_empty_array_response_body_for_content_types**](docs/apis/tags/PathPostApi.md#post_required_with_empty_array_response_body_for_content_types) | **post** /responseBody/postRequiredWithEmptyArrayResponseBodyForContentTypes |
+*PathPostApi* | [**post_required_with_escaped_characters_request_body**](docs/apis/tags/PathPostApi.md#post_required_with_escaped_characters_request_body) | **post** /requestBody/postRequiredWithEscapedCharactersRequestBody |
+*PathPostApi* | [**post_required_with_escaped_characters_response_body_for_content_types**](docs/apis/tags/PathPostApi.md#post_required_with_escaped_characters_response_body_for_content_types) | **post** /responseBody/postRequiredWithEscapedCharactersResponseBodyForContentTypes |
*PathPostApi* | [**post_simple_enum_validation_request_body**](docs/apis/tags/PathPostApi.md#post_simple_enum_validation_request_body) | **post** /requestBody/postSimpleEnumValidationRequestBody |
*PathPostApi* | [**post_simple_enum_validation_response_body_for_content_types**](docs/apis/tags/PathPostApi.md#post_simple_enum_validation_response_body_for_content_types) | **post** /responseBody/postSimpleEnumValidationResponseBodyForContentTypes |
*PathPostApi* | [**post_string_type_matches_strings_request_body**](docs/apis/tags/PathPostApi.md#post_string_type_matches_strings_request_body) | **post** /requestBody/postStringTypeMatchesStringsRequestBody |
@@ -654,6 +666,8 @@ Class | Method | HTTP request | Description
*RequiredApi* | [**post_required_validation_response_body_for_content_types**](docs/apis/tags/RequiredApi.md#post_required_validation_response_body_for_content_types) | **post** /responseBody/postRequiredValidationResponseBodyForContentTypes |
*RequiredApi* | [**post_required_with_empty_array_request_body**](docs/apis/tags/RequiredApi.md#post_required_with_empty_array_request_body) | **post** /requestBody/postRequiredWithEmptyArrayRequestBody |
*RequiredApi* | [**post_required_with_empty_array_response_body_for_content_types**](docs/apis/tags/RequiredApi.md#post_required_with_empty_array_response_body_for_content_types) | **post** /responseBody/postRequiredWithEmptyArrayResponseBodyForContentTypes |
+*RequiredApi* | [**post_required_with_escaped_characters_request_body**](docs/apis/tags/RequiredApi.md#post_required_with_escaped_characters_request_body) | **post** /requestBody/postRequiredWithEscapedCharactersRequestBody |
+*RequiredApi* | [**post_required_with_escaped_characters_response_body_for_content_types**](docs/apis/tags/RequiredApi.md#post_required_with_escaped_characters_response_body_for_content_types) | **post** /responseBody/postRequiredWithEscapedCharactersResponseBodyForContentTypes |
*ResponseContentContentTypeSchemaApi* | [**post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types**](docs/apis/tags/ResponseContentContentTypeSchemaApi.md#post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types) | **post** /responseBody/postAdditionalpropertiesAllowsASchemaWhichShouldValidateResponseBodyForContentTypes |
*ResponseContentContentTypeSchemaApi* | [**post_additionalproperties_are_allowed_by_default_response_body_for_content_types**](docs/apis/tags/ResponseContentContentTypeSchemaApi.md#post_additionalproperties_are_allowed_by_default_response_body_for_content_types) | **post** /responseBody/postAdditionalpropertiesAreAllowedByDefaultResponseBodyForContentTypes |
*ResponseContentContentTypeSchemaApi* | [**post_additionalproperties_can_exist_by_itself_response_body_for_content_types**](docs/apis/tags/ResponseContentContentTypeSchemaApi.md#post_additionalproperties_can_exist_by_itself_response_body_for_content_types) | **post** /responseBody/postAdditionalpropertiesCanExistByItselfResponseBodyForContentTypes |
@@ -717,6 +731,7 @@ Class | Method | HTTP request | Description
*ResponseContentContentTypeSchemaApi* | [**post_oneof_response_body_for_content_types**](docs/apis/tags/ResponseContentContentTypeSchemaApi.md#post_oneof_response_body_for_content_types) | **post** /responseBody/postOneofResponseBodyForContentTypes |
*ResponseContentContentTypeSchemaApi* | [**post_oneof_with_base_schema_response_body_for_content_types**](docs/apis/tags/ResponseContentContentTypeSchemaApi.md#post_oneof_with_base_schema_response_body_for_content_types) | **post** /responseBody/postOneofWithBaseSchemaResponseBodyForContentTypes |
*ResponseContentContentTypeSchemaApi* | [**post_oneof_with_empty_schema_response_body_for_content_types**](docs/apis/tags/ResponseContentContentTypeSchemaApi.md#post_oneof_with_empty_schema_response_body_for_content_types) | **post** /responseBody/postOneofWithEmptySchemaResponseBodyForContentTypes |
+*ResponseContentContentTypeSchemaApi* | [**post_oneof_with_required_response_body_for_content_types**](docs/apis/tags/ResponseContentContentTypeSchemaApi.md#post_oneof_with_required_response_body_for_content_types) | **post** /responseBody/postOneofWithRequiredResponseBodyForContentTypes |
*ResponseContentContentTypeSchemaApi* | [**post_pattern_is_not_anchored_response_body_for_content_types**](docs/apis/tags/ResponseContentContentTypeSchemaApi.md#post_pattern_is_not_anchored_response_body_for_content_types) | **post** /responseBody/postPatternIsNotAnchoredResponseBodyForContentTypes |
*ResponseContentContentTypeSchemaApi* | [**post_pattern_validation_response_body_for_content_types**](docs/apis/tags/ResponseContentContentTypeSchemaApi.md#post_pattern_validation_response_body_for_content_types) | **post** /responseBody/postPatternValidationResponseBodyForContentTypes |
*ResponseContentContentTypeSchemaApi* | [**post_properties_with_escaped_characters_response_body_for_content_types**](docs/apis/tags/ResponseContentContentTypeSchemaApi.md#post_properties_with_escaped_characters_response_body_for_content_types) | **post** /responseBody/postPropertiesWithEscapedCharactersResponseBodyForContentTypes |
@@ -730,6 +745,7 @@ Class | Method | HTTP request | Description
*ResponseContentContentTypeSchemaApi* | [**post_required_default_validation_response_body_for_content_types**](docs/apis/tags/ResponseContentContentTypeSchemaApi.md#post_required_default_validation_response_body_for_content_types) | **post** /responseBody/postRequiredDefaultValidationResponseBodyForContentTypes |
*ResponseContentContentTypeSchemaApi* | [**post_required_validation_response_body_for_content_types**](docs/apis/tags/ResponseContentContentTypeSchemaApi.md#post_required_validation_response_body_for_content_types) | **post** /responseBody/postRequiredValidationResponseBodyForContentTypes |
*ResponseContentContentTypeSchemaApi* | [**post_required_with_empty_array_response_body_for_content_types**](docs/apis/tags/ResponseContentContentTypeSchemaApi.md#post_required_with_empty_array_response_body_for_content_types) | **post** /responseBody/postRequiredWithEmptyArrayResponseBodyForContentTypes |
+*ResponseContentContentTypeSchemaApi* | [**post_required_with_escaped_characters_response_body_for_content_types**](docs/apis/tags/ResponseContentContentTypeSchemaApi.md#post_required_with_escaped_characters_response_body_for_content_types) | **post** /responseBody/postRequiredWithEscapedCharactersResponseBodyForContentTypes |
*ResponseContentContentTypeSchemaApi* | [**post_simple_enum_validation_response_body_for_content_types**](docs/apis/tags/ResponseContentContentTypeSchemaApi.md#post_simple_enum_validation_response_body_for_content_types) | **post** /responseBody/postSimpleEnumValidationResponseBodyForContentTypes |
*ResponseContentContentTypeSchemaApi* | [**post_string_type_matches_strings_response_body_for_content_types**](docs/apis/tags/ResponseContentContentTypeSchemaApi.md#post_string_type_matches_strings_response_body_for_content_types) | **post** /responseBody/postStringTypeMatchesStringsResponseBodyForContentTypes |
*ResponseContentContentTypeSchemaApi* | [**post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types**](docs/apis/tags/ResponseContentContentTypeSchemaApi.md#post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types) | **post** /responseBody/postTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingResponseBodyForContentTypes |
@@ -821,6 +837,7 @@ Class | Method | HTTP request | Description
- [OneofComplexTypes](docs/models/OneofComplexTypes.md)
- [OneofWithBaseSchema](docs/models/OneofWithBaseSchema.md)
- [OneofWithEmptySchema](docs/models/OneofWithEmptySchema.md)
+ - [OneofWithRequired](docs/models/OneofWithRequired.md)
- [PatternIsNotAnchored](docs/models/PatternIsNotAnchored.md)
- [PatternValidation](docs/models/PatternValidation.md)
- [PropertiesWithEscapedCharacters](docs/models/PropertiesWithEscapedCharacters.md)
@@ -834,6 +851,7 @@ Class | Method | HTTP request | Description
- [RequiredDefaultValidation](docs/models/RequiredDefaultValidation.md)
- [RequiredValidation](docs/models/RequiredValidation.md)
- [RequiredWithEmptyArray](docs/models/RequiredWithEmptyArray.md)
+ - [RequiredWithEscapedCharacters](docs/models/RequiredWithEscapedCharacters.md)
- [SimpleEnumValidation](docs/models/SimpleEnumValidation.md)
- [StringTypeMatchesStrings](docs/models/StringTypeMatchesStrings.md)
- [TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing](docs/models/TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing.md)
diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/docs/apis/tags/ContentTypeJsonApi.md b/samples/openapi3/client/3_0_3_unit_test/python-experimental/docs/apis/tags/ContentTypeJsonApi.md
index 73f50eff73ea..a4a9dddfd414 100644
--- a/samples/openapi3/client/3_0_3_unit_test/python-experimental/docs/apis/tags/ContentTypeJsonApi.md
+++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/docs/apis/tags/ContentTypeJsonApi.md
@@ -131,6 +131,8 @@ Method | HTTP request | Description
[**post_oneof_with_base_schema_response_body_for_content_types**](#post_oneof_with_base_schema_response_body_for_content_types) | **post** /responseBody/postOneofWithBaseSchemaResponseBodyForContentTypes |
[**post_oneof_with_empty_schema_request_body**](#post_oneof_with_empty_schema_request_body) | **post** /requestBody/postOneofWithEmptySchemaRequestBody |
[**post_oneof_with_empty_schema_response_body_for_content_types**](#post_oneof_with_empty_schema_response_body_for_content_types) | **post** /responseBody/postOneofWithEmptySchemaResponseBodyForContentTypes |
+[**post_oneof_with_required_request_body**](#post_oneof_with_required_request_body) | **post** /requestBody/postOneofWithRequiredRequestBody |
+[**post_oneof_with_required_response_body_for_content_types**](#post_oneof_with_required_response_body_for_content_types) | **post** /responseBody/postOneofWithRequiredResponseBodyForContentTypes |
[**post_pattern_is_not_anchored_request_body**](#post_pattern_is_not_anchored_request_body) | **post** /requestBody/postPatternIsNotAnchoredRequestBody |
[**post_pattern_is_not_anchored_response_body_for_content_types**](#post_pattern_is_not_anchored_response_body_for_content_types) | **post** /responseBody/postPatternIsNotAnchoredResponseBodyForContentTypes |
[**post_pattern_validation_request_body**](#post_pattern_validation_request_body) | **post** /requestBody/postPatternValidationRequestBody |
@@ -157,6 +159,8 @@ Method | HTTP request | Description
[**post_required_validation_response_body_for_content_types**](#post_required_validation_response_body_for_content_types) | **post** /responseBody/postRequiredValidationResponseBodyForContentTypes |
[**post_required_with_empty_array_request_body**](#post_required_with_empty_array_request_body) | **post** /requestBody/postRequiredWithEmptyArrayRequestBody |
[**post_required_with_empty_array_response_body_for_content_types**](#post_required_with_empty_array_response_body_for_content_types) | **post** /responseBody/postRequiredWithEmptyArrayResponseBodyForContentTypes |
+[**post_required_with_escaped_characters_request_body**](#post_required_with_escaped_characters_request_body) | **post** /requestBody/postRequiredWithEscapedCharactersRequestBody |
+[**post_required_with_escaped_characters_response_body_for_content_types**](#post_required_with_escaped_characters_response_body_for_content_types) | **post** /responseBody/postRequiredWithEscapedCharactersResponseBodyForContentTypes |
[**post_simple_enum_validation_request_body**](#post_simple_enum_validation_request_body) | **post** /requestBody/postSimpleEnumValidationRequestBody |
[**post_simple_enum_validation_response_body_for_content_types**](#post_simple_enum_validation_response_body_for_content_types) | **post** /responseBody/postSimpleEnumValidationResponseBodyForContentTypes |
[**post_string_type_matches_strings_request_body**](#post_string_type_matches_strings_request_body) | **post** /requestBody/postStringTypeMatchesStringsRequestBody |
@@ -8815,6 +8819,143 @@ No authorization required
[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md)
+# **post_oneof_with_required_request_body**
+
+> post_oneof_with_required_request_body(oneof_with_required)
+
+
+
+### Example
+
+```python
+import unit_test_api
+from unit_test_api.apis.tags import content_type_json_api
+from unit_test_api.model.oneof_with_required import OneofWithRequired
+from pprint import pprint
+# Defining the host is optional and defaults to https://someserver.com/v1
+# See configuration.py for a list of all supported configuration parameters.
+configuration = unit_test_api.Configuration(
+ host = "https://someserver.com/v1"
+)
+
+# Enter a context with an instance of the API client
+with unit_test_api.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = content_type_json_api.ContentTypeJsonApi(api_client)
+
+ # example passing only required values which don't have defaults set
+ body = OneofWithRequired()
+ try:
+ api_response = api_instance.post_oneof_with_required_request_body(
+ body=body,
+ )
+ except unit_test_api.ApiException as e:
+ print("Exception when calling ContentTypeJsonApi->post_oneof_with_required_request_body: %s\n" % e)
+```
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+body | typing.Union[SchemaForRequestBodyApplicationJson] | required |
+content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body
+stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file
+timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client
+skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned
+
+### body
+
+#### SchemaForRequestBodyApplicationJson
+Type | Description | Notes
+------------- | ------------- | -------------
+[**OneofWithRequired**](OneofWithRequired.md) | |
+
+
+### Return Types, Responses
+
+Code | Class | Description
+------------- | ------------- | -------------
+n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned
+200 | ApiResponseFor200 | success
+
+#### ApiResponseFor200
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+response | urllib3.HTTPResponse | Raw response |
+body | Unset | body was not defined |
+headers | Unset | headers were not defined |
+
+
+void (empty response body)
+
+### Authorization
+
+No authorization required
+
+[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md)
+
+# **post_oneof_with_required_response_body_for_content_types**
+
+> OneofWithRequired post_oneof_with_required_response_body_for_content_types()
+
+
+
+### Example
+
+```python
+import unit_test_api
+from unit_test_api.apis.tags import content_type_json_api
+from unit_test_api.model.oneof_with_required import OneofWithRequired
+from pprint import pprint
+# Defining the host is optional and defaults to https://someserver.com/v1
+# See configuration.py for a list of all supported configuration parameters.
+configuration = unit_test_api.Configuration(
+ host = "https://someserver.com/v1"
+)
+
+# Enter a context with an instance of the API client
+with unit_test_api.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = content_type_json_api.ContentTypeJsonApi(api_client)
+
+ # example, this endpoint has no required or optional parameters
+ try:
+ api_response = api_instance.post_oneof_with_required_response_body_for_content_types()
+ pprint(api_response)
+ except unit_test_api.ApiException as e:
+ print("Exception when calling ContentTypeJsonApi->post_oneof_with_required_response_body_for_content_types: %s\n" % e)
+```
+### Parameters
+This endpoint does not need any parameter.
+
+### Return Types, Responses
+
+Code | Class | Description
+------------- | ------------- | -------------
+n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned
+200 | ApiResponseFor200 | success
+
+#### ApiResponseFor200
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+response | urllib3.HTTPResponse | Raw response |
+body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | |
+headers | Unset | headers were not defined |
+
+#### SchemaFor200ResponseBodyApplicationJson
+Type | Description | Notes
+------------- | ------------- | -------------
+[**OneofWithRequired**](OneofWithRequired.md) | |
+
+
+
+[**OneofWithRequired**](OneofWithRequired.md)
+
+### Authorization
+
+No authorization required
+
+[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md)
+
# **post_pattern_is_not_anchored_request_body**
> post_pattern_is_not_anchored_request_body(body)
@@ -10600,6 +10741,155 @@ No authorization required
[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md)
+# **post_required_with_escaped_characters_request_body**
+
+> post_required_with_escaped_characters_request_body(body)
+
+
+
+### Example
+
+```python
+import unit_test_api
+from unit_test_api.apis.tags import content_type_json_api
+from pprint import pprint
+# Defining the host is optional and defaults to https://someserver.com/v1
+# See configuration.py for a list of all supported configuration parameters.
+configuration = unit_test_api.Configuration(
+ host = "https://someserver.com/v1"
+)
+
+# Enter a context with an instance of the API client
+with unit_test_api.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = content_type_json_api.ContentTypeJsonApi(api_client)
+
+ # example passing only required values which don't have defaults set
+ body = None
+ try:
+ api_response = api_instance.post_required_with_escaped_characters_request_body(
+ body=body,
+ )
+ except unit_test_api.ApiException as e:
+ print("Exception when calling ContentTypeJsonApi->post_required_with_escaped_characters_request_body: %s\n" % e)
+```
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+body | typing.Union[SchemaForRequestBodyApplicationJson] | required |
+content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body
+stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file
+timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client
+skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned
+
+### body
+
+#### SchemaForRequestBodyApplicationJson
+
+#### Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**foo\"bar** | **bool, date, datetime, dict, float, int, list, str, none_type** | |
+**foo\nbar** | **bool, date, datetime, dict, float, int, list, str, none_type** | |
+**foo\fbar** | **bool, date, datetime, dict, float, int, list, str, none_type** | |
+**foo\tbar** | **bool, date, datetime, dict, float, int, list, str, none_type** | |
+**foo\rbar** | **bool, date, datetime, dict, float, int, list, str, none_type** | |
+**foo\\bar** | **bool, date, datetime, dict, float, int, list, str, none_type** | |
+**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
+
+### Return Types, Responses
+
+Code | Class | Description
+------------- | ------------- | -------------
+n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned
+200 | ApiResponseFor200 | success
+
+#### ApiResponseFor200
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+response | urllib3.HTTPResponse | Raw response |
+body | Unset | body was not defined |
+headers | Unset | headers were not defined |
+
+
+void (empty response body)
+
+### Authorization
+
+No authorization required
+
+[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md)
+
+# **post_required_with_escaped_characters_response_body_for_content_types**
+
+> bool, date, datetime, dict, float, int, list, str, none_type post_required_with_escaped_characters_response_body_for_content_types()
+
+
+
+### Example
+
+```python
+import unit_test_api
+from unit_test_api.apis.tags import content_type_json_api
+from pprint import pprint
+# Defining the host is optional and defaults to https://someserver.com/v1
+# See configuration.py for a list of all supported configuration parameters.
+configuration = unit_test_api.Configuration(
+ host = "https://someserver.com/v1"
+)
+
+# Enter a context with an instance of the API client
+with unit_test_api.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = content_type_json_api.ContentTypeJsonApi(api_client)
+
+ # example, this endpoint has no required or optional parameters
+ try:
+ api_response = api_instance.post_required_with_escaped_characters_response_body_for_content_types()
+ pprint(api_response)
+ except unit_test_api.ApiException as e:
+ print("Exception when calling ContentTypeJsonApi->post_required_with_escaped_characters_response_body_for_content_types: %s\n" % e)
+```
+### Parameters
+This endpoint does not need any parameter.
+
+### Return Types, Responses
+
+Code | Class | Description
+------------- | ------------- | -------------
+n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned
+200 | ApiResponseFor200 | success
+
+#### ApiResponseFor200
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+response | urllib3.HTTPResponse | Raw response |
+body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | |
+headers | Unset | headers were not defined |
+
+#### SchemaFor200ResponseBodyApplicationJson
+
+#### Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**foo\"bar** | **bool, date, datetime, dict, float, int, list, str, none_type** | |
+**foo\nbar** | **bool, date, datetime, dict, float, int, list, str, none_type** | |
+**foo\fbar** | **bool, date, datetime, dict, float, int, list, str, none_type** | |
+**foo\tbar** | **bool, date, datetime, dict, float, int, list, str, none_type** | |
+**foo\rbar** | **bool, date, datetime, dict, float, int, list, str, none_type** | |
+**foo\\bar** | **bool, date, datetime, dict, float, int, list, str, none_type** | |
+**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
+
+
+**bool, date, datetime, dict, float, int, list, str, none_type**
+
+### Authorization
+
+No authorization required
+
+[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md)
+
# **post_simple_enum_validation_request_body**
> post_simple_enum_validation_request_body(body)
diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/docs/apis/tags/OneOfApi.md b/samples/openapi3/client/3_0_3_unit_test/python-experimental/docs/apis/tags/OneOfApi.md
index bd95adb06bf0..bf1f17391293 100644
--- a/samples/openapi3/client/3_0_3_unit_test/python-experimental/docs/apis/tags/OneOfApi.md
+++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/docs/apis/tags/OneOfApi.md
@@ -15,6 +15,8 @@ Method | HTTP request | Description
[**post_oneof_with_base_schema_response_body_for_content_types**](#post_oneof_with_base_schema_response_body_for_content_types) | **post** /responseBody/postOneofWithBaseSchemaResponseBodyForContentTypes |
[**post_oneof_with_empty_schema_request_body**](#post_oneof_with_empty_schema_request_body) | **post** /requestBody/postOneofWithEmptySchemaRequestBody |
[**post_oneof_with_empty_schema_response_body_for_content_types**](#post_oneof_with_empty_schema_response_body_for_content_types) | **post** /responseBody/postOneofWithEmptySchemaResponseBodyForContentTypes |
+[**post_oneof_with_required_request_body**](#post_oneof_with_required_request_body) | **post** /requestBody/postOneofWithRequiredRequestBody |
+[**post_oneof_with_required_response_body_for_content_types**](#post_oneof_with_required_response_body_for_content_types) | **post** /responseBody/postOneofWithRequiredResponseBodyForContentTypes |
# **post_nested_oneof_to_check_validation_semantics_request_body**
@@ -701,3 +703,140 @@ No authorization required
[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md)
+# **post_oneof_with_required_request_body**
+
+> post_oneof_with_required_request_body(oneof_with_required)
+
+
+
+### Example
+
+```python
+import unit_test_api
+from unit_test_api.apis.tags import one_of_api
+from unit_test_api.model.oneof_with_required import OneofWithRequired
+from pprint import pprint
+# Defining the host is optional and defaults to https://someserver.com/v1
+# See configuration.py for a list of all supported configuration parameters.
+configuration = unit_test_api.Configuration(
+ host = "https://someserver.com/v1"
+)
+
+# Enter a context with an instance of the API client
+with unit_test_api.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = one_of_api.OneOfApi(api_client)
+
+ # example passing only required values which don't have defaults set
+ body = OneofWithRequired()
+ try:
+ api_response = api_instance.post_oneof_with_required_request_body(
+ body=body,
+ )
+ except unit_test_api.ApiException as e:
+ print("Exception when calling OneOfApi->post_oneof_with_required_request_body: %s\n" % e)
+```
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+body | typing.Union[SchemaForRequestBodyApplicationJson] | required |
+content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body
+stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file
+timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client
+skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned
+
+### body
+
+#### SchemaForRequestBodyApplicationJson
+Type | Description | Notes
+------------- | ------------- | -------------
+[**OneofWithRequired**](OneofWithRequired.md) | |
+
+
+### Return Types, Responses
+
+Code | Class | Description
+------------- | ------------- | -------------
+n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned
+200 | ApiResponseFor200 | success
+
+#### ApiResponseFor200
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+response | urllib3.HTTPResponse | Raw response |
+body | Unset | body was not defined |
+headers | Unset | headers were not defined |
+
+
+void (empty response body)
+
+### Authorization
+
+No authorization required
+
+[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md)
+
+# **post_oneof_with_required_response_body_for_content_types**
+
+> OneofWithRequired post_oneof_with_required_response_body_for_content_types()
+
+
+
+### Example
+
+```python
+import unit_test_api
+from unit_test_api.apis.tags import one_of_api
+from unit_test_api.model.oneof_with_required import OneofWithRequired
+from pprint import pprint
+# Defining the host is optional and defaults to https://someserver.com/v1
+# See configuration.py for a list of all supported configuration parameters.
+configuration = unit_test_api.Configuration(
+ host = "https://someserver.com/v1"
+)
+
+# Enter a context with an instance of the API client
+with unit_test_api.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = one_of_api.OneOfApi(api_client)
+
+ # example, this endpoint has no required or optional parameters
+ try:
+ api_response = api_instance.post_oneof_with_required_response_body_for_content_types()
+ pprint(api_response)
+ except unit_test_api.ApiException as e:
+ print("Exception when calling OneOfApi->post_oneof_with_required_response_body_for_content_types: %s\n" % e)
+```
+### Parameters
+This endpoint does not need any parameter.
+
+### Return Types, Responses
+
+Code | Class | Description
+------------- | ------------- | -------------
+n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned
+200 | ApiResponseFor200 | success
+
+#### ApiResponseFor200
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+response | urllib3.HTTPResponse | Raw response |
+body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | |
+headers | Unset | headers were not defined |
+
+#### SchemaFor200ResponseBodyApplicationJson
+Type | Description | Notes
+------------- | ------------- | -------------
+[**OneofWithRequired**](OneofWithRequired.md) | |
+
+
+
+[**OneofWithRequired**](OneofWithRequired.md)
+
+### Authorization
+
+No authorization required
+
+[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md)
+
diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/docs/apis/tags/OperationRequestBodyApi.md b/samples/openapi3/client/3_0_3_unit_test/python-experimental/docs/apis/tags/OperationRequestBodyApi.md
index d1848dcf260d..1609be192864 100644
--- a/samples/openapi3/client/3_0_3_unit_test/python-experimental/docs/apis/tags/OperationRequestBodyApi.md
+++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/docs/apis/tags/OperationRequestBodyApi.md
@@ -68,6 +68,7 @@ Method | HTTP request | Description
[**post_oneof_request_body**](#post_oneof_request_body) | **post** /requestBody/postOneofRequestBody |
[**post_oneof_with_base_schema_request_body**](#post_oneof_with_base_schema_request_body) | **post** /requestBody/postOneofWithBaseSchemaRequestBody |
[**post_oneof_with_empty_schema_request_body**](#post_oneof_with_empty_schema_request_body) | **post** /requestBody/postOneofWithEmptySchemaRequestBody |
+[**post_oneof_with_required_request_body**](#post_oneof_with_required_request_body) | **post** /requestBody/postOneofWithRequiredRequestBody |
[**post_pattern_is_not_anchored_request_body**](#post_pattern_is_not_anchored_request_body) | **post** /requestBody/postPatternIsNotAnchoredRequestBody |
[**post_pattern_validation_request_body**](#post_pattern_validation_request_body) | **post** /requestBody/postPatternValidationRequestBody |
[**post_properties_with_escaped_characters_request_body**](#post_properties_with_escaped_characters_request_body) | **post** /requestBody/postPropertiesWithEscapedCharactersRequestBody |
@@ -81,6 +82,7 @@ Method | HTTP request | Description
[**post_required_default_validation_request_body**](#post_required_default_validation_request_body) | **post** /requestBody/postRequiredDefaultValidationRequestBody |
[**post_required_validation_request_body**](#post_required_validation_request_body) | **post** /requestBody/postRequiredValidationRequestBody |
[**post_required_with_empty_array_request_body**](#post_required_with_empty_array_request_body) | **post** /requestBody/postRequiredWithEmptyArrayRequestBody |
+[**post_required_with_escaped_characters_request_body**](#post_required_with_escaped_characters_request_body) | **post** /requestBody/postRequiredWithEscapedCharactersRequestBody |
[**post_simple_enum_validation_request_body**](#post_simple_enum_validation_request_body) | **post** /requestBody/postSimpleEnumValidationRequestBody |
[**post_string_type_matches_strings_request_body**](#post_string_type_matches_strings_request_body) | **post** /requestBody/postStringTypeMatchesStringsRequestBody |
[**post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body**](#post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body) | **post** /requestBody/postTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingRequestBody |
@@ -4758,6 +4760,80 @@ body | Unset | body was not defined |
headers | Unset | headers were not defined |
+void (empty response body)
+
+### Authorization
+
+No authorization required
+
+[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md)
+
+# **post_oneof_with_required_request_body**
+
+> post_oneof_with_required_request_body(oneof_with_required)
+
+
+
+### Example
+
+```python
+import unit_test_api
+from unit_test_api.apis.tags import operation_request_body_api
+from unit_test_api.model.oneof_with_required import OneofWithRequired
+from pprint import pprint
+# Defining the host is optional and defaults to https://someserver.com/v1
+# See configuration.py for a list of all supported configuration parameters.
+configuration = unit_test_api.Configuration(
+ host = "https://someserver.com/v1"
+)
+
+# Enter a context with an instance of the API client
+with unit_test_api.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = operation_request_body_api.OperationRequestBodyApi(api_client)
+
+ # example passing only required values which don't have defaults set
+ body = OneofWithRequired()
+ try:
+ api_response = api_instance.post_oneof_with_required_request_body(
+ body=body,
+ )
+ except unit_test_api.ApiException as e:
+ print("Exception when calling OperationRequestBodyApi->post_oneof_with_required_request_body: %s\n" % e)
+```
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+body | typing.Union[SchemaForRequestBodyApplicationJson] | required |
+content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body
+stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file
+timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client
+skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned
+
+### body
+
+#### SchemaForRequestBodyApplicationJson
+Type | Description | Notes
+------------- | ------------- | -------------
+[**OneofWithRequired**](OneofWithRequired.md) | |
+
+
+### Return Types, Responses
+
+Code | Class | Description
+------------- | ------------- | -------------
+n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned
+200 | ApiResponseFor200 | success
+
+#### ApiResponseFor200
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+response | urllib3.HTTPResponse | Raw response |
+body | Unset | body was not defined |
+headers | Unset | headers were not defined |
+
+
void (empty response body)
### Authorization
@@ -5724,6 +5800,86 @@ body | Unset | body was not defined |
headers | Unset | headers were not defined |
+void (empty response body)
+
+### Authorization
+
+No authorization required
+
+[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md)
+
+# **post_required_with_escaped_characters_request_body**
+
+> post_required_with_escaped_characters_request_body(body)
+
+
+
+### Example
+
+```python
+import unit_test_api
+from unit_test_api.apis.tags import operation_request_body_api
+from pprint import pprint
+# Defining the host is optional and defaults to https://someserver.com/v1
+# See configuration.py for a list of all supported configuration parameters.
+configuration = unit_test_api.Configuration(
+ host = "https://someserver.com/v1"
+)
+
+# Enter a context with an instance of the API client
+with unit_test_api.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = operation_request_body_api.OperationRequestBodyApi(api_client)
+
+ # example passing only required values which don't have defaults set
+ body = None
+ try:
+ api_response = api_instance.post_required_with_escaped_characters_request_body(
+ body=body,
+ )
+ except unit_test_api.ApiException as e:
+ print("Exception when calling OperationRequestBodyApi->post_required_with_escaped_characters_request_body: %s\n" % e)
+```
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+body | typing.Union[SchemaForRequestBodyApplicationJson] | required |
+content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body
+stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file
+timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client
+skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned
+
+### body
+
+#### SchemaForRequestBodyApplicationJson
+
+#### Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**foo\"bar** | **bool, date, datetime, dict, float, int, list, str, none_type** | |
+**foo\nbar** | **bool, date, datetime, dict, float, int, list, str, none_type** | |
+**foo\fbar** | **bool, date, datetime, dict, float, int, list, str, none_type** | |
+**foo\tbar** | **bool, date, datetime, dict, float, int, list, str, none_type** | |
+**foo\rbar** | **bool, date, datetime, dict, float, int, list, str, none_type** | |
+**foo\\bar** | **bool, date, datetime, dict, float, int, list, str, none_type** | |
+**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
+
+### Return Types, Responses
+
+Code | Class | Description
+------------- | ------------- | -------------
+n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned
+200 | ApiResponseFor200 | success
+
+#### ApiResponseFor200
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+response | urllib3.HTTPResponse | Raw response |
+body | Unset | body was not defined |
+headers | Unset | headers were not defined |
+
+
void (empty response body)
### Authorization
diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/docs/apis/tags/PathPostApi.md b/samples/openapi3/client/3_0_3_unit_test/python-experimental/docs/apis/tags/PathPostApi.md
index 35e1e50ebe1e..5936b9a0a983 100644
--- a/samples/openapi3/client/3_0_3_unit_test/python-experimental/docs/apis/tags/PathPostApi.md
+++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/docs/apis/tags/PathPostApi.md
@@ -131,6 +131,8 @@ Method | HTTP request | Description
[**post_oneof_with_base_schema_response_body_for_content_types**](#post_oneof_with_base_schema_response_body_for_content_types) | **post** /responseBody/postOneofWithBaseSchemaResponseBodyForContentTypes |
[**post_oneof_with_empty_schema_request_body**](#post_oneof_with_empty_schema_request_body) | **post** /requestBody/postOneofWithEmptySchemaRequestBody |
[**post_oneof_with_empty_schema_response_body_for_content_types**](#post_oneof_with_empty_schema_response_body_for_content_types) | **post** /responseBody/postOneofWithEmptySchemaResponseBodyForContentTypes |
+[**post_oneof_with_required_request_body**](#post_oneof_with_required_request_body) | **post** /requestBody/postOneofWithRequiredRequestBody |
+[**post_oneof_with_required_response_body_for_content_types**](#post_oneof_with_required_response_body_for_content_types) | **post** /responseBody/postOneofWithRequiredResponseBodyForContentTypes |
[**post_pattern_is_not_anchored_request_body**](#post_pattern_is_not_anchored_request_body) | **post** /requestBody/postPatternIsNotAnchoredRequestBody |
[**post_pattern_is_not_anchored_response_body_for_content_types**](#post_pattern_is_not_anchored_response_body_for_content_types) | **post** /responseBody/postPatternIsNotAnchoredResponseBodyForContentTypes |
[**post_pattern_validation_request_body**](#post_pattern_validation_request_body) | **post** /requestBody/postPatternValidationRequestBody |
@@ -157,6 +159,8 @@ Method | HTTP request | Description
[**post_required_validation_response_body_for_content_types**](#post_required_validation_response_body_for_content_types) | **post** /responseBody/postRequiredValidationResponseBodyForContentTypes |
[**post_required_with_empty_array_request_body**](#post_required_with_empty_array_request_body) | **post** /requestBody/postRequiredWithEmptyArrayRequestBody |
[**post_required_with_empty_array_response_body_for_content_types**](#post_required_with_empty_array_response_body_for_content_types) | **post** /responseBody/postRequiredWithEmptyArrayResponseBodyForContentTypes |
+[**post_required_with_escaped_characters_request_body**](#post_required_with_escaped_characters_request_body) | **post** /requestBody/postRequiredWithEscapedCharactersRequestBody |
+[**post_required_with_escaped_characters_response_body_for_content_types**](#post_required_with_escaped_characters_response_body_for_content_types) | **post** /responseBody/postRequiredWithEscapedCharactersResponseBodyForContentTypes |
[**post_simple_enum_validation_request_body**](#post_simple_enum_validation_request_body) | **post** /requestBody/postSimpleEnumValidationRequestBody |
[**post_simple_enum_validation_response_body_for_content_types**](#post_simple_enum_validation_response_body_for_content_types) | **post** /responseBody/postSimpleEnumValidationResponseBodyForContentTypes |
[**post_string_type_matches_strings_request_body**](#post_string_type_matches_strings_request_body) | **post** /requestBody/postStringTypeMatchesStringsRequestBody |
@@ -8815,6 +8819,143 @@ No authorization required
[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md)
+# **post_oneof_with_required_request_body**
+
+> post_oneof_with_required_request_body(oneof_with_required)
+
+
+
+### Example
+
+```python
+import unit_test_api
+from unit_test_api.apis.tags import path_post_api
+from unit_test_api.model.oneof_with_required import OneofWithRequired
+from pprint import pprint
+# Defining the host is optional and defaults to https://someserver.com/v1
+# See configuration.py for a list of all supported configuration parameters.
+configuration = unit_test_api.Configuration(
+ host = "https://someserver.com/v1"
+)
+
+# Enter a context with an instance of the API client
+with unit_test_api.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = path_post_api.PathPostApi(api_client)
+
+ # example passing only required values which don't have defaults set
+ body = OneofWithRequired()
+ try:
+ api_response = api_instance.post_oneof_with_required_request_body(
+ body=body,
+ )
+ except unit_test_api.ApiException as e:
+ print("Exception when calling PathPostApi->post_oneof_with_required_request_body: %s\n" % e)
+```
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+body | typing.Union[SchemaForRequestBodyApplicationJson] | required |
+content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body
+stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file
+timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client
+skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned
+
+### body
+
+#### SchemaForRequestBodyApplicationJson
+Type | Description | Notes
+------------- | ------------- | -------------
+[**OneofWithRequired**](OneofWithRequired.md) | |
+
+
+### Return Types, Responses
+
+Code | Class | Description
+------------- | ------------- | -------------
+n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned
+200 | ApiResponseFor200 | success
+
+#### ApiResponseFor200
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+response | urllib3.HTTPResponse | Raw response |
+body | Unset | body was not defined |
+headers | Unset | headers were not defined |
+
+
+void (empty response body)
+
+### Authorization
+
+No authorization required
+
+[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md)
+
+# **post_oneof_with_required_response_body_for_content_types**
+
+> OneofWithRequired post_oneof_with_required_response_body_for_content_types()
+
+
+
+### Example
+
+```python
+import unit_test_api
+from unit_test_api.apis.tags import path_post_api
+from unit_test_api.model.oneof_with_required import OneofWithRequired
+from pprint import pprint
+# Defining the host is optional and defaults to https://someserver.com/v1
+# See configuration.py for a list of all supported configuration parameters.
+configuration = unit_test_api.Configuration(
+ host = "https://someserver.com/v1"
+)
+
+# Enter a context with an instance of the API client
+with unit_test_api.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = path_post_api.PathPostApi(api_client)
+
+ # example, this endpoint has no required or optional parameters
+ try:
+ api_response = api_instance.post_oneof_with_required_response_body_for_content_types()
+ pprint(api_response)
+ except unit_test_api.ApiException as e:
+ print("Exception when calling PathPostApi->post_oneof_with_required_response_body_for_content_types: %s\n" % e)
+```
+### Parameters
+This endpoint does not need any parameter.
+
+### Return Types, Responses
+
+Code | Class | Description
+------------- | ------------- | -------------
+n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned
+200 | ApiResponseFor200 | success
+
+#### ApiResponseFor200
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+response | urllib3.HTTPResponse | Raw response |
+body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | |
+headers | Unset | headers were not defined |
+
+#### SchemaFor200ResponseBodyApplicationJson
+Type | Description | Notes
+------------- | ------------- | -------------
+[**OneofWithRequired**](OneofWithRequired.md) | |
+
+
+
+[**OneofWithRequired**](OneofWithRequired.md)
+
+### Authorization
+
+No authorization required
+
+[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md)
+
# **post_pattern_is_not_anchored_request_body**
> post_pattern_is_not_anchored_request_body(body)
@@ -10600,6 +10741,155 @@ No authorization required
[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md)
+# **post_required_with_escaped_characters_request_body**
+
+> post_required_with_escaped_characters_request_body(body)
+
+
+
+### Example
+
+```python
+import unit_test_api
+from unit_test_api.apis.tags import path_post_api
+from pprint import pprint
+# Defining the host is optional and defaults to https://someserver.com/v1
+# See configuration.py for a list of all supported configuration parameters.
+configuration = unit_test_api.Configuration(
+ host = "https://someserver.com/v1"
+)
+
+# Enter a context with an instance of the API client
+with unit_test_api.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = path_post_api.PathPostApi(api_client)
+
+ # example passing only required values which don't have defaults set
+ body = None
+ try:
+ api_response = api_instance.post_required_with_escaped_characters_request_body(
+ body=body,
+ )
+ except unit_test_api.ApiException as e:
+ print("Exception when calling PathPostApi->post_required_with_escaped_characters_request_body: %s\n" % e)
+```
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+body | typing.Union[SchemaForRequestBodyApplicationJson] | required |
+content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body
+stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file
+timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client
+skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned
+
+### body
+
+#### SchemaForRequestBodyApplicationJson
+
+#### Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**foo\"bar** | **bool, date, datetime, dict, float, int, list, str, none_type** | |
+**foo\nbar** | **bool, date, datetime, dict, float, int, list, str, none_type** | |
+**foo\fbar** | **bool, date, datetime, dict, float, int, list, str, none_type** | |
+**foo\tbar** | **bool, date, datetime, dict, float, int, list, str, none_type** | |
+**foo\rbar** | **bool, date, datetime, dict, float, int, list, str, none_type** | |
+**foo\\bar** | **bool, date, datetime, dict, float, int, list, str, none_type** | |
+**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
+
+### Return Types, Responses
+
+Code | Class | Description
+------------- | ------------- | -------------
+n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned
+200 | ApiResponseFor200 | success
+
+#### ApiResponseFor200
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+response | urllib3.HTTPResponse | Raw response |
+body | Unset | body was not defined |
+headers | Unset | headers were not defined |
+
+
+void (empty response body)
+
+### Authorization
+
+No authorization required
+
+[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md)
+
+# **post_required_with_escaped_characters_response_body_for_content_types**
+
+> bool, date, datetime, dict, float, int, list, str, none_type post_required_with_escaped_characters_response_body_for_content_types()
+
+
+
+### Example
+
+```python
+import unit_test_api
+from unit_test_api.apis.tags import path_post_api
+from pprint import pprint
+# Defining the host is optional and defaults to https://someserver.com/v1
+# See configuration.py for a list of all supported configuration parameters.
+configuration = unit_test_api.Configuration(
+ host = "https://someserver.com/v1"
+)
+
+# Enter a context with an instance of the API client
+with unit_test_api.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = path_post_api.PathPostApi(api_client)
+
+ # example, this endpoint has no required or optional parameters
+ try:
+ api_response = api_instance.post_required_with_escaped_characters_response_body_for_content_types()
+ pprint(api_response)
+ except unit_test_api.ApiException as e:
+ print("Exception when calling PathPostApi->post_required_with_escaped_characters_response_body_for_content_types: %s\n" % e)
+```
+### Parameters
+This endpoint does not need any parameter.
+
+### Return Types, Responses
+
+Code | Class | Description
+------------- | ------------- | -------------
+n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned
+200 | ApiResponseFor200 | success
+
+#### ApiResponseFor200
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+response | urllib3.HTTPResponse | Raw response |
+body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | |
+headers | Unset | headers were not defined |
+
+#### SchemaFor200ResponseBodyApplicationJson
+
+#### Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**foo\"bar** | **bool, date, datetime, dict, float, int, list, str, none_type** | |
+**foo\nbar** | **bool, date, datetime, dict, float, int, list, str, none_type** | |
+**foo\fbar** | **bool, date, datetime, dict, float, int, list, str, none_type** | |
+**foo\tbar** | **bool, date, datetime, dict, float, int, list, str, none_type** | |
+**foo\rbar** | **bool, date, datetime, dict, float, int, list, str, none_type** | |
+**foo\\bar** | **bool, date, datetime, dict, float, int, list, str, none_type** | |
+**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
+
+
+**bool, date, datetime, dict, float, int, list, str, none_type**
+
+### Authorization
+
+No authorization required
+
+[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md)
+
# **post_simple_enum_validation_request_body**
> post_simple_enum_validation_request_body(body)
diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/docs/apis/tags/RequiredApi.md b/samples/openapi3/client/3_0_3_unit_test/python-experimental/docs/apis/tags/RequiredApi.md
index 7026a187a070..c6769312ecd6 100644
--- a/samples/openapi3/client/3_0_3_unit_test/python-experimental/docs/apis/tags/RequiredApi.md
+++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/docs/apis/tags/RequiredApi.md
@@ -11,6 +11,8 @@ Method | HTTP request | Description
[**post_required_validation_response_body_for_content_types**](#post_required_validation_response_body_for_content_types) | **post** /responseBody/postRequiredValidationResponseBodyForContentTypes |
[**post_required_with_empty_array_request_body**](#post_required_with_empty_array_request_body) | **post** /requestBody/postRequiredWithEmptyArrayRequestBody |
[**post_required_with_empty_array_response_body_for_content_types**](#post_required_with_empty_array_response_body_for_content_types) | **post** /responseBody/postRequiredWithEmptyArrayResponseBodyForContentTypes |
+[**post_required_with_escaped_characters_request_body**](#post_required_with_escaped_characters_request_body) | **post** /requestBody/postRequiredWithEscapedCharactersRequestBody |
+[**post_required_with_escaped_characters_response_body_for_content_types**](#post_required_with_escaped_characters_response_body_for_content_types) | **post** /responseBody/postRequiredWithEscapedCharactersResponseBodyForContentTypes |
# **post_required_default_validation_request_body**
@@ -423,3 +425,152 @@ No authorization required
[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md)
+# **post_required_with_escaped_characters_request_body**
+
+> post_required_with_escaped_characters_request_body(body)
+
+
+
+### Example
+
+```python
+import unit_test_api
+from unit_test_api.apis.tags import required_api
+from pprint import pprint
+# Defining the host is optional and defaults to https://someserver.com/v1
+# See configuration.py for a list of all supported configuration parameters.
+configuration = unit_test_api.Configuration(
+ host = "https://someserver.com/v1"
+)
+
+# Enter a context with an instance of the API client
+with unit_test_api.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = required_api.RequiredApi(api_client)
+
+ # example passing only required values which don't have defaults set
+ body = None
+ try:
+ api_response = api_instance.post_required_with_escaped_characters_request_body(
+ body=body,
+ )
+ except unit_test_api.ApiException as e:
+ print("Exception when calling RequiredApi->post_required_with_escaped_characters_request_body: %s\n" % e)
+```
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+body | typing.Union[SchemaForRequestBodyApplicationJson] | required |
+content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body
+stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file
+timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client
+skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned
+
+### body
+
+#### SchemaForRequestBodyApplicationJson
+
+#### Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**foo\"bar** | **bool, date, datetime, dict, float, int, list, str, none_type** | |
+**foo\nbar** | **bool, date, datetime, dict, float, int, list, str, none_type** | |
+**foo\fbar** | **bool, date, datetime, dict, float, int, list, str, none_type** | |
+**foo\tbar** | **bool, date, datetime, dict, float, int, list, str, none_type** | |
+**foo\rbar** | **bool, date, datetime, dict, float, int, list, str, none_type** | |
+**foo\\bar** | **bool, date, datetime, dict, float, int, list, str, none_type** | |
+**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
+
+### Return Types, Responses
+
+Code | Class | Description
+------------- | ------------- | -------------
+n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned
+200 | ApiResponseFor200 | success
+
+#### ApiResponseFor200
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+response | urllib3.HTTPResponse | Raw response |
+body | Unset | body was not defined |
+headers | Unset | headers were not defined |
+
+
+void (empty response body)
+
+### Authorization
+
+No authorization required
+
+[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md)
+
+# **post_required_with_escaped_characters_response_body_for_content_types**
+
+> bool, date, datetime, dict, float, int, list, str, none_type post_required_with_escaped_characters_response_body_for_content_types()
+
+
+
+### Example
+
+```python
+import unit_test_api
+from unit_test_api.apis.tags import required_api
+from pprint import pprint
+# Defining the host is optional and defaults to https://someserver.com/v1
+# See configuration.py for a list of all supported configuration parameters.
+configuration = unit_test_api.Configuration(
+ host = "https://someserver.com/v1"
+)
+
+# Enter a context with an instance of the API client
+with unit_test_api.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = required_api.RequiredApi(api_client)
+
+ # example, this endpoint has no required or optional parameters
+ try:
+ api_response = api_instance.post_required_with_escaped_characters_response_body_for_content_types()
+ pprint(api_response)
+ except unit_test_api.ApiException as e:
+ print("Exception when calling RequiredApi->post_required_with_escaped_characters_response_body_for_content_types: %s\n" % e)
+```
+### Parameters
+This endpoint does not need any parameter.
+
+### Return Types, Responses
+
+Code | Class | Description
+------------- | ------------- | -------------
+n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned
+200 | ApiResponseFor200 | success
+
+#### ApiResponseFor200
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+response | urllib3.HTTPResponse | Raw response |
+body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | |
+headers | Unset | headers were not defined |
+
+#### SchemaFor200ResponseBodyApplicationJson
+
+#### Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**foo\"bar** | **bool, date, datetime, dict, float, int, list, str, none_type** | |
+**foo\nbar** | **bool, date, datetime, dict, float, int, list, str, none_type** | |
+**foo\fbar** | **bool, date, datetime, dict, float, int, list, str, none_type** | |
+**foo\tbar** | **bool, date, datetime, dict, float, int, list, str, none_type** | |
+**foo\rbar** | **bool, date, datetime, dict, float, int, list, str, none_type** | |
+**foo\\bar** | **bool, date, datetime, dict, float, int, list, str, none_type** | |
+**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
+
+
+**bool, date, datetime, dict, float, int, list, str, none_type**
+
+### Authorization
+
+No authorization required
+
+[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md)
+
diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/docs/apis/tags/ResponseContentContentTypeSchemaApi.md b/samples/openapi3/client/3_0_3_unit_test/python-experimental/docs/apis/tags/ResponseContentContentTypeSchemaApi.md
index 1ea618731dfd..d7d4128a64ce 100644
--- a/samples/openapi3/client/3_0_3_unit_test/python-experimental/docs/apis/tags/ResponseContentContentTypeSchemaApi.md
+++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/docs/apis/tags/ResponseContentContentTypeSchemaApi.md
@@ -68,6 +68,7 @@ Method | HTTP request | Description
[**post_oneof_response_body_for_content_types**](#post_oneof_response_body_for_content_types) | **post** /responseBody/postOneofResponseBodyForContentTypes |
[**post_oneof_with_base_schema_response_body_for_content_types**](#post_oneof_with_base_schema_response_body_for_content_types) | **post** /responseBody/postOneofWithBaseSchemaResponseBodyForContentTypes |
[**post_oneof_with_empty_schema_response_body_for_content_types**](#post_oneof_with_empty_schema_response_body_for_content_types) | **post** /responseBody/postOneofWithEmptySchemaResponseBodyForContentTypes |
+[**post_oneof_with_required_response_body_for_content_types**](#post_oneof_with_required_response_body_for_content_types) | **post** /responseBody/postOneofWithRequiredResponseBodyForContentTypes |
[**post_pattern_is_not_anchored_response_body_for_content_types**](#post_pattern_is_not_anchored_response_body_for_content_types) | **post** /responseBody/postPatternIsNotAnchoredResponseBodyForContentTypes |
[**post_pattern_validation_response_body_for_content_types**](#post_pattern_validation_response_body_for_content_types) | **post** /responseBody/postPatternValidationResponseBodyForContentTypes |
[**post_properties_with_escaped_characters_response_body_for_content_types**](#post_properties_with_escaped_characters_response_body_for_content_types) | **post** /responseBody/postPropertiesWithEscapedCharactersResponseBodyForContentTypes |
@@ -81,6 +82,7 @@ Method | HTTP request | Description
[**post_required_default_validation_response_body_for_content_types**](#post_required_default_validation_response_body_for_content_types) | **post** /responseBody/postRequiredDefaultValidationResponseBodyForContentTypes |
[**post_required_validation_response_body_for_content_types**](#post_required_validation_response_body_for_content_types) | **post** /responseBody/postRequiredValidationResponseBodyForContentTypes |
[**post_required_with_empty_array_response_body_for_content_types**](#post_required_with_empty_array_response_body_for_content_types) | **post** /responseBody/postRequiredWithEmptyArrayResponseBodyForContentTypes |
+[**post_required_with_escaped_characters_response_body_for_content_types**](#post_required_with_escaped_characters_response_body_for_content_types) | **post** /responseBody/postRequiredWithEscapedCharactersResponseBodyForContentTypes |
[**post_simple_enum_validation_response_body_for_content_types**](#post_simple_enum_validation_response_body_for_content_types) | **post** /responseBody/postSimpleEnumValidationResponseBodyForContentTypes |
[**post_string_type_matches_strings_response_body_for_content_types**](#post_string_type_matches_strings_response_body_for_content_types) | **post** /responseBody/postStringTypeMatchesStringsResponseBodyForContentTypes |
[**post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types**](#post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types) | **post** /responseBody/postTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingResponseBodyForContentTypes |
@@ -4055,6 +4057,69 @@ No authorization required
[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md)
+# **post_oneof_with_required_response_body_for_content_types**
+
+> OneofWithRequired post_oneof_with_required_response_body_for_content_types()
+
+
+
+### Example
+
+```python
+import unit_test_api
+from unit_test_api.apis.tags import response_content_content_type_schema_api
+from unit_test_api.model.oneof_with_required import OneofWithRequired
+from pprint import pprint
+# Defining the host is optional and defaults to https://someserver.com/v1
+# See configuration.py for a list of all supported configuration parameters.
+configuration = unit_test_api.Configuration(
+ host = "https://someserver.com/v1"
+)
+
+# Enter a context with an instance of the API client
+with unit_test_api.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client)
+
+ # example, this endpoint has no required or optional parameters
+ try:
+ api_response = api_instance.post_oneof_with_required_response_body_for_content_types()
+ pprint(api_response)
+ except unit_test_api.ApiException as e:
+ print("Exception when calling ResponseContentContentTypeSchemaApi->post_oneof_with_required_response_body_for_content_types: %s\n" % e)
+```
+### Parameters
+This endpoint does not need any parameter.
+
+### Return Types, Responses
+
+Code | Class | Description
+------------- | ------------- | -------------
+n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned
+200 | ApiResponseFor200 | success
+
+#### ApiResponseFor200
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+response | urllib3.HTTPResponse | Raw response |
+body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | |
+headers | Unset | headers were not defined |
+
+#### SchemaFor200ResponseBodyApplicationJson
+Type | Description | Notes
+------------- | ------------- | -------------
+[**OneofWithRequired**](OneofWithRequired.md) | |
+
+
+
+[**OneofWithRequired**](OneofWithRequired.md)
+
+### Authorization
+
+No authorization required
+
+[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md)
+
# **post_pattern_is_not_anchored_response_body_for_content_types**
> PatternIsNotAnchored post_pattern_is_not_anchored_response_body_for_content_types()
@@ -4874,6 +4939,75 @@ No authorization required
[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md)
+# **post_required_with_escaped_characters_response_body_for_content_types**
+
+> bool, date, datetime, dict, float, int, list, str, none_type post_required_with_escaped_characters_response_body_for_content_types()
+
+
+
+### Example
+
+```python
+import unit_test_api
+from unit_test_api.apis.tags import response_content_content_type_schema_api
+from pprint import pprint
+# Defining the host is optional and defaults to https://someserver.com/v1
+# See configuration.py for a list of all supported configuration parameters.
+configuration = unit_test_api.Configuration(
+ host = "https://someserver.com/v1"
+)
+
+# Enter a context with an instance of the API client
+with unit_test_api.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client)
+
+ # example, this endpoint has no required or optional parameters
+ try:
+ api_response = api_instance.post_required_with_escaped_characters_response_body_for_content_types()
+ pprint(api_response)
+ except unit_test_api.ApiException as e:
+ print("Exception when calling ResponseContentContentTypeSchemaApi->post_required_with_escaped_characters_response_body_for_content_types: %s\n" % e)
+```
+### Parameters
+This endpoint does not need any parameter.
+
+### Return Types, Responses
+
+Code | Class | Description
+------------- | ------------- | -------------
+n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned
+200 | ApiResponseFor200 | success
+
+#### ApiResponseFor200
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+response | urllib3.HTTPResponse | Raw response |
+body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | |
+headers | Unset | headers were not defined |
+
+#### SchemaFor200ResponseBodyApplicationJson
+
+#### Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**foo\"bar** | **bool, date, datetime, dict, float, int, list, str, none_type** | |
+**foo\nbar** | **bool, date, datetime, dict, float, int, list, str, none_type** | |
+**foo\fbar** | **bool, date, datetime, dict, float, int, list, str, none_type** | |
+**foo\tbar** | **bool, date, datetime, dict, float, int, list, str, none_type** | |
+**foo\rbar** | **bool, date, datetime, dict, float, int, list, str, none_type** | |
+**foo\\bar** | **bool, date, datetime, dict, float, int, list, str, none_type** | |
+**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
+
+
+**bool, date, datetime, dict, float, int, list, str, none_type**
+
+### Authorization
+
+No authorization required
+
+[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md)
+
# **post_simple_enum_validation_response_body_for_content_types**
> SimpleEnumValidation post_simple_enum_validation_response_body_for_content_types()
diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/docs/models/EnumsInProperties.md b/samples/openapi3/client/3_0_3_unit_test/python-experimental/docs/models/EnumsInProperties.md
index 8aa254207112..322f4776069b 100644
--- a/samples/openapi3/client/3_0_3_unit_test/python-experimental/docs/models/EnumsInProperties.md
+++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/docs/models/EnumsInProperties.md
@@ -3,8 +3,8 @@
#### Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**foo** | **str** | | [optional]
**bar** | **str** | |
+**foo** | **str** | | [optional]
**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/docs/models/OneofWithRequired.md b/samples/openapi3/client/3_0_3_unit_test/python-experimental/docs/models/OneofWithRequired.md
new file mode 100644
index 000000000000..5924063332f8
--- /dev/null
+++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/docs/models/OneofWithRequired.md
@@ -0,0 +1,9 @@
+# unit_test_api.model.oneof_with_required.OneofWithRequired
+
+#### Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
+
+[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
+
diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/docs/models/RequiredWithEscapedCharacters.md b/samples/openapi3/client/3_0_3_unit_test/python-experimental/docs/models/RequiredWithEscapedCharacters.md
new file mode 100644
index 000000000000..fdbb47711519
--- /dev/null
+++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/docs/models/RequiredWithEscapedCharacters.md
@@ -0,0 +1,15 @@
+# unit_test_api.model.required_with_escaped_characters.RequiredWithEscapedCharacters
+
+#### Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**foo\"bar** | **bool, date, datetime, dict, float, int, list, str, none_type** | |
+**foo\nbar** | **bool, date, datetime, dict, float, int, list, str, none_type** | |
+**foo\fbar** | **bool, date, datetime, dict, float, int, list, str, none_type** | |
+**foo\tbar** | **bool, date, datetime, dict, float, int, list, str, none_type** | |
+**foo\rbar** | **bool, date, datetime, dict, float, int, list, str, none_type** | |
+**foo\\bar** | **bool, date, datetime, dict, float, int, list, str, none_type** | |
+**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
+
+[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
+
diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/test/test_models/test_oneof_with_required.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/test/test_models/test_oneof_with_required.py
new file mode 100644
index 000000000000..2d534dce7064
--- /dev/null
+++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/test/test_models/test_oneof_with_required.py
@@ -0,0 +1,75 @@
+# coding: utf-8
+
+"""
+ openapi 3.0.3 sample spec
+
+ sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501
+
+ The version of the OpenAPI document: 0.0.1
+ Generated by: https://openapi-generator.tech
+"""
+
+import unittest
+
+import unit_test_api
+from unit_test_api.model.oneof_with_required import OneofWithRequired
+from unit_test_api import configuration
+
+
+class TestOneofWithRequired(unittest.TestCase):
+ """OneofWithRequired unit test stubs"""
+ _configuration = configuration.Configuration()
+
+ def test_both_valid_invalid_fails(self):
+ # both valid - invalid
+ with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)):
+ OneofWithRequired._from_openapi_data(
+ {
+ "foo":
+ 1,
+ "bar":
+ 2,
+ "baz":
+ 3,
+ },
+ _configuration=self._configuration
+ )
+
+ def test_both_invalid_invalid_fails(self):
+ # both invalid - invalid
+ with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)):
+ OneofWithRequired._from_openapi_data(
+ {
+ "bar":
+ 2,
+ },
+ _configuration=self._configuration
+ )
+
+ def test_first_valid_valid_passes(self):
+ # first valid - valid
+ OneofWithRequired._from_openapi_data(
+ {
+ "foo":
+ 1,
+ "bar":
+ 2,
+ },
+ _configuration=self._configuration
+ )
+
+ def test_second_valid_valid_passes(self):
+ # second valid - valid
+ OneofWithRequired._from_openapi_data(
+ {
+ "foo":
+ 1,
+ "baz":
+ 3,
+ },
+ _configuration=self._configuration
+ )
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/test/test_models/test_required_with_escaped_characters.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/test/test_models/test_required_with_escaped_characters.py
new file mode 100644
index 000000000000..16ae0040c10e
--- /dev/null
+++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/test/test_models/test_required_with_escaped_characters.py
@@ -0,0 +1,58 @@
+# coding: utf-8
+
+"""
+ openapi 3.0.3 sample spec
+
+ sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501
+
+ The version of the OpenAPI document: 0.0.1
+ Generated by: https://openapi-generator.tech
+"""
+
+import unittest
+
+import unit_test_api
+from unit_test_api.model.required_with_escaped_characters import RequiredWithEscapedCharacters
+from unit_test_api import configuration
+
+
+class TestRequiredWithEscapedCharacters(unittest.TestCase):
+ """RequiredWithEscapedCharacters unit test stubs"""
+ _configuration = configuration.Configuration()
+
+ def test_object_with_some_properties_missing_is_invalid_fails(self):
+ # object with some properties missing is invalid
+ with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)):
+ RequiredWithEscapedCharacters._from_openapi_data(
+ {
+ "foo\nbar":
+ "1",
+ "foo\"bar":
+ "1",
+ },
+ _configuration=self._configuration
+ )
+
+ def test_object_with_all_properties_present_is_valid_passes(self):
+ # object with all properties present is valid
+ RequiredWithEscapedCharacters._from_openapi_data(
+ {
+ "foo\nbar":
+ 1,
+ "foo\"bar":
+ 1,
+ "foo\\bar":
+ 1,
+ "foo\rbar":
+ 1,
+ "foo\tbar":
+ 1,
+ "foo\fbar":
+ 1,
+ },
+ _configuration=self._configuration
+ )
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/test/test_paths/test_request_body_post_oneof_with_required_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/test/test_paths/test_request_body_post_oneof_with_required_request_body/__init__.py
new file mode 100644
index 000000000000..e69de29bb2d1
diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/test/test_paths/test_request_body_post_oneof_with_required_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/test/test_paths/test_request_body_post_oneof_with_required_request_body/test_post.py
new file mode 100644
index 000000000000..323941253d00
--- /dev/null
+++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/test/test_paths/test_request_body_post_oneof_with_required_request_body/test_post.py
@@ -0,0 +1,149 @@
+# coding: utf-8
+
+"""
+
+
+ Generated by: https://openapi-generator.tech
+"""
+
+import unittest
+from unittest.mock import patch
+
+import urllib3
+
+import unit_test_api
+from unit_test_api.paths.request_body_post_oneof_with_required_request_body import post # noqa: E501
+from unit_test_api import configuration, schemas, api_client
+
+from .. import ApiTestMixin
+
+
+class TestRequestBodyPostOneofWithRequiredRequestBody(ApiTestMixin, unittest.TestCase):
+ """
+ RequestBodyPostOneofWithRequiredRequestBody unit test stubs
+ """
+ _configuration = configuration.Configuration()
+
+ def setUp(self):
+ used_api_client = api_client.ApiClient(configuration=self._configuration)
+ self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501
+
+ def tearDown(self):
+ pass
+
+ response_status = 200
+ response_body = ''
+
+ def test_both_valid_invalid_fails(self):
+ content_type = 'application/json'
+ # both valid - invalid
+ with patch.object(urllib3.PoolManager, 'request') as mock_request:
+ payload = (
+ {
+ "foo":
+ 1,
+ "bar":
+ 2,
+ "baz":
+ 3,
+ }
+ )
+ with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)):
+ body = post.SchemaForRequestBodyApplicationJson._from_openapi_data(
+ payload,
+ _configuration=self._configuration
+ )
+ self.api.post(body=body)
+
+ def test_both_invalid_invalid_fails(self):
+ content_type = 'application/json'
+ # both invalid - invalid
+ with patch.object(urllib3.PoolManager, 'request') as mock_request:
+ payload = (
+ {
+ "bar":
+ 2,
+ }
+ )
+ with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)):
+ body = post.SchemaForRequestBodyApplicationJson._from_openapi_data(
+ payload,
+ _configuration=self._configuration
+ )
+ self.api.post(body=body)
+
+ def test_first_valid_valid_passes(self):
+ content_type = 'application/json'
+ # first valid - valid
+ with patch.object(urllib3.PoolManager, 'request') as mock_request:
+ payload = (
+ {
+ "foo":
+ 1,
+ "bar":
+ 2,
+ }
+ )
+ body = post.SchemaForRequestBodyApplicationJson._from_openapi_data(
+ payload,
+ _configuration=self._configuration
+ )
+ mock_request.return_value = self.response(
+ self.json_bytes(self.response_body),
+ status=self.response_status
+ )
+ api_response = self.api.post(
+ body=body,
+ content_type=content_type
+ )
+ self.assert_pool_manager_request_called_with(
+ mock_request,
+ self._configuration.host + '/requestBody/postOneofWithRequiredRequestBody',
+ method='post'.upper(),
+ body=self.json_bytes(payload),
+ content_type=content_type,
+ )
+
+ assert isinstance(api_response.response, urllib3.HTTPResponse)
+ assert isinstance(api_response.body, schemas.Unset)
+
+ def test_second_valid_valid_passes(self):
+ content_type = 'application/json'
+ # second valid - valid
+ with patch.object(urllib3.PoolManager, 'request') as mock_request:
+ payload = (
+ {
+ "foo":
+ 1,
+ "baz":
+ 3,
+ }
+ )
+ body = post.SchemaForRequestBodyApplicationJson._from_openapi_data(
+ payload,
+ _configuration=self._configuration
+ )
+ mock_request.return_value = self.response(
+ self.json_bytes(self.response_body),
+ status=self.response_status
+ )
+ api_response = self.api.post(
+ body=body,
+ content_type=content_type
+ )
+ self.assert_pool_manager_request_called_with(
+ mock_request,
+ self._configuration.host + '/requestBody/postOneofWithRequiredRequestBody',
+ method='post'.upper(),
+ body=self.json_bytes(payload),
+ content_type=content_type,
+ )
+
+ assert isinstance(api_response.response, urllib3.HTTPResponse)
+ assert isinstance(api_response.body, schemas.Unset)
+
+
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/test/test_paths/test_request_body_post_required_with_escaped_characters_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/test/test_paths/test_request_body_post_required_with_escaped_characters_request_body/__init__.py
new file mode 100644
index 000000000000..e69de29bb2d1
diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/test/test_paths/test_request_body_post_required_with_escaped_characters_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/test/test_paths/test_request_body_post_required_with_escaped_characters_request_body/test_post.py
new file mode 100644
index 000000000000..1d8e5fd75e6d
--- /dev/null
+++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/test/test_paths/test_request_body_post_required_with_escaped_characters_request_body/test_post.py
@@ -0,0 +1,103 @@
+# coding: utf-8
+
+"""
+
+
+ Generated by: https://openapi-generator.tech
+"""
+
+import unittest
+from unittest.mock import patch
+
+import urllib3
+
+import unit_test_api
+from unit_test_api.paths.request_body_post_required_with_escaped_characters_request_body import post # noqa: E501
+from unit_test_api import configuration, schemas, api_client
+
+from .. import ApiTestMixin
+
+
+class TestRequestBodyPostRequiredWithEscapedCharactersRequestBody(ApiTestMixin, unittest.TestCase):
+ """
+ RequestBodyPostRequiredWithEscapedCharactersRequestBody unit test stubs
+ """
+ _configuration = configuration.Configuration()
+
+ def setUp(self):
+ used_api_client = api_client.ApiClient(configuration=self._configuration)
+ self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501
+
+ def tearDown(self):
+ pass
+
+ response_status = 200
+ response_body = ''
+
+ def test_object_with_some_properties_missing_is_invalid_fails(self):
+ content_type = 'application/json'
+ # object with some properties missing is invalid
+ with patch.object(urllib3.PoolManager, 'request') as mock_request:
+ payload = (
+ {
+ "foo\nbar":
+ "1",
+ "foo\"bar":
+ "1",
+ }
+ )
+ with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)):
+ body = post.SchemaForRequestBodyApplicationJson._from_openapi_data(
+ payload,
+ _configuration=self._configuration
+ )
+ self.api.post(body=body)
+
+ def test_object_with_all_properties_present_is_valid_passes(self):
+ content_type = 'application/json'
+ # object with all properties present is valid
+ with patch.object(urllib3.PoolManager, 'request') as mock_request:
+ payload = (
+ {
+ "foo\nbar":
+ 1,
+ "foo\"bar":
+ 1,
+ "foo\\bar":
+ 1,
+ "foo\rbar":
+ 1,
+ "foo\tbar":
+ 1,
+ "foo\fbar":
+ 1,
+ }
+ )
+ body = post.SchemaForRequestBodyApplicationJson._from_openapi_data(
+ payload,
+ _configuration=self._configuration
+ )
+ mock_request.return_value = self.response(
+ self.json_bytes(self.response_body),
+ status=self.response_status
+ )
+ api_response = self.api.post(
+ body=body,
+ content_type=content_type
+ )
+ self.assert_pool_manager_request_called_with(
+ mock_request,
+ self._configuration.host + '/requestBody/postRequiredWithEscapedCharactersRequestBody',
+ method='post'.upper(),
+ body=self.json_bytes(payload),
+ content_type=content_type,
+ )
+
+ assert isinstance(api_response.response, urllib3.HTTPResponse)
+ assert isinstance(api_response.body, schemas.Unset)
+
+
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/test/test_paths/test_response_body_post_oneof_with_required_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/test/test_paths/test_response_body_post_oneof_with_required_response_body_for_content_types/__init__.py
new file mode 100644
index 000000000000..e69de29bb2d1
diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/test/test_paths/test_response_body_post_oneof_with_required_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/test/test_paths/test_response_body_post_oneof_with_required_response_body_for_content_types/test_post.py
new file mode 100644
index 000000000000..ffe318fb0378
--- /dev/null
+++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/test/test_paths/test_response_body_post_oneof_with_required_response_body_for_content_types/test_post.py
@@ -0,0 +1,168 @@
+# coding: utf-8
+
+"""
+
+
+ Generated by: https://openapi-generator.tech
+"""
+
+import unittest
+from unittest.mock import patch
+
+import urllib3
+
+import unit_test_api
+from unit_test_api.paths.response_body_post_oneof_with_required_response_body_for_content_types import post # noqa: E501
+from unit_test_api import configuration, schemas, api_client
+
+from .. import ApiTestMixin
+
+
+class TestResponseBodyPostOneofWithRequiredResponseBodyForContentTypes(ApiTestMixin, unittest.TestCase):
+ """
+ ResponseBodyPostOneofWithRequiredResponseBodyForContentTypes unit test stubs
+ """
+ _configuration = configuration.Configuration()
+
+ def setUp(self):
+ used_api_client = api_client.ApiClient(configuration=self._configuration)
+ self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501
+
+ def tearDown(self):
+ pass
+
+ response_status = 200
+
+ def test_both_valid_invalid_fails(self):
+ # both valid - invalid
+ accept_content_type = 'application/json'
+
+ with patch.object(urllib3.PoolManager, 'request') as mock_request:
+ payload = (
+ {
+ "foo":
+ 1,
+ "bar":
+ 2,
+ "baz":
+ 3,
+ }
+ )
+ mock_request.return_value = self.response(
+ self.json_bytes(payload),
+ status=self.response_status
+ )
+ with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)):
+ self.api.post(
+ accept_content_types=(accept_content_type,)
+ )
+ self.assert_pool_manager_request_called_with(
+ mock_request,
+ self._configuration.host + '/responseBody/postOneofWithRequiredResponseBodyForContentTypes',
+ method='post'.upper(),
+ content_type=None,
+ accept_content_type=accept_content_type,
+ )
+
+ def test_both_invalid_invalid_fails(self):
+ # both invalid - invalid
+ accept_content_type = 'application/json'
+
+ with patch.object(urllib3.PoolManager, 'request') as mock_request:
+ payload = (
+ {
+ "bar":
+ 2,
+ }
+ )
+ mock_request.return_value = self.response(
+ self.json_bytes(payload),
+ status=self.response_status
+ )
+ with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)):
+ self.api.post(
+ accept_content_types=(accept_content_type,)
+ )
+ self.assert_pool_manager_request_called_with(
+ mock_request,
+ self._configuration.host + '/responseBody/postOneofWithRequiredResponseBodyForContentTypes',
+ method='post'.upper(),
+ content_type=None,
+ accept_content_type=accept_content_type,
+ )
+
+ def test_first_valid_valid_passes(self):
+ # first valid - valid
+ accept_content_type = 'application/json'
+
+ with patch.object(urllib3.PoolManager, 'request') as mock_request:
+ payload = (
+ {
+ "foo":
+ 1,
+ "bar":
+ 2,
+ }
+ )
+ mock_request.return_value = self.response(
+ self.json_bytes(payload),
+ status=self.response_status
+ )
+ api_response = self.api.post(
+ accept_content_types=(accept_content_type,)
+ )
+ self.assert_pool_manager_request_called_with(
+ mock_request,
+ self._configuration.host + '/responseBody/postOneofWithRequiredResponseBodyForContentTypes',
+ method='post'.upper(),
+ accept_content_type=accept_content_type,
+ )
+
+ assert isinstance(api_response.response, urllib3.HTTPResponse)
+ assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson)
+ deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson._from_openapi_data(
+ payload,
+ _configuration=self._configuration
+ )
+ assert api_response.body == deserialized_response_body
+
+ def test_second_valid_valid_passes(self):
+ # second valid - valid
+ accept_content_type = 'application/json'
+
+ with patch.object(urllib3.PoolManager, 'request') as mock_request:
+ payload = (
+ {
+ "foo":
+ 1,
+ "baz":
+ 3,
+ }
+ )
+ mock_request.return_value = self.response(
+ self.json_bytes(payload),
+ status=self.response_status
+ )
+ api_response = self.api.post(
+ accept_content_types=(accept_content_type,)
+ )
+ self.assert_pool_manager_request_called_with(
+ mock_request,
+ self._configuration.host + '/responseBody/postOneofWithRequiredResponseBodyForContentTypes',
+ method='post'.upper(),
+ accept_content_type=accept_content_type,
+ )
+
+ assert isinstance(api_response.response, urllib3.HTTPResponse)
+ assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson)
+ deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson._from_openapi_data(
+ payload,
+ _configuration=self._configuration
+ )
+ assert api_response.body == deserialized_response_body
+
+
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/test/test_paths/test_response_body_post_required_with_escaped_characters_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/test/test_paths/test_response_body_post_required_with_escaped_characters_response_body_for_content_types/__init__.py
new file mode 100644
index 000000000000..e69de29bb2d1
diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/test/test_paths/test_response_body_post_required_with_escaped_characters_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/test/test_paths/test_response_body_post_required_with_escaped_characters_response_body_for_content_types/test_post.py
new file mode 100644
index 000000000000..04d636249970
--- /dev/null
+++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/test/test_paths/test_response_body_post_required_with_escaped_characters_response_body_for_content_types/test_post.py
@@ -0,0 +1,112 @@
+# coding: utf-8
+
+"""
+
+
+ Generated by: https://openapi-generator.tech
+"""
+
+import unittest
+from unittest.mock import patch
+
+import urllib3
+
+import unit_test_api
+from unit_test_api.paths.response_body_post_required_with_escaped_characters_response_body_for_content_types import post # noqa: E501
+from unit_test_api import configuration, schemas, api_client
+
+from .. import ApiTestMixin
+
+
+class TestResponseBodyPostRequiredWithEscapedCharactersResponseBodyForContentTypes(ApiTestMixin, unittest.TestCase):
+ """
+ ResponseBodyPostRequiredWithEscapedCharactersResponseBodyForContentTypes unit test stubs
+ """
+ _configuration = configuration.Configuration()
+
+ def setUp(self):
+ used_api_client = api_client.ApiClient(configuration=self._configuration)
+ self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501
+
+ def tearDown(self):
+ pass
+
+ response_status = 200
+
+ def test_object_with_some_properties_missing_is_invalid_fails(self):
+ # object with some properties missing is invalid
+ accept_content_type = 'application/json'
+
+ with patch.object(urllib3.PoolManager, 'request') as mock_request:
+ payload = (
+ {
+ "foo\nbar":
+ "1",
+ "foo\"bar":
+ "1",
+ }
+ )
+ mock_request.return_value = self.response(
+ self.json_bytes(payload),
+ status=self.response_status
+ )
+ with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)):
+ self.api.post(
+ accept_content_types=(accept_content_type,)
+ )
+ self.assert_pool_manager_request_called_with(
+ mock_request,
+ self._configuration.host + '/responseBody/postRequiredWithEscapedCharactersResponseBodyForContentTypes',
+ method='post'.upper(),
+ content_type=None,
+ accept_content_type=accept_content_type,
+ )
+
+ def test_object_with_all_properties_present_is_valid_passes(self):
+ # object with all properties present is valid
+ accept_content_type = 'application/json'
+
+ with patch.object(urllib3.PoolManager, 'request') as mock_request:
+ payload = (
+ {
+ "foo\nbar":
+ 1,
+ "foo\"bar":
+ 1,
+ "foo\\bar":
+ 1,
+ "foo\rbar":
+ 1,
+ "foo\tbar":
+ 1,
+ "foo\fbar":
+ 1,
+ }
+ )
+ mock_request.return_value = self.response(
+ self.json_bytes(payload),
+ status=self.response_status
+ )
+ api_response = self.api.post(
+ accept_content_types=(accept_content_type,)
+ )
+ self.assert_pool_manager_request_called_with(
+ mock_request,
+ self._configuration.host + '/responseBody/postRequiredWithEscapedCharactersResponseBodyForContentTypes',
+ method='post'.upper(),
+ accept_content_type=accept_content_type,
+ )
+
+ assert isinstance(api_response.response, urllib3.HTTPResponse)
+ assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson)
+ deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson._from_openapi_data(
+ payload,
+ _configuration=self._configuration
+ )
+ assert api_response.body == deserialized_response_body
+
+
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/apis/path_to_api.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/apis/path_to_api.py
index 2fee42e365c3..77ae7d58a3c5 100644
--- a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/apis/path_to_api.py
+++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/apis/path_to_api.py
@@ -121,6 +121,8 @@
from unit_test_api.apis.paths.response_body_post_oneof_complex_types_response_body_for_content_types import ResponseBodyPostOneofComplexTypesResponseBodyForContentTypes
from unit_test_api.apis.paths.request_body_post_oneof_with_empty_schema_request_body import RequestBodyPostOneofWithEmptySchemaRequestBody
from unit_test_api.apis.paths.response_body_post_oneof_with_empty_schema_response_body_for_content_types import ResponseBodyPostOneofWithEmptySchemaResponseBodyForContentTypes
+from unit_test_api.apis.paths.request_body_post_oneof_with_required_request_body import RequestBodyPostOneofWithRequiredRequestBody
+from unit_test_api.apis.paths.response_body_post_oneof_with_required_response_body_for_content_types import ResponseBodyPostOneofWithRequiredResponseBodyForContentTypes
from unit_test_api.apis.paths.request_body_post_nested_oneof_to_check_validation_semantics_request_body import RequestBodyPostNestedOneofToCheckValidationSemanticsRequestBody
from unit_test_api.apis.paths.response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types import ResponseBodyPostNestedOneofToCheckValidationSemanticsResponseBodyForContentTypes
from unit_test_api.apis.paths.request_body_post_pattern_validation_request_body import RequestBodyPostPatternValidationRequestBody
@@ -151,6 +153,8 @@
from unit_test_api.apis.paths.response_body_post_required_default_validation_response_body_for_content_types import ResponseBodyPostRequiredDefaultValidationResponseBodyForContentTypes
from unit_test_api.apis.paths.request_body_post_required_with_empty_array_request_body import RequestBodyPostRequiredWithEmptyArrayRequestBody
from unit_test_api.apis.paths.response_body_post_required_with_empty_array_response_body_for_content_types import ResponseBodyPostRequiredWithEmptyArrayResponseBodyForContentTypes
+from unit_test_api.apis.paths.request_body_post_required_with_escaped_characters_request_body import RequestBodyPostRequiredWithEscapedCharactersRequestBody
+from unit_test_api.apis.paths.response_body_post_required_with_escaped_characters_response_body_for_content_types import ResponseBodyPostRequiredWithEscapedCharactersResponseBodyForContentTypes
from unit_test_api.apis.paths.request_body_post_integer_type_matches_integers_request_body import RequestBodyPostIntegerTypeMatchesIntegersRequestBody
from unit_test_api.apis.paths.response_body_post_integer_type_matches_integers_response_body_for_content_types import ResponseBodyPostIntegerTypeMatchesIntegersResponseBodyForContentTypes
from unit_test_api.apis.paths.request_body_post_number_type_matches_numbers_request_body import RequestBodyPostNumberTypeMatchesNumbersRequestBody
@@ -293,6 +297,8 @@
PathValues.RESPONSE_BODY_POST_ONEOF_COMPLEX_TYPES_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostOneofComplexTypesResponseBodyForContentTypes,
PathValues.REQUEST_BODY_POST_ONEOF_WITH_EMPTY_SCHEMA_REQUEST_BODY: RequestBodyPostOneofWithEmptySchemaRequestBody,
PathValues.RESPONSE_BODY_POST_ONEOF_WITH_EMPTY_SCHEMA_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostOneofWithEmptySchemaResponseBodyForContentTypes,
+ PathValues.REQUEST_BODY_POST_ONEOF_WITH_REQUIRED_REQUEST_BODY: RequestBodyPostOneofWithRequiredRequestBody,
+ PathValues.RESPONSE_BODY_POST_ONEOF_WITH_REQUIRED_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostOneofWithRequiredResponseBodyForContentTypes,
PathValues.REQUEST_BODY_POST_NESTED_ONEOF_TO_CHECK_VALIDATION_SEMANTICS_REQUEST_BODY: RequestBodyPostNestedOneofToCheckValidationSemanticsRequestBody,
PathValues.RESPONSE_BODY_POST_NESTED_ONEOF_TO_CHECK_VALIDATION_SEMANTICS_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostNestedOneofToCheckValidationSemanticsResponseBodyForContentTypes,
PathValues.REQUEST_BODY_POST_PATTERN_VALIDATION_REQUEST_BODY: RequestBodyPostPatternValidationRequestBody,
@@ -323,6 +329,8 @@
PathValues.RESPONSE_BODY_POST_REQUIRED_DEFAULT_VALIDATION_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostRequiredDefaultValidationResponseBodyForContentTypes,
PathValues.REQUEST_BODY_POST_REQUIRED_WITH_EMPTY_ARRAY_REQUEST_BODY: RequestBodyPostRequiredWithEmptyArrayRequestBody,
PathValues.RESPONSE_BODY_POST_REQUIRED_WITH_EMPTY_ARRAY_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostRequiredWithEmptyArrayResponseBodyForContentTypes,
+ PathValues.REQUEST_BODY_POST_REQUIRED_WITH_ESCAPED_CHARACTERS_REQUEST_BODY: RequestBodyPostRequiredWithEscapedCharactersRequestBody,
+ PathValues.RESPONSE_BODY_POST_REQUIRED_WITH_ESCAPED_CHARACTERS_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostRequiredWithEscapedCharactersResponseBodyForContentTypes,
PathValues.REQUEST_BODY_POST_INTEGER_TYPE_MATCHES_INTEGERS_REQUEST_BODY: RequestBodyPostIntegerTypeMatchesIntegersRequestBody,
PathValues.RESPONSE_BODY_POST_INTEGER_TYPE_MATCHES_INTEGERS_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostIntegerTypeMatchesIntegersResponseBodyForContentTypes,
PathValues.REQUEST_BODY_POST_NUMBER_TYPE_MATCHES_NUMBERS_REQUEST_BODY: RequestBodyPostNumberTypeMatchesNumbersRequestBody,
@@ -466,6 +474,8 @@
PathValues.RESPONSE_BODY_POST_ONEOF_COMPLEX_TYPES_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostOneofComplexTypesResponseBodyForContentTypes,
PathValues.REQUEST_BODY_POST_ONEOF_WITH_EMPTY_SCHEMA_REQUEST_BODY: RequestBodyPostOneofWithEmptySchemaRequestBody,
PathValues.RESPONSE_BODY_POST_ONEOF_WITH_EMPTY_SCHEMA_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostOneofWithEmptySchemaResponseBodyForContentTypes,
+ PathValues.REQUEST_BODY_POST_ONEOF_WITH_REQUIRED_REQUEST_BODY: RequestBodyPostOneofWithRequiredRequestBody,
+ PathValues.RESPONSE_BODY_POST_ONEOF_WITH_REQUIRED_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostOneofWithRequiredResponseBodyForContentTypes,
PathValues.REQUEST_BODY_POST_NESTED_ONEOF_TO_CHECK_VALIDATION_SEMANTICS_REQUEST_BODY: RequestBodyPostNestedOneofToCheckValidationSemanticsRequestBody,
PathValues.RESPONSE_BODY_POST_NESTED_ONEOF_TO_CHECK_VALIDATION_SEMANTICS_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostNestedOneofToCheckValidationSemanticsResponseBodyForContentTypes,
PathValues.REQUEST_BODY_POST_PATTERN_VALIDATION_REQUEST_BODY: RequestBodyPostPatternValidationRequestBody,
@@ -496,6 +506,8 @@
PathValues.RESPONSE_BODY_POST_REQUIRED_DEFAULT_VALIDATION_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostRequiredDefaultValidationResponseBodyForContentTypes,
PathValues.REQUEST_BODY_POST_REQUIRED_WITH_EMPTY_ARRAY_REQUEST_BODY: RequestBodyPostRequiredWithEmptyArrayRequestBody,
PathValues.RESPONSE_BODY_POST_REQUIRED_WITH_EMPTY_ARRAY_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostRequiredWithEmptyArrayResponseBodyForContentTypes,
+ PathValues.REQUEST_BODY_POST_REQUIRED_WITH_ESCAPED_CHARACTERS_REQUEST_BODY: RequestBodyPostRequiredWithEscapedCharactersRequestBody,
+ PathValues.RESPONSE_BODY_POST_REQUIRED_WITH_ESCAPED_CHARACTERS_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostRequiredWithEscapedCharactersResponseBodyForContentTypes,
PathValues.REQUEST_BODY_POST_INTEGER_TYPE_MATCHES_INTEGERS_REQUEST_BODY: RequestBodyPostIntegerTypeMatchesIntegersRequestBody,
PathValues.RESPONSE_BODY_POST_INTEGER_TYPE_MATCHES_INTEGERS_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostIntegerTypeMatchesIntegersResponseBodyForContentTypes,
PathValues.REQUEST_BODY_POST_NUMBER_TYPE_MATCHES_NUMBERS_REQUEST_BODY: RequestBodyPostNumberTypeMatchesNumbersRequestBody,
diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/apis/paths/request_body_post_oneof_with_required_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/apis/paths/request_body_post_oneof_with_required_request_body.py
new file mode 100644
index 000000000000..774cf6dc1aca
--- /dev/null
+++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/apis/paths/request_body_post_oneof_with_required_request_body.py
@@ -0,0 +1,7 @@
+from unit_test_api.paths.request_body_post_oneof_with_required_request_body.post import ApiForpost
+
+
+class RequestBodyPostOneofWithRequiredRequestBody(
+ ApiForpost,
+):
+ pass
diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/apis/paths/request_body_post_required_with_escaped_characters_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/apis/paths/request_body_post_required_with_escaped_characters_request_body.py
new file mode 100644
index 000000000000..2098fa9255d0
--- /dev/null
+++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/apis/paths/request_body_post_required_with_escaped_characters_request_body.py
@@ -0,0 +1,7 @@
+from unit_test_api.paths.request_body_post_required_with_escaped_characters_request_body.post import ApiForpost
+
+
+class RequestBodyPostRequiredWithEscapedCharactersRequestBody(
+ ApiForpost,
+):
+ pass
diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/apis/paths/response_body_post_oneof_with_required_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/apis/paths/response_body_post_oneof_with_required_response_body_for_content_types.py
new file mode 100644
index 000000000000..f5a9664a5181
--- /dev/null
+++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/apis/paths/response_body_post_oneof_with_required_response_body_for_content_types.py
@@ -0,0 +1,7 @@
+from unit_test_api.paths.response_body_post_oneof_with_required_response_body_for_content_types.post import ApiForpost
+
+
+class ResponseBodyPostOneofWithRequiredResponseBodyForContentTypes(
+ ApiForpost,
+):
+ pass
diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/apis/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/apis/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types.py
new file mode 100644
index 000000000000..50f83818f4ba
--- /dev/null
+++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/apis/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types.py
@@ -0,0 +1,7 @@
+from unit_test_api.paths.response_body_post_required_with_escaped_characters_response_body_for_content_types.post import ApiForpost
+
+
+class ResponseBodyPostRequiredWithEscapedCharactersResponseBodyForContentTypes(
+ ApiForpost,
+):
+ pass
diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/apis/tags/content_type_json_api.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/apis/tags/content_type_json_api.py
index 9fe55cb493fa..074fe5d7b167 100644
--- a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/apis/tags/content_type_json_api.py
+++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/apis/tags/content_type_json_api.py
@@ -135,6 +135,8 @@
from unit_test_api.paths.response_body_post_oneof_with_base_schema_response_body_for_content_types.post import PostOneofWithBaseSchemaResponseBodyForContentTypes
from unit_test_api.paths.request_body_post_oneof_with_empty_schema_request_body.post import PostOneofWithEmptySchemaRequestBody
from unit_test_api.paths.response_body_post_oneof_with_empty_schema_response_body_for_content_types.post import PostOneofWithEmptySchemaResponseBodyForContentTypes
+from unit_test_api.paths.request_body_post_oneof_with_required_request_body.post import PostOneofWithRequiredRequestBody
+from unit_test_api.paths.response_body_post_oneof_with_required_response_body_for_content_types.post import PostOneofWithRequiredResponseBodyForContentTypes
from unit_test_api.paths.request_body_post_pattern_is_not_anchored_request_body.post import PostPatternIsNotAnchoredRequestBody
from unit_test_api.paths.response_body_post_pattern_is_not_anchored_response_body_for_content_types.post import PostPatternIsNotAnchoredResponseBodyForContentTypes
from unit_test_api.paths.request_body_post_pattern_validation_request_body.post import PostPatternValidationRequestBody
@@ -161,6 +163,8 @@
from unit_test_api.paths.response_body_post_required_validation_response_body_for_content_types.post import PostRequiredValidationResponseBodyForContentTypes
from unit_test_api.paths.request_body_post_required_with_empty_array_request_body.post import PostRequiredWithEmptyArrayRequestBody
from unit_test_api.paths.response_body_post_required_with_empty_array_response_body_for_content_types.post import PostRequiredWithEmptyArrayResponseBodyForContentTypes
+from unit_test_api.paths.request_body_post_required_with_escaped_characters_request_body.post import PostRequiredWithEscapedCharactersRequestBody
+from unit_test_api.paths.response_body_post_required_with_escaped_characters_response_body_for_content_types.post import PostRequiredWithEscapedCharactersResponseBodyForContentTypes
from unit_test_api.paths.request_body_post_simple_enum_validation_request_body.post import PostSimpleEnumValidationRequestBody
from unit_test_api.paths.response_body_post_simple_enum_validation_response_body_for_content_types.post import PostSimpleEnumValidationResponseBodyForContentTypes
from unit_test_api.paths.request_body_post_string_type_matches_strings_request_body.post import PostStringTypeMatchesStringsRequestBody
@@ -306,6 +310,8 @@ class ContentTypeJsonApi(
PostOneofWithBaseSchemaResponseBodyForContentTypes,
PostOneofWithEmptySchemaRequestBody,
PostOneofWithEmptySchemaResponseBodyForContentTypes,
+ PostOneofWithRequiredRequestBody,
+ PostOneofWithRequiredResponseBodyForContentTypes,
PostPatternIsNotAnchoredRequestBody,
PostPatternIsNotAnchoredResponseBodyForContentTypes,
PostPatternValidationRequestBody,
@@ -332,6 +338,8 @@ class ContentTypeJsonApi(
PostRequiredValidationResponseBodyForContentTypes,
PostRequiredWithEmptyArrayRequestBody,
PostRequiredWithEmptyArrayResponseBodyForContentTypes,
+ PostRequiredWithEscapedCharactersRequestBody,
+ PostRequiredWithEscapedCharactersResponseBodyForContentTypes,
PostSimpleEnumValidationRequestBody,
PostSimpleEnumValidationResponseBodyForContentTypes,
PostStringTypeMatchesStringsRequestBody,
diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/apis/tags/one_of_api.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/apis/tags/one_of_api.py
index f1ebdb77aa07..4582b5e30f4b 100644
--- a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/apis/tags/one_of_api.py
+++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/apis/tags/one_of_api.py
@@ -19,6 +19,8 @@
from unit_test_api.paths.response_body_post_oneof_with_base_schema_response_body_for_content_types.post import PostOneofWithBaseSchemaResponseBodyForContentTypes
from unit_test_api.paths.request_body_post_oneof_with_empty_schema_request_body.post import PostOneofWithEmptySchemaRequestBody
from unit_test_api.paths.response_body_post_oneof_with_empty_schema_response_body_for_content_types.post import PostOneofWithEmptySchemaResponseBodyForContentTypes
+from unit_test_api.paths.request_body_post_oneof_with_required_request_body.post import PostOneofWithRequiredRequestBody
+from unit_test_api.paths.response_body_post_oneof_with_required_response_body_for_content_types.post import PostOneofWithRequiredResponseBodyForContentTypes
class OneOfApi(
@@ -32,6 +34,8 @@ class OneOfApi(
PostOneofWithBaseSchemaResponseBodyForContentTypes,
PostOneofWithEmptySchemaRequestBody,
PostOneofWithEmptySchemaResponseBodyForContentTypes,
+ PostOneofWithRequiredRequestBody,
+ PostOneofWithRequiredResponseBodyForContentTypes,
):
"""NOTE: This class is auto generated by OpenAPI Generator
Ref: https://openapi-generator.tech
diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/apis/tags/operation_request_body_api.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/apis/tags/operation_request_body_api.py
index f84e0720041d..db020cfacd60 100644
--- a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/apis/tags/operation_request_body_api.py
+++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/apis/tags/operation_request_body_api.py
@@ -72,6 +72,7 @@
from unit_test_api.paths.request_body_post_oneof_request_body.post import PostOneofRequestBody
from unit_test_api.paths.request_body_post_oneof_with_base_schema_request_body.post import PostOneofWithBaseSchemaRequestBody
from unit_test_api.paths.request_body_post_oneof_with_empty_schema_request_body.post import PostOneofWithEmptySchemaRequestBody
+from unit_test_api.paths.request_body_post_oneof_with_required_request_body.post import PostOneofWithRequiredRequestBody
from unit_test_api.paths.request_body_post_pattern_is_not_anchored_request_body.post import PostPatternIsNotAnchoredRequestBody
from unit_test_api.paths.request_body_post_pattern_validation_request_body.post import PostPatternValidationRequestBody
from unit_test_api.paths.request_body_post_properties_with_escaped_characters_request_body.post import PostPropertiesWithEscapedCharactersRequestBody
@@ -85,6 +86,7 @@
from unit_test_api.paths.request_body_post_required_default_validation_request_body.post import PostRequiredDefaultValidationRequestBody
from unit_test_api.paths.request_body_post_required_validation_request_body.post import PostRequiredValidationRequestBody
from unit_test_api.paths.request_body_post_required_with_empty_array_request_body.post import PostRequiredWithEmptyArrayRequestBody
+from unit_test_api.paths.request_body_post_required_with_escaped_characters_request_body.post import PostRequiredWithEscapedCharactersRequestBody
from unit_test_api.paths.request_body_post_simple_enum_validation_request_body.post import PostSimpleEnumValidationRequestBody
from unit_test_api.paths.request_body_post_string_type_matches_strings_request_body.post import PostStringTypeMatchesStringsRequestBody
from unit_test_api.paths.request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body.post import PostTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingRequestBody
@@ -159,6 +161,7 @@ class OperationRequestBodyApi(
PostOneofRequestBody,
PostOneofWithBaseSchemaRequestBody,
PostOneofWithEmptySchemaRequestBody,
+ PostOneofWithRequiredRequestBody,
PostPatternIsNotAnchoredRequestBody,
PostPatternValidationRequestBody,
PostPropertiesWithEscapedCharactersRequestBody,
@@ -172,6 +175,7 @@ class OperationRequestBodyApi(
PostRequiredDefaultValidationRequestBody,
PostRequiredValidationRequestBody,
PostRequiredWithEmptyArrayRequestBody,
+ PostRequiredWithEscapedCharactersRequestBody,
PostSimpleEnumValidationRequestBody,
PostStringTypeMatchesStringsRequestBody,
PostTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingRequestBody,
diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/apis/tags/path_post_api.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/apis/tags/path_post_api.py
index e3ee563ffc59..de323d225d2d 100644
--- a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/apis/tags/path_post_api.py
+++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/apis/tags/path_post_api.py
@@ -135,6 +135,8 @@
from unit_test_api.paths.response_body_post_oneof_with_base_schema_response_body_for_content_types.post import PostOneofWithBaseSchemaResponseBodyForContentTypes
from unit_test_api.paths.request_body_post_oneof_with_empty_schema_request_body.post import PostOneofWithEmptySchemaRequestBody
from unit_test_api.paths.response_body_post_oneof_with_empty_schema_response_body_for_content_types.post import PostOneofWithEmptySchemaResponseBodyForContentTypes
+from unit_test_api.paths.request_body_post_oneof_with_required_request_body.post import PostOneofWithRequiredRequestBody
+from unit_test_api.paths.response_body_post_oneof_with_required_response_body_for_content_types.post import PostOneofWithRequiredResponseBodyForContentTypes
from unit_test_api.paths.request_body_post_pattern_is_not_anchored_request_body.post import PostPatternIsNotAnchoredRequestBody
from unit_test_api.paths.response_body_post_pattern_is_not_anchored_response_body_for_content_types.post import PostPatternIsNotAnchoredResponseBodyForContentTypes
from unit_test_api.paths.request_body_post_pattern_validation_request_body.post import PostPatternValidationRequestBody
@@ -161,6 +163,8 @@
from unit_test_api.paths.response_body_post_required_validation_response_body_for_content_types.post import PostRequiredValidationResponseBodyForContentTypes
from unit_test_api.paths.request_body_post_required_with_empty_array_request_body.post import PostRequiredWithEmptyArrayRequestBody
from unit_test_api.paths.response_body_post_required_with_empty_array_response_body_for_content_types.post import PostRequiredWithEmptyArrayResponseBodyForContentTypes
+from unit_test_api.paths.request_body_post_required_with_escaped_characters_request_body.post import PostRequiredWithEscapedCharactersRequestBody
+from unit_test_api.paths.response_body_post_required_with_escaped_characters_response_body_for_content_types.post import PostRequiredWithEscapedCharactersResponseBodyForContentTypes
from unit_test_api.paths.request_body_post_simple_enum_validation_request_body.post import PostSimpleEnumValidationRequestBody
from unit_test_api.paths.response_body_post_simple_enum_validation_response_body_for_content_types.post import PostSimpleEnumValidationResponseBodyForContentTypes
from unit_test_api.paths.request_body_post_string_type_matches_strings_request_body.post import PostStringTypeMatchesStringsRequestBody
@@ -306,6 +310,8 @@ class PathPostApi(
PostOneofWithBaseSchemaResponseBodyForContentTypes,
PostOneofWithEmptySchemaRequestBody,
PostOneofWithEmptySchemaResponseBodyForContentTypes,
+ PostOneofWithRequiredRequestBody,
+ PostOneofWithRequiredResponseBodyForContentTypes,
PostPatternIsNotAnchoredRequestBody,
PostPatternIsNotAnchoredResponseBodyForContentTypes,
PostPatternValidationRequestBody,
@@ -332,6 +338,8 @@ class PathPostApi(
PostRequiredValidationResponseBodyForContentTypes,
PostRequiredWithEmptyArrayRequestBody,
PostRequiredWithEmptyArrayResponseBodyForContentTypes,
+ PostRequiredWithEscapedCharactersRequestBody,
+ PostRequiredWithEscapedCharactersResponseBodyForContentTypes,
PostSimpleEnumValidationRequestBody,
PostSimpleEnumValidationResponseBodyForContentTypes,
PostStringTypeMatchesStringsRequestBody,
diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/apis/tags/required_api.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/apis/tags/required_api.py
index 3b27b42d1d28..4ba23de087aa 100644
--- a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/apis/tags/required_api.py
+++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/apis/tags/required_api.py
@@ -15,6 +15,8 @@
from unit_test_api.paths.response_body_post_required_validation_response_body_for_content_types.post import PostRequiredValidationResponseBodyForContentTypes
from unit_test_api.paths.request_body_post_required_with_empty_array_request_body.post import PostRequiredWithEmptyArrayRequestBody
from unit_test_api.paths.response_body_post_required_with_empty_array_response_body_for_content_types.post import PostRequiredWithEmptyArrayResponseBodyForContentTypes
+from unit_test_api.paths.request_body_post_required_with_escaped_characters_request_body.post import PostRequiredWithEscapedCharactersRequestBody
+from unit_test_api.paths.response_body_post_required_with_escaped_characters_response_body_for_content_types.post import PostRequiredWithEscapedCharactersResponseBodyForContentTypes
class RequiredApi(
@@ -24,6 +26,8 @@ class RequiredApi(
PostRequiredValidationResponseBodyForContentTypes,
PostRequiredWithEmptyArrayRequestBody,
PostRequiredWithEmptyArrayResponseBodyForContentTypes,
+ PostRequiredWithEscapedCharactersRequestBody,
+ PostRequiredWithEscapedCharactersResponseBodyForContentTypes,
):
"""NOTE: This class is auto generated by OpenAPI Generator
Ref: https://openapi-generator.tech
diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/apis/tags/response_content_content_type_schema_api.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/apis/tags/response_content_content_type_schema_api.py
index 496c9ecca54f..8c65e4ec0db2 100644
--- a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/apis/tags/response_content_content_type_schema_api.py
+++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/apis/tags/response_content_content_type_schema_api.py
@@ -72,6 +72,7 @@
from unit_test_api.paths.response_body_post_oneof_response_body_for_content_types.post import PostOneofResponseBodyForContentTypes
from unit_test_api.paths.response_body_post_oneof_with_base_schema_response_body_for_content_types.post import PostOneofWithBaseSchemaResponseBodyForContentTypes
from unit_test_api.paths.response_body_post_oneof_with_empty_schema_response_body_for_content_types.post import PostOneofWithEmptySchemaResponseBodyForContentTypes
+from unit_test_api.paths.response_body_post_oneof_with_required_response_body_for_content_types.post import PostOneofWithRequiredResponseBodyForContentTypes
from unit_test_api.paths.response_body_post_pattern_is_not_anchored_response_body_for_content_types.post import PostPatternIsNotAnchoredResponseBodyForContentTypes
from unit_test_api.paths.response_body_post_pattern_validation_response_body_for_content_types.post import PostPatternValidationResponseBodyForContentTypes
from unit_test_api.paths.response_body_post_properties_with_escaped_characters_response_body_for_content_types.post import PostPropertiesWithEscapedCharactersResponseBodyForContentTypes
@@ -85,6 +86,7 @@
from unit_test_api.paths.response_body_post_required_default_validation_response_body_for_content_types.post import PostRequiredDefaultValidationResponseBodyForContentTypes
from unit_test_api.paths.response_body_post_required_validation_response_body_for_content_types.post import PostRequiredValidationResponseBodyForContentTypes
from unit_test_api.paths.response_body_post_required_with_empty_array_response_body_for_content_types.post import PostRequiredWithEmptyArrayResponseBodyForContentTypes
+from unit_test_api.paths.response_body_post_required_with_escaped_characters_response_body_for_content_types.post import PostRequiredWithEscapedCharactersResponseBodyForContentTypes
from unit_test_api.paths.response_body_post_simple_enum_validation_response_body_for_content_types.post import PostSimpleEnumValidationResponseBodyForContentTypes
from unit_test_api.paths.response_body_post_string_type_matches_strings_response_body_for_content_types.post import PostStringTypeMatchesStringsResponseBodyForContentTypes
from unit_test_api.paths.response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types.post import PostTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingResponseBodyForContentTypes
@@ -159,6 +161,7 @@ class ResponseContentContentTypeSchemaApi(
PostOneofResponseBodyForContentTypes,
PostOneofWithBaseSchemaResponseBodyForContentTypes,
PostOneofWithEmptySchemaResponseBodyForContentTypes,
+ PostOneofWithRequiredResponseBodyForContentTypes,
PostPatternIsNotAnchoredResponseBodyForContentTypes,
PostPatternValidationResponseBodyForContentTypes,
PostPropertiesWithEscapedCharactersResponseBodyForContentTypes,
@@ -172,6 +175,7 @@ class ResponseContentContentTypeSchemaApi(
PostRequiredDefaultValidationResponseBodyForContentTypes,
PostRequiredValidationResponseBodyForContentTypes,
PostRequiredWithEmptyArrayResponseBodyForContentTypes,
+ PostRequiredWithEscapedCharactersResponseBodyForContentTypes,
PostSimpleEnumValidationResponseBodyForContentTypes,
PostStringTypeMatchesStringsResponseBodyForContentTypes,
PostTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingResponseBodyForContentTypes,
diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/model/allof.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/model/allof.py
index 51d4cec94c31..3a0dee404357 100644
--- a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/model/allof.py
+++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/model/allof.py
@@ -93,9 +93,9 @@ def _composed_schemas(cls):
class allOf_0(
AnyTypeSchema
):
- _required_property_names = set((
- 'bar',
- ))
+ _required_property_names = {
+ "bar",
+ }
bar = IntSchema
def __new__(
@@ -117,9 +117,9 @@ def __new__(
class allOf_1(
AnyTypeSchema
):
- _required_property_names = set((
- 'foo',
- ))
+ _required_property_names = {
+ "foo",
+ }
foo = StrSchema
def __new__(
diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/model/allof_with_base_schema.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/model/allof_with_base_schema.py
index b0a4665f9b31..408b065e352b 100644
--- a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/model/allof_with_base_schema.py
+++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/model/allof_with_base_schema.py
@@ -76,9 +76,9 @@ class AllofWithBaseSchema(
Do not edit the class manually.
"""
- _required_property_names = set((
- 'bar',
- ))
+ _required_property_names = {
+ "bar",
+ }
bar = IntSchema
@classmethod
@@ -97,9 +97,9 @@ def _composed_schemas(cls):
class allOf_0(
AnyTypeSchema
):
- _required_property_names = set((
- 'foo',
- ))
+ _required_property_names = {
+ "foo",
+ }
foo = StrSchema
def __new__(
@@ -121,9 +121,9 @@ def __new__(
class allOf_1(
AnyTypeSchema
):
- _required_property_names = set((
- 'baz',
- ))
+ _required_property_names = {
+ "baz",
+ }
baz = NoneSchema
def __new__(
diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/model/anyof_complex_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/model/anyof_complex_types.py
index 918cb35d65c3..c575ad2f2bbe 100644
--- a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/model/anyof_complex_types.py
+++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/model/anyof_complex_types.py
@@ -93,9 +93,9 @@ def _composed_schemas(cls):
class anyOf_0(
AnyTypeSchema
):
- _required_property_names = set((
- 'bar',
- ))
+ _required_property_names = {
+ "bar",
+ }
bar = IntSchema
def __new__(
@@ -117,9 +117,9 @@ def __new__(
class anyOf_1(
AnyTypeSchema
):
- _required_property_names = set((
- 'foo',
- ))
+ _required_property_names = {
+ "foo",
+ }
foo = StrSchema
def __new__(
diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/model/enums_in_properties.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/model/enums_in_properties.py
index bdaf150d8262..b0503b13d052 100644
--- a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/model/enums_in_properties.py
+++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/model/enums_in_properties.py
@@ -76,9 +76,9 @@ class EnumsInProperties(
Do not edit the class manually.
"""
- _required_property_names = set((
- 'bar',
- ))
+ _required_property_names = {
+ "bar",
+ }
class foo(
diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/model/oneof_complex_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/model/oneof_complex_types.py
index e3c9861ad492..fe6401032064 100644
--- a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/model/oneof_complex_types.py
+++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/model/oneof_complex_types.py
@@ -93,9 +93,9 @@ def _composed_schemas(cls):
class oneOf_0(
AnyTypeSchema
):
- _required_property_names = set((
- 'bar',
- ))
+ _required_property_names = {
+ "bar",
+ }
bar = IntSchema
def __new__(
@@ -117,9 +117,9 @@ def __new__(
class oneOf_1(
AnyTypeSchema
):
- _required_property_names = set((
- 'foo',
- ))
+ _required_property_names = {
+ "foo",
+ }
foo = StrSchema
def __new__(
diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/model/oneof_with_required.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/model/oneof_with_required.py
new file mode 100644
index 000000000000..b03fc2d63773
--- /dev/null
+++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/model/oneof_with_required.py
@@ -0,0 +1,160 @@
+# coding: utf-8
+
+"""
+ openapi 3.0.3 sample spec
+
+ sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501
+
+ The version of the OpenAPI document: 0.0.1
+ Generated by: https://openapi-generator.tech
+"""
+
+import re # noqa: F401
+import sys # noqa: F401
+import typing # noqa: F401
+import functools # noqa: F401
+
+from frozendict import frozendict # noqa: F401
+
+import decimal # noqa: F401
+from datetime import date, datetime # noqa: F401
+from frozendict import frozendict # noqa: F401
+
+from unit_test_api.schemas import ( # noqa: F401
+ AnyTypeSchema,
+ ComposedSchema,
+ DictSchema,
+ ListSchema,
+ StrSchema,
+ IntSchema,
+ Int32Schema,
+ Int64Schema,
+ Float32Schema,
+ Float64Schema,
+ NumberSchema,
+ UUIDSchema,
+ DateSchema,
+ DateTimeSchema,
+ DecimalSchema,
+ BoolSchema,
+ BinarySchema,
+ NoneSchema,
+ none_type,
+ Configuration,
+ Unset,
+ unset,
+ ComposedBase,
+ ListBase,
+ DictBase,
+ NoneBase,
+ StrBase,
+ IntBase,
+ Int32Base,
+ Int64Base,
+ Float32Base,
+ Float64Base,
+ NumberBase,
+ UUIDBase,
+ DateBase,
+ DateTimeBase,
+ BoolBase,
+ BinaryBase,
+ Schema,
+ NoneClass,
+ BoolClass,
+ _SchemaValidator,
+ _SchemaTypeChecker,
+ _SchemaEnumMaker
+)
+
+
+class OneofWithRequired(
+ ComposedBase,
+ DictSchema
+):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ @classmethod
+ @property
+ @functools.cache
+ def _composed_schemas(cls):
+ # we need this here to make our import statements work
+ # we must store _composed_schemas in here so the code is only run
+ # when we invoke this method. If we kept this at the class
+ # level we would get an error because the class level
+ # code would be run when this module is imported, and these composed
+ # classes don't exist yet because their module has not finished
+ # loading
+
+
+ class oneOf_0(
+ AnyTypeSchema
+ ):
+ _required_property_names = {
+ "bar",
+ "foo",
+ }
+
+ def __new__(
+ cls,
+ *args: typing.Union[dict, frozendict, str, date, datetime, int, float, decimal.Decimal, None, list, tuple, bytes],
+ _configuration: typing.Optional[Configuration] = None,
+ **kwargs: typing.Type[Schema],
+ ) -> 'oneOf_0':
+ return super().__new__(
+ cls,
+ *args,
+ _configuration=_configuration,
+ **kwargs,
+ )
+
+
+ class oneOf_1(
+ AnyTypeSchema
+ ):
+ _required_property_names = {
+ "foo",
+ "baz",
+ }
+
+ def __new__(
+ cls,
+ *args: typing.Union[dict, frozendict, str, date, datetime, int, float, decimal.Decimal, None, list, tuple, bytes],
+ _configuration: typing.Optional[Configuration] = None,
+ **kwargs: typing.Type[Schema],
+ ) -> 'oneOf_1':
+ return super().__new__(
+ cls,
+ *args,
+ _configuration=_configuration,
+ **kwargs,
+ )
+ return {
+ 'allOf': [
+ ],
+ 'oneOf': [
+ oneOf_0,
+ oneOf_1,
+ ],
+ 'anyOf': [
+ ],
+ 'not':
+ None
+ }
+
+ def __new__(
+ cls,
+ *args: typing.Union[dict, frozendict, ],
+ _configuration: typing.Optional[Configuration] = None,
+ **kwargs: typing.Type[Schema],
+ ) -> 'OneofWithRequired':
+ return super().__new__(
+ cls,
+ *args,
+ _configuration=_configuration,
+ **kwargs,
+ )
diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/model/required_validation.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/model/required_validation.py
index e8bb57f4fc53..9af5f5c08f2c 100644
--- a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/model/required_validation.py
+++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/model/required_validation.py
@@ -76,9 +76,9 @@ class RequiredValidation(
Do not edit the class manually.
"""
- _required_property_names = set((
- 'foo',
- ))
+ _required_property_names = {
+ "foo",
+ }
foo = AnyTypeSchema
bar = AnyTypeSchema
diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/model/required_with_escaped_characters.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/model/required_with_escaped_characters.py
new file mode 100644
index 000000000000..a463b8335ff3
--- /dev/null
+++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/model/required_with_escaped_characters.py
@@ -0,0 +1,99 @@
+# coding: utf-8
+
+"""
+ openapi 3.0.3 sample spec
+
+ sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501
+
+ The version of the OpenAPI document: 0.0.1
+ Generated by: https://openapi-generator.tech
+"""
+
+import re # noqa: F401
+import sys # noqa: F401
+import typing # noqa: F401
+import functools # noqa: F401
+
+from frozendict import frozendict # noqa: F401
+
+import decimal # noqa: F401
+from datetime import date, datetime # noqa: F401
+from frozendict import frozendict # noqa: F401
+
+from unit_test_api.schemas import ( # noqa: F401
+ AnyTypeSchema,
+ ComposedSchema,
+ DictSchema,
+ ListSchema,
+ StrSchema,
+ IntSchema,
+ Int32Schema,
+ Int64Schema,
+ Float32Schema,
+ Float64Schema,
+ NumberSchema,
+ UUIDSchema,
+ DateSchema,
+ DateTimeSchema,
+ DecimalSchema,
+ BoolSchema,
+ BinarySchema,
+ NoneSchema,
+ none_type,
+ Configuration,
+ Unset,
+ unset,
+ ComposedBase,
+ ListBase,
+ DictBase,
+ NoneBase,
+ StrBase,
+ IntBase,
+ Int32Base,
+ Int64Base,
+ Float32Base,
+ Float64Base,
+ NumberBase,
+ UUIDBase,
+ DateBase,
+ DateTimeBase,
+ BoolBase,
+ BinaryBase,
+ Schema,
+ NoneClass,
+ BoolClass,
+ _SchemaValidator,
+ _SchemaTypeChecker,
+ _SchemaEnumMaker
+)
+
+
+class RequiredWithEscapedCharacters(
+ AnyTypeSchema
+):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+ _required_property_names = {
+ "foo\"bar",
+ "foo\nbar",
+ "foo\fbar",
+ "foo\tbar",
+ "foo\rbar",
+ "foo\\bar",
+ }
+
+ def __new__(
+ cls,
+ *args: typing.Union[dict, frozendict, str, date, datetime, int, float, decimal.Decimal, None, list, tuple, bytes],
+ _configuration: typing.Optional[Configuration] = None,
+ **kwargs: typing.Type[Schema],
+ ) -> 'RequiredWithEscapedCharacters':
+ return super().__new__(
+ cls,
+ *args,
+ _configuration=_configuration,
+ **kwargs,
+ )
diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/models/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/models/__init__.py
index c794f6ca0942..92d95b0b8ab1 100644
--- a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/models/__init__.py
+++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/models/__init__.py
@@ -73,6 +73,7 @@
from unit_test_api.model.oneof_complex_types import OneofComplexTypes
from unit_test_api.model.oneof_with_base_schema import OneofWithBaseSchema
from unit_test_api.model.oneof_with_empty_schema import OneofWithEmptySchema
+from unit_test_api.model.oneof_with_required import OneofWithRequired
from unit_test_api.model.pattern_is_not_anchored import PatternIsNotAnchored
from unit_test_api.model.pattern_validation import PatternValidation
from unit_test_api.model.properties_with_escaped_characters import PropertiesWithEscapedCharacters
@@ -86,6 +87,7 @@
from unit_test_api.model.required_default_validation import RequiredDefaultValidation
from unit_test_api.model.required_validation import RequiredValidation
from unit_test_api.model.required_with_empty_array import RequiredWithEmptyArray
+from unit_test_api.model.required_with_escaped_characters import RequiredWithEscapedCharacters
from unit_test_api.model.simple_enum_validation import SimpleEnumValidation
from unit_test_api.model.string_type_matches_strings import StringTypeMatchesStrings
from unit_test_api.model.the_default_keyword_does_not_do_anything_if_the_property_is_missing import TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing
diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/paths/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/paths/__init__.py
index 1f8978c4c1fd..1de59a0d52b5 100644
--- a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/paths/__init__.py
+++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/paths/__init__.py
@@ -126,6 +126,8 @@ class PathValues(str, enum.Enum):
RESPONSE_BODY_POST_ONEOF_COMPLEX_TYPES_RESPONSE_BODY_FOR_CONTENT_TYPES = "/responseBody/postOneofComplexTypesResponseBodyForContentTypes"
REQUEST_BODY_POST_ONEOF_WITH_EMPTY_SCHEMA_REQUEST_BODY = "/requestBody/postOneofWithEmptySchemaRequestBody"
RESPONSE_BODY_POST_ONEOF_WITH_EMPTY_SCHEMA_RESPONSE_BODY_FOR_CONTENT_TYPES = "/responseBody/postOneofWithEmptySchemaResponseBodyForContentTypes"
+ REQUEST_BODY_POST_ONEOF_WITH_REQUIRED_REQUEST_BODY = "/requestBody/postOneofWithRequiredRequestBody"
+ RESPONSE_BODY_POST_ONEOF_WITH_REQUIRED_RESPONSE_BODY_FOR_CONTENT_TYPES = "/responseBody/postOneofWithRequiredResponseBodyForContentTypes"
REQUEST_BODY_POST_NESTED_ONEOF_TO_CHECK_VALIDATION_SEMANTICS_REQUEST_BODY = "/requestBody/postNestedOneofToCheckValidationSemanticsRequestBody"
RESPONSE_BODY_POST_NESTED_ONEOF_TO_CHECK_VALIDATION_SEMANTICS_RESPONSE_BODY_FOR_CONTENT_TYPES = "/responseBody/postNestedOneofToCheckValidationSemanticsResponseBodyForContentTypes"
REQUEST_BODY_POST_PATTERN_VALIDATION_REQUEST_BODY = "/requestBody/postPatternValidationRequestBody"
@@ -156,6 +158,8 @@ class PathValues(str, enum.Enum):
RESPONSE_BODY_POST_REQUIRED_DEFAULT_VALIDATION_RESPONSE_BODY_FOR_CONTENT_TYPES = "/responseBody/postRequiredDefaultValidationResponseBodyForContentTypes"
REQUEST_BODY_POST_REQUIRED_WITH_EMPTY_ARRAY_REQUEST_BODY = "/requestBody/postRequiredWithEmptyArrayRequestBody"
RESPONSE_BODY_POST_REQUIRED_WITH_EMPTY_ARRAY_RESPONSE_BODY_FOR_CONTENT_TYPES = "/responseBody/postRequiredWithEmptyArrayResponseBodyForContentTypes"
+ REQUEST_BODY_POST_REQUIRED_WITH_ESCAPED_CHARACTERS_REQUEST_BODY = "/requestBody/postRequiredWithEscapedCharactersRequestBody"
+ RESPONSE_BODY_POST_REQUIRED_WITH_ESCAPED_CHARACTERS_RESPONSE_BODY_FOR_CONTENT_TYPES = "/responseBody/postRequiredWithEscapedCharactersResponseBodyForContentTypes"
REQUEST_BODY_POST_INTEGER_TYPE_MATCHES_INTEGERS_REQUEST_BODY = "/requestBody/postIntegerTypeMatchesIntegersRequestBody"
RESPONSE_BODY_POST_INTEGER_TYPE_MATCHES_INTEGERS_RESPONSE_BODY_FOR_CONTENT_TYPES = "/responseBody/postIntegerTypeMatchesIntegersResponseBodyForContentTypes"
REQUEST_BODY_POST_NUMBER_TYPE_MATCHES_NUMBERS_REQUEST_BODY = "/requestBody/postNumberTypeMatchesNumbersRequestBody"
diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/paths/request_body_post_oneof_with_required_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/paths/request_body_post_oneof_with_required_request_body/__init__.py
new file mode 100644
index 000000000000..748f67c50b39
--- /dev/null
+++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/paths/request_body_post_oneof_with_required_request_body/__init__.py
@@ -0,0 +1,7 @@
+# do not import all endpoints into this module because that uses a lot of memory and stack frames
+# if you need the ability to import all endpoints from this module, import them with
+# from unit_test_api.paths.request_body_post_oneof_with_required_request_body import Api
+
+from unit_test_api.paths import PathValues
+
+path = PathValues.REQUEST_BODY_POST_ONEOF_WITH_REQUIRED_REQUEST_BODY
\ No newline at end of file
diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/paths/request_body_post_oneof_with_required_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/paths/request_body_post_oneof_with_required_request_body/post.py
new file mode 100644
index 000000000000..db316375fabf
--- /dev/null
+++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/paths/request_body_post_oneof_with_required_request_body/post.py
@@ -0,0 +1,205 @@
+# coding: utf-8
+
+"""
+
+
+ Generated by: https://openapi-generator.tech
+"""
+
+from dataclasses import dataclass
+import re # noqa: F401
+import sys # noqa: F401
+import typing
+import urllib3
+import functools # noqa: F401
+from urllib3._collections import HTTPHeaderDict
+
+from unit_test_api import api_client, exceptions
+import decimal # noqa: F401
+from datetime import date, datetime # noqa: F401
+from frozendict import frozendict # noqa: F401
+
+from unit_test_api.schemas import ( # noqa: F401
+ AnyTypeSchema,
+ ComposedSchema,
+ DictSchema,
+ ListSchema,
+ StrSchema,
+ IntSchema,
+ Int32Schema,
+ Int64Schema,
+ Float32Schema,
+ Float64Schema,
+ NumberSchema,
+ UUIDSchema,
+ DateSchema,
+ DateTimeSchema,
+ DecimalSchema,
+ BoolSchema,
+ BinarySchema,
+ NoneSchema,
+ none_type,
+ Configuration,
+ Unset,
+ unset,
+ ComposedBase,
+ ListBase,
+ DictBase,
+ NoneBase,
+ StrBase,
+ IntBase,
+ Int32Base,
+ Int64Base,
+ Float32Base,
+ Float64Base,
+ NumberBase,
+ UUIDBase,
+ DateBase,
+ DateTimeBase,
+ BoolBase,
+ BinaryBase,
+ Schema,
+ NoneClass,
+ BoolClass,
+ _SchemaValidator,
+ _SchemaTypeChecker,
+ _SchemaEnumMaker
+)
+
+from unit_test_api.model.oneof_with_required import OneofWithRequired
+
+from . import path
+
+# body param
+SchemaForRequestBodyApplicationJson = OneofWithRequired
+
+
+request_body_oneof_with_required = api_client.RequestBody(
+ content={
+ 'application/json': api_client.MediaType(
+ schema=SchemaForRequestBodyApplicationJson),
+ },
+ required=True,
+)
+
+
+@dataclass
+class ApiResponseFor200(api_client.ApiResponse):
+ response: urllib3.HTTPResponse
+ body: Unset = unset
+ headers: Unset = unset
+
+
+_response_for_200 = api_client.OpenApiResponse(
+ response_cls=ApiResponseFor200,
+)
+_status_code_to_response = {
+ '200': _response_for_200,
+}
+
+
+class BaseApi(api_client.Api):
+
+ def _post_oneof_with_required_request_body(
+ self: api_client.Api,
+ body: typing.Union[SchemaForRequestBodyApplicationJson],
+ content_type: str = 'application/json',
+ stream: bool = False,
+ timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None,
+ skip_deserialization: bool = False,
+ ) -> typing.Union[
+ ApiResponseFor200,
+ api_client.ApiResponseWithoutDeserialization
+ ]:
+ """
+ :param skip_deserialization: If true then api_response.response will be set but
+ api_response.body and api_response.headers will not be deserialized into schema
+ class instances
+ """
+ used_path = path.value
+
+ _headers = HTTPHeaderDict()
+ # TODO add cookie handling
+
+ if body is unset:
+ raise exceptions.ApiValueError(
+ 'The required body parameter has an invalid value of: unset. Set a valid value instead')
+ _fields = None
+ _body = None
+ serialized_data = request_body_oneof_with_required.serialize(body, content_type)
+ _headers.add('Content-Type', content_type)
+ if 'fields' in serialized_data:
+ _fields = serialized_data['fields']
+ elif 'body' in serialized_data:
+ _body = serialized_data['body']
+ response = self.api_client.call_api(
+ resource_path=used_path,
+ method='post'.upper(),
+ headers=_headers,
+ fields=_fields,
+ body=_body,
+ stream=stream,
+ timeout=timeout,
+ )
+
+ if skip_deserialization:
+ api_response = api_client.ApiResponseWithoutDeserialization(response=response)
+ else:
+ response_for_status = _status_code_to_response.get(str(response.status))
+ if response_for_status:
+ api_response = response_for_status.deserialize(response, self.api_client.configuration)
+ else:
+ api_response = api_client.ApiResponseWithoutDeserialization(response=response)
+
+ if not 200 <= response.status <= 299:
+ raise exceptions.ApiException(api_response=api_response)
+
+ return api_response
+
+
+class PostOneofWithRequiredRequestBody(BaseApi):
+ # this class is used by api classes that refer to endpoints with operationId fn names
+
+ def post_oneof_with_required_request_body(
+ self: BaseApi,
+ body: typing.Union[SchemaForRequestBodyApplicationJson],
+ content_type: str = 'application/json',
+ stream: bool = False,
+ timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None,
+ skip_deserialization: bool = False,
+ ) -> typing.Union[
+ ApiResponseFor200,
+ api_client.ApiResponseWithoutDeserialization
+ ]:
+ return self._post_oneof_with_required_request_body(
+ body=body,
+ content_type=content_type,
+ stream=stream,
+ timeout=timeout,
+ skip_deserialization=skip_deserialization
+ )
+
+
+class ApiForpost(BaseApi):
+ # this class is used by api classes that refer to endpoints by path and http method names
+
+ def post(
+ self: BaseApi,
+ body: typing.Union[SchemaForRequestBodyApplicationJson],
+ content_type: str = 'application/json',
+ stream: bool = False,
+ timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None,
+ skip_deserialization: bool = False,
+ ) -> typing.Union[
+ ApiResponseFor200,
+ api_client.ApiResponseWithoutDeserialization
+ ]:
+ return self._post_oneof_with_required_request_body(
+ body=body,
+ content_type=content_type,
+ stream=stream,
+ timeout=timeout,
+ skip_deserialization=skip_deserialization
+ )
+
+
diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/paths/request_body_post_required_with_escaped_characters_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/paths/request_body_post_required_with_escaped_characters_request_body/__init__.py
new file mode 100644
index 000000000000..84963ff8819d
--- /dev/null
+++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/paths/request_body_post_required_with_escaped_characters_request_body/__init__.py
@@ -0,0 +1,7 @@
+# do not import all endpoints into this module because that uses a lot of memory and stack frames
+# if you need the ability to import all endpoints from this module, import them with
+# from unit_test_api.paths.request_body_post_required_with_escaped_characters_request_body import Api
+
+from unit_test_api.paths import PathValues
+
+path = PathValues.REQUEST_BODY_POST_REQUIRED_WITH_ESCAPED_CHARACTERS_REQUEST_BODY
\ No newline at end of file
diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/paths/request_body_post_required_with_escaped_characters_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/paths/request_body_post_required_with_escaped_characters_request_body/post.py
new file mode 100644
index 000000000000..73d3dd4ce648
--- /dev/null
+++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/paths/request_body_post_required_with_escaped_characters_request_body/post.py
@@ -0,0 +1,228 @@
+# coding: utf-8
+
+"""
+
+
+ Generated by: https://openapi-generator.tech
+"""
+
+from dataclasses import dataclass
+import re # noqa: F401
+import sys # noqa: F401
+import typing
+import urllib3
+import functools # noqa: F401
+from urllib3._collections import HTTPHeaderDict
+
+from unit_test_api import api_client, exceptions
+import decimal # noqa: F401
+from datetime import date, datetime # noqa: F401
+from frozendict import frozendict # noqa: F401
+
+from unit_test_api.schemas import ( # noqa: F401
+ AnyTypeSchema,
+ ComposedSchema,
+ DictSchema,
+ ListSchema,
+ StrSchema,
+ IntSchema,
+ Int32Schema,
+ Int64Schema,
+ Float32Schema,
+ Float64Schema,
+ NumberSchema,
+ UUIDSchema,
+ DateSchema,
+ DateTimeSchema,
+ DecimalSchema,
+ BoolSchema,
+ BinarySchema,
+ NoneSchema,
+ none_type,
+ Configuration,
+ Unset,
+ unset,
+ ComposedBase,
+ ListBase,
+ DictBase,
+ NoneBase,
+ StrBase,
+ IntBase,
+ Int32Base,
+ Int64Base,
+ Float32Base,
+ Float64Base,
+ NumberBase,
+ UUIDBase,
+ DateBase,
+ DateTimeBase,
+ BoolBase,
+ BinaryBase,
+ Schema,
+ NoneClass,
+ BoolClass,
+ _SchemaValidator,
+ _SchemaTypeChecker,
+ _SchemaEnumMaker
+)
+
+from . import path
+
+# body param
+
+
+class SchemaForRequestBodyApplicationJson(
+ AnyTypeSchema
+):
+ _required_property_names = {
+ "foo\"bar",
+ "foo\nbar",
+ "foo\fbar",
+ "foo\tbar",
+ "foo\rbar",
+ "foo\\bar",
+ }
+
+ def __new__(
+ cls,
+ *args: typing.Union[dict, frozendict, str, date, datetime, int, float, decimal.Decimal, None, list, tuple, bytes],
+ _configuration: typing.Optional[Configuration] = None,
+ **kwargs: typing.Type[Schema],
+ ) -> 'SchemaForRequestBodyApplicationJson':
+ return super().__new__(
+ cls,
+ *args,
+ _configuration=_configuration,
+ **kwargs,
+ )
+
+
+request_body_body = api_client.RequestBody(
+ content={
+ 'application/json': api_client.MediaType(
+ schema=SchemaForRequestBodyApplicationJson),
+ },
+ required=True,
+)
+
+
+@dataclass
+class ApiResponseFor200(api_client.ApiResponse):
+ response: urllib3.HTTPResponse
+ body: Unset = unset
+ headers: Unset = unset
+
+
+_response_for_200 = api_client.OpenApiResponse(
+ response_cls=ApiResponseFor200,
+)
+_status_code_to_response = {
+ '200': _response_for_200,
+}
+
+
+class BaseApi(api_client.Api):
+
+ def _post_required_with_escaped_characters_request_body(
+ self: api_client.Api,
+ body: typing.Union[SchemaForRequestBodyApplicationJson],
+ content_type: str = 'application/json',
+ stream: bool = False,
+ timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None,
+ skip_deserialization: bool = False,
+ ) -> typing.Union[
+ ApiResponseFor200,
+ api_client.ApiResponseWithoutDeserialization
+ ]:
+ """
+ :param skip_deserialization: If true then api_response.response will be set but
+ api_response.body and api_response.headers will not be deserialized into schema
+ class instances
+ """
+ used_path = path.value
+
+ _headers = HTTPHeaderDict()
+ # TODO add cookie handling
+
+ if body is unset:
+ raise exceptions.ApiValueError(
+ 'The required body parameter has an invalid value of: unset. Set a valid value instead')
+ _fields = None
+ _body = None
+ serialized_data = request_body_body.serialize(body, content_type)
+ _headers.add('Content-Type', content_type)
+ if 'fields' in serialized_data:
+ _fields = serialized_data['fields']
+ elif 'body' in serialized_data:
+ _body = serialized_data['body']
+ response = self.api_client.call_api(
+ resource_path=used_path,
+ method='post'.upper(),
+ headers=_headers,
+ fields=_fields,
+ body=_body,
+ stream=stream,
+ timeout=timeout,
+ )
+
+ if skip_deserialization:
+ api_response = api_client.ApiResponseWithoutDeserialization(response=response)
+ else:
+ response_for_status = _status_code_to_response.get(str(response.status))
+ if response_for_status:
+ api_response = response_for_status.deserialize(response, self.api_client.configuration)
+ else:
+ api_response = api_client.ApiResponseWithoutDeserialization(response=response)
+
+ if not 200 <= response.status <= 299:
+ raise exceptions.ApiException(api_response=api_response)
+
+ return api_response
+
+
+class PostRequiredWithEscapedCharactersRequestBody(BaseApi):
+ # this class is used by api classes that refer to endpoints with operationId fn names
+
+ def post_required_with_escaped_characters_request_body(
+ self: BaseApi,
+ body: typing.Union[SchemaForRequestBodyApplicationJson],
+ content_type: str = 'application/json',
+ stream: bool = False,
+ timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None,
+ skip_deserialization: bool = False,
+ ) -> typing.Union[
+ ApiResponseFor200,
+ api_client.ApiResponseWithoutDeserialization
+ ]:
+ return self._post_required_with_escaped_characters_request_body(
+ body=body,
+ content_type=content_type,
+ stream=stream,
+ timeout=timeout,
+ skip_deserialization=skip_deserialization
+ )
+
+
+class ApiForpost(BaseApi):
+ # this class is used by api classes that refer to endpoints by path and http method names
+
+ def post(
+ self: BaseApi,
+ body: typing.Union[SchemaForRequestBodyApplicationJson],
+ content_type: str = 'application/json',
+ stream: bool = False,
+ timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None,
+ skip_deserialization: bool = False,
+ ) -> typing.Union[
+ ApiResponseFor200,
+ api_client.ApiResponseWithoutDeserialization
+ ]:
+ return self._post_required_with_escaped_characters_request_body(
+ body=body,
+ content_type=content_type,
+ stream=stream,
+ timeout=timeout,
+ skip_deserialization=skip_deserialization
+ )
+
+
diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/paths/response_body_post_oneof_with_required_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/paths/response_body_post_oneof_with_required_response_body_for_content_types/__init__.py
new file mode 100644
index 000000000000..1439a56296ed
--- /dev/null
+++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/paths/response_body_post_oneof_with_required_response_body_for_content_types/__init__.py
@@ -0,0 +1,7 @@
+# do not import all endpoints into this module because that uses a lot of memory and stack frames
+# if you need the ability to import all endpoints from this module, import them with
+# from unit_test_api.paths.response_body_post_oneof_with_required_response_body_for_content_types import Api
+
+from unit_test_api.paths import PathValues
+
+path = PathValues.RESPONSE_BODY_POST_ONEOF_WITH_REQUIRED_RESPONSE_BODY_FOR_CONTENT_TYPES
\ No newline at end of file
diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/paths/response_body_post_oneof_with_required_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/paths/response_body_post_oneof_with_required_response_body_for_content_types/post.py
new file mode 100644
index 000000000000..c160e6b24732
--- /dev/null
+++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/paths/response_body_post_oneof_with_required_response_body_for_content_types/post.py
@@ -0,0 +1,189 @@
+# coding: utf-8
+
+"""
+
+
+ Generated by: https://openapi-generator.tech
+"""
+
+from dataclasses import dataclass
+import re # noqa: F401
+import sys # noqa: F401
+import typing
+import urllib3
+import functools # noqa: F401
+from urllib3._collections import HTTPHeaderDict
+
+from unit_test_api import api_client, exceptions
+import decimal # noqa: F401
+from datetime import date, datetime # noqa: F401
+from frozendict import frozendict # noqa: F401
+
+from unit_test_api.schemas import ( # noqa: F401
+ AnyTypeSchema,
+ ComposedSchema,
+ DictSchema,
+ ListSchema,
+ StrSchema,
+ IntSchema,
+ Int32Schema,
+ Int64Schema,
+ Float32Schema,
+ Float64Schema,
+ NumberSchema,
+ UUIDSchema,
+ DateSchema,
+ DateTimeSchema,
+ DecimalSchema,
+ BoolSchema,
+ BinarySchema,
+ NoneSchema,
+ none_type,
+ Configuration,
+ Unset,
+ unset,
+ ComposedBase,
+ ListBase,
+ DictBase,
+ NoneBase,
+ StrBase,
+ IntBase,
+ Int32Base,
+ Int64Base,
+ Float32Base,
+ Float64Base,
+ NumberBase,
+ UUIDBase,
+ DateBase,
+ DateTimeBase,
+ BoolBase,
+ BinaryBase,
+ Schema,
+ NoneClass,
+ BoolClass,
+ _SchemaValidator,
+ _SchemaTypeChecker,
+ _SchemaEnumMaker
+)
+
+from unit_test_api.model.oneof_with_required import OneofWithRequired
+
+from . import path
+
+SchemaFor200ResponseBodyApplicationJson = OneofWithRequired
+
+
+@dataclass
+class ApiResponseFor200(api_client.ApiResponse):
+ response: urllib3.HTTPResponse
+ body: typing.Union[
+ SchemaFor200ResponseBodyApplicationJson,
+ ]
+ headers: Unset = unset
+
+
+_response_for_200 = api_client.OpenApiResponse(
+ response_cls=ApiResponseFor200,
+ content={
+ 'application/json': api_client.MediaType(
+ schema=SchemaFor200ResponseBodyApplicationJson),
+ },
+)
+_status_code_to_response = {
+ '200': _response_for_200,
+}
+_all_accept_content_types = (
+ 'application/json',
+)
+
+
+class BaseApi(api_client.Api):
+
+ def _post_oneof_with_required_response_body_for_content_types(
+ self: api_client.Api,
+ accept_content_types: typing.Tuple[str] = _all_accept_content_types,
+ stream: bool = False,
+ timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None,
+ skip_deserialization: bool = False,
+ ) -> typing.Union[
+ ApiResponseFor200,
+ api_client.ApiResponseWithoutDeserialization
+ ]:
+ """
+ :param skip_deserialization: If true then api_response.response will be set but
+ api_response.body and api_response.headers will not be deserialized into schema
+ class instances
+ """
+ used_path = path.value
+
+ _headers = HTTPHeaderDict()
+ # TODO add cookie handling
+ if accept_content_types:
+ for accept_content_type in accept_content_types:
+ _headers.add('Accept', accept_content_type)
+
+ response = self.api_client.call_api(
+ resource_path=used_path,
+ method='post'.upper(),
+ headers=_headers,
+ stream=stream,
+ timeout=timeout,
+ )
+
+ if skip_deserialization:
+ api_response = api_client.ApiResponseWithoutDeserialization(response=response)
+ else:
+ response_for_status = _status_code_to_response.get(str(response.status))
+ if response_for_status:
+ api_response = response_for_status.deserialize(response, self.api_client.configuration)
+ else:
+ api_response = api_client.ApiResponseWithoutDeserialization(response=response)
+
+ if not 200 <= response.status <= 299:
+ raise exceptions.ApiException(api_response=api_response)
+
+ return api_response
+
+
+class PostOneofWithRequiredResponseBodyForContentTypes(BaseApi):
+ # this class is used by api classes that refer to endpoints with operationId fn names
+
+ def post_oneof_with_required_response_body_for_content_types(
+ self: BaseApi,
+ accept_content_types: typing.Tuple[str] = _all_accept_content_types,
+ stream: bool = False,
+ timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None,
+ skip_deserialization: bool = False,
+ ) -> typing.Union[
+ ApiResponseFor200,
+ api_client.ApiResponseWithoutDeserialization
+ ]:
+ return self._post_oneof_with_required_response_body_for_content_types(
+ accept_content_types=accept_content_types,
+ stream=stream,
+ timeout=timeout,
+ skip_deserialization=skip_deserialization
+ )
+
+
+class ApiForpost(BaseApi):
+ # this class is used by api classes that refer to endpoints by path and http method names
+
+ def post(
+ self: BaseApi,
+ accept_content_types: typing.Tuple[str] = _all_accept_content_types,
+ stream: bool = False,
+ timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None,
+ skip_deserialization: bool = False,
+ ) -> typing.Union[
+ ApiResponseFor200,
+ api_client.ApiResponseWithoutDeserialization
+ ]:
+ return self._post_oneof_with_required_response_body_for_content_types(
+ accept_content_types=accept_content_types,
+ stream=stream,
+ timeout=timeout,
+ skip_deserialization=skip_deserialization
+ )
+
+
diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/__init__.py
new file mode 100644
index 000000000000..b9fb929544f8
--- /dev/null
+++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/__init__.py
@@ -0,0 +1,7 @@
+# do not import all endpoints into this module because that uses a lot of memory and stack frames
+# if you need the ability to import all endpoints from this module, import them with
+# from unit_test_api.paths.response_body_post_required_with_escaped_characters_response_body_for_content_types import Api
+
+from unit_test_api.paths import PathValues
+
+path = PathValues.RESPONSE_BODY_POST_REQUIRED_WITH_ESCAPED_CHARACTERS_RESPONSE_BODY_FOR_CONTENT_TYPES
\ No newline at end of file
diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post.py
new file mode 100644
index 000000000000..7f3c87f75340
--- /dev/null
+++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post.py
@@ -0,0 +1,212 @@
+# coding: utf-8
+
+"""
+
+
+ Generated by: https://openapi-generator.tech
+"""
+
+from dataclasses import dataclass
+import re # noqa: F401
+import sys # noqa: F401
+import typing
+import urllib3
+import functools # noqa: F401
+from urllib3._collections import HTTPHeaderDict
+
+from unit_test_api import api_client, exceptions
+import decimal # noqa: F401
+from datetime import date, datetime # noqa: F401
+from frozendict import frozendict # noqa: F401
+
+from unit_test_api.schemas import ( # noqa: F401
+ AnyTypeSchema,
+ ComposedSchema,
+ DictSchema,
+ ListSchema,
+ StrSchema,
+ IntSchema,
+ Int32Schema,
+ Int64Schema,
+ Float32Schema,
+ Float64Schema,
+ NumberSchema,
+ UUIDSchema,
+ DateSchema,
+ DateTimeSchema,
+ DecimalSchema,
+ BoolSchema,
+ BinarySchema,
+ NoneSchema,
+ none_type,
+ Configuration,
+ Unset,
+ unset,
+ ComposedBase,
+ ListBase,
+ DictBase,
+ NoneBase,
+ StrBase,
+ IntBase,
+ Int32Base,
+ Int64Base,
+ Float32Base,
+ Float64Base,
+ NumberBase,
+ UUIDBase,
+ DateBase,
+ DateTimeBase,
+ BoolBase,
+ BinaryBase,
+ Schema,
+ NoneClass,
+ BoolClass,
+ _SchemaValidator,
+ _SchemaTypeChecker,
+ _SchemaEnumMaker
+)
+
+from . import path
+
+
+
+class SchemaFor200ResponseBodyApplicationJson(
+ AnyTypeSchema
+):
+ _required_property_names = {
+ "foo\"bar",
+ "foo\nbar",
+ "foo\fbar",
+ "foo\tbar",
+ "foo\rbar",
+ "foo\\bar",
+ }
+
+ def __new__(
+ cls,
+ *args: typing.Union[dict, frozendict, str, date, datetime, int, float, decimal.Decimal, None, list, tuple, bytes],
+ _configuration: typing.Optional[Configuration] = None,
+ **kwargs: typing.Type[Schema],
+ ) -> 'SchemaFor200ResponseBodyApplicationJson':
+ return super().__new__(
+ cls,
+ *args,
+ _configuration=_configuration,
+ **kwargs,
+ )
+
+
+@dataclass
+class ApiResponseFor200(api_client.ApiResponse):
+ response: urllib3.HTTPResponse
+ body: typing.Union[
+ SchemaFor200ResponseBodyApplicationJson,
+ ]
+ headers: Unset = unset
+
+
+_response_for_200 = api_client.OpenApiResponse(
+ response_cls=ApiResponseFor200,
+ content={
+ 'application/json': api_client.MediaType(
+ schema=SchemaFor200ResponseBodyApplicationJson),
+ },
+)
+_status_code_to_response = {
+ '200': _response_for_200,
+}
+_all_accept_content_types = (
+ 'application/json',
+)
+
+
+class BaseApi(api_client.Api):
+
+ def _post_required_with_escaped_characters_response_body_for_content_types(
+ self: api_client.Api,
+ accept_content_types: typing.Tuple[str] = _all_accept_content_types,
+ stream: bool = False,
+ timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None,
+ skip_deserialization: bool = False,
+ ) -> typing.Union[
+ ApiResponseFor200,
+ api_client.ApiResponseWithoutDeserialization
+ ]:
+ """
+ :param skip_deserialization: If true then api_response.response will be set but
+ api_response.body and api_response.headers will not be deserialized into schema
+ class instances
+ """
+ used_path = path.value
+
+ _headers = HTTPHeaderDict()
+ # TODO add cookie handling
+ if accept_content_types:
+ for accept_content_type in accept_content_types:
+ _headers.add('Accept', accept_content_type)
+
+ response = self.api_client.call_api(
+ resource_path=used_path,
+ method='post'.upper(),
+ headers=_headers,
+ stream=stream,
+ timeout=timeout,
+ )
+
+ if skip_deserialization:
+ api_response = api_client.ApiResponseWithoutDeserialization(response=response)
+ else:
+ response_for_status = _status_code_to_response.get(str(response.status))
+ if response_for_status:
+ api_response = response_for_status.deserialize(response, self.api_client.configuration)
+ else:
+ api_response = api_client.ApiResponseWithoutDeserialization(response=response)
+
+ if not 200 <= response.status <= 299:
+ raise exceptions.ApiException(api_response=api_response)
+
+ return api_response
+
+
+class PostRequiredWithEscapedCharactersResponseBodyForContentTypes(BaseApi):
+ # this class is used by api classes that refer to endpoints with operationId fn names
+
+ def post_required_with_escaped_characters_response_body_for_content_types(
+ self: BaseApi,
+ accept_content_types: typing.Tuple[str] = _all_accept_content_types,
+ stream: bool = False,
+ timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None,
+ skip_deserialization: bool = False,
+ ) -> typing.Union[
+ ApiResponseFor200,
+ api_client.ApiResponseWithoutDeserialization
+ ]:
+ return self._post_required_with_escaped_characters_response_body_for_content_types(
+ accept_content_types=accept_content_types,
+ stream=stream,
+ timeout=timeout,
+ skip_deserialization=skip_deserialization
+ )
+
+
+class ApiForpost(BaseApi):
+ # this class is used by api classes that refer to endpoints by path and http method names
+
+ def post(
+ self: BaseApi,
+ accept_content_types: typing.Tuple[str] = _all_accept_content_types,
+ stream: bool = False,
+ timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None,
+ skip_deserialization: bool = False,
+ ) -> typing.Union[
+ ApiResponseFor200,
+ api_client.ApiResponseWithoutDeserialization
+ ]:
+ return self._post_required_with_escaped_characters_response_body_for_content_types(
+ accept_content_types=accept_content_types,
+ stream=stream,
+ timeout=timeout,
+ skip_deserialization=skip_deserialization
+ )
+
+
diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/schemas.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/schemas.py
index a9aaf937372e..aafa5712c1e9 100644
--- a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/schemas.py
+++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/schemas.py
@@ -1068,7 +1068,7 @@ def _validate_args(cls, arg, validation_metadata: ValidationMetadata):
"""
path_to_schemas = {}
for property_name, value in arg.items():
- if property_name in cls._required_property_names or property_name in cls._property_names:
+ if property_name in cls._property_names:
schema = getattr(cls, property_name)
elif cls._additional_properties:
schema = cls._additional_properties
diff --git a/samples/openapi3/client/petstore/python-experimental/docs/apis/tags/FakeApi.md b/samples/openapi3/client/petstore/python-experimental/docs/apis/tags/FakeApi.md
index 918dd2360a88..e79f69d9f9d7 100644
--- a/samples/openapi3/client/petstore/python-experimental/docs/apis/tags/FakeApi.md
+++ b/samples/openapi3/client/petstore/python-experimental/docs/apis/tags/FakeApi.md
@@ -1005,15 +1005,15 @@ skip_deserialization | bool | default is False | when True, headers and body wil
#### Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
+**number** | **int, float** | None |
+**pattern_without_delimiter** | **str** | None |
+**byte** | **str** | None |
+**double** | **int, float** | None |
**integer** | **int** | None | [optional]
**int32** | **int** | None | [optional]
**int64** | **int** | None | [optional]
-**number** | **int, float** | None |
**float** | **int, float** | None | [optional]
-**double** | **int, float** | None |
**string** | **str** | None | [optional]
-**pattern_without_delimiter** | **str** | None |
-**byte** | **str** | None |
**binary** | **file_type** | None | [optional]
**date** | **date** | None | [optional]
**dateTime** | **datetime** | None | [optional] if omitted the server will use the default value of 2010-02-01T10:20:10.11111+01:00
@@ -3040,8 +3040,8 @@ skip_deserialization | bool | default is False | when True, headers and body wil
#### Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**additionalMetadata** | **str** | Additional data to pass to server | [optional]
**file** | **file_type** | file to upload |
+**additionalMetadata** | **str** | Additional data to pass to server | [optional]
**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
### Return Types, Responses
diff --git a/samples/openapi3/client/petstore/python-experimental/docs/apis/tags/PetApi.md b/samples/openapi3/client/petstore/python-experimental/docs/apis/tags/PetApi.md
index 2415cec7c04a..d4820de6abf1 100644
--- a/samples/openapi3/client/petstore/python-experimental/docs/apis/tags/PetApi.md
+++ b/samples/openapi3/client/petstore/python-experimental/docs/apis/tags/PetApi.md
@@ -1193,8 +1193,8 @@ skip_deserialization | bool | default is False | when True, headers and body wil
#### Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**additionalMetadata** | **str** | Additional data to pass to server | [optional]
**requiredFile** | **file_type** | file to upload |
+**additionalMetadata** | **str** | Additional data to pass to server | [optional]
**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
### path_params
diff --git a/samples/openapi3/client/petstore/python-experimental/docs/models/Category.md b/samples/openapi3/client/petstore/python-experimental/docs/models/Category.md
index d5d2346f80cb..609dc7536a2f 100644
--- a/samples/openapi3/client/petstore/python-experimental/docs/models/Category.md
+++ b/samples/openapi3/client/petstore/python-experimental/docs/models/Category.md
@@ -3,8 +3,8 @@
#### Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**id** | **int** | | [optional]
**name** | **str** | | if omitted the server will use the default value of "default-name"
+**id** | **int** | | [optional]
**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
diff --git a/samples/openapi3/client/petstore/python-experimental/docs/models/EnumTest.md b/samples/openapi3/client/petstore/python-experimental/docs/models/EnumTest.md
index f2786c4d0a42..b6e4302edfc5 100644
--- a/samples/openapi3/client/petstore/python-experimental/docs/models/EnumTest.md
+++ b/samples/openapi3/client/petstore/python-experimental/docs/models/EnumTest.md
@@ -3,8 +3,8 @@
#### Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**enum_string** | **str** | | [optional]
**enum_string_required** | **str** | |
+**enum_string** | **str** | | [optional]
**enum_integer** | **int** | | [optional]
**enum_number** | **int, float** | | [optional]
**stringEnum** | [**StringEnum**](StringEnum.md) | | [optional]
diff --git a/samples/openapi3/client/petstore/python-experimental/docs/models/FormatTest.md b/samples/openapi3/client/petstore/python-experimental/docs/models/FormatTest.md
index 603652cf7ac6..5b9e7ad4ce1d 100644
--- a/samples/openapi3/client/petstore/python-experimental/docs/models/FormatTest.md
+++ b/samples/openapi3/client/petstore/python-experimental/docs/models/FormatTest.md
@@ -3,24 +3,24 @@
#### Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
+**date** | **date** | |
+**number** | **int, float** | |
+**password** | **str** | |
+**byte** | **str** | |
**integer** | **int** | | [optional]
**int32** | **int** | | [optional]
**int32withValidations** | **int** | | [optional]
**int64** | **int** | | [optional]
-**number** | **int, float** | |
**float** | **int, float** | this is a reserved python keyword | [optional]
**float32** | **int, float** | | [optional]
**double** | **int, float** | | [optional]
**float64** | **int, float** | | [optional]
**arrayWithUniqueItems** | **[int, float]** | | [optional]
**string** | **str** | | [optional]
-**byte** | **str** | |
**binary** | **file_type** | | [optional]
-**date** | **date** | |
**dateTime** | **datetime** | | [optional]
**uuid** | **str** | | [optional]
**uuidNoExample** | **str** | | [optional]
-**password** | **str** | |
**pattern_with_digits** | **str** | A string that is a 10 digit number. Can have leading zeros. | [optional]
**pattern_with_digits_and_delimiter** | **str** | A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01. | [optional]
**noneProp** | **none_type** | | [optional]
diff --git a/samples/openapi3/client/petstore/python-experimental/docs/models/ObjectWithDifficultlyNamedProps.md b/samples/openapi3/client/petstore/python-experimental/docs/models/ObjectWithDifficultlyNamedProps.md
index 2a0370851a79..9382861b9ec0 100644
--- a/samples/openapi3/client/petstore/python-experimental/docs/models/ObjectWithDifficultlyNamedProps.md
+++ b/samples/openapi3/client/petstore/python-experimental/docs/models/ObjectWithDifficultlyNamedProps.md
@@ -5,8 +5,8 @@ model with properties that have invalid names for python
#### Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**$special[property.name]** | **int** | | [optional]
**123-list** | **str** | |
+**$special[property.name]** | **int** | | [optional]
**123Number** | **int** | | [optional] [readonly]
**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
diff --git a/samples/openapi3/client/petstore/python-experimental/docs/models/Pet.md b/samples/openapi3/client/petstore/python-experimental/docs/models/Pet.md
index be055f2bf3ff..5449d61dc21b 100644
--- a/samples/openapi3/client/petstore/python-experimental/docs/models/Pet.md
+++ b/samples/openapi3/client/petstore/python-experimental/docs/models/Pet.md
@@ -5,10 +5,10 @@ Pet object that needs to be added to the store
#### Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
+**photoUrls** | **[str]** | |
+**name** | **str** | |
**id** | **int** | | [optional]
**category** | [**Category**](Category.md) | | [optional]
-**name** | **str** | |
-**photoUrls** | **[str]** | |
**tags** | **[Tag]** | | [optional]
**status** | **str** | pet status in the store | [optional]
**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
diff --git a/samples/openapi3/client/petstore/python-experimental/docs/models/Whale.md b/samples/openapi3/client/petstore/python-experimental/docs/models/Whale.md
index 7c4339383f62..2bdabf23ae84 100644
--- a/samples/openapi3/client/petstore/python-experimental/docs/models/Whale.md
+++ b/samples/openapi3/client/petstore/python-experimental/docs/models/Whale.md
@@ -3,9 +3,9 @@
#### Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
+**className** | **str** | |
**hasBaleen** | **bool** | | [optional]
**hasTeeth** | **bool** | | [optional]
-**className** | **str** | |
**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
diff --git a/samples/openapi3/client/petstore/python-experimental/docs/models/Zebra.md b/samples/openapi3/client/petstore/python-experimental/docs/models/Zebra.md
index 6c4a40b2c0d0..49d9f67926f2 100644
--- a/samples/openapi3/client/petstore/python-experimental/docs/models/Zebra.md
+++ b/samples/openapi3/client/petstore/python-experimental/docs/models/Zebra.md
@@ -3,8 +3,8 @@
#### Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**type** | **str** | | [optional]
**className** | **str** | |
+**type** | **str** | | [optional]
**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/animal.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/animal.py
index 8081aca81d79..a217e8dd00b8 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/animal.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/animal.py
@@ -76,9 +76,9 @@ class Animal(
Do not edit the class manually.
"""
- _required_property_names = set((
- 'className',
- ))
+ _required_property_names = {
+ "className",
+ }
className = StrSchema
color = StrSchema
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/apple.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/apple.py
index f0ca74fc195d..2adc8424cf14 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/apple.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/apple.py
@@ -79,9 +79,9 @@ class Apple(
Do not edit the class manually.
"""
- _required_property_names = set((
- 'cultivar',
- ))
+ _required_property_names = {
+ "cultivar",
+ }
class cultivar(
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/apple_req.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/apple_req.py
index bb6ec8503fb6..a0e8fc082289 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/apple_req.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/apple_req.py
@@ -76,9 +76,9 @@ class AppleReq(
Do not edit the class manually.
"""
- _required_property_names = set((
- 'cultivar',
- ))
+ _required_property_names = {
+ "cultivar",
+ }
cultivar = StrSchema
mealy = BoolSchema
_additional_properties = None
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/banana.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/banana.py
index 2dd4fbc2d12e..c5161b5ff0a1 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/banana.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/banana.py
@@ -76,9 +76,9 @@ class Banana(
Do not edit the class manually.
"""
- _required_property_names = set((
- 'lengthCm',
- ))
+ _required_property_names = {
+ "lengthCm",
+ }
lengthCm = NumberSchema
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/banana_req.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/banana_req.py
index b77c7566e73b..802bc1317162 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/banana_req.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/banana_req.py
@@ -76,9 +76,9 @@ class BananaReq(
Do not edit the class manually.
"""
- _required_property_names = set((
- 'lengthCm',
- ))
+ _required_property_names = {
+ "lengthCm",
+ }
lengthCm = NumberSchema
sweet = BoolSchema
_additional_properties = None
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/basque_pig.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/basque_pig.py
index 16d29d3a097d..2ea340b0d628 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/basque_pig.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/basque_pig.py
@@ -76,9 +76,9 @@ class BasquePig(
Do not edit the class manually.
"""
- _required_property_names = set((
- 'className',
- ))
+ _required_property_names = {
+ "className",
+ }
class className(
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/category.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/category.py
index ef7272007276..43fc31b99638 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/category.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/category.py
@@ -76,9 +76,9 @@ class Category(
Do not edit the class manually.
"""
- _required_property_names = set((
- 'name',
- ))
+ _required_property_names = {
+ "name",
+ }
id = Int64Schema
name = StrSchema
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/danish_pig.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/danish_pig.py
index 34efcb87c22e..bc5ffc28d530 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/danish_pig.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/danish_pig.py
@@ -76,9 +76,9 @@ class DanishPig(
Do not edit the class manually.
"""
- _required_property_names = set((
- 'className',
- ))
+ _required_property_names = {
+ "className",
+ }
class className(
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/enum_test.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/enum_test.py
index 319b0282de4c..bd2dfb95b937 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/enum_test.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/enum_test.py
@@ -76,9 +76,9 @@ class EnumTest(
Do not edit the class manually.
"""
- _required_property_names = set((
- 'enum_string_required',
- ))
+ _required_property_names = {
+ "enum_string_required",
+ }
class enum_string(
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/format_test.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/format_test.py
index 28fb00bce844..e8e978800084 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/format_test.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/format_test.py
@@ -76,12 +76,12 @@ class FormatTest(
Do not edit the class manually.
"""
- _required_property_names = set((
- 'number',
- 'byte',
- 'date',
- 'password',
- ))
+ _required_property_names = {
+ "date",
+ "number",
+ "password",
+ "byte",
+ }
class integer(
@@ -210,10 +210,10 @@ class pattern_with_digits_and_delimiter(
def __new__(
cls,
*args: typing.Union[dict, frozendict, ],
- number: number,
- byte: byte,
date: date,
+ number: number,
password: password,
+ byte: byte,
integer: typing.Union[integer, Unset] = unset,
int32: typing.Union[int32, Unset] = unset,
int32withValidations: typing.Union[int32withValidations, Unset] = unset,
@@ -236,10 +236,10 @@ def __new__(
return super().__new__(
cls,
*args,
- number=number,
- byte=byte,
date=date,
+ number=number,
password=password,
+ byte=byte,
integer=integer,
int32=int32,
int32withValidations=int32withValidations,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/grandparent_animal.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/grandparent_animal.py
index 7b6a7464095e..cf3394375a2d 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/grandparent_animal.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/grandparent_animal.py
@@ -76,9 +76,9 @@ class GrandparentAnimal(
Do not edit the class manually.
"""
- _required_property_names = set((
- 'pet_type',
- ))
+ _required_property_names = {
+ "pet_type",
+ }
pet_type = StrSchema
@classmethod
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/money.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/money.py
index fc48f495a699..2a01c981b5f2 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/money.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/money.py
@@ -76,10 +76,10 @@ class Money(
Do not edit the class manually.
"""
- _required_property_names = set((
- 'amount',
- 'currency',
- ))
+ _required_property_names = {
+ "amount",
+ "currency",
+ }
amount = DecimalSchema
@classmethod
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/name.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/name.py
index f70569b177de..7a0de5a3cb69 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/name.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/name.py
@@ -78,9 +78,9 @@ class Name(
Model for testing model name same as property name
"""
- _required_property_names = set((
- 'name',
- ))
+ _required_property_names = {
+ "name",
+ }
name = Int32Schema
snake_case = Int32Schema
_property = StrSchema
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/no_additional_properties.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/no_additional_properties.py
index a54984228a0d..fc1acc5a0622 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/no_additional_properties.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/no_additional_properties.py
@@ -76,9 +76,9 @@ class NoAdditionalProperties(
Do not edit the class manually.
"""
- _required_property_names = set((
- 'id',
- ))
+ _required_property_names = {
+ "id",
+ }
id = Int64Schema
petId = Int64Schema
_additional_properties = None
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_with_difficultly_named_props.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_with_difficultly_named_props.py
index f4e66878f9ef..9a3dd40e8359 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_with_difficultly_named_props.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_with_difficultly_named_props.py
@@ -78,9 +78,9 @@ class ObjectWithDifficultlyNamedProps(
model with properties that have invalid names for python
"""
- _required_property_names = set((
- '123-list',
- ))
+ _required_property_names = {
+ "123-list",
+ }
special_property_name = Int64Schema
locals()["$special[property.name]"] = special_property_name
del locals()['special_property_name']
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/pet.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/pet.py
index 6b1cd00870bd..c81afee4f729 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/pet.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/pet.py
@@ -78,10 +78,10 @@ class Pet(
Pet object that needs to be added to the store
"""
- _required_property_names = set((
- 'name',
- 'photoUrls',
- ))
+ _required_property_names = {
+ "photoUrls",
+ "name",
+ }
id = Int64Schema
@classmethod
@@ -137,8 +137,8 @@ def SOLD(cls):
def __new__(
cls,
*args: typing.Union[dict, frozendict, ],
- name: name,
photoUrls: photoUrls,
+ name: name,
id: typing.Union[id, Unset] = unset,
category: typing.Union['Category', Unset] = unset,
tags: typing.Union[tags, Unset] = unset,
@@ -149,8 +149,8 @@ def __new__(
return super().__new__(
cls,
*args,
- name=name,
photoUrls=photoUrls,
+ name=name,
id=id,
category=category,
tags=tags,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/quadrilateral_interface.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/quadrilateral_interface.py
index bd28482b08cd..ed64e8ca0267 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/quadrilateral_interface.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/quadrilateral_interface.py
@@ -76,10 +76,10 @@ class QuadrilateralInterface(
Do not edit the class manually.
"""
- _required_property_names = set((
- 'shapeType',
- 'quadrilateralType',
- ))
+ _required_property_names = {
+ "shapeType",
+ "quadrilateralType",
+ }
class shapeType(
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/triangle_interface.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/triangle_interface.py
index 07fae72e4ef0..d7be2c2b55bf 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/triangle_interface.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/triangle_interface.py
@@ -76,10 +76,10 @@ class TriangleInterface(
Do not edit the class manually.
"""
- _required_property_names = set((
- 'shapeType',
- 'triangleType',
- ))
+ _required_property_names = {
+ "shapeType",
+ "triangleType",
+ }
class shapeType(
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/whale.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/whale.py
index 4bcb2f0e3b6f..2f0798f0a090 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/whale.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/whale.py
@@ -76,9 +76,9 @@ class Whale(
Do not edit the class manually.
"""
- _required_property_names = set((
- 'className',
- ))
+ _required_property_names = {
+ "className",
+ }
hasBaleen = BoolSchema
hasTeeth = BoolSchema
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/zebra.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/zebra.py
index 51220d56536b..9a179381ac91 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/zebra.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/zebra.py
@@ -76,9 +76,9 @@ class Zebra(
Do not edit the class manually.
"""
- _required_property_names = set((
- 'className',
- ))
+ _required_property_names = {
+ "className",
+ }
class type(
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/paths/fake_1/post.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/paths/fake_1/post.py
index e481be986559..fb9922425e04 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/paths/fake_1/post.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/paths/fake_1/post.py
@@ -74,12 +74,12 @@
class SchemaForRequestBodyApplicationXWwwFormUrlencoded(
DictSchema
):
- _required_property_names = set((
- 'number',
- 'double',
- 'pattern_without_delimiter',
- 'byte',
- ))
+ _required_property_names = {
+ "number",
+ "pattern_without_delimiter",
+ "byte",
+ "double",
+ }
class integer(
@@ -178,9 +178,9 @@ def __new__(
cls,
*args: typing.Union[dict, frozendict, ],
number: number,
- double: double,
pattern_without_delimiter: pattern_without_delimiter,
byte: byte,
+ double: double,
integer: typing.Union[integer, Unset] = unset,
int32: typing.Union[int32, Unset] = unset,
int64: typing.Union[int64, Unset] = unset,
@@ -197,9 +197,9 @@ def __new__(
cls,
*args,
number=number,
- double=double,
pattern_without_delimiter=pattern_without_delimiter,
byte=byte,
+ double=double,
integer=integer,
int32=int32,
int64=int64,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/paths/fake_json_form_data/get.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/paths/fake_json_form_data/get.py
index 623e1b5f8f93..929801a18810 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/paths/fake_json_form_data/get.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/paths/fake_json_form_data/get.py
@@ -74,10 +74,10 @@
class SchemaForRequestBodyApplicationXWwwFormUrlencoded(
DictSchema
):
- _required_property_names = set((
- 'param',
- 'param2',
- ))
+ _required_property_names = {
+ "param",
+ "param2",
+ }
param = StrSchema
param2 = StrSchema
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post.py
index 31398dfc9157..e2de1c3f69cf 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post.py
@@ -102,9 +102,9 @@ class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams):
class SchemaForRequestBodyMultipartFormData(
DictSchema
):
- _required_property_names = set((
- 'requiredFile',
- ))
+ _required_property_names = {
+ "requiredFile",
+ }
additionalMetadata = StrSchema
requiredFile = BinarySchema
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/paths/fake_upload_file/post.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/paths/fake_upload_file/post.py
index b0a0c7e59b77..1fd71b845fb4 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/paths/fake_upload_file/post.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/paths/fake_upload_file/post.py
@@ -76,9 +76,9 @@
class SchemaForRequestBodyMultipartFormData(
DictSchema
):
- _required_property_names = set((
- 'file',
- ))
+ _required_property_names = {
+ "file",
+ }
additionalMetadata = StrSchema
file = BinarySchema
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/schemas.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/schemas.py
index 0119b9d1f261..bc86b880e0c5 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/schemas.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/schemas.py
@@ -1068,7 +1068,7 @@ def _validate_args(cls, arg, validation_metadata: ValidationMetadata):
"""
path_to_schemas = {}
for property_name, value in arg.items():
- if property_name in cls._required_property_names or property_name in cls._property_names:
+ if property_name in cls._property_names:
schema = getattr(cls, property_name)
elif cls._additional_properties:
schema = cls._additional_properties
diff --git a/samples/openapi3/client/petstore/python-experimental/tests_manual/test_configuration.py b/samples/openapi3/client/petstore/python-experimental/tests_manual/test_configuration.py
index c85acab7dd07..d0d1e9348f2c 100644
--- a/samples/openapi3/client/petstore/python-experimental/tests_manual/test_configuration.py
+++ b/samples/openapi3/client/petstore/python-experimental/tests_manual/test_configuration.py
@@ -48,7 +48,7 @@ def test_servers(self):
'User-Agent': 'OpenAPI-Generator/1.0.0/python'
}),
fields=None,
- body=b'{"name":"pet","photoUrls":[]}',
+ body=b'{"photoUrls":[],"name":"pet"}',
stream=False,
timeout=None,
)
diff --git a/samples/server/petstore/java-undertow/src/main/java/org/openapitools/handler/PathHandlerInterface.java b/samples/server/petstore/java-undertow/src/main/java/org/openapitools/handler/PathHandlerInterface.java
index 324b70df06ef..0216276e5465 100644
--- a/samples/server/petstore/java-undertow/src/main/java/org/openapitools/handler/PathHandlerInterface.java
+++ b/samples/server/petstore/java-undertow/src/main/java/org/openapitools/handler/PathHandlerInterface.java
@@ -539,10 +539,10 @@ public interface PathHandlerInterface {
* Response headers: [CodegenProperty{openApiType='integer', baseName='X-Rate-Limit', complexType='null', getter='getxRateLimit', setter='setxRateLimit', description='calls per hour allowed by the user', dataType='Integer', datatypeWithEnum='Integer', dataFormat='int32', name='xRateLimit', min='null', max='null', defaultValue='null', defaultValueWithParam=' = data.X-Rate-Limit;', baseType='Integer', containerType='null', title='null', unescapedDescription='calls per hour allowed by the user', maxLength=null, minLength=null, pattern='null', example='null', jsonSchema='{
"type" : "integer",
"format" : "int32"
-}', minimum='null', maximum='null', exclusiveMinimum=false, exclusiveMaximum=false, required=false, deprecated=false, hasMoreNonReadOnly=false, isPrimitiveType=true, isModel=false, isContainer=false, isString=false, isNumeric=true, isInteger=true, isShort=true, isLong=false, isUnboundedInteger=false, isNumber=false, isFloat=false, isDouble=false, isDecimal=false, isByteArray=false, isBinary=false, isFile=false, isBoolean=false, isDate=false, isDateTime=false, isUuid=false, isUri=false, isEmail=false, isFreeFormObject=false, isArray=false, isMap=false, isEnum=false, isInnerEnum=false, isAnyType=false, isReadOnly=false, isWriteOnly=false, isNullable=false, isSelfReference=false, isCircularReference=false, isDiscriminator=false, _enum=null, allowableValues=null, items=null, additionalProperties=null, vars=[], requiredVars=[], mostInnerItems=null, vendorExtensions={}, hasValidation=false, isInherited=false, discriminatorValue='null', nameInCamelCase='XRateLimit', nameInSnakeCase='X_RATE_LIMIT', enumName='null', maxItems=null, minItems=null, maxProperties=null, minProperties=null, uniqueItems=false, multipleOf=null, isXmlAttribute=false, xmlPrefix='null', xmlName='null', xmlNamespace='null', isXmlWrapped=false, isNull=false, getAdditionalPropertiesIsAnyType=false, getHasVars=false, getHasRequired=false, getHasDiscriminatorWithNonEmptyMapping=false, composedSchemas=null, hasMultipleTypes=false}, CodegenProperty{openApiType='string', baseName='X-Expires-After', complexType='Date', getter='getxExpiresAfter', setter='setxExpiresAfter', description='date in UTC when token expires', dataType='Date', datatypeWithEnum='Date', dataFormat='date-time', name='xExpiresAfter', min='null', max='null', defaultValue='null', defaultValueWithParam=' = data.X-Expires-After;', baseType='Date', containerType='null', title='null', unescapedDescription='date in UTC when token expires', maxLength=null, minLength=null, pattern='null', example='null', jsonSchema='{
+}', minimum='null', maximum='null', exclusiveMinimum=false, exclusiveMaximum=false, required=false, deprecated=false, hasMoreNonReadOnly=false, isPrimitiveType=true, isModel=false, isContainer=false, isString=false, isNumeric=true, isInteger=true, isShort=true, isLong=false, isUnboundedInteger=false, isNumber=false, isFloat=false, isDouble=false, isDecimal=false, isByteArray=false, isBinary=false, isFile=false, isBoolean=false, isDate=false, isDateTime=false, isUuid=false, isUri=false, isEmail=false, isFreeFormObject=false, isArray=false, isMap=false, isEnum=false, isInnerEnum=false, isAnyType=false, isReadOnly=false, isWriteOnly=false, isNullable=false, isSelfReference=false, isCircularReference=false, isDiscriminator=false, _enum=null, allowableValues=null, items=null, additionalProperties=null, vars=[], requiredVars=[], mostInnerItems=null, vendorExtensions={}, hasValidation=false, isInherited=false, discriminatorValue='null', nameInCamelCase='XRateLimit', nameInSnakeCase='X_RATE_LIMIT', enumName='null', maxItems=null, minItems=null, maxProperties=null, minProperties=null, uniqueItems=false, multipleOf=null, isXmlAttribute=false, xmlPrefix='null', xmlName='null', xmlNamespace='null', isXmlWrapped=false, isNull=false, getAdditionalPropertiesIsAnyType=false, getHasVars=false, getHasRequired=false, getHasDiscriminatorWithNonEmptyMapping=false, composedSchemas=null, hasMultipleTypes=false, requiredVarsMap=null}, CodegenProperty{openApiType='string', baseName='X-Expires-After', complexType='Date', getter='getxExpiresAfter', setter='setxExpiresAfter', description='date in UTC when token expires', dataType='Date', datatypeWithEnum='Date', dataFormat='date-time', name='xExpiresAfter', min='null', max='null', defaultValue='null', defaultValueWithParam=' = data.X-Expires-After;', baseType='Date', containerType='null', title='null', unescapedDescription='date in UTC when token expires', maxLength=null, minLength=null, pattern='null', example='null', jsonSchema='{
"type" : "string",
"format" : "date-time"
-}', minimum='null', maximum='null', exclusiveMinimum=false, exclusiveMaximum=false, required=false, deprecated=false, hasMoreNonReadOnly=false, isPrimitiveType=false, isModel=false, isContainer=false, isString=false, isNumeric=false, isInteger=false, isShort=false, isLong=false, isUnboundedInteger=false, isNumber=false, isFloat=false, isDouble=false, isDecimal=false, isByteArray=false, isBinary=false, isFile=false, isBoolean=false, isDate=false, isDateTime=true, isUuid=false, isUri=false, isEmail=false, isFreeFormObject=false, isArray=false, isMap=false, isEnum=false, isInnerEnum=false, isAnyType=false, isReadOnly=false, isWriteOnly=false, isNullable=false, isSelfReference=false, isCircularReference=false, isDiscriminator=false, _enum=null, allowableValues=null, items=null, additionalProperties=null, vars=[], requiredVars=[], mostInnerItems=null, vendorExtensions={}, hasValidation=false, isInherited=false, discriminatorValue='null', nameInCamelCase='XExpiresAfter', nameInSnakeCase='X_EXPIRES_AFTER', enumName='null', maxItems=null, minItems=null, maxProperties=null, minProperties=null, uniqueItems=false, multipleOf=null, isXmlAttribute=false, xmlPrefix='null', xmlName='null', xmlNamespace='null', isXmlWrapped=false, isNull=false, getAdditionalPropertiesIsAnyType=false, getHasVars=false, getHasRequired=false, getHasDiscriminatorWithNonEmptyMapping=false, composedSchemas=null, hasMultipleTypes=false}]
+}', minimum='null', maximum='null', exclusiveMinimum=false, exclusiveMaximum=false, required=false, deprecated=false, hasMoreNonReadOnly=false, isPrimitiveType=false, isModel=false, isContainer=false, isString=false, isNumeric=false, isInteger=false, isShort=false, isLong=false, isUnboundedInteger=false, isNumber=false, isFloat=false, isDouble=false, isDecimal=false, isByteArray=false, isBinary=false, isFile=false, isBoolean=false, isDate=false, isDateTime=true, isUuid=false, isUri=false, isEmail=false, isFreeFormObject=false, isArray=false, isMap=false, isEnum=false, isInnerEnum=false, isAnyType=false, isReadOnly=false, isWriteOnly=false, isNullable=false, isSelfReference=false, isCircularReference=false, isDiscriminator=false, _enum=null, allowableValues=null, items=null, additionalProperties=null, vars=[], requiredVars=[], mostInnerItems=null, vendorExtensions={}, hasValidation=false, isInherited=false, discriminatorValue='null', nameInCamelCase='XExpiresAfter', nameInSnakeCase='X_EXPIRES_AFTER', enumName='null', maxItems=null, minItems=null, maxProperties=null, minProperties=null, uniqueItems=false, multipleOf=null, isXmlAttribute=false, xmlPrefix='null', xmlName='null', xmlNamespace='null', isXmlWrapped=false, isNull=false, getAdditionalPropertiesIsAnyType=false, getHasVars=false, getHasRequired=false, getHasDiscriminatorWithNonEmptyMapping=false, composedSchemas=null, hasMultipleTypes=false, requiredVarsMap=null}]
*
* Produces: [{mediaType=application/xml}, {mediaType=application/json}]
* Returns: {@link String}