File tree Expand file tree Collapse file tree 1 file changed +15
-15
lines changed Expand file tree Collapse file tree 1 file changed +15
-15
lines changed Original file line number Diff line number Diff line change @@ -60,7 +60,7 @@ declare module 'fastify' {
60
60
}
61
61
62
62
interface FastifyContextConfig {
63
- swaggerTransform ?: SwaggerTransform | false ;
63
+ swaggerTransform ?: fastifySwagger . SwaggerTransform | false ;
64
64
}
65
65
}
66
66
@@ -71,20 +71,6 @@ type SwaggerDocumentObject = {
71
71
openapiObject : Partial < OpenAPIV3 . Document | OpenAPIV3_1 . Document > ;
72
72
}
73
73
74
- type SwaggerTransform = < S extends FastifySchema = FastifySchema > ( {
75
- schema,
76
- url,
77
- route,
78
- ...documentObject
79
- } : {
80
- schema : S ;
81
- url : string ;
82
- route : RouteOptions ;
83
- } & SwaggerDocumentObject ) => { schema : FastifySchema ; url : string }
84
-
85
- // eslint-disable-next-line camelcase
86
- type SwaggerTransformObject = ( documentObject : SwaggerDocumentObject ) => Partial < OpenAPIV2 . Document > | Partial < OpenAPIV3 . Document | OpenAPIV3_1 . Document >
87
-
88
74
type FastifySwagger = FastifyPluginCallback < fastifySwagger . SwaggerOptions >
89
75
90
76
declare namespace fastifySwagger {
@@ -105,6 +91,20 @@ declare namespace fastifySwagger {
105
91
[ key : string ] : JSONValue ;
106
92
}
107
93
94
+ export type SwaggerTransform < S extends FastifySchema = FastifySchema > = ( {
95
+ schema,
96
+ url,
97
+ route,
98
+ ...documentObject
99
+ } : {
100
+ schema : S ;
101
+ url : string ;
102
+ route : RouteOptions ;
103
+ } & SwaggerDocumentObject ) => { schema : FastifySchema ; url : string }
104
+
105
+ // eslint-disable-next-line camelcase
106
+ export type SwaggerTransformObject = ( documentObject : SwaggerDocumentObject ) => Partial < OpenAPIV2 . Document > | Partial < OpenAPIV3 . Document | OpenAPIV3_1 . Document >
107
+
108
108
export interface FastifyDynamicSwaggerOptions extends FastifySwaggerOptions {
109
109
mode ?: 'dynamic' ;
110
110
swagger ?: Partial < OpenAPIV2 . Document > ;
You can’t perform that action at this time.
0 commit comments