API Linting
See how to use API linting to enforce api consistency and require Zuplo features like policies.
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
.
Use this example locally#
To develop with this example locally, you can create a new Zuplo project using our CLI
npx create-zuplo-api@latest my-api --example api-linting
Then, in the project directory run the following commands:
npm install
npm run lint
Discover More Examples
Remote MCP Server with OAuth
A remote MCP Server that shows how to setup OAuth authentication with Auth0
Dev Portal with API Keys
An example of a Zuplo Dev Portal with support for self-serve API key creation.
Remote MCP Server
Create a remote MCP server for an API with authentication and additional security policies.
Metering with OpenMeter
Meter requests, enforce plan limits and monetize your API by integrating Zuplo with OpenMeter.