META API schema should also have user-friendly description properties such as:
- Title / label
- Icon
- Description
- Help hints
- Schema (dictionary like schema.org to describe common objects)
- Aliases - title alises to provide better full-text search in UI / API client
Then you don't need to specify them in META UI again. It also works as a web service documentation for developers.
And finally browser then can display resource automatically without META UI specification so you can debug and work with services easily without need to define UI.
Example:
{
"@doctype": "@meta.object",
"title": "Contact #{first_name} #{last_name}",
"description": "Contact detail",
"icon": "/media/contact.svg",
"schema": "@meta.objects.person",
"aliases": [ "Contact", "Person", "Customer" ]
"methods": ["GET"],
"properties": {
"first_name": {
"type": "@meta.text",
"label": "First name"
},
"last_name": {
"type": "@meta.text",
"label": "Last name"
},
"email": {
"type": "@meta.text.email",
"label": "E-mail",
"hint": "Enter valid e-mail address"
}
}
}