Skip to content

mazurka/mazurka_mediatype_hyperjson

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

63 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mazurka_mediatype_hyperjson

hyper+json media type for mazurka

Examples

Collection

{
  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
      }
    }
  }
}

About

hyper+json media type for mazurka

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages