Closed
Description
Are there any best practices how to document model metadata such as hyperlinks, context, documentation? For example if I use HAL, the typical resource looks like this:
{
"_links": {
"self": { "href": "/employees/123456" }
},
"employeeId": 123456,
"firstName": "Ivan",
"lastName": "Novakov",
"email": "ivan.novakov@company.com"
}
Now such parts like the _links
section may be defined in the model definition, but they are not actually part of the model and sometimes the structure may be more complex and (what is worse) repeating across the different models.
Maybe there could be some general support for metadata in the Swagger specs, because most of the current JSON format/specifications use some kind of metadata, see:
http://sookocheff.com/posts/2014-03-11-on-choosing-a-hypermedia-format/
Metadata
Metadata
Assignees
Labels
No labels