OpenAPI Generator

Generating docs for OpenAPI schema

Usage

Install the required packages.

npm install fumadocs-openapi

Create a script:

scripts/generate-docs.mjs
import { generateFiles } from 'fumadocs-openapi';

void generateFiles({
  input: ['./petstore.yaml'],
  output: './content/docs',
});

Only OpenAPI 3.0 is supported.

It doesn't allow JSON schema specific keywords like const, as they are unsupported

Generate docs with the script:

node ./scripts/generate-docs.mjs

Demo

View demo.

Last updated on

On this page