hyper+json media type for mazurka
{
collection: [
@users:get(user) + {
name: users:get_name(user)
}
|| user <- users:list()]
create: @users:create()
}
results in
{
"href": "/users",
"collection": [
{
"href": "/users/1",
"name": "Joe"
},
{
"href": "/users/2",
"name": "Mike"
},
{
"href": "/users/2",
"name": "Robert"
}
],
"create": {
"action": "/users",
"method": "POST",
"input": {
"name": {
"type": "text",
"required": true
}
}
}
}