forked from loafle/openapi-generator-original
[python-experimental] adds dict["key_name"] type hints (#13309)
* Uses frozendict module import in schemas and api_client * Regnerates sample * Adds overload type hints * Adds __getitem__ methods for invalidly name properties * Fixes code that instantiates referenced schemas in object payloads * Fixes getitem literals containing control charaters * Sorts params by required, adds type hints for properties with addProps turned off * Unit test spec sample regenerated * Adds stub files for models and endpoints * Omitting some endpoint info from endpoint stub files * Removes more from endpoint stub * Deletes all except for schema definition in endpoint stubs * Removes simple validations from stubs * Removes endpoint parameter deifnition from endpoints stubs * Removes unnecessary ../ stub variable access * Samples regenerated * Samples regenerated, fixed handling of invalidly named properties * Samples regenerated * Reverts version files
This commit is contained in:
parent
9b9d3200a8
commit
a294456695
@ -110,6 +110,8 @@ public class PythonExperimentalClientCodegen extends AbstractPythonCodegen {
|
||||
loadDeepObjectIntoItems = false;
|
||||
importBaseType = false;
|
||||
addSchemaImportsFromV3SpecLocations = true;
|
||||
sortModelPropertiesByRequiredFlag = Boolean.TRUE;
|
||||
sortParamsByRequiredFlag = Boolean.TRUE;
|
||||
|
||||
modifyFeatureSet(features -> features
|
||||
.includeSchemaSupportFeatures(
|
||||
@ -280,6 +282,12 @@ public class PythonExperimentalClientCodegen extends AbstractPythonCodegen {
|
||||
}
|
||||
|
||||
modelTemplateFiles.put("model." + templateExtension, ".py");
|
||||
/*
|
||||
This stub file exists to allow pycharm to read and use typing.overload decorators for it to see that
|
||||
dict_instance["someProp"] is of type SomeClass.properties.someProp
|
||||
See https://youtrack.jetbrains.com/issue/PY-42137/PyCharm-type-hinting-doesnt-work-well-with-overload-decorator
|
||||
*/
|
||||
modelTemplateFiles.put("model_stub." + templateExtension, ".pyi");
|
||||
apiTemplateFiles.put("api." + templateExtension, ".py");
|
||||
modelTestTemplateFiles.put("model_test." + templateExtension, ".py");
|
||||
modelDocTemplateFiles.put("model_doc." + templateExtension, ".md");
|
||||
@ -552,6 +560,13 @@ public class PythonExperimentalClientCodegen extends AbstractPythonCodegen {
|
||||
endpointMap.put("packageName", packageName);
|
||||
outputFilename = packageFilename(Arrays.asList("paths", pathModuleName, co.httpMethod + ".py"));
|
||||
pathsFiles.add(Arrays.asList(endpointMap, "endpoint.handlebars", outputFilename));
|
||||
/*
|
||||
This stub file exists to allow pycharm to read and use typing.overload decorators for it to see that
|
||||
dict_instance["someProp"] is of type SomeClass.properties.someProp
|
||||
See https://youtrack.jetbrains.com/issue/PY-42137/PyCharm-type-hinting-doesnt-work-well-with-overload-decorator
|
||||
*/
|
||||
String stubOutputFilename = packageFilename(Arrays.asList("paths", pathModuleName, co.httpMethod + ".pyi"));
|
||||
pathsFiles.add(Arrays.asList(endpointMap, "endpoint_stub.handlebars", stubOutputFilename));
|
||||
|
||||
Map<String, Object> endpointTestMap = new HashMap<>();
|
||||
endpointTestMap.put("operation", co);
|
||||
@ -996,7 +1011,9 @@ public class PythonExperimentalClientCodegen extends AbstractPythonCodegen {
|
||||
*/
|
||||
@Override
|
||||
public CodegenProperty fromProperty(String name, Schema p, boolean required, boolean schemaIsFromAdditionalProperties) {
|
||||
CodegenProperty cp = super.fromProperty(name, p, required, schemaIsFromAdditionalProperties);
|
||||
// fix needed for values with /n /t etc in them
|
||||
String fixedName = handleSpecialCharacters(name);
|
||||
CodegenProperty cp = super.fromProperty(fixedName, p, required, schemaIsFromAdditionalProperties);
|
||||
|
||||
if (cp.isAnyType && cp.isNullable) {
|
||||
cp.isNullable = false;
|
||||
@ -1013,9 +1030,8 @@ public class PythonExperimentalClientCodegen extends AbstractPythonCodegen {
|
||||
// set cp.nameInSnakeCase to a value so we can tell that we are in this use case
|
||||
// we handle this in the schema templates
|
||||
// templates use its presence to handle these badly named variables / keys
|
||||
if ((isReservedWord(name) || !isValidPythonVarOrClassName(name)) && !name.equals(cp.name)) {
|
||||
if ((isReservedWord(cp.baseName) || !isValidPythonVarOrClassName(cp.baseName)) && !cp.baseName.equals(cp.name)) {
|
||||
cp.nameInSnakeCase = cp.name;
|
||||
cp.baseName = (String) processTestExampleData(name);
|
||||
} else {
|
||||
cp.nameInSnakeCase = null;
|
||||
}
|
||||
|
@ -21,6 +21,7 @@ from urllib3.fields import RequestField as RequestFieldBase
|
||||
{{#if tornado}}
|
||||
import tornado.gen
|
||||
{{/if}}
|
||||
import frozendict
|
||||
|
||||
from {{packageName}} import rest
|
||||
from {{packageName}}.configuration import Configuration
|
||||
@ -34,7 +35,6 @@ from {{packageName}}.schemas import (
|
||||
date,
|
||||
datetime,
|
||||
none_type,
|
||||
frozendict,
|
||||
Unset,
|
||||
unset,
|
||||
)
|
||||
@ -63,7 +63,7 @@ class JSONEncoder(json.JSONEncoder):
|
||||
return None
|
||||
elif isinstance(obj, BoolClass):
|
||||
return bool(obj)
|
||||
elif isinstance(obj, (dict, frozendict)):
|
||||
elif isinstance(obj, (dict, frozendict.frozendict)):
|
||||
return {key: self.default(val) for key, val in obj.items()}
|
||||
elif isinstance(obj, (list, tuple)):
|
||||
return [self.default(item) for item in obj]
|
||||
@ -474,7 +474,7 @@ class PathParameter(ParameterBase, StyleSimpleSerializer):
|
||||
def serialize(
|
||||
self,
|
||||
in_data: typing.Union[
|
||||
Schema, Decimal, int, float, str, date, datetime, None, bool, list, tuple, dict, frozendict]
|
||||
Schema, Decimal, int, float, str, date, datetime, None, bool, list, tuple, dict, frozendict.frozendict]
|
||||
) -> typing.Dict[str, str]:
|
||||
if self.schema:
|
||||
cast_in_data = self.schema(in_data)
|
||||
@ -592,7 +592,7 @@ class QueryParameter(ParameterBase, StyleFormSerializer):
|
||||
def serialize(
|
||||
self,
|
||||
in_data: typing.Union[
|
||||
Schema, Decimal, int, float, str, date, datetime, None, bool, list, tuple, dict, frozendict],
|
||||
Schema, Decimal, int, float, str, date, datetime, None, bool, list, tuple, dict, frozendict.frozendict],
|
||||
prefix_separator_iterator: typing.Optional[PrefixSeparatorIterator] = None
|
||||
) -> typing.Dict[str, str]:
|
||||
if self.schema:
|
||||
@ -658,7 +658,7 @@ class CookieParameter(ParameterBase, StyleFormSerializer):
|
||||
def serialize(
|
||||
self,
|
||||
in_data: typing.Union[
|
||||
Schema, Decimal, int, float, str, date, datetime, None, bool, list, tuple, dict, frozendict]
|
||||
Schema, Decimal, int, float, str, date, datetime, None, bool, list, tuple, dict, frozendict.frozendict]
|
||||
) -> typing.Dict[str, str]:
|
||||
if self.schema:
|
||||
cast_in_data = self.schema(in_data)
|
||||
@ -730,7 +730,7 @@ class HeaderParameter(ParameterBase, StyleSimpleSerializer):
|
||||
def serialize(
|
||||
self,
|
||||
in_data: typing.Union[
|
||||
Schema, Decimal, int, float, str, date, datetime, None, bool, list, tuple, dict, frozendict]
|
||||
Schema, Decimal, int, float, str, date, datetime, None, bool, list, tuple, dict, frozendict.frozendict]
|
||||
) -> HTTPHeaderDict[str, str]:
|
||||
if self.schema:
|
||||
cast_in_data = self.schema(in_data)
|
||||
@ -1369,8 +1369,8 @@ class RequestBody(StyleFormSerializer, JSONDetector):
|
||||
|
||||
@staticmethod
|
||||
def __serialize_text_plain(in_data: typing.Any) -> typing.Dict[str, str]:
|
||||
if isinstance(in_data, frozendict):
|
||||
raise ValueError('Unable to serialize type frozendict to text/plain')
|
||||
if isinstance(in_data, frozendict.frozendict):
|
||||
raise ValueError('Unable to serialize type frozendict.frozendict to text/plain')
|
||||
elif isinstance(in_data, tuple):
|
||||
raise ValueError('Unable to serialize type tuple to text/plain')
|
||||
elif isinstance(in_data, NoneClass):
|
||||
@ -1403,7 +1403,7 @@ class RequestBody(StyleFormSerializer, JSONDetector):
|
||||
def __serialize_multipart_form_data(
|
||||
self, in_data: Schema
|
||||
) -> typing.Dict[str, typing.Tuple[RequestField, ...]]:
|
||||
if not isinstance(in_data, frozendict):
|
||||
if not isinstance(in_data, frozendict.frozendict):
|
||||
raise ValueError(f'Unable to serialize {in_data} to multipart/form-data because it is not a dict of data')
|
||||
"""
|
||||
In a multipart/form-data request body, each schema property, or each element of a schema array property,
|
||||
@ -1450,7 +1450,7 @@ class RequestBody(StyleFormSerializer, JSONDetector):
|
||||
"""
|
||||
POST submission of form data in body
|
||||
"""
|
||||
if not isinstance(in_data, frozendict):
|
||||
if not isinstance(in_data, frozendict.frozendict):
|
||||
raise ValueError(
|
||||
f'Unable to serialize {in_data} to application/x-www-form-urlencoded because it is not a dict of data')
|
||||
cast_in_data = self.__json_encoder.default(in_data)
|
||||
@ -1472,7 +1472,7 @@ class RequestBody(StyleFormSerializer, JSONDetector):
|
||||
media_type = self.content[content_type]
|
||||
if isinstance(in_data, media_type.schema):
|
||||
cast_in_data = in_data
|
||||
elif isinstance(in_data, (dict, frozendict)) and in_data:
|
||||
elif isinstance(in_data, (dict, frozendict.frozendict)) and in_data:
|
||||
cast_in_data = media_type.schema(**in_data)
|
||||
else:
|
||||
cast_in_data = media_type.schema(in_data)
|
||||
|
@ -18,8 +18,10 @@ from {{packageName}} import api_client, exceptions
|
||||
{{> model_templates/imports_schema_types }}
|
||||
{{> model_templates/imports_schemas }}
|
||||
|
||||
{{#unless isStub}}
|
||||
from . import path
|
||||
|
||||
{{/unless}}
|
||||
{{#with operation}}
|
||||
{{#if queryParams}}
|
||||
# query params
|
||||
@ -28,6 +30,7 @@ from . import path
|
||||
{{> model_templates/schema }}
|
||||
{{/with}}
|
||||
{{/each}}
|
||||
{{#unless isStub}}
|
||||
RequestRequiredQueryParams = typing.TypedDict(
|
||||
'RequestRequiredQueryParams',
|
||||
{
|
||||
@ -58,6 +61,7 @@ class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams)
|
||||
{{#each queryParams}}
|
||||
{{> endpoint_parameter }}
|
||||
{{/each}}
|
||||
{{/unless}}
|
||||
{{/if}}
|
||||
{{#if headerParams}}
|
||||
# header params
|
||||
@ -66,6 +70,7 @@ class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams)
|
||||
{{> model_templates/schema }}
|
||||
{{/with}}
|
||||
{{/each}}
|
||||
{{#unless isStub}}
|
||||
RequestRequiredHeaderParams = typing.TypedDict(
|
||||
'RequestRequiredHeaderParams',
|
||||
{
|
||||
@ -96,6 +101,7 @@ class RequestHeaderParams(RequestRequiredHeaderParams, RequestOptionalHeaderPara
|
||||
{{#each headerParams}}
|
||||
{{> endpoint_parameter }}
|
||||
{{/each}}
|
||||
{{/unless}}
|
||||
{{/if}}
|
||||
{{#if pathParams}}
|
||||
# path params
|
||||
@ -104,6 +110,7 @@ class RequestHeaderParams(RequestRequiredHeaderParams, RequestOptionalHeaderPara
|
||||
{{> model_templates/schema }}
|
||||
{{/with}}
|
||||
{{/each}}
|
||||
{{#unless isStub}}
|
||||
RequestRequiredPathParams = typing.TypedDict(
|
||||
'RequestRequiredPathParams',
|
||||
{
|
||||
@ -134,6 +141,7 @@ class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams):
|
||||
{{#each pathParams}}
|
||||
{{> endpoint_parameter }}
|
||||
{{/each}}
|
||||
{{/unless}}
|
||||
{{/if}}
|
||||
{{#if cookieParams}}
|
||||
# cookie params
|
||||
@ -142,6 +150,7 @@ class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams):
|
||||
{{> model_templates/schema }}
|
||||
{{/with}}
|
||||
{{/each}}
|
||||
{{#unless isStub}}
|
||||
RequestRequiredCookieParams = typing.TypedDict(
|
||||
'RequestRequiredCookieParams',
|
||||
{
|
||||
@ -172,6 +181,7 @@ class RequestCookieParams(RequestRequiredCookieParams, RequestOptionalCookiePara
|
||||
{{#each cookieParams}}
|
||||
{{> endpoint_parameter }}
|
||||
{{/each}}
|
||||
{{/unless}}
|
||||
{{/if}}
|
||||
{{#with bodyParam}}
|
||||
# body param
|
||||
@ -180,6 +190,7 @@ class RequestCookieParams(RequestRequiredCookieParams, RequestOptionalCookiePara
|
||||
{{> model_templates/schema }}
|
||||
{{/with}}
|
||||
{{/each}}
|
||||
{{#unless isStub}}
|
||||
|
||||
|
||||
request_body_{{paramName}} = api_client.RequestBody(
|
||||
@ -193,7 +204,9 @@ request_body_{{paramName}} = api_client.RequestBody(
|
||||
required=True,
|
||||
{{/if}}
|
||||
)
|
||||
{{/unless}}
|
||||
{{/with}}
|
||||
{{#unless isStub}}
|
||||
{{#each authMethods}}
|
||||
{{#if @first}}
|
||||
_auth = [
|
||||
@ -236,11 +249,13 @@ _servers = (
|
||||
)
|
||||
{{/if}}
|
||||
{{/each}}
|
||||
{{/unless}}
|
||||
{{#each responses}}
|
||||
{{#each responseHeaders}}
|
||||
{{#with schema}}
|
||||
{{> model_templates/schema }}
|
||||
{{/with}}
|
||||
{{#unless isStub}}
|
||||
{{paramName}}_parameter = api_client.HeaderParameter(
|
||||
name="{{baseName}}",
|
||||
{{#if style}}
|
||||
@ -258,12 +273,14 @@ _servers = (
|
||||
explode=True,
|
||||
{{/if}}
|
||||
)
|
||||
{{/unless}}
|
||||
{{/each}}
|
||||
{{#each content}}
|
||||
{{#with this.schema}}
|
||||
{{> model_templates/schema }}
|
||||
{{/with}}
|
||||
{{/each}}
|
||||
{{#unless isStub}}
|
||||
{{#if responseHeaders}}
|
||||
ResponseHeadersFor{{code}} = typing.TypedDict(
|
||||
'ResponseHeadersFor{{code}}',
|
||||
@ -346,7 +363,9 @@ _response_for_{{code}} = api_client.OpenApiResponse(
|
||||
]
|
||||
{{/if}}
|
||||
)
|
||||
{{/unless}}
|
||||
{{/each}}
|
||||
{{#unless isStub}}
|
||||
_status_code_to_response = {
|
||||
{{#each responses}}
|
||||
{{#if isDefault}}
|
||||
@ -533,4 +552,5 @@ class ApiFor{{httpMethod}}(BaseApi):
|
||||
)
|
||||
|
||||
|
||||
{{/unless}}
|
||||
{{/with}}
|
||||
|
@ -5,16 +5,16 @@
|
||||
{{/with}}
|
||||
{{/if}}
|
||||
{{#if queryParams}}
|
||||
query_params: RequestQueryParams = frozendict(),
|
||||
query_params: RequestQueryParams = frozendict.frozendict(),
|
||||
{{/if}}
|
||||
{{#if headerParams}}
|
||||
header_params: RequestHeaderParams = frozendict(),
|
||||
header_params: RequestHeaderParams = frozendict.frozendict(),
|
||||
{{/if}}
|
||||
{{#if pathParams}}
|
||||
path_params: RequestPathParams = frozendict(),
|
||||
path_params: RequestPathParams = frozendict.frozendict(),
|
||||
{{/if}}
|
||||
{{#if cookieParams}}
|
||||
cookie_params: RequestCookieParams = frozendict(),
|
||||
cookie_params: RequestCookieParams = frozendict.frozendict(),
|
||||
{{/if}}
|
||||
{{#with bodyParam}}
|
||||
{{#each content}}
|
||||
|
@ -0,0 +1 @@
|
||||
{{> endpoint isStub=true }}
|
@ -3,12 +3,9 @@
|
||||
{{>partial_header}}
|
||||
|
||||
import re # noqa: F401
|
||||
import sys # noqa: F401
|
||||
import typing # noqa: F401
|
||||
import functools # noqa: F401
|
||||
|
||||
from frozendict import frozendict # noqa: F401
|
||||
|
||||
{{#each models}}
|
||||
{{#with model}}
|
||||
{{> model_templates/imports_schema_types }}
|
||||
|
@ -0,0 +1 @@
|
||||
{{> model isStub=true }}
|
@ -37,6 +37,15 @@ class properties:
|
||||
{{> model_templates/schema }}
|
||||
{{/if}}
|
||||
{{/each}}
|
||||
__annotations__ = {
|
||||
{{#each vars}}
|
||||
{{#if nameInSnakeCase}}
|
||||
"{{{baseName}}}": {{name}},
|
||||
{{else}}
|
||||
"{{{baseName}}}": {{baseName}},
|
||||
{{/if}}
|
||||
{{/each}}
|
||||
}
|
||||
{{/if}}
|
||||
{{#with additionalProperties}}
|
||||
{{#if complexType}}
|
||||
|
@ -1,6 +1,7 @@
|
||||
import decimal # noqa: F401
|
||||
from datetime import date, datetime # noqa: F401
|
||||
from frozendict import frozendict # noqa: F401
|
||||
import uuid # noqa: F401
|
||||
|
||||
import frozendict # noqa: F401
|
||||
|
||||
from {{packageName}} import schemas # noqa: F401
|
||||
|
@ -0,0 +1,42 @@
|
||||
{{#if getRequiredVarsMap}}
|
||||
{{#each getRequiredVarsMap}}
|
||||
{{#with this}}
|
||||
|
||||
@typing.overload
|
||||
{{#if complexType}}
|
||||
def __getitem__(self, name: typing.Literal["{{{baseName}}}"]) -> '{{complexType}}': ...
|
||||
{{else}}
|
||||
{{#if schemaIsFromAdditionalProperties}}
|
||||
def __getitem__(self, name: typing.Literal["{{{baseName}}}"]) -> MetaOapg.additional_properties: ...
|
||||
{{else}}
|
||||
{{#if nameInSnakeCase}}
|
||||
def __getitem__(self, name: typing.Literal["{{{baseName}}}"]) -> MetaOapg.properties.{{name}}: ...
|
||||
{{else}}
|
||||
def __getitem__(self, name: typing.Literal["{{{baseName}}}"]) -> MetaOapg.properties.{{baseName}}: ...
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
{{/with}}
|
||||
{{/each}}
|
||||
{{/if}}
|
||||
{{#if vars}}
|
||||
{{#each vars}}
|
||||
{{#unless required}}
|
||||
|
||||
@typing.overload
|
||||
{{#if complexType}}
|
||||
def __getitem__(self, name: typing.Literal["{{{baseName}}}"]) -> '{{complexType}}': ...
|
||||
{{else}}
|
||||
{{#if nameInSnakeCase}}
|
||||
def __getitem__(self, name: typing.Literal["{{{baseName}}}"]) -> MetaOapg.properties.{{name}}: ...
|
||||
{{else}}
|
||||
def __getitem__(self, name: typing.Literal["{{{baseName}}}"]) -> MetaOapg.properties.{{baseName}}: ...
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
{{/unless}}
|
||||
{{/each}}
|
||||
{{/if}}
|
||||
|
||||
def __getitem__(self, name: str) -> {{#with additionalProperties}}{{#if complexType}}'{{complexType}}'{{else}}MetaOapg.{{baseName}}{{/if}}{{/with}}:
|
||||
# dict_instance[name] accessor
|
||||
return super().__getitem__(name)
|
@ -0,0 +1,30 @@
|
||||
{{#if vars}}
|
||||
{{#each vars}}
|
||||
|
||||
{{#unless @last}}
|
||||
@typing.overload
|
||||
{{#if complexType}}
|
||||
def __getitem__(self, name: typing.Literal["{{{baseName}}}"]) -> '{{complexType}}': ...
|
||||
{{else}}
|
||||
{{#if nameInSnakeCase}}
|
||||
def __getitem__(self, name: typing.Literal["{{{baseName}}}"]) -> MetaOapg.properties.{{name}}: ...
|
||||
{{else}}
|
||||
def __getitem__(self, name: typing.Literal["{{{baseName}}}"]) -> MetaOapg.properties.{{baseName}}: ...
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
{{else}}
|
||||
{{#if complexType}}
|
||||
def __getitem__(self, name: typing.Literal["{{{baseName}}}"]) -> '{{complexType}}':
|
||||
{{else}}
|
||||
{{#if nameInSnakeCase}}
|
||||
def __getitem__(self, name: typing.Literal["{{{baseName}}}"]) -> MetaOapg.properties.{{name}}:
|
||||
{{else}}
|
||||
def __getitem__(self, name: typing.Literal["{{{baseName}}}"]) -> MetaOapg.properties.{{baseName}}:
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
# dict_instance[name] accessor
|
||||
return super().__getitem__(name)
|
||||
{{/unless}}
|
||||
{{/each}}
|
||||
|
||||
{{/if}}
|
@ -30,4 +30,9 @@
|
||||
{{/unless}}
|
||||
{{/unless}}
|
||||
{{/each}}
|
||||
{{/if}}
|
||||
{{#if additionalProperties}}
|
||||
{{> model_templates/property_getitems_with_addprops }}
|
||||
{{else}}
|
||||
{{> model_templates/property_getitems_without_addprops }}
|
||||
{{/if}}
|
@ -38,19 +38,5 @@
|
||||
{{> model_templates/var_equals_cls }}
|
||||
{{/or}}
|
||||
{{/or}}
|
||||
{{#if nameInSnakeCase}}
|
||||
locals()["{{{baseName}}}"] = {{name}}
|
||||
del locals()['{{name}}']
|
||||
"""
|
||||
NOTE:
|
||||
openapi/json-schema allows properties to have invalid python names
|
||||
The above local assignment allows the code to keep those invalid python names
|
||||
This allows properties to have names like 'some-name', '1 bad name'
|
||||
Properties with these names are omitted from the __new__ + _from_openapi_data signatures
|
||||
- __new__ these properties can be passed in as **kwargs
|
||||
- _from_openapi_data these are passed in in a dict in the first positional argument *arg
|
||||
If the property is required and was not passed in, an exception will be thrown
|
||||
"""
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
{{/unless}}
|
@ -9,7 +9,7 @@ class {{#if this.classname}}{{classname}}{{else}}{{#if nameInSnakeCase}}{{name}}
|
||||
{{/if}}
|
||||
{{else}}
|
||||
{{#if getHasMultipleTypes}}
|
||||
schemas.SchemaTypeCheckerClsFactory(typing.Union[{{#if isArray}}tuple, {{/if}}{{#if isMap}}frozendict, {{/if}}{{#if isNull}}schemas.NoneClass, {{/if}}{{#if isString}}str, {{/if}}{{#if isByteArray}}str, {{/if}}{{#if isUnboundedInteger}}decimal.Decimal, {{/if}}{{#if isShort}}decimal.Decimal, {{/if}}{{#if isLong}}decimal.Decimal, {{/if}}{{#if isFloat}}decimal.Decimal, {{/if}}{{#if isDouble}}decimal.Decimal, {{/if}}{{#if isNumber}}decimal.Decimal, {{/if}}{{#if isDate}}str, {{/if}}{{#if isDateTime}}str, {{/if}}{{#if isDecimal}}str, {{/if}}{{#if isBoolean}}schemas.BoolClass, {{/if}}]),
|
||||
schemas.SchemaTypeCheckerClsFactory(typing.Union[{{#if isArray}}tuple, {{/if}}{{#if isMap}}frozendict.frozendict, {{/if}}{{#if isNull}}schemas.NoneClass, {{/if}}{{#or isUnboundedInteger isShort isLong isFloat isDouble isNumber}}decimal.Decimal, {{/or}}{{#or isString isByteArray isDate isDateTime isDecimal}}str, {{/or}}{{#if isBoolean}}schemas.BoolClass, {{/if}}]),
|
||||
{{/if}}
|
||||
{{#if composedSchemas}}
|
||||
schemas.ComposedBase,
|
||||
@ -49,9 +49,11 @@ class {{#if this.classname}}{{classname}}{{else}}{{#if nameInSnakeCase}}{{name}}
|
||||
{{#or isMap isAnyType}}
|
||||
{{> model_templates/dict_partial }}
|
||||
{{/or}}
|
||||
{{#unless isStub}}
|
||||
{{#if hasValidation}}
|
||||
{{> model_templates/validations }}
|
||||
{{/if}}
|
||||
{{/unless}}
|
||||
{{#if composedSchemas}}
|
||||
{{> model_templates/composed_schemas }}
|
||||
{{/if}}
|
||||
|
@ -1,6 +1,6 @@
|
||||
|
||||
|
||||
class {{#if this.classname}}{{classname}}{{else}}{{#if nameInSnakeCase}}{{name}}{{else}}{{baseName}}{{/if}}{{/if}}(
|
||||
class {{> model_templates/classname }}(
|
||||
schemas.DictSchema
|
||||
):
|
||||
{{#if this.classname}}
|
||||
@ -18,7 +18,9 @@ class {{#if this.classname}}{{classname}}{{else}}{{#if nameInSnakeCase}}{{name}}
|
||||
|
||||
class MetaOapg:
|
||||
{{> model_templates/dict_partial }}
|
||||
{{#unless isStub}}
|
||||
{{> model_templates/validations }}
|
||||
{{/unless}}
|
||||
{{> model_templates/property_type_hints }}
|
||||
|
||||
{{> model_templates/new }}
|
||||
|
@ -17,7 +17,9 @@ class {{> model_templates/classname }}(
|
||||
|
||||
|
||||
class MetaOapg:
|
||||
{{#unless isStub}}
|
||||
{{> model_templates/validations }}
|
||||
{{/unless}}
|
||||
{{#with items}}
|
||||
{{#if complexType}}
|
||||
|
||||
@ -32,5 +34,5 @@ class {{> model_templates/classname }}(
|
||||
|
||||
{{> model_templates/new }}
|
||||
|
||||
def __getitem__(self, i) -> {{#with items}}{{#if complexType}}'{{baseName}}'{{else}}MetaOapg.items{{/if}}{{/with}}:
|
||||
def __getitem__(self, i: int) -> {{#with items}}{{#if complexType}}'{{complexType}}'{{else}}MetaOapg.items{{/if}}{{/with}}:
|
||||
return super().__getitem__(i)
|
||||
|
@ -1 +1 @@
|
||||
{{#if isAnyType}}dict, frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, {{/if}}{{#if isArray}}tuple, {{/if}}{{#if isMap}}dict, frozendict, {{/if}}{{#if isNull}}None, {{/if}}{{#or isString isByteArray}}str, {{/or}}{{#or isUnboundedInteger isShort isLong}}int, {{/or}}{{#or isFloat isDouble}}float, {{/or}}{{#if isNumber}}decimal.Decimal, int, float, {{/if}}{{#if isDate}}date, str, {{/if}}{{#if isUuid}}uuid.UUID, str, {{/if}}{{#if isDateTime}}datetime, str, {{/if}}{{#if isDecimal}}str, {{/if}}{{#if isBoolean}}bool, {{/if}}
|
||||
{{#if isAnyType}}dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, {{/if}}{{#if isArray}}tuple, {{/if}}{{#if isMap}}dict, frozendict.frozendict, {{/if}}{{#if isNull}}None, {{/if}}{{#or isString isByteArray}}str, {{/or}}{{#or isUnboundedInteger isShort isLong}}int, {{/or}}{{#or isFloat isDouble}}float, {{/or}}{{#if isNumber}}decimal.Decimal, int, float, {{/if}}{{#if isDate}}date, str, {{/if}}{{#if isUuid}}uuid.UUID, str, {{/if}}{{#if isDateTime}}datetime, str, {{/if}}{{#if isDecimal}}str, {{/if}}{{#if isBoolean}}bool, {{/if}}
|
@ -17,12 +17,21 @@ class {{#if this.classname}}{{classname}}{{else}}{{#if nameInSnakeCase}}{{name}}
|
||||
{{/if}}
|
||||
"""
|
||||
{{/if}}
|
||||
{{#unless isStub}}
|
||||
{{#if hasValidation}}
|
||||
|
||||
|
||||
class MetaOapg:
|
||||
{{> model_templates/validations }}
|
||||
{{/if}}
|
||||
{{/unless}}
|
||||
{{#if isEnum}}
|
||||
{{> model_templates/enums }}
|
||||
{{/if}}
|
||||
{{#if isStub}}
|
||||
{{#if hasValidation}}
|
||||
{{#unless isEnum}}
|
||||
pass
|
||||
{{/unless}}
|
||||
{{/if}}
|
||||
{{/if}}
|
@ -8,7 +8,7 @@
|
||||
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}}
|
||||
**{{@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}}
|
||||
|
@ -12,7 +12,7 @@ import typing
|
||||
import uuid
|
||||
|
||||
from dateutil.parser.isoparser import isoparser, _takes_ascii
|
||||
from frozendict import frozendict
|
||||
import frozendict
|
||||
|
||||
from {{packageName}}.exceptions import (
|
||||
ApiTypeError,
|
||||
@ -72,7 +72,7 @@ def update(d: dict, u: dict):
|
||||
d[k] = d[k] | v
|
||||
|
||||
|
||||
class ValidationMetadata(frozendict):
|
||||
class ValidationMetadata(frozendict.frozendict):
|
||||
"""
|
||||
A class storing metadata that is needed to validate OpenApi Schema payloads
|
||||
"""
|
||||
@ -82,7 +82,7 @@ class ValidationMetadata(frozendict):
|
||||
from_server: bool = False,
|
||||
configuration: typing.Optional[Configuration] = None,
|
||||
seen_classes: typing.FrozenSet[typing.Type] = frozenset(),
|
||||
validated_path_to_schemas: typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Set[typing.Type]] = frozendict()
|
||||
validated_path_to_schemas: typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Set[typing.Type]] = frozendict.frozendict()
|
||||
):
|
||||
"""
|
||||
Args:
|
||||
@ -237,7 +237,7 @@ class Schema:
|
||||
"""
|
||||
the base class of all swagger/openapi schemas/models
|
||||
"""
|
||||
__inheritable_primitive_types_set = {decimal.Decimal, str, tuple, frozendict, FileIO, bytes, BoolClass, NoneClass}
|
||||
__inheritable_primitive_types_set = {decimal.Decimal, str, tuple, frozendict.frozendict, FileIO, bytes, BoolClass, NoneClass}
|
||||
MetaOapg = MetaOapgTyped
|
||||
|
||||
@classmethod
|
||||
@ -245,7 +245,7 @@ class Schema:
|
||||
cls,
|
||||
arg,
|
||||
validation_metadata: ValidationMetadata,
|
||||
) -> typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Set[typing.Union['Schema', str, decimal.Decimal, BoolClass, NoneClass, frozendict, tuple]]]:
|
||||
) -> typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Set[typing.Union['Schema', str, decimal.Decimal, BoolClass, NoneClass, frozendict.frozendict, tuple]]]:
|
||||
"""
|
||||
Schema _validate
|
||||
Runs all schema validation logic and
|
||||
@ -256,7 +256,7 @@ class Schema:
|
||||
- the returned instance is a serializable type (except for None, True, and False) which are enums
|
||||
|
||||
Use cases:
|
||||
1. inheritable type: string/decimal.Decimal/frozendict/tuple
|
||||
1. inheritable type: string/decimal.Decimal/frozendict.frozendict/tuple
|
||||
2. singletons: bool/None -> uses the base classes BoolClass/NoneClass
|
||||
|
||||
Required Steps:
|
||||
@ -279,7 +279,7 @@ class Schema:
|
||||
|
||||
@staticmethod
|
||||
def __process_schema_classes(
|
||||
schema_classes: typing.Set[typing.Union['Schema', str, decimal.Decimal, BoolClass, NoneClass, frozendict, tuple]]
|
||||
schema_classes: typing.Set[typing.Union['Schema', str, decimal.Decimal, BoolClass, NoneClass, frozendict.frozendict, tuple]]
|
||||
):
|
||||
"""
|
||||
Processes and mutates schema_classes
|
||||
@ -332,11 +332,11 @@ class Schema:
|
||||
for path, schema_classes in _path_to_schemas.items():
|
||||
"""
|
||||
Use cases
|
||||
1. N number of schema classes + enum + type != bool/None, classes in path_to_schemas: tuple/frozendict/str/Decimal/bytes/FileIo
|
||||
1. N number of schema classes + enum + type != bool/None, classes in path_to_schemas: tuple/frozendict.frozendict/str/Decimal/bytes/FileIo
|
||||
needs Singleton added
|
||||
2. N number of schema classes + enum + type == bool/None, classes in path_to_schemas: BoolClass/NoneClass
|
||||
Singleton already added
|
||||
3. N number of schema classes, classes in path_to_schemas: BoolClass/NoneClass/tuple/frozendict/str/Decimal/bytes/FileIo
|
||||
3. N number of schema classes, classes in path_to_schemas: BoolClass/NoneClass/tuple/frozendict.frozendict/str/Decimal/bytes/FileIo
|
||||
"""
|
||||
cls.__process_schema_classes(schema_classes)
|
||||
enum_schema = any(
|
||||
@ -361,7 +361,7 @@ class Schema:
|
||||
path_to_schemas: typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Type['Schema']]
|
||||
):
|
||||
# We have a Dynamic class and we are making an instance of it
|
||||
if issubclass(cls, frozendict):
|
||||
if issubclass(cls, frozendict.frozendict):
|
||||
properties = cls._get_properties(arg, path_to_item, path_to_schemas)
|
||||
return super(Schema, cls).__new__(cls, properties)
|
||||
elif issubclass(cls, tuple):
|
||||
@ -389,7 +389,7 @@ class Schema:
|
||||
None,
|
||||
'Schema',
|
||||
dict,
|
||||
frozendict,
|
||||
frozendict.frozendict,
|
||||
tuple,
|
||||
list,
|
||||
io.FileIO,
|
||||
@ -416,25 +416,25 @@ class Schema:
|
||||
return new_inst
|
||||
|
||||
@staticmethod
|
||||
def __get_input_dict(*args, **kwargs) -> frozendict:
|
||||
def __get_input_dict(*args, **kwargs) -> frozendict.frozendict:
|
||||
input_dict = {}
|
||||
if args and isinstance(args[0], (dict, frozendict)):
|
||||
if args and isinstance(args[0], (dict, frozendict.frozendict)):
|
||||
input_dict.update(args[0])
|
||||
if kwargs:
|
||||
input_dict.update(kwargs)
|
||||
return frozendict(input_dict)
|
||||
return frozendict.frozendict(input_dict)
|
||||
|
||||
@staticmethod
|
||||
def __remove_unsets(kwargs):
|
||||
return {key: val for key, val in kwargs.items() if val is not unset}
|
||||
|
||||
def __new__(cls, *args: typing.Union[dict, frozendict, list, tuple, decimal.Decimal, float, int, str, date, datetime, bool, None, 'Schema'], _configuration: typing.Optional[Configuration] = None, **kwargs: typing.Union[dict, frozendict, list, tuple, decimal.Decimal, float, int, str, date, datetime, bool, None, 'Schema', Unset]):
|
||||
def __new__(cls, *args: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, date, datetime, bool, None, 'Schema'], _configuration: typing.Optional[Configuration] = None, **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, date, datetime, bool, None, 'Schema', Unset]):
|
||||
"""
|
||||
Schema __new__
|
||||
|
||||
Args:
|
||||
args (int/float/decimal.Decimal/str/list/tuple/dict/frozendict/bool/None): the value
|
||||
kwargs (str, int/float/decimal.Decimal/str/list/tuple/dict/frozendict/bool/None): dict values
|
||||
args (int/float/decimal.Decimal/str/list/tuple/dict/frozendict.frozendict/bool/None): the value
|
||||
kwargs (str, int/float/decimal.Decimal/str/list/tuple/dict/frozendict.frozendict/bool/None): dict values
|
||||
_configuration: contains the Configuration that enables json schema validation keywords
|
||||
like minItems, minLength etc
|
||||
"""
|
||||
@ -464,10 +464,10 @@ class Schema:
|
||||
def __init__(
|
||||
self,
|
||||
*args: typing.Union[
|
||||
dict, frozendict, list, tuple, decimal.Decimal, float, int, str, date, datetime, bool, None, 'Schema'],
|
||||
dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, date, datetime, bool, None, 'Schema'],
|
||||
_configuration: typing.Optional[Configuration] = None,
|
||||
**kwargs: typing.Union[
|
||||
dict, frozendict, list, tuple, decimal.Decimal, float, int, str, date, datetime, bool, None, 'Schema', Unset
|
||||
dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, date, datetime, bool, None, 'Schema', Unset
|
||||
]
|
||||
):
|
||||
"""
|
||||
@ -531,7 +531,7 @@ class Validator(typing.Protocol):
|
||||
cls,
|
||||
arg,
|
||||
validation_metadata: ValidationMetadata,
|
||||
) -> typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Set[typing.Union['Schema', str, decimal.Decimal, BoolClass, NoneClass, frozendict, tuple]]]:
|
||||
) -> typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Set[typing.Union['Schema', str, decimal.Decimal, BoolClass, NoneClass, frozendict.frozendict, tuple]]]:
|
||||
pass
|
||||
|
||||
|
||||
@ -603,7 +603,7 @@ def SchemaTypeCheckerClsFactory(union_type_cls: typing.Union[typing.Any]) -> Val
|
||||
cls,
|
||||
arg,
|
||||
validation_metadata: ValidationMetadata,
|
||||
) -> typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Set[typing.Union['Schema', str, decimal.Decimal, BoolClass, NoneClass, frozendict, tuple]]]:
|
||||
) -> typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Set[typing.Union['Schema', str, decimal.Decimal, BoolClass, NoneClass, frozendict.frozendict, tuple]]]:
|
||||
"""
|
||||
SchemaTypeChecker _validate
|
||||
Validates arg's type
|
||||
@ -654,7 +654,7 @@ def SchemaEnumMakerClsFactory(enum_value_to_name: typing.Dict[typing.Union[str,
|
||||
cls,
|
||||
arg,
|
||||
validation_metadata: ValidationMetadata,
|
||||
) -> typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Set[typing.Union['Schema', str, decimal.Decimal, BoolClass, NoneClass, frozendict, tuple]]]:
|
||||
) -> typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Set[typing.Union['Schema', str, decimal.Decimal, BoolClass, NoneClass, frozendict.frozendict, tuple]]]:
|
||||
"""
|
||||
SchemaEnumMaker _validate
|
||||
Validates that arg is in the enum's allowed values
|
||||
@ -777,7 +777,7 @@ class StrBase(ValidatorBase):
|
||||
cls,
|
||||
arg,
|
||||
validation_metadata: ValidationMetadata,
|
||||
) -> typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Set[typing.Union['Schema', str, decimal.Decimal, BoolClass, NoneClass, frozendict, tuple]]]:
|
||||
) -> typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Set[typing.Union['Schema', str, decimal.Decimal, BoolClass, NoneClass, frozendict.frozendict, tuple]]]:
|
||||
"""
|
||||
StrBase _validate
|
||||
Validates that validations pass
|
||||
@ -1061,7 +1061,7 @@ class NumberBase(ValidatorBase):
|
||||
cls,
|
||||
arg,
|
||||
validation_metadata: ValidationMetadata,
|
||||
) -> typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Set[typing.Union['Schema', str, decimal.Decimal, BoolClass, NoneClass, frozendict, tuple]]]:
|
||||
) -> typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Set[typing.Union['Schema', str, decimal.Decimal, BoolClass, NoneClass, frozendict.frozendict, tuple]]]:
|
||||
"""
|
||||
NumberBase _validate
|
||||
Validates that validations pass
|
||||
@ -1294,10 +1294,12 @@ class DictBase(Discriminable, ValidatorBase):
|
||||
invalid_arguments = []
|
||||
required_property_names = getattr(cls.MetaOapg, 'required', set())
|
||||
additional_properties = getattr(cls.MetaOapg, 'additional_properties', AnyTypeSchema)
|
||||
properties = getattr(cls.MetaOapg, 'properties', {})
|
||||
property_annotations = getattr(properties, '__annotations__', {})
|
||||
for property_name in arg:
|
||||
if property_name in required_property_names:
|
||||
seen_required_properties.add(property_name)
|
||||
elif property_name in cls._property_names:
|
||||
elif property_name in property_annotations:
|
||||
continue
|
||||
elif additional_properties:
|
||||
continue
|
||||
@ -1341,15 +1343,20 @@ class DictBase(Discriminable, ValidatorBase):
|
||||
"""
|
||||
path_to_schemas = {}
|
||||
additional_properties = getattr(cls.MetaOapg, 'additional_properties', AnyTypeSchema)
|
||||
properties = getattr(cls.MetaOapg, 'properties', {})
|
||||
property_annotations = getattr(properties, '__annotations__', {})
|
||||
for property_name, value in arg.items():
|
||||
if property_name in cls._property_names:
|
||||
schema = getattr(cls.MetaOapg.properties, property_name)
|
||||
if property_name in property_annotations:
|
||||
schema = property_annotations[property_name]
|
||||
elif additional_properties:
|
||||
schema = additional_properties
|
||||
else:
|
||||
raise ApiTypeError('Unable to find schema for value={} in class={} at path_to_item={}'.format(
|
||||
value, cls, validation_metadata.path_to_item+(property_name,)
|
||||
))
|
||||
if isinstance(schema, classmethod):
|
||||
# referenced schema, call classmethod property
|
||||
schema = schema.__func__.fget(properties)
|
||||
arg_validation_metadata = ValidationMetadata(
|
||||
from_server=validation_metadata.from_server,
|
||||
configuration=validation_metadata.configuration,
|
||||
@ -1411,10 +1418,10 @@ class DictBase(Discriminable, ValidatorBase):
|
||||
ApiValueError: when a string can't be converted into a date or datetime and it must be one of those classes
|
||||
ApiTypeError: when the input type is not in the list of allowed spec types
|
||||
"""
|
||||
if isinstance(arg, frozendict):
|
||||
if isinstance(arg, frozendict.frozendict):
|
||||
cls.__check_dict_validations(arg, validation_metadata)
|
||||
_path_to_schemas = super()._validate(arg, validation_metadata=validation_metadata)
|
||||
if not isinstance(arg, frozendict):
|
||||
if not isinstance(arg, frozendict.frozendict):
|
||||
return _path_to_schemas
|
||||
cls._validate_arg_presence(arg)
|
||||
other_path_to_schemas = cls._validate_args(arg, validation_metadata=validation_metadata)
|
||||
@ -1450,30 +1457,6 @@ class DictBase(Discriminable, ValidatorBase):
|
||||
update(_path_to_schemas, other_path_to_schemas)
|
||||
return _path_to_schemas
|
||||
|
||||
@classmethod
|
||||
@property
|
||||
@functools.cache
|
||||
def _property_names(cls) -> typing.Tuple[str]:
|
||||
if not hasattr(cls.MetaOapg, 'properties'):
|
||||
return tuple()
|
||||
property_names = set()
|
||||
for var_name, var_value in cls.MetaOapg.properties.__dict__.items():
|
||||
var_name: str
|
||||
# referenced models are classmethods
|
||||
is_classmethod = type(var_value) is classmethod
|
||||
if is_classmethod:
|
||||
property_names.add(var_name)
|
||||
continue
|
||||
is_class = type(var_value) is type
|
||||
if not is_class:
|
||||
continue
|
||||
if not issubclass(var_value, Schema):
|
||||
continue
|
||||
property_names.add(var_name)
|
||||
property_names = list(property_names)
|
||||
property_names.sort()
|
||||
return tuple(property_names)
|
||||
|
||||
@classmethod
|
||||
def _get_properties(
|
||||
cls,
|
||||
@ -1518,7 +1501,7 @@ class DictBase(Discriminable, ValidatorBase):
|
||||
|
||||
def __getattr__(self, name: str):
|
||||
# for instance.name access
|
||||
if isinstance(self, frozendict):
|
||||
if isinstance(self, frozendict.frozendict):
|
||||
# if an attribute does not exist
|
||||
try:
|
||||
return self[name]
|
||||
@ -1528,11 +1511,11 @@ class DictBase(Discriminable, ValidatorBase):
|
||||
|
||||
|
||||
def cast_to_allowed_types(
|
||||
arg: typing.Union[str, date, datetime, uuid.UUID, decimal.Decimal, int, float, None, dict, frozendict, list, tuple, bytes, Schema],
|
||||
arg: typing.Union[str, date, datetime, uuid.UUID, decimal.Decimal, int, float, None, dict, frozendict.frozendict, list, tuple, bytes, Schema],
|
||||
from_server: bool,
|
||||
validated_path_to_schemas: typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Set[typing.Union['Schema', str, decimal.Decimal, BoolClass, NoneClass, frozendict, tuple]]],
|
||||
validated_path_to_schemas: typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Set[typing.Union['Schema', str, decimal.Decimal, BoolClass, NoneClass, frozendict.frozendict, tuple]]],
|
||||
path_to_item: typing.Tuple[typing.Union[str, int], ...] = tuple(['args[0]']),
|
||||
) -> typing.Union[frozendict, tuple, decimal.Decimal, str, bytes, BoolClass, NoneClass, FileIO]:
|
||||
) -> typing.Union[frozendict.frozendict, tuple, decimal.Decimal, str, bytes, BoolClass, NoneClass, FileIO]:
|
||||
"""
|
||||
Casts the input payload arg into the allowed types
|
||||
The input validated_path_to_schemas is mutated by running this function
|
||||
@ -1564,8 +1547,8 @@ def cast_to_allowed_types(
|
||||
|
||||
if isinstance(arg, str):
|
||||
return str(arg)
|
||||
elif isinstance(arg, (dict, frozendict)):
|
||||
return frozendict({key: cast_to_allowed_types(val, from_server, validated_path_to_schemas, path_to_item + (key,)) for key, val in arg.items()})
|
||||
elif isinstance(arg, (dict, frozendict.frozendict)):
|
||||
return frozendict.frozendict({key: cast_to_allowed_types(val, from_server, validated_path_to_schemas, path_to_item + (key,)) for key, val in arg.items()})
|
||||
elif isinstance(arg, (bool, BoolClass)):
|
||||
"""
|
||||
this check must come before isinstance(arg, (int, float))
|
||||
@ -1687,7 +1670,7 @@ class ComposedBase(Discriminable):
|
||||
cls,
|
||||
arg,
|
||||
validation_metadata: ValidationMetadata,
|
||||
) -> typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Set[typing.Union['Schema', str, decimal.Decimal, BoolClass, NoneClass, frozendict, tuple]]]:
|
||||
) -> typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Set[typing.Union['Schema', str, decimal.Decimal, BoolClass, NoneClass, frozendict.frozendict, tuple]]]:
|
||||
"""
|
||||
ComposedBase _validate
|
||||
We return dynamic classes of different bases depending upon the inputs
|
||||
@ -1717,7 +1700,7 @@ class ComposedBase(Discriminable):
|
||||
# process composed schema
|
||||
discriminator = getattr(cls, 'discriminator', None)
|
||||
discriminated_cls = None
|
||||
if discriminator and arg and isinstance(arg, frozendict):
|
||||
if discriminator and arg and isinstance(arg, frozendict.frozendict):
|
||||
disc_property_name = list(discriminator.keys())[0]
|
||||
cls._ensure_discriminator_value_present(disc_property_name, updated_vm, arg)
|
||||
# get discriminated_cls by looking at the dict in the current class
|
||||
@ -1781,7 +1764,7 @@ class ComposedBase(Discriminable):
|
||||
|
||||
# DictBase, ListBase, NumberBase, StrBase, BoolBase, NoneBase
|
||||
class ComposedSchema(
|
||||
SchemaTypeCheckerClsFactory(typing.Union[NoneClass, str, decimal.Decimal, BoolClass, tuple, frozendict]),
|
||||
SchemaTypeCheckerClsFactory(typing.Union[NoneClass, str, decimal.Decimal, BoolClass, tuple, frozendict.frozendict]),
|
||||
ComposedBase,
|
||||
DictBase,
|
||||
ListBase,
|
||||
@ -2086,7 +2069,7 @@ class BoolSchema(
|
||||
|
||||
class AnyTypeSchema(
|
||||
SchemaTypeCheckerClsFactory(
|
||||
typing.Union[frozendict, tuple, decimal.Decimal, str, BoolClass, NoneClass, bytes, FileIO]
|
||||
typing.Union[frozendict.frozendict, tuple, decimal.Decimal, str, BoolClass, NoneClass, bytes, FileIO]
|
||||
),
|
||||
DictBase,
|
||||
ListBase,
|
||||
@ -2100,7 +2083,7 @@ class AnyTypeSchema(
|
||||
|
||||
|
||||
class DictSchema(
|
||||
SchemaTypeCheckerClsFactory(typing.Union[frozendict]),
|
||||
SchemaTypeCheckerClsFactory(typing.Union[frozendict.frozendict]),
|
||||
DictBase,
|
||||
Schema,
|
||||
FrozenDictMixin
|
||||
@ -2109,11 +2092,11 @@ class DictSchema(
|
||||
def _from_openapi_data(cls, arg: typing.Dict[str, typing.Any], _configuration: typing.Optional[Configuration] = None):
|
||||
return super()._from_openapi_data(arg, _configuration=_configuration)
|
||||
|
||||
def __new__(cls, *args: typing.Union[dict, frozendict], **kwargs: typing.Union[dict, frozendict, list, tuple, decimal.Decimal, float, int, str, date, datetime, bool, None, bytes, Schema, Unset, ValidationMetadata]):
|
||||
def __new__(cls, *args: typing.Union[dict, frozendict.frozendict], **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, date, datetime, bool, None, bytes, Schema, Unset, ValidationMetadata]):
|
||||
return super().__new__(cls, *args, **kwargs)
|
||||
|
||||
|
||||
schema_type_classes = set([NoneSchema, DictSchema, ListSchema, NumberSchema, StrSchema, BoolSchema])
|
||||
schema_type_classes = {NoneSchema, DictSchema, ListSchema, NumberSchema, StrSchema, BoolSchema}
|
||||
|
||||
|
||||
@functools.cache
|
||||
|
@ -245,91 +245,177 @@ unit_test_api/configuration.py
|
||||
unit_test_api/exceptions.py
|
||||
unit_test_api/model/__init__.py
|
||||
unit_test_api/model/additionalproperties_allows_a_schema_which_should_validate.py
|
||||
unit_test_api/model/additionalproperties_allows_a_schema_which_should_validate.pyi
|
||||
unit_test_api/model/additionalproperties_are_allowed_by_default.py
|
||||
unit_test_api/model/additionalproperties_are_allowed_by_default.pyi
|
||||
unit_test_api/model/additionalproperties_can_exist_by_itself.py
|
||||
unit_test_api/model/additionalproperties_can_exist_by_itself.pyi
|
||||
unit_test_api/model/additionalproperties_should_not_look_in_applicators.py
|
||||
unit_test_api/model/additionalproperties_should_not_look_in_applicators.pyi
|
||||
unit_test_api/model/allof.py
|
||||
unit_test_api/model/allof.pyi
|
||||
unit_test_api/model/allof_combined_with_anyof_oneof.py
|
||||
unit_test_api/model/allof_combined_with_anyof_oneof.pyi
|
||||
unit_test_api/model/allof_simple_types.py
|
||||
unit_test_api/model/allof_simple_types.pyi
|
||||
unit_test_api/model/allof_with_base_schema.py
|
||||
unit_test_api/model/allof_with_base_schema.pyi
|
||||
unit_test_api/model/allof_with_one_empty_schema.py
|
||||
unit_test_api/model/allof_with_one_empty_schema.pyi
|
||||
unit_test_api/model/allof_with_the_first_empty_schema.py
|
||||
unit_test_api/model/allof_with_the_first_empty_schema.pyi
|
||||
unit_test_api/model/allof_with_the_last_empty_schema.py
|
||||
unit_test_api/model/allof_with_the_last_empty_schema.pyi
|
||||
unit_test_api/model/allof_with_two_empty_schemas.py
|
||||
unit_test_api/model/allof_with_two_empty_schemas.pyi
|
||||
unit_test_api/model/anyof.py
|
||||
unit_test_api/model/anyof.pyi
|
||||
unit_test_api/model/anyof_complex_types.py
|
||||
unit_test_api/model/anyof_complex_types.pyi
|
||||
unit_test_api/model/anyof_with_base_schema.py
|
||||
unit_test_api/model/anyof_with_base_schema.pyi
|
||||
unit_test_api/model/anyof_with_one_empty_schema.py
|
||||
unit_test_api/model/anyof_with_one_empty_schema.pyi
|
||||
unit_test_api/model/array_type_matches_arrays.py
|
||||
unit_test_api/model/array_type_matches_arrays.pyi
|
||||
unit_test_api/model/boolean_type_matches_booleans.py
|
||||
unit_test_api/model/boolean_type_matches_booleans.pyi
|
||||
unit_test_api/model/by_int.py
|
||||
unit_test_api/model/by_int.pyi
|
||||
unit_test_api/model/by_number.py
|
||||
unit_test_api/model/by_number.pyi
|
||||
unit_test_api/model/by_small_number.py
|
||||
unit_test_api/model/by_small_number.pyi
|
||||
unit_test_api/model/date_time_format.py
|
||||
unit_test_api/model/date_time_format.pyi
|
||||
unit_test_api/model/email_format.py
|
||||
unit_test_api/model/email_format.pyi
|
||||
unit_test_api/model/enum_with0_does_not_match_false.py
|
||||
unit_test_api/model/enum_with0_does_not_match_false.pyi
|
||||
unit_test_api/model/enum_with1_does_not_match_true.py
|
||||
unit_test_api/model/enum_with1_does_not_match_true.pyi
|
||||
unit_test_api/model/enum_with_escaped_characters.py
|
||||
unit_test_api/model/enum_with_escaped_characters.pyi
|
||||
unit_test_api/model/enum_with_false_does_not_match0.py
|
||||
unit_test_api/model/enum_with_false_does_not_match0.pyi
|
||||
unit_test_api/model/enum_with_true_does_not_match1.py
|
||||
unit_test_api/model/enum_with_true_does_not_match1.pyi
|
||||
unit_test_api/model/enums_in_properties.py
|
||||
unit_test_api/model/enums_in_properties.pyi
|
||||
unit_test_api/model/forbidden_property.py
|
||||
unit_test_api/model/forbidden_property.pyi
|
||||
unit_test_api/model/hostname_format.py
|
||||
unit_test_api/model/hostname_format.pyi
|
||||
unit_test_api/model/integer_type_matches_integers.py
|
||||
unit_test_api/model/integer_type_matches_integers.pyi
|
||||
unit_test_api/model/invalid_instance_should_not_raise_error_when_float_division_inf.py
|
||||
unit_test_api/model/invalid_instance_should_not_raise_error_when_float_division_inf.pyi
|
||||
unit_test_api/model/invalid_string_value_for_default.py
|
||||
unit_test_api/model/invalid_string_value_for_default.pyi
|
||||
unit_test_api/model/ipv4_format.py
|
||||
unit_test_api/model/ipv4_format.pyi
|
||||
unit_test_api/model/ipv6_format.py
|
||||
unit_test_api/model/ipv6_format.pyi
|
||||
unit_test_api/model/json_pointer_format.py
|
||||
unit_test_api/model/json_pointer_format.pyi
|
||||
unit_test_api/model/maximum_validation.py
|
||||
unit_test_api/model/maximum_validation.pyi
|
||||
unit_test_api/model/maximum_validation_with_unsigned_integer.py
|
||||
unit_test_api/model/maximum_validation_with_unsigned_integer.pyi
|
||||
unit_test_api/model/maxitems_validation.py
|
||||
unit_test_api/model/maxitems_validation.pyi
|
||||
unit_test_api/model/maxlength_validation.py
|
||||
unit_test_api/model/maxlength_validation.pyi
|
||||
unit_test_api/model/maxproperties0_means_the_object_is_empty.py
|
||||
unit_test_api/model/maxproperties0_means_the_object_is_empty.pyi
|
||||
unit_test_api/model/maxproperties_validation.py
|
||||
unit_test_api/model/maxproperties_validation.pyi
|
||||
unit_test_api/model/minimum_validation.py
|
||||
unit_test_api/model/minimum_validation.pyi
|
||||
unit_test_api/model/minimum_validation_with_signed_integer.py
|
||||
unit_test_api/model/minimum_validation_with_signed_integer.pyi
|
||||
unit_test_api/model/minitems_validation.py
|
||||
unit_test_api/model/minitems_validation.pyi
|
||||
unit_test_api/model/minlength_validation.py
|
||||
unit_test_api/model/minlength_validation.pyi
|
||||
unit_test_api/model/minproperties_validation.py
|
||||
unit_test_api/model/minproperties_validation.pyi
|
||||
unit_test_api/model/model_not.py
|
||||
unit_test_api/model/model_not.pyi
|
||||
unit_test_api/model/nested_allof_to_check_validation_semantics.py
|
||||
unit_test_api/model/nested_allof_to_check_validation_semantics.pyi
|
||||
unit_test_api/model/nested_anyof_to_check_validation_semantics.py
|
||||
unit_test_api/model/nested_anyof_to_check_validation_semantics.pyi
|
||||
unit_test_api/model/nested_items.py
|
||||
unit_test_api/model/nested_items.pyi
|
||||
unit_test_api/model/nested_oneof_to_check_validation_semantics.py
|
||||
unit_test_api/model/nested_oneof_to_check_validation_semantics.pyi
|
||||
unit_test_api/model/not_more_complex_schema.py
|
||||
unit_test_api/model/not_more_complex_schema.pyi
|
||||
unit_test_api/model/nul_characters_in_strings.py
|
||||
unit_test_api/model/nul_characters_in_strings.pyi
|
||||
unit_test_api/model/null_type_matches_only_the_null_object.py
|
||||
unit_test_api/model/null_type_matches_only_the_null_object.pyi
|
||||
unit_test_api/model/number_type_matches_numbers.py
|
||||
unit_test_api/model/number_type_matches_numbers.pyi
|
||||
unit_test_api/model/object_properties_validation.py
|
||||
unit_test_api/model/object_properties_validation.pyi
|
||||
unit_test_api/model/oneof.py
|
||||
unit_test_api/model/oneof.pyi
|
||||
unit_test_api/model/oneof_complex_types.py
|
||||
unit_test_api/model/oneof_complex_types.pyi
|
||||
unit_test_api/model/oneof_with_base_schema.py
|
||||
unit_test_api/model/oneof_with_base_schema.pyi
|
||||
unit_test_api/model/oneof_with_empty_schema.py
|
||||
unit_test_api/model/oneof_with_empty_schema.pyi
|
||||
unit_test_api/model/oneof_with_required.py
|
||||
unit_test_api/model/oneof_with_required.pyi
|
||||
unit_test_api/model/pattern_is_not_anchored.py
|
||||
unit_test_api/model/pattern_is_not_anchored.pyi
|
||||
unit_test_api/model/pattern_validation.py
|
||||
unit_test_api/model/pattern_validation.pyi
|
||||
unit_test_api/model/properties_with_escaped_characters.py
|
||||
unit_test_api/model/properties_with_escaped_characters.pyi
|
||||
unit_test_api/model/property_named_ref_that_is_not_a_reference.py
|
||||
unit_test_api/model/property_named_ref_that_is_not_a_reference.pyi
|
||||
unit_test_api/model/ref_in_additionalproperties.py
|
||||
unit_test_api/model/ref_in_additionalproperties.pyi
|
||||
unit_test_api/model/ref_in_allof.py
|
||||
unit_test_api/model/ref_in_allof.pyi
|
||||
unit_test_api/model/ref_in_anyof.py
|
||||
unit_test_api/model/ref_in_anyof.pyi
|
||||
unit_test_api/model/ref_in_items.py
|
||||
unit_test_api/model/ref_in_items.pyi
|
||||
unit_test_api/model/ref_in_not.py
|
||||
unit_test_api/model/ref_in_not.pyi
|
||||
unit_test_api/model/ref_in_oneof.py
|
||||
unit_test_api/model/ref_in_oneof.pyi
|
||||
unit_test_api/model/ref_in_property.py
|
||||
unit_test_api/model/ref_in_property.pyi
|
||||
unit_test_api/model/required_default_validation.py
|
||||
unit_test_api/model/required_default_validation.pyi
|
||||
unit_test_api/model/required_validation.py
|
||||
unit_test_api/model/required_validation.pyi
|
||||
unit_test_api/model/required_with_empty_array.py
|
||||
unit_test_api/model/required_with_empty_array.pyi
|
||||
unit_test_api/model/required_with_escaped_characters.py
|
||||
unit_test_api/model/required_with_escaped_characters.pyi
|
||||
unit_test_api/model/simple_enum_validation.py
|
||||
unit_test_api/model/simple_enum_validation.pyi
|
||||
unit_test_api/model/string_type_matches_strings.py
|
||||
unit_test_api/model/string_type_matches_strings.pyi
|
||||
unit_test_api/model/the_default_keyword_does_not_do_anything_if_the_property_is_missing.py
|
||||
unit_test_api/model/the_default_keyword_does_not_do_anything_if_the_property_is_missing.pyi
|
||||
unit_test_api/model/uniqueitems_false_validation.py
|
||||
unit_test_api/model/uniqueitems_false_validation.pyi
|
||||
unit_test_api/model/uniqueitems_validation.py
|
||||
unit_test_api/model/uniqueitems_validation.pyi
|
||||
unit_test_api/model/uri_format.py
|
||||
unit_test_api/model/uri_format.pyi
|
||||
unit_test_api/model/uri_reference_format.py
|
||||
unit_test_api/model/uri_reference_format.pyi
|
||||
unit_test_api/model/uri_template_format.py
|
||||
unit_test_api/model/uri_template_format.pyi
|
||||
unit_test_api/models/__init__.py
|
||||
unit_test_api/rest.py
|
||||
unit_test_api/schemas.py
|
||||
|
@ -10931,7 +10931,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil
|
||||
#### Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**foo\"bar** | **bool, date, datetime, dict, float, int, list, str, none_type** | |
|
||||
**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** | |
|
||||
@ -11014,7 +11014,7 @@ headers | Unset | headers were not defined |
|
||||
#### Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**foo\"bar** | **bool, date, datetime, dict, float, int, list, str, none_type** | |
|
||||
**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** | |
|
||||
|
@ -5933,7 +5933,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil
|
||||
#### Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**foo\"bar** | **bool, date, datetime, dict, float, int, list, str, none_type** | |
|
||||
**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** | |
|
||||
|
@ -10931,7 +10931,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil
|
||||
#### Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**foo\"bar** | **bool, date, datetime, dict, float, int, list, str, none_type** | |
|
||||
**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** | |
|
||||
@ -11014,7 +11014,7 @@ headers | Unset | headers were not defined |
|
||||
#### Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**foo\"bar** | **bool, date, datetime, dict, float, int, list, str, none_type** | |
|
||||
**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** | |
|
||||
|
@ -474,7 +474,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil
|
||||
#### Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**foo\"bar** | **bool, date, datetime, dict, float, int, list, str, none_type** | |
|
||||
**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** | |
|
||||
@ -557,7 +557,7 @@ headers | Unset | headers were not defined |
|
||||
#### Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**foo\"bar** | **bool, date, datetime, dict, float, int, list, str, none_type** | |
|
||||
**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** | |
|
||||
|
@ -5056,7 +5056,7 @@ headers | Unset | headers were not defined |
|
||||
#### Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**foo\"bar** | **bool, date, datetime, dict, float, int, list, str, none_type** | |
|
||||
**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** | |
|
||||
|
@ -3,7 +3,7 @@
|
||||
#### Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**foo\"bar** | **bool, date, datetime, dict, float, int, list, str, none_type** | |
|
||||
**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** | |
|
||||
|
@ -25,6 +25,7 @@ from urllib3._collections import HTTPHeaderDict
|
||||
from urllib.parse import quote
|
||||
from urllib3.fields import RequestField as RequestFieldBase
|
||||
|
||||
import frozendict
|
||||
|
||||
from unit_test_api import rest
|
||||
from unit_test_api.configuration import Configuration
|
||||
@ -38,7 +39,6 @@ from unit_test_api.schemas import (
|
||||
date,
|
||||
datetime,
|
||||
none_type,
|
||||
frozendict,
|
||||
Unset,
|
||||
unset,
|
||||
)
|
||||
@ -67,7 +67,7 @@ class JSONEncoder(json.JSONEncoder):
|
||||
return None
|
||||
elif isinstance(obj, BoolClass):
|
||||
return bool(obj)
|
||||
elif isinstance(obj, (dict, frozendict)):
|
||||
elif isinstance(obj, (dict, frozendict.frozendict)):
|
||||
return {key: self.default(val) for key, val in obj.items()}
|
||||
elif isinstance(obj, (list, tuple)):
|
||||
return [self.default(item) for item in obj]
|
||||
@ -478,7 +478,7 @@ class PathParameter(ParameterBase, StyleSimpleSerializer):
|
||||
def serialize(
|
||||
self,
|
||||
in_data: typing.Union[
|
||||
Schema, Decimal, int, float, str, date, datetime, None, bool, list, tuple, dict, frozendict]
|
||||
Schema, Decimal, int, float, str, date, datetime, None, bool, list, tuple, dict, frozendict.frozendict]
|
||||
) -> typing.Dict[str, str]:
|
||||
if self.schema:
|
||||
cast_in_data = self.schema(in_data)
|
||||
@ -596,7 +596,7 @@ class QueryParameter(ParameterBase, StyleFormSerializer):
|
||||
def serialize(
|
||||
self,
|
||||
in_data: typing.Union[
|
||||
Schema, Decimal, int, float, str, date, datetime, None, bool, list, tuple, dict, frozendict],
|
||||
Schema, Decimal, int, float, str, date, datetime, None, bool, list, tuple, dict, frozendict.frozendict],
|
||||
prefix_separator_iterator: typing.Optional[PrefixSeparatorIterator] = None
|
||||
) -> typing.Dict[str, str]:
|
||||
if self.schema:
|
||||
@ -662,7 +662,7 @@ class CookieParameter(ParameterBase, StyleFormSerializer):
|
||||
def serialize(
|
||||
self,
|
||||
in_data: typing.Union[
|
||||
Schema, Decimal, int, float, str, date, datetime, None, bool, list, tuple, dict, frozendict]
|
||||
Schema, Decimal, int, float, str, date, datetime, None, bool, list, tuple, dict, frozendict.frozendict]
|
||||
) -> typing.Dict[str, str]:
|
||||
if self.schema:
|
||||
cast_in_data = self.schema(in_data)
|
||||
@ -734,7 +734,7 @@ class HeaderParameter(ParameterBase, StyleSimpleSerializer):
|
||||
def serialize(
|
||||
self,
|
||||
in_data: typing.Union[
|
||||
Schema, Decimal, int, float, str, date, datetime, None, bool, list, tuple, dict, frozendict]
|
||||
Schema, Decimal, int, float, str, date, datetime, None, bool, list, tuple, dict, frozendict.frozendict]
|
||||
) -> HTTPHeaderDict[str, str]:
|
||||
if self.schema:
|
||||
cast_in_data = self.schema(in_data)
|
||||
@ -1359,8 +1359,8 @@ class RequestBody(StyleFormSerializer, JSONDetector):
|
||||
|
||||
@staticmethod
|
||||
def __serialize_text_plain(in_data: typing.Any) -> typing.Dict[str, str]:
|
||||
if isinstance(in_data, frozendict):
|
||||
raise ValueError('Unable to serialize type frozendict to text/plain')
|
||||
if isinstance(in_data, frozendict.frozendict):
|
||||
raise ValueError('Unable to serialize type frozendict.frozendict to text/plain')
|
||||
elif isinstance(in_data, tuple):
|
||||
raise ValueError('Unable to serialize type tuple to text/plain')
|
||||
elif isinstance(in_data, NoneClass):
|
||||
@ -1393,7 +1393,7 @@ class RequestBody(StyleFormSerializer, JSONDetector):
|
||||
def __serialize_multipart_form_data(
|
||||
self, in_data: Schema
|
||||
) -> typing.Dict[str, typing.Tuple[RequestField, ...]]:
|
||||
if not isinstance(in_data, frozendict):
|
||||
if not isinstance(in_data, frozendict.frozendict):
|
||||
raise ValueError(f'Unable to serialize {in_data} to multipart/form-data because it is not a dict of data')
|
||||
"""
|
||||
In a multipart/form-data request body, each schema property, or each element of a schema array property,
|
||||
@ -1440,7 +1440,7 @@ class RequestBody(StyleFormSerializer, JSONDetector):
|
||||
"""
|
||||
POST submission of form data in body
|
||||
"""
|
||||
if not isinstance(in_data, frozendict):
|
||||
if not isinstance(in_data, frozendict.frozendict):
|
||||
raise ValueError(
|
||||
f'Unable to serialize {in_data} to application/x-www-form-urlencoded because it is not a dict of data')
|
||||
cast_in_data = self.__json_encoder.default(in_data)
|
||||
@ -1462,7 +1462,7 @@ class RequestBody(StyleFormSerializer, JSONDetector):
|
||||
media_type = self.content[content_type]
|
||||
if isinstance(in_data, media_type.schema):
|
||||
cast_in_data = in_data
|
||||
elif isinstance(in_data, (dict, frozendict)) and in_data:
|
||||
elif isinstance(in_data, (dict, frozendict.frozendict)) and in_data:
|
||||
cast_in_data = media_type.schema(**in_data)
|
||||
else:
|
||||
cast_in_data = media_type.schema(in_data)
|
||||
|
@ -10,17 +10,15 @@
|
||||
"""
|
||||
|
||||
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
|
||||
import uuid # noqa: F401
|
||||
|
||||
import frozendict # noqa: F401
|
||||
|
||||
from unit_test_api import schemas # noqa: F401
|
||||
|
||||
|
||||
@ -38,16 +36,30 @@ class AdditionalpropertiesAllowsASchemaWhichShouldValidate(
|
||||
class properties:
|
||||
foo = schemas.AnyTypeSchema
|
||||
bar = schemas.AnyTypeSchema
|
||||
__annotations__ = {
|
||||
"foo": foo,
|
||||
"bar": bar,
|
||||
}
|
||||
additional_properties = schemas.BoolSchema
|
||||
|
||||
foo: MetaOapg.properties.foo
|
||||
bar: MetaOapg.properties.bar
|
||||
|
||||
@typing.overload
|
||||
def __getitem__(self, name: typing.Literal["foo"]) -> MetaOapg.properties.foo: ...
|
||||
|
||||
@typing.overload
|
||||
def __getitem__(self, name: typing.Literal["bar"]) -> MetaOapg.properties.bar: ...
|
||||
|
||||
def __getitem__(self, name: str) -> MetaOapg.additional_properties:
|
||||
# dict_instance[name] accessor
|
||||
return super().__getitem__(name)
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
*args: typing.Union[dict, frozendict, ],
|
||||
foo: typing.Union[MetaOapg.properties.foo, dict, frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, schemas.Unset] = schemas.unset,
|
||||
bar: typing.Union[MetaOapg.properties.bar, dict, frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, schemas.Unset] = schemas.unset,
|
||||
*args: typing.Union[dict, frozendict.frozendict, ],
|
||||
foo: typing.Union[MetaOapg.properties.foo, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, schemas.Unset] = schemas.unset,
|
||||
bar: typing.Union[MetaOapg.properties.bar, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, schemas.Unset] = schemas.unset,
|
||||
_configuration: typing.Optional[schemas.Configuration] = None,
|
||||
**kwargs: typing.Union[MetaOapg.additional_properties, bool, ],
|
||||
) -> 'AdditionalpropertiesAllowsASchemaWhichShouldValidate':
|
||||
|
@ -0,0 +1,73 @@
|
||||
# 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 typing # noqa: F401
|
||||
import functools # noqa: F401
|
||||
|
||||
import decimal # noqa: F401
|
||||
from datetime import date, datetime # noqa: F401
|
||||
import uuid # noqa: F401
|
||||
|
||||
import frozendict # noqa: F401
|
||||
|
||||
from unit_test_api import schemas # noqa: F401
|
||||
|
||||
|
||||
class AdditionalpropertiesAllowsASchemaWhichShouldValidate(
|
||||
schemas.DictSchema
|
||||
):
|
||||
"""NOTE: This class is auto generated by OpenAPI Generator.
|
||||
Ref: https://openapi-generator.tech
|
||||
|
||||
Do not edit the class manually.
|
||||
"""
|
||||
|
||||
|
||||
class MetaOapg:
|
||||
class properties:
|
||||
foo = schemas.AnyTypeSchema
|
||||
bar = schemas.AnyTypeSchema
|
||||
__annotations__ = {
|
||||
"foo": foo,
|
||||
"bar": bar,
|
||||
}
|
||||
additional_properties = schemas.BoolSchema
|
||||
|
||||
foo: MetaOapg.properties.foo
|
||||
bar: MetaOapg.properties.bar
|
||||
|
||||
@typing.overload
|
||||
def __getitem__(self, name: typing.Literal["foo"]) -> MetaOapg.properties.foo: ...
|
||||
|
||||
@typing.overload
|
||||
def __getitem__(self, name: typing.Literal["bar"]) -> MetaOapg.properties.bar: ...
|
||||
|
||||
def __getitem__(self, name: str) -> MetaOapg.additional_properties:
|
||||
# dict_instance[name] accessor
|
||||
return super().__getitem__(name)
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
*args: typing.Union[dict, frozendict.frozendict, ],
|
||||
foo: typing.Union[MetaOapg.properties.foo, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, schemas.Unset] = schemas.unset,
|
||||
bar: typing.Union[MetaOapg.properties.bar, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, schemas.Unset] = schemas.unset,
|
||||
_configuration: typing.Optional[schemas.Configuration] = None,
|
||||
**kwargs: typing.Union[MetaOapg.additional_properties, bool, ],
|
||||
) -> 'AdditionalpropertiesAllowsASchemaWhichShouldValidate':
|
||||
return super().__new__(
|
||||
cls,
|
||||
*args,
|
||||
foo=foo,
|
||||
bar=bar,
|
||||
_configuration=_configuration,
|
||||
**kwargs,
|
||||
)
|
@ -10,17 +10,15 @@
|
||||
"""
|
||||
|
||||
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
|
||||
import uuid # noqa: F401
|
||||
|
||||
import frozendict # noqa: F401
|
||||
|
||||
from unit_test_api import schemas # noqa: F401
|
||||
|
||||
|
||||
@ -38,19 +36,33 @@ class AdditionalpropertiesAreAllowedByDefault(
|
||||
class properties:
|
||||
foo = schemas.AnyTypeSchema
|
||||
bar = schemas.AnyTypeSchema
|
||||
__annotations__ = {
|
||||
"foo": foo,
|
||||
"bar": bar,
|
||||
}
|
||||
additional_properties = schemas.AnyTypeSchema
|
||||
|
||||
|
||||
foo: MetaOapg.properties.foo
|
||||
bar: MetaOapg.properties.bar
|
||||
|
||||
@typing.overload
|
||||
def __getitem__(self, name: typing.Literal["foo"]) -> MetaOapg.properties.foo: ...
|
||||
|
||||
@typing.overload
|
||||
def __getitem__(self, name: typing.Literal["bar"]) -> MetaOapg.properties.bar: ...
|
||||
|
||||
def __getitem__(self, name: str) -> MetaOapg.additional_properties:
|
||||
# dict_instance[name] accessor
|
||||
return super().__getitem__(name)
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
*args: typing.Union[dict, frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
foo: typing.Union[MetaOapg.properties.foo, dict, frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, schemas.Unset] = schemas.unset,
|
||||
bar: typing.Union[MetaOapg.properties.bar, dict, frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, schemas.Unset] = schemas.unset,
|
||||
*args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
foo: typing.Union[MetaOapg.properties.foo, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, schemas.Unset] = schemas.unset,
|
||||
bar: typing.Union[MetaOapg.properties.bar, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, schemas.Unset] = schemas.unset,
|
||||
_configuration: typing.Optional[schemas.Configuration] = None,
|
||||
**kwargs: typing.Union[MetaOapg.additional_properties, dict, frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
**kwargs: typing.Union[MetaOapg.additional_properties, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
) -> 'AdditionalpropertiesAreAllowedByDefault':
|
||||
return super().__new__(
|
||||
cls,
|
||||
|
@ -0,0 +1,74 @@
|
||||
# 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 typing # noqa: F401
|
||||
import functools # noqa: F401
|
||||
|
||||
import decimal # noqa: F401
|
||||
from datetime import date, datetime # noqa: F401
|
||||
import uuid # noqa: F401
|
||||
|
||||
import frozendict # noqa: F401
|
||||
|
||||
from unit_test_api import schemas # noqa: F401
|
||||
|
||||
|
||||
class AdditionalpropertiesAreAllowedByDefault(
|
||||
schemas.AnyTypeSchema,
|
||||
):
|
||||
"""NOTE: This class is auto generated by OpenAPI Generator.
|
||||
Ref: https://openapi-generator.tech
|
||||
|
||||
Do not edit the class manually.
|
||||
"""
|
||||
|
||||
|
||||
class MetaOapg:
|
||||
class properties:
|
||||
foo = schemas.AnyTypeSchema
|
||||
bar = schemas.AnyTypeSchema
|
||||
__annotations__ = {
|
||||
"foo": foo,
|
||||
"bar": bar,
|
||||
}
|
||||
additional_properties = schemas.AnyTypeSchema
|
||||
|
||||
|
||||
foo: MetaOapg.properties.foo
|
||||
bar: MetaOapg.properties.bar
|
||||
|
||||
@typing.overload
|
||||
def __getitem__(self, name: typing.Literal["foo"]) -> MetaOapg.properties.foo: ...
|
||||
|
||||
@typing.overload
|
||||
def __getitem__(self, name: typing.Literal["bar"]) -> MetaOapg.properties.bar: ...
|
||||
|
||||
def __getitem__(self, name: str) -> MetaOapg.additional_properties:
|
||||
# dict_instance[name] accessor
|
||||
return super().__getitem__(name)
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
*args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
foo: typing.Union[MetaOapg.properties.foo, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, schemas.Unset] = schemas.unset,
|
||||
bar: typing.Union[MetaOapg.properties.bar, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, schemas.Unset] = schemas.unset,
|
||||
_configuration: typing.Optional[schemas.Configuration] = None,
|
||||
**kwargs: typing.Union[MetaOapg.additional_properties, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
) -> 'AdditionalpropertiesAreAllowedByDefault':
|
||||
return super().__new__(
|
||||
cls,
|
||||
*args,
|
||||
foo=foo,
|
||||
bar=bar,
|
||||
_configuration=_configuration,
|
||||
**kwargs,
|
||||
)
|
@ -10,17 +10,15 @@
|
||||
"""
|
||||
|
||||
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
|
||||
import uuid # noqa: F401
|
||||
|
||||
import frozendict # noqa: F401
|
||||
|
||||
from unit_test_api import schemas # noqa: F401
|
||||
|
||||
|
||||
@ -36,10 +34,14 @@ class AdditionalpropertiesCanExistByItself(
|
||||
|
||||
class MetaOapg:
|
||||
additional_properties = schemas.BoolSchema
|
||||
|
||||
def __getitem__(self, name: str) -> MetaOapg.additional_properties:
|
||||
# dict_instance[name] accessor
|
||||
return super().__getitem__(name)
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
*args: typing.Union[dict, frozendict, ],
|
||||
*args: typing.Union[dict, frozendict.frozendict, ],
|
||||
_configuration: typing.Optional[schemas.Configuration] = None,
|
||||
**kwargs: typing.Union[MetaOapg.additional_properties, bool, ],
|
||||
) -> 'AdditionalpropertiesCanExistByItself':
|
||||
|
@ -0,0 +1,53 @@
|
||||
# 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 typing # noqa: F401
|
||||
import functools # noqa: F401
|
||||
|
||||
import decimal # noqa: F401
|
||||
from datetime import date, datetime # noqa: F401
|
||||
import uuid # noqa: F401
|
||||
|
||||
import frozendict # noqa: F401
|
||||
|
||||
from unit_test_api import schemas # noqa: F401
|
||||
|
||||
|
||||
class AdditionalpropertiesCanExistByItself(
|
||||
schemas.DictSchema
|
||||
):
|
||||
"""NOTE: This class is auto generated by OpenAPI Generator.
|
||||
Ref: https://openapi-generator.tech
|
||||
|
||||
Do not edit the class manually.
|
||||
"""
|
||||
|
||||
|
||||
class MetaOapg:
|
||||
additional_properties = schemas.BoolSchema
|
||||
|
||||
def __getitem__(self, name: str) -> MetaOapg.additional_properties:
|
||||
# dict_instance[name] accessor
|
||||
return super().__getitem__(name)
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
*args: typing.Union[dict, frozendict.frozendict, ],
|
||||
_configuration: typing.Optional[schemas.Configuration] = None,
|
||||
**kwargs: typing.Union[MetaOapg.additional_properties, bool, ],
|
||||
) -> 'AdditionalpropertiesCanExistByItself':
|
||||
return super().__new__(
|
||||
cls,
|
||||
*args,
|
||||
_configuration=_configuration,
|
||||
**kwargs,
|
||||
)
|
@ -10,17 +10,15 @@
|
||||
"""
|
||||
|
||||
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
|
||||
import uuid # noqa: F401
|
||||
|
||||
import frozendict # noqa: F401
|
||||
|
||||
from unit_test_api import schemas # noqa: F401
|
||||
|
||||
|
||||
@ -46,17 +44,27 @@ class AdditionalpropertiesShouldNotLookInApplicators(
|
||||
class MetaOapg:
|
||||
class properties:
|
||||
foo = schemas.AnyTypeSchema
|
||||
__annotations__ = {
|
||||
"foo": foo,
|
||||
}
|
||||
additional_properties = schemas.AnyTypeSchema
|
||||
|
||||
|
||||
foo: MetaOapg.properties.foo
|
||||
|
||||
@typing.overload
|
||||
def __getitem__(self, name: typing.Literal["foo"]) -> MetaOapg.properties.foo: ...
|
||||
|
||||
def __getitem__(self, name: str) -> MetaOapg.additional_properties:
|
||||
# dict_instance[name] accessor
|
||||
return super().__getitem__(name)
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
*args: typing.Union[dict, frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
foo: typing.Union[MetaOapg.properties.foo, dict, frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, schemas.Unset] = schemas.unset,
|
||||
*args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
foo: typing.Union[MetaOapg.properties.foo, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, schemas.Unset] = schemas.unset,
|
||||
_configuration: typing.Optional[schemas.Configuration] = None,
|
||||
**kwargs: typing.Union[MetaOapg.additional_properties, dict, frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
**kwargs: typing.Union[MetaOapg.additional_properties, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
) -> 'all_of_0':
|
||||
return super().__new__(
|
||||
cls,
|
||||
@ -81,10 +89,14 @@ class AdditionalpropertiesShouldNotLookInApplicators(
|
||||
cls.all_of_0,
|
||||
]
|
||||
|
||||
|
||||
def __getitem__(self, name: str) -> MetaOapg.additional_properties:
|
||||
# dict_instance[name] accessor
|
||||
return super().__getitem__(name)
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
*args: typing.Union[dict, frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
*args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
_configuration: typing.Optional[schemas.Configuration] = None,
|
||||
**kwargs: typing.Union[MetaOapg.additional_properties, bool, ],
|
||||
) -> 'AdditionalpropertiesShouldNotLookInApplicators':
|
||||
|
@ -0,0 +1,108 @@
|
||||
# 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 typing # noqa: F401
|
||||
import functools # noqa: F401
|
||||
|
||||
import decimal # noqa: F401
|
||||
from datetime import date, datetime # noqa: F401
|
||||
import uuid # noqa: F401
|
||||
|
||||
import frozendict # noqa: F401
|
||||
|
||||
from unit_test_api import schemas # noqa: F401
|
||||
|
||||
|
||||
class AdditionalpropertiesShouldNotLookInApplicators(
|
||||
schemas.ComposedSchema,
|
||||
):
|
||||
"""NOTE: This class is auto generated by OpenAPI Generator.
|
||||
Ref: https://openapi-generator.tech
|
||||
|
||||
Do not edit the class manually.
|
||||
"""
|
||||
|
||||
|
||||
class MetaOapg:
|
||||
additional_properties = schemas.BoolSchema
|
||||
|
||||
|
||||
class all_of_0(
|
||||
schemas.AnyTypeSchema,
|
||||
):
|
||||
|
||||
|
||||
class MetaOapg:
|
||||
class properties:
|
||||
foo = schemas.AnyTypeSchema
|
||||
__annotations__ = {
|
||||
"foo": foo,
|
||||
}
|
||||
additional_properties = schemas.AnyTypeSchema
|
||||
|
||||
|
||||
foo: MetaOapg.properties.foo
|
||||
|
||||
@typing.overload
|
||||
def __getitem__(self, name: typing.Literal["foo"]) -> MetaOapg.properties.foo: ...
|
||||
|
||||
def __getitem__(self, name: str) -> MetaOapg.additional_properties:
|
||||
# dict_instance[name] accessor
|
||||
return super().__getitem__(name)
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
*args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
foo: typing.Union[MetaOapg.properties.foo, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, schemas.Unset] = schemas.unset,
|
||||
_configuration: typing.Optional[schemas.Configuration] = None,
|
||||
**kwargs: typing.Union[MetaOapg.additional_properties, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
) -> 'all_of_0':
|
||||
return super().__new__(
|
||||
cls,
|
||||
*args,
|
||||
foo=foo,
|
||||
_configuration=_configuration,
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
@classmethod
|
||||
@property
|
||||
@functools.cache
|
||||
def all_of(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
|
||||
return [
|
||||
cls.all_of_0,
|
||||
]
|
||||
|
||||
|
||||
def __getitem__(self, name: str) -> MetaOapg.additional_properties:
|
||||
# dict_instance[name] accessor
|
||||
return super().__getitem__(name)
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
*args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
_configuration: typing.Optional[schemas.Configuration] = None,
|
||||
**kwargs: typing.Union[MetaOapg.additional_properties, bool, ],
|
||||
) -> 'AdditionalpropertiesShouldNotLookInApplicators':
|
||||
return super().__new__(
|
||||
cls,
|
||||
*args,
|
||||
_configuration=_configuration,
|
||||
**kwargs,
|
||||
)
|
@ -10,17 +10,15 @@
|
||||
"""
|
||||
|
||||
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
|
||||
import uuid # noqa: F401
|
||||
|
||||
import frozendict # noqa: F401
|
||||
|
||||
from unit_test_api import schemas # noqa: F401
|
||||
|
||||
|
||||
@ -49,17 +47,27 @@ class Allof(
|
||||
}
|
||||
class properties:
|
||||
bar = schemas.IntSchema
|
||||
__annotations__ = {
|
||||
"bar": bar,
|
||||
}
|
||||
additional_properties = schemas.AnyTypeSchema
|
||||
|
||||
|
||||
bar: MetaOapg.properties.bar
|
||||
|
||||
@typing.overload
|
||||
def __getitem__(self, name: typing.Literal["bar"]) -> MetaOapg.properties.bar: ...
|
||||
|
||||
def __getitem__(self, name: str) -> MetaOapg.additional_properties:
|
||||
# dict_instance[name] accessor
|
||||
return super().__getitem__(name)
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
*args: typing.Union[dict, frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
*args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
bar: typing.Union[MetaOapg.properties.bar, int, ],
|
||||
_configuration: typing.Optional[schemas.Configuration] = None,
|
||||
**kwargs: typing.Union[MetaOapg.additional_properties, dict, frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
**kwargs: typing.Union[MetaOapg.additional_properties, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
) -> 'all_of_0':
|
||||
return super().__new__(
|
||||
cls,
|
||||
@ -81,17 +89,27 @@ class Allof(
|
||||
}
|
||||
class properties:
|
||||
foo = schemas.StrSchema
|
||||
__annotations__ = {
|
||||
"foo": foo,
|
||||
}
|
||||
additional_properties = schemas.AnyTypeSchema
|
||||
|
||||
|
||||
foo: MetaOapg.properties.foo
|
||||
|
||||
@typing.overload
|
||||
def __getitem__(self, name: typing.Literal["foo"]) -> MetaOapg.properties.foo: ...
|
||||
|
||||
def __getitem__(self, name: str) -> MetaOapg.additional_properties:
|
||||
# dict_instance[name] accessor
|
||||
return super().__getitem__(name)
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
*args: typing.Union[dict, frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
*args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
foo: typing.Union[MetaOapg.properties.foo, str, ],
|
||||
_configuration: typing.Optional[schemas.Configuration] = None,
|
||||
**kwargs: typing.Union[MetaOapg.additional_properties, dict, frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
**kwargs: typing.Union[MetaOapg.additional_properties, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
) -> 'all_of_1':
|
||||
return super().__new__(
|
||||
cls,
|
||||
@ -117,12 +135,16 @@ class Allof(
|
||||
cls.all_of_1,
|
||||
]
|
||||
|
||||
|
||||
def __getitem__(self, name: str) -> MetaOapg.additional_properties:
|
||||
# dict_instance[name] accessor
|
||||
return super().__getitem__(name)
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
*args: typing.Union[dict, frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
*args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
_configuration: typing.Optional[schemas.Configuration] = None,
|
||||
**kwargs: typing.Union[MetaOapg.additional_properties, dict, frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
**kwargs: typing.Union[MetaOapg.additional_properties, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
) -> 'Allof':
|
||||
return super().__new__(
|
||||
cls,
|
||||
|
@ -0,0 +1,154 @@
|
||||
# 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 typing # noqa: F401
|
||||
import functools # noqa: F401
|
||||
|
||||
import decimal # noqa: F401
|
||||
from datetime import date, datetime # noqa: F401
|
||||
import uuid # noqa: F401
|
||||
|
||||
import frozendict # noqa: F401
|
||||
|
||||
from unit_test_api import schemas # noqa: F401
|
||||
|
||||
|
||||
class Allof(
|
||||
schemas.ComposedSchema,
|
||||
):
|
||||
"""NOTE: This class is auto generated by OpenAPI Generator.
|
||||
Ref: https://openapi-generator.tech
|
||||
|
||||
Do not edit the class manually.
|
||||
"""
|
||||
|
||||
|
||||
class MetaOapg:
|
||||
additional_properties = schemas.AnyTypeSchema
|
||||
|
||||
|
||||
class all_of_0(
|
||||
schemas.AnyTypeSchema,
|
||||
):
|
||||
|
||||
|
||||
class MetaOapg:
|
||||
required = {
|
||||
"bar",
|
||||
}
|
||||
class properties:
|
||||
bar = schemas.IntSchema
|
||||
__annotations__ = {
|
||||
"bar": bar,
|
||||
}
|
||||
additional_properties = schemas.AnyTypeSchema
|
||||
|
||||
|
||||
bar: MetaOapg.properties.bar
|
||||
|
||||
@typing.overload
|
||||
def __getitem__(self, name: typing.Literal["bar"]) -> MetaOapg.properties.bar: ...
|
||||
|
||||
def __getitem__(self, name: str) -> MetaOapg.additional_properties:
|
||||
# dict_instance[name] accessor
|
||||
return super().__getitem__(name)
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
*args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
bar: typing.Union[MetaOapg.properties.bar, int, ],
|
||||
_configuration: typing.Optional[schemas.Configuration] = None,
|
||||
**kwargs: typing.Union[MetaOapg.additional_properties, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
) -> 'all_of_0':
|
||||
return super().__new__(
|
||||
cls,
|
||||
*args,
|
||||
bar=bar,
|
||||
_configuration=_configuration,
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
|
||||
class all_of_1(
|
||||
schemas.AnyTypeSchema,
|
||||
):
|
||||
|
||||
|
||||
class MetaOapg:
|
||||
required = {
|
||||
"foo",
|
||||
}
|
||||
class properties:
|
||||
foo = schemas.StrSchema
|
||||
__annotations__ = {
|
||||
"foo": foo,
|
||||
}
|
||||
additional_properties = schemas.AnyTypeSchema
|
||||
|
||||
|
||||
foo: MetaOapg.properties.foo
|
||||
|
||||
@typing.overload
|
||||
def __getitem__(self, name: typing.Literal["foo"]) -> MetaOapg.properties.foo: ...
|
||||
|
||||
def __getitem__(self, name: str) -> MetaOapg.additional_properties:
|
||||
# dict_instance[name] accessor
|
||||
return super().__getitem__(name)
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
*args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
foo: typing.Union[MetaOapg.properties.foo, str, ],
|
||||
_configuration: typing.Optional[schemas.Configuration] = None,
|
||||
**kwargs: typing.Union[MetaOapg.additional_properties, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
) -> 'all_of_1':
|
||||
return super().__new__(
|
||||
cls,
|
||||
*args,
|
||||
foo=foo,
|
||||
_configuration=_configuration,
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
@classmethod
|
||||
@property
|
||||
@functools.cache
|
||||
def all_of(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
|
||||
return [
|
||||
cls.all_of_0,
|
||||
cls.all_of_1,
|
||||
]
|
||||
|
||||
|
||||
def __getitem__(self, name: str) -> MetaOapg.additional_properties:
|
||||
# dict_instance[name] accessor
|
||||
return super().__getitem__(name)
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
*args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
_configuration: typing.Optional[schemas.Configuration] = None,
|
||||
**kwargs: typing.Union[MetaOapg.additional_properties, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
) -> 'Allof':
|
||||
return super().__new__(
|
||||
cls,
|
||||
*args,
|
||||
_configuration=_configuration,
|
||||
**kwargs,
|
||||
)
|
@ -10,17 +10,15 @@
|
||||
"""
|
||||
|
||||
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
|
||||
import uuid # noqa: F401
|
||||
|
||||
import frozendict # noqa: F401
|
||||
|
||||
from unit_test_api import schemas # noqa: F401
|
||||
|
||||
|
||||
@ -47,12 +45,16 @@ class AllofCombinedWithAnyofOneof(
|
||||
additional_properties = schemas.AnyTypeSchema
|
||||
multiple_of = 2
|
||||
|
||||
|
||||
def __getitem__(self, name: str) -> MetaOapg.additional_properties:
|
||||
# dict_instance[name] accessor
|
||||
return super().__getitem__(name)
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
*args: typing.Union[dict, frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
*args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
_configuration: typing.Optional[schemas.Configuration] = None,
|
||||
**kwargs: typing.Union[MetaOapg.additional_properties, dict, frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
**kwargs: typing.Union[MetaOapg.additional_properties, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
) -> 'all_of_0':
|
||||
return super().__new__(
|
||||
cls,
|
||||
@ -71,12 +73,16 @@ class AllofCombinedWithAnyofOneof(
|
||||
additional_properties = schemas.AnyTypeSchema
|
||||
multiple_of = 5
|
||||
|
||||
|
||||
def __getitem__(self, name: str) -> MetaOapg.additional_properties:
|
||||
# dict_instance[name] accessor
|
||||
return super().__getitem__(name)
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
*args: typing.Union[dict, frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
*args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
_configuration: typing.Optional[schemas.Configuration] = None,
|
||||
**kwargs: typing.Union[MetaOapg.additional_properties, dict, frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
**kwargs: typing.Union[MetaOapg.additional_properties, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
) -> 'one_of_0':
|
||||
return super().__new__(
|
||||
cls,
|
||||
@ -95,12 +101,16 @@ class AllofCombinedWithAnyofOneof(
|
||||
additional_properties = schemas.AnyTypeSchema
|
||||
multiple_of = 3
|
||||
|
||||
|
||||
def __getitem__(self, name: str) -> MetaOapg.additional_properties:
|
||||
# dict_instance[name] accessor
|
||||
return super().__getitem__(name)
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
*args: typing.Union[dict, frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
*args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
_configuration: typing.Optional[schemas.Configuration] = None,
|
||||
**kwargs: typing.Union[MetaOapg.additional_properties, dict, frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
**kwargs: typing.Union[MetaOapg.additional_properties, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
) -> 'any_of_0':
|
||||
return super().__new__(
|
||||
cls,
|
||||
@ -154,12 +164,16 @@ class AllofCombinedWithAnyofOneof(
|
||||
cls.any_of_0,
|
||||
]
|
||||
|
||||
|
||||
def __getitem__(self, name: str) -> MetaOapg.additional_properties:
|
||||
# dict_instance[name] accessor
|
||||
return super().__getitem__(name)
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
*args: typing.Union[dict, frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
*args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
_configuration: typing.Optional[schemas.Configuration] = None,
|
||||
**kwargs: typing.Union[MetaOapg.additional_properties, dict, frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
**kwargs: typing.Union[MetaOapg.additional_properties, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
) -> 'AllofCombinedWithAnyofOneof':
|
||||
return super().__new__(
|
||||
cls,
|
||||
|
@ -0,0 +1,180 @@
|
||||
# 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 typing # noqa: F401
|
||||
import functools # noqa: F401
|
||||
|
||||
import decimal # noqa: F401
|
||||
from datetime import date, datetime # noqa: F401
|
||||
import uuid # noqa: F401
|
||||
|
||||
import frozendict # noqa: F401
|
||||
|
||||
from unit_test_api import schemas # noqa: F401
|
||||
|
||||
|
||||
class AllofCombinedWithAnyofOneof(
|
||||
schemas.ComposedSchema,
|
||||
):
|
||||
"""NOTE: This class is auto generated by OpenAPI Generator.
|
||||
Ref: https://openapi-generator.tech
|
||||
|
||||
Do not edit the class manually.
|
||||
"""
|
||||
|
||||
|
||||
class MetaOapg:
|
||||
additional_properties = schemas.AnyTypeSchema
|
||||
|
||||
|
||||
class all_of_0(
|
||||
schemas.AnyTypeSchema,
|
||||
):
|
||||
|
||||
|
||||
class MetaOapg:
|
||||
additional_properties = schemas.AnyTypeSchema
|
||||
|
||||
|
||||
def __getitem__(self, name: str) -> MetaOapg.additional_properties:
|
||||
# dict_instance[name] accessor
|
||||
return super().__getitem__(name)
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
*args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
_configuration: typing.Optional[schemas.Configuration] = None,
|
||||
**kwargs: typing.Union[MetaOapg.additional_properties, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
) -> 'all_of_0':
|
||||
return super().__new__(
|
||||
cls,
|
||||
*args,
|
||||
_configuration=_configuration,
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
|
||||
class one_of_0(
|
||||
schemas.AnyTypeSchema,
|
||||
):
|
||||
|
||||
|
||||
class MetaOapg:
|
||||
additional_properties = schemas.AnyTypeSchema
|
||||
|
||||
|
||||
def __getitem__(self, name: str) -> MetaOapg.additional_properties:
|
||||
# dict_instance[name] accessor
|
||||
return super().__getitem__(name)
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
*args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
_configuration: typing.Optional[schemas.Configuration] = None,
|
||||
**kwargs: typing.Union[MetaOapg.additional_properties, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
) -> 'one_of_0':
|
||||
return super().__new__(
|
||||
cls,
|
||||
*args,
|
||||
_configuration=_configuration,
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
|
||||
class any_of_0(
|
||||
schemas.AnyTypeSchema,
|
||||
):
|
||||
|
||||
|
||||
class MetaOapg:
|
||||
additional_properties = schemas.AnyTypeSchema
|
||||
|
||||
|
||||
def __getitem__(self, name: str) -> MetaOapg.additional_properties:
|
||||
# dict_instance[name] accessor
|
||||
return super().__getitem__(name)
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
*args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
_configuration: typing.Optional[schemas.Configuration] = None,
|
||||
**kwargs: typing.Union[MetaOapg.additional_properties, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
) -> 'any_of_0':
|
||||
return super().__new__(
|
||||
cls,
|
||||
*args,
|
||||
_configuration=_configuration,
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
@classmethod
|
||||
@property
|
||||
@functools.cache
|
||||
def all_of(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
|
||||
return [
|
||||
cls.all_of_0,
|
||||
]
|
||||
|
||||
@classmethod
|
||||
@property
|
||||
@functools.cache
|
||||
def one_of(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
|
||||
return [
|
||||
cls.one_of_0,
|
||||
]
|
||||
|
||||
@classmethod
|
||||
@property
|
||||
@functools.cache
|
||||
def any_of(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
|
||||
return [
|
||||
cls.any_of_0,
|
||||
]
|
||||
|
||||
|
||||
def __getitem__(self, name: str) -> MetaOapg.additional_properties:
|
||||
# dict_instance[name] accessor
|
||||
return super().__getitem__(name)
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
*args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
_configuration: typing.Optional[schemas.Configuration] = None,
|
||||
**kwargs: typing.Union[MetaOapg.additional_properties, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
) -> 'AllofCombinedWithAnyofOneof':
|
||||
return super().__new__(
|
||||
cls,
|
||||
*args,
|
||||
_configuration=_configuration,
|
||||
**kwargs,
|
||||
)
|
@ -10,17 +10,15 @@
|
||||
"""
|
||||
|
||||
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
|
||||
import uuid # noqa: F401
|
||||
|
||||
import frozendict # noqa: F401
|
||||
|
||||
from unit_test_api import schemas # noqa: F401
|
||||
|
||||
|
||||
@ -47,12 +45,16 @@ class AllofSimpleTypes(
|
||||
additional_properties = schemas.AnyTypeSchema
|
||||
inclusive_maximum = 30
|
||||
|
||||
|
||||
def __getitem__(self, name: str) -> MetaOapg.additional_properties:
|
||||
# dict_instance[name] accessor
|
||||
return super().__getitem__(name)
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
*args: typing.Union[dict, frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
*args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
_configuration: typing.Optional[schemas.Configuration] = None,
|
||||
**kwargs: typing.Union[MetaOapg.additional_properties, dict, frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
**kwargs: typing.Union[MetaOapg.additional_properties, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
) -> 'all_of_0':
|
||||
return super().__new__(
|
||||
cls,
|
||||
@ -71,12 +73,16 @@ class AllofSimpleTypes(
|
||||
additional_properties = schemas.AnyTypeSchema
|
||||
inclusive_minimum = 20
|
||||
|
||||
|
||||
def __getitem__(self, name: str) -> MetaOapg.additional_properties:
|
||||
# dict_instance[name] accessor
|
||||
return super().__getitem__(name)
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
*args: typing.Union[dict, frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
*args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
_configuration: typing.Optional[schemas.Configuration] = None,
|
||||
**kwargs: typing.Union[MetaOapg.additional_properties, dict, frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
**kwargs: typing.Union[MetaOapg.additional_properties, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
) -> 'all_of_1':
|
||||
return super().__new__(
|
||||
cls,
|
||||
@ -101,12 +107,16 @@ class AllofSimpleTypes(
|
||||
cls.all_of_1,
|
||||
]
|
||||
|
||||
|
||||
def __getitem__(self, name: str) -> MetaOapg.additional_properties:
|
||||
# dict_instance[name] accessor
|
||||
return super().__getitem__(name)
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
*args: typing.Union[dict, frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
*args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
_configuration: typing.Optional[schemas.Configuration] = None,
|
||||
**kwargs: typing.Union[MetaOapg.additional_properties, dict, frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
**kwargs: typing.Union[MetaOapg.additional_properties, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
) -> 'AllofSimpleTypes':
|
||||
return super().__new__(
|
||||
cls,
|
||||
|
@ -0,0 +1,124 @@
|
||||
# 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 typing # noqa: F401
|
||||
import functools # noqa: F401
|
||||
|
||||
import decimal # noqa: F401
|
||||
from datetime import date, datetime # noqa: F401
|
||||
import uuid # noqa: F401
|
||||
|
||||
import frozendict # noqa: F401
|
||||
|
||||
from unit_test_api import schemas # noqa: F401
|
||||
|
||||
|
||||
class AllofSimpleTypes(
|
||||
schemas.ComposedSchema,
|
||||
):
|
||||
"""NOTE: This class is auto generated by OpenAPI Generator.
|
||||
Ref: https://openapi-generator.tech
|
||||
|
||||
Do not edit the class manually.
|
||||
"""
|
||||
|
||||
|
||||
class MetaOapg:
|
||||
additional_properties = schemas.AnyTypeSchema
|
||||
|
||||
|
||||
class all_of_0(
|
||||
schemas.AnyTypeSchema,
|
||||
):
|
||||
|
||||
|
||||
class MetaOapg:
|
||||
additional_properties = schemas.AnyTypeSchema
|
||||
|
||||
|
||||
def __getitem__(self, name: str) -> MetaOapg.additional_properties:
|
||||
# dict_instance[name] accessor
|
||||
return super().__getitem__(name)
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
*args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
_configuration: typing.Optional[schemas.Configuration] = None,
|
||||
**kwargs: typing.Union[MetaOapg.additional_properties, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
) -> 'all_of_0':
|
||||
return super().__new__(
|
||||
cls,
|
||||
*args,
|
||||
_configuration=_configuration,
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
|
||||
class all_of_1(
|
||||
schemas.AnyTypeSchema,
|
||||
):
|
||||
|
||||
|
||||
class MetaOapg:
|
||||
additional_properties = schemas.AnyTypeSchema
|
||||
|
||||
|
||||
def __getitem__(self, name: str) -> MetaOapg.additional_properties:
|
||||
# dict_instance[name] accessor
|
||||
return super().__getitem__(name)
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
*args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
_configuration: typing.Optional[schemas.Configuration] = None,
|
||||
**kwargs: typing.Union[MetaOapg.additional_properties, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
) -> 'all_of_1':
|
||||
return super().__new__(
|
||||
cls,
|
||||
*args,
|
||||
_configuration=_configuration,
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
@classmethod
|
||||
@property
|
||||
@functools.cache
|
||||
def all_of(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
|
||||
return [
|
||||
cls.all_of_0,
|
||||
cls.all_of_1,
|
||||
]
|
||||
|
||||
|
||||
def __getitem__(self, name: str) -> MetaOapg.additional_properties:
|
||||
# dict_instance[name] accessor
|
||||
return super().__getitem__(name)
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
*args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
_configuration: typing.Optional[schemas.Configuration] = None,
|
||||
**kwargs: typing.Union[MetaOapg.additional_properties, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
) -> 'AllofSimpleTypes':
|
||||
return super().__new__(
|
||||
cls,
|
||||
*args,
|
||||
_configuration=_configuration,
|
||||
**kwargs,
|
||||
)
|
@ -10,17 +10,15 @@
|
||||
"""
|
||||
|
||||
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
|
||||
import uuid # noqa: F401
|
||||
|
||||
import frozendict # noqa: F401
|
||||
|
||||
from unit_test_api import schemas # noqa: F401
|
||||
|
||||
|
||||
@ -40,6 +38,9 @@ class AllofWithBaseSchema(
|
||||
}
|
||||
class properties:
|
||||
bar = schemas.IntSchema
|
||||
__annotations__ = {
|
||||
"bar": bar,
|
||||
}
|
||||
additional_properties = schemas.AnyTypeSchema
|
||||
|
||||
|
||||
@ -54,17 +55,27 @@ class AllofWithBaseSchema(
|
||||
}
|
||||
class properties:
|
||||
foo = schemas.StrSchema
|
||||
__annotations__ = {
|
||||
"foo": foo,
|
||||
}
|
||||
additional_properties = schemas.AnyTypeSchema
|
||||
|
||||
|
||||
foo: MetaOapg.properties.foo
|
||||
|
||||
@typing.overload
|
||||
def __getitem__(self, name: typing.Literal["foo"]) -> MetaOapg.properties.foo: ...
|
||||
|
||||
def __getitem__(self, name: str) -> MetaOapg.additional_properties:
|
||||
# dict_instance[name] accessor
|
||||
return super().__getitem__(name)
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
*args: typing.Union[dict, frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
*args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
foo: typing.Union[MetaOapg.properties.foo, str, ],
|
||||
_configuration: typing.Optional[schemas.Configuration] = None,
|
||||
**kwargs: typing.Union[MetaOapg.additional_properties, dict, frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
**kwargs: typing.Union[MetaOapg.additional_properties, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
) -> 'all_of_0':
|
||||
return super().__new__(
|
||||
cls,
|
||||
@ -86,17 +97,27 @@ class AllofWithBaseSchema(
|
||||
}
|
||||
class properties:
|
||||
baz = schemas.NoneSchema
|
||||
__annotations__ = {
|
||||
"baz": baz,
|
||||
}
|
||||
additional_properties = schemas.AnyTypeSchema
|
||||
|
||||
|
||||
baz: MetaOapg.properties.baz
|
||||
|
||||
@typing.overload
|
||||
def __getitem__(self, name: typing.Literal["baz"]) -> MetaOapg.properties.baz: ...
|
||||
|
||||
def __getitem__(self, name: str) -> MetaOapg.additional_properties:
|
||||
# dict_instance[name] accessor
|
||||
return super().__getitem__(name)
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
*args: typing.Union[dict, frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
*args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
baz: typing.Union[MetaOapg.properties.baz, None, ],
|
||||
_configuration: typing.Optional[schemas.Configuration] = None,
|
||||
**kwargs: typing.Union[MetaOapg.additional_properties, dict, frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
**kwargs: typing.Union[MetaOapg.additional_properties, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
) -> 'all_of_1':
|
||||
return super().__new__(
|
||||
cls,
|
||||
@ -124,13 +145,20 @@ class AllofWithBaseSchema(
|
||||
|
||||
|
||||
bar: MetaOapg.properties.bar
|
||||
|
||||
@typing.overload
|
||||
def __getitem__(self, name: typing.Literal["bar"]) -> MetaOapg.properties.bar: ...
|
||||
|
||||
def __getitem__(self, name: str) -> MetaOapg.additional_properties:
|
||||
# dict_instance[name] accessor
|
||||
return super().__getitem__(name)
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
*args: typing.Union[dict, frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
*args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
bar: typing.Union[MetaOapg.properties.bar, int, ],
|
||||
_configuration: typing.Optional[schemas.Configuration] = None,
|
||||
**kwargs: typing.Union[MetaOapg.additional_properties, dict, frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
**kwargs: typing.Union[MetaOapg.additional_properties, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
) -> 'AllofWithBaseSchema':
|
||||
return super().__new__(
|
||||
cls,
|
||||
|
@ -0,0 +1,169 @@
|
||||
# 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 typing # noqa: F401
|
||||
import functools # noqa: F401
|
||||
|
||||
import decimal # noqa: F401
|
||||
from datetime import date, datetime # noqa: F401
|
||||
import uuid # noqa: F401
|
||||
|
||||
import frozendict # noqa: F401
|
||||
|
||||
from unit_test_api import schemas # noqa: F401
|
||||
|
||||
|
||||
class AllofWithBaseSchema(
|
||||
schemas.ComposedSchema,
|
||||
):
|
||||
"""NOTE: This class is auto generated by OpenAPI Generator.
|
||||
Ref: https://openapi-generator.tech
|
||||
|
||||
Do not edit the class manually.
|
||||
"""
|
||||
|
||||
|
||||
class MetaOapg:
|
||||
required = {
|
||||
"bar",
|
||||
}
|
||||
class properties:
|
||||
bar = schemas.IntSchema
|
||||
__annotations__ = {
|
||||
"bar": bar,
|
||||
}
|
||||
additional_properties = schemas.AnyTypeSchema
|
||||
|
||||
|
||||
class all_of_0(
|
||||
schemas.AnyTypeSchema,
|
||||
):
|
||||
|
||||
|
||||
class MetaOapg:
|
||||
required = {
|
||||
"foo",
|
||||
}
|
||||
class properties:
|
||||
foo = schemas.StrSchema
|
||||
__annotations__ = {
|
||||
"foo": foo,
|
||||
}
|
||||
additional_properties = schemas.AnyTypeSchema
|
||||
|
||||
|
||||
foo: MetaOapg.properties.foo
|
||||
|
||||
@typing.overload
|
||||
def __getitem__(self, name: typing.Literal["foo"]) -> MetaOapg.properties.foo: ...
|
||||
|
||||
def __getitem__(self, name: str) -> MetaOapg.additional_properties:
|
||||
# dict_instance[name] accessor
|
||||
return super().__getitem__(name)
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
*args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
foo: typing.Union[MetaOapg.properties.foo, str, ],
|
||||
_configuration: typing.Optional[schemas.Configuration] = None,
|
||||
**kwargs: typing.Union[MetaOapg.additional_properties, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
) -> 'all_of_0':
|
||||
return super().__new__(
|
||||
cls,
|
||||
*args,
|
||||
foo=foo,
|
||||
_configuration=_configuration,
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
|
||||
class all_of_1(
|
||||
schemas.AnyTypeSchema,
|
||||
):
|
||||
|
||||
|
||||
class MetaOapg:
|
||||
required = {
|
||||
"baz",
|
||||
}
|
||||
class properties:
|
||||
baz = schemas.NoneSchema
|
||||
__annotations__ = {
|
||||
"baz": baz,
|
||||
}
|
||||
additional_properties = schemas.AnyTypeSchema
|
||||
|
||||
|
||||
baz: MetaOapg.properties.baz
|
||||
|
||||
@typing.overload
|
||||
def __getitem__(self, name: typing.Literal["baz"]) -> MetaOapg.properties.baz: ...
|
||||
|
||||
def __getitem__(self, name: str) -> MetaOapg.additional_properties:
|
||||
# dict_instance[name] accessor
|
||||
return super().__getitem__(name)
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
*args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
baz: typing.Union[MetaOapg.properties.baz, None, ],
|
||||
_configuration: typing.Optional[schemas.Configuration] = None,
|
||||
**kwargs: typing.Union[MetaOapg.additional_properties, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
) -> 'all_of_1':
|
||||
return super().__new__(
|
||||
cls,
|
||||
*args,
|
||||
baz=baz,
|
||||
_configuration=_configuration,
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
@classmethod
|
||||
@property
|
||||
@functools.cache
|
||||
def all_of(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
|
||||
return [
|
||||
cls.all_of_0,
|
||||
cls.all_of_1,
|
||||
]
|
||||
|
||||
|
||||
bar: MetaOapg.properties.bar
|
||||
|
||||
@typing.overload
|
||||
def __getitem__(self, name: typing.Literal["bar"]) -> MetaOapg.properties.bar: ...
|
||||
|
||||
def __getitem__(self, name: str) -> MetaOapg.additional_properties:
|
||||
# dict_instance[name] accessor
|
||||
return super().__getitem__(name)
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
*args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
bar: typing.Union[MetaOapg.properties.bar, int, ],
|
||||
_configuration: typing.Optional[schemas.Configuration] = None,
|
||||
**kwargs: typing.Union[MetaOapg.additional_properties, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
) -> 'AllofWithBaseSchema':
|
||||
return super().__new__(
|
||||
cls,
|
||||
*args,
|
||||
bar=bar,
|
||||
_configuration=_configuration,
|
||||
**kwargs,
|
||||
)
|
@ -10,17 +10,15 @@
|
||||
"""
|
||||
|
||||
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
|
||||
import uuid # noqa: F401
|
||||
|
||||
import frozendict # noqa: F401
|
||||
|
||||
from unit_test_api import schemas # noqa: F401
|
||||
|
||||
|
||||
@ -53,12 +51,16 @@ class AllofWithOneEmptySchema(
|
||||
cls.all_of_0,
|
||||
]
|
||||
|
||||
|
||||
def __getitem__(self, name: str) -> MetaOapg.additional_properties:
|
||||
# dict_instance[name] accessor
|
||||
return super().__getitem__(name)
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
*args: typing.Union[dict, frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
*args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
_configuration: typing.Optional[schemas.Configuration] = None,
|
||||
**kwargs: typing.Union[MetaOapg.additional_properties, dict, frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
**kwargs: typing.Union[MetaOapg.additional_properties, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
) -> 'AllofWithOneEmptySchema':
|
||||
return super().__new__(
|
||||
cls,
|
||||
|
@ -0,0 +1,70 @@
|
||||
# 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 typing # noqa: F401
|
||||
import functools # noqa: F401
|
||||
|
||||
import decimal # noqa: F401
|
||||
from datetime import date, datetime # noqa: F401
|
||||
import uuid # noqa: F401
|
||||
|
||||
import frozendict # noqa: F401
|
||||
|
||||
from unit_test_api import schemas # noqa: F401
|
||||
|
||||
|
||||
class AllofWithOneEmptySchema(
|
||||
schemas.ComposedSchema,
|
||||
):
|
||||
"""NOTE: This class is auto generated by OpenAPI Generator.
|
||||
Ref: https://openapi-generator.tech
|
||||
|
||||
Do not edit the class manually.
|
||||
"""
|
||||
|
||||
|
||||
class MetaOapg:
|
||||
additional_properties = schemas.AnyTypeSchema
|
||||
all_of_0 = schemas.AnyTypeSchema
|
||||
|
||||
@classmethod
|
||||
@property
|
||||
@functools.cache
|
||||
def all_of(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
|
||||
return [
|
||||
cls.all_of_0,
|
||||
]
|
||||
|
||||
|
||||
def __getitem__(self, name: str) -> MetaOapg.additional_properties:
|
||||
# dict_instance[name] accessor
|
||||
return super().__getitem__(name)
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
*args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
_configuration: typing.Optional[schemas.Configuration] = None,
|
||||
**kwargs: typing.Union[MetaOapg.additional_properties, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
) -> 'AllofWithOneEmptySchema':
|
||||
return super().__new__(
|
||||
cls,
|
||||
*args,
|
||||
_configuration=_configuration,
|
||||
**kwargs,
|
||||
)
|
@ -10,17 +10,15 @@
|
||||
"""
|
||||
|
||||
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
|
||||
import uuid # noqa: F401
|
||||
|
||||
import frozendict # noqa: F401
|
||||
|
||||
from unit_test_api import schemas # noqa: F401
|
||||
|
||||
|
||||
@ -55,12 +53,16 @@ class AllofWithTheFirstEmptySchema(
|
||||
cls.all_of_1,
|
||||
]
|
||||
|
||||
|
||||
def __getitem__(self, name: str) -> MetaOapg.additional_properties:
|
||||
# dict_instance[name] accessor
|
||||
return super().__getitem__(name)
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
*args: typing.Union[dict, frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
*args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
_configuration: typing.Optional[schemas.Configuration] = None,
|
||||
**kwargs: typing.Union[MetaOapg.additional_properties, dict, frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
**kwargs: typing.Union[MetaOapg.additional_properties, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
) -> 'AllofWithTheFirstEmptySchema':
|
||||
return super().__new__(
|
||||
cls,
|
||||
|
@ -0,0 +1,72 @@
|
||||
# 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 typing # noqa: F401
|
||||
import functools # noqa: F401
|
||||
|
||||
import decimal # noqa: F401
|
||||
from datetime import date, datetime # noqa: F401
|
||||
import uuid # noqa: F401
|
||||
|
||||
import frozendict # noqa: F401
|
||||
|
||||
from unit_test_api import schemas # noqa: F401
|
||||
|
||||
|
||||
class AllofWithTheFirstEmptySchema(
|
||||
schemas.ComposedSchema,
|
||||
):
|
||||
"""NOTE: This class is auto generated by OpenAPI Generator.
|
||||
Ref: https://openapi-generator.tech
|
||||
|
||||
Do not edit the class manually.
|
||||
"""
|
||||
|
||||
|
||||
class MetaOapg:
|
||||
additional_properties = schemas.AnyTypeSchema
|
||||
all_of_0 = schemas.AnyTypeSchema
|
||||
all_of_1 = schemas.NumberSchema
|
||||
|
||||
@classmethod
|
||||
@property
|
||||
@functools.cache
|
||||
def all_of(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
|
||||
return [
|
||||
cls.all_of_0,
|
||||
cls.all_of_1,
|
||||
]
|
||||
|
||||
|
||||
def __getitem__(self, name: str) -> MetaOapg.additional_properties:
|
||||
# dict_instance[name] accessor
|
||||
return super().__getitem__(name)
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
*args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
_configuration: typing.Optional[schemas.Configuration] = None,
|
||||
**kwargs: typing.Union[MetaOapg.additional_properties, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
) -> 'AllofWithTheFirstEmptySchema':
|
||||
return super().__new__(
|
||||
cls,
|
||||
*args,
|
||||
_configuration=_configuration,
|
||||
**kwargs,
|
||||
)
|
@ -10,17 +10,15 @@
|
||||
"""
|
||||
|
||||
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
|
||||
import uuid # noqa: F401
|
||||
|
||||
import frozendict # noqa: F401
|
||||
|
||||
from unit_test_api import schemas # noqa: F401
|
||||
|
||||
|
||||
@ -55,12 +53,16 @@ class AllofWithTheLastEmptySchema(
|
||||
cls.all_of_1,
|
||||
]
|
||||
|
||||
|
||||
def __getitem__(self, name: str) -> MetaOapg.additional_properties:
|
||||
# dict_instance[name] accessor
|
||||
return super().__getitem__(name)
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
*args: typing.Union[dict, frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
*args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
_configuration: typing.Optional[schemas.Configuration] = None,
|
||||
**kwargs: typing.Union[MetaOapg.additional_properties, dict, frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
**kwargs: typing.Union[MetaOapg.additional_properties, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
) -> 'AllofWithTheLastEmptySchema':
|
||||
return super().__new__(
|
||||
cls,
|
||||
|
@ -0,0 +1,72 @@
|
||||
# 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 typing # noqa: F401
|
||||
import functools # noqa: F401
|
||||
|
||||
import decimal # noqa: F401
|
||||
from datetime import date, datetime # noqa: F401
|
||||
import uuid # noqa: F401
|
||||
|
||||
import frozendict # noqa: F401
|
||||
|
||||
from unit_test_api import schemas # noqa: F401
|
||||
|
||||
|
||||
class AllofWithTheLastEmptySchema(
|
||||
schemas.ComposedSchema,
|
||||
):
|
||||
"""NOTE: This class is auto generated by OpenAPI Generator.
|
||||
Ref: https://openapi-generator.tech
|
||||
|
||||
Do not edit the class manually.
|
||||
"""
|
||||
|
||||
|
||||
class MetaOapg:
|
||||
additional_properties = schemas.AnyTypeSchema
|
||||
all_of_0 = schemas.NumberSchema
|
||||
all_of_1 = schemas.AnyTypeSchema
|
||||
|
||||
@classmethod
|
||||
@property
|
||||
@functools.cache
|
||||
def all_of(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
|
||||
return [
|
||||
cls.all_of_0,
|
||||
cls.all_of_1,
|
||||
]
|
||||
|
||||
|
||||
def __getitem__(self, name: str) -> MetaOapg.additional_properties:
|
||||
# dict_instance[name] accessor
|
||||
return super().__getitem__(name)
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
*args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
_configuration: typing.Optional[schemas.Configuration] = None,
|
||||
**kwargs: typing.Union[MetaOapg.additional_properties, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
) -> 'AllofWithTheLastEmptySchema':
|
||||
return super().__new__(
|
||||
cls,
|
||||
*args,
|
||||
_configuration=_configuration,
|
||||
**kwargs,
|
||||
)
|
@ -10,17 +10,15 @@
|
||||
"""
|
||||
|
||||
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
|
||||
import uuid # noqa: F401
|
||||
|
||||
import frozendict # noqa: F401
|
||||
|
||||
from unit_test_api import schemas # noqa: F401
|
||||
|
||||
|
||||
@ -55,12 +53,16 @@ class AllofWithTwoEmptySchemas(
|
||||
cls.all_of_1,
|
||||
]
|
||||
|
||||
|
||||
def __getitem__(self, name: str) -> MetaOapg.additional_properties:
|
||||
# dict_instance[name] accessor
|
||||
return super().__getitem__(name)
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
*args: typing.Union[dict, frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
*args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
_configuration: typing.Optional[schemas.Configuration] = None,
|
||||
**kwargs: typing.Union[MetaOapg.additional_properties, dict, frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
**kwargs: typing.Union[MetaOapg.additional_properties, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
) -> 'AllofWithTwoEmptySchemas':
|
||||
return super().__new__(
|
||||
cls,
|
||||
|
@ -0,0 +1,72 @@
|
||||
# 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 typing # noqa: F401
|
||||
import functools # noqa: F401
|
||||
|
||||
import decimal # noqa: F401
|
||||
from datetime import date, datetime # noqa: F401
|
||||
import uuid # noqa: F401
|
||||
|
||||
import frozendict # noqa: F401
|
||||
|
||||
from unit_test_api import schemas # noqa: F401
|
||||
|
||||
|
||||
class AllofWithTwoEmptySchemas(
|
||||
schemas.ComposedSchema,
|
||||
):
|
||||
"""NOTE: This class is auto generated by OpenAPI Generator.
|
||||
Ref: https://openapi-generator.tech
|
||||
|
||||
Do not edit the class manually.
|
||||
"""
|
||||
|
||||
|
||||
class MetaOapg:
|
||||
additional_properties = schemas.AnyTypeSchema
|
||||
all_of_0 = schemas.AnyTypeSchema
|
||||
all_of_1 = schemas.AnyTypeSchema
|
||||
|
||||
@classmethod
|
||||
@property
|
||||
@functools.cache
|
||||
def all_of(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
|
||||
return [
|
||||
cls.all_of_0,
|
||||
cls.all_of_1,
|
||||
]
|
||||
|
||||
|
||||
def __getitem__(self, name: str) -> MetaOapg.additional_properties:
|
||||
# dict_instance[name] accessor
|
||||
return super().__getitem__(name)
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
*args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
_configuration: typing.Optional[schemas.Configuration] = None,
|
||||
**kwargs: typing.Union[MetaOapg.additional_properties, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
) -> 'AllofWithTwoEmptySchemas':
|
||||
return super().__new__(
|
||||
cls,
|
||||
*args,
|
||||
_configuration=_configuration,
|
||||
**kwargs,
|
||||
)
|
@ -10,17 +10,15 @@
|
||||
"""
|
||||
|
||||
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
|
||||
import uuid # noqa: F401
|
||||
|
||||
import frozendict # noqa: F401
|
||||
|
||||
from unit_test_api import schemas # noqa: F401
|
||||
|
||||
|
||||
@ -48,12 +46,16 @@ class Anyof(
|
||||
additional_properties = schemas.AnyTypeSchema
|
||||
inclusive_minimum = 2
|
||||
|
||||
|
||||
def __getitem__(self, name: str) -> MetaOapg.additional_properties:
|
||||
# dict_instance[name] accessor
|
||||
return super().__getitem__(name)
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
*args: typing.Union[dict, frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
*args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
_configuration: typing.Optional[schemas.Configuration] = None,
|
||||
**kwargs: typing.Union[MetaOapg.additional_properties, dict, frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
**kwargs: typing.Union[MetaOapg.additional_properties, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
) -> 'any_of_1':
|
||||
return super().__new__(
|
||||
cls,
|
||||
@ -78,12 +80,16 @@ class Anyof(
|
||||
cls.any_of_1,
|
||||
]
|
||||
|
||||
|
||||
def __getitem__(self, name: str) -> MetaOapg.additional_properties:
|
||||
# dict_instance[name] accessor
|
||||
return super().__getitem__(name)
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
*args: typing.Union[dict, frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
*args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
_configuration: typing.Optional[schemas.Configuration] = None,
|
||||
**kwargs: typing.Union[MetaOapg.additional_properties, dict, frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
**kwargs: typing.Union[MetaOapg.additional_properties, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
) -> 'Anyof':
|
||||
return super().__new__(
|
||||
cls,
|
||||
|
@ -0,0 +1,98 @@
|
||||
# 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 typing # noqa: F401
|
||||
import functools # noqa: F401
|
||||
|
||||
import decimal # noqa: F401
|
||||
from datetime import date, datetime # noqa: F401
|
||||
import uuid # noqa: F401
|
||||
|
||||
import frozendict # noqa: F401
|
||||
|
||||
from unit_test_api import schemas # noqa: F401
|
||||
|
||||
|
||||
class Anyof(
|
||||
schemas.ComposedSchema,
|
||||
):
|
||||
"""NOTE: This class is auto generated by OpenAPI Generator.
|
||||
Ref: https://openapi-generator.tech
|
||||
|
||||
Do not edit the class manually.
|
||||
"""
|
||||
|
||||
|
||||
class MetaOapg:
|
||||
additional_properties = schemas.AnyTypeSchema
|
||||
any_of_0 = schemas.IntSchema
|
||||
|
||||
|
||||
class any_of_1(
|
||||
schemas.AnyTypeSchema,
|
||||
):
|
||||
|
||||
|
||||
class MetaOapg:
|
||||
additional_properties = schemas.AnyTypeSchema
|
||||
|
||||
|
||||
def __getitem__(self, name: str) -> MetaOapg.additional_properties:
|
||||
# dict_instance[name] accessor
|
||||
return super().__getitem__(name)
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
*args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
_configuration: typing.Optional[schemas.Configuration] = None,
|
||||
**kwargs: typing.Union[MetaOapg.additional_properties, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
) -> 'any_of_1':
|
||||
return super().__new__(
|
||||
cls,
|
||||
*args,
|
||||
_configuration=_configuration,
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
@classmethod
|
||||
@property
|
||||
@functools.cache
|
||||
def any_of(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
|
||||
return [
|
||||
cls.any_of_0,
|
||||
cls.any_of_1,
|
||||
]
|
||||
|
||||
|
||||
def __getitem__(self, name: str) -> MetaOapg.additional_properties:
|
||||
# dict_instance[name] accessor
|
||||
return super().__getitem__(name)
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
*args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
_configuration: typing.Optional[schemas.Configuration] = None,
|
||||
**kwargs: typing.Union[MetaOapg.additional_properties, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
) -> 'Anyof':
|
||||
return super().__new__(
|
||||
cls,
|
||||
*args,
|
||||
_configuration=_configuration,
|
||||
**kwargs,
|
||||
)
|
@ -10,17 +10,15 @@
|
||||
"""
|
||||
|
||||
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
|
||||
import uuid # noqa: F401
|
||||
|
||||
import frozendict # noqa: F401
|
||||
|
||||
from unit_test_api import schemas # noqa: F401
|
||||
|
||||
|
||||
@ -49,17 +47,27 @@ class AnyofComplexTypes(
|
||||
}
|
||||
class properties:
|
||||
bar = schemas.IntSchema
|
||||
__annotations__ = {
|
||||
"bar": bar,
|
||||
}
|
||||
additional_properties = schemas.AnyTypeSchema
|
||||
|
||||
|
||||
bar: MetaOapg.properties.bar
|
||||
|
||||
@typing.overload
|
||||
def __getitem__(self, name: typing.Literal["bar"]) -> MetaOapg.properties.bar: ...
|
||||
|
||||
def __getitem__(self, name: str) -> MetaOapg.additional_properties:
|
||||
# dict_instance[name] accessor
|
||||
return super().__getitem__(name)
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
*args: typing.Union[dict, frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
*args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
bar: typing.Union[MetaOapg.properties.bar, int, ],
|
||||
_configuration: typing.Optional[schemas.Configuration] = None,
|
||||
**kwargs: typing.Union[MetaOapg.additional_properties, dict, frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
**kwargs: typing.Union[MetaOapg.additional_properties, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
) -> 'any_of_0':
|
||||
return super().__new__(
|
||||
cls,
|
||||
@ -81,17 +89,27 @@ class AnyofComplexTypes(
|
||||
}
|
||||
class properties:
|
||||
foo = schemas.StrSchema
|
||||
__annotations__ = {
|
||||
"foo": foo,
|
||||
}
|
||||
additional_properties = schemas.AnyTypeSchema
|
||||
|
||||
|
||||
foo: MetaOapg.properties.foo
|
||||
|
||||
@typing.overload
|
||||
def __getitem__(self, name: typing.Literal["foo"]) -> MetaOapg.properties.foo: ...
|
||||
|
||||
def __getitem__(self, name: str) -> MetaOapg.additional_properties:
|
||||
# dict_instance[name] accessor
|
||||
return super().__getitem__(name)
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
*args: typing.Union[dict, frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
*args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
foo: typing.Union[MetaOapg.properties.foo, str, ],
|
||||
_configuration: typing.Optional[schemas.Configuration] = None,
|
||||
**kwargs: typing.Union[MetaOapg.additional_properties, dict, frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
**kwargs: typing.Union[MetaOapg.additional_properties, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
) -> 'any_of_1':
|
||||
return super().__new__(
|
||||
cls,
|
||||
@ -117,12 +135,16 @@ class AnyofComplexTypes(
|
||||
cls.any_of_1,
|
||||
]
|
||||
|
||||
|
||||
def __getitem__(self, name: str) -> MetaOapg.additional_properties:
|
||||
# dict_instance[name] accessor
|
||||
return super().__getitem__(name)
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
*args: typing.Union[dict, frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
*args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
_configuration: typing.Optional[schemas.Configuration] = None,
|
||||
**kwargs: typing.Union[MetaOapg.additional_properties, dict, frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
**kwargs: typing.Union[MetaOapg.additional_properties, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
) -> 'AnyofComplexTypes':
|
||||
return super().__new__(
|
||||
cls,
|
||||
|
@ -0,0 +1,154 @@
|
||||
# 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 typing # noqa: F401
|
||||
import functools # noqa: F401
|
||||
|
||||
import decimal # noqa: F401
|
||||
from datetime import date, datetime # noqa: F401
|
||||
import uuid # noqa: F401
|
||||
|
||||
import frozendict # noqa: F401
|
||||
|
||||
from unit_test_api import schemas # noqa: F401
|
||||
|
||||
|
||||
class AnyofComplexTypes(
|
||||
schemas.ComposedSchema,
|
||||
):
|
||||
"""NOTE: This class is auto generated by OpenAPI Generator.
|
||||
Ref: https://openapi-generator.tech
|
||||
|
||||
Do not edit the class manually.
|
||||
"""
|
||||
|
||||
|
||||
class MetaOapg:
|
||||
additional_properties = schemas.AnyTypeSchema
|
||||
|
||||
|
||||
class any_of_0(
|
||||
schemas.AnyTypeSchema,
|
||||
):
|
||||
|
||||
|
||||
class MetaOapg:
|
||||
required = {
|
||||
"bar",
|
||||
}
|
||||
class properties:
|
||||
bar = schemas.IntSchema
|
||||
__annotations__ = {
|
||||
"bar": bar,
|
||||
}
|
||||
additional_properties = schemas.AnyTypeSchema
|
||||
|
||||
|
||||
bar: MetaOapg.properties.bar
|
||||
|
||||
@typing.overload
|
||||
def __getitem__(self, name: typing.Literal["bar"]) -> MetaOapg.properties.bar: ...
|
||||
|
||||
def __getitem__(self, name: str) -> MetaOapg.additional_properties:
|
||||
# dict_instance[name] accessor
|
||||
return super().__getitem__(name)
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
*args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
bar: typing.Union[MetaOapg.properties.bar, int, ],
|
||||
_configuration: typing.Optional[schemas.Configuration] = None,
|
||||
**kwargs: typing.Union[MetaOapg.additional_properties, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
) -> 'any_of_0':
|
||||
return super().__new__(
|
||||
cls,
|
||||
*args,
|
||||
bar=bar,
|
||||
_configuration=_configuration,
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
|
||||
class any_of_1(
|
||||
schemas.AnyTypeSchema,
|
||||
):
|
||||
|
||||
|
||||
class MetaOapg:
|
||||
required = {
|
||||
"foo",
|
||||
}
|
||||
class properties:
|
||||
foo = schemas.StrSchema
|
||||
__annotations__ = {
|
||||
"foo": foo,
|
||||
}
|
||||
additional_properties = schemas.AnyTypeSchema
|
||||
|
||||
|
||||
foo: MetaOapg.properties.foo
|
||||
|
||||
@typing.overload
|
||||
def __getitem__(self, name: typing.Literal["foo"]) -> MetaOapg.properties.foo: ...
|
||||
|
||||
def __getitem__(self, name: str) -> MetaOapg.additional_properties:
|
||||
# dict_instance[name] accessor
|
||||
return super().__getitem__(name)
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
*args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
foo: typing.Union[MetaOapg.properties.foo, str, ],
|
||||
_configuration: typing.Optional[schemas.Configuration] = None,
|
||||
**kwargs: typing.Union[MetaOapg.additional_properties, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
) -> 'any_of_1':
|
||||
return super().__new__(
|
||||
cls,
|
||||
*args,
|
||||
foo=foo,
|
||||
_configuration=_configuration,
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
@classmethod
|
||||
@property
|
||||
@functools.cache
|
||||
def any_of(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
|
||||
return [
|
||||
cls.any_of_0,
|
||||
cls.any_of_1,
|
||||
]
|
||||
|
||||
|
||||
def __getitem__(self, name: str) -> MetaOapg.additional_properties:
|
||||
# dict_instance[name] accessor
|
||||
return super().__getitem__(name)
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
*args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
_configuration: typing.Optional[schemas.Configuration] = None,
|
||||
**kwargs: typing.Union[MetaOapg.additional_properties, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
) -> 'AnyofComplexTypes':
|
||||
return super().__new__(
|
||||
cls,
|
||||
*args,
|
||||
_configuration=_configuration,
|
||||
**kwargs,
|
||||
)
|
@ -10,17 +10,15 @@
|
||||
"""
|
||||
|
||||
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
|
||||
import uuid # noqa: F401
|
||||
|
||||
import frozendict # noqa: F401
|
||||
|
||||
from unit_test_api import schemas # noqa: F401
|
||||
|
||||
|
||||
@ -47,12 +45,16 @@ class AnyofWithBaseSchema(
|
||||
additional_properties = schemas.AnyTypeSchema
|
||||
max_length = 2
|
||||
|
||||
|
||||
def __getitem__(self, name: str) -> MetaOapg.additional_properties:
|
||||
# dict_instance[name] accessor
|
||||
return super().__getitem__(name)
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
*args: typing.Union[dict, frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
*args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
_configuration: typing.Optional[schemas.Configuration] = None,
|
||||
**kwargs: typing.Union[MetaOapg.additional_properties, dict, frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
**kwargs: typing.Union[MetaOapg.additional_properties, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
) -> 'any_of_0':
|
||||
return super().__new__(
|
||||
cls,
|
||||
@ -71,12 +73,16 @@ class AnyofWithBaseSchema(
|
||||
additional_properties = schemas.AnyTypeSchema
|
||||
min_length = 4
|
||||
|
||||
|
||||
def __getitem__(self, name: str) -> MetaOapg.additional_properties:
|
||||
# dict_instance[name] accessor
|
||||
return super().__getitem__(name)
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
*args: typing.Union[dict, frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
*args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
_configuration: typing.Optional[schemas.Configuration] = None,
|
||||
**kwargs: typing.Union[MetaOapg.additional_properties, dict, frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
**kwargs: typing.Union[MetaOapg.additional_properties, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
) -> 'any_of_1':
|
||||
return super().__new__(
|
||||
cls,
|
||||
|
@ -0,0 +1,118 @@
|
||||
# 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 typing # noqa: F401
|
||||
import functools # noqa: F401
|
||||
|
||||
import decimal # noqa: F401
|
||||
from datetime import date, datetime # noqa: F401
|
||||
import uuid # noqa: F401
|
||||
|
||||
import frozendict # noqa: F401
|
||||
|
||||
from unit_test_api import schemas # noqa: F401
|
||||
|
||||
|
||||
class AnyofWithBaseSchema(
|
||||
schemas.ComposedBase,
|
||||
schemas.StrSchema
|
||||
):
|
||||
"""NOTE: This class is auto generated by OpenAPI Generator.
|
||||
Ref: https://openapi-generator.tech
|
||||
|
||||
Do not edit the class manually.
|
||||
"""
|
||||
|
||||
|
||||
class MetaOapg:
|
||||
|
||||
|
||||
class any_of_0(
|
||||
schemas.AnyTypeSchema,
|
||||
):
|
||||
|
||||
|
||||
class MetaOapg:
|
||||
additional_properties = schemas.AnyTypeSchema
|
||||
|
||||
|
||||
def __getitem__(self, name: str) -> MetaOapg.additional_properties:
|
||||
# dict_instance[name] accessor
|
||||
return super().__getitem__(name)
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
*args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
_configuration: typing.Optional[schemas.Configuration] = None,
|
||||
**kwargs: typing.Union[MetaOapg.additional_properties, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
) -> 'any_of_0':
|
||||
return super().__new__(
|
||||
cls,
|
||||
*args,
|
||||
_configuration=_configuration,
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
|
||||
class any_of_1(
|
||||
schemas.AnyTypeSchema,
|
||||
):
|
||||
|
||||
|
||||
class MetaOapg:
|
||||
additional_properties = schemas.AnyTypeSchema
|
||||
|
||||
|
||||
def __getitem__(self, name: str) -> MetaOapg.additional_properties:
|
||||
# dict_instance[name] accessor
|
||||
return super().__getitem__(name)
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
*args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
_configuration: typing.Optional[schemas.Configuration] = None,
|
||||
**kwargs: typing.Union[MetaOapg.additional_properties, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
) -> 'any_of_1':
|
||||
return super().__new__(
|
||||
cls,
|
||||
*args,
|
||||
_configuration=_configuration,
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
@classmethod
|
||||
@property
|
||||
@functools.cache
|
||||
def any_of(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
|
||||
return [
|
||||
cls.any_of_0,
|
||||
cls.any_of_1,
|
||||
]
|
||||
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
*args: typing.Union[str, ],
|
||||
_configuration: typing.Optional[schemas.Configuration] = None,
|
||||
) -> 'AnyofWithBaseSchema':
|
||||
return super().__new__(
|
||||
cls,
|
||||
*args,
|
||||
_configuration=_configuration,
|
||||
)
|
@ -10,17 +10,15 @@
|
||||
"""
|
||||
|
||||
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
|
||||
import uuid # noqa: F401
|
||||
|
||||
import frozendict # noqa: F401
|
||||
|
||||
from unit_test_api import schemas # noqa: F401
|
||||
|
||||
|
||||
@ -55,12 +53,16 @@ class AnyofWithOneEmptySchema(
|
||||
cls.any_of_1,
|
||||
]
|
||||
|
||||
|
||||
def __getitem__(self, name: str) -> MetaOapg.additional_properties:
|
||||
# dict_instance[name] accessor
|
||||
return super().__getitem__(name)
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
*args: typing.Union[dict, frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
*args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
_configuration: typing.Optional[schemas.Configuration] = None,
|
||||
**kwargs: typing.Union[MetaOapg.additional_properties, dict, frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
**kwargs: typing.Union[MetaOapg.additional_properties, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
) -> 'AnyofWithOneEmptySchema':
|
||||
return super().__new__(
|
||||
cls,
|
||||
|
@ -0,0 +1,72 @@
|
||||
# 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 typing # noqa: F401
|
||||
import functools # noqa: F401
|
||||
|
||||
import decimal # noqa: F401
|
||||
from datetime import date, datetime # noqa: F401
|
||||
import uuid # noqa: F401
|
||||
|
||||
import frozendict # noqa: F401
|
||||
|
||||
from unit_test_api import schemas # noqa: F401
|
||||
|
||||
|
||||
class AnyofWithOneEmptySchema(
|
||||
schemas.ComposedSchema,
|
||||
):
|
||||
"""NOTE: This class is auto generated by OpenAPI Generator.
|
||||
Ref: https://openapi-generator.tech
|
||||
|
||||
Do not edit the class manually.
|
||||
"""
|
||||
|
||||
|
||||
class MetaOapg:
|
||||
additional_properties = schemas.AnyTypeSchema
|
||||
any_of_0 = schemas.NumberSchema
|
||||
any_of_1 = schemas.AnyTypeSchema
|
||||
|
||||
@classmethod
|
||||
@property
|
||||
@functools.cache
|
||||
def any_of(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
|
||||
return [
|
||||
cls.any_of_0,
|
||||
cls.any_of_1,
|
||||
]
|
||||
|
||||
|
||||
def __getitem__(self, name: str) -> MetaOapg.additional_properties:
|
||||
# dict_instance[name] accessor
|
||||
return super().__getitem__(name)
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
*args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
_configuration: typing.Optional[schemas.Configuration] = None,
|
||||
**kwargs: typing.Union[MetaOapg.additional_properties, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
) -> 'AnyofWithOneEmptySchema':
|
||||
return super().__new__(
|
||||
cls,
|
||||
*args,
|
||||
_configuration=_configuration,
|
||||
**kwargs,
|
||||
)
|
@ -10,17 +10,15 @@
|
||||
"""
|
||||
|
||||
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
|
||||
import uuid # noqa: F401
|
||||
|
||||
import frozendict # noqa: F401
|
||||
|
||||
from unit_test_api import schemas # noqa: F401
|
||||
|
||||
|
||||
@ -39,7 +37,7 @@ class ArrayTypeMatchesArrays(
|
||||
|
||||
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, ]]],
|
||||
arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ]], typing.List[typing.Union[MetaOapg.items, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ]]],
|
||||
_configuration: typing.Optional[schemas.Configuration] = None,
|
||||
) -> 'ArrayTypeMatchesArrays':
|
||||
return super().__new__(
|
||||
@ -48,5 +46,5 @@ class ArrayTypeMatchesArrays(
|
||||
_configuration=_configuration,
|
||||
)
|
||||
|
||||
def __getitem__(self, i) -> MetaOapg.items:
|
||||
def __getitem__(self, i: int) -> MetaOapg.items:
|
||||
return super().__getitem__(i)
|
||||
|
@ -0,0 +1,50 @@
|
||||
# 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 typing # noqa: F401
|
||||
import functools # noqa: F401
|
||||
|
||||
import decimal # noqa: F401
|
||||
from datetime import date, datetime # noqa: F401
|
||||
import uuid # noqa: F401
|
||||
|
||||
import frozendict # noqa: F401
|
||||
|
||||
from unit_test_api import schemas # noqa: F401
|
||||
|
||||
|
||||
class ArrayTypeMatchesArrays(
|
||||
schemas.ListSchema
|
||||
):
|
||||
"""NOTE: This class is auto generated by OpenAPI Generator.
|
||||
Ref: https://openapi-generator.tech
|
||||
|
||||
Do not edit the class manually.
|
||||
"""
|
||||
|
||||
|
||||
class MetaOapg:
|
||||
items = schemas.AnyTypeSchema
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ]], typing.List[typing.Union[MetaOapg.items, dict, frozendict.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: int) -> MetaOapg.items:
|
||||
return super().__getitem__(i)
|
@ -10,16 +10,14 @@
|
||||
"""
|
||||
|
||||
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
|
||||
import uuid # noqa: F401
|
||||
|
||||
import frozendict # noqa: F401
|
||||
|
||||
from unit_test_api import schemas # noqa: F401
|
||||
BooleanTypeMatchesBooleans = schemas.BoolSchema
|
||||
|
@ -0,0 +1,23 @@
|
||||
# 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 typing # noqa: F401
|
||||
import functools # noqa: F401
|
||||
|
||||
import decimal # noqa: F401
|
||||
from datetime import date, datetime # noqa: F401
|
||||
import uuid # noqa: F401
|
||||
|
||||
import frozendict # noqa: F401
|
||||
|
||||
from unit_test_api import schemas # noqa: F401
|
||||
BooleanTypeMatchesBooleans = schemas.BoolSchema
|
@ -10,17 +10,15 @@
|
||||
"""
|
||||
|
||||
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
|
||||
import uuid # noqa: F401
|
||||
|
||||
import frozendict # noqa: F401
|
||||
|
||||
from unit_test_api import schemas # noqa: F401
|
||||
|
||||
|
||||
@ -38,12 +36,16 @@ class ByInt(
|
||||
additional_properties = schemas.AnyTypeSchema
|
||||
multiple_of = 2
|
||||
|
||||
|
||||
def __getitem__(self, name: str) -> MetaOapg.additional_properties:
|
||||
# dict_instance[name] accessor
|
||||
return super().__getitem__(name)
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
*args: typing.Union[dict, frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
*args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
_configuration: typing.Optional[schemas.Configuration] = None,
|
||||
**kwargs: typing.Union[MetaOapg.additional_properties, dict, frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
**kwargs: typing.Union[MetaOapg.additional_properties, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
) -> 'ByInt':
|
||||
return super().__new__(
|
||||
cls,
|
||||
|
@ -0,0 +1,54 @@
|
||||
# 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 typing # noqa: F401
|
||||
import functools # noqa: F401
|
||||
|
||||
import decimal # noqa: F401
|
||||
from datetime import date, datetime # noqa: F401
|
||||
import uuid # noqa: F401
|
||||
|
||||
import frozendict # noqa: F401
|
||||
|
||||
from unit_test_api import schemas # noqa: F401
|
||||
|
||||
|
||||
class ByInt(
|
||||
schemas.AnyTypeSchema,
|
||||
):
|
||||
"""NOTE: This class is auto generated by OpenAPI Generator.
|
||||
Ref: https://openapi-generator.tech
|
||||
|
||||
Do not edit the class manually.
|
||||
"""
|
||||
|
||||
|
||||
class MetaOapg:
|
||||
additional_properties = schemas.AnyTypeSchema
|
||||
|
||||
|
||||
def __getitem__(self, name: str) -> MetaOapg.additional_properties:
|
||||
# dict_instance[name] accessor
|
||||
return super().__getitem__(name)
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
*args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
_configuration: typing.Optional[schemas.Configuration] = None,
|
||||
**kwargs: typing.Union[MetaOapg.additional_properties, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
) -> 'ByInt':
|
||||
return super().__new__(
|
||||
cls,
|
||||
*args,
|
||||
_configuration=_configuration,
|
||||
**kwargs,
|
||||
)
|
@ -10,17 +10,15 @@
|
||||
"""
|
||||
|
||||
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
|
||||
import uuid # noqa: F401
|
||||
|
||||
import frozendict # noqa: F401
|
||||
|
||||
from unit_test_api import schemas # noqa: F401
|
||||
|
||||
|
||||
@ -38,12 +36,16 @@ class ByNumber(
|
||||
additional_properties = schemas.AnyTypeSchema
|
||||
multiple_of = 1.5
|
||||
|
||||
|
||||
def __getitem__(self, name: str) -> MetaOapg.additional_properties:
|
||||
# dict_instance[name] accessor
|
||||
return super().__getitem__(name)
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
*args: typing.Union[dict, frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
*args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
_configuration: typing.Optional[schemas.Configuration] = None,
|
||||
**kwargs: typing.Union[MetaOapg.additional_properties, dict, frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
**kwargs: typing.Union[MetaOapg.additional_properties, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
) -> 'ByNumber':
|
||||
return super().__new__(
|
||||
cls,
|
||||
|
@ -0,0 +1,54 @@
|
||||
# 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 typing # noqa: F401
|
||||
import functools # noqa: F401
|
||||
|
||||
import decimal # noqa: F401
|
||||
from datetime import date, datetime # noqa: F401
|
||||
import uuid # noqa: F401
|
||||
|
||||
import frozendict # noqa: F401
|
||||
|
||||
from unit_test_api import schemas # noqa: F401
|
||||
|
||||
|
||||
class ByNumber(
|
||||
schemas.AnyTypeSchema,
|
||||
):
|
||||
"""NOTE: This class is auto generated by OpenAPI Generator.
|
||||
Ref: https://openapi-generator.tech
|
||||
|
||||
Do not edit the class manually.
|
||||
"""
|
||||
|
||||
|
||||
class MetaOapg:
|
||||
additional_properties = schemas.AnyTypeSchema
|
||||
|
||||
|
||||
def __getitem__(self, name: str) -> MetaOapg.additional_properties:
|
||||
# dict_instance[name] accessor
|
||||
return super().__getitem__(name)
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
*args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
_configuration: typing.Optional[schemas.Configuration] = None,
|
||||
**kwargs: typing.Union[MetaOapg.additional_properties, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
) -> 'ByNumber':
|
||||
return super().__new__(
|
||||
cls,
|
||||
*args,
|
||||
_configuration=_configuration,
|
||||
**kwargs,
|
||||
)
|
@ -10,17 +10,15 @@
|
||||
"""
|
||||
|
||||
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
|
||||
import uuid # noqa: F401
|
||||
|
||||
import frozendict # noqa: F401
|
||||
|
||||
from unit_test_api import schemas # noqa: F401
|
||||
|
||||
|
||||
@ -38,12 +36,16 @@ class BySmallNumber(
|
||||
additional_properties = schemas.AnyTypeSchema
|
||||
multiple_of = 0.00010
|
||||
|
||||
|
||||
def __getitem__(self, name: str) -> MetaOapg.additional_properties:
|
||||
# dict_instance[name] accessor
|
||||
return super().__getitem__(name)
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
*args: typing.Union[dict, frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
*args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
_configuration: typing.Optional[schemas.Configuration] = None,
|
||||
**kwargs: typing.Union[MetaOapg.additional_properties, dict, frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
**kwargs: typing.Union[MetaOapg.additional_properties, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
) -> 'BySmallNumber':
|
||||
return super().__new__(
|
||||
cls,
|
||||
|
@ -0,0 +1,54 @@
|
||||
# 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 typing # noqa: F401
|
||||
import functools # noqa: F401
|
||||
|
||||
import decimal # noqa: F401
|
||||
from datetime import date, datetime # noqa: F401
|
||||
import uuid # noqa: F401
|
||||
|
||||
import frozendict # noqa: F401
|
||||
|
||||
from unit_test_api import schemas # noqa: F401
|
||||
|
||||
|
||||
class BySmallNumber(
|
||||
schemas.AnyTypeSchema,
|
||||
):
|
||||
"""NOTE: This class is auto generated by OpenAPI Generator.
|
||||
Ref: https://openapi-generator.tech
|
||||
|
||||
Do not edit the class manually.
|
||||
"""
|
||||
|
||||
|
||||
class MetaOapg:
|
||||
additional_properties = schemas.AnyTypeSchema
|
||||
|
||||
|
||||
def __getitem__(self, name: str) -> MetaOapg.additional_properties:
|
||||
# dict_instance[name] accessor
|
||||
return super().__getitem__(name)
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
*args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
_configuration: typing.Optional[schemas.Configuration] = None,
|
||||
**kwargs: typing.Union[MetaOapg.additional_properties, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
) -> 'BySmallNumber':
|
||||
return super().__new__(
|
||||
cls,
|
||||
*args,
|
||||
_configuration=_configuration,
|
||||
**kwargs,
|
||||
)
|
@ -10,16 +10,14 @@
|
||||
"""
|
||||
|
||||
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
|
||||
import uuid # noqa: F401
|
||||
|
||||
import frozendict # noqa: F401
|
||||
|
||||
from unit_test_api import schemas # noqa: F401
|
||||
DateTimeFormat = schemas.AnyTypeSchema
|
||||
|
@ -0,0 +1,23 @@
|
||||
# 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 typing # noqa: F401
|
||||
import functools # noqa: F401
|
||||
|
||||
import decimal # noqa: F401
|
||||
from datetime import date, datetime # noqa: F401
|
||||
import uuid # noqa: F401
|
||||
|
||||
import frozendict # noqa: F401
|
||||
|
||||
from unit_test_api import schemas # noqa: F401
|
||||
DateTimeFormat = schemas.AnyTypeSchema
|
@ -10,16 +10,14 @@
|
||||
"""
|
||||
|
||||
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
|
||||
import uuid # noqa: F401
|
||||
|
||||
import frozendict # noqa: F401
|
||||
|
||||
from unit_test_api import schemas # noqa: F401
|
||||
EmailFormat = schemas.AnyTypeSchema
|
||||
|
@ -0,0 +1,23 @@
|
||||
# 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 typing # noqa: F401
|
||||
import functools # noqa: F401
|
||||
|
||||
import decimal # noqa: F401
|
||||
from datetime import date, datetime # noqa: F401
|
||||
import uuid # noqa: F401
|
||||
|
||||
import frozendict # noqa: F401
|
||||
|
||||
from unit_test_api import schemas # noqa: F401
|
||||
EmailFormat = schemas.AnyTypeSchema
|
@ -10,17 +10,15 @@
|
||||
"""
|
||||
|
||||
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
|
||||
import uuid # noqa: F401
|
||||
|
||||
import frozendict # noqa: F401
|
||||
|
||||
from unit_test_api import schemas # noqa: F401
|
||||
|
||||
|
||||
|
@ -0,0 +1,42 @@
|
||||
# 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 typing # noqa: F401
|
||||
import functools # noqa: F401
|
||||
|
||||
import decimal # noqa: F401
|
||||
from datetime import date, datetime # noqa: F401
|
||||
import uuid # noqa: F401
|
||||
|
||||
import frozendict # noqa: F401
|
||||
|
||||
from unit_test_api import schemas # noqa: F401
|
||||
|
||||
|
||||
class EnumWith0DoesNotMatchFalse(
|
||||
schemas.SchemaEnumMakerClsFactory(
|
||||
enum_value_to_name={
|
||||
0: "POSITIVE_0",
|
||||
}
|
||||
),
|
||||
schemas.NumberSchema
|
||||
):
|
||||
"""NOTE: This class is auto generated by OpenAPI Generator.
|
||||
Ref: https://openapi-generator.tech
|
||||
|
||||
Do not edit the class manually.
|
||||
"""
|
||||
|
||||
@classmethod
|
||||
@property
|
||||
def POSITIVE_0(cls):
|
||||
return cls(0)
|
@ -10,17 +10,15 @@
|
||||
"""
|
||||
|
||||
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
|
||||
import uuid # noqa: F401
|
||||
|
||||
import frozendict # noqa: F401
|
||||
|
||||
from unit_test_api import schemas # noqa: F401
|
||||
|
||||
|
||||
|
@ -0,0 +1,42 @@
|
||||
# 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 typing # noqa: F401
|
||||
import functools # noqa: F401
|
||||
|
||||
import decimal # noqa: F401
|
||||
from datetime import date, datetime # noqa: F401
|
||||
import uuid # noqa: F401
|
||||
|
||||
import frozendict # noqa: F401
|
||||
|
||||
from unit_test_api import schemas # noqa: F401
|
||||
|
||||
|
||||
class EnumWith1DoesNotMatchTrue(
|
||||
schemas.SchemaEnumMakerClsFactory(
|
||||
enum_value_to_name={
|
||||
1: "POSITIVE_1",
|
||||
}
|
||||
),
|
||||
schemas.NumberSchema
|
||||
):
|
||||
"""NOTE: This class is auto generated by OpenAPI Generator.
|
||||
Ref: https://openapi-generator.tech
|
||||
|
||||
Do not edit the class manually.
|
||||
"""
|
||||
|
||||
@classmethod
|
||||
@property
|
||||
def POSITIVE_1(cls):
|
||||
return cls(1)
|
@ -10,17 +10,15 @@
|
||||
"""
|
||||
|
||||
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
|
||||
import uuid # noqa: F401
|
||||
|
||||
import frozendict # noqa: F401
|
||||
|
||||
from unit_test_api import schemas # noqa: F401
|
||||
|
||||
|
||||
|
@ -0,0 +1,48 @@
|
||||
# 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 typing # noqa: F401
|
||||
import functools # noqa: F401
|
||||
|
||||
import decimal # noqa: F401
|
||||
from datetime import date, datetime # noqa: F401
|
||||
import uuid # noqa: F401
|
||||
|
||||
import frozendict # noqa: F401
|
||||
|
||||
from unit_test_api import schemas # noqa: F401
|
||||
|
||||
|
||||
class EnumWithEscapedCharacters(
|
||||
schemas.SchemaEnumMakerClsFactory(
|
||||
enum_value_to_name={
|
||||
"foo\nbar": "FOO_BAR",
|
||||
"foo\rbar": "FOO_BAR",
|
||||
}
|
||||
),
|
||||
schemas.StrSchema
|
||||
):
|
||||
"""NOTE: This class is auto generated by OpenAPI Generator.
|
||||
Ref: https://openapi-generator.tech
|
||||
|
||||
Do not edit the class manually.
|
||||
"""
|
||||
|
||||
@classmethod
|
||||
@property
|
||||
def FOO_BAR(cls):
|
||||
return cls("foo\nbar")
|
||||
|
||||
@classmethod
|
||||
@property
|
||||
def FOO_BAR(cls):
|
||||
return cls("foo\rbar")
|
@ -10,17 +10,15 @@
|
||||
"""
|
||||
|
||||
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
|
||||
import uuid # noqa: F401
|
||||
|
||||
import frozendict # noqa: F401
|
||||
|
||||
from unit_test_api import schemas # noqa: F401
|
||||
|
||||
|
||||
|
@ -0,0 +1,42 @@
|
||||
# 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 typing # noqa: F401
|
||||
import functools # noqa: F401
|
||||
|
||||
import decimal # noqa: F401
|
||||
from datetime import date, datetime # noqa: F401
|
||||
import uuid # noqa: F401
|
||||
|
||||
import frozendict # noqa: F401
|
||||
|
||||
from unit_test_api import schemas # noqa: F401
|
||||
|
||||
|
||||
class EnumWithFalseDoesNotMatch0(
|
||||
schemas.SchemaEnumMakerClsFactory(
|
||||
enum_value_to_name={
|
||||
schemas.BoolClass.FALSE: "FALSE",
|
||||
}
|
||||
),
|
||||
schemas.BoolSchema
|
||||
):
|
||||
"""NOTE: This class is auto generated by OpenAPI Generator.
|
||||
Ref: https://openapi-generator.tech
|
||||
|
||||
Do not edit the class manually.
|
||||
"""
|
||||
|
||||
@classmethod
|
||||
@property
|
||||
def FALSE(cls):
|
||||
return cls(schemas.BoolClass.FALSE)
|
@ -10,17 +10,15 @@
|
||||
"""
|
||||
|
||||
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
|
||||
import uuid # noqa: F401
|
||||
|
||||
import frozendict # noqa: F401
|
||||
|
||||
from unit_test_api import schemas # noqa: F401
|
||||
|
||||
|
||||
|
@ -0,0 +1,42 @@
|
||||
# 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 typing # noqa: F401
|
||||
import functools # noqa: F401
|
||||
|
||||
import decimal # noqa: F401
|
||||
from datetime import date, datetime # noqa: F401
|
||||
import uuid # noqa: F401
|
||||
|
||||
import frozendict # noqa: F401
|
||||
|
||||
from unit_test_api import schemas # noqa: F401
|
||||
|
||||
|
||||
class EnumWithTrueDoesNotMatch1(
|
||||
schemas.SchemaEnumMakerClsFactory(
|
||||
enum_value_to_name={
|
||||
schemas.BoolClass.TRUE: "TRUE",
|
||||
}
|
||||
),
|
||||
schemas.BoolSchema
|
||||
):
|
||||
"""NOTE: This class is auto generated by OpenAPI Generator.
|
||||
Ref: https://openapi-generator.tech
|
||||
|
||||
Do not edit the class manually.
|
||||
"""
|
||||
|
||||
@classmethod
|
||||
@property
|
||||
def TRUE(cls):
|
||||
return cls(schemas.BoolClass.TRUE)
|
@ -10,17 +10,15 @@
|
||||
"""
|
||||
|
||||
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
|
||||
import uuid # noqa: F401
|
||||
|
||||
import frozendict # noqa: F401
|
||||
|
||||
from unit_test_api import schemas # noqa: F401
|
||||
|
||||
|
||||
@ -41,21 +39,6 @@ class EnumsInProperties(
|
||||
class properties:
|
||||
|
||||
|
||||
class foo(
|
||||
schemas.SchemaEnumMakerClsFactory(
|
||||
enum_value_to_name={
|
||||
"foo": "FOO",
|
||||
}
|
||||
),
|
||||
schemas.StrSchema
|
||||
):
|
||||
|
||||
@classmethod
|
||||
@property
|
||||
def FOO(cls):
|
||||
return cls("foo")
|
||||
|
||||
|
||||
class bar(
|
||||
schemas.SchemaEnumMakerClsFactory(
|
||||
enum_value_to_name={
|
||||
@ -69,18 +52,47 @@ class EnumsInProperties(
|
||||
@property
|
||||
def BAR(cls):
|
||||
return cls("bar")
|
||||
|
||||
|
||||
class foo(
|
||||
schemas.SchemaEnumMakerClsFactory(
|
||||
enum_value_to_name={
|
||||
"foo": "FOO",
|
||||
}
|
||||
),
|
||||
schemas.StrSchema
|
||||
):
|
||||
|
||||
@classmethod
|
||||
@property
|
||||
def FOO(cls):
|
||||
return cls("foo")
|
||||
__annotations__ = {
|
||||
"bar": bar,
|
||||
"foo": foo,
|
||||
}
|
||||
additional_properties = schemas.AnyTypeSchema
|
||||
|
||||
bar: MetaOapg.properties.bar
|
||||
foo: MetaOapg.properties.foo
|
||||
|
||||
@typing.overload
|
||||
def __getitem__(self, name: typing.Literal["bar"]) -> MetaOapg.properties.bar: ...
|
||||
|
||||
@typing.overload
|
||||
def __getitem__(self, name: typing.Literal["foo"]) -> MetaOapg.properties.foo: ...
|
||||
|
||||
def __getitem__(self, name: str) -> MetaOapg.additional_properties:
|
||||
# dict_instance[name] accessor
|
||||
return super().__getitem__(name)
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
*args: typing.Union[dict, frozendict, ],
|
||||
*args: typing.Union[dict, frozendict.frozendict, ],
|
||||
bar: typing.Union[MetaOapg.properties.bar, str, ],
|
||||
foo: typing.Union[MetaOapg.properties.foo, str, schemas.Unset] = schemas.unset,
|
||||
_configuration: typing.Optional[schemas.Configuration] = None,
|
||||
**kwargs: typing.Union[MetaOapg.additional_properties, dict, frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
**kwargs: typing.Union[MetaOapg.additional_properties, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
) -> 'EnumsInProperties':
|
||||
return super().__new__(
|
||||
cls,
|
||||
|
@ -0,0 +1,104 @@
|
||||
# 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 typing # noqa: F401
|
||||
import functools # noqa: F401
|
||||
|
||||
import decimal # noqa: F401
|
||||
from datetime import date, datetime # noqa: F401
|
||||
import uuid # noqa: F401
|
||||
|
||||
import frozendict # noqa: F401
|
||||
|
||||
from unit_test_api import schemas # noqa: F401
|
||||
|
||||
|
||||
class EnumsInProperties(
|
||||
schemas.DictSchema
|
||||
):
|
||||
"""NOTE: This class is auto generated by OpenAPI Generator.
|
||||
Ref: https://openapi-generator.tech
|
||||
|
||||
Do not edit the class manually.
|
||||
"""
|
||||
|
||||
|
||||
class MetaOapg:
|
||||
required = {
|
||||
"bar",
|
||||
}
|
||||
class properties:
|
||||
|
||||
|
||||
class bar(
|
||||
schemas.SchemaEnumMakerClsFactory(
|
||||
enum_value_to_name={
|
||||
"bar": "BAR",
|
||||
}
|
||||
),
|
||||
schemas.StrSchema
|
||||
):
|
||||
|
||||
@classmethod
|
||||
@property
|
||||
def BAR(cls):
|
||||
return cls("bar")
|
||||
|
||||
|
||||
class foo(
|
||||
schemas.SchemaEnumMakerClsFactory(
|
||||
enum_value_to_name={
|
||||
"foo": "FOO",
|
||||
}
|
||||
),
|
||||
schemas.StrSchema
|
||||
):
|
||||
|
||||
@classmethod
|
||||
@property
|
||||
def FOO(cls):
|
||||
return cls("foo")
|
||||
__annotations__ = {
|
||||
"bar": bar,
|
||||
"foo": foo,
|
||||
}
|
||||
additional_properties = schemas.AnyTypeSchema
|
||||
|
||||
bar: MetaOapg.properties.bar
|
||||
foo: MetaOapg.properties.foo
|
||||
|
||||
@typing.overload
|
||||
def __getitem__(self, name: typing.Literal["bar"]) -> MetaOapg.properties.bar: ...
|
||||
|
||||
@typing.overload
|
||||
def __getitem__(self, name: typing.Literal["foo"]) -> MetaOapg.properties.foo: ...
|
||||
|
||||
def __getitem__(self, name: str) -> MetaOapg.additional_properties:
|
||||
# dict_instance[name] accessor
|
||||
return super().__getitem__(name)
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
*args: typing.Union[dict, frozendict.frozendict, ],
|
||||
bar: typing.Union[MetaOapg.properties.bar, str, ],
|
||||
foo: typing.Union[MetaOapg.properties.foo, str, schemas.Unset] = schemas.unset,
|
||||
_configuration: typing.Optional[schemas.Configuration] = None,
|
||||
**kwargs: typing.Union[MetaOapg.additional_properties, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
) -> 'EnumsInProperties':
|
||||
return super().__new__(
|
||||
cls,
|
||||
*args,
|
||||
bar=bar,
|
||||
foo=foo,
|
||||
_configuration=_configuration,
|
||||
**kwargs,
|
||||
)
|
@ -10,17 +10,15 @@
|
||||
"""
|
||||
|
||||
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
|
||||
import uuid # noqa: F401
|
||||
|
||||
import frozendict # noqa: F401
|
||||
|
||||
from unit_test_api import schemas # noqa: F401
|
||||
|
||||
|
||||
@ -47,12 +45,16 @@ class ForbiddenProperty(
|
||||
additional_properties = schemas.AnyTypeSchema
|
||||
not_schema = schemas.AnyTypeSchema
|
||||
|
||||
|
||||
def __getitem__(self, name: str) -> MetaOapg.additional_properties:
|
||||
# dict_instance[name] accessor
|
||||
return super().__getitem__(name)
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
*args: typing.Union[dict, frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
*args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
_configuration: typing.Optional[schemas.Configuration] = None,
|
||||
**kwargs: typing.Union[MetaOapg.additional_properties, dict, frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
**kwargs: typing.Union[MetaOapg.additional_properties, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
) -> 'foo':
|
||||
return super().__new__(
|
||||
cls,
|
||||
@ -60,17 +62,27 @@ class ForbiddenProperty(
|
||||
_configuration=_configuration,
|
||||
**kwargs,
|
||||
)
|
||||
__annotations__ = {
|
||||
"foo": foo,
|
||||
}
|
||||
additional_properties = schemas.AnyTypeSchema
|
||||
|
||||
|
||||
foo: MetaOapg.properties.foo
|
||||
|
||||
@typing.overload
|
||||
def __getitem__(self, name: typing.Literal["foo"]) -> MetaOapg.properties.foo: ...
|
||||
|
||||
def __getitem__(self, name: str) -> MetaOapg.additional_properties:
|
||||
# dict_instance[name] accessor
|
||||
return super().__getitem__(name)
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
*args: typing.Union[dict, frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
foo: typing.Union[MetaOapg.properties.foo, dict, frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, schemas.Unset] = schemas.unset,
|
||||
*args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
foo: typing.Union[MetaOapg.properties.foo, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, schemas.Unset] = schemas.unset,
|
||||
_configuration: typing.Optional[schemas.Configuration] = None,
|
||||
**kwargs: typing.Union[MetaOapg.additional_properties, dict, frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
**kwargs: typing.Union[MetaOapg.additional_properties, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
) -> 'ForbiddenProperty':
|
||||
return super().__new__(
|
||||
cls,
|
||||
|
@ -0,0 +1,93 @@
|
||||
# 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 typing # noqa: F401
|
||||
import functools # noqa: F401
|
||||
|
||||
import decimal # noqa: F401
|
||||
from datetime import date, datetime # noqa: F401
|
||||
import uuid # noqa: F401
|
||||
|
||||
import frozendict # noqa: F401
|
||||
|
||||
from unit_test_api import schemas # noqa: F401
|
||||
|
||||
|
||||
class ForbiddenProperty(
|
||||
schemas.AnyTypeSchema,
|
||||
):
|
||||
"""NOTE: This class is auto generated by OpenAPI Generator.
|
||||
Ref: https://openapi-generator.tech
|
||||
|
||||
Do not edit the class manually.
|
||||
"""
|
||||
|
||||
|
||||
class MetaOapg:
|
||||
class properties:
|
||||
|
||||
|
||||
class foo(
|
||||
schemas.ComposedSchema,
|
||||
):
|
||||
|
||||
|
||||
class MetaOapg:
|
||||
additional_properties = schemas.AnyTypeSchema
|
||||
not_schema = schemas.AnyTypeSchema
|
||||
|
||||
|
||||
def __getitem__(self, name: str) -> MetaOapg.additional_properties:
|
||||
# dict_instance[name] accessor
|
||||
return super().__getitem__(name)
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
*args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
_configuration: typing.Optional[schemas.Configuration] = None,
|
||||
**kwargs: typing.Union[MetaOapg.additional_properties, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
) -> 'foo':
|
||||
return super().__new__(
|
||||
cls,
|
||||
*args,
|
||||
_configuration=_configuration,
|
||||
**kwargs,
|
||||
)
|
||||
__annotations__ = {
|
||||
"foo": foo,
|
||||
}
|
||||
additional_properties = schemas.AnyTypeSchema
|
||||
|
||||
|
||||
foo: MetaOapg.properties.foo
|
||||
|
||||
@typing.overload
|
||||
def __getitem__(self, name: typing.Literal["foo"]) -> MetaOapg.properties.foo: ...
|
||||
|
||||
def __getitem__(self, name: str) -> MetaOapg.additional_properties:
|
||||
# dict_instance[name] accessor
|
||||
return super().__getitem__(name)
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
*args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
foo: typing.Union[MetaOapg.properties.foo, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, schemas.Unset] = schemas.unset,
|
||||
_configuration: typing.Optional[schemas.Configuration] = None,
|
||||
**kwargs: typing.Union[MetaOapg.additional_properties, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
) -> 'ForbiddenProperty':
|
||||
return super().__new__(
|
||||
cls,
|
||||
*args,
|
||||
foo=foo,
|
||||
_configuration=_configuration,
|
||||
**kwargs,
|
||||
)
|
@ -10,16 +10,14 @@
|
||||
"""
|
||||
|
||||
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
|
||||
import uuid # noqa: F401
|
||||
|
||||
import frozendict # noqa: F401
|
||||
|
||||
from unit_test_api import schemas # noqa: F401
|
||||
HostnameFormat = schemas.AnyTypeSchema
|
||||
|
@ -0,0 +1,23 @@
|
||||
# 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 typing # noqa: F401
|
||||
import functools # noqa: F401
|
||||
|
||||
import decimal # noqa: F401
|
||||
from datetime import date, datetime # noqa: F401
|
||||
import uuid # noqa: F401
|
||||
|
||||
import frozendict # noqa: F401
|
||||
|
||||
from unit_test_api import schemas # noqa: F401
|
||||
HostnameFormat = schemas.AnyTypeSchema
|
@ -10,16 +10,14 @@
|
||||
"""
|
||||
|
||||
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
|
||||
import uuid # noqa: F401
|
||||
|
||||
import frozendict # noqa: F401
|
||||
|
||||
from unit_test_api import schemas # noqa: F401
|
||||
IntegerTypeMatchesIntegers = schemas.IntSchema
|
||||
|
@ -0,0 +1,23 @@
|
||||
# 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 typing # noqa: F401
|
||||
import functools # noqa: F401
|
||||
|
||||
import decimal # noqa: F401
|
||||
from datetime import date, datetime # noqa: F401
|
||||
import uuid # noqa: F401
|
||||
|
||||
import frozendict # noqa: F401
|
||||
|
||||
from unit_test_api import schemas # noqa: F401
|
||||
IntegerTypeMatchesIntegers = schemas.IntSchema
|
@ -10,17 +10,15 @@
|
||||
"""
|
||||
|
||||
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
|
||||
import uuid # noqa: F401
|
||||
|
||||
import frozendict # noqa: F401
|
||||
|
||||
from unit_test_api import schemas # noqa: F401
|
||||
|
||||
|
||||
|
@ -0,0 +1,33 @@
|
||||
# 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 typing # noqa: F401
|
||||
import functools # noqa: F401
|
||||
|
||||
import decimal # noqa: F401
|
||||
from datetime import date, datetime # noqa: F401
|
||||
import uuid # noqa: F401
|
||||
|
||||
import frozendict # noqa: F401
|
||||
|
||||
from unit_test_api import schemas # noqa: F401
|
||||
|
||||
|
||||
class InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf(
|
||||
schemas.IntSchema
|
||||
):
|
||||
"""NOTE: This class is auto generated by OpenAPI Generator.
|
||||
Ref: https://openapi-generator.tech
|
||||
|
||||
Do not edit the class manually.
|
||||
"""
|
||||
pass
|
@ -10,17 +10,15 @@
|
||||
"""
|
||||
|
||||
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
|
||||
import uuid # noqa: F401
|
||||
|
||||
import frozendict # noqa: F401
|
||||
|
||||
from unit_test_api import schemas # noqa: F401
|
||||
|
||||
|
||||
@ -45,17 +43,27 @@ class InvalidStringValueForDefault(
|
||||
|
||||
class MetaOapg:
|
||||
min_length = 4
|
||||
__annotations__ = {
|
||||
"bar": bar,
|
||||
}
|
||||
additional_properties = schemas.AnyTypeSchema
|
||||
|
||||
|
||||
bar: MetaOapg.properties.bar
|
||||
|
||||
@typing.overload
|
||||
def __getitem__(self, name: typing.Literal["bar"]) -> MetaOapg.properties.bar: ...
|
||||
|
||||
def __getitem__(self, name: str) -> MetaOapg.additional_properties:
|
||||
# dict_instance[name] accessor
|
||||
return super().__getitem__(name)
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
*args: typing.Union[dict, frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
*args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
bar: typing.Union[MetaOapg.properties.bar, str, schemas.Unset] = schemas.unset,
|
||||
_configuration: typing.Optional[schemas.Configuration] = None,
|
||||
**kwargs: typing.Union[MetaOapg.additional_properties, dict, frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
**kwargs: typing.Union[MetaOapg.additional_properties, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
) -> 'InvalidStringValueForDefault':
|
||||
return super().__new__(
|
||||
cls,
|
||||
|
@ -0,0 +1,71 @@
|
||||
# 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 typing # noqa: F401
|
||||
import functools # noqa: F401
|
||||
|
||||
import decimal # noqa: F401
|
||||
from datetime import date, datetime # noqa: F401
|
||||
import uuid # noqa: F401
|
||||
|
||||
import frozendict # noqa: F401
|
||||
|
||||
from unit_test_api import schemas # noqa: F401
|
||||
|
||||
|
||||
class InvalidStringValueForDefault(
|
||||
schemas.AnyTypeSchema,
|
||||
):
|
||||
"""NOTE: This class is auto generated by OpenAPI Generator.
|
||||
Ref: https://openapi-generator.tech
|
||||
|
||||
Do not edit the class manually.
|
||||
"""
|
||||
|
||||
|
||||
class MetaOapg:
|
||||
class properties:
|
||||
|
||||
|
||||
class bar(
|
||||
schemas.StrSchema
|
||||
):
|
||||
pass
|
||||
__annotations__ = {
|
||||
"bar": bar,
|
||||
}
|
||||
additional_properties = schemas.AnyTypeSchema
|
||||
|
||||
|
||||
bar: MetaOapg.properties.bar
|
||||
|
||||
@typing.overload
|
||||
def __getitem__(self, name: typing.Literal["bar"]) -> MetaOapg.properties.bar: ...
|
||||
|
||||
def __getitem__(self, name: str) -> MetaOapg.additional_properties:
|
||||
# dict_instance[name] accessor
|
||||
return super().__getitem__(name)
|
||||
|
||||
def __new__(
|
||||
cls,
|
||||
*args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
bar: typing.Union[MetaOapg.properties.bar, str, schemas.Unset] = schemas.unset,
|
||||
_configuration: typing.Optional[schemas.Configuration] = None,
|
||||
**kwargs: typing.Union[MetaOapg.additional_properties, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes, ],
|
||||
) -> 'InvalidStringValueForDefault':
|
||||
return super().__new__(
|
||||
cls,
|
||||
*args,
|
||||
bar=bar,
|
||||
_configuration=_configuration,
|
||||
**kwargs,
|
||||
)
|
@ -10,16 +10,14 @@
|
||||
"""
|
||||
|
||||
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
|
||||
import uuid # noqa: F401
|
||||
|
||||
import frozendict # noqa: F401
|
||||
|
||||
from unit_test_api import schemas # noqa: F401
|
||||
Ipv4Format = schemas.AnyTypeSchema
|
||||
|
@ -0,0 +1,23 @@
|
||||
# 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 typing # noqa: F401
|
||||
import functools # noqa: F401
|
||||
|
||||
import decimal # noqa: F401
|
||||
from datetime import date, datetime # noqa: F401
|
||||
import uuid # noqa: F401
|
||||
|
||||
import frozendict # noqa: F401
|
||||
|
||||
from unit_test_api import schemas # noqa: F401
|
||||
Ipv4Format = schemas.AnyTypeSchema
|
@ -10,16 +10,14 @@
|
||||
"""
|
||||
|
||||
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
|
||||
import uuid # noqa: F401
|
||||
|
||||
import frozendict # noqa: F401
|
||||
|
||||
from unit_test_api import schemas # noqa: F401
|
||||
Ipv6Format = schemas.AnyTypeSchema
|
||||
|
@ -0,0 +1,23 @@
|
||||
# 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 typing # noqa: F401
|
||||
import functools # noqa: F401
|
||||
|
||||
import decimal # noqa: F401
|
||||
from datetime import date, datetime # noqa: F401
|
||||
import uuid # noqa: F401
|
||||
|
||||
import frozendict # noqa: F401
|
||||
|
||||
from unit_test_api import schemas # noqa: F401
|
||||
Ipv6Format = schemas.AnyTypeSchema
|
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