@fastify/swagger
Advanced tools
Comparing version 8.3.0 to 8.3.1
import { FastifyPluginCallback, FastifySchema, onRequestHookHandler, preHandlerHookHandler } from 'fastify'; | ||
import { OpenAPI, OpenAPIV2, OpenAPIV3 } from 'openapi-types'; | ||
import { OpenAPI, OpenAPIV2, OpenAPIV3, OpenAPIV3_1 } from 'openapi-types'; | ||
@@ -116,3 +116,3 @@ /** | ||
swagger?: Partial<OpenAPIV2.Document>; | ||
openapi?: Partial<OpenAPIV3.Document> | ||
openapi?: Partial<OpenAPIV3.Document | OpenAPIV3_1.Document> | ||
hiddenTag?: string; | ||
@@ -119,0 +119,0 @@ hideUntagged?: boolean; |
{ | ||
"name": "@fastify/swagger", | ||
"version": "8.3.0", | ||
"version": "8.3.1", | ||
"description": "Serve Swagger/OpenAPI documentation for Fastify, supporting dynamic generation", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -177,6 +177,25 @@ import fastify from 'fastify'; | ||
app.register(fastifySwagger, { | ||
openapi: { | ||
components: { | ||
schemas: { | ||
Model: { | ||
type: "object", | ||
properties: { | ||
name: { type: "null" }, | ||
}, | ||
required: ['name'] | ||
} | ||
} | ||
} | ||
}, | ||
}) | ||
.ready((err) => { | ||
app.swagger(); | ||
.ready((err) => { | ||
app.swagger(); | ||
}) | ||
app.register(fastifySwagger, { | ||
}) | ||
.ready((err) => { | ||
app.swagger(); | ||
}) | ||
@@ -183,0 +202,0 @@ expectType<OpenAPI.Document>(app.swagger()) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
239229
6830