Stinky noodle is a Python-based OpenAPI spec linter compatible with spectral rulesets
Project description
Stinky noodle
Stiny noodle is a Python OpenAPI spec linter that can read spectral
(https://github.com/stoplightio/spectral) rule sets. This project is very early stage and not stable at all. The main reason for creating this project is to make it much easier to use with Python projects.
Getting started
Run pip install stinky-noodle
and then run noodle <path-to-spec-file>
to start linting.
Rule sets
Stinky noodle fully relies on rule sets as defined in the spectral
docs and does not have its own syntax:
https://meta.stoplight.io/docs/spectral/e5b9616d6d50c-rulesets
You can use a rule set by adding the following argument:
noodle -s <path-to-ruleset>[ -d <dir-containing-custom-module>][ -m <cusom-module-name>] <path-to-spec-file>
Caveats
-
Spectral linting rules can make use of custom functions written in js. There is currently no way of automatically converting those functions in python built into Stink noodle. Functions always have to be manually converted. See the
Custom callables
section on how to do that. -
Spectral's builtin
unreferencedReusableObjects
, namedunreferenced_reusable_objects
instinky-noodle
, has not yet been implemented due to its complexity (e.g. it depends on a dependency graph of the API spec document). It will be implemented in the near future.
Custom callables
TODO
Using stinky-noodle in pre-commit
TODO
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file stinky_noodle-0.0.10.tar.gz
.
File metadata
- Download URL: stinky_noodle-0.0.10.tar.gz
- Upload date:
- Size: 9.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 947e2784a356615c46bc945c8282b3fdc5d3dae9824b75cc75b29e0699304f6a |
|
MD5 | b3d0124eb183b7ca090ac55ae61e96ae |
|
BLAKE2b-256 | 5052c855465727b914b207de2c24d3b50856856739f0381438b7f752e39bc349 |
File details
Details for the file stinky_noodle-0.0.10-py3-none-any.whl
.
File metadata
- Download URL: stinky_noodle-0.0.10-py3-none-any.whl
- Upload date:
- Size: 8.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2e02d3cbc09d17489f86c3e403c2239f8c1fbd2f0520f0924907e118fb918d14 |
|
MD5 | c824818295405cb2e7d73d8e7e68879f |
|
BLAKE2b-256 | 2e85ba73b61819ff933c61ea9f1c6b9b7311c0b62ca780dbfb9da507b2cb9d3a |