Socket
Socket
Sign inDemoInstall

@fastify/swagger-ui

Package Overview
Dependencies
Maintainers
18
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@fastify/swagger-ui - npm Package Compare versions

Comparing version 1.2.0 to 1.3.0

2

index.js

@@ -24,1 +24,3 @@ 'use strict'

})
module.exports.default = fastifySwaggerUi
module.exports.fastifySwaggerUi = fastifySwaggerUi

9

package.json
{
"name": "@fastify/swagger-ui",
"version": "1.2.0",
"version": "1.3.0",
"description": "Serve Swagger-ui for Fastify",

@@ -56,4 +56,4 @@ "main": "index.js",

"standard": "^17.0.0",
"swagger-ui-dist": "4.15.2",
"tap": "^16.2.0",
"swagger-ui-dist": "4.15.5",
"tap": "^16.3.2",
"tsd": "^0.24.1"

@@ -76,2 +76,5 @@ },

},
"pkg": {
"assets": ["static/**/*"]
},
"publishConfig": {

@@ -78,0 +81,0 @@ "access": "public"

@@ -29,71 +29,77 @@ import { FastifyPluginCallback, FastifyReply, FastifyRequest, onRequestHookHandler, preHandlerHookHandler } from 'fastify';

export const fastifySwaggerUi: FastifyPluginCallback<FastifySwaggerUiOptions>;
type FastifySwaggerUi = FastifyPluginCallback<fastifySwaggerUi.FastifySwaggerUiOptions>;
export interface FastifySwaggerUiOptions {
baseDir?: string;
/**
* Overwrite the swagger url end-point
* @default /documentation
*/
routePrefix?: string;
/**
* Swagger UI Config
*/
uiConfig?: FastifySwaggerUiConfigOptions
initOAuth?: FastifySwaggerInitOAuthOptions
/**
* CSP Config
*/
staticCSP?: boolean | string | Record<string, string | string[]>
transformStaticCSP?: (header: string) => string
/**
* route hooks
*/
uiHooks?: FastifySwaggerUiHooksOptions
declare namespace fastifySwaggerUi {
export interface FastifySwaggerUiOptions {
baseDir?: string;
/**
* Overwrite the swagger url end-point
* @default /documentation
*/
routePrefix?: string;
/**
* Swagger UI Config
*/
uiConfig?: FastifySwaggerUiConfigOptions
initOAuth?: FastifySwaggerInitOAuthOptions
/**
* CSP Config
*/
staticCSP?: boolean | string | Record<string, string | string[]>
transformStaticCSP?: (header: string) => string
/**
* route hooks
*/
uiHooks?: FastifySwaggerUiHooksOptions
transformSpecification?: (swaggerObject: Readonly<Record<string, any>>, request: FastifyRequest, reply: FastifyReply) => Record<string, any>
transformSpecificationClone?: boolean
}
transformSpecification?: (swaggerObject: Readonly<Record<string, any>>, request: FastifyRequest, reply: FastifyReply) => Record<string, any>
transformSpecificationClone?: boolean
}
export type FastifySwaggerUiConfigOptions = Partial<{
deepLinking: boolean
displayOperationId: boolean
defaultModelsExpandDepth: number
defaultModelExpandDepth: number
defaultModelRendering: string
displayRequestDuration: boolean
docExpansion: string
filter: boolean | string
layout: string
maxDisplayedTags: number
showExtensions: boolean
showCommonExtensions: boolean
useUnsafeMarkdown: boolean
syntaxHighlight: {
activate?: boolean
theme?: string
} | false
tryItOutEnabled: boolean
validatorUrl: string | null
supportedSubmitMethods: Array<'get' | 'post' | 'put' | 'delete' | 'patch' | 'options'>
persistAuthorization: boolean
}>
export type FastifySwaggerUiConfigOptions = Partial<{
deepLinking: boolean
displayOperationId: boolean
defaultModelsExpandDepth: number
defaultModelExpandDepth: number
defaultModelRendering: string
displayRequestDuration: boolean
docExpansion: string
filter: boolean | string
layout: string
maxDisplayedTags: number
showExtensions: boolean
showCommonExtensions: boolean
useUnsafeMarkdown: boolean
syntaxHighlight: {
activate?: boolean
theme?: string
} | false
tryItOutEnabled: boolean
validatorUrl: string | null
supportedSubmitMethods: Array<'get' | 'post' | 'put' | 'delete' | 'patch' | 'options'>
persistAuthorization: boolean
}>
export type FastifySwaggerInitOAuthOptions = Partial<{
clientId: string,
clientSecret: string,
realm: string,
appName: string,
scopeSeparator: string,
scopes: string | string[],
additionalQueryStringParams: { [key: string]: any },
useBasicAuthenticationWithAccessCodeGrant: boolean,
usePkceWithAuthorizationCodeGrant: boolean
}>
export type FastifySwaggerInitOAuthOptions = Partial<{
clientId: string,
clientSecret: string,
realm: string,
appName: string,
scopeSeparator: string,
scopes: string | string[],
additionalQueryStringParams: { [key: string]: any },
useBasicAuthenticationWithAccessCodeGrant: boolean,
usePkceWithAuthorizationCodeGrant: boolean
}>
export type FastifySwaggerUiHooksOptions = Partial<{
onRequest?: onRequestHookHandler,
preHandler?: preHandlerHookHandler,
}>
export type FastifySwaggerUiHooksOptions = Partial<{
onRequest?: onRequestHookHandler,
preHandler?: preHandlerHookHandler,
}>
export default fastifySwaggerUi;
export const fastifySwaggerUi: FastifySwaggerUi
export { fastifySwaggerUi as default }
}
declare function fastifySwaggerUi(...params: Parameters<FastifySwaggerUi>): ReturnType<FastifySwaggerUi>
export = fastifySwaggerUi;

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc