@fastify/swagger
Advanced tools
Comparing version 9.0.0-pre.fv5.1 to 9.0.0
@@ -193,4 +193,7 @@ 'use strict' | ||
querystring: { | ||
hello: { type: 'string' }, | ||
world: { type: 'string' } | ||
type: 'object', | ||
properties: { | ||
hello: { type: 'string' }, | ||
world: { type: 'string' } | ||
} | ||
} | ||
@@ -197,0 +200,0 @@ } |
@@ -61,2 +61,8 @@ import { FastifyPluginCallback, FastifySchema, RouteOptions, onRequestHookHandler, preHandlerHookHandler } from 'fastify'; | ||
type SwaggerDocumentObject = { | ||
swaggerObject: Partial<OpenAPIV2.Document>; | ||
} | { | ||
openapiObject: Partial<OpenAPIV3.Document | OpenAPIV3_1.Document>; | ||
} | ||
type SwaggerTransform = <S extends FastifySchema = FastifySchema>({ | ||
@@ -66,4 +72,3 @@ schema, | ||
route, | ||
swaggerObject, | ||
openapiObject, | ||
...documentObject | ||
}: { | ||
@@ -73,6 +78,6 @@ schema: S; | ||
route: RouteOptions; | ||
swaggerObject: Partial<OpenAPIV2.Document>; | ||
openapiObject: Partial<OpenAPIV3.Document | OpenAPIV3_1.Document>; | ||
}) => { schema: FastifySchema; url: string } | ||
} & SwaggerDocumentObject) => { schema: FastifySchema; url: string } | ||
type SwaggerTransformObject = (documentObject: SwaggerDocumentObject) => Partial<OpenAPIV2.Document> | Partial<OpenAPIV3.Document | OpenAPIV3_1.Document>; | ||
type FastifySwagger = FastifyPluginCallback<fastifySwagger.SwaggerOptions> | ||
@@ -153,6 +158,3 @@ | ||
*/ | ||
transformObject?: ({ swaggerObject, openapiObject }: { | ||
swaggerObject: Partial<OpenAPIV2.Document>; | ||
openapiObject: Partial<OpenAPIV3.Document | OpenAPIV3_1.Document>; | ||
}) => Partial<OpenAPIV2.Document> | Partial<OpenAPIV3.Document | OpenAPIV3_1.Document>; | ||
transformObject?: SwaggerTransformObject; | ||
@@ -159,0 +161,0 @@ refResolver?: { |
{ | ||
"name": "@fastify/swagger", | ||
"version": "9.0.0-pre.fv5.1", | ||
"version": "9.0.0", | ||
"description": "Serve Swagger/OpenAPI documentation for Fastify, supporting dynamic generation", | ||
@@ -43,6 +43,6 @@ "main": "index.js", | ||
"@apidevtools/swagger-parser": "^10.1.0", | ||
"@fastify/cookie": "^10.0.0-pre.fv5.1", | ||
"@fastify/cookie": "^10.0.0", | ||
"@fastify/pre-commit": "^2.1.0", | ||
"@types/node": "^20.12.8", | ||
"fastify": "^5.0.0-alpha.3", | ||
"@types/node": "^22.0.0", | ||
"fastify": "^5.0.0-alpha.4", | ||
"fluent-json-schema": "^5.0.0", | ||
@@ -57,3 +57,3 @@ "joi": "^17.13.1", | ||
"dependencies": { | ||
"fastify-plugin": "^5.0.0-pre.fv5.1", | ||
"fastify-plugin": "^5.0.0", | ||
"json-schema-resolver": "^2.0.0", | ||
@@ -60,0 +60,0 @@ "openapi-types": "^12.1.3", |
@@ -1449,9 +1449,18 @@ 'use strict' | ||
headers: { | ||
'X-Port': portSchema | ||
type: 'object', | ||
properties: { | ||
'X-Port': portSchema | ||
} | ||
}, | ||
querystring: { | ||
port: portSchema | ||
type: 'object', | ||
properties: { | ||
port: portSchema | ||
} | ||
}, | ||
params: { | ||
port: portSchema | ||
type: 'object', | ||
properties: { | ||
port: portSchema | ||
} | ||
} | ||
@@ -1571,9 +1580,18 @@ } | ||
headers: { | ||
'X-Port': portSchema | ||
type: 'object', | ||
properties: { | ||
'X-Port': portSchema | ||
} | ||
}, | ||
querystring: { | ||
port: portSchema | ||
type: 'object', | ||
properties: { | ||
port: portSchema | ||
} | ||
}, | ||
params: { | ||
port: portSchema | ||
type: 'object', | ||
properties: { | ||
port: portSchema | ||
} | ||
} | ||
@@ -1580,0 +1598,0 @@ } |
@@ -126,5 +126,8 @@ 'use strict' | ||
schema: { | ||
name: { type: 'string' }, | ||
image: { type: 'string' }, | ||
address: { type: 'string' } | ||
type: 'object', | ||
properties: { | ||
name: { type: 'string' }, | ||
image: { type: 'string' }, | ||
address: { type: 'string' } | ||
} | ||
} | ||
@@ -134,4 +137,7 @@ }, | ||
schema: { | ||
fullName: { type: 'string' }, | ||
phone: { type: 'string' } | ||
type: 'object', | ||
properties: { | ||
fullName: { type: 'string' }, | ||
phone: { type: 'string' } | ||
} | ||
} | ||
@@ -148,3 +154,6 @@ } | ||
300: { | ||
age: { type: 'number' } | ||
type: 'object', | ||
properties: { | ||
age: { type: 'number' } | ||
} | ||
} | ||
@@ -151,0 +160,0 @@ } |
@@ -223,4 +223,3 @@ import fastify, { FastifySchema, RouteOptions } from 'fastify'; | ||
route, | ||
swaggerObject, | ||
openapiObject, | ||
...documentObject | ||
}) => { | ||
@@ -230,6 +229,3 @@ schema satisfies FastifySchema; | ||
route satisfies RouteOptions; | ||
swaggerObject satisfies Partial<OpenAPIV2.Document>; | ||
openapiObject satisfies Partial< | ||
OpenAPIV3.Document | OpenAPIV3_1.Document | ||
>; | ||
documentObject satisfies { swaggerObject: Partial<OpenAPIV2.Document> } | { openapiObject: Partial<OpenAPIV3.Document | OpenAPIV3_1.Document> }; | ||
return { schema, url }; | ||
@@ -236,0 +232,0 @@ }, |
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
304289
8841
0
Updatedfastify-plugin@^5.0.0