Skip to content

Add JSON:API v1.1 support as an additive overlay (#1) - #80

Open
arjenblokzijl wants to merge 1 commit into
jmlue42:mainfrom
onlineplasticsgroup:main
Open

Add JSON:API v1.1 support as an additive overlay (#1)#80
arjenblokzijl wants to merge 1 commit into
jmlue42:mainfrom
onlineplasticsgroup:main

Conversation

@arjenblokzijl

Copy link
Copy Markdown
  • Add JSON:API v1.1 ruleset as an additive overlay

Introduces jsonapi-1.1.yml, which extends the untouched v1.0 ruleset (.spectral.yml) and only redefines the rules that changed in JSON:API v1.1: the ext/profile media type parameters, expanded links object members (rel, describedby, title, type, hreflang), the jsonapi object ext/profile/meta members, and the lid local identifier on resource objects and resource identifier objects.

The v1.0 ruleset is unchanged, so existing consumers are unaffected. Spectral does not inherit aliases through extends, so the alias block is duplicated into the overlay (rules are not).

Adds an examples/valid-1.1 fixture exercising the new features and a test:1.1 script; npm test now lints both rulesets. Bumps to 1.1.0.

  • Document JSON:API v1.1 ruleset in README

Note both v1.0 (.spectral.yml) and v1.1 (jsonapi-1.1.yml) rulesets, how to select one per API version, and that the v1.1 file is an additive overlay on top of v1.0.

* Add JSON:API v1.1 ruleset as an additive overlay

Introduces jsonapi-1.1.yml, which extends the untouched v1.0 ruleset
(.spectral.yml) and only redefines the rules that changed in JSON:API
v1.1: the ext/profile media type parameters, expanded links object
members (rel, describedby, title, type, hreflang), the jsonapi object
ext/profile/meta members, and the lid local identifier on resource
objects and resource identifier objects.

The v1.0 ruleset is unchanged, so existing consumers are unaffected.
Spectral does not inherit aliases through extends, so the alias block
is duplicated into the overlay (rules are not).

Adds an examples/valid-1.1 fixture exercising the new features and a
test:1.1 script; npm test now lints both rulesets. Bumps to 1.1.0.

* Document JSON:API v1.1 ruleset in README

Note both v1.0 (.spectral.yml) and v1.1 (jsonapi-1.1.yml) rulesets,
how to select one per API version, and that the v1.1 file is an
additive overlay on top of v1.0.
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.

1 participant