enthalten muss. Ich würde auch gerne wissen, ob das -Gender Feld "männlich/weiblich" als ich auch validieren würde.
Code: Select all
def test_get():
response = requests.get(ENDPOINT)
assert response.status_code == 200
data = response.json()
print(data)
print(data['title'])
def test_body():
schema = {
"type": "object",
"properties": {
"id": {"type": "integer"},
"title": {"type": "string"},
},
}
validate(instance={"id": 1, "title": "delectus aut autem"}, schema=schema)
# No error, the JSON is valid.