@jafps/plugin-redoc
v1.0.4
Published
Fastify plugin for OpenAPI 3.1 API reference documentation.
Readme
@jafps/plugin-redoc
Fastify plugin for OpenAPI 3.1 API reference documentation.
It depends on @fastify/helmet and @jafps/plugin-openapi.
Usage
import redocPlugin from "@jafps/plugin-redoc";
import helmetPlugin from "@fastify/helmet";
import openapiPlugin from "@jafps/plugin-openapi";
await app.register(helmetPlugin, { global: false });
await app.register(openapiPlugin, {
openapi: {
info: {
title: "API",
version: "1.0.0"
}
}
});
await app.register(redocPlugin);If @fastify/static is used, staticOptions.decorateReply need to be set to false.
