This website is built using Docusaurus, a modern static website generator.
- Node >= 20
This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
npm run start
The following command will generate API docs for all of the OpenAPI specifications referenced in your docusaurus-plugin-openapi-docs
config.
npx docusaurus gen-api-docs all
30/09/2024: upgraded Docusaurus to version 3.5.2 but the generator creates .mdx
files with errors. Feature to be reviewed in the future.
For more commands look here: OpenAPI Docs
At the moment it has been used a custom React component for rendering openapi documents swagger-ui-react.
The API section of the mediterraneus protocol can be used as an example for the usage.
This component should be able to read specs pointed to a url, as well as yaml
and json
files. However some parsing error have been experienced so it is required to manually convert the yaml spec into a json file
- Add your yaml Openapi specification in
apis/specs/
- Convert the yaml file in JSON format and create a json file in
/apis/render
- Import the file in a new
.mdx
file and export the custom component
Example:
import SwaggerUI from "swagger-ui-react"
import "swagger-ui-react/swagger-ui.css"
import raw from "../../apis/render/issuer.json"
import "./style.css"
export default function Hello() {
return <SwaggerUI spec={raw}/>
}