This project defines the specifications and API contracts that the Metanomic Projects should follow.
We need a common design and communication language to describe the architecture and assert the delivered features.
- 📝 OpenAPI as the defacto Specification language
- 🔀 Combine all files with APIDevTools/swagger-cli.
- ✅ Validate and lint the OpenAPI document with stoplight/spectral.
- ✨ Publish reference docs with redocly/redoc & GitHub Pages.
- 🚀 Generate various language-specific contracts with openapitools/openapi-generator-cli
- Node.js (16 or latest)
- npm (8.1.2 or latest)
-
Clone the repository.
git clone [email protected]:Metanomic/openapi.gi
-
Install the project dependencies.
npm install
-
Edit
openapi.yaml
for the high-level documentation. If you’re not familiar with the OpenAPI Specification, read Getting started with OAS first.
The project will build, lint, and preview the OpenAPI document from the terminal, with the following commands:
The command bundles the spec as one .yaml
file.
npm run build
The minified document is stored in _build/openapi.yaml
.
The command checks if the document follows the OpenAPI 3.0 Specification.
npm test
The command builds a docs site so that you can view the rendering on your local browser.
npm run serve
The server starts on http://127.0.0.1:8080.
The site is generated with ReDoc.