[TASK] Setup linting for the OpenAPI spec
- Dominant language
- No language data
- Stars
- 84
- Forks
- 149
- Avg merge
- 5d 15h
- Merged PRs (30d)
- 29
Description
### Certification
- [ ] I certify I am an Epic Owner for Kubeflow Notebooks 2.0 and expected to create planning-related issues.
### Description
In the context of https://github.com/kubeflow/notebooks/pull/1082 we realized that it would maybe be good to lint the OpenAPI spec that we produce with the `make swag` command. A quick check on that issue revealed that there are a few different options:
- [daveshanley/vacuum](github.com/daveshanley/vacuum): Tool is written in go and should be easy to integrate. Since the default output is a bit noisy something like `vacuum lint -q --pipeline-output workspaces/backend/openapi/swagger.json` would be good and maybe we can even suppress the info level warnings from that output.
- [stoplightio/spectral](https://github.com/stoplightio/spectral): Tool is written with JS and requires manual setup for the various lint rules.
Given that both tools seem to be fairly popular and the go based one is easier to integrate into our current tooling ecosystem I would probably go with that, however maybe there are better tools that my quick google did not reveal 🤗
Also it is up for debate whether we want to include this only on the CLI (i.e. via the Makefiles `make lint` target) or else.
### Acceptance Criteria
- [ ] Some lint tool is being run whenever the OpenAPI spec is changed
- [ ] The tool is configured to produce good signal-to-noise output
Contributor guide
Assessment
This issue has not been assessed yet.