spectral-jsonapi-ruleset-style-guide

spectral rules for json:api


Keywords
style-guide, api, linting, spectral, ruleset, jsonapi, linting-rules, rulesets, stoplight, styleguide
License
MIT
Install
npm install spectral-jsonapi-ruleset-style-guide@1.0.1

Documentation

spectral-jsonapi-ruleset

Node.js CI CodeQL

A Stoplight/Spectral linting ruleset for the JSON:API specification.

Installation

For ways to integrate this ruleset into your Spectral linting suite. See Sharing & Distributing Rulesets at https://meta.stoplight.io/

Organization

Rules and Rulesets are organized by section of the JSON:API specification:

  • Primary Ruleset
    • ./jsonapi-ruleset.yaml
  • Main Sections
    • ./rules/jsonapi-{name-of-section}-ruleset.yaml
  • Sub Sections
    • ./rules/jsonapi-{name-of-section}.yaml

Each file extends rules/rulesets contained in its corresponding subsections.

Contributing

In lieu of a formal style guide (I know... ironic 😁):

  • Take care to maintain the existing coding style, including tests.
  • Add tests for all new/edited rules including JSONPath testing.
  • Verify all linting and tests PASS: npm test

License

MIT License