fix: pass tests
This commit is contained in:
parent
b896020a4f
commit
be944ac98e
@ -128,6 +128,14 @@ async def test_generated_oas_should_have_components_schemas(generated_oas):
|
||||
"title": "Color",
|
||||
"type": "string",
|
||||
},
|
||||
'Error': {
|
||||
'properties': {
|
||||
'code': {'title': 'Code', 'type': 'integer'},
|
||||
'text': {'title': 'Text', 'type': 'string'}},
|
||||
'required': ['code', 'text'],
|
||||
'title': 'Error',
|
||||
'type': 'object'
|
||||
},
|
||||
'Lang': {
|
||||
'description': 'An enumeration.',
|
||||
'enum': ['en', 'fr'],
|
||||
@ -143,6 +151,20 @@ async def test_generated_oas_should_have_components_schemas(generated_oas):
|
||||
"title": "Toy",
|
||||
"type": "object",
|
||||
},
|
||||
'Pet': {
|
||||
'properties': {
|
||||
'id': {'title': 'Id', 'type': 'integer'},
|
||||
'name': {'title': 'Name', 'type': 'string'},
|
||||
'toys': {
|
||||
'items': {'$ref': '#/components/schemas/Toy'},
|
||||
'title': 'Toys',
|
||||
'type': 'array'
|
||||
}
|
||||
},
|
||||
'required': ['id', 'toys'],
|
||||
'title': 'Pet',
|
||||
'type': 'object'
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -191,20 +213,7 @@ async def test_pets_route_should_have_get_method(generated_oas):
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"items": {
|
||||
"properties": {
|
||||
"id": {"title": "Id", "type": "integer"},
|
||||
"name": {"title": "Name", "type": "string"},
|
||||
"toys": {
|
||||
"items": {"$ref": "#/components/schemas/Toy"},
|
||||
"title": "Toys",
|
||||
"type": "array",
|
||||
},
|
||||
},
|
||||
"required": ["id", "toys"],
|
||||
"title": "Pet",
|
||||
"type": "object",
|
||||
},
|
||||
"items": {'$ref': '#/components/schemas/Pet'},
|
||||
"type": "array",
|
||||
}
|
||||
}
|
||||
@ -242,20 +251,7 @@ async def test_pets_route_should_have_post_method(generated_oas):
|
||||
"description": "",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"properties": {
|
||||
"id": {"title": "Id", "type": "integer"},
|
||||
"name": {"title": "Name", "type": "string"},
|
||||
"toys": {
|
||||
"items": {"$ref": "#/components/schemas/Toy"},
|
||||
"title": "Toys",
|
||||
"type": "array",
|
||||
},
|
||||
},
|
||||
"required": ["id", "toys"],
|
||||
"title": "Pet",
|
||||
"type": "object",
|
||||
}
|
||||
"schema": {'$ref': '#/components/schemas/Pet'}
|
||||
}
|
||||
},
|
||||
}
|
||||
@ -314,30 +310,14 @@ async def test_pets_id_route_should_have_get_method(generated_oas):
|
||||
},
|
||||
},
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"properties": {
|
||||
"id": {"title": "Id", "type": "integer"},
|
||||
"name": {"title": "Name", "type": "string"},
|
||||
"toys": {
|
||||
"items": {"$ref": "#/components/schemas/Toy"},
|
||||
"title": "Toys",
|
||||
"type": "array",
|
||||
},
|
||||
},
|
||||
"required": ["id", "toys"],
|
||||
"title": "Pet",
|
||||
"type": "object",
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
"404": {"description": "", "content": {}},
|
||||
},
|
||||
'responses': {
|
||||
'200': {'content': {'application/json': {'schema': {'$ref': '#/components/schemas/Pet'}}},
|
||||
'description': ''},
|
||||
'400': {'content': {'application/json': {'schema': {'$ref': '#/components/schemas/Error'}}},
|
||||
'description': ''},
|
||||
'404': {'content': {'application/json': {'schema': {'$ref': '#/components/schemas/Error'}}},
|
||||
'description': ''}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user