snyk / sweater-comb

API linting rules
Other
21 stars 8 forks source link

Compound document rule does not detect `includes` #353

Open cmars opened 1 year ago

cmars commented 1 year ago

Typo in https://github.com/snyk/sweater-comb/blob/a641c5aa77c9c57ab62d5eaa5282bbd2d0067b94/src/rulesets/rest/2022-05-25/json-api-rules/compound-document-rules.ts#L14, we should be catching includes rather than included.

This'll be much easier to unit test with the new DSL...

cmars commented 1 year ago

Should expand on this to restrict what keys are allowed in the top-level document. Only jsonapi, data, meta and links should really be allowed there.