OpenAPI integration
Generate API reference documentation from OpenAPI specifications.
You can generate a complete API reference from an OpenAPI specification. Drop your spec file into your content directory, configure it in docs.json, and blode.md creates a page for every operation.
Place an openapi.yaml or openapi.json file in your content directory:
Add the api.openapi section to your docs.json:
{
"api": {
"openapi": {
"source": "openapi.yaml",
"directory": "api"
}
}
}Run blodemd push and your API reference pages are generated automatically at /api/{operation-id}.
You can add your OpenAPI operations directly to the navigation by referencing the spec file in a navigation group:
{
"navigation": {
"groups": [
{
"group": "API Reference",
"openapi": "openapi.yaml"
}
]
}
}This automatically creates navigation entries for each operation in your spec, grouped by tag.
Blode.md can render an interactive API playground alongside your documentation. Configure it with the api.playground option:
{
"api": {
"openapi": {
"source": "openapi.yaml",
"directory": "api"
},
"playground": {
"display": "interactive",
"proxy": "https://api.example.com",
"credentials": true
}
}
}| Mode | Behavior |
|---|---|
interactive | Full playground with editable parameters and a "Send" button. |
simple | Read-only display of request and response examples. |
auth | Interactive playground that requires authentication before sending. |
none | No playground. Only the endpoint documentation is shown. |
Set credentials: true to include cookies and auth headers in playground
requests. Use proxy to route requests through your backend and avoid CORS
issues.