Skip to content

Commit 65075fb

Browse files
committed
Merge remote-tracking branch 'origin/main'
2 parents 1a67414 + 1fc6554 commit 65075fb

19 files changed

+54
-63
lines changed

sdkgen.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"typehub/typeschema":{"operations":[],"definitions":{"AnyPropertyType":{"description":"Represents an any value which allows any kind of value","type":"struct","parent":{"type":"reference","target":"PropertyType"}},"ArrayDefinitionType":{"description":"Represents an array which contains a dynamic list of values of the same type","type":"struct","parent":{"type":"reference","target":"CollectionDefinitionType"}},"ArrayPropertyType":{"description":"Represents an array which contains a dynamic list of values of the same type","type":"struct","parent":{"type":"reference","target":"CollectionPropertyType"}},"BooleanPropertyType":{"description":"Represents a boolean value","type":"struct","parent":{"type":"reference","target":"ScalarPropertyType"}},"CollectionDefinitionType":{"description":"Base collection type","type":"struct","parent":{"type":"reference","target":"DefinitionType"},"base":true,"properties":{"schema":{"description":"","type":"reference","target":"PropertyType"},"type":{"description":"","type":"string"}},"discriminator":"type","mapping":{"ArrayDefinitionType":"array","MapDefinitionType":"map"}},"CollectionPropertyType":{"description":"Base collection property type","type":"struct","parent":{"type":"reference","target":"PropertyType"},"base":true,"properties":{"schema":{"description":"","type":"reference","target":"PropertyType"},"type":{"description":"","type":"string"}},"discriminator":"type","mapping":{"ArrayPropertyType":"array","MapPropertyType":"map"}},"DefinitionType":{"description":"Base definition type","type":"struct","base":true,"properties":{"deprecated":{"description":"","type":"boolean"},"description":{"description":"","type":"string"},"type":{"description":"","type":"string"}},"discriminator":"type","mapping":{"ArrayDefinitionType":"array","MapDefinitionType":"map","StructDefinitionType":"struct"}},"GenericPropertyType":{"description":"Represents a generic value which can be replaced with a concrete type","type":"struct","parent":{"type":"reference","target":"PropertyType"},"properties":{"name":{"description":"The name of the generic, it is recommended to use common generic names like T or TValue. These generics can then be replaced on usage with a concrete type through the template property at a reference","type":"string"}}},"IntegerPropertyType":{"description":"Represents an integer value","type":"struct","parent":{"type":"reference","target":"ScalarPropertyType"}},"MapDefinitionType":{"description":"Represents a map which contains a dynamic set of key value entries of the same type","type":"struct","parent":{"type":"reference","target":"CollectionDefinitionType"}},"MapPropertyType":{"description":"Represents a map which contains a dynamic set of key value entries of the same type","type":"struct","parent":{"type":"reference","target":"CollectionPropertyType"}},"NumberPropertyType":{"description":"Represents a float value","type":"struct","parent":{"type":"reference","target":"ScalarPropertyType"}},"PropertyType":{"description":"Base property type","type":"struct","base":true,"properties":{"deprecated":{"description":"","type":"boolean"},"description":{"description":"","type":"string"},"nullable":{"description":"","type":"boolean"},"type":{"description":"","type":"string"}},"discriminator":"type","mapping":{"AnyPropertyType":"any","ArrayPropertyType":"array","BooleanPropertyType":"boolean","GenericPropertyType":"generic","IntegerPropertyType":"integer","MapPropertyType":"map","NumberPropertyType":"number","ReferencePropertyType":"reference","StringPropertyType":"string"}},"ReferencePropertyType":{"description":"Represents a reference to a definition type","type":"struct","parent":{"type":"reference","target":"PropertyType"},"properties":{"target":{"description":"The target type, this must be a key which is available at the definitions map","type":"string"},"template":{"description":"A map where the key is the name of the generic and the value must point to a key under the definitions keyword. This can be used in case the target points to a type which contains generics, then it is possible to replace those generics with a concrete type","type":"map","schema":{"type":"string"}}}},"ScalarPropertyType":{"description":"Base scalar property type","type":"struct","parent":{"type":"reference","target":"PropertyType"},"base":true,"properties":{"type":{"description":"","type":"string"}},"discriminator":"type","mapping":{"BooleanPropertyType":"boolean","IntegerPropertyType":"integer","NumberPropertyType":"number","StringPropertyType":"string"}},"StringPropertyType":{"description":"Represents a string value","type":"struct","parent":{"type":"reference","target":"ScalarPropertyType"},"properties":{"format":{"description":"Optional describes the format of the string. Supported are the following types: date, date-time and time. A code generator may use a fitting data type to represent such a format, if not supported it should fallback to a string","type":"string"}}},"StructDefinitionType":{"description":"A struct represents a class/structure with a fix set of defined properties","type":"struct","parent":{"type":"reference","target":"DefinitionType"},"properties":{"base":{"description":"Indicates whether this is a base structure, default is false. If true the structure is used a base type, this means it is not possible to create an instance from this structure","type":"boolean"},"discriminator":{"description":"Optional the property name of a discriminator property. This should be only used in case this is also a base structure","type":"string"},"mapping":{"description":"In case a discriminator is configured it is required to configure a mapping. The mapping is a map where the key is the type name (a key from the definitions map) and the value the actual discriminator type value","type":"map","schema":{"type":"string"}},"parent":{"description":"Defines a parent type, all properties from the parent type are inherited","type":"reference","target":"ReferencePropertyType"},"properties":{"description":"Contains a map of available properties for this struct","type":"map","schema":{"type":"reference","target":"PropertyType"}}}},"TypeSchema":{"description":"TypeSchema specification","type":"struct","properties":{"definitions":{"description":"","type":"map","schema":{"type":"reference","target":"DefinitionType"}},"import":{"description":"Allows to import other TypeSchema documents. It contains a map where the key is the namespace and the value points to a remote document. The value is a URL and a code generator should support at least the following schemes: file, http, https","type":"map","schema":{"type":"string"}},"root":{"description":"Specifies the root type of your specification, this must be a key which is available at the definitions map","type":"string"}}}}}}
1+
{"typehub/typeschema":{"operations":[],"definitions":{"AnyPropertyType":{"description":"Represents an any value which allows any kind of value","type":"struct","parent":{"type":"reference","target":"PropertyType"}},"ArrayDefinitionType":{"description":"Represents an array which contains a dynamic list of values of the same type","type":"struct","parent":{"type":"reference","target":"CollectionDefinitionType"}},"ArrayPropertyType":{"description":"Represents an array which contains a dynamic list of values of the same type","type":"struct","parent":{"type":"reference","target":"CollectionPropertyType"}},"BooleanPropertyType":{"description":"Represents a boolean value","type":"struct","parent":{"type":"reference","target":"ScalarPropertyType"}},"CollectionDefinitionType":{"description":"Base collection type","type":"struct","parent":{"type":"reference","target":"DefinitionType"},"base":true,"properties":{"schema":{"description":"","type":"reference","target":"PropertyType"},"type":{"description":"","type":"string"}},"discriminator":"type","mapping":{"ArrayDefinitionType":"array","MapDefinitionType":"map"}},"CollectionPropertyType":{"description":"Base collection property type","type":"struct","parent":{"type":"reference","target":"PropertyType"},"base":true,"properties":{"schema":{"description":"","type":"reference","target":"PropertyType"},"type":{"description":"","type":"string"}},"discriminator":"type","mapping":{"ArrayPropertyType":"array","MapPropertyType":"map"}},"DefinitionType":{"description":"Base definition type","type":"struct","base":true,"properties":{"deprecated":{"description":"","type":"boolean"},"description":{"description":"","type":"string"},"type":{"description":"","type":"string"}},"discriminator":"type","mapping":{"ArrayDefinitionType":"array","MapDefinitionType":"map","StructDefinitionType":"struct"}},"GenericPropertyType":{"description":"Represents a generic value which can be replaced with a concrete type","type":"struct","parent":{"type":"reference","target":"PropertyType"},"properties":{"name":{"description":"The name of the generic, it is recommended to use common generic names like T or TValue. These generics can then be replaced on usage with a concrete type through the template property at a reference","type":"string"}}},"IntegerPropertyType":{"description":"Represents an integer value","type":"struct","parent":{"type":"reference","target":"ScalarPropertyType"}},"MapDefinitionType":{"description":"Represents a map which contains a dynamic set of key value entries of the same type","type":"struct","parent":{"type":"reference","target":"CollectionDefinitionType"}},"MapPropertyType":{"description":"Represents a map which contains a dynamic set of key value entries of the same type","type":"struct","parent":{"type":"reference","target":"CollectionPropertyType"}},"NumberPropertyType":{"description":"Represents a float value","type":"struct","parent":{"type":"reference","target":"ScalarPropertyType"}},"PropertyType":{"description":"Base property type","type":"struct","base":true,"properties":{"deprecated":{"description":"","type":"boolean"},"description":{"description":"","type":"string"},"nullable":{"description":"","type":"boolean"},"type":{"description":"","type":"string"}},"discriminator":"type","mapping":{"AnyPropertyType":"any","ArrayPropertyType":"array","BooleanPropertyType":"boolean","GenericPropertyType":"generic","IntegerPropertyType":"integer","MapPropertyType":"map","NumberPropertyType":"number","ReferencePropertyType":"reference","StringPropertyType":"string"}},"ReferencePropertyType":{"description":"Represents a reference to a definition type","type":"struct","parent":{"type":"reference","target":"PropertyType"},"properties":{"target":{"description":"The target type, this must be a key which is available at the definitions map","type":"string"},"template":{"description":"A map where the key is the name of the generic and the value must point to a key under the definitions keyword. This can be used in case the target points to a type which contains generics, then it is possible to replace those generics with a concrete type","type":"map","schema":{"type":"string"}}}},"ScalarPropertyType":{"description":"Base scalar property type","type":"struct","parent":{"type":"reference","target":"PropertyType"},"base":true,"properties":{"type":{"description":"","type":"string"}},"discriminator":"type","mapping":{"BooleanPropertyType":"boolean","IntegerPropertyType":"integer","NumberPropertyType":"number","StringPropertyType":"string"}},"StringPropertyType":{"description":"Represents a string value","type":"struct","parent":{"type":"reference","target":"ScalarPropertyType"},"properties":{"default":{"description":"Optional a default value for this property","type":"string"},"format":{"description":"Optional describes the format of the string. Supported are the following types: date, date-time and time. A code generator may use a fitting data type to represent such a format, if not supported it should fallback to a string","type":"string"}}},"StructDefinitionType":{"description":"A struct represents a class/structure with a fix set of defined properties","type":"struct","parent":{"type":"reference","target":"DefinitionType"},"properties":{"base":{"description":"Indicates whether this is a base structure, default is false. If true the structure is used a base type, this means it is not possible to create an instance from this structure","type":"boolean"},"discriminator":{"description":"Optional the property name of a discriminator property. This should be only used in case this is also a base structure","type":"string"},"mapping":{"description":"In case a discriminator is configured it is required to configure a mapping. The mapping is a map where the key is the type name (a key from the definitions map) and the value the actual discriminator type value","type":"map","schema":{"type":"string"}},"parent":{"description":"Defines a parent type, all properties from the parent type are inherited","type":"reference","target":"ReferencePropertyType"},"properties":{"description":"Contains a map of available properties for this struct","type":"map","schema":{"type":"reference","target":"PropertyType"}}}},"TypeSchema":{"description":"TypeSchema specification","type":"struct","properties":{"definitions":{"description":"","type":"map","schema":{"type":"reference","target":"DefinitionType"}},"import":{"description":"Allows to import other TypeSchema documents. It contains a map where the key is the namespace and the value points to a remote document. The value is a URL and a code generator should support at least the following schemes: file, http, https","type":"map","schema":{"type":"string"}},"root":{"description":"Specifies the root type of your specification, this must be a key which is available at the definitions map","type":"string"}}}}}}

src/model/any_property_type.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
from pydantic import BaseModel, Field, GetCoreSchemaHandler
1+
from pydantic import BaseModel, Field, GetCoreSchemaHandler, Tag
22
from pydantic_core import CoreSchema, core_schema
3-
from typing import Any, Dict, Generic, List, Optional, TypeVar
3+
from typing import Any, Dict, Generic, List, Optional, TypeVar, Annotated, Union
44
from .property_type import PropertyType
55

66

src/model/array_definition_type.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
from pydantic import BaseModel, Field, GetCoreSchemaHandler
1+
from pydantic import BaseModel, Field, GetCoreSchemaHandler, Tag
22
from pydantic_core import CoreSchema, core_schema
3-
from typing import Any, Dict, Generic, List, Optional, TypeVar
3+
from typing import Any, Dict, Generic, List, Optional, TypeVar, Annotated, Union
44
from .collection_definition_type import CollectionDefinitionType
55

66

src/model/array_property_type.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
from pydantic import BaseModel, Field, GetCoreSchemaHandler
1+
from pydantic import BaseModel, Field, GetCoreSchemaHandler, Tag
22
from pydantic_core import CoreSchema, core_schema
3-
from typing import Any, Dict, Generic, List, Optional, TypeVar
3+
from typing import Any, Dict, Generic, List, Optional, TypeVar, Annotated, Union
44
from .collection_property_type import CollectionPropertyType
55

66

src/model/boolean_property_type.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
from pydantic import BaseModel, Field, GetCoreSchemaHandler
1+
from pydantic import BaseModel, Field, GetCoreSchemaHandler, Tag
22
from pydantic_core import CoreSchema, core_schema
3-
from typing import Any, Dict, Generic, List, Optional, TypeVar
3+
from typing import Any, Dict, Generic, List, Optional, TypeVar, Annotated, Union
44
from .scalar_property_type import ScalarPropertyType
55

66

src/model/collection_definition_type.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
1-
from pydantic import BaseModel, Field, GetCoreSchemaHandler
1+
from pydantic import BaseModel, Field, GetCoreSchemaHandler, Tag
22
from pydantic_core import CoreSchema, core_schema
3-
from typing import Any, Dict, Generic, List, Optional, TypeVar
4-
from .array_definition_type import ArrayDefinitionType
5-
from .map_definition_type import MapDefinitionType
3+
from typing import Any, Dict, Generic, List, Optional, TypeVar, Annotated, Union
64
from .definition_type import DefinitionType
75
from .property_type import PropertyType
86
from .any_property_type import AnyPropertyType
@@ -18,8 +16,7 @@
1816

1917
# Base collection type
2018
class CollectionDefinitionType(DefinitionType):
21-
schema_: Optional[Annotated[Union[Annotated[AnyPropertyType, Tag('any')], Annotated[ArrayPropertyType, Tag('array')], Annotated[BooleanPropertyType, Tag('boolean')], Annotated[GenericPropertyType, Tag('generic')], Annotated[IntegerPropertyType, Tag('integer')], Annotated[MapPropertyType, Tag('map')], Annotated[NumberPropertyType, Tag('number')], Annotated[ReferencePropertyType, Tag('reference')], Annotated[StringPropertyType, Tag('string')]], Field(discriminator='type')]
22-
] = Field(default=None, alias="schema")
19+
schema_: Optional[Annotated[Union[Annotated[AnyPropertyType, Tag('any')], Annotated[ArrayPropertyType, Tag('array')], Annotated[BooleanPropertyType, Tag('boolean')], Annotated[GenericPropertyType, Tag('generic')], Annotated[IntegerPropertyType, Tag('integer')], Annotated[MapPropertyType, Tag('map')], Annotated[NumberPropertyType, Tag('number')], Annotated[ReferencePropertyType, Tag('reference')], Annotated[StringPropertyType, Tag('string')]], Field(discriminator='type')]] = Field(default=None, alias="schema")
2320
type: Optional[str] = Field(default=None, alias="type")
2421
pass
2522

src/model/collection_property_type.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
1-
from pydantic import BaseModel, Field, GetCoreSchemaHandler
1+
from pydantic import BaseModel, Field, GetCoreSchemaHandler, Tag
22
from pydantic_core import CoreSchema, core_schema
3-
from typing import Any, Dict, Generic, List, Optional, TypeVar
4-
from .array_property_type import ArrayPropertyType
5-
from .map_property_type import MapPropertyType
3+
from typing import Any, Dict, Generic, List, Optional, TypeVar, Annotated, Union
64
from .property_type import PropertyType
75
from .any_property_type import AnyPropertyType
86
from .array_property_type import ArrayPropertyType
@@ -17,8 +15,7 @@
1715

1816
# Base collection property type
1917
class CollectionPropertyType(PropertyType):
20-
schema_: Optional[Annotated[Union[Annotated[AnyPropertyType, Tag('any')], Annotated[ArrayPropertyType, Tag('array')], Annotated[BooleanPropertyType, Tag('boolean')], Annotated[GenericPropertyType, Tag('generic')], Annotated[IntegerPropertyType, Tag('integer')], Annotated[MapPropertyType, Tag('map')], Annotated[NumberPropertyType, Tag('number')], Annotated[ReferencePropertyType, Tag('reference')], Annotated[StringPropertyType, Tag('string')]], Field(discriminator='type')]
21-
] = Field(default=None, alias="schema")
18+
schema_: Optional[Annotated[Union[Annotated[AnyPropertyType, Tag('any')], Annotated[ArrayPropertyType, Tag('array')], Annotated[BooleanPropertyType, Tag('boolean')], Annotated[GenericPropertyType, Tag('generic')], Annotated[IntegerPropertyType, Tag('integer')], Annotated[MapPropertyType, Tag('map')], Annotated[NumberPropertyType, Tag('number')], Annotated[ReferencePropertyType, Tag('reference')], Annotated[StringPropertyType, Tag('string')]], Field(discriminator='type')]] = Field(default=None, alias="schema")
2219
type: Optional[str] = Field(default=None, alias="type")
2320
pass
2421

src/model/definition_type.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
1-
from pydantic import BaseModel, Field, GetCoreSchemaHandler
1+
from pydantic import BaseModel, Field, GetCoreSchemaHandler, Tag
22
from pydantic_core import CoreSchema, core_schema
3-
from typing import Any, Dict, Generic, List, Optional, TypeVar
4-
from .array_definition_type import ArrayDefinitionType
5-
from .map_definition_type import MapDefinitionType
6-
from .struct_definition_type import StructDefinitionType
3+
from typing import Any, Dict, Generic, List, Optional, TypeVar, Annotated, Union
74

85

96
# Base definition type

src/model/generic_property_type.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
from pydantic import BaseModel, Field, GetCoreSchemaHandler
1+
from pydantic import BaseModel, Field, GetCoreSchemaHandler, Tag
22
from pydantic_core import CoreSchema, core_schema
3-
from typing import Any, Dict, Generic, List, Optional, TypeVar
3+
from typing import Any, Dict, Generic, List, Optional, TypeVar, Annotated, Union
44
from .property_type import PropertyType
55

66

src/model/integer_property_type.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
from pydantic import BaseModel, Field, GetCoreSchemaHandler
1+
from pydantic import BaseModel, Field, GetCoreSchemaHandler, Tag
22
from pydantic_core import CoreSchema, core_schema
3-
from typing import Any, Dict, Generic, List, Optional, TypeVar
3+
from typing import Any, Dict, Generic, List, Optional, TypeVar, Annotated, Union
44
from .scalar_property_type import ScalarPropertyType
55

66

0 commit comments

Comments
 (0)