Skip to content
This repository was archived by the owner on Dec 25, 2024. It is now read-only.

Commit e2da9aa

Browse files
committed
Changes not schema to use prior definition
1 parent d624e15 commit e2da9aa

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_composed_schemas.hbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ class AnyOf:
6767

6868
{{> components/schemas/_helper_refclass_staticmethod }}
6969
{{else}}
70-
{{> components/schemas/_helper_schema_switch_case identifierPieces=(append identifierPieces jsonPathPiece) }}
70+
_Not: typing_extensions.TypeAlias = {{jsonPathPiece.camelCase}}[U]
7171
{{/if}}
7272
{{/with}}
7373
{{/if}}

samples/openapi3/client/petstore/python/src/petstore_api/components/schema/any_type_not_string.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class AnyTypeNotString(
2525

2626
class Schema_:
2727
# any type
28-
_Not: typing_extensions.TypeAlias = schemas.StrSchema[U]
28+
_Not: typing_extensions.TypeAlias = _Not[U]
2929

3030

3131
def __new__(

samples/openapi3/client/petstore/python/src/petstore_api/components/schema/user.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ class AnyTypeExceptNullProp(
9797

9898
class Schema_:
9999
# any type
100-
_Not: typing_extensions.TypeAlias = schemas.NoneSchema[U]
100+
_Not: typing_extensions.TypeAlias = _Not[U]
101101

102102

103103
def __new__(
@@ -278,7 +278,7 @@ class AnyTypeExceptNullProp(
278278

279279
class Schema_:
280280
# any type
281-
_Not: typing_extensions.TypeAlias = schemas.NoneSchema[U]
281+
_Not: typing_extensions.TypeAlias = _Not[U]
282282

283283

284284
def __new__(

0 commit comments

Comments
 (0)