Skip to content

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

Merged
ardiesaeidi merged 1 commit intoEdgio:gh-pagesfrom
octomad:fix-links-collection
Mar 15, 2023
Merged

Fix collection links schema to use node-link-value model#35
ardiesaeidi merged 1 commit intoEdgio:gh-pagesfrom
octomad:fix-links-collection

Conversation

@octomad
Copy link
Collaborator

@octomad octomad commented Mar 15, 2023

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
Copy link

chiton commented Mar 15, 2023

Lgtm

Copy link
Member

@ardiesaeidi ardiesaeidi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm :shipit:

@ardiesaeidi ardiesaeidi merged commit 551fb6b into Edgio:gh-pages Mar 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants