increase pydantic integration with headers, query string and url path

This commit is contained in:
Vincent Maillol
2020-11-28 12:39:09 +01:00
parent 93ec0f6c80
commit c4c18ee4a1
12 changed files with 199 additions and 61 deletions

View File

@@ -30,6 +30,7 @@ def test_show_oad_of_app(cmd_line, capfd):
"name": "a",
"required": true,
"schema": {
"title": "a",
"type": "integer"
}
}
@@ -44,6 +45,7 @@ def test_show_oad_of_app(cmd_line, capfd):
"name": "b",
"required": true,
"schema": {
"title": "b",
"type": "integer"
}
}
@@ -75,6 +77,7 @@ def test_show_oad_of_sub_app(cmd_line, capfd):
"name": "b",
"required": true,
"schema": {
"title": "b",
"type": "integer"
}
}
@@ -106,6 +109,7 @@ def test_show_oad_of_a_callable(cmd_line, capfd):
"name": "a",
"required": true,
"schema": {
"title": "a",
"type": "integer"
}
}

View File

@@ -65,19 +65,19 @@ async def test_pets_route_should_have_get_method(generated_oas):
"in": "query",
"name": "format",
"required": True,
"schema": {"type": "string"},
"schema": {"title": "format", "type": "string"},
},
{
"in": "query",
"name": "name",
"required": False,
"schema": {"type": "string"},
"schema": {"title": "name", "type": "string"},
},
{
"in": "header",
"name": "promo",
"required": False,
"schema": {"format": "uuid", "type": "string"},
"schema": {"title": "promo", "format": "uuid", "type": "string"},
},
],
"responses": {
@@ -152,7 +152,7 @@ async def test_pets_id_route_should_have_delete_method(generated_oas):
"required": True,
"in": "path",
"name": "id",
"schema": {"type": "integer"},
"schema": {"title": "id", "type": "integer"},
}
],
"responses": {"204": {"content": {}}},
@@ -166,7 +166,7 @@ async def test_pets_id_route_should_have_get_method(generated_oas):
"in": "path",
"name": "id",
"required": True,
"schema": {"type": "integer"},
"schema": {"title": "id", "type": "integer"},
}
],
"responses": {
@@ -197,7 +197,7 @@ async def test_pets_id_route_should_have_put_method(generated_oas):
"in": "path",
"name": "id",
"required": True,
"schema": {"type": "integer"},
"schema": {"title": "id", "type": "integer"},
}
],
"requestBody": {