forked from loafle/openapi-generator-original
[python-experimental] reduces python version (#13481)
* Removes classmethod property combinations * Changes python version to 3.8 * Changes python version to 3.7 * Tests fixed * Samples updated * Adds getAddSuffixToDuplicateOperationNickname and uses it in python-exp, samples regenerated * test_paths regenerated * Fixes bug * Adds typing_extensions requirement
This commit is contained in:
parent
fa51d8b6b3
commit
5f9910dcab
@ -10,7 +10,7 @@ title: Documentation for the python-experimental Generator
|
|||||||
| generator stability | EXPERIMENTAL | |
|
| generator stability | EXPERIMENTAL | |
|
||||||
| generator type | CLIENT | |
|
| generator type | CLIENT | |
|
||||||
| generator language | Python | |
|
| generator language | Python | |
|
||||||
| generator language version | >=3.9 | |
|
| generator language version | >=3.7 | |
|
||||||
| generator default templating engine | handlebars | |
|
| generator default templating engine | handlebars | |
|
||||||
| helpTxt | Generates a Python client library<br /><br />Features in this generator:<br />- type hints on endpoints and model creation<br />- model parameter names use the spec defined keys and cases<br />- robust composition (oneOf/anyOf/allOf/not) where payload data is stored in one instance only<br />- endpoint parameter names use the spec defined keys and cases<br />- inline schemas are supported at any location including composition<br />- multiple content types supported in request body and response bodies<br />- run time type checking<br />- Sending/receiving decimals as strings supported with type:string format: number -> DecimalSchema<br />- Sending/receiving uuids as strings supported with type:string format: uuid -> UUIDSchema<br />- quicker load time for python modules (a single endpoint can be imported and used without loading others)<br />- all instances of schemas dynamically inherit from all matching schemas so one can use isinstance to check if validation passed<br />- composed schemas with type constraints supported (type:object + oneOf/anyOf/allOf)<br />- schemas are not coerced/cast. For example string + date are both stored as string, and there is a date accessor<br /> - Exceptions: int/float is stored as Decimal, When receiving data from headers it will start as str and may need to be cast for example to int | |
|
| helpTxt | Generates a Python client library<br /><br />Features in this generator:<br />- type hints on endpoints and model creation<br />- model parameter names use the spec defined keys and cases<br />- robust composition (oneOf/anyOf/allOf/not) where payload data is stored in one instance only<br />- endpoint parameter names use the spec defined keys and cases<br />- inline schemas are supported at any location including composition<br />- multiple content types supported in request body and response bodies<br />- run time type checking<br />- Sending/receiving decimals as strings supported with type:string format: number -> DecimalSchema<br />- Sending/receiving uuids as strings supported with type:string format: uuid -> UUIDSchema<br />- quicker load time for python modules (a single endpoint can be imported and used without loading others)<br />- all instances of schemas dynamically inherit from all matching schemas so one can use isinstance to check if validation passed<br />- composed schemas with type constraints supported (type:object + oneOf/anyOf/allOf)<br />- schemas are not coerced/cast. For example string + date are both stored as string, and there is a date accessor<br /> - Exceptions: int/float is stored as Decimal, When receiving data from headers it will start as str and may need to be cast for example to int | |
|
||||||
|
|
||||||
|
@ -328,4 +328,6 @@ public interface CodegenConfig {
|
|||||||
List<VendorExtension> getSupportedVendorExtensions();
|
List<VendorExtension> getSupportedVendorExtensions();
|
||||||
|
|
||||||
boolean getUseInlineModelResolver();
|
boolean getUseInlineModelResolver();
|
||||||
|
|
||||||
|
boolean getAddSuffixToDuplicateOperationNicknames();
|
||||||
}
|
}
|
||||||
|
@ -297,6 +297,12 @@ public class DefaultCodegen implements CodegenConfig {
|
|||||||
// from deeper schema defined locations
|
// from deeper schema defined locations
|
||||||
protected boolean addSchemaImportsFromV3SpecLocations = false;
|
protected boolean addSchemaImportsFromV3SpecLocations = false;
|
||||||
|
|
||||||
|
protected boolean addSuffixToDuplicateOperationNicknames = true;
|
||||||
|
|
||||||
|
public boolean getAddSuffixToDuplicateOperationNicknames() {
|
||||||
|
return addSuffixToDuplicateOperationNicknames;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<CliOption> cliOptions() {
|
public List<CliOption> cliOptions() {
|
||||||
return cliOptions;
|
return cliOptions;
|
||||||
|
@ -1200,16 +1200,18 @@ public class DefaultGenerator implements Generator {
|
|||||||
objs.setClassname(config.toApiName(tag));
|
objs.setClassname(config.toApiName(tag));
|
||||||
objs.setPathPrefix(config.toApiVarName(tag));
|
objs.setPathPrefix(config.toApiVarName(tag));
|
||||||
|
|
||||||
// check for operationId uniqueness
|
// check for nickname uniqueness
|
||||||
Set<String> opIds = new HashSet<>();
|
if (config.getAddSuffixToDuplicateOperationNicknames()) {
|
||||||
int counter = 0;
|
Set<String> opIds = new HashSet<>();
|
||||||
for (CodegenOperation op : ops) {
|
int counter = 0;
|
||||||
String opId = op.nickname;
|
for (CodegenOperation op : ops) {
|
||||||
if (opIds.contains(opId)) {
|
String opId = op.nickname;
|
||||||
counter++;
|
if (opIds.contains(opId)) {
|
||||||
op.nickname += "_" + counter;
|
counter++;
|
||||||
|
op.nickname += "_" + counter;
|
||||||
|
}
|
||||||
|
opIds.add(opId);
|
||||||
}
|
}
|
||||||
opIds.add(opId);
|
|
||||||
}
|
}
|
||||||
objs.setOperation(ops);
|
objs.setOperation(ops);
|
||||||
|
|
||||||
|
@ -20,7 +20,6 @@ import com.github.curiousoddman.rgxgen.RgxGen;
|
|||||||
import com.github.curiousoddman.rgxgen.config.RgxGenOption;
|
import com.github.curiousoddman.rgxgen.config.RgxGenOption;
|
||||||
import com.github.curiousoddman.rgxgen.config.RgxGenProperties;
|
import com.github.curiousoddman.rgxgen.config.RgxGenProperties;
|
||||||
import com.google.common.base.CaseFormat;
|
import com.google.common.base.CaseFormat;
|
||||||
import io.swagger.v3.oas.annotations.tags.Tags;
|
|
||||||
import io.swagger.v3.oas.models.OpenAPI;
|
import io.swagger.v3.oas.models.OpenAPI;
|
||||||
import io.swagger.v3.oas.models.Operation;
|
import io.swagger.v3.oas.models.Operation;
|
||||||
import io.swagger.v3.oas.models.PathItem;
|
import io.swagger.v3.oas.models.PathItem;
|
||||||
@ -112,6 +111,7 @@ public class PythonExperimentalClientCodegen extends AbstractPythonCodegen {
|
|||||||
addSchemaImportsFromV3SpecLocations = true;
|
addSchemaImportsFromV3SpecLocations = true;
|
||||||
sortModelPropertiesByRequiredFlag = Boolean.TRUE;
|
sortModelPropertiesByRequiredFlag = Boolean.TRUE;
|
||||||
sortParamsByRequiredFlag = Boolean.TRUE;
|
sortParamsByRequiredFlag = Boolean.TRUE;
|
||||||
|
addSuffixToDuplicateOperationNicknames = false;
|
||||||
|
|
||||||
modifyFeatureSet(features -> features
|
modifyFeatureSet(features -> features
|
||||||
.includeSchemaSupportFeatures(
|
.includeSchemaSupportFeatures(
|
||||||
@ -2638,7 +2638,7 @@ public class PythonExperimentalClientCodegen extends AbstractPythonCodegen {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String generatorLanguageVersion() { return ">=3.9"; };
|
public String generatorLanguageVersion() { return ">=3.7"; };
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void preprocessOpenAPI(OpenAPI openAPI) {
|
public void preprocessOpenAPI(OpenAPI openAPI) {
|
||||||
|
@ -18,8 +18,6 @@ For more information, please visit [{{{infoUrl}}}]({{{infoUrl}}})
|
|||||||
## Requirements.
|
## Requirements.
|
||||||
|
|
||||||
Python {{generatorLanguageVersion}}
|
Python {{generatorLanguageVersion}}
|
||||||
v3.9 is needed so one can combine classmethod and property decorators to define
|
|
||||||
object schema properties as classes
|
|
||||||
|
|
||||||
## Migration from other generators like python and python-legacy
|
## Migration from other generators like python and python-legacy
|
||||||
|
|
||||||
@ -60,6 +58,16 @@ object schema properties as classes
|
|||||||
- A type hint is also generated for additionalProperties accessed using this method
|
- A type hint is also generated for additionalProperties accessed using this method
|
||||||
- So you will need to update you code to use some_instance['optionalProp'] to access optional property
|
- So you will need to update you code to use some_instance['optionalProp'] to access optional property
|
||||||
and additionalProperty values
|
and additionalProperty values
|
||||||
|
8. The location of the api classes has changed
|
||||||
|
- Api classes are located in your_package.apis.tags.some_api
|
||||||
|
- This change was made to eliminate redundant code generation
|
||||||
|
- Legacy generators generated the same endpoint twice if it had > 1 tag on it
|
||||||
|
- This generator defines an endpoint in one class, then inherits that class to generate
|
||||||
|
apis by tags and by paths
|
||||||
|
- This change reduces code and allows quicker run time if you use the path apis
|
||||||
|
- path apis are at your_package.apis.paths.some_path
|
||||||
|
- Those apis will only load their needed models, which is less to load than all of the resources needed in a tag api
|
||||||
|
- So you will need to update your import paths to the api classes
|
||||||
|
|
||||||
### Why are Oapg and _oapg used in class and method names?
|
### Why are Oapg and _oapg used in class and method names?
|
||||||
Classes can have arbitrarily named properties set on them
|
Classes can have arbitrarily named properties set on them
|
||||||
|
@ -41,7 +41,7 @@ class ApiTestMixin:
|
|||||||
)
|
)
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def headers_for_content_type(content_type: str) -> dict[str, str]:
|
def headers_for_content_type(content_type: str) -> typing.Dict[str, str]:
|
||||||
return {'content-type': content_type}
|
return {'content-type': content_type}
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
@ -50,7 +50,7 @@ class ApiTestMixin:
|
|||||||
body: typing.Union[str, bytes],
|
body: typing.Union[str, bytes],
|
||||||
status: int = 200,
|
status: int = 200,
|
||||||
content_type: str = json_content_type,
|
content_type: str = json_content_type,
|
||||||
headers: typing.Optional[dict[str, str]] = None,
|
headers: typing.Optional[typing.Dict[str, str]] = None,
|
||||||
preload_content: bool = True
|
preload_content: bool = True
|
||||||
) -> urllib3.HTTPResponse:
|
) -> urllib3.HTTPResponse:
|
||||||
if headers is None:
|
if headers is None:
|
||||||
|
@ -13,6 +13,7 @@ from multiprocessing.pool import ThreadPool
|
|||||||
import re
|
import re
|
||||||
import tempfile
|
import tempfile
|
||||||
import typing
|
import typing
|
||||||
|
import typing_extensions
|
||||||
import urllib3
|
import urllib3
|
||||||
from urllib3._collections import HTTPHeaderDict
|
from urllib3._collections import HTTPHeaderDict
|
||||||
from urllib.parse import urlparse, quote
|
from urllib.parse import urlparse, quote
|
||||||
@ -704,7 +705,7 @@ class HeaderParameter(ParameterBase, StyleSimpleSerializer):
|
|||||||
)
|
)
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def __to_headers(in_data: typing.Tuple[typing.Tuple[str, str], ...]) -> HTTPHeaderDict[str, str]:
|
def __to_headers(in_data: typing.Tuple[typing.Tuple[str, str], ...]) -> HTTPHeaderDict:
|
||||||
data = tuple(t for t in in_data if t)
|
data = tuple(t for t in in_data if t)
|
||||||
headers = HTTPHeaderDict()
|
headers = HTTPHeaderDict()
|
||||||
if not data:
|
if not data:
|
||||||
@ -716,7 +717,7 @@ class HeaderParameter(ParameterBase, StyleSimpleSerializer):
|
|||||||
self,
|
self,
|
||||||
in_data: typing.Union[
|
in_data: typing.Union[
|
||||||
Schema, Decimal, int, float, str, date, datetime, None, bool, list, tuple, dict, frozendict.frozendict]
|
Schema, Decimal, int, float, str, date, datetime, None, bool, list, tuple, dict, frozendict.frozendict]
|
||||||
) -> HTTPHeaderDict[str, str]:
|
) -> HTTPHeaderDict:
|
||||||
if self.schema:
|
if self.schema:
|
||||||
cast_in_data = self.schema(in_data)
|
cast_in_data = self.schema(in_data)
|
||||||
cast_in_data = self._json_encoder.default(cast_in_data)
|
cast_in_data = self._json_encoder.default(cast_in_data)
|
||||||
@ -1270,7 +1271,7 @@ class Api:
|
|||||||
self.api_client = api_client
|
self.api_client = api_client
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def _verify_typed_dict_inputs_oapg(cls: typing.Type[typing.TypedDict], data: typing.Dict[str, typing.Any]):
|
def _verify_typed_dict_inputs_oapg(cls: typing.Type[typing_extensions.TypedDict], data: typing.Dict[str, typing.Any]):
|
||||||
"""
|
"""
|
||||||
Ensures that:
|
Ensures that:
|
||||||
- required keys are present
|
- required keys are present
|
||||||
@ -1342,9 +1343,9 @@ class Api:
|
|||||||
return host
|
return host
|
||||||
|
|
||||||
|
|
||||||
class SerializedRequestBody(typing.TypedDict, total=False):
|
class SerializedRequestBody(typing_extensions.TypedDict, total=False):
|
||||||
body: typing.Union[str, bytes]
|
body: typing.Union[str, bytes]
|
||||||
fields: typing.Tuple[typing.Union[RequestField, tuple[str, str]], ...]
|
fields: typing.Tuple[typing.Union[RequestField, typing.Tuple[str, str]], ...]
|
||||||
|
|
||||||
|
|
||||||
class RequestBody(StyleFormSerializer, JSONDetector):
|
class RequestBody(StyleFormSerializer, JSONDetector):
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
import typing
|
import typing_extensions
|
||||||
|
|
||||||
from {{packageName}}.paths import PathValues
|
from {{packageName}}.paths import PathValues
|
||||||
{{#each pathModuleToApiClassname}}
|
{{#each pathModuleToApiClassname}}
|
||||||
from {{packageName}}.apis.paths.{{@key}} import {{this}}
|
from {{packageName}}.apis.paths.{{@key}} import {{this}}
|
||||||
{{/each}}
|
{{/each}}
|
||||||
|
|
||||||
PathToApi = typing.TypedDict(
|
PathToApi = typing_extensions.TypedDict(
|
||||||
'PathToApi',
|
'PathToApi',
|
||||||
{
|
{
|
||||||
{{#each pathEnumToApiClassname}}
|
{{#each pathEnumToApiClassname}}
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
import typing
|
import typing_extensions
|
||||||
|
|
||||||
from {{packageName}}.apis.tags import TagValues
|
from {{packageName}}.apis.tags import TagValues
|
||||||
{{#each tagModuleNameToApiClassname}}
|
{{#each tagModuleNameToApiClassname}}
|
||||||
from {{packageName}}.apis.tags.{{@key}} import {{this}}
|
from {{packageName}}.apis.tags.{{@key}} import {{this}}
|
||||||
{{/each}}
|
{{/each}}
|
||||||
|
|
||||||
TagToApi = typing.TypedDict(
|
TagToApi = typing_extensions.TypedDict(
|
||||||
'TagToApi',
|
'TagToApi',
|
||||||
{
|
{
|
||||||
{{#each tagEnumToApiClassname}}
|
{{#each tagEnumToApiClassname}}
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
{{>partial_header}}
|
{{>partial_header}}
|
||||||
|
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
|
import typing_extensions
|
||||||
import urllib3
|
import urllib3
|
||||||
{{#with operation}}
|
{{#with operation}}
|
||||||
{{#or headerParams bodyParam produces}}
|
{{#or headerParams bodyParam produces}}
|
||||||
@ -27,7 +28,7 @@ from . import path
|
|||||||
{{/with}}
|
{{/with}}
|
||||||
{{/each}}
|
{{/each}}
|
||||||
{{#unless isStub}}
|
{{#unless isStub}}
|
||||||
RequestRequiredQueryParams = typing.TypedDict(
|
RequestRequiredQueryParams = typing_extensions.TypedDict(
|
||||||
'RequestRequiredQueryParams',
|
'RequestRequiredQueryParams',
|
||||||
{
|
{
|
||||||
{{#each queryParams}}
|
{{#each queryParams}}
|
||||||
@ -37,7 +38,7 @@ RequestRequiredQueryParams = typing.TypedDict(
|
|||||||
{{/each}}
|
{{/each}}
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
RequestOptionalQueryParams = typing.TypedDict(
|
RequestOptionalQueryParams = typing_extensions.TypedDict(
|
||||||
'RequestOptionalQueryParams',
|
'RequestOptionalQueryParams',
|
||||||
{
|
{
|
||||||
{{#each queryParams}}
|
{{#each queryParams}}
|
||||||
@ -67,7 +68,7 @@ class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams)
|
|||||||
{{/with}}
|
{{/with}}
|
||||||
{{/each}}
|
{{/each}}
|
||||||
{{#unless isStub}}
|
{{#unless isStub}}
|
||||||
RequestRequiredHeaderParams = typing.TypedDict(
|
RequestRequiredHeaderParams = typing_extensions.TypedDict(
|
||||||
'RequestRequiredHeaderParams',
|
'RequestRequiredHeaderParams',
|
||||||
{
|
{
|
||||||
{{#each headerParams}}
|
{{#each headerParams}}
|
||||||
@ -77,7 +78,7 @@ RequestRequiredHeaderParams = typing.TypedDict(
|
|||||||
{{/each}}
|
{{/each}}
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
RequestOptionalHeaderParams = typing.TypedDict(
|
RequestOptionalHeaderParams = typing_extensions.TypedDict(
|
||||||
'RequestOptionalHeaderParams',
|
'RequestOptionalHeaderParams',
|
||||||
{
|
{
|
||||||
{{#each headerParams}}
|
{{#each headerParams}}
|
||||||
@ -107,7 +108,7 @@ class RequestHeaderParams(RequestRequiredHeaderParams, RequestOptionalHeaderPara
|
|||||||
{{/with}}
|
{{/with}}
|
||||||
{{/each}}
|
{{/each}}
|
||||||
{{#unless isStub}}
|
{{#unless isStub}}
|
||||||
RequestRequiredPathParams = typing.TypedDict(
|
RequestRequiredPathParams = typing_extensions.TypedDict(
|
||||||
'RequestRequiredPathParams',
|
'RequestRequiredPathParams',
|
||||||
{
|
{
|
||||||
{{#each pathParams}}
|
{{#each pathParams}}
|
||||||
@ -117,7 +118,7 @@ RequestRequiredPathParams = typing.TypedDict(
|
|||||||
{{/each}}
|
{{/each}}
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
RequestOptionalPathParams = typing.TypedDict(
|
RequestOptionalPathParams = typing_extensions.TypedDict(
|
||||||
'RequestOptionalPathParams',
|
'RequestOptionalPathParams',
|
||||||
{
|
{
|
||||||
{{#each pathParams}}
|
{{#each pathParams}}
|
||||||
@ -147,7 +148,7 @@ class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams):
|
|||||||
{{/with}}
|
{{/with}}
|
||||||
{{/each}}
|
{{/each}}
|
||||||
{{#unless isStub}}
|
{{#unless isStub}}
|
||||||
RequestRequiredCookieParams = typing.TypedDict(
|
RequestRequiredCookieParams = typing_extensions.TypedDict(
|
||||||
'RequestRequiredCookieParams',
|
'RequestRequiredCookieParams',
|
||||||
{
|
{
|
||||||
{{#each cookieParams}}
|
{{#each cookieParams}}
|
||||||
@ -157,7 +158,7 @@ RequestRequiredCookieParams = typing.TypedDict(
|
|||||||
{{/each}}
|
{{/each}}
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
RequestOptionalCookieParams = typing.TypedDict(
|
RequestOptionalCookieParams = typing_extensions.TypedDict(
|
||||||
'RequestOptionalCookieParams',
|
'RequestOptionalCookieParams',
|
||||||
{
|
{
|
||||||
{{#each cookieParams}}
|
{{#each cookieParams}}
|
||||||
@ -278,7 +279,7 @@ _servers = (
|
|||||||
{{/each}}
|
{{/each}}
|
||||||
{{#unless isStub}}
|
{{#unless isStub}}
|
||||||
{{#if responseHeaders}}
|
{{#if responseHeaders}}
|
||||||
ResponseHeadersFor{{code}} = typing.TypedDict(
|
ResponseHeadersFor{{code}} = typing_extensions.TypedDict(
|
||||||
'ResponseHeadersFor{{code}}',
|
'ResponseHeadersFor{{code}}',
|
||||||
{
|
{
|
||||||
{{#each responseHeaders}}
|
{{#each responseHeaders}}
|
||||||
|
@ -19,8 +19,7 @@
|
|||||||
{{#if allOf}}
|
{{#if allOf}}
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
@property
|
@functools.lru_cache()
|
||||||
@functools.cache
|
|
||||||
def all_of(cls):
|
def all_of(cls):
|
||||||
# we need this here to make our import statements work
|
# we need this here to make our import statements work
|
||||||
# we must store _composed_schemas in here so the code is only run
|
# we must store _composed_schemas in here so the code is only run
|
||||||
@ -46,8 +45,7 @@ def all_of(cls):
|
|||||||
{{#if oneOf}}
|
{{#if oneOf}}
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
@property
|
@functools.lru_cache()
|
||||||
@functools.cache
|
|
||||||
def one_of(cls):
|
def one_of(cls):
|
||||||
# we need this here to make our import statements work
|
# we need this here to make our import statements work
|
||||||
# we must store _composed_schemas in here so the code is only run
|
# we must store _composed_schemas in here so the code is only run
|
||||||
@ -73,8 +71,7 @@ def one_of(cls):
|
|||||||
{{#if anyOf}}
|
{{#if anyOf}}
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
@property
|
@functools.lru_cache()
|
||||||
@functools.cache
|
|
||||||
def any_of(cls):
|
def any_of(cls):
|
||||||
# we need this here to make our import statements work
|
# we need this here to make our import statements work
|
||||||
# we must store _composed_schemas in here so the code is only run
|
# we must store _composed_schemas in here so the code is only run
|
||||||
@ -101,9 +98,8 @@ def any_of(cls):
|
|||||||
{{#with not}}
|
{{#with not}}
|
||||||
{{#if complexType}}
|
{{#if complexType}}
|
||||||
|
|
||||||
@classmethod
|
@staticmethod
|
||||||
@property
|
def {{baseName}}() -> typing.Type['{{complexType}}']:
|
||||||
def {{baseName}}(cls) -> typing.Type['{{complexType}}']:
|
|
||||||
return {{complexType}}
|
return {{complexType}}
|
||||||
{{else}}
|
{{else}}
|
||||||
{{> model_templates/schema }}
|
{{> model_templates/schema }}
|
||||||
|
@ -10,9 +10,8 @@ required = {
|
|||||||
{{#each mappedModels}}
|
{{#each mappedModels}}
|
||||||
{{#if @first}}
|
{{#if @first}}
|
||||||
|
|
||||||
@classmethod
|
@staticmethod
|
||||||
@property
|
def discriminator():
|
||||||
def discriminator(cls):
|
|
||||||
return {
|
return {
|
||||||
'{{{propertyBaseName}}}': {
|
'{{{propertyBaseName}}}': {
|
||||||
{{/if}}
|
{{/if}}
|
||||||
@ -30,9 +29,8 @@ class properties:
|
|||||||
{{#each vars}}
|
{{#each vars}}
|
||||||
{{#if complexType}}
|
{{#if complexType}}
|
||||||
|
|
||||||
@classmethod
|
@staticmethod
|
||||||
@property
|
def {{baseName}}() -> typing.Type['{{complexType}}']:
|
||||||
def {{baseName}}(cls) -> typing.Type['{{complexType}}']:
|
|
||||||
return {{complexType}}
|
return {{complexType}}
|
||||||
{{else}}
|
{{else}}
|
||||||
{{> model_templates/schema }}
|
{{> model_templates/schema }}
|
||||||
@ -51,9 +49,8 @@ class properties:
|
|||||||
{{#with additionalProperties}}
|
{{#with additionalProperties}}
|
||||||
{{#if complexType}}
|
{{#if complexType}}
|
||||||
|
|
||||||
@classmethod
|
@staticmethod
|
||||||
@property
|
def {{baseName}}() -> typing.Type['{{complexType}}']:
|
||||||
def {{baseName}}(cls) -> typing.Type['{{complexType}}']:
|
|
||||||
return {{complexType}}
|
return {{complexType}}
|
||||||
{{else}}
|
{{else}}
|
||||||
{{> model_templates/schema }}
|
{{> model_templates/schema }}
|
||||||
|
@ -1,15 +1,13 @@
|
|||||||
{{#if isNull}}
|
{{#if isNull}}
|
||||||
|
|
||||||
@classmethod
|
@schemas.classproperty
|
||||||
@property
|
|
||||||
def NONE(cls):
|
def NONE(cls):
|
||||||
return cls(None)
|
return cls(None)
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{#with allowableValues}}
|
{{#with allowableValues}}
|
||||||
{{#each enumVars}}
|
{{#each enumVars}}
|
||||||
|
|
||||||
@classmethod
|
@schemas.classproperty
|
||||||
@property
|
|
||||||
def {{name}}(cls):
|
def {{name}}(cls):
|
||||||
return cls({{{value}}})
|
return cls({{{value}}})
|
||||||
{{/each}}
|
{{/each}}
|
||||||
|
@ -4,6 +4,7 @@ import functools # noqa: F401
|
|||||||
import io # noqa: F401
|
import io # noqa: F401
|
||||||
import re # noqa: F401
|
import re # noqa: F401
|
||||||
import typing # noqa: F401
|
import typing # noqa: F401
|
||||||
|
import typing_extensions # noqa: F401
|
||||||
import uuid # noqa: F401
|
import uuid # noqa: F401
|
||||||
|
|
||||||
import frozendict # noqa: F401
|
import frozendict # noqa: F401
|
||||||
|
@ -1,9 +1,8 @@
|
|||||||
{{#with items}}
|
{{#with items}}
|
||||||
{{#if complexType}}
|
{{#if complexType}}
|
||||||
|
|
||||||
@classmethod
|
@staticmethod
|
||||||
@property
|
def {{baseName}}() -> typing.Type['{{complexType}}']:
|
||||||
def {{baseName}}(cls) -> typing.Type['{{complexType}}']:
|
|
||||||
return {{complexType}}
|
return {{complexType}}
|
||||||
{{else}}
|
{{else}}
|
||||||
{{> model_templates/schema }}
|
{{> model_templates/schema }}
|
||||||
|
@ -4,15 +4,15 @@
|
|||||||
|
|
||||||
@typing.overload
|
@typing.overload
|
||||||
{{#if complexType}}
|
{{#if complexType}}
|
||||||
def __getitem__(self, name: typing.Literal["{{{baseName}}}"]) -> '{{complexType}}': ...
|
def __getitem__(self, name: typing_extensions.Literal["{{{baseName}}}"]) -> '{{complexType}}': ...
|
||||||
{{else}}
|
{{else}}
|
||||||
{{#if schemaIsFromAdditionalProperties}}
|
{{#if schemaIsFromAdditionalProperties}}
|
||||||
def __getitem__(self, name: typing.Literal["{{{baseName}}}"]) -> MetaOapg.additional_properties: ...
|
def __getitem__(self, name: typing_extensions.Literal["{{{baseName}}}"]) -> MetaOapg.additional_properties: ...
|
||||||
{{else}}
|
{{else}}
|
||||||
{{#if nameInSnakeCase}}
|
{{#if nameInSnakeCase}}
|
||||||
def __getitem__(self, name: typing.Literal["{{{baseName}}}"]) -> MetaOapg.properties.{{name}}: ...
|
def __getitem__(self, name: typing_extensions.Literal["{{{baseName}}}"]) -> MetaOapg.properties.{{name}}: ...
|
||||||
{{else}}
|
{{else}}
|
||||||
def __getitem__(self, name: typing.Literal["{{{baseName}}}"]) -> MetaOapg.properties.{{baseName}}: ...
|
def __getitem__(self, name: typing_extensions.Literal["{{{baseName}}}"]) -> MetaOapg.properties.{{baseName}}: ...
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
@ -25,12 +25,12 @@ def __getitem__(self, name: typing.Literal["{{{baseName}}}"]) -> MetaOapg.proper
|
|||||||
|
|
||||||
@typing.overload
|
@typing.overload
|
||||||
{{#if complexType}}
|
{{#if complexType}}
|
||||||
def __getitem__(self, name: typing.Literal["{{{baseName}}}"]) -> '{{complexType}}': ...
|
def __getitem__(self, name: typing_extensions.Literal["{{{baseName}}}"]) -> '{{complexType}}': ...
|
||||||
{{else}}
|
{{else}}
|
||||||
{{#if nameInSnakeCase}}
|
{{#if nameInSnakeCase}}
|
||||||
def __getitem__(self, name: typing.Literal["{{{baseName}}}"]) -> MetaOapg.properties.{{name}}: ...
|
def __getitem__(self, name: typing_extensions.Literal["{{{baseName}}}"]) -> MetaOapg.properties.{{name}}: ...
|
||||||
{{else}}
|
{{else}}
|
||||||
def __getitem__(self, name: typing.Literal["{{{baseName}}}"]) -> MetaOapg.properties.{{baseName}}: ...
|
def __getitem__(self, name: typing_extensions.Literal["{{{baseName}}}"]) -> MetaOapg.properties.{{baseName}}: ...
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{/unless}}
|
{{/unless}}
|
||||||
@ -58,15 +58,15 @@ def __getitem__(self, name: str) -> {{#if complexType}}'{{complexType}}'{{else}}
|
|||||||
|
|
||||||
@typing.overload
|
@typing.overload
|
||||||
{{#if complexType}}
|
{{#if complexType}}
|
||||||
def get_item_oapg(self, name: typing.Literal["{{{baseName}}}"]) -> '{{complexType}}': ...
|
def get_item_oapg(self, name: typing_extensions.Literal["{{{baseName}}}"]) -> '{{complexType}}': ...
|
||||||
{{else}}
|
{{else}}
|
||||||
{{#if schemaIsFromAdditionalProperties}}
|
{{#if schemaIsFromAdditionalProperties}}
|
||||||
def get_item_oapg(self, name: typing.Literal["{{{baseName}}}"]) -> MetaOapg.additional_properties: ...
|
def get_item_oapg(self, name: typing_extensions.Literal["{{{baseName}}}"]) -> MetaOapg.additional_properties: ...
|
||||||
{{else}}
|
{{else}}
|
||||||
{{#if nameInSnakeCase}}
|
{{#if nameInSnakeCase}}
|
||||||
def get_item_oapg(self, name: typing.Literal["{{{baseName}}}"]) -> MetaOapg.properties.{{name}}: ...
|
def get_item_oapg(self, name: typing_extensions.Literal["{{{baseName}}}"]) -> MetaOapg.properties.{{name}}: ...
|
||||||
{{else}}
|
{{else}}
|
||||||
def get_item_oapg(self, name: typing.Literal["{{{baseName}}}"]) -> MetaOapg.properties.{{baseName}}: ...
|
def get_item_oapg(self, name: typing_extensions.Literal["{{{baseName}}}"]) -> MetaOapg.properties.{{baseName}}: ...
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
@ -79,12 +79,12 @@ def get_item_oapg(self, name: typing.Literal["{{{baseName}}}"]) -> MetaOapg.prop
|
|||||||
|
|
||||||
@typing.overload
|
@typing.overload
|
||||||
{{#if complexType}}
|
{{#if complexType}}
|
||||||
def get_item_oapg(self, name: typing.Literal["{{{baseName}}}"]) -> typing.Union['{{complexType}}', schemas.Unset]: ...
|
def get_item_oapg(self, name: typing_extensions.Literal["{{{baseName}}}"]) -> typing.Union['{{complexType}}', schemas.Unset]: ...
|
||||||
{{else}}
|
{{else}}
|
||||||
{{#if nameInSnakeCase}}
|
{{#if nameInSnakeCase}}
|
||||||
def get_item_oapg(self, name: typing.Literal["{{{baseName}}}"]) -> typing.Union[MetaOapg.properties.{{name}}, schemas.Unset]: ...
|
def get_item_oapg(self, name: typing_extensions.Literal["{{{baseName}}}"]) -> typing.Union[MetaOapg.properties.{{name}}, schemas.Unset]: ...
|
||||||
{{else}}
|
{{else}}
|
||||||
def get_item_oapg(self, name: typing.Literal["{{{baseName}}}"]) -> typing.Union[MetaOapg.properties.{{baseName}}, schemas.Unset]: ...
|
def get_item_oapg(self, name: typing_extensions.Literal["{{{baseName}}}"]) -> typing.Union[MetaOapg.properties.{{baseName}}, schemas.Unset]: ...
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{/unless}}
|
{{/unless}}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
def {{methodName}}(self, name: typing.Union[{{#each getRequiredVarsMap}}{{#with this}}typing.Literal["{{{baseName}}}"], {{/with}}{{/each}}{{#each vars}}{{#unless required}}typing.Literal["{{{baseName}}}"], {{/unless}}{{/each}}{{#with additionalProperties}}{{#unless getIsBooleanSchemaFalse}}str, {{/unless}}{{/with}}]){{#not vars}}{{#not getRequiredVarsMap}}{{#with additionalProperties}}{{#unless getIsBooleanSchemaFalse}} -> {{#if complexType}}'{{complexType}}'{{else}}MetaOapg.{{baseName}}{{/if}}{{/unless}}{{/with}}{{/not}}{{/not}}:
|
def {{methodName}}(self, name: typing.Union[{{#each getRequiredVarsMap}}{{#with this}}typing_extensions.Literal["{{{baseName}}}"], {{/with}}{{/each}}{{#each vars}}{{#unless required}}typing_extensions.Literal["{{{baseName}}}"], {{/unless}}{{/each}}{{#with additionalProperties}}{{#unless getIsBooleanSchemaFalse}}str, {{/unless}}{{/with}}]){{#not vars}}{{#not getRequiredVarsMap}}{{#with additionalProperties}}{{#unless getIsBooleanSchemaFalse}} -> {{#if complexType}}'{{complexType}}'{{else}}MetaOapg.{{baseName}}{{/if}}{{/unless}}{{/with}}{{/not}}{{/not}}:
|
||||||
{{#eq methodName "__getitem__"}}
|
{{#eq methodName "__getitem__"}}
|
||||||
# dict_instance[name] accessor
|
# dict_instance[name] accessor
|
||||||
{{/eq}}
|
{{/eq}}
|
||||||
|
@ -3,12 +3,12 @@
|
|||||||
|
|
||||||
@typing.overload
|
@typing.overload
|
||||||
{{#if complexType}}
|
{{#if complexType}}
|
||||||
def __getitem__(self, name: typing.Literal["{{{baseName}}}"]) -> '{{complexType}}': ...
|
def __getitem__(self, name: typing_extensions.Literal["{{{baseName}}}"]) -> '{{complexType}}': ...
|
||||||
{{else}}
|
{{else}}
|
||||||
{{#if nameInSnakeCase}}
|
{{#if nameInSnakeCase}}
|
||||||
def __getitem__(self, name: typing.Literal["{{{baseName}}}"]) -> MetaOapg.properties.{{name}}: ...
|
def __getitem__(self, name: typing_extensions.Literal["{{{baseName}}}"]) -> MetaOapg.properties.{{name}}: ...
|
||||||
{{else}}
|
{{else}}
|
||||||
def __getitem__(self, name: typing.Literal["{{{baseName}}}"]) -> MetaOapg.properties.{{baseName}}: ...
|
def __getitem__(self, name: typing_extensions.Literal["{{{baseName}}}"]) -> MetaOapg.properties.{{baseName}}: ...
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{/each}}
|
{{/each}}
|
||||||
@ -16,7 +16,7 @@ def __getitem__(self, name: typing.Literal["{{{baseName}}}"]) -> MetaOapg.proper
|
|||||||
@typing.overload
|
@typing.overload
|
||||||
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
|
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
|
||||||
|
|
||||||
def __getitem__(self, name: typing.Union[typing.Literal[{{#each vars}}"{{{baseName}}}", {{/each}}], str]):
|
def __getitem__(self, name: typing.Union[typing_extensions.Literal[{{#each vars}}"{{{baseName}}}", {{/each}}], str]):
|
||||||
# dict_instance[name] accessor
|
# dict_instance[name] accessor
|
||||||
return super().__getitem__(name)
|
return super().__getitem__(name)
|
||||||
|
|
||||||
@ -26,12 +26,12 @@ def __getitem__(self, name: typing.Union[typing.Literal[{{#each vars}}"{{{baseNa
|
|||||||
|
|
||||||
@typing.overload
|
@typing.overload
|
||||||
{{#if complexType}}
|
{{#if complexType}}
|
||||||
def get_item_oapg(self, name: typing.Literal["{{{baseName}}}"]) -> {{#unless required}}typing.Union[{{/unless}}'{{complexType}}'{{#unless required}}, schemas.Unset]{{/unless}}: ...
|
def get_item_oapg(self, name: typing_extensions.Literal["{{{baseName}}}"]) -> {{#unless required}}typing.Union[{{/unless}}'{{complexType}}'{{#unless required}}, schemas.Unset]{{/unless}}: ...
|
||||||
{{else}}
|
{{else}}
|
||||||
{{#if nameInSnakeCase}}
|
{{#if nameInSnakeCase}}
|
||||||
def get_item_oapg(self, name: typing.Literal["{{{baseName}}}"]) -> {{#unless required}}typing.Union[{{/unless}}MetaOapg.properties.{{name}}{{#unless required}}, schemas.Unset]{{/unless}}: ...
|
def get_item_oapg(self, name: typing_extensions.Literal["{{{baseName}}}"]) -> {{#unless required}}typing.Union[{{/unless}}MetaOapg.properties.{{name}}{{#unless required}}, schemas.Unset]{{/unless}}: ...
|
||||||
{{else}}
|
{{else}}
|
||||||
def get_item_oapg(self, name: typing.Literal["{{{baseName}}}"]) -> {{#unless required}}typing.Union[{{/unless}}MetaOapg.properties.{{baseName}}{{#unless required}}, schemas.Unset]{{/unless}}: ...
|
def get_item_oapg(self, name: typing_extensions.Literal["{{{baseName}}}"]) -> {{#unless required}}typing.Union[{{/unless}}MetaOapg.properties.{{baseName}}{{#unless required}}, schemas.Unset]{{/unless}}: ...
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{/each}}
|
{{/each}}
|
||||||
@ -39,7 +39,7 @@ def get_item_oapg(self, name: typing.Literal["{{{baseName}}}"]) -> {{#unless req
|
|||||||
@typing.overload
|
@typing.overload
|
||||||
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
|
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
|
||||||
|
|
||||||
def get_item_oapg(self, name: typing.Union[typing.Literal[{{#each vars}}"{{{baseName}}}", {{/each}}], str]):
|
def get_item_oapg(self, name: typing.Union[typing_extensions.Literal[{{#each vars}}"{{{baseName}}}", {{/each}}], str]):
|
||||||
return super().get_item_oapg(name)
|
return super().get_item_oapg(name)
|
||||||
|
|
||||||
{{/if}}
|
{{/if}}
|
@ -8,6 +8,7 @@ import functools
|
|||||||
import decimal
|
import decimal
|
||||||
import io
|
import io
|
||||||
import re
|
import re
|
||||||
|
import types
|
||||||
import typing
|
import typing
|
||||||
import uuid
|
import uuid
|
||||||
|
|
||||||
@ -176,9 +177,17 @@ class Singleton:
|
|||||||
return f'<{self.__class__.__name__}: {super().__repr__()}>'
|
return f'<{self.__class__.__name__}: {super().__repr__()}>'
|
||||||
|
|
||||||
|
|
||||||
|
class classproperty:
|
||||||
|
|
||||||
|
def __init__(self, fget):
|
||||||
|
self.fget = fget
|
||||||
|
|
||||||
|
def __get__(self, owner_self, owner_cls):
|
||||||
|
return self.fget(owner_cls)
|
||||||
|
|
||||||
|
|
||||||
class NoneClass(Singleton):
|
class NoneClass(Singleton):
|
||||||
@classmethod
|
@classproperty
|
||||||
@property
|
|
||||||
def NONE(cls):
|
def NONE(cls):
|
||||||
return cls(None)
|
return cls(None)
|
||||||
|
|
||||||
@ -187,17 +196,15 @@ class NoneClass(Singleton):
|
|||||||
|
|
||||||
|
|
||||||
class BoolClass(Singleton):
|
class BoolClass(Singleton):
|
||||||
@classmethod
|
@classproperty
|
||||||
@property
|
|
||||||
def TRUE(cls):
|
def TRUE(cls):
|
||||||
return cls(True)
|
return cls(True)
|
||||||
|
|
||||||
@classmethod
|
@classproperty
|
||||||
@property
|
|
||||||
def FALSE(cls):
|
def FALSE(cls):
|
||||||
return cls(False)
|
return cls(False)
|
||||||
|
|
||||||
@functools.cache
|
@functools.lru_cache()
|
||||||
def __bool__(self) -> bool:
|
def __bool__(self) -> bool:
|
||||||
for key, instance in self._instances.items():
|
for key, instance in self._instances.items():
|
||||||
if self is instance:
|
if self is instance:
|
||||||
@ -249,6 +256,16 @@ class Schema:
|
|||||||
return "is {0}".format(all_class_names[0])
|
return "is {0}".format(all_class_names[0])
|
||||||
return "is one of [{0}]".format(", ".join(all_class_names))
|
return "is one of [{0}]".format(", ".join(all_class_names))
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def _get_class_oapg(item_cls: typing.Union[types.FunctionType, staticmethod, typing.Type['Schema']]) -> typing.Type['Schema']:
|
||||||
|
if isinstance(item_cls, types.FunctionType):
|
||||||
|
# referenced schema
|
||||||
|
return item_cls()
|
||||||
|
elif isinstance(item_cls, staticmethod):
|
||||||
|
# referenced schema
|
||||||
|
return item_cls.__func__()
|
||||||
|
return item_cls
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def __type_error_message(
|
def __type_error_message(
|
||||||
cls, var_value=None, var_name=None, valid_classes=None, key_type=None
|
cls, var_value=None, var_name=None, valid_classes=None, key_type=None
|
||||||
@ -856,39 +873,19 @@ class ValidatorBase:
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
class Validator(typing.Protocol):
|
|
||||||
@classmethod
|
|
||||||
def _validate_oapg(
|
|
||||||
cls,
|
|
||||||
arg,
|
|
||||||
validation_metadata: ValidationMetadata,
|
|
||||||
) -> typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Set[typing.Union['Schema', str, decimal.Decimal, BoolClass, NoneClass, frozendict.frozendict, tuple]]]:
|
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
class EnumMakerBase:
|
class EnumMakerBase:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
class EnumMakerInterface(Validator):
|
def SchemaEnumMakerClsFactory(enum_value_to_name: typing.Dict[typing.Union[str, decimal.Decimal, bool, none_type], str]) -> 'SchemaEnumMaker':
|
||||||
@classmethod
|
|
||||||
@property
|
|
||||||
def _enum_value_to_name(
|
|
||||||
cls
|
|
||||||
) -> typing.Dict[typing.Union[str, decimal.Decimal, bool, none_type], str]:
|
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
def SchemaEnumMakerClsFactory(enum_value_to_name: typing.Dict[typing.Union[str, decimal.Decimal, bool, none_type], str]) -> EnumMakerInterface:
|
|
||||||
class SchemaEnumMaker(EnumMakerBase):
|
class SchemaEnumMaker(EnumMakerBase):
|
||||||
@classmethod
|
@classmethod
|
||||||
@property
|
|
||||||
def _enum_value_to_name(
|
def _enum_value_to_name(
|
||||||
cls
|
cls
|
||||||
) -> typing.Dict[typing.Union[str, decimal.Decimal, bool, none_type], str]:
|
) -> typing.Dict[typing.Union[str, decimal.Decimal, bool, none_type], str]:
|
||||||
pass
|
pass
|
||||||
try:
|
try:
|
||||||
super_enum_value_to_name = super()._enum_value_to_name
|
super_enum_value_to_name = super()._enum_value_to_name()
|
||||||
except AttributeError:
|
except AttributeError:
|
||||||
return enum_value_to_name
|
return enum_value_to_name
|
||||||
intersection = dict(enum_value_to_name.items() & super_enum_value_to_name.items())
|
intersection = dict(enum_value_to_name.items() & super_enum_value_to_name.items())
|
||||||
@ -905,9 +902,9 @@ def SchemaEnumMakerClsFactory(enum_value_to_name: typing.Dict[typing.Union[str,
|
|||||||
Validates that arg is in the enum's allowed values
|
Validates that arg is in the enum's allowed values
|
||||||
"""
|
"""
|
||||||
try:
|
try:
|
||||||
cls._enum_value_to_name[arg]
|
cls._enum_value_to_name()[arg]
|
||||||
except KeyError:
|
except KeyError:
|
||||||
raise ApiValueError("Invalid value {} passed in to {}, {}".format(arg, cls, cls._enum_value_to_name))
|
raise ApiValueError("Invalid value {} passed in to {}, {}".format(arg, cls, cls._enum_value_to_name()))
|
||||||
return super()._validate_oapg(arg, validation_metadata=validation_metadata)
|
return super()._validate_oapg(arg, validation_metadata=validation_metadata)
|
||||||
|
|
||||||
return SchemaEnumMaker
|
return SchemaEnumMaker
|
||||||
@ -1034,7 +1031,7 @@ class StrBase(ValidatorBase):
|
|||||||
|
|
||||||
class UUIDBase:
|
class UUIDBase:
|
||||||
@property
|
@property
|
||||||
@functools.cache
|
@functools.lru_cache()
|
||||||
def as_uuid_oapg(self) -> uuid.UUID:
|
def as_uuid_oapg(self) -> uuid.UUID:
|
||||||
return uuid.UUID(self)
|
return uuid.UUID(self)
|
||||||
|
|
||||||
@ -1100,7 +1097,7 @@ DEFAULT_ISOPARSER = CustomIsoparser()
|
|||||||
|
|
||||||
class DateBase:
|
class DateBase:
|
||||||
@property
|
@property
|
||||||
@functools.cache
|
@functools.lru_cache()
|
||||||
def as_date_oapg(self) -> date:
|
def as_date_oapg(self) -> date:
|
||||||
return DEFAULT_ISOPARSER.parse_isodate(self)
|
return DEFAULT_ISOPARSER.parse_isodate(self)
|
||||||
|
|
||||||
@ -1131,7 +1128,7 @@ class DateBase:
|
|||||||
|
|
||||||
class DateTimeBase:
|
class DateTimeBase:
|
||||||
@property
|
@property
|
||||||
@functools.cache
|
@functools.lru_cache()
|
||||||
def as_datetime_oapg(self) -> datetime:
|
def as_datetime_oapg(self) -> datetime:
|
||||||
return DEFAULT_ISOPARSER.parse_isodatetime(self)
|
return DEFAULT_ISOPARSER.parse_isodatetime(self)
|
||||||
|
|
||||||
@ -1168,7 +1165,7 @@ class DecimalBase:
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
@property
|
@property
|
||||||
@functools.cache
|
@functools.lru_cache()
|
||||||
def as_decimal_oapg(self) -> decimal.Decimal:
|
def as_decimal_oapg(self) -> decimal.Decimal:
|
||||||
return decimal.Decimal(self)
|
return decimal.Decimal(self)
|
||||||
|
|
||||||
@ -1337,6 +1334,7 @@ class ListBase(ValidatorBase):
|
|||||||
# if we have definitions for an items schema, use it
|
# if we have definitions for an items schema, use it
|
||||||
# otherwise accept anything
|
# otherwise accept anything
|
||||||
item_cls = getattr(cls.MetaOapg, 'items', UnsetAnyTypeSchema)
|
item_cls = getattr(cls.MetaOapg, 'items', UnsetAnyTypeSchema)
|
||||||
|
item_cls = cls._get_class_oapg(item_cls)
|
||||||
path_to_schemas = {}
|
path_to_schemas = {}
|
||||||
for i, value in enumerate(list_items):
|
for i, value in enumerate(list_items):
|
||||||
item_validation_metadata = ValidationMetadata(
|
item_validation_metadata = ValidationMetadata(
|
||||||
@ -1470,7 +1468,7 @@ class Discriminable:
|
|||||||
"""
|
"""
|
||||||
if not hasattr(cls.MetaOapg, 'discriminator'):
|
if not hasattr(cls.MetaOapg, 'discriminator'):
|
||||||
return None
|
return None
|
||||||
disc = cls.MetaOapg.discriminator
|
disc = cls.MetaOapg.discriminator()
|
||||||
if disc_property_name not in disc:
|
if disc_property_name not in disc:
|
||||||
return None
|
return None
|
||||||
discriminated_cls = disc[disc_property_name].get(disc_payload_value)
|
discriminated_cls = disc[disc_property_name].get(disc_payload_value)
|
||||||
@ -1485,21 +1483,24 @@ class Discriminable:
|
|||||||
):
|
):
|
||||||
return None
|
return None
|
||||||
# TODO stop traveling if a cycle is hit
|
# TODO stop traveling if a cycle is hit
|
||||||
for allof_cls in getattr(cls.MetaOapg, 'all_of', []):
|
if hasattr(cls.MetaOapg, 'all_of'):
|
||||||
discriminated_cls = allof_cls.get_discriminated_class_oapg(
|
for allof_cls in cls.MetaOapg.all_of():
|
||||||
disc_property_name=disc_property_name, disc_payload_value=disc_payload_value)
|
discriminated_cls = allof_cls.get_discriminated_class_oapg(
|
||||||
if discriminated_cls is not None:
|
disc_property_name=disc_property_name, disc_payload_value=disc_payload_value)
|
||||||
return discriminated_cls
|
if discriminated_cls is not None:
|
||||||
for oneof_cls in getattr(cls.MetaOapg, 'one_of', []):
|
return discriminated_cls
|
||||||
discriminated_cls = oneof_cls.get_discriminated_class_oapg(
|
if hasattr(cls.MetaOapg, 'one_of'):
|
||||||
disc_property_name=disc_property_name, disc_payload_value=disc_payload_value)
|
for oneof_cls in cls.MetaOapg.one_of():
|
||||||
if discriminated_cls is not None:
|
discriminated_cls = oneof_cls.get_discriminated_class_oapg(
|
||||||
return discriminated_cls
|
disc_property_name=disc_property_name, disc_payload_value=disc_payload_value)
|
||||||
for anyof_cls in getattr(cls.MetaOapg, 'any_of', []):
|
if discriminated_cls is not None:
|
||||||
discriminated_cls = anyof_cls.get_discriminated_class_oapg(
|
return discriminated_cls
|
||||||
disc_property_name=disc_property_name, disc_payload_value=disc_payload_value)
|
if hasattr(cls.MetaOapg, 'any_of'):
|
||||||
if discriminated_cls is not None:
|
for anyof_cls in cls.MetaOapg.any_of():
|
||||||
return discriminated_cls
|
discriminated_cls = anyof_cls.get_discriminated_class_oapg(
|
||||||
|
disc_property_name=disc_property_name, disc_payload_value=disc_payload_value)
|
||||||
|
if discriminated_cls is not None:
|
||||||
|
return discriminated_cls
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
|
||||||
@ -1598,9 +1599,7 @@ class DictBase(Discriminable, ValidatorBase):
|
|||||||
raise ApiTypeError('Unable to find schema for value={} in class={} at path_to_item={}'.format(
|
raise ApiTypeError('Unable to find schema for value={} in class={} at path_to_item={}'.format(
|
||||||
value, cls, validation_metadata.path_to_item+(property_name,)
|
value, cls, validation_metadata.path_to_item+(property_name,)
|
||||||
))
|
))
|
||||||
if isinstance(schema, classmethod):
|
schema = cls._get_class_oapg(schema)
|
||||||
# referenced schema, call classmethod property
|
|
||||||
schema = schema.__func__.fget(properties)
|
|
||||||
arg_validation_metadata = ValidationMetadata(
|
arg_validation_metadata = ValidationMetadata(
|
||||||
from_server=validation_metadata.from_server,
|
from_server=validation_metadata.from_server,
|
||||||
configuration=validation_metadata.configuration,
|
configuration=validation_metadata.configuration,
|
||||||
@ -1671,7 +1670,7 @@ class DictBase(Discriminable, ValidatorBase):
|
|||||||
other_path_to_schemas = cls.__validate_args(arg, validation_metadata=validation_metadata)
|
other_path_to_schemas = cls.__validate_args(arg, validation_metadata=validation_metadata)
|
||||||
update(_path_to_schemas, other_path_to_schemas)
|
update(_path_to_schemas, other_path_to_schemas)
|
||||||
try:
|
try:
|
||||||
discriminator = cls.MetaOapg.discriminator
|
discriminator = cls.MetaOapg.discriminator()
|
||||||
except AttributeError:
|
except AttributeError:
|
||||||
return _path_to_schemas
|
return _path_to_schemas
|
||||||
# discriminator exists
|
# discriminator exists
|
||||||
@ -1856,7 +1855,7 @@ class ComposedBase(Discriminable):
|
|||||||
@classmethod
|
@classmethod
|
||||||
def __get_allof_classes(cls, arg, validation_metadata: ValidationMetadata):
|
def __get_allof_classes(cls, arg, validation_metadata: ValidationMetadata):
|
||||||
path_to_schemas = defaultdict(set)
|
path_to_schemas = defaultdict(set)
|
||||||
for allof_cls in cls.MetaOapg.all_of:
|
for allof_cls in cls.MetaOapg.all_of():
|
||||||
if validation_metadata.validation_ran_earlier(allof_cls):
|
if validation_metadata.validation_ran_earlier(allof_cls):
|
||||||
continue
|
continue
|
||||||
other_path_to_schemas = allof_cls._validate_oapg(arg, validation_metadata=validation_metadata)
|
other_path_to_schemas = allof_cls._validate_oapg(arg, validation_metadata=validation_metadata)
|
||||||
@ -1872,7 +1871,7 @@ class ComposedBase(Discriminable):
|
|||||||
):
|
):
|
||||||
oneof_classes = []
|
oneof_classes = []
|
||||||
path_to_schemas = defaultdict(set)
|
path_to_schemas = defaultdict(set)
|
||||||
for oneof_cls in cls.MetaOapg.one_of:
|
for oneof_cls in cls.MetaOapg.one_of():
|
||||||
if oneof_cls in path_to_schemas[validation_metadata.path_to_item]:
|
if oneof_cls in path_to_schemas[validation_metadata.path_to_item]:
|
||||||
oneof_classes.append(oneof_cls)
|
oneof_classes.append(oneof_cls)
|
||||||
continue
|
continue
|
||||||
@ -1907,7 +1906,7 @@ class ComposedBase(Discriminable):
|
|||||||
):
|
):
|
||||||
anyof_classes = []
|
anyof_classes = []
|
||||||
path_to_schemas = defaultdict(set)
|
path_to_schemas = defaultdict(set)
|
||||||
for anyof_cls in cls.MetaOapg.any_of:
|
for anyof_cls in cls.MetaOapg.any_of():
|
||||||
if validation_metadata.validation_ran_earlier(anyof_cls):
|
if validation_metadata.validation_ran_earlier(anyof_cls):
|
||||||
anyof_classes.append(anyof_cls)
|
anyof_classes.append(anyof_cls)
|
||||||
continue
|
continue
|
||||||
@ -1997,8 +1996,9 @@ class ComposedBase(Discriminable):
|
|||||||
)
|
)
|
||||||
update(path_to_schemas, other_path_to_schemas)
|
update(path_to_schemas, other_path_to_schemas)
|
||||||
not_cls = None
|
not_cls = None
|
||||||
if hasattr(cls, 'MetaOapg'):
|
if hasattr(cls, 'MetaOapg') and hasattr(cls.MetaOapg, 'not_schema'):
|
||||||
not_cls = getattr(cls.MetaOapg, 'not_schema', None)
|
not_cls = cls.MetaOapg.not_schema
|
||||||
|
not_cls = cls._get_class_oapg(not_cls)
|
||||||
if not_cls:
|
if not_cls:
|
||||||
other_path_to_schemas = None
|
other_path_to_schemas = None
|
||||||
not_exception = ApiValueError(
|
not_exception = ApiValueError(
|
||||||
@ -2367,10 +2367,12 @@ class BinarySchema(
|
|||||||
BinaryMixin
|
BinaryMixin
|
||||||
):
|
):
|
||||||
class MetaOapg:
|
class MetaOapg:
|
||||||
one_of = [
|
@staticmethod
|
||||||
BytesSchema,
|
def one_of():
|
||||||
FileSchema,
|
return [
|
||||||
]
|
BytesSchema,
|
||||||
|
FileSchema,
|
||||||
|
]
|
||||||
|
|
||||||
def __new__(cls, arg: typing.Union[io.FileIO, io.BufferedReader, bytes], **kwargs: Configuration):
|
def __new__(cls, arg: typing.Union[io.FileIO, io.BufferedReader, bytes], **kwargs: Configuration):
|
||||||
return super().__new__(cls, arg)
|
return super().__new__(cls, arg)
|
||||||
@ -2449,7 +2451,7 @@ class DictSchema(
|
|||||||
schema_type_classes = {NoneSchema, DictSchema, ListSchema, NumberSchema, StrSchema, BoolSchema, AnyTypeSchema}
|
schema_type_classes = {NoneSchema, DictSchema, ListSchema, NumberSchema, StrSchema, BoolSchema, AnyTypeSchema}
|
||||||
|
|
||||||
|
|
||||||
@functools.cache
|
@functools.lru_cache()
|
||||||
def get_new_class(
|
def get_new_class(
|
||||||
class_name: str,
|
class_name: str,
|
||||||
bases: typing.Tuple[typing.Type[typing.Union[Schema, typing.Any]], ...]
|
bases: typing.Tuple[typing.Type[typing.Union[Schema, typing.Any]], ...]
|
||||||
|
@ -29,6 +29,7 @@ REQUIRES = [
|
|||||||
"pem>=19.3.0",
|
"pem>=19.3.0",
|
||||||
"pycryptodome>=3.9.0",
|
"pycryptodome>=3.9.0",
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
"typing_extensions",
|
||||||
]
|
]
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
[tox]
|
[tox]
|
||||||
envlist = py39
|
envlist = py37
|
||||||
|
|
||||||
[testenv]
|
[testenv]
|
||||||
|
passenv = PYTHON_VERSION
|
||||||
deps=-r{toxinidir}/requirements.txt
|
deps=-r{toxinidir}/requirements.txt
|
||||||
-r{toxinidir}/test-requirements.txt
|
-r{toxinidir}/test-requirements.txt
|
||||||
|
|
||||||
|
@ -9,9 +9,7 @@ This Python package is automatically generated by the [OpenAPI Generator](https:
|
|||||||
|
|
||||||
## Requirements.
|
## Requirements.
|
||||||
|
|
||||||
Python >=3.9
|
Python >=3.7
|
||||||
v3.9 is needed so one can combine classmethod and property decorators to define
|
|
||||||
object schema properties as classes
|
|
||||||
|
|
||||||
## Migration from other generators like python and python-legacy
|
## Migration from other generators like python and python-legacy
|
||||||
|
|
||||||
@ -52,6 +50,16 @@ object schema properties as classes
|
|||||||
- A type hint is also generated for additionalProperties accessed using this method
|
- A type hint is also generated for additionalProperties accessed using this method
|
||||||
- So you will need to update you code to use some_instance['optionalProp'] to access optional property
|
- So you will need to update you code to use some_instance['optionalProp'] to access optional property
|
||||||
and additionalProperty values
|
and additionalProperty values
|
||||||
|
8. The location of the api classes has changed
|
||||||
|
- Api classes are located in your_package.apis.tags.some_api
|
||||||
|
- This change was made to eliminate redundant code generation
|
||||||
|
- Legacy generators generated the same endpoint twice if it had > 1 tag on it
|
||||||
|
- This generator defines an endpoint in one class, then inherits that class to generate
|
||||||
|
apis by tags and by paths
|
||||||
|
- This change reduces code and allows quicker run time if you use the path apis
|
||||||
|
- path apis are at your_package.apis.paths.some_path
|
||||||
|
- Those apis will only load their needed models, which is less to load than all of the resources needed in a tag api
|
||||||
|
- So you will need to update your import paths to the api classes
|
||||||
|
|
||||||
### Why are Oapg and _oapg used in class and method names?
|
### Why are Oapg and _oapg used in class and method names?
|
||||||
Classes can have arbitrarily named properties set on them
|
Classes can have arbitrarily named properties set on them
|
||||||
|
@ -25,6 +25,7 @@ REQUIRES = [
|
|||||||
"certifi",
|
"certifi",
|
||||||
"python-dateutil",
|
"python-dateutil",
|
||||||
"frozendict >= 2.0.3",
|
"frozendict >= 2.0.3",
|
||||||
|
"typing_extensions",
|
||||||
]
|
]
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
@ -35,7 +36,7 @@ setup(
|
|||||||
author_email="team@openapitools.org",
|
author_email="team@openapitools.org",
|
||||||
url="",
|
url="",
|
||||||
keywords=["OpenAPI", "OpenAPI-Generator", "openapi 3.0.3 sample spec"],
|
keywords=["OpenAPI", "OpenAPI-Generator", "openapi 3.0.3 sample spec"],
|
||||||
python_requires=">=3.9",
|
python_requires=">=3.7",
|
||||||
install_requires=REQUIRES,
|
install_requires=REQUIRES,
|
||||||
packages=find_packages(exclude=["test", "tests"]),
|
packages=find_packages(exclude=["test", "tests"]),
|
||||||
include_package_data=True,
|
include_package_data=True,
|
||||||
|
@ -41,7 +41,7 @@ class ApiTestMixin:
|
|||||||
)
|
)
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def headers_for_content_type(content_type: str) -> dict[str, str]:
|
def headers_for_content_type(content_type: str) -> typing.Dict[str, str]:
|
||||||
return {'content-type': content_type}
|
return {'content-type': content_type}
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
@ -50,7 +50,7 @@ class ApiTestMixin:
|
|||||||
body: typing.Union[str, bytes],
|
body: typing.Union[str, bytes],
|
||||||
status: int = 200,
|
status: int = 200,
|
||||||
content_type: str = json_content_type,
|
content_type: str = json_content_type,
|
||||||
headers: typing.Optional[dict[str, str]] = None,
|
headers: typing.Optional[typing.Dict[str, str]] = None,
|
||||||
preload_content: bool = True
|
preload_content: bool = True
|
||||||
) -> urllib3.HTTPResponse:
|
) -> urllib3.HTTPResponse:
|
||||||
if headers is None:
|
if headers is None:
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
[tox]
|
[tox]
|
||||||
envlist = py39
|
envlist = py37
|
||||||
|
|
||||||
[testenv]
|
[testenv]
|
||||||
|
passenv = PYTHON_VERSION
|
||||||
deps=-r{toxinidir}/requirements.txt
|
deps=-r{toxinidir}/requirements.txt
|
||||||
-r{toxinidir}/test-requirements.txt
|
-r{toxinidir}/test-requirements.txt
|
||||||
|
|
||||||
|
@ -20,6 +20,7 @@ from multiprocessing.pool import ThreadPool
|
|||||||
import re
|
import re
|
||||||
import tempfile
|
import tempfile
|
||||||
import typing
|
import typing
|
||||||
|
import typing_extensions
|
||||||
import urllib3
|
import urllib3
|
||||||
from urllib3._collections import HTTPHeaderDict
|
from urllib3._collections import HTTPHeaderDict
|
||||||
from urllib.parse import urlparse, quote
|
from urllib.parse import urlparse, quote
|
||||||
@ -708,7 +709,7 @@ class HeaderParameter(ParameterBase, StyleSimpleSerializer):
|
|||||||
)
|
)
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def __to_headers(in_data: typing.Tuple[typing.Tuple[str, str], ...]) -> HTTPHeaderDict[str, str]:
|
def __to_headers(in_data: typing.Tuple[typing.Tuple[str, str], ...]) -> HTTPHeaderDict:
|
||||||
data = tuple(t for t in in_data if t)
|
data = tuple(t for t in in_data if t)
|
||||||
headers = HTTPHeaderDict()
|
headers = HTTPHeaderDict()
|
||||||
if not data:
|
if not data:
|
||||||
@ -720,7 +721,7 @@ class HeaderParameter(ParameterBase, StyleSimpleSerializer):
|
|||||||
self,
|
self,
|
||||||
in_data: typing.Union[
|
in_data: typing.Union[
|
||||||
Schema, Decimal, int, float, str, date, datetime, None, bool, list, tuple, dict, frozendict.frozendict]
|
Schema, Decimal, int, float, str, date, datetime, None, bool, list, tuple, dict, frozendict.frozendict]
|
||||||
) -> HTTPHeaderDict[str, str]:
|
) -> HTTPHeaderDict:
|
||||||
if self.schema:
|
if self.schema:
|
||||||
cast_in_data = self.schema(in_data)
|
cast_in_data = self.schema(in_data)
|
||||||
cast_in_data = self._json_encoder.default(cast_in_data)
|
cast_in_data = self._json_encoder.default(cast_in_data)
|
||||||
@ -1260,7 +1261,7 @@ class Api:
|
|||||||
self.api_client = api_client
|
self.api_client = api_client
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def _verify_typed_dict_inputs_oapg(cls: typing.Type[typing.TypedDict], data: typing.Dict[str, typing.Any]):
|
def _verify_typed_dict_inputs_oapg(cls: typing.Type[typing_extensions.TypedDict], data: typing.Dict[str, typing.Any]):
|
||||||
"""
|
"""
|
||||||
Ensures that:
|
Ensures that:
|
||||||
- required keys are present
|
- required keys are present
|
||||||
@ -1332,9 +1333,9 @@ class Api:
|
|||||||
return host
|
return host
|
||||||
|
|
||||||
|
|
||||||
class SerializedRequestBody(typing.TypedDict, total=False):
|
class SerializedRequestBody(typing_extensions.TypedDict, total=False):
|
||||||
body: typing.Union[str, bytes]
|
body: typing.Union[str, bytes]
|
||||||
fields: typing.Tuple[typing.Union[RequestField, tuple[str, str]], ...]
|
fields: typing.Tuple[typing.Union[RequestField, typing.Tuple[str, str]], ...]
|
||||||
|
|
||||||
|
|
||||||
class RequestBody(StyleFormSerializer, JSONDetector):
|
class RequestBody(StyleFormSerializer, JSONDetector):
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import typing
|
import typing_extensions
|
||||||
|
|
||||||
from unit_test_api.paths import PathValues
|
from unit_test_api.paths import PathValues
|
||||||
from unit_test_api.apis.paths.request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body import RequestBodyPostAdditionalpropertiesAllowsASchemaWhichShouldValidateRequestBody
|
from unit_test_api.apis.paths.request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body import RequestBodyPostAdditionalpropertiesAllowsASchemaWhichShouldValidateRequestBody
|
||||||
@ -176,7 +176,7 @@ from unit_test_api.apis.paths.response_body_post_uniqueitems_validation_response
|
|||||||
from unit_test_api.apis.paths.request_body_post_uniqueitems_false_validation_request_body import RequestBodyPostUniqueitemsFalseValidationRequestBody
|
from unit_test_api.apis.paths.request_body_post_uniqueitems_false_validation_request_body import RequestBodyPostUniqueitemsFalseValidationRequestBody
|
||||||
from unit_test_api.apis.paths.response_body_post_uniqueitems_false_validation_response_body_for_content_types import ResponseBodyPostUniqueitemsFalseValidationResponseBodyForContentTypes
|
from unit_test_api.apis.paths.response_body_post_uniqueitems_false_validation_response_body_for_content_types import ResponseBodyPostUniqueitemsFalseValidationResponseBodyForContentTypes
|
||||||
|
|
||||||
PathToApi = typing.TypedDict(
|
PathToApi = typing_extensions.TypedDict(
|
||||||
'PathToApi',
|
'PathToApi',
|
||||||
{
|
{
|
||||||
PathValues.REQUEST_BODY_POST_ADDITIONALPROPERTIES_ALLOWS_ASCHEMA_WHICH_SHOULD_VALIDATE_REQUEST_BODY: RequestBodyPostAdditionalpropertiesAllowsASchemaWhichShouldValidateRequestBody,
|
PathValues.REQUEST_BODY_POST_ADDITIONALPROPERTIES_ALLOWS_ASCHEMA_WHICH_SHOULD_VALIDATE_REQUEST_BODY: RequestBodyPostAdditionalpropertiesAllowsASchemaWhichShouldValidateRequestBody,
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import typing
|
import typing_extensions
|
||||||
|
|
||||||
from unit_test_api.apis.tags import TagValues
|
from unit_test_api.apis.tags import TagValues
|
||||||
from unit_test_api.apis.tags.operation_request_body_api import OperationRequestBodyApi
|
from unit_test_api.apis.tags.operation_request_body_api import OperationRequestBodyApi
|
||||||
@ -30,7 +30,7 @@ from unit_test_api.apis.tags.required_api import RequiredApi
|
|||||||
from unit_test_api.apis.tags.type_api import TypeApi
|
from unit_test_api.apis.tags.type_api import TypeApi
|
||||||
from unit_test_api.apis.tags.unique_items_api import UniqueItemsApi
|
from unit_test_api.apis.tags.unique_items_api import UniqueItemsApi
|
||||||
|
|
||||||
TagToApi = typing.TypedDict(
|
TagToApi = typing_extensions.TypedDict(
|
||||||
'TagToApi',
|
'TagToApi',
|
||||||
{
|
{
|
||||||
TagValues.OPERATION_REQUEST_BODY: OperationRequestBodyApi,
|
TagValues.OPERATION_REQUEST_BODY: OperationRequestBodyApi,
|
||||||
|
@ -15,6 +15,7 @@ import functools # noqa: F401
|
|||||||
import io # noqa: F401
|
import io # noqa: F401
|
||||||
import re # noqa: F401
|
import re # noqa: F401
|
||||||
import typing # noqa: F401
|
import typing # noqa: F401
|
||||||
|
import typing_extensions # noqa: F401
|
||||||
import uuid # noqa: F401
|
import uuid # noqa: F401
|
||||||
|
|
||||||
import frozendict # noqa: F401
|
import frozendict # noqa: F401
|
||||||
@ -44,28 +45,28 @@ class AdditionalpropertiesAllowsASchemaWhichShouldValidate(
|
|||||||
additional_properties = schemas.BoolSchema
|
additional_properties = schemas.BoolSchema
|
||||||
|
|
||||||
@typing.overload
|
@typing.overload
|
||||||
def __getitem__(self, name: typing.Literal["foo"]) -> MetaOapg.properties.foo: ...
|
def __getitem__(self, name: typing_extensions.Literal["foo"]) -> MetaOapg.properties.foo: ...
|
||||||
|
|
||||||
@typing.overload
|
@typing.overload
|
||||||
def __getitem__(self, name: typing.Literal["bar"]) -> MetaOapg.properties.bar: ...
|
def __getitem__(self, name: typing_extensions.Literal["bar"]) -> MetaOapg.properties.bar: ...
|
||||||
|
|
||||||
@typing.overload
|
@typing.overload
|
||||||
def __getitem__(self, name: str) -> MetaOapg.additional_properties: ...
|
def __getitem__(self, name: str) -> MetaOapg.additional_properties: ...
|
||||||
|
|
||||||
def __getitem__(self, name: typing.Union[typing.Literal["foo"], typing.Literal["bar"], str, ]):
|
def __getitem__(self, name: typing.Union[typing_extensions.Literal["foo"], typing_extensions.Literal["bar"], str, ]):
|
||||||
# dict_instance[name] accessor
|
# dict_instance[name] accessor
|
||||||
return super().__getitem__(name)
|
return super().__getitem__(name)
|
||||||
|
|
||||||
@typing.overload
|
@typing.overload
|
||||||
def get_item_oapg(self, name: typing.Literal["foo"]) -> typing.Union[MetaOapg.properties.foo, schemas.Unset]: ...
|
def get_item_oapg(self, name: typing_extensions.Literal["foo"]) -> typing.Union[MetaOapg.properties.foo, schemas.Unset]: ...
|
||||||
|
|
||||||
@typing.overload
|
@typing.overload
|
||||||
def get_item_oapg(self, name: typing.Literal["bar"]) -> typing.Union[MetaOapg.properties.bar, schemas.Unset]: ...
|
def get_item_oapg(self, name: typing_extensions.Literal["bar"]) -> typing.Union[MetaOapg.properties.bar, schemas.Unset]: ...
|
||||||
|
|
||||||
@typing.overload
|
@typing.overload
|
||||||
def get_item_oapg(self, name: str) -> typing.Union[MetaOapg.additional_properties, schemas.Unset]: ...
|
def get_item_oapg(self, name: str) -> typing.Union[MetaOapg.additional_properties, schemas.Unset]: ...
|
||||||
|
|
||||||
def get_item_oapg(self, name: typing.Union[typing.Literal["foo"], typing.Literal["bar"], str, ]):
|
def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["foo"], typing_extensions.Literal["bar"], str, ]):
|
||||||
return super().get_item_oapg(name)
|
return super().get_item_oapg(name)
|
||||||
|
|
||||||
def __new__(
|
def __new__(
|
||||||
|
@ -15,6 +15,7 @@ import functools # noqa: F401
|
|||||||
import io # noqa: F401
|
import io # noqa: F401
|
||||||
import re # noqa: F401
|
import re # noqa: F401
|
||||||
import typing # noqa: F401
|
import typing # noqa: F401
|
||||||
|
import typing_extensions # noqa: F401
|
||||||
import uuid # noqa: F401
|
import uuid # noqa: F401
|
||||||
|
|
||||||
import frozendict # noqa: F401
|
import frozendict # noqa: F401
|
||||||
@ -44,28 +45,28 @@ class AdditionalpropertiesAllowsASchemaWhichShouldValidate(
|
|||||||
additional_properties = schemas.BoolSchema
|
additional_properties = schemas.BoolSchema
|
||||||
|
|
||||||
@typing.overload
|
@typing.overload
|
||||||
def __getitem__(self, name: typing.Literal["foo"]) -> MetaOapg.properties.foo: ...
|
def __getitem__(self, name: typing_extensions.Literal["foo"]) -> MetaOapg.properties.foo: ...
|
||||||
|
|
||||||
@typing.overload
|
@typing.overload
|
||||||
def __getitem__(self, name: typing.Literal["bar"]) -> MetaOapg.properties.bar: ...
|
def __getitem__(self, name: typing_extensions.Literal["bar"]) -> MetaOapg.properties.bar: ...
|
||||||
|
|
||||||
@typing.overload
|
@typing.overload
|
||||||
def __getitem__(self, name: str) -> MetaOapg.additional_properties: ...
|
def __getitem__(self, name: str) -> MetaOapg.additional_properties: ...
|
||||||
|
|
||||||
def __getitem__(self, name: typing.Union[typing.Literal["foo"], typing.Literal["bar"], str, ]):
|
def __getitem__(self, name: typing.Union[typing_extensions.Literal["foo"], typing_extensions.Literal["bar"], str, ]):
|
||||||
# dict_instance[name] accessor
|
# dict_instance[name] accessor
|
||||||
return super().__getitem__(name)
|
return super().__getitem__(name)
|
||||||
|
|
||||||
@typing.overload
|
@typing.overload
|
||||||
def get_item_oapg(self, name: typing.Literal["foo"]) -> typing.Union[MetaOapg.properties.foo, schemas.Unset]: ...
|
def get_item_oapg(self, name: typing_extensions.Literal["foo"]) -> typing.Union[MetaOapg.properties.foo, schemas.Unset]: ...
|
||||||
|
|
||||||
@typing.overload
|
@typing.overload
|
||||||
def get_item_oapg(self, name: typing.Literal["bar"]) -> typing.Union[MetaOapg.properties.bar, schemas.Unset]: ...
|
def get_item_oapg(self, name: typing_extensions.Literal["bar"]) -> typing.Union[MetaOapg.properties.bar, schemas.Unset]: ...
|
||||||
|
|
||||||
@typing.overload
|
@typing.overload
|
||||||
def get_item_oapg(self, name: str) -> typing.Union[MetaOapg.additional_properties, schemas.Unset]: ...
|
def get_item_oapg(self, name: str) -> typing.Union[MetaOapg.additional_properties, schemas.Unset]: ...
|
||||||
|
|
||||||
def get_item_oapg(self, name: typing.Union[typing.Literal["foo"], typing.Literal["bar"], str, ]):
|
def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["foo"], typing_extensions.Literal["bar"], str, ]):
|
||||||
return super().get_item_oapg(name)
|
return super().get_item_oapg(name)
|
||||||
|
|
||||||
def __new__(
|
def __new__(
|
||||||
|
@ -15,6 +15,7 @@ import functools # noqa: F401
|
|||||||
import io # noqa: F401
|
import io # noqa: F401
|
||||||
import re # noqa: F401
|
import re # noqa: F401
|
||||||
import typing # noqa: F401
|
import typing # noqa: F401
|
||||||
|
import typing_extensions # noqa: F401
|
||||||
import uuid # noqa: F401
|
import uuid # noqa: F401
|
||||||
|
|
||||||
import frozendict # noqa: F401
|
import frozendict # noqa: F401
|
||||||
@ -44,29 +45,29 @@ class AdditionalpropertiesAreAllowedByDefault(
|
|||||||
|
|
||||||
|
|
||||||
@typing.overload
|
@typing.overload
|
||||||
def __getitem__(self, name: typing.Literal["foo"]) -> MetaOapg.properties.foo: ...
|
def __getitem__(self, name: typing_extensions.Literal["foo"]) -> MetaOapg.properties.foo: ...
|
||||||
|
|
||||||
@typing.overload
|
@typing.overload
|
||||||
def __getitem__(self, name: typing.Literal["bar"]) -> MetaOapg.properties.bar: ...
|
def __getitem__(self, name: typing_extensions.Literal["bar"]) -> MetaOapg.properties.bar: ...
|
||||||
|
|
||||||
@typing.overload
|
@typing.overload
|
||||||
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
|
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
|
||||||
|
|
||||||
def __getitem__(self, name: typing.Union[typing.Literal["foo", "bar", ], str]):
|
def __getitem__(self, name: typing.Union[typing_extensions.Literal["foo", "bar", ], str]):
|
||||||
# dict_instance[name] accessor
|
# dict_instance[name] accessor
|
||||||
return super().__getitem__(name)
|
return super().__getitem__(name)
|
||||||
|
|
||||||
|
|
||||||
@typing.overload
|
@typing.overload
|
||||||
def get_item_oapg(self, name: typing.Literal["foo"]) -> typing.Union[MetaOapg.properties.foo, schemas.Unset]: ...
|
def get_item_oapg(self, name: typing_extensions.Literal["foo"]) -> typing.Union[MetaOapg.properties.foo, schemas.Unset]: ...
|
||||||
|
|
||||||
@typing.overload
|
@typing.overload
|
||||||
def get_item_oapg(self, name: typing.Literal["bar"]) -> typing.Union[MetaOapg.properties.bar, schemas.Unset]: ...
|
def get_item_oapg(self, name: typing_extensions.Literal["bar"]) -> typing.Union[MetaOapg.properties.bar, schemas.Unset]: ...
|
||||||
|
|
||||||
@typing.overload
|
@typing.overload
|
||||||
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
|
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
|
||||||
|
|
||||||
def get_item_oapg(self, name: typing.Union[typing.Literal["foo", "bar", ], str]):
|
def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["foo", "bar", ], str]):
|
||||||
return super().get_item_oapg(name)
|
return super().get_item_oapg(name)
|
||||||
|
|
||||||
|
|
||||||
|
@ -15,6 +15,7 @@ import functools # noqa: F401
|
|||||||
import io # noqa: F401
|
import io # noqa: F401
|
||||||
import re # noqa: F401
|
import re # noqa: F401
|
||||||
import typing # noqa: F401
|
import typing # noqa: F401
|
||||||
|
import typing_extensions # noqa: F401
|
||||||
import uuid # noqa: F401
|
import uuid # noqa: F401
|
||||||
|
|
||||||
import frozendict # noqa: F401
|
import frozendict # noqa: F401
|
||||||
@ -44,29 +45,29 @@ class AdditionalpropertiesAreAllowedByDefault(
|
|||||||
|
|
||||||
|
|
||||||
@typing.overload
|
@typing.overload
|
||||||
def __getitem__(self, name: typing.Literal["foo"]) -> MetaOapg.properties.foo: ...
|
def __getitem__(self, name: typing_extensions.Literal["foo"]) -> MetaOapg.properties.foo: ...
|
||||||
|
|
||||||
@typing.overload
|
@typing.overload
|
||||||
def __getitem__(self, name: typing.Literal["bar"]) -> MetaOapg.properties.bar: ...
|
def __getitem__(self, name: typing_extensions.Literal["bar"]) -> MetaOapg.properties.bar: ...
|
||||||
|
|
||||||
@typing.overload
|
@typing.overload
|
||||||
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
|
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
|
||||||
|
|
||||||
def __getitem__(self, name: typing.Union[typing.Literal["foo", "bar", ], str]):
|
def __getitem__(self, name: typing.Union[typing_extensions.Literal["foo", "bar", ], str]):
|
||||||
# dict_instance[name] accessor
|
# dict_instance[name] accessor
|
||||||
return super().__getitem__(name)
|
return super().__getitem__(name)
|
||||||
|
|
||||||
|
|
||||||
@typing.overload
|
@typing.overload
|
||||||
def get_item_oapg(self, name: typing.Literal["foo"]) -> typing.Union[MetaOapg.properties.foo, schemas.Unset]: ...
|
def get_item_oapg(self, name: typing_extensions.Literal["foo"]) -> typing.Union[MetaOapg.properties.foo, schemas.Unset]: ...
|
||||||
|
|
||||||
@typing.overload
|
@typing.overload
|
||||||
def get_item_oapg(self, name: typing.Literal["bar"]) -> typing.Union[MetaOapg.properties.bar, schemas.Unset]: ...
|
def get_item_oapg(self, name: typing_extensions.Literal["bar"]) -> typing.Union[MetaOapg.properties.bar, schemas.Unset]: ...
|
||||||
|
|
||||||
@typing.overload
|
@typing.overload
|
||||||
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
|
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
|
||||||
|
|
||||||
def get_item_oapg(self, name: typing.Union[typing.Literal["foo", "bar", ], str]):
|
def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["foo", "bar", ], str]):
|
||||||
return super().get_item_oapg(name)
|
return super().get_item_oapg(name)
|
||||||
|
|
||||||
|
|
||||||
|
@ -15,6 +15,7 @@ import functools # noqa: F401
|
|||||||
import io # noqa: F401
|
import io # noqa: F401
|
||||||
import re # noqa: F401
|
import re # noqa: F401
|
||||||
import typing # noqa: F401
|
import typing # noqa: F401
|
||||||
|
import typing_extensions # noqa: F401
|
||||||
import uuid # noqa: F401
|
import uuid # noqa: F401
|
||||||
|
|
||||||
import frozendict # noqa: F401
|
import frozendict # noqa: F401
|
||||||
|
@ -15,6 +15,7 @@ import functools # noqa: F401
|
|||||||
import io # noqa: F401
|
import io # noqa: F401
|
||||||
import re # noqa: F401
|
import re # noqa: F401
|
||||||
import typing # noqa: F401
|
import typing # noqa: F401
|
||||||
|
import typing_extensions # noqa: F401
|
||||||
import uuid # noqa: F401
|
import uuid # noqa: F401
|
||||||
|
|
||||||
import frozendict # noqa: F401
|
import frozendict # noqa: F401
|
||||||
|
@ -15,6 +15,7 @@ import functools # noqa: F401
|
|||||||
import io # noqa: F401
|
import io # noqa: F401
|
||||||
import re # noqa: F401
|
import re # noqa: F401
|
||||||
import typing # noqa: F401
|
import typing # noqa: F401
|
||||||
|
import typing_extensions # noqa: F401
|
||||||
import uuid # noqa: F401
|
import uuid # noqa: F401
|
||||||
|
|
||||||
import frozendict # noqa: F401
|
import frozendict # noqa: F401
|
||||||
@ -51,23 +52,23 @@ class AdditionalpropertiesShouldNotLookInApplicators(
|
|||||||
|
|
||||||
|
|
||||||
@typing.overload
|
@typing.overload
|
||||||
def __getitem__(self, name: typing.Literal["foo"]) -> MetaOapg.properties.foo: ...
|
def __getitem__(self, name: typing_extensions.Literal["foo"]) -> MetaOapg.properties.foo: ...
|
||||||
|
|
||||||
@typing.overload
|
@typing.overload
|
||||||
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
|
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
|
||||||
|
|
||||||
def __getitem__(self, name: typing.Union[typing.Literal["foo", ], str]):
|
def __getitem__(self, name: typing.Union[typing_extensions.Literal["foo", ], str]):
|
||||||
# dict_instance[name] accessor
|
# dict_instance[name] accessor
|
||||||
return super().__getitem__(name)
|
return super().__getitem__(name)
|
||||||
|
|
||||||
|
|
||||||
@typing.overload
|
@typing.overload
|
||||||
def get_item_oapg(self, name: typing.Literal["foo"]) -> typing.Union[MetaOapg.properties.foo, schemas.Unset]: ...
|
def get_item_oapg(self, name: typing_extensions.Literal["foo"]) -> typing.Union[MetaOapg.properties.foo, schemas.Unset]: ...
|
||||||
|
|
||||||
@typing.overload
|
@typing.overload
|
||||||
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
|
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
|
||||||
|
|
||||||
def get_item_oapg(self, name: typing.Union[typing.Literal["foo", ], str]):
|
def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["foo", ], str]):
|
||||||
return super().get_item_oapg(name)
|
return super().get_item_oapg(name)
|
||||||
|
|
||||||
|
|
||||||
@ -87,8 +88,7 @@ class AdditionalpropertiesShouldNotLookInApplicators(
|
|||||||
)
|
)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
@property
|
@functools.lru_cache()
|
||||||
@functools.cache
|
|
||||||
def all_of(cls):
|
def all_of(cls):
|
||||||
# we need this here to make our import statements work
|
# we need this here to make our import statements work
|
||||||
# we must store _composed_schemas in here so the code is only run
|
# we must store _composed_schemas in here so the code is only run
|
||||||
|
@ -15,6 +15,7 @@ import functools # noqa: F401
|
|||||||
import io # noqa: F401
|
import io # noqa: F401
|
||||||
import re # noqa: F401
|
import re # noqa: F401
|
||||||
import typing # noqa: F401
|
import typing # noqa: F401
|
||||||
|
import typing_extensions # noqa: F401
|
||||||
import uuid # noqa: F401
|
import uuid # noqa: F401
|
||||||
|
|
||||||
import frozendict # noqa: F401
|
import frozendict # noqa: F401
|
||||||
@ -51,23 +52,23 @@ class AdditionalpropertiesShouldNotLookInApplicators(
|
|||||||
|
|
||||||
|
|
||||||
@typing.overload
|
@typing.overload
|
||||||
def __getitem__(self, name: typing.Literal["foo"]) -> MetaOapg.properties.foo: ...
|
def __getitem__(self, name: typing_extensions.Literal["foo"]) -> MetaOapg.properties.foo: ...
|
||||||
|
|
||||||
@typing.overload
|
@typing.overload
|
||||||
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
|
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
|
||||||
|
|
||||||
def __getitem__(self, name: typing.Union[typing.Literal["foo", ], str]):
|
def __getitem__(self, name: typing.Union[typing_extensions.Literal["foo", ], str]):
|
||||||
# dict_instance[name] accessor
|
# dict_instance[name] accessor
|
||||||
return super().__getitem__(name)
|
return super().__getitem__(name)
|
||||||
|
|
||||||
|
|
||||||
@typing.overload
|
@typing.overload
|
||||||
def get_item_oapg(self, name: typing.Literal["foo"]) -> typing.Union[MetaOapg.properties.foo, schemas.Unset]: ...
|
def get_item_oapg(self, name: typing_extensions.Literal["foo"]) -> typing.Union[MetaOapg.properties.foo, schemas.Unset]: ...
|
||||||
|
|
||||||
@typing.overload
|
@typing.overload
|
||||||
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
|
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
|
||||||
|
|
||||||
def get_item_oapg(self, name: typing.Union[typing.Literal["foo", ], str]):
|
def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["foo", ], str]):
|
||||||
return super().get_item_oapg(name)
|
return super().get_item_oapg(name)
|
||||||
|
|
||||||
|
|
||||||
@ -87,8 +88,7 @@ class AdditionalpropertiesShouldNotLookInApplicators(
|
|||||||
)
|
)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
@property
|
@functools.lru_cache()
|
||||||
@functools.cache
|
|
||||||
def all_of(cls):
|
def all_of(cls):
|
||||||
# we need this here to make our import statements work
|
# we need this here to make our import statements work
|
||||||
# we must store _composed_schemas in here so the code is only run
|
# we must store _composed_schemas in here so the code is only run
|
||||||
|
@ -15,6 +15,7 @@ import functools # noqa: F401
|
|||||||
import io # noqa: F401
|
import io # noqa: F401
|
||||||
import re # noqa: F401
|
import re # noqa: F401
|
||||||
import typing # noqa: F401
|
import typing # noqa: F401
|
||||||
|
import typing_extensions # noqa: F401
|
||||||
import uuid # noqa: F401
|
import uuid # noqa: F401
|
||||||
|
|
||||||
import frozendict # noqa: F401
|
import frozendict # noqa: F401
|
||||||
@ -55,23 +56,23 @@ class Allof(
|
|||||||
bar: MetaOapg.properties.bar
|
bar: MetaOapg.properties.bar
|
||||||
|
|
||||||
@typing.overload
|
@typing.overload
|
||||||
def __getitem__(self, name: typing.Literal["bar"]) -> MetaOapg.properties.bar: ...
|
def __getitem__(self, name: typing_extensions.Literal["bar"]) -> MetaOapg.properties.bar: ...
|
||||||
|
|
||||||
@typing.overload
|
@typing.overload
|
||||||
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
|
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
|
||||||
|
|
||||||
def __getitem__(self, name: typing.Union[typing.Literal["bar", ], str]):
|
def __getitem__(self, name: typing.Union[typing_extensions.Literal["bar", ], str]):
|
||||||
# dict_instance[name] accessor
|
# dict_instance[name] accessor
|
||||||
return super().__getitem__(name)
|
return super().__getitem__(name)
|
||||||
|
|
||||||
|
|
||||||
@typing.overload
|
@typing.overload
|
||||||
def get_item_oapg(self, name: typing.Literal["bar"]) -> MetaOapg.properties.bar: ...
|
def get_item_oapg(self, name: typing_extensions.Literal["bar"]) -> MetaOapg.properties.bar: ...
|
||||||
|
|
||||||
@typing.overload
|
@typing.overload
|
||||||
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
|
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
|
||||||
|
|
||||||
def get_item_oapg(self, name: typing.Union[typing.Literal["bar", ], str]):
|
def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["bar", ], str]):
|
||||||
return super().get_item_oapg(name)
|
return super().get_item_oapg(name)
|
||||||
|
|
||||||
|
|
||||||
@ -111,23 +112,23 @@ class Allof(
|
|||||||
foo: MetaOapg.properties.foo
|
foo: MetaOapg.properties.foo
|
||||||
|
|
||||||
@typing.overload
|
@typing.overload
|
||||||
def __getitem__(self, name: typing.Literal["foo"]) -> MetaOapg.properties.foo: ...
|
def __getitem__(self, name: typing_extensions.Literal["foo"]) -> MetaOapg.properties.foo: ...
|
||||||
|
|
||||||
@typing.overload
|
@typing.overload
|
||||||
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
|
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
|
||||||
|
|
||||||
def __getitem__(self, name: typing.Union[typing.Literal["foo", ], str]):
|
def __getitem__(self, name: typing.Union[typing_extensions.Literal["foo", ], str]):
|
||||||
# dict_instance[name] accessor
|
# dict_instance[name] accessor
|
||||||
return super().__getitem__(name)
|
return super().__getitem__(name)
|
||||||
|
|
||||||
|
|
||||||
@typing.overload
|
@typing.overload
|
||||||
def get_item_oapg(self, name: typing.Literal["foo"]) -> MetaOapg.properties.foo: ...
|
def get_item_oapg(self, name: typing_extensions.Literal["foo"]) -> MetaOapg.properties.foo: ...
|
||||||
|
|
||||||
@typing.overload
|
@typing.overload
|
||||||
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
|
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
|
||||||
|
|
||||||
def get_item_oapg(self, name: typing.Union[typing.Literal["foo", ], str]):
|
def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["foo", ], str]):
|
||||||
return super().get_item_oapg(name)
|
return super().get_item_oapg(name)
|
||||||
|
|
||||||
|
|
||||||
@ -147,8 +148,7 @@ class Allof(
|
|||||||
)
|
)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
@property
|
@functools.lru_cache()
|
||||||
@functools.cache
|
|
||||||
def all_of(cls):
|
def all_of(cls):
|
||||||
# we need this here to make our import statements work
|
# we need this here to make our import statements work
|
||||||
# we must store _composed_schemas in here so the code is only run
|
# we must store _composed_schemas in here so the code is only run
|
||||||
|
@ -15,6 +15,7 @@ import functools # noqa: F401
|
|||||||
import io # noqa: F401
|
import io # noqa: F401
|
||||||
import re # noqa: F401
|
import re # noqa: F401
|
||||||
import typing # noqa: F401
|
import typing # noqa: F401
|
||||||
|
import typing_extensions # noqa: F401
|
||||||
import uuid # noqa: F401
|
import uuid # noqa: F401
|
||||||
|
|
||||||
import frozendict # noqa: F401
|
import frozendict # noqa: F401
|
||||||
@ -55,23 +56,23 @@ class Allof(
|
|||||||
bar: MetaOapg.properties.bar
|
bar: MetaOapg.properties.bar
|
||||||
|
|
||||||
@typing.overload
|
@typing.overload
|
||||||
def __getitem__(self, name: typing.Literal["bar"]) -> MetaOapg.properties.bar: ...
|
def __getitem__(self, name: typing_extensions.Literal["bar"]) -> MetaOapg.properties.bar: ...
|
||||||
|
|
||||||
@typing.overload
|
@typing.overload
|
||||||
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
|
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
|
||||||
|
|
||||||
def __getitem__(self, name: typing.Union[typing.Literal["bar", ], str]):
|
def __getitem__(self, name: typing.Union[typing_extensions.Literal["bar", ], str]):
|
||||||
# dict_instance[name] accessor
|
# dict_instance[name] accessor
|
||||||
return super().__getitem__(name)
|
return super().__getitem__(name)
|
||||||
|
|
||||||
|
|
||||||
@typing.overload
|
@typing.overload
|
||||||
def get_item_oapg(self, name: typing.Literal["bar"]) -> MetaOapg.properties.bar: ...
|
def get_item_oapg(self, name: typing_extensions.Literal["bar"]) -> MetaOapg.properties.bar: ...
|
||||||
|
|
||||||
@typing.overload
|
@typing.overload
|
||||||
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
|
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
|
||||||
|
|
||||||
def get_item_oapg(self, name: typing.Union[typing.Literal["bar", ], str]):
|
def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["bar", ], str]):
|
||||||
return super().get_item_oapg(name)
|
return super().get_item_oapg(name)
|
||||||
|
|
||||||
|
|
||||||
@ -111,23 +112,23 @@ class Allof(
|
|||||||
foo: MetaOapg.properties.foo
|
foo: MetaOapg.properties.foo
|
||||||
|
|
||||||
@typing.overload
|
@typing.overload
|
||||||
def __getitem__(self, name: typing.Literal["foo"]) -> MetaOapg.properties.foo: ...
|
def __getitem__(self, name: typing_extensions.Literal["foo"]) -> MetaOapg.properties.foo: ...
|
||||||
|
|
||||||
@typing.overload
|
@typing.overload
|
||||||
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
|
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
|
||||||
|
|
||||||
def __getitem__(self, name: typing.Union[typing.Literal["foo", ], str]):
|
def __getitem__(self, name: typing.Union[typing_extensions.Literal["foo", ], str]):
|
||||||
# dict_instance[name] accessor
|
# dict_instance[name] accessor
|
||||||
return super().__getitem__(name)
|
return super().__getitem__(name)
|
||||||
|
|
||||||
|
|
||||||
@typing.overload
|
@typing.overload
|
||||||
def get_item_oapg(self, name: typing.Literal["foo"]) -> MetaOapg.properties.foo: ...
|
def get_item_oapg(self, name: typing_extensions.Literal["foo"]) -> MetaOapg.properties.foo: ...
|
||||||
|
|
||||||
@typing.overload
|
@typing.overload
|
||||||
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
|
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
|
||||||
|
|
||||||
def get_item_oapg(self, name: typing.Union[typing.Literal["foo", ], str]):
|
def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["foo", ], str]):
|
||||||
return super().get_item_oapg(name)
|
return super().get_item_oapg(name)
|
||||||
|
|
||||||
|
|
||||||
@ -147,8 +148,7 @@ class Allof(
|
|||||||
)
|
)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
@property
|
@functools.lru_cache()
|
||||||
@functools.cache
|
|
||||||
def all_of(cls):
|
def all_of(cls):
|
||||||
# we need this here to make our import statements work
|
# we need this here to make our import statements work
|
||||||
# we must store _composed_schemas in here so the code is only run
|
# we must store _composed_schemas in here so the code is only run
|
||||||
|
@ -15,6 +15,7 @@ import functools # noqa: F401
|
|||||||
import io # noqa: F401
|
import io # noqa: F401
|
||||||
import re # noqa: F401
|
import re # noqa: F401
|
||||||
import typing # noqa: F401
|
import typing # noqa: F401
|
||||||
|
import typing_extensions # noqa: F401
|
||||||
import uuid # noqa: F401
|
import uuid # noqa: F401
|
||||||
|
|
||||||
import frozendict # noqa: F401
|
import frozendict # noqa: F401
|
||||||
@ -104,8 +105,7 @@ class AllofCombinedWithAnyofOneof(
|
|||||||
)
|
)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
@property
|
@functools.lru_cache()
|
||||||
@functools.cache
|
|
||||||
def all_of(cls):
|
def all_of(cls):
|
||||||
# we need this here to make our import statements work
|
# we need this here to make our import statements work
|
||||||
# we must store _composed_schemas in here so the code is only run
|
# we must store _composed_schemas in here so the code is only run
|
||||||
@ -119,8 +119,7 @@ class AllofCombinedWithAnyofOneof(
|
|||||||
]
|
]
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
@property
|
@functools.lru_cache()
|
||||||
@functools.cache
|
|
||||||
def one_of(cls):
|
def one_of(cls):
|
||||||
# we need this here to make our import statements work
|
# we need this here to make our import statements work
|
||||||
# we must store _composed_schemas in here so the code is only run
|
# we must store _composed_schemas in here so the code is only run
|
||||||
@ -134,8 +133,7 @@ class AllofCombinedWithAnyofOneof(
|
|||||||
]
|
]
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
@property
|
@functools.lru_cache()
|
||||||
@functools.cache
|
|
||||||
def any_of(cls):
|
def any_of(cls):
|
||||||
# we need this here to make our import statements work
|
# we need this here to make our import statements work
|
||||||
# we must store _composed_schemas in here so the code is only run
|
# we must store _composed_schemas in here so the code is only run
|
||||||
|
@ -15,6 +15,7 @@ import functools # noqa: F401
|
|||||||
import io # noqa: F401
|
import io # noqa: F401
|
||||||
import re # noqa: F401
|
import re # noqa: F401
|
||||||
import typing # noqa: F401
|
import typing # noqa: F401
|
||||||
|
import typing_extensions # noqa: F401
|
||||||
import uuid # noqa: F401
|
import uuid # noqa: F401
|
||||||
|
|
||||||
import frozendict # noqa: F401
|
import frozendict # noqa: F401
|
||||||
@ -101,8 +102,7 @@ class AllofCombinedWithAnyofOneof(
|
|||||||
)
|
)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
@property
|
@functools.lru_cache()
|
||||||
@functools.cache
|
|
||||||
def all_of(cls):
|
def all_of(cls):
|
||||||
# we need this here to make our import statements work
|
# we need this here to make our import statements work
|
||||||
# we must store _composed_schemas in here so the code is only run
|
# we must store _composed_schemas in here so the code is only run
|
||||||
@ -116,8 +116,7 @@ class AllofCombinedWithAnyofOneof(
|
|||||||
]
|
]
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
@property
|
@functools.lru_cache()
|
||||||
@functools.cache
|
|
||||||
def one_of(cls):
|
def one_of(cls):
|
||||||
# we need this here to make our import statements work
|
# we need this here to make our import statements work
|
||||||
# we must store _composed_schemas in here so the code is only run
|
# we must store _composed_schemas in here so the code is only run
|
||||||
@ -131,8 +130,7 @@ class AllofCombinedWithAnyofOneof(
|
|||||||
]
|
]
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
@property
|
@functools.lru_cache()
|
||||||
@functools.cache
|
|
||||||
def any_of(cls):
|
def any_of(cls):
|
||||||
# we need this here to make our import statements work
|
# we need this here to make our import statements work
|
||||||
# we must store _composed_schemas in here so the code is only run
|
# we must store _composed_schemas in here so the code is only run
|
||||||
|
@ -15,6 +15,7 @@ import functools # noqa: F401
|
|||||||
import io # noqa: F401
|
import io # noqa: F401
|
||||||
import re # noqa: F401
|
import re # noqa: F401
|
||||||
import typing # noqa: F401
|
import typing # noqa: F401
|
||||||
|
import typing_extensions # noqa: F401
|
||||||
import uuid # noqa: F401
|
import uuid # noqa: F401
|
||||||
|
|
||||||
import frozendict # noqa: F401
|
import frozendict # noqa: F401
|
||||||
@ -81,8 +82,7 @@ class AllofSimpleTypes(
|
|||||||
)
|
)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
@property
|
@functools.lru_cache()
|
||||||
@functools.cache
|
|
||||||
def all_of(cls):
|
def all_of(cls):
|
||||||
# we need this here to make our import statements work
|
# we need this here to make our import statements work
|
||||||
# we must store _composed_schemas in here so the code is only run
|
# we must store _composed_schemas in here so the code is only run
|
||||||
|
@ -15,6 +15,7 @@ import functools # noqa: F401
|
|||||||
import io # noqa: F401
|
import io # noqa: F401
|
||||||
import re # noqa: F401
|
import re # noqa: F401
|
||||||
import typing # noqa: F401
|
import typing # noqa: F401
|
||||||
|
import typing_extensions # noqa: F401
|
||||||
import uuid # noqa: F401
|
import uuid # noqa: F401
|
||||||
|
|
||||||
import frozendict # noqa: F401
|
import frozendict # noqa: F401
|
||||||
@ -79,8 +80,7 @@ class AllofSimpleTypes(
|
|||||||
)
|
)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
@property
|
@functools.lru_cache()
|
||||||
@functools.cache
|
|
||||||
def all_of(cls):
|
def all_of(cls):
|
||||||
# we need this here to make our import statements work
|
# we need this here to make our import statements work
|
||||||
# we must store _composed_schemas in here so the code is only run
|
# we must store _composed_schemas in here so the code is only run
|
||||||
|
@ -15,6 +15,7 @@ import functools # noqa: F401
|
|||||||
import io # noqa: F401
|
import io # noqa: F401
|
||||||
import re # noqa: F401
|
import re # noqa: F401
|
||||||
import typing # noqa: F401
|
import typing # noqa: F401
|
||||||
|
import typing_extensions # noqa: F401
|
||||||
import uuid # noqa: F401
|
import uuid # noqa: F401
|
||||||
|
|
||||||
import frozendict # noqa: F401
|
import frozendict # noqa: F401
|
||||||
@ -64,23 +65,23 @@ class AllofWithBaseSchema(
|
|||||||
foo: MetaOapg.properties.foo
|
foo: MetaOapg.properties.foo
|
||||||
|
|
||||||
@typing.overload
|
@typing.overload
|
||||||
def __getitem__(self, name: typing.Literal["foo"]) -> MetaOapg.properties.foo: ...
|
def __getitem__(self, name: typing_extensions.Literal["foo"]) -> MetaOapg.properties.foo: ...
|
||||||
|
|
||||||
@typing.overload
|
@typing.overload
|
||||||
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
|
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
|
||||||
|
|
||||||
def __getitem__(self, name: typing.Union[typing.Literal["foo", ], str]):
|
def __getitem__(self, name: typing.Union[typing_extensions.Literal["foo", ], str]):
|
||||||
# dict_instance[name] accessor
|
# dict_instance[name] accessor
|
||||||
return super().__getitem__(name)
|
return super().__getitem__(name)
|
||||||
|
|
||||||
|
|
||||||
@typing.overload
|
@typing.overload
|
||||||
def get_item_oapg(self, name: typing.Literal["foo"]) -> MetaOapg.properties.foo: ...
|
def get_item_oapg(self, name: typing_extensions.Literal["foo"]) -> MetaOapg.properties.foo: ...
|
||||||
|
|
||||||
@typing.overload
|
@typing.overload
|
||||||
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
|
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
|
||||||
|
|
||||||
def get_item_oapg(self, name: typing.Union[typing.Literal["foo", ], str]):
|
def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["foo", ], str]):
|
||||||
return super().get_item_oapg(name)
|
return super().get_item_oapg(name)
|
||||||
|
|
||||||
|
|
||||||
@ -120,23 +121,23 @@ class AllofWithBaseSchema(
|
|||||||
baz: MetaOapg.properties.baz
|
baz: MetaOapg.properties.baz
|
||||||
|
|
||||||
@typing.overload
|
@typing.overload
|
||||||
def __getitem__(self, name: typing.Literal["baz"]) -> MetaOapg.properties.baz: ...
|
def __getitem__(self, name: typing_extensions.Literal["baz"]) -> MetaOapg.properties.baz: ...
|
||||||
|
|
||||||
@typing.overload
|
@typing.overload
|
||||||
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
|
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
|
||||||
|
|
||||||
def __getitem__(self, name: typing.Union[typing.Literal["baz", ], str]):
|
def __getitem__(self, name: typing.Union[typing_extensions.Literal["baz", ], str]):
|
||||||
# dict_instance[name] accessor
|
# dict_instance[name] accessor
|
||||||
return super().__getitem__(name)
|
return super().__getitem__(name)
|
||||||
|
|
||||||
|
|
||||||
@typing.overload
|
@typing.overload
|
||||||
def get_item_oapg(self, name: typing.Literal["baz"]) -> MetaOapg.properties.baz: ...
|
def get_item_oapg(self, name: typing_extensions.Literal["baz"]) -> MetaOapg.properties.baz: ...
|
||||||
|
|
||||||
@typing.overload
|
@typing.overload
|
||||||
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
|
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
|
||||||
|
|
||||||
def get_item_oapg(self, name: typing.Union[typing.Literal["baz", ], str]):
|
def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["baz", ], str]):
|
||||||
return super().get_item_oapg(name)
|
return super().get_item_oapg(name)
|
||||||
|
|
||||||
|
|
||||||
@ -156,8 +157,7 @@ class AllofWithBaseSchema(
|
|||||||
)
|
)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
@property
|
@functools.lru_cache()
|
||||||
@functools.cache
|
|
||||||
def all_of(cls):
|
def all_of(cls):
|
||||||
# we need this here to make our import statements work
|
# we need this here to make our import statements work
|
||||||
# we must store _composed_schemas in here so the code is only run
|
# we must store _composed_schemas in here so the code is only run
|
||||||
@ -175,23 +175,23 @@ class AllofWithBaseSchema(
|
|||||||
bar: MetaOapg.properties.bar
|
bar: MetaOapg.properties.bar
|
||||||
|
|
||||||
@typing.overload
|
@typing.overload
|
||||||
def __getitem__(self, name: typing.Literal["bar"]) -> MetaOapg.properties.bar: ...
|
def __getitem__(self, name: typing_extensions.Literal["bar"]) -> MetaOapg.properties.bar: ...
|
||||||
|
|
||||||
@typing.overload
|
@typing.overload
|
||||||
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
|
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
|
||||||
|
|
||||||
def __getitem__(self, name: typing.Union[typing.Literal["bar", ], str]):
|
def __getitem__(self, name: typing.Union[typing_extensions.Literal["bar", ], str]):
|
||||||
# dict_instance[name] accessor
|
# dict_instance[name] accessor
|
||||||
return super().__getitem__(name)
|
return super().__getitem__(name)
|
||||||
|
|
||||||
|
|
||||||
@typing.overload
|
@typing.overload
|
||||||
def get_item_oapg(self, name: typing.Literal["bar"]) -> MetaOapg.properties.bar: ...
|
def get_item_oapg(self, name: typing_extensions.Literal["bar"]) -> MetaOapg.properties.bar: ...
|
||||||
|
|
||||||
@typing.overload
|
@typing.overload
|
||||||
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
|
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
|
||||||
|
|
||||||
def get_item_oapg(self, name: typing.Union[typing.Literal["bar", ], str]):
|
def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["bar", ], str]):
|
||||||
return super().get_item_oapg(name)
|
return super().get_item_oapg(name)
|
||||||
|
|
||||||
|
|
||||||
|
@ -15,6 +15,7 @@ import functools # noqa: F401
|
|||||||
import io # noqa: F401
|
import io # noqa: F401
|
||||||
import re # noqa: F401
|
import re # noqa: F401
|
||||||
import typing # noqa: F401
|
import typing # noqa: F401
|
||||||
|
import typing_extensions # noqa: F401
|
||||||
import uuid # noqa: F401
|
import uuid # noqa: F401
|
||||||
|
|
||||||
import frozendict # noqa: F401
|
import frozendict # noqa: F401
|
||||||
@ -64,23 +65,23 @@ class AllofWithBaseSchema(
|
|||||||
foo: MetaOapg.properties.foo
|
foo: MetaOapg.properties.foo
|
||||||
|
|
||||||
@typing.overload
|
@typing.overload
|
||||||
def __getitem__(self, name: typing.Literal["foo"]) -> MetaOapg.properties.foo: ...
|
def __getitem__(self, name: typing_extensions.Literal["foo"]) -> MetaOapg.properties.foo: ...
|
||||||
|
|
||||||
@typing.overload
|
@typing.overload
|
||||||
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
|
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
|
||||||
|
|
||||||
def __getitem__(self, name: typing.Union[typing.Literal["foo", ], str]):
|
def __getitem__(self, name: typing.Union[typing_extensions.Literal["foo", ], str]):
|
||||||
# dict_instance[name] accessor
|
# dict_instance[name] accessor
|
||||||
return super().__getitem__(name)
|
return super().__getitem__(name)
|
||||||
|
|
||||||
|
|
||||||
@typing.overload
|
@typing.overload
|
||||||
def get_item_oapg(self, name: typing.Literal["foo"]) -> MetaOapg.properties.foo: ...
|
def get_item_oapg(self, name: typing_extensions.Literal["foo"]) -> MetaOapg.properties.foo: ...
|
||||||
|
|
||||||
@typing.overload
|
@typing.overload
|
||||||
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
|
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
|
||||||
|
|
||||||
def get_item_oapg(self, name: typing.Union[typing.Literal["foo", ], str]):
|
def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["foo", ], str]):
|
||||||
return super().get_item_oapg(name)
|
return super().get_item_oapg(name)
|
||||||
|
|
||||||
|
|
||||||
@ -120,23 +121,23 @@ class AllofWithBaseSchema(
|
|||||||
baz: MetaOapg.properties.baz
|
baz: MetaOapg.properties.baz
|
||||||
|
|
||||||
@typing.overload
|
@typing.overload
|
||||||
def __getitem__(self, name: typing.Literal["baz"]) -> MetaOapg.properties.baz: ...
|
def __getitem__(self, name: typing_extensions.Literal["baz"]) -> MetaOapg.properties.baz: ...
|
||||||
|
|
||||||
@typing.overload
|
@typing.overload
|
||||||
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
|
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
|
||||||
|
|
||||||
def __getitem__(self, name: typing.Union[typing.Literal["baz", ], str]):
|
def __getitem__(self, name: typing.Union[typing_extensions.Literal["baz", ], str]):
|
||||||
# dict_instance[name] accessor
|
# dict_instance[name] accessor
|
||||||
return super().__getitem__(name)
|
return super().__getitem__(name)
|
||||||
|
|
||||||
|
|
||||||
@typing.overload
|
@typing.overload
|
||||||
def get_item_oapg(self, name: typing.Literal["baz"]) -> MetaOapg.properties.baz: ...
|
def get_item_oapg(self, name: typing_extensions.Literal["baz"]) -> MetaOapg.properties.baz: ...
|
||||||
|
|
||||||
@typing.overload
|
@typing.overload
|
||||||
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
|
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
|
||||||
|
|
||||||
def get_item_oapg(self, name: typing.Union[typing.Literal["baz", ], str]):
|
def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["baz", ], str]):
|
||||||
return super().get_item_oapg(name)
|
return super().get_item_oapg(name)
|
||||||
|
|
||||||
|
|
||||||
@ -156,8 +157,7 @@ class AllofWithBaseSchema(
|
|||||||
)
|
)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
@property
|
@functools.lru_cache()
|
||||||
@functools.cache
|
|
||||||
def all_of(cls):
|
def all_of(cls):
|
||||||
# we need this here to make our import statements work
|
# we need this here to make our import statements work
|
||||||
# we must store _composed_schemas in here so the code is only run
|
# we must store _composed_schemas in here so the code is only run
|
||||||
@ -175,23 +175,23 @@ class AllofWithBaseSchema(
|
|||||||
bar: MetaOapg.properties.bar
|
bar: MetaOapg.properties.bar
|
||||||
|
|
||||||
@typing.overload
|
@typing.overload
|
||||||
def __getitem__(self, name: typing.Literal["bar"]) -> MetaOapg.properties.bar: ...
|
def __getitem__(self, name: typing_extensions.Literal["bar"]) -> MetaOapg.properties.bar: ...
|
||||||
|
|
||||||
@typing.overload
|
@typing.overload
|
||||||
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
|
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
|
||||||
|
|
||||||
def __getitem__(self, name: typing.Union[typing.Literal["bar", ], str]):
|
def __getitem__(self, name: typing.Union[typing_extensions.Literal["bar", ], str]):
|
||||||
# dict_instance[name] accessor
|
# dict_instance[name] accessor
|
||||||
return super().__getitem__(name)
|
return super().__getitem__(name)
|
||||||
|
|
||||||
|
|
||||||
@typing.overload
|
@typing.overload
|
||||||
def get_item_oapg(self, name: typing.Literal["bar"]) -> MetaOapg.properties.bar: ...
|
def get_item_oapg(self, name: typing_extensions.Literal["bar"]) -> MetaOapg.properties.bar: ...
|
||||||
|
|
||||||
@typing.overload
|
@typing.overload
|
||||||
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
|
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
|
||||||
|
|
||||||
def get_item_oapg(self, name: typing.Union[typing.Literal["bar", ], str]):
|
def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["bar", ], str]):
|
||||||
return super().get_item_oapg(name)
|
return super().get_item_oapg(name)
|
||||||
|
|
||||||
|
|
||||||
|
@ -15,6 +15,7 @@ import functools # noqa: F401
|
|||||||
import io # noqa: F401
|
import io # noqa: F401
|
||||||
import re # noqa: F401
|
import re # noqa: F401
|
||||||
import typing # noqa: F401
|
import typing # noqa: F401
|
||||||
|
import typing_extensions # noqa: F401
|
||||||
import uuid # noqa: F401
|
import uuid # noqa: F401
|
||||||
|
|
||||||
import frozendict # noqa: F401
|
import frozendict # noqa: F401
|
||||||
@ -36,8 +37,7 @@ class AllofWithOneEmptySchema(
|
|||||||
all_of_0 = schemas.AnyTypeSchema
|
all_of_0 = schemas.AnyTypeSchema
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
@property
|
@functools.lru_cache()
|
||||||
@functools.cache
|
|
||||||
def all_of(cls):
|
def all_of(cls):
|
||||||
# we need this here to make our import statements work
|
# we need this here to make our import statements work
|
||||||
# we must store _composed_schemas in here so the code is only run
|
# we must store _composed_schemas in here so the code is only run
|
||||||
|
@ -15,6 +15,7 @@ import functools # noqa: F401
|
|||||||
import io # noqa: F401
|
import io # noqa: F401
|
||||||
import re # noqa: F401
|
import re # noqa: F401
|
||||||
import typing # noqa: F401
|
import typing # noqa: F401
|
||||||
|
import typing_extensions # noqa: F401
|
||||||
import uuid # noqa: F401
|
import uuid # noqa: F401
|
||||||
|
|
||||||
import frozendict # noqa: F401
|
import frozendict # noqa: F401
|
||||||
@ -36,8 +37,7 @@ class AllofWithOneEmptySchema(
|
|||||||
all_of_0 = schemas.AnyTypeSchema
|
all_of_0 = schemas.AnyTypeSchema
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
@property
|
@functools.lru_cache()
|
||||||
@functools.cache
|
|
||||||
def all_of(cls):
|
def all_of(cls):
|
||||||
# we need this here to make our import statements work
|
# we need this here to make our import statements work
|
||||||
# we must store _composed_schemas in here so the code is only run
|
# we must store _composed_schemas in here so the code is only run
|
||||||
|
@ -15,6 +15,7 @@ import functools # noqa: F401
|
|||||||
import io # noqa: F401
|
import io # noqa: F401
|
||||||
import re # noqa: F401
|
import re # noqa: F401
|
||||||
import typing # noqa: F401
|
import typing # noqa: F401
|
||||||
|
import typing_extensions # noqa: F401
|
||||||
import uuid # noqa: F401
|
import uuid # noqa: F401
|
||||||
|
|
||||||
import frozendict # noqa: F401
|
import frozendict # noqa: F401
|
||||||
@ -37,8 +38,7 @@ class AllofWithTheFirstEmptySchema(
|
|||||||
all_of_1 = schemas.NumberSchema
|
all_of_1 = schemas.NumberSchema
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
@property
|
@functools.lru_cache()
|
||||||
@functools.cache
|
|
||||||
def all_of(cls):
|
def all_of(cls):
|
||||||
# we need this here to make our import statements work
|
# we need this here to make our import statements work
|
||||||
# we must store _composed_schemas in here so the code is only run
|
# we must store _composed_schemas in here so the code is only run
|
||||||
|
@ -15,6 +15,7 @@ import functools # noqa: F401
|
|||||||
import io # noqa: F401
|
import io # noqa: F401
|
||||||
import re # noqa: F401
|
import re # noqa: F401
|
||||||
import typing # noqa: F401
|
import typing # noqa: F401
|
||||||
|
import typing_extensions # noqa: F401
|
||||||
import uuid # noqa: F401
|
import uuid # noqa: F401
|
||||||
|
|
||||||
import frozendict # noqa: F401
|
import frozendict # noqa: F401
|
||||||
@ -37,8 +38,7 @@ class AllofWithTheFirstEmptySchema(
|
|||||||
all_of_1 = schemas.NumberSchema
|
all_of_1 = schemas.NumberSchema
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
@property
|
@functools.lru_cache()
|
||||||
@functools.cache
|
|
||||||
def all_of(cls):
|
def all_of(cls):
|
||||||
# we need this here to make our import statements work
|
# we need this here to make our import statements work
|
||||||
# we must store _composed_schemas in here so the code is only run
|
# we must store _composed_schemas in here so the code is only run
|
||||||
|
@ -15,6 +15,7 @@ import functools # noqa: F401
|
|||||||
import io # noqa: F401
|
import io # noqa: F401
|
||||||
import re # noqa: F401
|
import re # noqa: F401
|
||||||
import typing # noqa: F401
|
import typing # noqa: F401
|
||||||
|
import typing_extensions # noqa: F401
|
||||||
import uuid # noqa: F401
|
import uuid # noqa: F401
|
||||||
|
|
||||||
import frozendict # noqa: F401
|
import frozendict # noqa: F401
|
||||||
@ -37,8 +38,7 @@ class AllofWithTheLastEmptySchema(
|
|||||||
all_of_1 = schemas.AnyTypeSchema
|
all_of_1 = schemas.AnyTypeSchema
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
@property
|
@functools.lru_cache()
|
||||||
@functools.cache
|
|
||||||
def all_of(cls):
|
def all_of(cls):
|
||||||
# we need this here to make our import statements work
|
# we need this here to make our import statements work
|
||||||
# we must store _composed_schemas in here so the code is only run
|
# we must store _composed_schemas in here so the code is only run
|
||||||
|
@ -15,6 +15,7 @@ import functools # noqa: F401
|
|||||||
import io # noqa: F401
|
import io # noqa: F401
|
||||||
import re # noqa: F401
|
import re # noqa: F401
|
||||||
import typing # noqa: F401
|
import typing # noqa: F401
|
||||||
|
import typing_extensions # noqa: F401
|
||||||
import uuid # noqa: F401
|
import uuid # noqa: F401
|
||||||
|
|
||||||
import frozendict # noqa: F401
|
import frozendict # noqa: F401
|
||||||
@ -37,8 +38,7 @@ class AllofWithTheLastEmptySchema(
|
|||||||
all_of_1 = schemas.AnyTypeSchema
|
all_of_1 = schemas.AnyTypeSchema
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
@property
|
@functools.lru_cache()
|
||||||
@functools.cache
|
|
||||||
def all_of(cls):
|
def all_of(cls):
|
||||||
# we need this here to make our import statements work
|
# we need this here to make our import statements work
|
||||||
# we must store _composed_schemas in here so the code is only run
|
# we must store _composed_schemas in here so the code is only run
|
||||||
|
@ -15,6 +15,7 @@ import functools # noqa: F401
|
|||||||
import io # noqa: F401
|
import io # noqa: F401
|
||||||
import re # noqa: F401
|
import re # noqa: F401
|
||||||
import typing # noqa: F401
|
import typing # noqa: F401
|
||||||
|
import typing_extensions # noqa: F401
|
||||||
import uuid # noqa: F401
|
import uuid # noqa: F401
|
||||||
|
|
||||||
import frozendict # noqa: F401
|
import frozendict # noqa: F401
|
||||||
@ -37,8 +38,7 @@ class AllofWithTwoEmptySchemas(
|
|||||||
all_of_1 = schemas.AnyTypeSchema
|
all_of_1 = schemas.AnyTypeSchema
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
@property
|
@functools.lru_cache()
|
||||||
@functools.cache
|
|
||||||
def all_of(cls):
|
def all_of(cls):
|
||||||
# we need this here to make our import statements work
|
# we need this here to make our import statements work
|
||||||
# we must store _composed_schemas in here so the code is only run
|
# we must store _composed_schemas in here so the code is only run
|
||||||
|
@ -15,6 +15,7 @@ import functools # noqa: F401
|
|||||||
import io # noqa: F401
|
import io # noqa: F401
|
||||||
import re # noqa: F401
|
import re # noqa: F401
|
||||||
import typing # noqa: F401
|
import typing # noqa: F401
|
||||||
|
import typing_extensions # noqa: F401
|
||||||
import uuid # noqa: F401
|
import uuid # noqa: F401
|
||||||
|
|
||||||
import frozendict # noqa: F401
|
import frozendict # noqa: F401
|
||||||
@ -37,8 +38,7 @@ class AllofWithTwoEmptySchemas(
|
|||||||
all_of_1 = schemas.AnyTypeSchema
|
all_of_1 = schemas.AnyTypeSchema
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
@property
|
@functools.lru_cache()
|
||||||
@functools.cache
|
|
||||||
def all_of(cls):
|
def all_of(cls):
|
||||||
# we need this here to make our import statements work
|
# we need this here to make our import statements work
|
||||||
# we must store _composed_schemas in here so the code is only run
|
# we must store _composed_schemas in here so the code is only run
|
||||||
|
@ -15,6 +15,7 @@ import functools # noqa: F401
|
|||||||
import io # noqa: F401
|
import io # noqa: F401
|
||||||
import re # noqa: F401
|
import re # noqa: F401
|
||||||
import typing # noqa: F401
|
import typing # noqa: F401
|
||||||
|
import typing_extensions # noqa: F401
|
||||||
import uuid # noqa: F401
|
import uuid # noqa: F401
|
||||||
|
|
||||||
import frozendict # noqa: F401
|
import frozendict # noqa: F401
|
||||||
@ -59,8 +60,7 @@ class Anyof(
|
|||||||
)
|
)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
@property
|
@functools.lru_cache()
|
||||||
@functools.cache
|
|
||||||
def any_of(cls):
|
def any_of(cls):
|
||||||
# we need this here to make our import statements work
|
# we need this here to make our import statements work
|
||||||
# we must store _composed_schemas in here so the code is only run
|
# we must store _composed_schemas in here so the code is only run
|
||||||
|
@ -15,6 +15,7 @@ import functools # noqa: F401
|
|||||||
import io # noqa: F401
|
import io # noqa: F401
|
||||||
import re # noqa: F401
|
import re # noqa: F401
|
||||||
import typing # noqa: F401
|
import typing # noqa: F401
|
||||||
|
import typing_extensions # noqa: F401
|
||||||
import uuid # noqa: F401
|
import uuid # noqa: F401
|
||||||
|
|
||||||
import frozendict # noqa: F401
|
import frozendict # noqa: F401
|
||||||
@ -58,8 +59,7 @@ class Anyof(
|
|||||||
)
|
)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
@property
|
@functools.lru_cache()
|
||||||
@functools.cache
|
|
||||||
def any_of(cls):
|
def any_of(cls):
|
||||||
# we need this here to make our import statements work
|
# we need this here to make our import statements work
|
||||||
# we must store _composed_schemas in here so the code is only run
|
# we must store _composed_schemas in here so the code is only run
|
||||||
|
@ -15,6 +15,7 @@ import functools # noqa: F401
|
|||||||
import io # noqa: F401
|
import io # noqa: F401
|
||||||
import re # noqa: F401
|
import re # noqa: F401
|
||||||
import typing # noqa: F401
|
import typing # noqa: F401
|
||||||
|
import typing_extensions # noqa: F401
|
||||||
import uuid # noqa: F401
|
import uuid # noqa: F401
|
||||||
|
|
||||||
import frozendict # noqa: F401
|
import frozendict # noqa: F401
|
||||||
@ -55,23 +56,23 @@ class AnyofComplexTypes(
|
|||||||
bar: MetaOapg.properties.bar
|
bar: MetaOapg.properties.bar
|
||||||
|
|
||||||
@typing.overload
|
@typing.overload
|
||||||
def __getitem__(self, name: typing.Literal["bar"]) -> MetaOapg.properties.bar: ...
|
def __getitem__(self, name: typing_extensions.Literal["bar"]) -> MetaOapg.properties.bar: ...
|
||||||
|
|
||||||
@typing.overload
|
@typing.overload
|
||||||
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
|
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
|
||||||
|
|
||||||
def __getitem__(self, name: typing.Union[typing.Literal["bar", ], str]):
|
def __getitem__(self, name: typing.Union[typing_extensions.Literal["bar", ], str]):
|
||||||
# dict_instance[name] accessor
|
# dict_instance[name] accessor
|
||||||
return super().__getitem__(name)
|
return super().__getitem__(name)
|
||||||
|
|
||||||
|
|
||||||
@typing.overload
|
@typing.overload
|
||||||
def get_item_oapg(self, name: typing.Literal["bar"]) -> MetaOapg.properties.bar: ...
|
def get_item_oapg(self, name: typing_extensions.Literal["bar"]) -> MetaOapg.properties.bar: ...
|
||||||
|
|
||||||
@typing.overload
|
@typing.overload
|
||||||
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
|
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
|
||||||
|
|
||||||
def get_item_oapg(self, name: typing.Union[typing.Literal["bar", ], str]):
|
def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["bar", ], str]):
|
||||||
return super().get_item_oapg(name)
|
return super().get_item_oapg(name)
|
||||||
|
|
||||||
|
|
||||||
@ -111,23 +112,23 @@ class AnyofComplexTypes(
|
|||||||
foo: MetaOapg.properties.foo
|
foo: MetaOapg.properties.foo
|
||||||
|
|
||||||
@typing.overload
|
@typing.overload
|
||||||
def __getitem__(self, name: typing.Literal["foo"]) -> MetaOapg.properties.foo: ...
|
def __getitem__(self, name: typing_extensions.Literal["foo"]) -> MetaOapg.properties.foo: ...
|
||||||
|
|
||||||
@typing.overload
|
@typing.overload
|
||||||
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
|
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
|
||||||
|
|
||||||
def __getitem__(self, name: typing.Union[typing.Literal["foo", ], str]):
|
def __getitem__(self, name: typing.Union[typing_extensions.Literal["foo", ], str]):
|
||||||
# dict_instance[name] accessor
|
# dict_instance[name] accessor
|
||||||
return super().__getitem__(name)
|
return super().__getitem__(name)
|
||||||
|
|
||||||
|
|
||||||
@typing.overload
|
@typing.overload
|
||||||
def get_item_oapg(self, name: typing.Literal["foo"]) -> MetaOapg.properties.foo: ...
|
def get_item_oapg(self, name: typing_extensions.Literal["foo"]) -> MetaOapg.properties.foo: ...
|
||||||
|
|
||||||
@typing.overload
|
@typing.overload
|
||||||
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
|
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
|
||||||
|
|
||||||
def get_item_oapg(self, name: typing.Union[typing.Literal["foo", ], str]):
|
def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["foo", ], str]):
|
||||||
return super().get_item_oapg(name)
|
return super().get_item_oapg(name)
|
||||||
|
|
||||||
|
|
||||||
@ -147,8 +148,7 @@ class AnyofComplexTypes(
|
|||||||
)
|
)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
@property
|
@functools.lru_cache()
|
||||||
@functools.cache
|
|
||||||
def any_of(cls):
|
def any_of(cls):
|
||||||
# we need this here to make our import statements work
|
# we need this here to make our import statements work
|
||||||
# we must store _composed_schemas in here so the code is only run
|
# we must store _composed_schemas in here so the code is only run
|
||||||
|
@ -15,6 +15,7 @@ import functools # noqa: F401
|
|||||||
import io # noqa: F401
|
import io # noqa: F401
|
||||||
import re # noqa: F401
|
import re # noqa: F401
|
||||||
import typing # noqa: F401
|
import typing # noqa: F401
|
||||||
|
import typing_extensions # noqa: F401
|
||||||
import uuid # noqa: F401
|
import uuid # noqa: F401
|
||||||
|
|
||||||
import frozendict # noqa: F401
|
import frozendict # noqa: F401
|
||||||
@ -55,23 +56,23 @@ class AnyofComplexTypes(
|
|||||||
bar: MetaOapg.properties.bar
|
bar: MetaOapg.properties.bar
|
||||||
|
|
||||||
@typing.overload
|
@typing.overload
|
||||||
def __getitem__(self, name: typing.Literal["bar"]) -> MetaOapg.properties.bar: ...
|
def __getitem__(self, name: typing_extensions.Literal["bar"]) -> MetaOapg.properties.bar: ...
|
||||||
|
|
||||||
@typing.overload
|
@typing.overload
|
||||||
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
|
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
|
||||||
|
|
||||||
def __getitem__(self, name: typing.Union[typing.Literal["bar", ], str]):
|
def __getitem__(self, name: typing.Union[typing_extensions.Literal["bar", ], str]):
|
||||||
# dict_instance[name] accessor
|
# dict_instance[name] accessor
|
||||||
return super().__getitem__(name)
|
return super().__getitem__(name)
|
||||||
|
|
||||||
|
|
||||||
@typing.overload
|
@typing.overload
|
||||||
def get_item_oapg(self, name: typing.Literal["bar"]) -> MetaOapg.properties.bar: ...
|
def get_item_oapg(self, name: typing_extensions.Literal["bar"]) -> MetaOapg.properties.bar: ...
|
||||||
|
|
||||||
@typing.overload
|
@typing.overload
|
||||||
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
|
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
|
||||||
|
|
||||||
def get_item_oapg(self, name: typing.Union[typing.Literal["bar", ], str]):
|
def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["bar", ], str]):
|
||||||
return super().get_item_oapg(name)
|
return super().get_item_oapg(name)
|
||||||
|
|
||||||
|
|
||||||
@ -111,23 +112,23 @@ class AnyofComplexTypes(
|
|||||||
foo: MetaOapg.properties.foo
|
foo: MetaOapg.properties.foo
|
||||||
|
|
||||||
@typing.overload
|
@typing.overload
|
||||||
def __getitem__(self, name: typing.Literal["foo"]) -> MetaOapg.properties.foo: ...
|
def __getitem__(self, name: typing_extensions.Literal["foo"]) -> MetaOapg.properties.foo: ...
|
||||||
|
|
||||||
@typing.overload
|
@typing.overload
|
||||||
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
|
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
|
||||||
|
|
||||||
def __getitem__(self, name: typing.Union[typing.Literal["foo", ], str]):
|
def __getitem__(self, name: typing.Union[typing_extensions.Literal["foo", ], str]):
|
||||||
# dict_instance[name] accessor
|
# dict_instance[name] accessor
|
||||||
return super().__getitem__(name)
|
return super().__getitem__(name)
|
||||||
|
|
||||||
|
|
||||||
@typing.overload
|
@typing.overload
|
||||||
def get_item_oapg(self, name: typing.Literal["foo"]) -> MetaOapg.properties.foo: ...
|
def get_item_oapg(self, name: typing_extensions.Literal["foo"]) -> MetaOapg.properties.foo: ...
|
||||||
|
|
||||||
@typing.overload
|
@typing.overload
|
||||||
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
|
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
|
||||||
|
|
||||||
def get_item_oapg(self, name: typing.Union[typing.Literal["foo", ], str]):
|
def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["foo", ], str]):
|
||||||
return super().get_item_oapg(name)
|
return super().get_item_oapg(name)
|
||||||
|
|
||||||
|
|
||||||
@ -147,8 +148,7 @@ class AnyofComplexTypes(
|
|||||||
)
|
)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
@property
|
@functools.lru_cache()
|
||||||
@functools.cache
|
|
||||||
def any_of(cls):
|
def any_of(cls):
|
||||||
# we need this here to make our import statements work
|
# we need this here to make our import statements work
|
||||||
# we must store _composed_schemas in here so the code is only run
|
# we must store _composed_schemas in here so the code is only run
|
||||||
|
@ -15,6 +15,7 @@ import functools # noqa: F401
|
|||||||
import io # noqa: F401
|
import io # noqa: F401
|
||||||
import re # noqa: F401
|
import re # noqa: F401
|
||||||
import typing # noqa: F401
|
import typing # noqa: F401
|
||||||
|
import typing_extensions # noqa: F401
|
||||||
import uuid # noqa: F401
|
import uuid # noqa: F401
|
||||||
|
|
||||||
import frozendict # noqa: F401
|
import frozendict # noqa: F401
|
||||||
@ -82,8 +83,7 @@ class AnyofWithBaseSchema(
|
|||||||
)
|
)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
@property
|
@functools.lru_cache()
|
||||||
@functools.cache
|
|
||||||
def any_of(cls):
|
def any_of(cls):
|
||||||
# we need this here to make our import statements work
|
# we need this here to make our import statements work
|
||||||
# we must store _composed_schemas in here so the code is only run
|
# we must store _composed_schemas in here so the code is only run
|
||||||
|
@ -15,6 +15,7 @@ import functools # noqa: F401
|
|||||||
import io # noqa: F401
|
import io # noqa: F401
|
||||||
import re # noqa: F401
|
import re # noqa: F401
|
||||||
import typing # noqa: F401
|
import typing # noqa: F401
|
||||||
|
import typing_extensions # noqa: F401
|
||||||
import uuid # noqa: F401
|
import uuid # noqa: F401
|
||||||
|
|
||||||
import frozendict # noqa: F401
|
import frozendict # noqa: F401
|
||||||
@ -80,8 +81,7 @@ class AnyofWithBaseSchema(
|
|||||||
)
|
)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
@property
|
@functools.lru_cache()
|
||||||
@functools.cache
|
|
||||||
def any_of(cls):
|
def any_of(cls):
|
||||||
# we need this here to make our import statements work
|
# we need this here to make our import statements work
|
||||||
# we must store _composed_schemas in here so the code is only run
|
# we must store _composed_schemas in here so the code is only run
|
||||||
|
@ -15,6 +15,7 @@ import functools # noqa: F401
|
|||||||
import io # noqa: F401
|
import io # noqa: F401
|
||||||
import re # noqa: F401
|
import re # noqa: F401
|
||||||
import typing # noqa: F401
|
import typing # noqa: F401
|
||||||
|
import typing_extensions # noqa: F401
|
||||||
import uuid # noqa: F401
|
import uuid # noqa: F401
|
||||||
|
|
||||||
import frozendict # noqa: F401
|
import frozendict # noqa: F401
|
||||||
@ -37,8 +38,7 @@ class AnyofWithOneEmptySchema(
|
|||||||
any_of_1 = schemas.AnyTypeSchema
|
any_of_1 = schemas.AnyTypeSchema
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
@property
|
@functools.lru_cache()
|
||||||
@functools.cache
|
|
||||||
def any_of(cls):
|
def any_of(cls):
|
||||||
# we need this here to make our import statements work
|
# we need this here to make our import statements work
|
||||||
# we must store _composed_schemas in here so the code is only run
|
# we must store _composed_schemas in here so the code is only run
|
||||||
|
@ -15,6 +15,7 @@ import functools # noqa: F401
|
|||||||
import io # noqa: F401
|
import io # noqa: F401
|
||||||
import re # noqa: F401
|
import re # noqa: F401
|
||||||
import typing # noqa: F401
|
import typing # noqa: F401
|
||||||
|
import typing_extensions # noqa: F401
|
||||||
import uuid # noqa: F401
|
import uuid # noqa: F401
|
||||||
|
|
||||||
import frozendict # noqa: F401
|
import frozendict # noqa: F401
|
||||||
@ -37,8 +38,7 @@ class AnyofWithOneEmptySchema(
|
|||||||
any_of_1 = schemas.AnyTypeSchema
|
any_of_1 = schemas.AnyTypeSchema
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
@property
|
@functools.lru_cache()
|
||||||
@functools.cache
|
|
||||||
def any_of(cls):
|
def any_of(cls):
|
||||||
# we need this here to make our import statements work
|
# we need this here to make our import statements work
|
||||||
# we must store _composed_schemas in here so the code is only run
|
# we must store _composed_schemas in here so the code is only run
|
||||||
|
@ -15,6 +15,7 @@ import functools # noqa: F401
|
|||||||
import io # noqa: F401
|
import io # noqa: F401
|
||||||
import re # noqa: F401
|
import re # noqa: F401
|
||||||
import typing # noqa: F401
|
import typing # noqa: F401
|
||||||
|
import typing_extensions # noqa: F401
|
||||||
import uuid # noqa: F401
|
import uuid # noqa: F401
|
||||||
|
|
||||||
import frozendict # noqa: F401
|
import frozendict # noqa: F401
|
||||||
|
@ -15,6 +15,7 @@ import functools # noqa: F401
|
|||||||
import io # noqa: F401
|
import io # noqa: F401
|
||||||
import re # noqa: F401
|
import re # noqa: F401
|
||||||
import typing # noqa: F401
|
import typing # noqa: F401
|
||||||
|
import typing_extensions # noqa: F401
|
||||||
import uuid # noqa: F401
|
import uuid # noqa: F401
|
||||||
|
|
||||||
import frozendict # noqa: F401
|
import frozendict # noqa: F401
|
||||||
|
@ -15,6 +15,7 @@ import functools # noqa: F401
|
|||||||
import io # noqa: F401
|
import io # noqa: F401
|
||||||
import re # noqa: F401
|
import re # noqa: F401
|
||||||
import typing # noqa: F401
|
import typing # noqa: F401
|
||||||
|
import typing_extensions # noqa: F401
|
||||||
import uuid # noqa: F401
|
import uuid # noqa: F401
|
||||||
|
|
||||||
import frozendict # noqa: F401
|
import frozendict # noqa: F401
|
||||||
|
@ -15,6 +15,7 @@ import functools # noqa: F401
|
|||||||
import io # noqa: F401
|
import io # noqa: F401
|
||||||
import re # noqa: F401
|
import re # noqa: F401
|
||||||
import typing # noqa: F401
|
import typing # noqa: F401
|
||||||
|
import typing_extensions # noqa: F401
|
||||||
import uuid # noqa: F401
|
import uuid # noqa: F401
|
||||||
|
|
||||||
import frozendict # noqa: F401
|
import frozendict # noqa: F401
|
||||||
|
@ -15,6 +15,7 @@ import functools # noqa: F401
|
|||||||
import io # noqa: F401
|
import io # noqa: F401
|
||||||
import re # noqa: F401
|
import re # noqa: F401
|
||||||
import typing # noqa: F401
|
import typing # noqa: F401
|
||||||
|
import typing_extensions # noqa: F401
|
||||||
import uuid # noqa: F401
|
import uuid # noqa: F401
|
||||||
|
|
||||||
import frozendict # noqa: F401
|
import frozendict # noqa: F401
|
||||||
|
@ -15,6 +15,7 @@ import functools # noqa: F401
|
|||||||
import io # noqa: F401
|
import io # noqa: F401
|
||||||
import re # noqa: F401
|
import re # noqa: F401
|
||||||
import typing # noqa: F401
|
import typing # noqa: F401
|
||||||
|
import typing_extensions # noqa: F401
|
||||||
import uuid # noqa: F401
|
import uuid # noqa: F401
|
||||||
|
|
||||||
import frozendict # noqa: F401
|
import frozendict # noqa: F401
|
||||||
|
@ -15,6 +15,7 @@ import functools # noqa: F401
|
|||||||
import io # noqa: F401
|
import io # noqa: F401
|
||||||
import re # noqa: F401
|
import re # noqa: F401
|
||||||
import typing # noqa: F401
|
import typing # noqa: F401
|
||||||
|
import typing_extensions # noqa: F401
|
||||||
import uuid # noqa: F401
|
import uuid # noqa: F401
|
||||||
|
|
||||||
import frozendict # noqa: F401
|
import frozendict # noqa: F401
|
||||||
|
@ -15,6 +15,7 @@ import functools # noqa: F401
|
|||||||
import io # noqa: F401
|
import io # noqa: F401
|
||||||
import re # noqa: F401
|
import re # noqa: F401
|
||||||
import typing # noqa: F401
|
import typing # noqa: F401
|
||||||
|
import typing_extensions # noqa: F401
|
||||||
import uuid # noqa: F401
|
import uuid # noqa: F401
|
||||||
|
|
||||||
import frozendict # noqa: F401
|
import frozendict # noqa: F401
|
||||||
|
@ -15,6 +15,7 @@ import functools # noqa: F401
|
|||||||
import io # noqa: F401
|
import io # noqa: F401
|
||||||
import re # noqa: F401
|
import re # noqa: F401
|
||||||
import typing # noqa: F401
|
import typing # noqa: F401
|
||||||
|
import typing_extensions # noqa: F401
|
||||||
import uuid # noqa: F401
|
import uuid # noqa: F401
|
||||||
|
|
||||||
import frozendict # noqa: F401
|
import frozendict # noqa: F401
|
||||||
|
@ -15,6 +15,7 @@ import functools # noqa: F401
|
|||||||
import io # noqa: F401
|
import io # noqa: F401
|
||||||
import re # noqa: F401
|
import re # noqa: F401
|
||||||
import typing # noqa: F401
|
import typing # noqa: F401
|
||||||
|
import typing_extensions # noqa: F401
|
||||||
import uuid # noqa: F401
|
import uuid # noqa: F401
|
||||||
|
|
||||||
import frozendict # noqa: F401
|
import frozendict # noqa: F401
|
||||||
|
@ -15,6 +15,7 @@ import functools # noqa: F401
|
|||||||
import io # noqa: F401
|
import io # noqa: F401
|
||||||
import re # noqa: F401
|
import re # noqa: F401
|
||||||
import typing # noqa: F401
|
import typing # noqa: F401
|
||||||
|
import typing_extensions # noqa: F401
|
||||||
import uuid # noqa: F401
|
import uuid # noqa: F401
|
||||||
|
|
||||||
import frozendict # noqa: F401
|
import frozendict # noqa: F401
|
||||||
|
@ -15,6 +15,7 @@ import functools # noqa: F401
|
|||||||
import io # noqa: F401
|
import io # noqa: F401
|
||||||
import re # noqa: F401
|
import re # noqa: F401
|
||||||
import typing # noqa: F401
|
import typing # noqa: F401
|
||||||
|
import typing_extensions # noqa: F401
|
||||||
import uuid # noqa: F401
|
import uuid # noqa: F401
|
||||||
|
|
||||||
import frozendict # noqa: F401
|
import frozendict # noqa: F401
|
||||||
|
@ -15,6 +15,7 @@ import functools # noqa: F401
|
|||||||
import io # noqa: F401
|
import io # noqa: F401
|
||||||
import re # noqa: F401
|
import re # noqa: F401
|
||||||
import typing # noqa: F401
|
import typing # noqa: F401
|
||||||
|
import typing_extensions # noqa: F401
|
||||||
import uuid # noqa: F401
|
import uuid # noqa: F401
|
||||||
|
|
||||||
import frozendict # noqa: F401
|
import frozendict # noqa: F401
|
||||||
|
@ -15,6 +15,7 @@ import functools # noqa: F401
|
|||||||
import io # noqa: F401
|
import io # noqa: F401
|
||||||
import re # noqa: F401
|
import re # noqa: F401
|
||||||
import typing # noqa: F401
|
import typing # noqa: F401
|
||||||
|
import typing_extensions # noqa: F401
|
||||||
import uuid # noqa: F401
|
import uuid # noqa: F401
|
||||||
|
|
||||||
import frozendict # noqa: F401
|
import frozendict # noqa: F401
|
||||||
|
@ -15,6 +15,7 @@ import functools # noqa: F401
|
|||||||
import io # noqa: F401
|
import io # noqa: F401
|
||||||
import re # noqa: F401
|
import re # noqa: F401
|
||||||
import typing # noqa: F401
|
import typing # noqa: F401
|
||||||
|
import typing_extensions # noqa: F401
|
||||||
import uuid # noqa: F401
|
import uuid # noqa: F401
|
||||||
|
|
||||||
import frozendict # noqa: F401
|
import frozendict # noqa: F401
|
||||||
@ -36,7 +37,6 @@ class EnumWith0DoesNotMatchFalse(
|
|||||||
Do not edit the class manually.
|
Do not edit the class manually.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
@classmethod
|
@schemas.classproperty
|
||||||
@property
|
|
||||||
def POSITIVE_0(cls):
|
def POSITIVE_0(cls):
|
||||||
return cls(0)
|
return cls(0)
|
||||||
|
@ -15,6 +15,7 @@ import functools # noqa: F401
|
|||||||
import io # noqa: F401
|
import io # noqa: F401
|
||||||
import re # noqa: F401
|
import re # noqa: F401
|
||||||
import typing # noqa: F401
|
import typing # noqa: F401
|
||||||
|
import typing_extensions # noqa: F401
|
||||||
import uuid # noqa: F401
|
import uuid # noqa: F401
|
||||||
|
|
||||||
import frozendict # noqa: F401
|
import frozendict # noqa: F401
|
||||||
@ -36,7 +37,6 @@ class EnumWith0DoesNotMatchFalse(
|
|||||||
Do not edit the class manually.
|
Do not edit the class manually.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
@classmethod
|
@schemas.classproperty
|
||||||
@property
|
|
||||||
def POSITIVE_0(cls):
|
def POSITIVE_0(cls):
|
||||||
return cls(0)
|
return cls(0)
|
||||||
|
@ -15,6 +15,7 @@ import functools # noqa: F401
|
|||||||
import io # noqa: F401
|
import io # noqa: F401
|
||||||
import re # noqa: F401
|
import re # noqa: F401
|
||||||
import typing # noqa: F401
|
import typing # noqa: F401
|
||||||
|
import typing_extensions # noqa: F401
|
||||||
import uuid # noqa: F401
|
import uuid # noqa: F401
|
||||||
|
|
||||||
import frozendict # noqa: F401
|
import frozendict # noqa: F401
|
||||||
@ -36,7 +37,6 @@ class EnumWith1DoesNotMatchTrue(
|
|||||||
Do not edit the class manually.
|
Do not edit the class manually.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
@classmethod
|
@schemas.classproperty
|
||||||
@property
|
|
||||||
def POSITIVE_1(cls):
|
def POSITIVE_1(cls):
|
||||||
return cls(1)
|
return cls(1)
|
||||||
|
@ -15,6 +15,7 @@ import functools # noqa: F401
|
|||||||
import io # noqa: F401
|
import io # noqa: F401
|
||||||
import re # noqa: F401
|
import re # noqa: F401
|
||||||
import typing # noqa: F401
|
import typing # noqa: F401
|
||||||
|
import typing_extensions # noqa: F401
|
||||||
import uuid # noqa: F401
|
import uuid # noqa: F401
|
||||||
|
|
||||||
import frozendict # noqa: F401
|
import frozendict # noqa: F401
|
||||||
@ -36,7 +37,6 @@ class EnumWith1DoesNotMatchTrue(
|
|||||||
Do not edit the class manually.
|
Do not edit the class manually.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
@classmethod
|
@schemas.classproperty
|
||||||
@property
|
|
||||||
def POSITIVE_1(cls):
|
def POSITIVE_1(cls):
|
||||||
return cls(1)
|
return cls(1)
|
||||||
|
@ -15,6 +15,7 @@ import functools # noqa: F401
|
|||||||
import io # noqa: F401
|
import io # noqa: F401
|
||||||
import re # noqa: F401
|
import re # noqa: F401
|
||||||
import typing # noqa: F401
|
import typing # noqa: F401
|
||||||
|
import typing_extensions # noqa: F401
|
||||||
import uuid # noqa: F401
|
import uuid # noqa: F401
|
||||||
|
|
||||||
import frozendict # noqa: F401
|
import frozendict # noqa: F401
|
||||||
@ -37,12 +38,10 @@ class EnumWithEscapedCharacters(
|
|||||||
Do not edit the class manually.
|
Do not edit the class manually.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
@classmethod
|
@schemas.classproperty
|
||||||
@property
|
|
||||||
def FOO_BAR(cls):
|
def FOO_BAR(cls):
|
||||||
return cls("foo\nbar")
|
return cls("foo\nbar")
|
||||||
|
|
||||||
@classmethod
|
@schemas.classproperty
|
||||||
@property
|
|
||||||
def FOO_BAR(cls):
|
def FOO_BAR(cls):
|
||||||
return cls("foo\rbar")
|
return cls("foo\rbar")
|
||||||
|
@ -15,6 +15,7 @@ import functools # noqa: F401
|
|||||||
import io # noqa: F401
|
import io # noqa: F401
|
||||||
import re # noqa: F401
|
import re # noqa: F401
|
||||||
import typing # noqa: F401
|
import typing # noqa: F401
|
||||||
|
import typing_extensions # noqa: F401
|
||||||
import uuid # noqa: F401
|
import uuid # noqa: F401
|
||||||
|
|
||||||
import frozendict # noqa: F401
|
import frozendict # noqa: F401
|
||||||
@ -37,12 +38,10 @@ class EnumWithEscapedCharacters(
|
|||||||
Do not edit the class manually.
|
Do not edit the class manually.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
@classmethod
|
@schemas.classproperty
|
||||||
@property
|
|
||||||
def FOO_BAR(cls):
|
def FOO_BAR(cls):
|
||||||
return cls("foo\nbar")
|
return cls("foo\nbar")
|
||||||
|
|
||||||
@classmethod
|
@schemas.classproperty
|
||||||
@property
|
|
||||||
def FOO_BAR(cls):
|
def FOO_BAR(cls):
|
||||||
return cls("foo\rbar")
|
return cls("foo\rbar")
|
||||||
|
@ -15,6 +15,7 @@ import functools # noqa: F401
|
|||||||
import io # noqa: F401
|
import io # noqa: F401
|
||||||
import re # noqa: F401
|
import re # noqa: F401
|
||||||
import typing # noqa: F401
|
import typing # noqa: F401
|
||||||
|
import typing_extensions # noqa: F401
|
||||||
import uuid # noqa: F401
|
import uuid # noqa: F401
|
||||||
|
|
||||||
import frozendict # noqa: F401
|
import frozendict # noqa: F401
|
||||||
@ -36,7 +37,6 @@ class EnumWithFalseDoesNotMatch0(
|
|||||||
Do not edit the class manually.
|
Do not edit the class manually.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
@classmethod
|
@schemas.classproperty
|
||||||
@property
|
|
||||||
def FALSE(cls):
|
def FALSE(cls):
|
||||||
return cls(schemas.BoolClass.FALSE)
|
return cls(schemas.BoolClass.FALSE)
|
||||||
|
@ -15,6 +15,7 @@ import functools # noqa: F401
|
|||||||
import io # noqa: F401
|
import io # noqa: F401
|
||||||
import re # noqa: F401
|
import re # noqa: F401
|
||||||
import typing # noqa: F401
|
import typing # noqa: F401
|
||||||
|
import typing_extensions # noqa: F401
|
||||||
import uuid # noqa: F401
|
import uuid # noqa: F401
|
||||||
|
|
||||||
import frozendict # noqa: F401
|
import frozendict # noqa: F401
|
||||||
@ -36,7 +37,6 @@ class EnumWithFalseDoesNotMatch0(
|
|||||||
Do not edit the class manually.
|
Do not edit the class manually.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
@classmethod
|
@schemas.classproperty
|
||||||
@property
|
|
||||||
def FALSE(cls):
|
def FALSE(cls):
|
||||||
return cls(schemas.BoolClass.FALSE)
|
return cls(schemas.BoolClass.FALSE)
|
||||||
|
@ -15,6 +15,7 @@ import functools # noqa: F401
|
|||||||
import io # noqa: F401
|
import io # noqa: F401
|
||||||
import re # noqa: F401
|
import re # noqa: F401
|
||||||
import typing # noqa: F401
|
import typing # noqa: F401
|
||||||
|
import typing_extensions # noqa: F401
|
||||||
import uuid # noqa: F401
|
import uuid # noqa: F401
|
||||||
|
|
||||||
import frozendict # noqa: F401
|
import frozendict # noqa: F401
|
||||||
@ -36,7 +37,6 @@ class EnumWithTrueDoesNotMatch1(
|
|||||||
Do not edit the class manually.
|
Do not edit the class manually.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
@classmethod
|
@schemas.classproperty
|
||||||
@property
|
|
||||||
def TRUE(cls):
|
def TRUE(cls):
|
||||||
return cls(schemas.BoolClass.TRUE)
|
return cls(schemas.BoolClass.TRUE)
|
||||||
|
@ -15,6 +15,7 @@ import functools # noqa: F401
|
|||||||
import io # noqa: F401
|
import io # noqa: F401
|
||||||
import re # noqa: F401
|
import re # noqa: F401
|
||||||
import typing # noqa: F401
|
import typing # noqa: F401
|
||||||
|
import typing_extensions # noqa: F401
|
||||||
import uuid # noqa: F401
|
import uuid # noqa: F401
|
||||||
|
|
||||||
import frozendict # noqa: F401
|
import frozendict # noqa: F401
|
||||||
@ -36,7 +37,6 @@ class EnumWithTrueDoesNotMatch1(
|
|||||||
Do not edit the class manually.
|
Do not edit the class manually.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
@classmethod
|
@schemas.classproperty
|
||||||
@property
|
|
||||||
def TRUE(cls):
|
def TRUE(cls):
|
||||||
return cls(schemas.BoolClass.TRUE)
|
return cls(schemas.BoolClass.TRUE)
|
||||||
|
@ -15,6 +15,7 @@ import functools # noqa: F401
|
|||||||
import io # noqa: F401
|
import io # noqa: F401
|
||||||
import re # noqa: F401
|
import re # noqa: F401
|
||||||
import typing # noqa: F401
|
import typing # noqa: F401
|
||||||
|
import typing_extensions # noqa: F401
|
||||||
import uuid # noqa: F401
|
import uuid # noqa: F401
|
||||||
|
|
||||||
import frozendict # noqa: F401
|
import frozendict # noqa: F401
|
||||||
@ -49,8 +50,7 @@ class EnumsInProperties(
|
|||||||
schemas.StrSchema
|
schemas.StrSchema
|
||||||
):
|
):
|
||||||
|
|
||||||
@classmethod
|
@schemas.classproperty
|
||||||
@property
|
|
||||||
def BAR(cls):
|
def BAR(cls):
|
||||||
return cls("bar")
|
return cls("bar")
|
||||||
|
|
||||||
@ -64,8 +64,7 @@ class EnumsInProperties(
|
|||||||
schemas.StrSchema
|
schemas.StrSchema
|
||||||
):
|
):
|
||||||
|
|
||||||
@classmethod
|
@schemas.classproperty
|
||||||
@property
|
|
||||||
def FOO(cls):
|
def FOO(cls):
|
||||||
return cls("foo")
|
return cls("foo")
|
||||||
__annotations__ = {
|
__annotations__ = {
|
||||||
@ -76,29 +75,29 @@ class EnumsInProperties(
|
|||||||
bar: MetaOapg.properties.bar
|
bar: MetaOapg.properties.bar
|
||||||
|
|
||||||
@typing.overload
|
@typing.overload
|
||||||
def __getitem__(self, name: typing.Literal["bar"]) -> MetaOapg.properties.bar: ...
|
def __getitem__(self, name: typing_extensions.Literal["bar"]) -> MetaOapg.properties.bar: ...
|
||||||
|
|
||||||
@typing.overload
|
@typing.overload
|
||||||
def __getitem__(self, name: typing.Literal["foo"]) -> MetaOapg.properties.foo: ...
|
def __getitem__(self, name: typing_extensions.Literal["foo"]) -> MetaOapg.properties.foo: ...
|
||||||
|
|
||||||
@typing.overload
|
@typing.overload
|
||||||
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
|
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
|
||||||
|
|
||||||
def __getitem__(self, name: typing.Union[typing.Literal["bar", "foo", ], str]):
|
def __getitem__(self, name: typing.Union[typing_extensions.Literal["bar", "foo", ], str]):
|
||||||
# dict_instance[name] accessor
|
# dict_instance[name] accessor
|
||||||
return super().__getitem__(name)
|
return super().__getitem__(name)
|
||||||
|
|
||||||
|
|
||||||
@typing.overload
|
@typing.overload
|
||||||
def get_item_oapg(self, name: typing.Literal["bar"]) -> MetaOapg.properties.bar: ...
|
def get_item_oapg(self, name: typing_extensions.Literal["bar"]) -> MetaOapg.properties.bar: ...
|
||||||
|
|
||||||
@typing.overload
|
@typing.overload
|
||||||
def get_item_oapg(self, name: typing.Literal["foo"]) -> typing.Union[MetaOapg.properties.foo, schemas.Unset]: ...
|
def get_item_oapg(self, name: typing_extensions.Literal["foo"]) -> typing.Union[MetaOapg.properties.foo, schemas.Unset]: ...
|
||||||
|
|
||||||
@typing.overload
|
@typing.overload
|
||||||
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
|
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
|
||||||
|
|
||||||
def get_item_oapg(self, name: typing.Union[typing.Literal["bar", "foo", ], str]):
|
def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["bar", "foo", ], str]):
|
||||||
return super().get_item_oapg(name)
|
return super().get_item_oapg(name)
|
||||||
|
|
||||||
|
|
||||||
|
@ -15,6 +15,7 @@ import functools # noqa: F401
|
|||||||
import io # noqa: F401
|
import io # noqa: F401
|
||||||
import re # noqa: F401
|
import re # noqa: F401
|
||||||
import typing # noqa: F401
|
import typing # noqa: F401
|
||||||
|
import typing_extensions # noqa: F401
|
||||||
import uuid # noqa: F401
|
import uuid # noqa: F401
|
||||||
|
|
||||||
import frozendict # noqa: F401
|
import frozendict # noqa: F401
|
||||||
@ -49,8 +50,7 @@ class EnumsInProperties(
|
|||||||
schemas.StrSchema
|
schemas.StrSchema
|
||||||
):
|
):
|
||||||
|
|
||||||
@classmethod
|
@schemas.classproperty
|
||||||
@property
|
|
||||||
def BAR(cls):
|
def BAR(cls):
|
||||||
return cls("bar")
|
return cls("bar")
|
||||||
|
|
||||||
@ -64,8 +64,7 @@ class EnumsInProperties(
|
|||||||
schemas.StrSchema
|
schemas.StrSchema
|
||||||
):
|
):
|
||||||
|
|
||||||
@classmethod
|
@schemas.classproperty
|
||||||
@property
|
|
||||||
def FOO(cls):
|
def FOO(cls):
|
||||||
return cls("foo")
|
return cls("foo")
|
||||||
__annotations__ = {
|
__annotations__ = {
|
||||||
@ -76,29 +75,29 @@ class EnumsInProperties(
|
|||||||
bar: MetaOapg.properties.bar
|
bar: MetaOapg.properties.bar
|
||||||
|
|
||||||
@typing.overload
|
@typing.overload
|
||||||
def __getitem__(self, name: typing.Literal["bar"]) -> MetaOapg.properties.bar: ...
|
def __getitem__(self, name: typing_extensions.Literal["bar"]) -> MetaOapg.properties.bar: ...
|
||||||
|
|
||||||
@typing.overload
|
@typing.overload
|
||||||
def __getitem__(self, name: typing.Literal["foo"]) -> MetaOapg.properties.foo: ...
|
def __getitem__(self, name: typing_extensions.Literal["foo"]) -> MetaOapg.properties.foo: ...
|
||||||
|
|
||||||
@typing.overload
|
@typing.overload
|
||||||
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
|
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
|
||||||
|
|
||||||
def __getitem__(self, name: typing.Union[typing.Literal["bar", "foo", ], str]):
|
def __getitem__(self, name: typing.Union[typing_extensions.Literal["bar", "foo", ], str]):
|
||||||
# dict_instance[name] accessor
|
# dict_instance[name] accessor
|
||||||
return super().__getitem__(name)
|
return super().__getitem__(name)
|
||||||
|
|
||||||
|
|
||||||
@typing.overload
|
@typing.overload
|
||||||
def get_item_oapg(self, name: typing.Literal["bar"]) -> MetaOapg.properties.bar: ...
|
def get_item_oapg(self, name: typing_extensions.Literal["bar"]) -> MetaOapg.properties.bar: ...
|
||||||
|
|
||||||
@typing.overload
|
@typing.overload
|
||||||
def get_item_oapg(self, name: typing.Literal["foo"]) -> typing.Union[MetaOapg.properties.foo, schemas.Unset]: ...
|
def get_item_oapg(self, name: typing_extensions.Literal["foo"]) -> typing.Union[MetaOapg.properties.foo, schemas.Unset]: ...
|
||||||
|
|
||||||
@typing.overload
|
@typing.overload
|
||||||
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
|
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
|
||||||
|
|
||||||
def get_item_oapg(self, name: typing.Union[typing.Literal["bar", "foo", ], str]):
|
def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["bar", "foo", ], str]):
|
||||||
return super().get_item_oapg(name)
|
return super().get_item_oapg(name)
|
||||||
|
|
||||||
|
|
||||||
|
@ -15,6 +15,7 @@ import functools # noqa: F401
|
|||||||
import io # noqa: F401
|
import io # noqa: F401
|
||||||
import re # noqa: F401
|
import re # noqa: F401
|
||||||
import typing # noqa: F401
|
import typing # noqa: F401
|
||||||
|
import typing_extensions # noqa: F401
|
||||||
import uuid # noqa: F401
|
import uuid # noqa: F401
|
||||||
|
|
||||||
import frozendict # noqa: F401
|
import frozendict # noqa: F401
|
||||||
@ -42,23 +43,23 @@ class ForbiddenProperty(
|
|||||||
|
|
||||||
|
|
||||||
@typing.overload
|
@typing.overload
|
||||||
def __getitem__(self, name: typing.Literal["foo"]) -> MetaOapg.properties.foo: ...
|
def __getitem__(self, name: typing_extensions.Literal["foo"]) -> MetaOapg.properties.foo: ...
|
||||||
|
|
||||||
@typing.overload
|
@typing.overload
|
||||||
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
|
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
|
||||||
|
|
||||||
def __getitem__(self, name: typing.Union[typing.Literal["foo", ], str]):
|
def __getitem__(self, name: typing.Union[typing_extensions.Literal["foo", ], str]):
|
||||||
# dict_instance[name] accessor
|
# dict_instance[name] accessor
|
||||||
return super().__getitem__(name)
|
return super().__getitem__(name)
|
||||||
|
|
||||||
|
|
||||||
@typing.overload
|
@typing.overload
|
||||||
def get_item_oapg(self, name: typing.Literal["foo"]) -> typing.Union[MetaOapg.properties.foo, schemas.Unset]: ...
|
def get_item_oapg(self, name: typing_extensions.Literal["foo"]) -> typing.Union[MetaOapg.properties.foo, schemas.Unset]: ...
|
||||||
|
|
||||||
@typing.overload
|
@typing.overload
|
||||||
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
|
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
|
||||||
|
|
||||||
def get_item_oapg(self, name: typing.Union[typing.Literal["foo", ], str]):
|
def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["foo", ], str]):
|
||||||
return super().get_item_oapg(name)
|
return super().get_item_oapg(name)
|
||||||
|
|
||||||
|
|
||||||
|
@ -15,6 +15,7 @@ import functools # noqa: F401
|
|||||||
import io # noqa: F401
|
import io # noqa: F401
|
||||||
import re # noqa: F401
|
import re # noqa: F401
|
||||||
import typing # noqa: F401
|
import typing # noqa: F401
|
||||||
|
import typing_extensions # noqa: F401
|
||||||
import uuid # noqa: F401
|
import uuid # noqa: F401
|
||||||
|
|
||||||
import frozendict # noqa: F401
|
import frozendict # noqa: F401
|
||||||
@ -42,23 +43,23 @@ class ForbiddenProperty(
|
|||||||
|
|
||||||
|
|
||||||
@typing.overload
|
@typing.overload
|
||||||
def __getitem__(self, name: typing.Literal["foo"]) -> MetaOapg.properties.foo: ...
|
def __getitem__(self, name: typing_extensions.Literal["foo"]) -> MetaOapg.properties.foo: ...
|
||||||
|
|
||||||
@typing.overload
|
@typing.overload
|
||||||
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
|
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
|
||||||
|
|
||||||
def __getitem__(self, name: typing.Union[typing.Literal["foo", ], str]):
|
def __getitem__(self, name: typing.Union[typing_extensions.Literal["foo", ], str]):
|
||||||
# dict_instance[name] accessor
|
# dict_instance[name] accessor
|
||||||
return super().__getitem__(name)
|
return super().__getitem__(name)
|
||||||
|
|
||||||
|
|
||||||
@typing.overload
|
@typing.overload
|
||||||
def get_item_oapg(self, name: typing.Literal["foo"]) -> typing.Union[MetaOapg.properties.foo, schemas.Unset]: ...
|
def get_item_oapg(self, name: typing_extensions.Literal["foo"]) -> typing.Union[MetaOapg.properties.foo, schemas.Unset]: ...
|
||||||
|
|
||||||
@typing.overload
|
@typing.overload
|
||||||
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
|
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
|
||||||
|
|
||||||
def get_item_oapg(self, name: typing.Union[typing.Literal["foo", ], str]):
|
def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["foo", ], str]):
|
||||||
return super().get_item_oapg(name)
|
return super().get_item_oapg(name)
|
||||||
|
|
||||||
|
|
||||||
|
@ -15,6 +15,7 @@ import functools # noqa: F401
|
|||||||
import io # noqa: F401
|
import io # noqa: F401
|
||||||
import re # noqa: F401
|
import re # noqa: F401
|
||||||
import typing # noqa: F401
|
import typing # noqa: F401
|
||||||
|
import typing_extensions # noqa: F401
|
||||||
import uuid # noqa: F401
|
import uuid # noqa: F401
|
||||||
|
|
||||||
import frozendict # noqa: F401
|
import frozendict # noqa: F401
|
||||||
|
@ -15,6 +15,7 @@ import functools # noqa: F401
|
|||||||
import io # noqa: F401
|
import io # noqa: F401
|
||||||
import re # noqa: F401
|
import re # noqa: F401
|
||||||
import typing # noqa: F401
|
import typing # noqa: F401
|
||||||
|
import typing_extensions # noqa: F401
|
||||||
import uuid # noqa: F401
|
import uuid # noqa: F401
|
||||||
|
|
||||||
import frozendict # noqa: F401
|
import frozendict # noqa: F401
|
||||||
|
@ -15,6 +15,7 @@ import functools # noqa: F401
|
|||||||
import io # noqa: F401
|
import io # noqa: F401
|
||||||
import re # noqa: F401
|
import re # noqa: F401
|
||||||
import typing # noqa: F401
|
import typing # noqa: F401
|
||||||
|
import typing_extensions # noqa: F401
|
||||||
import uuid # noqa: F401
|
import uuid # noqa: F401
|
||||||
|
|
||||||
import frozendict # noqa: F401
|
import frozendict # noqa: F401
|
||||||
|
@ -15,6 +15,7 @@ import functools # noqa: F401
|
|||||||
import io # noqa: F401
|
import io # noqa: F401
|
||||||
import re # noqa: F401
|
import re # noqa: F401
|
||||||
import typing # noqa: F401
|
import typing # noqa: F401
|
||||||
|
import typing_extensions # noqa: F401
|
||||||
import uuid # noqa: F401
|
import uuid # noqa: F401
|
||||||
|
|
||||||
import frozendict # noqa: F401
|
import frozendict # noqa: F401
|
||||||
|
@ -15,6 +15,7 @@ import functools # noqa: F401
|
|||||||
import io # noqa: F401
|
import io # noqa: F401
|
||||||
import re # noqa: F401
|
import re # noqa: F401
|
||||||
import typing # noqa: F401
|
import typing # noqa: F401
|
||||||
|
import typing_extensions # noqa: F401
|
||||||
import uuid # noqa: F401
|
import uuid # noqa: F401
|
||||||
|
|
||||||
import frozendict # noqa: F401
|
import frozendict # noqa: F401
|
||||||
|
@ -15,6 +15,7 @@ import functools # noqa: F401
|
|||||||
import io # noqa: F401
|
import io # noqa: F401
|
||||||
import re # noqa: F401
|
import re # noqa: F401
|
||||||
import typing # noqa: F401
|
import typing # noqa: F401
|
||||||
|
import typing_extensions # noqa: F401
|
||||||
import uuid # noqa: F401
|
import uuid # noqa: F401
|
||||||
|
|
||||||
import frozendict # noqa: F401
|
import frozendict # noqa: F401
|
||||||
|
@ -15,6 +15,7 @@ import functools # noqa: F401
|
|||||||
import io # noqa: F401
|
import io # noqa: F401
|
||||||
import re # noqa: F401
|
import re # noqa: F401
|
||||||
import typing # noqa: F401
|
import typing # noqa: F401
|
||||||
|
import typing_extensions # noqa: F401
|
||||||
import uuid # noqa: F401
|
import uuid # noqa: F401
|
||||||
|
|
||||||
import frozendict # noqa: F401
|
import frozendict # noqa: F401
|
||||||
@ -50,23 +51,23 @@ class InvalidStringValueForDefault(
|
|||||||
|
|
||||||
|
|
||||||
@typing.overload
|
@typing.overload
|
||||||
def __getitem__(self, name: typing.Literal["bar"]) -> MetaOapg.properties.bar: ...
|
def __getitem__(self, name: typing_extensions.Literal["bar"]) -> MetaOapg.properties.bar: ...
|
||||||
|
|
||||||
@typing.overload
|
@typing.overload
|
||||||
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
|
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
|
||||||
|
|
||||||
def __getitem__(self, name: typing.Union[typing.Literal["bar", ], str]):
|
def __getitem__(self, name: typing.Union[typing_extensions.Literal["bar", ], str]):
|
||||||
# dict_instance[name] accessor
|
# dict_instance[name] accessor
|
||||||
return super().__getitem__(name)
|
return super().__getitem__(name)
|
||||||
|
|
||||||
|
|
||||||
@typing.overload
|
@typing.overload
|
||||||
def get_item_oapg(self, name: typing.Literal["bar"]) -> typing.Union[MetaOapg.properties.bar, schemas.Unset]: ...
|
def get_item_oapg(self, name: typing_extensions.Literal["bar"]) -> typing.Union[MetaOapg.properties.bar, schemas.Unset]: ...
|
||||||
|
|
||||||
@typing.overload
|
@typing.overload
|
||||||
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
|
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
|
||||||
|
|
||||||
def get_item_oapg(self, name: typing.Union[typing.Literal["bar", ], str]):
|
def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["bar", ], str]):
|
||||||
return super().get_item_oapg(name)
|
return super().get_item_oapg(name)
|
||||||
|
|
||||||
|
|
||||||
|
@ -15,6 +15,7 @@ import functools # noqa: F401
|
|||||||
import io # noqa: F401
|
import io # noqa: F401
|
||||||
import re # noqa: F401
|
import re # noqa: F401
|
||||||
import typing # noqa: F401
|
import typing # noqa: F401
|
||||||
|
import typing_extensions # noqa: F401
|
||||||
import uuid # noqa: F401
|
import uuid # noqa: F401
|
||||||
|
|
||||||
import frozendict # noqa: F401
|
import frozendict # noqa: F401
|
||||||
@ -47,23 +48,23 @@ class InvalidStringValueForDefault(
|
|||||||
|
|
||||||
|
|
||||||
@typing.overload
|
@typing.overload
|
||||||
def __getitem__(self, name: typing.Literal["bar"]) -> MetaOapg.properties.bar: ...
|
def __getitem__(self, name: typing_extensions.Literal["bar"]) -> MetaOapg.properties.bar: ...
|
||||||
|
|
||||||
@typing.overload
|
@typing.overload
|
||||||
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
|
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
|
||||||
|
|
||||||
def __getitem__(self, name: typing.Union[typing.Literal["bar", ], str]):
|
def __getitem__(self, name: typing.Union[typing_extensions.Literal["bar", ], str]):
|
||||||
# dict_instance[name] accessor
|
# dict_instance[name] accessor
|
||||||
return super().__getitem__(name)
|
return super().__getitem__(name)
|
||||||
|
|
||||||
|
|
||||||
@typing.overload
|
@typing.overload
|
||||||
def get_item_oapg(self, name: typing.Literal["bar"]) -> typing.Union[MetaOapg.properties.bar, schemas.Unset]: ...
|
def get_item_oapg(self, name: typing_extensions.Literal["bar"]) -> typing.Union[MetaOapg.properties.bar, schemas.Unset]: ...
|
||||||
|
|
||||||
@typing.overload
|
@typing.overload
|
||||||
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
|
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
|
||||||
|
|
||||||
def get_item_oapg(self, name: typing.Union[typing.Literal["bar", ], str]):
|
def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["bar", ], str]):
|
||||||
return super().get_item_oapg(name)
|
return super().get_item_oapg(name)
|
||||||
|
|
||||||
|
|
||||||
|
@ -15,6 +15,7 @@ import functools # noqa: F401
|
|||||||
import io # noqa: F401
|
import io # noqa: F401
|
||||||
import re # noqa: F401
|
import re # noqa: F401
|
||||||
import typing # noqa: F401
|
import typing # noqa: F401
|
||||||
|
import typing_extensions # noqa: F401
|
||||||
import uuid # noqa: F401
|
import uuid # noqa: F401
|
||||||
|
|
||||||
import frozendict # noqa: F401
|
import frozendict # noqa: F401
|
||||||
|
@ -15,6 +15,7 @@ import functools # noqa: F401
|
|||||||
import io # noqa: F401
|
import io # noqa: F401
|
||||||
import re # noqa: F401
|
import re # noqa: F401
|
||||||
import typing # noqa: F401
|
import typing # noqa: F401
|
||||||
|
import typing_extensions # noqa: F401
|
||||||
import uuid # noqa: F401
|
import uuid # noqa: F401
|
||||||
|
|
||||||
import frozendict # noqa: F401
|
import frozendict # noqa: F401
|
||||||
|
@ -15,6 +15,7 @@ import functools # noqa: F401
|
|||||||
import io # noqa: F401
|
import io # noqa: F401
|
||||||
import re # noqa: F401
|
import re # noqa: F401
|
||||||
import typing # noqa: F401
|
import typing # noqa: F401
|
||||||
|
import typing_extensions # noqa: F401
|
||||||
import uuid # noqa: F401
|
import uuid # noqa: F401
|
||||||
|
|
||||||
import frozendict # noqa: F401
|
import frozendict # noqa: F401
|
||||||
|
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