Edgio / hyperion

Lightweight JSON specification from Edgecast
https://edgio.github.io/hyperion
13 stars 18 forks source link

Fix collection links schema to use node-link-value model #35

Closed octomad closed 1 year ago

octomad commented 1 year ago

The collection links schema was incorrect according to the Hyperion standard. This fixes the schema so that it will validate against a payload that looks like this

{
  "@id": "/users/1?offset=20&limit=10",
  "@type": "Collection",
  "@links": { 
    "first": {
      "href": "https://www.example.com?limit=10",
      "description": "first page"
    },
    "next": {
      "href": "https://www.example.com?offset=30&limit=10",
      "description": "next page"
    },
    "previous": {
      "href": "https://www.example.com?offset=10&limit=10",
      "description": "previous page"
    },
    "last": {
      "href": "https://www.example.com?offset=90&limit=10",
      "description": "last page"
    }
  }
}
chiton commented 1 year ago

Lgtm