Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var FS embed.FS
View Source
var RAPIFS embed.FS
Functions ¶
This section is empty.
Types ¶
type OpenApiMiddleware ¶
type OpenApiMiddleware struct { *fw.MiddlewareGlobal // contains filtered or unexported fields }
func NewOpenApiMiddleware ¶
func NewOpenApiMiddleware(hasLicenseFile bool, licenseFileContent []byte) *OpenApiMiddleware
func (*OpenApiMiddleware) DoInitOnce ¶ added in v0.0.6
func (o *OpenApiMiddleware) DoInitOnce()
func (*OpenApiMiddleware) Router ¶ added in v0.0.6
func (o *OpenApiMiddleware) Router(ctx *fw.MiddlewareContext) []*fw.RouteItem
func (*OpenApiMiddleware) SetDocContent ¶ added in v0.1.1
func (o *OpenApiMiddleware) SetDocContent(docContent []byte)
type OpenApiOptions ¶ added in v0.0.3
type OpenApiOptions struct { Redirect bool `yaml:"redirect" default:"true"` //if redirect /doc to /doc/index.html //Route string `yaml:"route" default:"doc"` // the page route of openapi document. e.g. if your want to serve document at /docA/index.html, just set route to docA FileName string `yaml:"fileName" default:"openapi.yaml"` //file path refer to openapi.yaml or openapi.json Type string `yaml:"type" default:"swagger"` //ui type. swagger\rapi }
Click to show internal directories.
Click to hide internal directories.