Ejemplo n.º 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()
Ejemplo n.º 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")
Ejemplo n.º 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)
Ejemplo n.º 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))
Ejemplo n.º 5
0
class PullRequest(object):
    id = jo.integer()
    title = jo.string()
    repository = jo.object(item=Repository)
    author = jo.object(item=User)
Ejemplo n.º 6
0
class ApiResponse(object):
    code = jo.integer()
    type = jo.string()
    message = jo.string()
Ejemplo n.º 7
0
class Tag(object):
    id = jo.integer(int_format="int64")
    name = jo.string()
Ejemplo n.º 8
0
class Category(object):
    id = jo.integer(int_format="int64")
    name = jo.string()