New API Users are confuse why posting is not working as in the example in swagger
{
"title": "string",
"description": "string",
"lat": 37.2,
"lng": 120.7,
"street": "string",
"zip": "string",
"city": "string",
"country": "string",
"state": "string",
"contact_name": "John Smith",
"email": "john.smith@example.com",
"telephone": "001 123456789",
"homepage": "https://www.slowtec.de/",
"opening_hours": "24/7",
"founded_on": {},
"categories": [
"string"
],
"tags": [
"organic",
"non-profit"
],
"image_url": "https://www.slowtec.de/",
"image_link_url": "https://www.slowtec.de/",
"links": [
{
"url": "https://www.slowtec.de/",
"title": "string",
"description": "string"
}
],
"license": "ODbL-1.0"
}
Solution
Update the swagger example
The part "id":null is mandatory!!!
{"title":"Ernährungsrat Oldenburg","description":"Gemeinsam für eine nachhaltige Ernährung in der Region","tags":["ernährungsrat"],"lat":53.1389753,"lng":8.2146017,"city":"Oldenburg","version":1,"categories":["2cd00bebec0c48ba9db761da48678134"],"links":[],"id":null,"license":"CC0-1.0"}
Problem
New API Users are confuse why posting is not working as in the example in swagger { "title": "string", "description": "string", "lat": 37.2, "lng": 120.7, "street": "string", "zip": "string", "city": "string", "country": "string", "state": "string", "contact_name": "John Smith", "email": "john.smith@example.com", "telephone": "001 123456789", "homepage": "https://www.slowtec.de/", "opening_hours": "24/7", "founded_on": {}, "categories": [ "string" ], "tags": [ "organic", "non-profit" ], "image_url": "https://www.slowtec.de/", "image_link_url": "https://www.slowtec.de/", "links": [ { "url": "https://www.slowtec.de/", "title": "string", "description": "string" } ], "license": "ODbL-1.0" }
Solution
Update the swagger example The part
"id":null
is mandatory!!!{"title":"Ernährungsrat Oldenburg","description":"Gemeinsam für eine nachhaltige Ernährung in der Region","tags":["ernährungsrat"],"lat":53.1389753,"lng":8.2146017,"city":"Oldenburg","version":1,"categories":["2cd00bebec0c48ba9db761da48678134"],"links":[],"id":null,"license":"CC0-1.0"}