Open API specification for Lago project
| Project | Release Badge |
|---|---|
| Lago | |
| Lago OpenAPI |
This repository is used to serve http://swagger.getlago.com/
The specifications are published separately:
openapi.yaml: API v1. Its URL remains unchanged for existing consumers.openapi-v2.yaml: API v2 (beta). It documents native v2 endpoints for taxes, the product catalog, contracts, billing, customers, organizations, billing entities, billable metrics, events, logs and webhook endpoints.
Swagger UI has a version selector and opens API v1 by default. The v2 specification only lists endpoints that have been checked against their v2 implementation. Do not assume that every v1 endpoint is available in v2 or has the same response format.
The Lago documentation is available at doc.getlago.com.
The contribution documentation is available here
Lago is distributed under the AGPLv3 License.
Read more here.
npm install
You may also need Docker to run some commands.
npm run build
redocly.yaml maps each source document to its generated bundle:
| Version | Source | Bundle |
|---|---|---|
| v1 | src/openapi.yaml |
openapi.yaml |
| v2 | src/v2/openapi.yaml |
openapi-v2.yaml |
Use npm run build:v1 or npm run build:v2 to build one version. Do not edit the bundles by hand.
npm run test
This builds and lints both versions. V2 examples are also checked against their schemas. CI checks both specifications and verifies that the committed bundles match a fresh build.
To preview the OpenAPI specification using Redoc, you can use the following command:
npm run preview:redoclyThis will watch for changes in the OpenAPI specification files and automatically rebuild and reload them.
The Redoc documentation will be available at http://localhost:8080/.
To preview the OpenAPI specification using Swagger UI, as on https://swagger.getlago.com, you can use the following command:
npm run preview:swaggerThe Swagger UI will be available at http://localhost:8080/.
Use the selector at the top of the page to switch between v1 and v2.