modify schema to show many to many as list of nested models, check openapi generation in tests

This commit is contained in:
collerek
2020-10-27 17:55:41 +01:00
parent d3091c404f
commit 82e3eb94ae
10 changed files with 178 additions and 137 deletions

View File

@ -119,9 +119,7 @@ def test_all_endpoints():
items = response.json()
assert len(items) == 0
client.post(
"/items/", json={"name": "test_2", "id": 2, "category": category}
)
client.post("/items/", json={"name": "test_2", "id": 2, "category": category})
response = client.get("/items/")
items = response.json()
assert len(items) == 1
@ -132,4 +130,3 @@ def test_all_endpoints():
response = client.get("/docs/")
assert response.status_code == 200