예제 #1
0
class Order(object):
    id = jo.integer(int_format="int64")
    pet_id = jo.integer(int_format="int64")
    quantity = jo.integer(int_format="int32")
    ship_date = jo.string(str_format="date-time")
    status = jo.object(item=Status, description="Order Status")
    complete = jo.boolean()
예제 #2
0
class User(object):
    id = jo.integer(int_format="int64")
    username = jo.string()
    first_name = jo.string()
    last_name = jo.string()
    email = jo.email()
    password = jo.string()
    phone = jo.string()
    user_status = jo.integer(int_format="int32", description="User status")
예제 #3
0
class Lemons(object):
    name = jo.string(str_format="uuid", required=True, enum=[None, "a", "b"])
    size = jo.integer(maximum=1000)
    flows = jo.one_of(types=[Squeezed, OakTown])
    samples = jo.array(item=Sample, required=True, min_items=1)
    star = jo.object(SoapStar, required=True)
    color = jo.object(Color, required=True)
예제 #4
0
class Pet(object):
    id = jo.integer(int_format="int64")
    category = jo.object(item=Category)
    name = jo.string(required=True, example="doggie")
    photo_urls = jo.array(
        item=swagger.String(xml="photoUrl"),
        required=True,
        xml=swagger.XML(wrapped=True),
    )
    status = jo.object(item=Status)
    tags = jo.array(item=Tag, xml=swagger.XML(wrapped=True))
예제 #5
0
파일: schemas.py 프로젝트: kulgan/flaskdoc
class PullRequest(object):
    id = jo.integer()
    title = jo.string()
    repository = jo.object(item=Repository)
    author = jo.object(item=User)
예제 #6
0
class ApiResponse(object):
    code = jo.integer()
    type = jo.string()
    message = jo.string()
예제 #7
0
class Tag(object):
    id = jo.integer(int_format="int64")
    name = jo.string()
예제 #8
0
class Category(object):
    id = jo.integer(int_format="int64")
    name = jo.string()