jmlue42 / spectral-jsonapi-ruleset

A Stoplight/Spectral linting ruleset for the JSON:API specification.
MIT License
12 stars 8 forks source link

Add a get-404-response-code rule (Section 6.2.1.2) #65

Open marquje opened 8 months ago

marquje commented 8 months ago

Per Section 6.2.1.2 of JSON:API v1:

A server MUST return 404 Not Found when processing a request to fetch a relationship link URL that does not exist.

A rule needs to be written to be written to verify a 404 response is supported on GET paths that return a single resource.