forked from loafle/openapi-generator-original
[python-experimental] improves type hints for arrays, and object required properties (#13299)
* Regenerates sample with additional enum values * Sample regenerated, array type hints working * Unit test sample regenerated * Removes unneeded __getattribute__ * Sample regenerated using getRequiredVarsMap for property type hints * Adds schemaFromAdditionalProperties to tell if a CodegenProperty is from properties or additionalProperties * Adds get/setSchemaIsFromAdditionalProperties * Updates codegenModel * Updates codegenParameter * Updates codegenResponse * Uses setSchemaIsFromAdditionalProperties * Fixes array new typ ehint and additional property type hints * Samples regenerated * Adds missing parms to javadoc * Fixes param name * Adds missing param to javadoc
This commit is contained in:
parent
b55fa261f3
commit
d97081e7dc
@ -111,6 +111,7 @@ public class CodegenModel implements IJsonSchemaValidationProperties {
|
||||
private CodegenComposedSchemas composedSchemas;
|
||||
private boolean hasMultipleTypes = false;
|
||||
public HashMap<String, SchemaTestCase> testCases = new HashMap<>();
|
||||
private boolean schemaIsFromAdditionalProperties;
|
||||
|
||||
/**
|
||||
* The type of the value for the additionalProperties keyword in the OAS document.
|
||||
@ -186,6 +187,16 @@ public class CodegenModel implements IJsonSchemaValidationProperties {
|
||||
this.ref = ref;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getSchemaIsFromAdditionalProperties() {
|
||||
return schemaIsFromAdditionalProperties;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setSchemaIsFromAdditionalProperties(boolean schemaIsFromAdditionalProperties) {
|
||||
this.schemaIsFromAdditionalProperties = schemaIsFromAdditionalProperties;
|
||||
}
|
||||
|
||||
public Set<String> getAllMandatory() {
|
||||
return allMandatory;
|
||||
}
|
||||
@ -946,6 +957,7 @@ public class CodegenModel implements IJsonSchemaValidationProperties {
|
||||
hasMultipleTypes == that.getHasMultipleTypes() &&
|
||||
hasDiscriminatorWithNonEmptyMapping == that.getHasDiscriminatorWithNonEmptyMapping() &&
|
||||
isUuid == that.getIsUuid() &&
|
||||
getSchemaIsFromAdditionalProperties() == that.getSchemaIsFromAdditionalProperties() &&
|
||||
getIsAnyType() == that.getIsAnyType() &&
|
||||
getAdditionalPropertiesIsAnyType() == that.getAdditionalPropertiesIsAnyType() &&
|
||||
getUniqueItems() == that.getUniqueItems() &&
|
||||
@ -1027,7 +1039,7 @@ public class CodegenModel implements IJsonSchemaValidationProperties {
|
||||
getMaximum(), getPattern(), getMultipleOf(), getItems(), getAdditionalProperties(), getIsModel(),
|
||||
getAdditionalPropertiesIsAnyType(), hasDiscriminatorWithNonEmptyMapping,
|
||||
isAnyType, getComposedSchemas(), hasMultipleTypes, isDecimal, isUuid, requiredVarsMap, ref,
|
||||
uniqueItemsBoolean);
|
||||
uniqueItemsBoolean, schemaIsFromAdditionalProperties);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -1127,6 +1139,7 @@ public class CodegenModel implements IJsonSchemaValidationProperties {
|
||||
sb.append(", isUUID=").append(isUuid);
|
||||
sb.append(", requiredVarsMap=").append(requiredVarsMap);
|
||||
sb.append(", ref=").append(ref);
|
||||
sb.append(", schemaIsFromAdditionalProperties=").append(schemaIsFromAdditionalProperties);
|
||||
sb.append('}');
|
||||
return sb.toString();
|
||||
}
|
||||
|
@ -115,6 +115,8 @@ public class CodegenParameter implements IJsonSchemaValidationProperties {
|
||||
private Map<String, CodegenProperty> requiredVarsMap;
|
||||
private String ref;
|
||||
|
||||
private boolean schemaIsFromAdditionalProperties;
|
||||
|
||||
public CodegenParameter copy() {
|
||||
CodegenParameter output = new CodegenParameter();
|
||||
output.isFile = this.isFile;
|
||||
@ -167,6 +169,7 @@ public class CodegenParameter implements IJsonSchemaValidationProperties {
|
||||
output.setHasRequired(this.hasRequired);
|
||||
output.setHasDiscriminatorWithNonEmptyMapping(this.hasDiscriminatorWithNonEmptyMapping);
|
||||
output.setHasMultipleTypes(this.hasMultipleTypes);
|
||||
output.setSchemaIsFromAdditionalProperties(this.schemaIsFromAdditionalProperties);
|
||||
|
||||
if (this.content != null) {
|
||||
output.setContent(this.content);
|
||||
@ -240,7 +243,7 @@ public class CodegenParameter implements IJsonSchemaValidationProperties {
|
||||
|
||||
@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, requiredVarsMap, ref, uniqueItemsBoolean);
|
||||
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, ref, uniqueItemsBoolean, schemaIsFromAdditionalProperties);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -291,6 +294,7 @@ public class CodegenParameter implements IJsonSchemaValidationProperties {
|
||||
hasDiscriminatorWithNonEmptyMapping == that.getHasDiscriminatorWithNonEmptyMapping() &&
|
||||
getAdditionalPropertiesIsAnyType() == that.getAdditionalPropertiesIsAnyType() &&
|
||||
hasMultipleTypes == that.getHasMultipleTypes() &&
|
||||
getSchemaIsFromAdditionalProperties() == that.getSchemaIsFromAdditionalProperties() &&
|
||||
getHasVars() == that.getHasVars() &&
|
||||
getHasRequired() == that.getHasRequired() &&
|
||||
getExclusiveMaximum() == that.getExclusiveMaximum() &&
|
||||
@ -431,6 +435,7 @@ public class CodegenParameter implements IJsonSchemaValidationProperties {
|
||||
sb.append(", content=").append(content);
|
||||
sb.append(", requiredVarsMap=").append(requiredVarsMap);
|
||||
sb.append(", ref=").append(ref);
|
||||
sb.append(", schemaIsFromAdditionalProperties=").append(schemaIsFromAdditionalProperties);
|
||||
sb.append('}');
|
||||
return sb.toString();
|
||||
}
|
||||
@ -853,5 +858,15 @@ public class CodegenParameter implements IJsonSchemaValidationProperties {
|
||||
|
||||
@Override
|
||||
public void setRef(String ref) { this.ref=ref; }
|
||||
|
||||
@Override
|
||||
public boolean getSchemaIsFromAdditionalProperties() {
|
||||
return schemaIsFromAdditionalProperties;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setSchemaIsFromAdditionalProperties(boolean schemaIsFromAdditionalProperties) {
|
||||
this.schemaIsFromAdditionalProperties = schemaIsFromAdditionalProperties;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -197,6 +197,7 @@ public class CodegenProperty implements Cloneable, IJsonSchemaValidationProperti
|
||||
private boolean hasMultipleTypes = false;
|
||||
private Map<String, CodegenProperty> requiredVarsMap;
|
||||
private String ref;
|
||||
private boolean schemaIsFromAdditionalProperties;
|
||||
|
||||
public String getBaseName() {
|
||||
return baseName;
|
||||
@ -344,6 +345,16 @@ public class CodegenProperty implements Cloneable, IJsonSchemaValidationProperti
|
||||
this.unescapedDescription = unescapedDescription;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getSchemaIsFromAdditionalProperties() {
|
||||
return schemaIsFromAdditionalProperties;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setSchemaIsFromAdditionalProperties(boolean schemaIsFromAdditionalProperties) {
|
||||
this.schemaIsFromAdditionalProperties = schemaIsFromAdditionalProperties;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer getMaxLength() {
|
||||
return maxLength;
|
||||
@ -1004,6 +1015,7 @@ public class CodegenProperty implements Cloneable, IJsonSchemaValidationProperti
|
||||
sb.append(", hasMultipleTypes=").append(hasMultipleTypes);
|
||||
sb.append(", requiredVarsMap=").append(requiredVarsMap);
|
||||
sb.append(", ref=").append(ref);
|
||||
sb.append(", schemaIsFromAdditionalProperties=").append(schemaIsFromAdditionalProperties);
|
||||
sb.append('}');
|
||||
return sb.toString();
|
||||
}
|
||||
@ -1059,6 +1071,7 @@ public class CodegenProperty implements Cloneable, IJsonSchemaValidationProperti
|
||||
isNull == that.isNull &&
|
||||
hasMultipleTypes == that.getHasMultipleTypes() &&
|
||||
hasDiscriminatorWithNonEmptyMapping == that.hasDiscriminatorWithNonEmptyMapping &&
|
||||
getSchemaIsFromAdditionalProperties() == that.getSchemaIsFromAdditionalProperties() &&
|
||||
getAdditionalPropertiesIsAnyType() == that.getAdditionalPropertiesIsAnyType() &&
|
||||
getHasVars() == that.getHasVars() &&
|
||||
getHasRequired() == that.getHasRequired() &&
|
||||
@ -1129,6 +1142,6 @@ public class CodegenProperty implements Cloneable, IJsonSchemaValidationProperti
|
||||
nameInSnakeCase, enumName, maxItems, minItems, isXmlAttribute, xmlPrefix, xmlName,
|
||||
xmlNamespace, isXmlWrapped, isNull, additionalPropertiesIsAnyType, hasVars, hasRequired,
|
||||
hasDiscriminatorWithNonEmptyMapping, composedSchemas, hasMultipleTypes, requiredVarsMap,
|
||||
ref, uniqueItemsBoolean);
|
||||
ref, uniqueItemsBoolean, schemaIsFromAdditionalProperties);
|
||||
}
|
||||
}
|
||||
|
@ -92,6 +92,7 @@ public class CodegenResponse implements IJsonSchemaValidationProperties {
|
||||
private LinkedHashMap<String, CodegenMediaType> content;
|
||||
private Map<String, CodegenProperty> requiredVarsMap;
|
||||
private String ref;
|
||||
private boolean schemaIsFromAdditionalProperties;
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
@ -104,7 +105,7 @@ public class CodegenResponse implements IJsonSchemaValidationProperties {
|
||||
getMinLength(), exclusiveMinimum, exclusiveMaximum, getMinimum(), getMaximum(), getPattern(),
|
||||
is1xx, is2xx, is3xx, is4xx, is5xx, additionalPropertiesIsAnyType, hasVars, hasRequired,
|
||||
hasDiscriminatorWithNonEmptyMapping, composedSchemas, hasMultipleTypes, responseHeaders, content,
|
||||
requiredVarsMap, ref,uniqueItemsBoolean);
|
||||
requiredVarsMap, ref, uniqueItemsBoolean, schemaIsFromAdditionalProperties);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -150,6 +151,7 @@ public class CodegenResponse implements IJsonSchemaValidationProperties {
|
||||
is5xx == that.is5xx &&
|
||||
hasDiscriminatorWithNonEmptyMapping == that.getHasDiscriminatorWithNonEmptyMapping() &&
|
||||
hasMultipleTypes == that.getHasMultipleTypes() &&
|
||||
getSchemaIsFromAdditionalProperties() == that.getSchemaIsFromAdditionalProperties() &&
|
||||
getAdditionalPropertiesIsAnyType() == that.getAdditionalPropertiesIsAnyType() &&
|
||||
getHasVars() == that.getHasVars() &&
|
||||
getHasRequired() == that.getHasRequired() &&
|
||||
@ -559,6 +561,7 @@ public class CodegenResponse implements IJsonSchemaValidationProperties {
|
||||
sb.append(", content=").append(content);
|
||||
sb.append(", requiredVarsMap=").append(requiredVarsMap);
|
||||
sb.append(", ref=").append(ref);
|
||||
sb.append(", schemaIsFromAdditionalProperties=").append(schemaIsFromAdditionalProperties);
|
||||
sb.append('}');
|
||||
return sb.toString();
|
||||
}
|
||||
@ -698,4 +701,14 @@ public class CodegenResponse implements IJsonSchemaValidationProperties {
|
||||
|
||||
@Override
|
||||
public void setRef(String ref) { this.ref=ref; }
|
||||
|
||||
@Override
|
||||
public boolean getSchemaIsFromAdditionalProperties() {
|
||||
return schemaIsFromAdditionalProperties;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setSchemaIsFromAdditionalProperties(boolean schemaIsFromAdditionalProperties) {
|
||||
this.schemaIsFromAdditionalProperties = schemaIsFromAdditionalProperties;
|
||||
}
|
||||
}
|
||||
|
@ -2470,15 +2470,17 @@ public class DefaultCodegen implements CodegenConfig {
|
||||
}
|
||||
|
||||
private static class NamedSchema {
|
||||
private NamedSchema(String name, Schema s, boolean required) {
|
||||
private NamedSchema(String name, Schema s, boolean required, boolean schemaIsFromAdditionalProperties) {
|
||||
this.name = name;
|
||||
this.schema = s;
|
||||
this.required = required;
|
||||
this.schemaIsFromAdditionalProperties = schemaIsFromAdditionalProperties;
|
||||
}
|
||||
|
||||
private String name;
|
||||
private Schema schema;
|
||||
private boolean required;
|
||||
private boolean schemaIsFromAdditionalProperties;
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
@ -2487,12 +2489,13 @@ public class DefaultCodegen implements CodegenConfig {
|
||||
NamedSchema that = (NamedSchema) o;
|
||||
return Objects.equals(required, that.required) &&
|
||||
Objects.equals(name, that.name) &&
|
||||
Objects.equals(schema, that.schema);
|
||||
Objects.equals(schema, that.schema) &&
|
||||
Objects.equals(schemaIsFromAdditionalProperties, that.schemaIsFromAdditionalProperties);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(name, schema, required);
|
||||
return Objects.hash(name, schema, required, schemaIsFromAdditionalProperties);
|
||||
}
|
||||
}
|
||||
|
||||
@ -3563,6 +3566,21 @@ public class DefaultCodegen implements CodegenConfig {
|
||||
property.pattern = toRegularExpression(p.getPattern());
|
||||
}
|
||||
|
||||
/**
|
||||
* TODO remove this in 7.0.0 as a breaking change
|
||||
* This method was kept when required was added to the fromProperty signature
|
||||
* to ensure that the change was non-breaking
|
||||
*
|
||||
* @param name name of the property
|
||||
* @param p OAS property schema
|
||||
* @param required true if the property is required in the next higher object schema, false otherwise
|
||||
* @return Codegen Property object
|
||||
*/
|
||||
public CodegenProperty fromProperty(String name, Schema p, boolean required) {
|
||||
return fromProperty(name, p, required, false);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* TODO remove this in 7.0.0 as a breaking change
|
||||
* This method was kept when required was added to the fromProperty signature
|
||||
@ -3573,7 +3591,7 @@ public class DefaultCodegen implements CodegenConfig {
|
||||
* @return Codegen Property object
|
||||
*/
|
||||
public CodegenProperty fromProperty(String name, Schema p) {
|
||||
return fromProperty(name, p, false);
|
||||
return fromProperty(name, p, false, false);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -3588,15 +3606,16 @@ public class DefaultCodegen implements CodegenConfig {
|
||||
* @param name name of the property
|
||||
* @param p OAS property schema
|
||||
* @param required true if the property is required in the next higher object schema, false otherwise
|
||||
* @param schemaIsFromAdditionalProperties true if the property is defined by additional properties schema
|
||||
* @return Codegen Property object
|
||||
*/
|
||||
public CodegenProperty fromProperty(String name, Schema p, boolean required) {
|
||||
public CodegenProperty fromProperty(String name, Schema p, boolean required, boolean schemaIsFromAdditionalProperties) {
|
||||
if (p == null) {
|
||||
LOGGER.error("Undefined property/schema for `{}`. Default to type:string.", name);
|
||||
return null;
|
||||
}
|
||||
LOGGER.debug("debugging fromProperty for {} : {}", name, p);
|
||||
NamedSchema ns = new NamedSchema(name, p, required);
|
||||
NamedSchema ns = new NamedSchema(name, p, required, schemaIsFromAdditionalProperties);
|
||||
CodegenProperty cpc = schemaCodegenPropertyCache.get(ns);
|
||||
if (cpc != null) {
|
||||
LOGGER.debug("Cached fromProperty for {} : {} required={}", name, p.getName(), required);
|
||||
@ -3606,6 +3625,7 @@ public class DefaultCodegen implements CodegenConfig {
|
||||
p = unaliasSchema(p);
|
||||
|
||||
CodegenProperty property = CodegenModelFactory.newInstance(CodegenModelType.PROPERTY);
|
||||
property.setSchemaIsFromAdditionalProperties(schemaIsFromAdditionalProperties);
|
||||
property.required = required;
|
||||
ModelUtils.syncValidationProperties(p, property);
|
||||
|
||||
@ -7220,6 +7240,7 @@ public class DefaultCodegen implements CodegenConfig {
|
||||
if (cp.baseName.equals(requiredPropertyName)) {
|
||||
found = true;
|
||||
requiredVarsMap.put(requiredPropertyName, cp);
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (found == false) {
|
||||
@ -7238,12 +7259,14 @@ public class DefaultCodegen implements CodegenConfig {
|
||||
}
|
||||
CodegenProperty cp;
|
||||
if (schema.getAdditionalProperties() == null) {
|
||||
cp = fromProperty(usedRequiredPropertyName, new Schema(), true);
|
||||
// additionalProperties is null
|
||||
cp = fromProperty(usedRequiredPropertyName, new Schema(), true, true);
|
||||
} else if (schema.getAdditionalProperties() instanceof Boolean && Boolean.TRUE.equals(schema.getAdditionalProperties())) {
|
||||
cp = fromProperty(requiredPropertyName, new Schema(), true);
|
||||
// additionalProperties is True
|
||||
cp = fromProperty(requiredPropertyName, new Schema(), true, true);
|
||||
} else {
|
||||
CodegenProperty addPropsProp = property.getAdditionalProperties();
|
||||
cp = addPropsProp;
|
||||
// additionalProperties is schema
|
||||
cp = fromProperty(requiredPropertyName, (Schema) schema.getAdditionalProperties(), true, true);
|
||||
}
|
||||
requiredVarsMap.put(usedRequiredPropertyName, cp);
|
||||
}
|
||||
|
@ -188,6 +188,10 @@ public interface IJsonSchemaValidationProperties {
|
||||
|
||||
void setHasMultipleTypes(boolean hasMultipleTypes);
|
||||
|
||||
boolean getSchemaIsFromAdditionalProperties();
|
||||
|
||||
void setSchemaIsFromAdditionalProperties(boolean schemaIsFromAdditionalProperties);
|
||||
|
||||
/**
|
||||
* Syncs all the schema's type properties into the IJsonSchemaValidationProperties instance
|
||||
* for now this only supports types without format information
|
||||
|
@ -989,12 +989,14 @@ public class PythonExperimentalClientCodegen extends AbstractPythonCodegen {
|
||||
* This method is used by fromResponse
|
||||
*
|
||||
* @param name name of the property
|
||||
* @param p OAS property object
|
||||
* @param p OAS property schema
|
||||
* @param required true if the property is required in the next higher object schema, false otherwise
|
||||
* @param schemaIsFromAdditionalProperties true if the property is defined by additional properties schema
|
||||
* @return Codegen Property object
|
||||
*/
|
||||
@Override
|
||||
public CodegenProperty fromProperty(String name, Schema p, boolean required) {
|
||||
CodegenProperty cp = super.fromProperty(name, p, required);
|
||||
public CodegenProperty fromProperty(String name, Schema p, boolean required, boolean schemaIsFromAdditionalProperties) {
|
||||
CodegenProperty cp = super.fromProperty(name, p, required, schemaIsFromAdditionalProperties);
|
||||
|
||||
if (cp.isAnyType && cp.isNullable) {
|
||||
cp.isNullable = false;
|
||||
|
@ -0,0 +1 @@
|
||||
{{#if this.classname}}{{classname}}{{else}}{{#if nameInSnakeCase}}{{name}}{{else}}{{baseName}}{{/if}}{{/if}}
|
@ -1,6 +1,14 @@
|
||||
def __new__(
|
||||
cls,
|
||||
{{#if getHasMultipleTypes}}
|
||||
*args: typing.Union[{{> model_templates/schema_python_types }}],
|
||||
{{else}}
|
||||
{{#if isArray }}
|
||||
arg: typing.Union[typing.Tuple[{{#with items}}{{#if complexType}}'{{complexType}}'{{else}}typing.Union[MetaOapg.{{baseName}}, {{> model_templates/schema_python_types }}]{{/if}}{{/with}}], typing.List[{{#with items}}{{#if complexType}}'{{complexType}}'{{else}}typing.Union[MetaOapg.{{baseName}}, {{> model_templates/schema_python_types }}]{{/if}}{{/with}}]],
|
||||
{{else}}
|
||||
*args: typing.Union[{{> model_templates/schema_python_types }}],
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
{{#unless isNull}}
|
||||
{{#if getHasRequired}}
|
||||
{{#each getRequiredVarsMap}}
|
||||
@ -35,10 +43,18 @@ def __new__(
|
||||
**kwargs: typing.Union[MetaOapg.additional_properties, {{> model_templates/schema_python_types }}],
|
||||
{{/if}}
|
||||
{{/with}}
|
||||
) -> '{{#if this.classname}}{{classname}}{{else}}{{#if nameInSnakeCase}}{{name}}{{else}}{{baseName}}{{/if}}{{/if}}':
|
||||
) -> '{{> model_templates/classname }}':
|
||||
return super().__new__(
|
||||
cls,
|
||||
{{#if getHasMultipleTypes}}
|
||||
*args,
|
||||
{{else}}
|
||||
{{#if isArray }}
|
||||
arg,
|
||||
{{else}}
|
||||
*args,
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
{{#unless isNull}}
|
||||
{{#if getHasRequired}}
|
||||
{{#each getRequiredVarsMap}}
|
||||
|
@ -1,6 +1,26 @@
|
||||
{{#if vars}}
|
||||
{{#or getRequiredVarsMap vars}}
|
||||
|
||||
{{/or}}
|
||||
{{#if getRequiredVarsMap}}
|
||||
{{#each getRequiredVarsMap}}
|
||||
{{#with this}}
|
||||
{{#unless nameInSnakeCase}}
|
||||
{{#if complexType}}
|
||||
{{baseName}}: '{{complexType}}'
|
||||
{{else}}
|
||||
{{#if schemaIsFromAdditionalProperties}}
|
||||
{{baseName}}: MetaOapg.additional_properties
|
||||
{{else}}
|
||||
{{baseName}}: MetaOapg.properties.{{baseName}}
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
{{/unless}}
|
||||
{{/with}}
|
||||
{{/each}}
|
||||
{{/if}}
|
||||
{{#if vars}}
|
||||
{{#each vars}}
|
||||
{{#unless required}}
|
||||
{{#unless nameInSnakeCase}}
|
||||
{{#if complexType}}
|
||||
{{baseName}}: '{{complexType}}'
|
||||
@ -8,5 +28,6 @@
|
||||
{{baseName}}: MetaOapg.properties.{{baseName}}
|
||||
{{/if}}
|
||||
{{/unless}}
|
||||
{{/unless}}
|
||||
{{/each}}
|
||||
{{/if}}
|
@ -31,10 +31,21 @@ class {{#if this.classname}}{{classname}}{{else}}{{#if nameInSnakeCase}}{{name}}
|
||||
{{/if}}
|
||||
"""
|
||||
{{/if}}
|
||||
{{#or hasValidation composedSchemas isMap isAnyType}}
|
||||
{{#or hasValidation composedSchemas isMap isAnyType getItems}}
|
||||
|
||||
|
||||
class MetaOapg:
|
||||
{{#with items}}
|
||||
{{#if complexType}}
|
||||
|
||||
@classmethod
|
||||
@property
|
||||
def {{baseName}}(cls) -> typing.Type['{{complexType}}']:
|
||||
return {{complexType}}
|
||||
{{else}}
|
||||
{{> model_templates/schema }}
|
||||
{{/if}}
|
||||
{{/with}}
|
||||
{{#or isMap isAnyType}}
|
||||
{{> model_templates/dict_partial }}
|
||||
{{/or}}
|
||||
@ -48,6 +59,7 @@ class {{#if this.classname}}{{classname}}{{else}}{{#if nameInSnakeCase}}{{name}}
|
||||
{{#if isEnum}}
|
||||
{{> model_templates/enums }}
|
||||
{{/if}}
|
||||
|
||||
{{> model_templates/property_type_hints }}
|
||||
|
||||
{{> model_templates/new }}
|
||||
|
@ -1,6 +1,6 @@
|
||||
|
||||
|
||||
class {{#if this.classname}}{{classname}}{{else}}{{#if nameInSnakeCase}}{{name}}{{else}}{{baseName}}{{/if}}{{/if}}(
|
||||
class {{> model_templates/classname }}(
|
||||
schemas.ListSchema
|
||||
):
|
||||
{{#if this.classname}}
|
||||
@ -29,3 +29,8 @@ class {{#if this.classname}}{{classname}}{{else}}{{#if nameInSnakeCase}}{{name}}
|
||||
{{> model_templates/schema }}
|
||||
{{/if}}
|
||||
{{/with}}
|
||||
|
||||
{{> model_templates/new }}
|
||||
|
||||
def __getitem__(self, i) -> {{#with items}}{{#if complexType}}'{{baseName}}'{{else}}MetaOapg.items{{/if}}{{/with}}:
|
||||
return super().__getitem__(i)
|
||||
|
@ -1512,11 +1512,12 @@ class DictBase(Discriminable, ValidatorBase):
|
||||
dict_items[property_name_js] = new_value
|
||||
return dict_items
|
||||
|
||||
def __setattr__(self, name, value):
|
||||
def __setattr__(self, name: str, value: typing.Any):
|
||||
if not isinstance(self, FileIO):
|
||||
raise AttributeError('property setting not supported on immutable instances')
|
||||
|
||||
def __getattr__(self, name):
|
||||
def __getattr__(self, name: str):
|
||||
# for instance.name access
|
||||
if isinstance(self, frozendict):
|
||||
# if an attribute does not exist
|
||||
try:
|
||||
@ -1525,13 +1526,6 @@ class DictBase(Discriminable, ValidatorBase):
|
||||
raise AttributeError(str(ex))
|
||||
return super().__getattr__(self, name)
|
||||
|
||||
def __getattribute__(self, name):
|
||||
# if an attribute does exist (for example as a class property but not as an instance method)
|
||||
try:
|
||||
return self[name]
|
||||
except (KeyError, TypeError):
|
||||
return super().__getattribute__(name)
|
||||
|
||||
|
||||
def cast_to_allowed_types(
|
||||
arg: typing.Union[str, date, datetime, uuid.UUID, decimal.Decimal, int, float, None, dict, frozendict, list, tuple, bytes, Schema],
|
||||
@ -1821,7 +1815,7 @@ class ListSchema(
|
||||
def _from_openapi_data(cls, arg: typing.List[typing.Any], _configuration: typing.Optional[Configuration] = None):
|
||||
return super()._from_openapi_data(arg, _configuration=_configuration)
|
||||
|
||||
def __new__(cls, arg: typing.Union[list, tuple], **kwargs: ValidationMetadata):
|
||||
def __new__(cls, arg: typing.Union[typing.List[typing.Any], typing.Tuple[typing.Any]], **kwargs: Configuration):
|
||||
return super().__new__(cls, arg, **kwargs)
|
||||
|
||||
|
||||
@ -1836,7 +1830,7 @@ class NoneSchema(
|
||||
def _from_openapi_data(cls, arg: None, _configuration: typing.Optional[Configuration] = None):
|
||||
return super()._from_openapi_data(arg, _configuration=_configuration)
|
||||
|
||||
def __new__(cls, arg: None, **kwargs: typing.Union[ValidationMetadata]):
|
||||
def __new__(cls, arg: None, **kwargs: Configuration):
|
||||
return super().__new__(cls, arg, **kwargs)
|
||||
|
||||
|
||||
@ -1855,7 +1849,7 @@ class NumberSchema(
|
||||
def _from_openapi_data(cls, arg: typing.Union[int, float, decimal.Decimal], _configuration: typing.Optional[Configuration] = None):
|
||||
return super()._from_openapi_data(arg, _configuration=_configuration)
|
||||
|
||||
def __new__(cls, arg: typing.Union[decimal.Decimal, int, float], **kwargs: typing.Union[ValidationMetadata]):
|
||||
def __new__(cls, arg: typing.Union[decimal.Decimal, int, float], **kwargs: Configuration):
|
||||
return super().__new__(cls, arg, **kwargs)
|
||||
|
||||
|
||||
@ -1898,7 +1892,7 @@ class IntSchema(IntBase, NumberSchema):
|
||||
def _from_openapi_data(cls, arg: int, _configuration: typing.Optional[Configuration] = None):
|
||||
return super()._from_openapi_data(arg, _configuration=_configuration)
|
||||
|
||||
def __new__(cls, arg: typing.Union[decimal.Decimal, int], **kwargs: typing.Union[ValidationMetadata]):
|
||||
def __new__(cls, arg: typing.Union[decimal.Decimal, int], **kwargs: Configuration):
|
||||
return super().__new__(cls, arg, **kwargs)
|
||||
|
||||
|
||||
@ -1983,31 +1977,31 @@ class StrSchema(
|
||||
def _from_openapi_data(cls, arg: typing.Union[str], _configuration: typing.Optional[Configuration] = None) -> 'StrSchema':
|
||||
return super()._from_openapi_data(arg, _configuration=_configuration)
|
||||
|
||||
def __new__(cls, arg: typing.Union[str, date, datetime, uuid.UUID], **kwargs: typing.Union[ValidationMetadata]):
|
||||
def __new__(cls, arg: typing.Union[str, date, datetime, uuid.UUID], **kwargs: Configuration):
|
||||
return super().__new__(cls, arg, **kwargs)
|
||||
|
||||
|
||||
class UUIDSchema(UUIDBase, StrSchema):
|
||||
|
||||
def __new__(cls, arg: typing.Union[str, uuid.UUID], **kwargs: typing.Union[ValidationMetadata]):
|
||||
def __new__(cls, arg: typing.Union[str, uuid.UUID], **kwargs: Configuration):
|
||||
return super().__new__(cls, arg, **kwargs)
|
||||
|
||||
|
||||
class DateSchema(DateBase, StrSchema):
|
||||
|
||||
def __new__(cls, arg: typing.Union[str, datetime], **kwargs: typing.Union[ValidationMetadata]):
|
||||
def __new__(cls, arg: typing.Union[str, datetime], **kwargs: Configuration):
|
||||
return super().__new__(cls, arg, **kwargs)
|
||||
|
||||
|
||||
class DateTimeSchema(DateTimeBase, StrSchema):
|
||||
|
||||
def __new__(cls, arg: typing.Union[str, datetime], **kwargs: typing.Union[ValidationMetadata]):
|
||||
def __new__(cls, arg: typing.Union[str, datetime], **kwargs: Configuration):
|
||||
return super().__new__(cls, arg, **kwargs)
|
||||
|
||||
|
||||
class DecimalSchema(DecimalBase, StrSchema):
|
||||
|
||||
def __new__(cls, arg: typing.Union[str], **kwargs: typing.Union[ValidationMetadata]):
|
||||
def __new__(cls, arg: typing.Union[str], **kwargs: Configuration):
|
||||
"""
|
||||
Note: Decimals may not be passed in because cast_to_allowed_types is only invoked once for payloads
|
||||
which can be simple (str) or complex (dicts or lists with nested values)
|
||||
@ -2026,7 +2020,7 @@ class BytesSchema(
|
||||
"""
|
||||
this class will subclass bytes and is immutable
|
||||
"""
|
||||
def __new__(cls, arg: typing.Union[bytes], **kwargs: typing.Union[ValidationMetadata]):
|
||||
def __new__(cls, arg: typing.Union[bytes], **kwargs: Configuration):
|
||||
return super(Schema, cls).__new__(cls, arg)
|
||||
|
||||
|
||||
@ -2051,7 +2045,7 @@ class FileSchema(
|
||||
- to be able to preserve file name info
|
||||
"""
|
||||
|
||||
def __new__(cls, arg: typing.Union[io.FileIO, io.BufferedReader], **kwargs: typing.Union[ValidationMetadata]):
|
||||
def __new__(cls, arg: typing.Union[io.FileIO, io.BufferedReader], **kwargs: Configuration):
|
||||
return super(Schema, cls).__new__(cls, arg)
|
||||
|
||||
|
||||
@ -2071,7 +2065,7 @@ class BinarySchema(
|
||||
FileSchema,
|
||||
]
|
||||
|
||||
def __new__(cls, arg: typing.Union[io.FileIO, io.BufferedReader, bytes], **kwargs: typing.Union[ValidationMetadata]):
|
||||
def __new__(cls, arg: typing.Union[io.FileIO, io.BufferedReader, bytes], **kwargs: Configuration):
|
||||
return super().__new__(cls, arg)
|
||||
|
||||
|
||||
@ -2086,7 +2080,7 @@ class BoolSchema(
|
||||
def _from_openapi_data(cls, arg: bool, _configuration: typing.Optional[Configuration] = None):
|
||||
return super()._from_openapi_data(arg, _configuration=_configuration)
|
||||
|
||||
def __new__(cls, arg: bool, **kwargs: typing.Union[ValidationMetadata]):
|
||||
def __new__(cls, arg: bool, **kwargs: ValidationMetadata):
|
||||
return super().__new__(cls, arg, **kwargs)
|
||||
|
||||
|
||||
|
@ -1995,6 +1995,8 @@ components:
|
||||
- _abc
|
||||
- '-efg'
|
||||
- (xyz)
|
||||
- COUNT_1M
|
||||
- COUNT_50M
|
||||
Enum_Test:
|
||||
type: object
|
||||
required:
|
||||
|
@ -40,6 +40,7 @@ class AdditionalpropertiesAreAllowedByDefault(
|
||||
bar = schemas.AnyTypeSchema
|
||||
additional_properties = schemas.AnyTypeSchema
|
||||
|
||||
|
||||
foo: MetaOapg.properties.foo
|
||||
bar: MetaOapg.properties.bar
|
||||
|
||||
|
@ -48,6 +48,7 @@ class AdditionalpropertiesShouldNotLookInApplicators(
|
||||
foo = schemas.AnyTypeSchema
|
||||
additional_properties = schemas.AnyTypeSchema
|
||||
|
||||
|
||||
foo: MetaOapg.properties.foo
|
||||
|
||||
def __new__(
|
||||
@ -80,6 +81,7 @@ class AdditionalpropertiesShouldNotLookInApplicators(
|
||||
cls.all_of_0,
|
||||
]
|
||||
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
*args: typing.Union[dict, frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
|
@ -51,6 +51,7 @@ class Allof(
|
||||
bar = schemas.IntSchema
|
||||
additional_properties = schemas.AnyTypeSchema
|
||||
|
||||
|
||||
bar: MetaOapg.properties.bar
|
||||
|
||||
def __new__(
|
||||
@ -82,6 +83,7 @@ class Allof(
|
||||
foo = schemas.StrSchema
|
||||
additional_properties = schemas.AnyTypeSchema
|
||||
|
||||
|
||||
foo: MetaOapg.properties.foo
|
||||
|
||||
def __new__(
|
||||
@ -115,6 +117,7 @@ class Allof(
|
||||
cls.all_of_1,
|
||||
]
|
||||
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
*args: typing.Union[dict, frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
|
@ -47,6 +47,7 @@ class AllofCombinedWithAnyofOneof(
|
||||
additional_properties = schemas.AnyTypeSchema
|
||||
multiple_of = 2
|
||||
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
*args: typing.Union[dict, frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
@ -70,6 +71,7 @@ class AllofCombinedWithAnyofOneof(
|
||||
additional_properties = schemas.AnyTypeSchema
|
||||
multiple_of = 5
|
||||
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
*args: typing.Union[dict, frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
@ -93,6 +95,7 @@ class AllofCombinedWithAnyofOneof(
|
||||
additional_properties = schemas.AnyTypeSchema
|
||||
multiple_of = 3
|
||||
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
*args: typing.Union[dict, frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
@ -151,6 +154,7 @@ class AllofCombinedWithAnyofOneof(
|
||||
cls.any_of_0,
|
||||
]
|
||||
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
*args: typing.Union[dict, frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
|
@ -47,6 +47,7 @@ class AllofSimpleTypes(
|
||||
additional_properties = schemas.AnyTypeSchema
|
||||
inclusive_maximum = 30
|
||||
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
*args: typing.Union[dict, frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
@ -70,6 +71,7 @@ class AllofSimpleTypes(
|
||||
additional_properties = schemas.AnyTypeSchema
|
||||
inclusive_minimum = 20
|
||||
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
*args: typing.Union[dict, frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
@ -99,6 +101,7 @@ class AllofSimpleTypes(
|
||||
cls.all_of_1,
|
||||
]
|
||||
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
*args: typing.Union[dict, frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
|
@ -56,6 +56,7 @@ class AllofWithBaseSchema(
|
||||
foo = schemas.StrSchema
|
||||
additional_properties = schemas.AnyTypeSchema
|
||||
|
||||
|
||||
foo: MetaOapg.properties.foo
|
||||
|
||||
def __new__(
|
||||
@ -87,6 +88,7 @@ class AllofWithBaseSchema(
|
||||
baz = schemas.NoneSchema
|
||||
additional_properties = schemas.AnyTypeSchema
|
||||
|
||||
|
||||
baz: MetaOapg.properties.baz
|
||||
|
||||
def __new__(
|
||||
@ -120,6 +122,7 @@ class AllofWithBaseSchema(
|
||||
cls.all_of_1,
|
||||
]
|
||||
|
||||
|
||||
bar: MetaOapg.properties.bar
|
||||
|
||||
def __new__(
|
||||
|
@ -53,6 +53,7 @@ class AllofWithOneEmptySchema(
|
||||
cls.all_of_0,
|
||||
]
|
||||
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
*args: typing.Union[dict, frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
|
@ -55,6 +55,7 @@ class AllofWithTheFirstEmptySchema(
|
||||
cls.all_of_1,
|
||||
]
|
||||
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
*args: typing.Union[dict, frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
|
@ -55,6 +55,7 @@ class AllofWithTheLastEmptySchema(
|
||||
cls.all_of_1,
|
||||
]
|
||||
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
*args: typing.Union[dict, frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
|
@ -55,6 +55,7 @@ class AllofWithTwoEmptySchemas(
|
||||
cls.all_of_1,
|
||||
]
|
||||
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
*args: typing.Union[dict, frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
|
@ -48,6 +48,7 @@ class Anyof(
|
||||
additional_properties = schemas.AnyTypeSchema
|
||||
inclusive_minimum = 2
|
||||
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
*args: typing.Union[dict, frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
@ -77,6 +78,7 @@ class Anyof(
|
||||
cls.any_of_1,
|
||||
]
|
||||
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
*args: typing.Union[dict, frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
|
@ -51,6 +51,7 @@ class AnyofComplexTypes(
|
||||
bar = schemas.IntSchema
|
||||
additional_properties = schemas.AnyTypeSchema
|
||||
|
||||
|
||||
bar: MetaOapg.properties.bar
|
||||
|
||||
def __new__(
|
||||
@ -82,6 +83,7 @@ class AnyofComplexTypes(
|
||||
foo = schemas.StrSchema
|
||||
additional_properties = schemas.AnyTypeSchema
|
||||
|
||||
|
||||
foo: MetaOapg.properties.foo
|
||||
|
||||
def __new__(
|
||||
@ -115,6 +117,7 @@ class AnyofComplexTypes(
|
||||
cls.any_of_1,
|
||||
]
|
||||
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
*args: typing.Union[dict, frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
|
@ -47,6 +47,7 @@ class AnyofWithBaseSchema(
|
||||
additional_properties = schemas.AnyTypeSchema
|
||||
max_length = 2
|
||||
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
*args: typing.Union[dict, frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
@ -70,6 +71,7 @@ class AnyofWithBaseSchema(
|
||||
additional_properties = schemas.AnyTypeSchema
|
||||
min_length = 4
|
||||
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
*args: typing.Union[dict, frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
@ -99,6 +101,7 @@ class AnyofWithBaseSchema(
|
||||
cls.any_of_1,
|
||||
]
|
||||
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
*args: typing.Union[str, ],
|
||||
|
@ -55,6 +55,7 @@ class AnyofWithOneEmptySchema(
|
||||
cls.any_of_1,
|
||||
]
|
||||
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
*args: typing.Union[dict, frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
|
@ -36,3 +36,17 @@ class ArrayTypeMatchesArrays(
|
||||
|
||||
class MetaOapg:
|
||||
items = schemas.AnyTypeSchema
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, dict, frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ]], typing.List[typing.Union[MetaOapg.items, dict, frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ]]],
|
||||
_configuration: typing.Optional[schemas.Configuration] = None,
|
||||
) -> 'ArrayTypeMatchesArrays':
|
||||
return super().__new__(
|
||||
cls,
|
||||
arg,
|
||||
_configuration=_configuration,
|
||||
)
|
||||
|
||||
def __getitem__(self, i) -> MetaOapg.items:
|
||||
return super().__getitem__(i)
|
||||
|
@ -38,6 +38,7 @@ class ByInt(
|
||||
additional_properties = schemas.AnyTypeSchema
|
||||
multiple_of = 2
|
||||
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
*args: typing.Union[dict, frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
|
@ -38,6 +38,7 @@ class ByNumber(
|
||||
additional_properties = schemas.AnyTypeSchema
|
||||
multiple_of = 1.5
|
||||
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
*args: typing.Union[dict, frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
|
@ -38,6 +38,7 @@ class BySmallNumber(
|
||||
additional_properties = schemas.AnyTypeSchema
|
||||
multiple_of = 0.00010
|
||||
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
*args: typing.Union[dict, frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
|
@ -71,8 +71,8 @@ class EnumsInProperties(
|
||||
return cls("bar")
|
||||
additional_properties = schemas.AnyTypeSchema
|
||||
|
||||
foo: MetaOapg.properties.foo
|
||||
bar: MetaOapg.properties.bar
|
||||
foo: MetaOapg.properties.foo
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
|
@ -47,6 +47,7 @@ class ForbiddenProperty(
|
||||
additional_properties = schemas.AnyTypeSchema
|
||||
not_schema = schemas.AnyTypeSchema
|
||||
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
*args: typing.Union[dict, frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
@ -61,6 +62,7 @@ class ForbiddenProperty(
|
||||
)
|
||||
additional_properties = schemas.AnyTypeSchema
|
||||
|
||||
|
||||
foo: MetaOapg.properties.foo
|
||||
|
||||
def __new__(
|
||||
|
@ -47,6 +47,7 @@ class InvalidStringValueForDefault(
|
||||
min_length = 4
|
||||
additional_properties = schemas.AnyTypeSchema
|
||||
|
||||
|
||||
bar: MetaOapg.properties.bar
|
||||
|
||||
def __new__(
|
||||
|
@ -38,6 +38,7 @@ class MaximumValidation(
|
||||
additional_properties = schemas.AnyTypeSchema
|
||||
inclusive_maximum = 3.0
|
||||
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
*args: typing.Union[dict, frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
|
@ -38,6 +38,7 @@ class MaximumValidationWithUnsignedInteger(
|
||||
additional_properties = schemas.AnyTypeSchema
|
||||
inclusive_maximum = 300
|
||||
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
*args: typing.Union[dict, frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
|
@ -38,6 +38,7 @@ class MaxitemsValidation(
|
||||
additional_properties = schemas.AnyTypeSchema
|
||||
max_items = 2
|
||||
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
*args: typing.Union[dict, frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
|
@ -38,6 +38,7 @@ class MaxlengthValidation(
|
||||
additional_properties = schemas.AnyTypeSchema
|
||||
max_length = 2
|
||||
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
*args: typing.Union[dict, frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
|
@ -38,6 +38,7 @@ class Maxproperties0MeansTheObjectIsEmpty(
|
||||
additional_properties = schemas.AnyTypeSchema
|
||||
max_properties = 0
|
||||
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
*args: typing.Union[dict, frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
|
@ -38,6 +38,7 @@ class MaxpropertiesValidation(
|
||||
additional_properties = schemas.AnyTypeSchema
|
||||
max_properties = 2
|
||||
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
*args: typing.Union[dict, frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
|
@ -38,6 +38,7 @@ class MinimumValidation(
|
||||
additional_properties = schemas.AnyTypeSchema
|
||||
inclusive_minimum = 1.1
|
||||
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
*args: typing.Union[dict, frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
|
@ -38,6 +38,7 @@ class MinimumValidationWithSignedInteger(
|
||||
additional_properties = schemas.AnyTypeSchema
|
||||
inclusive_minimum = -2
|
||||
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
*args: typing.Union[dict, frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
|
@ -38,6 +38,7 @@ class MinitemsValidation(
|
||||
additional_properties = schemas.AnyTypeSchema
|
||||
min_items = 1
|
||||
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
*args: typing.Union[dict, frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
|
@ -38,6 +38,7 @@ class MinlengthValidation(
|
||||
additional_properties = schemas.AnyTypeSchema
|
||||
min_length = 2
|
||||
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
*args: typing.Union[dict, frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
|
@ -38,6 +38,7 @@ class MinpropertiesValidation(
|
||||
additional_properties = schemas.AnyTypeSchema
|
||||
min_properties = 1
|
||||
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
*args: typing.Union[dict, frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
|
@ -38,6 +38,7 @@ class ModelNot(
|
||||
additional_properties = schemas.AnyTypeSchema
|
||||
not_schema = schemas.IntSchema
|
||||
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
*args: typing.Union[dict, frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
|
@ -62,6 +62,7 @@ class NestedAllofToCheckValidationSemantics(
|
||||
cls.all_of_0,
|
||||
]
|
||||
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
*args: typing.Union[dict, frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
@ -90,6 +91,7 @@ class NestedAllofToCheckValidationSemantics(
|
||||
cls.all_of_0,
|
||||
]
|
||||
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
*args: typing.Union[dict, frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
|
@ -62,6 +62,7 @@ class NestedAnyofToCheckValidationSemantics(
|
||||
cls.any_of_0,
|
||||
]
|
||||
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
*args: typing.Union[dict, frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
@ -90,6 +91,7 @@ class NestedAnyofToCheckValidationSemantics(
|
||||
cls.any_of_0,
|
||||
]
|
||||
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
*args: typing.Union[dict, frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
|
@ -60,3 +60,59 @@ class NestedItems(
|
||||
|
||||
class MetaOapg:
|
||||
items = schemas.NumberSchema
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, decimal.Decimal, int, float, ]], typing.List[typing.Union[MetaOapg.items, decimal.Decimal, int, float, ]]],
|
||||
_configuration: typing.Optional[schemas.Configuration] = None,
|
||||
) -> 'items':
|
||||
return super().__new__(
|
||||
cls,
|
||||
arg,
|
||||
_configuration=_configuration,
|
||||
)
|
||||
|
||||
def __getitem__(self, i) -> MetaOapg.items:
|
||||
return super().__getitem__(i)
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, tuple, ]], typing.List[typing.Union[MetaOapg.items, tuple, ]]],
|
||||
_configuration: typing.Optional[schemas.Configuration] = None,
|
||||
) -> 'items':
|
||||
return super().__new__(
|
||||
cls,
|
||||
arg,
|
||||
_configuration=_configuration,
|
||||
)
|
||||
|
||||
def __getitem__(self, i) -> MetaOapg.items:
|
||||
return super().__getitem__(i)
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, tuple, ]], typing.List[typing.Union[MetaOapg.items, tuple, ]]],
|
||||
_configuration: typing.Optional[schemas.Configuration] = None,
|
||||
) -> 'items':
|
||||
return super().__new__(
|
||||
cls,
|
||||
arg,
|
||||
_configuration=_configuration,
|
||||
)
|
||||
|
||||
def __getitem__(self, i) -> MetaOapg.items:
|
||||
return super().__getitem__(i)
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, tuple, ]], typing.List[typing.Union[MetaOapg.items, tuple, ]]],
|
||||
_configuration: typing.Optional[schemas.Configuration] = None,
|
||||
) -> 'NestedItems':
|
||||
return super().__new__(
|
||||
cls,
|
||||
arg,
|
||||
_configuration=_configuration,
|
||||
)
|
||||
|
||||
def __getitem__(self, i) -> MetaOapg.items:
|
||||
return super().__getitem__(i)
|
||||
|
@ -62,6 +62,7 @@ class NestedOneofToCheckValidationSemantics(
|
||||
cls.one_of_0,
|
||||
]
|
||||
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
*args: typing.Union[dict, frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
@ -90,6 +91,7 @@ class NestedOneofToCheckValidationSemantics(
|
||||
cls.one_of_0,
|
||||
]
|
||||
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
*args: typing.Union[dict, frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
|
@ -65,6 +65,7 @@ class NotMoreComplexSchema(
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
*args: typing.Union[dict, frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
|
@ -40,6 +40,7 @@ class ObjectPropertiesValidation(
|
||||
bar = schemas.StrSchema
|
||||
additional_properties = schemas.AnyTypeSchema
|
||||
|
||||
|
||||
foo: MetaOapg.properties.foo
|
||||
bar: MetaOapg.properties.bar
|
||||
|
||||
|
@ -48,6 +48,7 @@ class Oneof(
|
||||
additional_properties = schemas.AnyTypeSchema
|
||||
inclusive_minimum = 2
|
||||
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
*args: typing.Union[dict, frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
@ -77,6 +78,7 @@ class Oneof(
|
||||
cls.one_of_1,
|
||||
]
|
||||
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
*args: typing.Union[dict, frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
|
@ -51,6 +51,7 @@ class OneofComplexTypes(
|
||||
bar = schemas.IntSchema
|
||||
additional_properties = schemas.AnyTypeSchema
|
||||
|
||||
|
||||
bar: MetaOapg.properties.bar
|
||||
|
||||
def __new__(
|
||||
@ -82,6 +83,7 @@ class OneofComplexTypes(
|
||||
foo = schemas.StrSchema
|
||||
additional_properties = schemas.AnyTypeSchema
|
||||
|
||||
|
||||
foo: MetaOapg.properties.foo
|
||||
|
||||
def __new__(
|
||||
@ -115,6 +117,7 @@ class OneofComplexTypes(
|
||||
cls.one_of_1,
|
||||
]
|
||||
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
*args: typing.Union[dict, frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
|
@ -47,6 +47,7 @@ class OneofWithBaseSchema(
|
||||
additional_properties = schemas.AnyTypeSchema
|
||||
min_length = 2
|
||||
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
*args: typing.Union[dict, frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
@ -70,6 +71,7 @@ class OneofWithBaseSchema(
|
||||
additional_properties = schemas.AnyTypeSchema
|
||||
max_length = 4
|
||||
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
*args: typing.Union[dict, frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
@ -99,6 +101,7 @@ class OneofWithBaseSchema(
|
||||
cls.one_of_1,
|
||||
]
|
||||
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
*args: typing.Union[str, ],
|
||||
|
@ -55,6 +55,7 @@ class OneofWithEmptySchema(
|
||||
cls.one_of_1,
|
||||
]
|
||||
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
*args: typing.Union[dict, frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
|
@ -51,6 +51,10 @@ class OneofWithRequired(
|
||||
}
|
||||
additional_properties = schemas.AnyTypeSchema
|
||||
|
||||
|
||||
bar: MetaOapg.additional_properties
|
||||
foo: MetaOapg.additional_properties
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
*args: typing.Union[dict, frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
@ -77,6 +81,10 @@ class OneofWithRequired(
|
||||
}
|
||||
additional_properties = schemas.AnyTypeSchema
|
||||
|
||||
|
||||
foo: MetaOapg.additional_properties
|
||||
baz: MetaOapg.additional_properties
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
*args: typing.Union[dict, frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
@ -106,6 +114,7 @@ class OneofWithRequired(
|
||||
cls.one_of_1,
|
||||
]
|
||||
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
*args: typing.Union[dict, frozendict, ],
|
||||
|
@ -40,6 +40,7 @@ class PatternIsNotAnchored(
|
||||
'pattern': r'a+', # noqa: E501
|
||||
}]
|
||||
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
*args: typing.Union[dict, frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
|
@ -40,6 +40,7 @@ class PatternValidation(
|
||||
'pattern': r'^a*$', # noqa: E501
|
||||
}]
|
||||
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
*args: typing.Union[dict, frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
|
@ -117,6 +117,7 @@ class PropertiesWithEscapedCharacters(
|
||||
additional_properties = schemas.AnyTypeSchema
|
||||
|
||||
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
*args: typing.Union[dict, frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
|
@ -52,6 +52,7 @@ class PropertyNamedRefThatIsNotAReference(
|
||||
additional_properties = schemas.AnyTypeSchema
|
||||
|
||||
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
*args: typing.Union[dict, frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
|
@ -52,6 +52,7 @@ class RefInAllof(
|
||||
PropertyNamedRefThatIsNotAReference,
|
||||
]
|
||||
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
*args: typing.Union[dict, frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
|
@ -52,6 +52,7 @@ class RefInAnyof(
|
||||
PropertyNamedRefThatIsNotAReference,
|
||||
]
|
||||
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
*args: typing.Union[dict, frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
|
@ -41,4 +41,18 @@ class RefInItems(
|
||||
def items(cls) -> typing.Type['PropertyNamedRefThatIsNotAReference']:
|
||||
return PropertyNamedRefThatIsNotAReference
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
arg: typing.Union[typing.Tuple['PropertyNamedRefThatIsNotAReference'], typing.List['PropertyNamedRefThatIsNotAReference']],
|
||||
_configuration: typing.Optional[schemas.Configuration] = None,
|
||||
) -> 'RefInItems':
|
||||
return super().__new__(
|
||||
cls,
|
||||
arg,
|
||||
_configuration=_configuration,
|
||||
)
|
||||
|
||||
def __getitem__(self, i) -> 'items':
|
||||
return super().__getitem__(i)
|
||||
|
||||
from unit_test_api.model.property_named_ref_that_is_not_a_reference import PropertyNamedRefThatIsNotAReference
|
||||
|
@ -42,6 +42,7 @@ class RefInNot(
|
||||
def not_schema(cls) -> typing.Type['PropertyNamedRefThatIsNotAReference']:
|
||||
return PropertyNamedRefThatIsNotAReference
|
||||
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
*args: typing.Union[dict, frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
|
@ -52,6 +52,7 @@ class RefInOneof(
|
||||
PropertyNamedRefThatIsNotAReference,
|
||||
]
|
||||
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
*args: typing.Union[dict, frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
|
@ -43,6 +43,7 @@ class RefInProperty(
|
||||
return PropertyNamedRefThatIsNotAReference
|
||||
additional_properties = schemas.AnyTypeSchema
|
||||
|
||||
|
||||
a: 'PropertyNamedRefThatIsNotAReference'
|
||||
|
||||
def __new__(
|
||||
|
@ -39,6 +39,7 @@ class RequiredDefaultValidation(
|
||||
foo = schemas.AnyTypeSchema
|
||||
additional_properties = schemas.AnyTypeSchema
|
||||
|
||||
|
||||
foo: MetaOapg.properties.foo
|
||||
|
||||
def __new__(
|
||||
|
@ -43,6 +43,7 @@ class RequiredValidation(
|
||||
bar = schemas.AnyTypeSchema
|
||||
additional_properties = schemas.AnyTypeSchema
|
||||
|
||||
|
||||
foo: MetaOapg.properties.foo
|
||||
bar: MetaOapg.properties.bar
|
||||
|
||||
|
@ -39,6 +39,7 @@ class RequiredWithEmptyArray(
|
||||
foo = schemas.AnyTypeSchema
|
||||
additional_properties = schemas.AnyTypeSchema
|
||||
|
||||
|
||||
foo: MetaOapg.properties.foo
|
||||
|
||||
def __new__(
|
||||
|
@ -45,6 +45,8 @@ class RequiredWithEscapedCharacters(
|
||||
}
|
||||
additional_properties = schemas.AnyTypeSchema
|
||||
|
||||
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
*args: typing.Union[dict, frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
|
@ -38,6 +38,7 @@ class UniqueitemsFalseValidation(
|
||||
additional_properties = schemas.AnyTypeSchema
|
||||
unique_items = False
|
||||
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
*args: typing.Union[dict, frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
|
@ -38,6 +38,7 @@ class UniqueitemsValidation(
|
||||
additional_properties = schemas.AnyTypeSchema
|
||||
unique_items = True
|
||||
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
*args: typing.Union[dict, frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
|
@ -63,6 +63,7 @@ class SchemaForRequestBodyApplicationJson(
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
*args: typing.Union[dict, frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
|
@ -36,6 +36,7 @@ class SchemaForRequestBodyApplicationJson(
|
||||
additional_properties = schemas.AnyTypeSchema
|
||||
not_schema = schemas.IntSchema
|
||||
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
*args: typing.Union[dict, frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
|
@ -42,6 +42,7 @@ class SchemaForRequestBodyApplicationJson(
|
||||
def not_schema(cls) -> typing.Type['PropertyNamedRefThatIsNotAReference']:
|
||||
return PropertyNamedRefThatIsNotAReference
|
||||
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
*args: typing.Union[dict, frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
|
@ -43,6 +43,8 @@ class SchemaForRequestBodyApplicationJson(
|
||||
}
|
||||
additional_properties = schemas.AnyTypeSchema
|
||||
|
||||
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
*args: typing.Union[dict, frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
|
@ -62,6 +62,7 @@ class SchemaFor200ResponseBodyApplicationJson(
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
*args: typing.Union[dict, frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
|
@ -35,6 +35,7 @@ class SchemaFor200ResponseBodyApplicationJson(
|
||||
additional_properties = schemas.AnyTypeSchema
|
||||
not_schema = schemas.IntSchema
|
||||
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
*args: typing.Union[dict, frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
|
@ -41,6 +41,7 @@ class SchemaFor200ResponseBodyApplicationJson(
|
||||
def not_schema(cls) -> typing.Type['PropertyNamedRefThatIsNotAReference']:
|
||||
return PropertyNamedRefThatIsNotAReference
|
||||
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
*args: typing.Union[dict, frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
|
@ -42,6 +42,8 @@ class SchemaFor200ResponseBodyApplicationJson(
|
||||
}
|
||||
additional_properties = schemas.AnyTypeSchema
|
||||
|
||||
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
*args: typing.Union[dict, frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
|
@ -1519,11 +1519,12 @@ class DictBase(Discriminable, ValidatorBase):
|
||||
dict_items[property_name_js] = new_value
|
||||
return dict_items
|
||||
|
||||
def __setattr__(self, name, value):
|
||||
def __setattr__(self, name: str, value: typing.Any):
|
||||
if not isinstance(self, FileIO):
|
||||
raise AttributeError('property setting not supported on immutable instances')
|
||||
|
||||
def __getattr__(self, name):
|
||||
def __getattr__(self, name: str):
|
||||
# for instance.name access
|
||||
if isinstance(self, frozendict):
|
||||
# if an attribute does not exist
|
||||
try:
|
||||
@ -1532,13 +1533,6 @@ class DictBase(Discriminable, ValidatorBase):
|
||||
raise AttributeError(str(ex))
|
||||
return super().__getattr__(self, name)
|
||||
|
||||
def __getattribute__(self, name):
|
||||
# if an attribute does exist (for example as a class property but not as an instance method)
|
||||
try:
|
||||
return self[name]
|
||||
except (KeyError, TypeError):
|
||||
return super().__getattribute__(name)
|
||||
|
||||
|
||||
def cast_to_allowed_types(
|
||||
arg: typing.Union[str, date, datetime, uuid.UUID, decimal.Decimal, int, float, None, dict, frozendict, list, tuple, bytes, Schema],
|
||||
@ -1828,7 +1822,7 @@ class ListSchema(
|
||||
def _from_openapi_data(cls, arg: typing.List[typing.Any], _configuration: typing.Optional[Configuration] = None):
|
||||
return super()._from_openapi_data(arg, _configuration=_configuration)
|
||||
|
||||
def __new__(cls, arg: typing.Union[list, tuple], **kwargs: ValidationMetadata):
|
||||
def __new__(cls, arg: typing.Union[typing.List[typing.Any], typing.Tuple[typing.Any]], **kwargs: Configuration):
|
||||
return super().__new__(cls, arg, **kwargs)
|
||||
|
||||
|
||||
@ -1843,7 +1837,7 @@ class NoneSchema(
|
||||
def _from_openapi_data(cls, arg: None, _configuration: typing.Optional[Configuration] = None):
|
||||
return super()._from_openapi_data(arg, _configuration=_configuration)
|
||||
|
||||
def __new__(cls, arg: None, **kwargs: typing.Union[ValidationMetadata]):
|
||||
def __new__(cls, arg: None, **kwargs: Configuration):
|
||||
return super().__new__(cls, arg, **kwargs)
|
||||
|
||||
|
||||
@ -1862,7 +1856,7 @@ class NumberSchema(
|
||||
def _from_openapi_data(cls, arg: typing.Union[int, float, decimal.Decimal], _configuration: typing.Optional[Configuration] = None):
|
||||
return super()._from_openapi_data(arg, _configuration=_configuration)
|
||||
|
||||
def __new__(cls, arg: typing.Union[decimal.Decimal, int, float], **kwargs: typing.Union[ValidationMetadata]):
|
||||
def __new__(cls, arg: typing.Union[decimal.Decimal, int, float], **kwargs: Configuration):
|
||||
return super().__new__(cls, arg, **kwargs)
|
||||
|
||||
|
||||
@ -1905,7 +1899,7 @@ class IntSchema(IntBase, NumberSchema):
|
||||
def _from_openapi_data(cls, arg: int, _configuration: typing.Optional[Configuration] = None):
|
||||
return super()._from_openapi_data(arg, _configuration=_configuration)
|
||||
|
||||
def __new__(cls, arg: typing.Union[decimal.Decimal, int], **kwargs: typing.Union[ValidationMetadata]):
|
||||
def __new__(cls, arg: typing.Union[decimal.Decimal, int], **kwargs: Configuration):
|
||||
return super().__new__(cls, arg, **kwargs)
|
||||
|
||||
|
||||
@ -1990,31 +1984,31 @@ class StrSchema(
|
||||
def _from_openapi_data(cls, arg: typing.Union[str], _configuration: typing.Optional[Configuration] = None) -> 'StrSchema':
|
||||
return super()._from_openapi_data(arg, _configuration=_configuration)
|
||||
|
||||
def __new__(cls, arg: typing.Union[str, date, datetime, uuid.UUID], **kwargs: typing.Union[ValidationMetadata]):
|
||||
def __new__(cls, arg: typing.Union[str, date, datetime, uuid.UUID], **kwargs: Configuration):
|
||||
return super().__new__(cls, arg, **kwargs)
|
||||
|
||||
|
||||
class UUIDSchema(UUIDBase, StrSchema):
|
||||
|
||||
def __new__(cls, arg: typing.Union[str, uuid.UUID], **kwargs: typing.Union[ValidationMetadata]):
|
||||
def __new__(cls, arg: typing.Union[str, uuid.UUID], **kwargs: Configuration):
|
||||
return super().__new__(cls, arg, **kwargs)
|
||||
|
||||
|
||||
class DateSchema(DateBase, StrSchema):
|
||||
|
||||
def __new__(cls, arg: typing.Union[str, datetime], **kwargs: typing.Union[ValidationMetadata]):
|
||||
def __new__(cls, arg: typing.Union[str, datetime], **kwargs: Configuration):
|
||||
return super().__new__(cls, arg, **kwargs)
|
||||
|
||||
|
||||
class DateTimeSchema(DateTimeBase, StrSchema):
|
||||
|
||||
def __new__(cls, arg: typing.Union[str, datetime], **kwargs: typing.Union[ValidationMetadata]):
|
||||
def __new__(cls, arg: typing.Union[str, datetime], **kwargs: Configuration):
|
||||
return super().__new__(cls, arg, **kwargs)
|
||||
|
||||
|
||||
class DecimalSchema(DecimalBase, StrSchema):
|
||||
|
||||
def __new__(cls, arg: typing.Union[str], **kwargs: typing.Union[ValidationMetadata]):
|
||||
def __new__(cls, arg: typing.Union[str], **kwargs: Configuration):
|
||||
"""
|
||||
Note: Decimals may not be passed in because cast_to_allowed_types is only invoked once for payloads
|
||||
which can be simple (str) or complex (dicts or lists with nested values)
|
||||
@ -2033,7 +2027,7 @@ class BytesSchema(
|
||||
"""
|
||||
this class will subclass bytes and is immutable
|
||||
"""
|
||||
def __new__(cls, arg: typing.Union[bytes], **kwargs: typing.Union[ValidationMetadata]):
|
||||
def __new__(cls, arg: typing.Union[bytes], **kwargs: Configuration):
|
||||
return super(Schema, cls).__new__(cls, arg)
|
||||
|
||||
|
||||
@ -2058,7 +2052,7 @@ class FileSchema(
|
||||
- to be able to preserve file name info
|
||||
"""
|
||||
|
||||
def __new__(cls, arg: typing.Union[io.FileIO, io.BufferedReader], **kwargs: typing.Union[ValidationMetadata]):
|
||||
def __new__(cls, arg: typing.Union[io.FileIO, io.BufferedReader], **kwargs: Configuration):
|
||||
return super(Schema, cls).__new__(cls, arg)
|
||||
|
||||
|
||||
@ -2078,7 +2072,7 @@ class BinarySchema(
|
||||
FileSchema,
|
||||
]
|
||||
|
||||
def __new__(cls, arg: typing.Union[io.FileIO, io.BufferedReader, bytes], **kwargs: typing.Union[ValidationMetadata]):
|
||||
def __new__(cls, arg: typing.Union[io.FileIO, io.BufferedReader, bytes], **kwargs: Configuration):
|
||||
return super().__new__(cls, arg)
|
||||
|
||||
|
||||
@ -2093,7 +2087,7 @@ class BoolSchema(
|
||||
def _from_openapi_data(cls, arg: bool, _configuration: typing.Optional[Configuration] = None):
|
||||
return super()._from_openapi_data(arg, _configuration=_configuration)
|
||||
|
||||
def __new__(cls, arg: bool, **kwargs: typing.Union[ValidationMetadata]):
|
||||
def __new__(cls, arg: bool, **kwargs: ValidationMetadata):
|
||||
return super().__new__(cls, arg, **kwargs)
|
||||
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
Type | Description | Notes
|
||||
------------- | ------------- | -------------
|
||||
**str** | | defaults to "-efg", must be one of ["_abc", "-efg", "(xyz)", ]
|
||||
**str** | | defaults to "-efg", must be one of ["_abc", "-efg", "(xyz)", "COUNT_1M", "COUNT_50M", ]
|
||||
|
||||
[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
|
||||
|
||||
|
@ -49,6 +49,20 @@ class AdditionalPropertiesWithArrayOfEnums(
|
||||
def items(cls) -> typing.Type['EnumClass']:
|
||||
return EnumClass
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
arg: typing.Union[typing.Tuple['EnumClass'], typing.List['EnumClass']],
|
||||
_configuration: typing.Optional[schemas.Configuration] = None,
|
||||
) -> 'additional_properties':
|
||||
return super().__new__(
|
||||
cls,
|
||||
arg,
|
||||
_configuration=_configuration,
|
||||
)
|
||||
|
||||
def __getitem__(self, i) -> 'items':
|
||||
return super().__getitem__(i)
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
*args: typing.Union[dict, frozendict, ],
|
||||
|
@ -41,4 +41,18 @@ class AnimalFarm(
|
||||
def items(cls) -> typing.Type['Animal']:
|
||||
return Animal
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
arg: typing.Union[typing.Tuple['Animal'], typing.List['Animal']],
|
||||
_configuration: typing.Optional[schemas.Configuration] = None,
|
||||
) -> 'AnimalFarm':
|
||||
return super().__new__(
|
||||
cls,
|
||||
arg,
|
||||
_configuration=_configuration,
|
||||
)
|
||||
|
||||
def __getitem__(self, i) -> 'items':
|
||||
return super().__getitem__(i)
|
||||
|
||||
from petstore_api.model.animal import Animal
|
||||
|
@ -38,6 +38,7 @@ class AnyTypeNotString(
|
||||
additional_properties = schemas.AnyTypeSchema
|
||||
not_schema = schemas.StrSchema
|
||||
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
*args: typing.Union[dict, frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
|
@ -69,6 +69,7 @@ class Apple(
|
||||
}]
|
||||
additional_properties = schemas.AnyTypeSchema
|
||||
|
||||
|
||||
cultivar: MetaOapg.properties.cultivar
|
||||
origin: MetaOapg.properties.origin
|
||||
|
||||
|
@ -36,3 +36,17 @@ class ArrayHoldingAnyType(
|
||||
|
||||
class MetaOapg:
|
||||
items = schemas.AnyTypeSchema
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, dict, frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ]], typing.List[typing.Union[MetaOapg.items, dict, frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ]]],
|
||||
_configuration: typing.Optional[schemas.Configuration] = None,
|
||||
) -> 'ArrayHoldingAnyType':
|
||||
return super().__new__(
|
||||
cls,
|
||||
arg,
|
||||
_configuration=_configuration,
|
||||
)
|
||||
|
||||
def __getitem__(self, i) -> MetaOapg.items:
|
||||
return super().__getitem__(i)
|
||||
|
@ -53,6 +53,34 @@ class ArrayOfArrayOfNumberOnly(
|
||||
|
||||
class MetaOapg:
|
||||
items = schemas.NumberSchema
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, decimal.Decimal, int, float, ]], typing.List[typing.Union[MetaOapg.items, decimal.Decimal, int, float, ]]],
|
||||
_configuration: typing.Optional[schemas.Configuration] = None,
|
||||
) -> 'items':
|
||||
return super().__new__(
|
||||
cls,
|
||||
arg,
|
||||
_configuration=_configuration,
|
||||
)
|
||||
|
||||
def __getitem__(self, i) -> MetaOapg.items:
|
||||
return super().__getitem__(i)
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, tuple, ]], typing.List[typing.Union[MetaOapg.items, tuple, ]]],
|
||||
_configuration: typing.Optional[schemas.Configuration] = None,
|
||||
) -> 'ArrayArrayNumber':
|
||||
return super().__new__(
|
||||
cls,
|
||||
arg,
|
||||
_configuration=_configuration,
|
||||
)
|
||||
|
||||
def __getitem__(self, i) -> MetaOapg.items:
|
||||
return super().__getitem__(i)
|
||||
additional_properties = schemas.AnyTypeSchema
|
||||
|
||||
ArrayArrayNumber: MetaOapg.properties.ArrayArrayNumber
|
||||
|
@ -41,4 +41,18 @@ class ArrayOfEnums(
|
||||
def items(cls) -> typing.Type['StringEnum']:
|
||||
return StringEnum
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
arg: typing.Union[typing.Tuple['StringEnum'], typing.List['StringEnum']],
|
||||
_configuration: typing.Optional[schemas.Configuration] = None,
|
||||
) -> 'ArrayOfEnums':
|
||||
return super().__new__(
|
||||
cls,
|
||||
arg,
|
||||
_configuration=_configuration,
|
||||
)
|
||||
|
||||
def __getitem__(self, i) -> 'items':
|
||||
return super().__getitem__(i)
|
||||
|
||||
from petstore_api.model.string_enum import StringEnum
|
||||
|
@ -45,6 +45,20 @@ class ArrayOfNumberOnly(
|
||||
|
||||
class MetaOapg:
|
||||
items = schemas.NumberSchema
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, decimal.Decimal, int, float, ]], typing.List[typing.Union[MetaOapg.items, decimal.Decimal, int, float, ]]],
|
||||
_configuration: typing.Optional[schemas.Configuration] = None,
|
||||
) -> 'ArrayNumber':
|
||||
return super().__new__(
|
||||
cls,
|
||||
arg,
|
||||
_configuration=_configuration,
|
||||
)
|
||||
|
||||
def __getitem__(self, i) -> MetaOapg.items:
|
||||
return super().__getitem__(i)
|
||||
additional_properties = schemas.AnyTypeSchema
|
||||
|
||||
ArrayNumber: MetaOapg.properties.ArrayNumber
|
||||
|
@ -46,6 +46,20 @@ class ArrayTest(
|
||||
class MetaOapg:
|
||||
items = schemas.StrSchema
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]],
|
||||
_configuration: typing.Optional[schemas.Configuration] = None,
|
||||
) -> 'array_of_string':
|
||||
return super().__new__(
|
||||
cls,
|
||||
arg,
|
||||
_configuration=_configuration,
|
||||
)
|
||||
|
||||
def __getitem__(self, i) -> MetaOapg.items:
|
||||
return super().__getitem__(i)
|
||||
|
||||
|
||||
class array_array_of_integer(
|
||||
schemas.ListSchema
|
||||
@ -63,6 +77,34 @@ class ArrayTest(
|
||||
class MetaOapg:
|
||||
items = schemas.Int64Schema
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, int, ]], typing.List[typing.Union[MetaOapg.items, int, ]]],
|
||||
_configuration: typing.Optional[schemas.Configuration] = None,
|
||||
) -> 'items':
|
||||
return super().__new__(
|
||||
cls,
|
||||
arg,
|
||||
_configuration=_configuration,
|
||||
)
|
||||
|
||||
def __getitem__(self, i) -> MetaOapg.items:
|
||||
return super().__getitem__(i)
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, tuple, ]], typing.List[typing.Union[MetaOapg.items, tuple, ]]],
|
||||
_configuration: typing.Optional[schemas.Configuration] = None,
|
||||
) -> 'array_array_of_integer':
|
||||
return super().__new__(
|
||||
cls,
|
||||
arg,
|
||||
_configuration=_configuration,
|
||||
)
|
||||
|
||||
def __getitem__(self, i) -> MetaOapg.items:
|
||||
return super().__getitem__(i)
|
||||
|
||||
|
||||
class array_array_of_model(
|
||||
schemas.ListSchema
|
||||
@ -83,6 +125,34 @@ class ArrayTest(
|
||||
@property
|
||||
def items(cls) -> typing.Type['ReadOnlyFirst']:
|
||||
return ReadOnlyFirst
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
arg: typing.Union[typing.Tuple['ReadOnlyFirst'], typing.List['ReadOnlyFirst']],
|
||||
_configuration: typing.Optional[schemas.Configuration] = None,
|
||||
) -> 'items':
|
||||
return super().__new__(
|
||||
cls,
|
||||
arg,
|
||||
_configuration=_configuration,
|
||||
)
|
||||
|
||||
def __getitem__(self, i) -> 'items':
|
||||
return super().__getitem__(i)
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, tuple, ]], typing.List[typing.Union[MetaOapg.items, tuple, ]]],
|
||||
_configuration: typing.Optional[schemas.Configuration] = None,
|
||||
) -> 'array_array_of_model':
|
||||
return super().__new__(
|
||||
cls,
|
||||
arg,
|
||||
_configuration=_configuration,
|
||||
)
|
||||
|
||||
def __getitem__(self, i) -> MetaOapg.items:
|
||||
return super().__getitem__(i)
|
||||
additional_properties = schemas.AnyTypeSchema
|
||||
|
||||
array_of_string: MetaOapg.properties.array_of_string
|
||||
|
@ -45,3 +45,17 @@ class ArrayWithValidationsInItems(
|
||||
|
||||
class MetaOapg:
|
||||
inclusive_maximum = 7
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, int, ]], typing.List[typing.Union[MetaOapg.items, int, ]]],
|
||||
_configuration: typing.Optional[schemas.Configuration] = None,
|
||||
) -> 'ArrayWithValidationsInItems':
|
||||
return super().__new__(
|
||||
cls,
|
||||
arg,
|
||||
_configuration=_configuration,
|
||||
)
|
||||
|
||||
def __getitem__(self, i) -> MetaOapg.items:
|
||||
return super().__getitem__(i)
|
||||
|
@ -81,6 +81,7 @@ class Cat(
|
||||
cls.all_of_1,
|
||||
]
|
||||
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
*args: typing.Union[dict, frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
|
@ -43,8 +43,8 @@ class Category(
|
||||
name = schemas.StrSchema
|
||||
additional_properties = schemas.AnyTypeSchema
|
||||
|
||||
id: MetaOapg.properties.id
|
||||
name: MetaOapg.properties.name
|
||||
id: MetaOapg.properties.id
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
|
@ -81,6 +81,7 @@ class ChildCat(
|
||||
cls.all_of_1,
|
||||
]
|
||||
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
*args: typing.Union[dict, frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
|
@ -41,6 +41,7 @@ class ClassModel(
|
||||
_class = schemas.StrSchema
|
||||
additional_properties = schemas.AnyTypeSchema
|
||||
|
||||
|
||||
_class: MetaOapg.properties._class
|
||||
|
||||
def __new__(
|
||||
|
@ -95,6 +95,7 @@ class ComplexQuadrilateral(
|
||||
cls.all_of_1,
|
||||
]
|
||||
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
*args: typing.Union[dict, frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
|
@ -54,6 +54,20 @@ class ComposedAnyOfDifferentTypesNoValidations(
|
||||
|
||||
class MetaOapg:
|
||||
items = schemas.AnyTypeSchema
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, dict, frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ]], typing.List[typing.Union[MetaOapg.items, dict, frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ]]],
|
||||
_configuration: typing.Optional[schemas.Configuration] = None,
|
||||
) -> 'any_of_9':
|
||||
return super().__new__(
|
||||
cls,
|
||||
arg,
|
||||
_configuration=_configuration,
|
||||
)
|
||||
|
||||
def __getitem__(self, i) -> MetaOapg.items:
|
||||
return super().__getitem__(i)
|
||||
any_of_10 = schemas.NumberSchema
|
||||
any_of_11 = schemas.Float32Schema
|
||||
any_of_12 = schemas.Float64Schema
|
||||
@ -91,6 +105,7 @@ class ComposedAnyOfDifferentTypesNoValidations(
|
||||
cls.any_of_15,
|
||||
]
|
||||
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
*args: typing.Union[dict, frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user