OpenAPI AWS API Gateway linter
AWS-OpenAPI-Lint is a simple OpenAPI 3 yaml / json spec linter designed for checking API Gateway integration.
Rules
It contains rules for checking whether:
- you have an authorizer on OPTIONS
- authorizer is mentioned in
requestParametersbut is not present insecurity - http verbs are consistent in the path and integration
- all used headers in path from all verbs are mentioned in CORS rules and vice-versa
- CORS rules allow all verbs mentioned in the path
- CORS rules are present
- amazon integration is present
- path parameters present in
requestParametersare not used in the direct path parameters and vice-versa
Roadmap
- Update README with rule names and behavior
- Support json specs
- Add optional rule for checking base url equality
- Add support for configuration yaml file
- Add possibility to disable rule checking on specific paths
- Add possibility to disable rules per path
- Ignore path-params if
http_proxyintegration type used - Add option to disable rules via CLI
- Add warning threshold to return with status code 0 if limit not exceeded
- Fix flake8 violations
- Add a license
- Publish to PyPI or alike
- Configure properly up GitHub actions to run tests on push
Installation
pip install aws-openapi-lint
Usage
$ aws-openapi-lint path/to/spec.yml
usage: main.py [-h] [--treat-errors-as-warnings]
[--warning-threshold WARNING_THRESHOLD]
[--exclude-rules EXCLUDE_RULES]
lint_file
Lint OpenAPI specifications based on AWS API Gateway.
positional arguments:
lint_file Specify path to the openapi schema file.
optional arguments:
-h, --help show this help message and exit
--treat-errors-as-warnings
Treats errors as warnings (exit code will be 0 unless
warning threshold is specified
--warning-threshold WARNING_THRESHOLD
Warning threshold which when surpassed renders exit
code to become 1)
--exclude-rules EXCLUDE_RULES
Excluded rules separated by comma.
Metadata
Release files for AWS-OpenAPI-Lint 0.2.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| AWS-OpenAPI-Lint-0.2.2.tar.gz | 7.4 kB | Without provenance | Details for AWS-OpenAPI-Lint-0.2.2.tar.gz |
Release files / AWS-OpenAPI-Lint-0.2.2.tar.gz
| Download URL | AWS-OpenAPI-Lint-0.2.2.tar.gz |
|---|---|
| Size | 7.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1e9e37634893e2d64ed94a4938e251693f54b8d47927ed88dd0268553baacf30
|
|
BLAKE2b-256 checksum How to use checksums |
8c867aaa63946ca2644352d9e629d8c10c451d3a7d3f87ef13513c156b7390dc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.7.6
|
Security for AWS-OpenAPI-Lint 0.2.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.