I've made an endpoint for creating events: POST /events/new
The request should have JSON data on the body. This is the JSON structure that is required for creating a new event:
{
"label": "my first event",
"description": "lorem ipsum dolor sit amet",
"meta": {
"status": "draft",
"isOnline": true,
"visibility": "visible",
"customID": "my-first-event",
"tags": ["foo", "bar"],
"categories": ["concert", "sports"]
}
}
My problem being: I don't think I've ever seen services requiring nested properties (like in meta.status
). Is it a bad practice?
I'm doing it like that because it's more organized.
I don't think I've ever seen services requiring nested properties
. How many services have you seen in your career? Services developer by others than you I mean.