Skip to content

An open source hypermedia type to describe links, schema and validation

License

Notifications You must be signed in to change notification settings

cignium/hypermedia-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

Cignium Hypermedia API

An open source hypermedia type to describe links, schema and validation.

Example (WIP)

{
  "type": "object",
  "links": [
    {
      "href": "http://people.com/1",
      "rel": "self",
      "title": "John"
    }
  ],
  "errors": [],
  "properties": [
    {
      "errors": [],
      "id": "name",
      "links": [],
      "maxLength": 20,
      "title": "Name",
      "type": "string",
      "value": "John"
    },
    {
      "errors": [],
      "id": "age",
      "links": [],
      "restrictions": {
        "precision": 2,
        "scale": 0
      },
      "title": "Age",
      "type": "number",
      "value": "John"
    },
    {
      "errors": [],
      "id": "address",
      "links": [],
      "properties": [
        {
          "errors": [],
          "id": "street",
          "links": [],
          "title": "Street",
          "type": "string",
          "value": "555 Fifth Avenue"
        },
        {
          "errors": [],
          "id": "city",
          "links": [],
          "title": "City",
          "type": "string",
          "value": "New York"
        }
      ],
      "title": "Address",
      "type": "object"
    },
    {
      "errors": [],
      "items": [
        {
          "errors": [],
          "links": [{
            "href": "http://people.com/update-child-1",
            "rel": "update"
          }],
          "properties": [
            {
              "errors": [],
              "id": "name",
              "links": [],
              "title": "Name",
              "type": "string",
              "value": "Joe"
            },
            {
              "errors": [],
              "id": "age",
              "links": [],
              "title": "Age",
              "type": "number",
              "value": 7
            }
          ],
          "type": "object"
        },
        {
          "errors": [],
          "links": [],
          "properties": [
            {
              "errors": [],
              "id": "name",
              "links": [],
              "type": "string",
              "value": "Jane"
            },
            {
              "errors": [],
              "id": "age",
              "links": [],
              "type": "number",
              "value": 4
            }
          ],
          "type": "object"
        }
      ],
      "id": "children",
      "links": [],
      "title": "Children",
      "type": "array"
    }
  ]
}

About

An open source hypermedia type to describe links, schema and validation

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published