@inversifyjs/fastify-open-api
v4.1.0
Published
InversifyJs HTTP Fastify OpenAPI package
Downloads
27
Maintainers
Readme
@inversifyjs/fastify-open-api
InversifyJS HTTP Fastify OpenAPI integration package.
This package provides OpenAPI/Swagger UI integration for Fastify-based InversifyJS HTTP applications.
Installation
npm install @inversifyjs/fastify-open-api @inversifyjs/http-open-api fastifyUsage
import { Container } from 'inversify';
import { SwaggerUiFastifyProvider } from '@inversifyjs/fastify-open-api';
const container = new Container();
const swaggerUiProvider = new SwaggerUiFastifyProvider({
api: {
path: '/docs',
openApiObject: {
openapi: '3.1.0',
info: {
title: 'My API',
version: '1.0.0',
},
paths: {},
},
},
ui: {
title: 'My API Documentation',
},
});
swaggerUiProvider.provide(container);Requirements
@inversifyjs/http-open-api(peer dependency)fastify(peer dependency)inversify(peer dependency)
