Aller au contenu principal
Version: Next

SwaggerOptions

Index

Properties

optionalauth

optionalcontact

contact?: ContactObject

optionaldescription

description?: string

默认值: This is a swagger-ui for midwayjs project https://swagger.io/specification/#info-object description 字段

optionaldisplayOptions

displayOptions?: { deepLinking?: boolean; defaultModelExpandDepth?: number; defaultModelRendering?: example | model; defaultModelsExpandDepth?: number; displayOperationId?: boolean; displayRequestDuration?: boolean; docExpansion?: list | none | full; filter?: string | boolean; maxDisplayedTags?: number; showCommonExtensions?: boolean; showExtensions?: boolean; tryItOutEnabled?: boolean; useUnsafeMarkdown?: boolean }

optionaldocumentOptions

documentOptions?: { operationIdFactory?: (controllerKey: string, webRouter: RouterOption) => string }

optionalexternalDocs

optionalisGenerateTagForController

isGenerateTagForController?: boolean

Weather to generate the Tag for controller

optionallicense

license?: LicenseObject

optionalrouterFilter

routerFilter?: (url: string, options: RouterOption) => boolean

optionalservers

servers?: ServerObject[]

optionalswaggerPath

swaggerPath?: string

默认值: /swagger-ui 访问 swagger ui 的路径

optionalswaggerUIRender

swaggerUIRender?: (config: SwaggerOptions, swaggerExplorer: SwaggerExplorer) => (pathname: string) => Promise<{ content: any; ext: string }>

optionalswaggerUIRenderOptions

swaggerUIRenderOptions?: Record<string, any>

optionaltagSortable

tagSortable?: boolean

对路由 tag 进行 ascii 排序 可以使用 1-xxx、2-xxx、3-xxx 来定义 tag

optionaltags

tags?: TagObject[]

optionaltermsOfService

termsOfService?: string

optionaltitle

title?: string

默认值: My Project https://swagger.io/specification/#info-object title 字段

optionalversion

version?: string

默认值: 1.0.0 https://swagger.io/specification/#info-object version 字段