class Schema(JsonModel): id = JsonModel.field(str) title = JsonModel.field(str) multipleOf = JsonModel.field(int) maximum = JsonModel.field(int) exclusiveMaximum = JsonModel.field(int) minimum = JsonModel.field(int) exclusiveMinimum = JsonModel.field(int) maxLength = JsonModel.field(int) minLength = JsonModel.field(int) pattern = JsonModel.field(str) maxItems = JsonModel.field(int) minItems = JsonModel.field(int) uniqueItems = JsonModel.field(bool) maxProperties = JsonModel.field(int) minPropoerties = JsonModel.field(int) required = JsonModel.list(str) enum = JsonModel.list(str) allOf = JsonModel.list('json_api.model.Schema') anyOf = JsonModel.list('json_api.model.Schema') oneOf = JsonModel.list('json_api.model.Schema') _not = JsonModel.list('json_api.model.Schema', 'not') items = JsonModel.field('json_api.model.Schema') properties = JsonModel.dict('json_api.model.Schema') additionalProperties = JsonModel.dict('json_api.model.Schema') description = JsonModel.field(str) format = JsonModel.field(str) nullable = JsonModel.field(bool) readOnly = JsonModel.field(bool) writeOnly = JsonModel.field(bool) xml = JsonModel.field(Xml) externalDocs = JsonModel.field(ExternalDocs) deprecated = JsonModel.field(bool)
class Operation(JsonModel): tags = JsonModel.list(str) summary = JsonModel.field(str) description = JsonModel.field(str) externalDocs = JsonModel.field(ExternalDocs) operationid = JsonModel.field(str) parameters = JsonModel.list(Parameter) requestBody = JsonModel.field(RequestBody) responses = JsonModel.dict(Response, required=True) callbacks = JsonModel.dict(Callback, required=True) deprecated = JsonModel.field(bool) security = JsonModel.list(Any) servers = JsonModel.list(Server)
class Components(JsonModel): schemas = JsonModel.dict('Schema') responses = JsonModel.dict(Response) parameters = JsonModel.dict(Parameter) examples = JsonModel.dict(Example) requestBodies = JsonModel.dict(RequestBody) headers = JsonModel.dict(Reference) securitySchemes = JsonModel.dict(SecurityScheme) links = JsonModel.dict(Link) callbacks = JsonModel.dict(Callback)
class Link(JsonModel): operationRef = JsonModel.field(str) operationid = JsonModel.field(str) parameters = JsonModel.dict(Any) requestBody = JsonModel.field(Any) description = JsonModel.field(str) server = JsonModel.field(Server)
class Parameter(JsonModel): name = JsonModel.field(str, required=True) _in = JsonModel.field(str, alias='in', required=True, choices=['query', 'header', 'path', 'cookie']) description = JsonModel.field(str) required = JsonModel.field(bool) deprecated = JsonModel.field(bool) allowEmptyValue = JsonModel.field(bool) style = JsonModel.field(str) explode = JsonModel.field(bool) allowReserved = JsonModel.field(bool) schema = JsonModel.field(Schema) example = JsonModel.field(Any) examples = JsonModel.dict(Example) content = JsonModel.dict(MediaType)
class OpenApi(JsonModel): openapi = JsonModel.field(str, required=True) info = JsonModel.field(Info, required=True) servers = JsonModel.list(Server) paths = JsonModel.dict(PathItem, required=True) components = JsonModel.field(Components) security = JsonModel.list(SecurityRequirement) tags = JsonModel.list(Tag) externalDocs = JsonModel.field(ExternalDocs)
class Header(JsonModel): description = JsonModel.field(str) required = JsonModel.field(bool) deprecated = JsonModel.field(bool) allowEmptyValue = JsonModel.field(bool) style = JsonModel.field(str) explode = JsonModel.field(bool) allowReserved = JsonModel.field(bool) schema = JsonModel.field('Schema') content = JsonModel.dict('MediaType')
class Server(JsonModel): url = JsonModel.field(str) description = JsonModel.field(str) variables = JsonModel.dict(ServerVariable)
class OAuthFlow(JsonModel): authorizationUrl = JsonModel.field(str) tokenUrl = JsonModel.field(str) refreshUrl = JsonModel.field(str) scopes = JsonModel.dict(str)
class MediaType(JsonModel): schema = JsonModel.field('Schema') example = JsonModel.field(Any) examples = JsonModel.list(Example) encoding = JsonModel.dict(Encoding)
class Discriminator(JsonModel): propertyName = JsonModel.field(str) mapping = JsonModel.dict(str)
class Encoding(JsonModel): contentType = JsonModel.field(str) headers = JsonModel.dict(Header) style = JsonModel.field(str) explode = JsonModel.field(bool) allowReserved = JsonModel.field(bool)
class RequestBody(JsonModel): description = JsonModel.field(str) content = JsonModel.dict(MediaType, required=True) required = JsonModel.field(bool)
class Response(JsonModel): description = JsonModel.field(str, required=True) headers = JsonModel.dict(Header) content = JsonModel.dict(MediaType) links = JsonModel.dict(Link)