Back to Templates
API Linting
See how to use API linting to enforce api consistency and require Zuplo features like policies.
Categories:
API GovernanceGit Ops
Zuplo Linting with Vacuum#
How to lint a Zuplo API with Vacuum
This project uses both built-in and custom rules to lint the routes OpenAPI files in this project.
The following custom rules are used:
- Enforce that routes have a specific Zuplo Policy
- Enforce that the path of routes starts with a specific value.
The configuration rules can be found in config/api-ruleset.yaml
. Custom functions are in /lint-functions
.
Run#
To run this sample yourself:
npm install
npm run lint
Recent Examples
API Linting
See how to use API linting to enforce api consistency and require Zuplo features like policies.
Backend for Frontend (BFF) Auth
Optimize UX and security in web applications with this approach.
Custom Rate Limiting
Invoke the Rate Limit policy programatically and then modify the 429 response.
Custom Modules
How to bundle custom node modules to use in your Zuplo project.