예제 #1
0
class Response(Schema):
    i: int
    f: float = Field(..., title="f title", description="f desc")

    class Config(Schema.Config):
        alias_generator = to_camel
        allow_population_by_field_name = True
예제 #2
0
class AliasedSchema(Schema):
    query: str = Field(..., alias="aliased.-_~name")
예제 #3
0
 class Input(Schema):
     page: int = Field(1, ge=1)
예제 #4
0
 class Input(Schema):
     limit: int = Field(settings.PAGINATION_PER_PAGE, ge=1)
     offset: int = Field(0, ge=0)
예제 #5
0
class SchemaWithAlias(Schema):
    foo: str = Field("", alias="bar")
예제 #6
0
class TestData2(Schema):
    foo2: int = Field(22, title="Foo2 Title", description="Foo2 Desc")
    bar2: str
    d3: TestData3
예제 #7
0
class TestData3(Schema):
    foo3: int = Field(..., title="Foo3 Title", description="Foo3 Desc")
    bar3: str = "33bar"
예제 #8
0
class TestData4(Schema):
    foo4: int = Field(44, title="Foo4 Title", description="Foo4 Desc")
    bar4: str = "44bar"