-
Notifications
You must be signed in to change notification settings - Fork 341
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f3f338c
commit b8a6f84
Showing
7 changed files
with
187 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
packages/cw-schema-codegen/tests/snapshots/python_tpl__simple_enum-2.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
--- | ||
source: packages/cw-schema-codegen/tests/python_tpl.rs | ||
expression: output | ||
snapshot_kind: text | ||
--- | ||
# This code is @generated by cw-schema-codegen. Do not modify this manually. | ||
|
||
import typing | ||
import decimal | ||
from pydantic import BaseModel, RootModel | ||
|
||
|
||
|
||
class UnitStructure(RootModel): | ||
""" | ||
This is a struct level documentation for unit struct | ||
""" | ||
root: None |
18 changes: 18 additions & 0 deletions
18
packages/cw-schema-codegen/tests/snapshots/python_tpl__simple_enum-3.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
--- | ||
source: packages/cw-schema-codegen/tests/python_tpl.rs | ||
expression: output | ||
snapshot_kind: text | ||
--- | ||
# This code is @generated by cw-schema-codegen. Do not modify this manually. | ||
|
||
import typing | ||
import decimal | ||
from pydantic import BaseModel, RootModel | ||
|
||
|
||
|
||
class TupleStructure(RootModel): | ||
""" | ||
This is a struct level documentation for tuple | ||
""" | ||
root: typing.Tuple[int, str, int] |
81 changes: 81 additions & 0 deletions
81
packages/cw-schema-codegen/tests/snapshots/python_tpl__simple_enum-4.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
--- | ||
source: packages/cw-schema-codegen/tests/python_tpl.rs | ||
expression: output | ||
snapshot_kind: text | ||
--- | ||
# This code is @generated by cw-schema-codegen. Do not modify this manually. | ||
|
||
import typing | ||
import decimal | ||
from pydantic import BaseModel, RootModel | ||
|
||
class SomeEnum(RootModel): | ||
""" | ||
This is a struct level documentation for enum type | ||
""" | ||
|
||
|
||
|
||
class Field1(RootModel): | ||
""" | ||
Field1 docs | ||
""" | ||
root: typing.Literal['Field1'] | ||
|
||
|
||
|
||
class Field2(BaseModel): | ||
""" | ||
Field2 docs | ||
""" | ||
Field2: typing.Tuple[int, int] | ||
|
||
|
||
|
||
class Field3(BaseModel): | ||
class __Inner(BaseModel): | ||
""" | ||
Field3 docs | ||
""" | ||
|
||
a: str | ||
""" | ||
`a` field docs | ||
""" | ||
|
||
b: int | ||
""" | ||
`b` field docs | ||
""" | ||
|
||
Field3: __Inner | ||
|
||
|
||
root: typing.Union[ Field1, Field2, Field3, ] | ||
# This code is @generated by cw-schema-codegen. Do not modify this manually. | ||
|
||
import typing | ||
import decimal | ||
from pydantic import BaseModel, RootModel | ||
|
||
|
||
|
||
class NamedStructure(BaseModel): | ||
""" | ||
This is a struct level documentation for named structure | ||
""" | ||
|
||
a: str | ||
""" | ||
# `a` field docs | ||
""" | ||
|
||
b: int | ||
""" | ||
# `b` field docs | ||
""" | ||
|
||
c: SomeEnum | ||
""" | ||
# `c` field docs | ||
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters