Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kkgthb/api-spec-analysis-01-playing
Playing with what it might look like to keep an OpenAPI linting ruleset lying around.
https://github.com/kkgthb/api-spec-analysis-01-playing
Last synced: about 1 month ago
JSON representation
Playing with what it might look like to keep an OpenAPI linting ruleset lying around.
- Host: GitHub
- URL: https://github.com/kkgthb/api-spec-analysis-01-playing
- Owner: kkgthb
- Created: 2024-03-15T20:22:29.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2024-03-15T20:51:03.000Z (9 months ago)
- Last Synced: 2024-03-15T21:38:25.190Z (9 months ago)
- Size: 3.91 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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](https://raw.githubusercontent.com/OAI/OpenAPI-Specification/main/examples/v3.0/api-with-examples.yaml) failed my rulesets, which is awesome, because you can see if the rules catch it.
1. Shell invocation:
```sh
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
```
1. [VSCode extension](https://marketplace.visualstudio.com/items?itemName=stoplight.spectral)
* I have no idea how I want to structure this. For now, taking a page from [Microsoft](https://github.com/Azure/APICenter-Analyzer/) and putting the Spectral-formatted specs in under `/resources/` folder.
* Learned "extends" format from [SPS](https://github.com/SPSCommerce/sps-api-standards/blob/main/rulesets/src/.spectral.yml) as linked by [Stoplight, Spectral's main maintainer](https://github.com/stoplightio/spectral-rulesets?tab=readme-ov-file#spectral-rulesets).