/api-spec-analysis-01-playing

Playing with what it might look like to keep an OpenAPI linting ruleset lying around.

Introduction

Not sure exactly what will go here, but starting with some OpenAPI-linting rules, and starting with specifying them using the Spectral v6 standard.

Notes

  • As of the moment I wrote this, OpenAPI's example API failed my rulesets, which is awesome, because you can see if the rules catch it.
    1. Shell invocation:
      npx @stoplight/spectral-cli lint https://raw.githubusercontent.com/OAI/OpenAPI-Specification/main/examples/v3.0/api-with-examples.yaml --ruleset https://raw.githubusercontent.com/kkgthb/api-spec-analysis-01-playing/main/resources/rulesets/spectral/.spectral.yaml
    2. VSCode extension
  • I have no idea how I want to structure this. For now, taking a page from Microsoft and putting the Spectral-formatted specs in under /resources/ folder.
  • Learned "extends" format from SPS as linked by Stoplight, Spectral's main maintainer.