Add JSON:API v1.1 support as an additive overlay#79
Draft
arjenblokzijl wants to merge 2 commits into
Draft
Conversation
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.
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.
Open
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Additive v1.1 support via an overlay, the v1.0 ruleset is unchanged, so it's fully backward compatible. Spectral does not inherit
aliasesthroughextends, so the alias block is duplicated into the overlay (and rules are not). Flagged this with a comment in the file.