Documentation
¶
Index ¶
- Variables
- type DocConfig
- type DocConfigUrl
- type OpenApiMiddleware
- func (o *OpenApiMiddleware) DoInitOnce()
- func (o *OpenApiMiddleware) GetDocType() string
- func (o *OpenApiMiddleware) Router(ctx *fw.MiddlewareContext) []*fw.RouteItem
- func (o *OpenApiMiddleware) SetDocContent(groupName string, docContent []byte, contentType string)
- func (o *OpenApiMiddleware) SetMode(isProd bool)
- type OpenApiOptions
Constants ¶
This section is empty.
Variables ¶
View Source
var FS embed.FS
Functions ¶
This section is empty.
Types ¶
type DocConfig ¶ added in v0.3.2
type DocConfig struct {
Urls []DocConfigUrl `json:"urls,omitempty"`
ValidatorUrl string `json:"validatorUrl,omitempty"`
DeepLinking bool `json:"deepLinking,omitempty"`
DocExpansion string `json:"docExpansion,omitempty"`
QueryConfigEnabled bool `json:"queryConfigEnabled,omitempty"`
Url string `json:"url,omitempty"`
TryItOutEnabled bool `json:"tryItOutEnabled,omitempty"`
SupportedSubmitMethods []string `json:"supported_submit_methods,omitempty"`
DisplayRequestDuration bool `json:"displayRequestDuration,omitempty"`
}
type DocConfigUrl ¶ added in v0.3.2
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) GetDocType ¶ added in v0.3.2
func (o *OpenApiMiddleware) GetDocType() string
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(groupName string, docContent []byte, contentType string)
func (*OpenApiMiddleware) SetMode ¶ added in v0.3.2
func (o *OpenApiMiddleware) SetMode(isProd bool)
type OpenApiOptions ¶ added in v0.0.3
type OpenApiOptions struct {
Open bool `yaml:"open" default:"false"` // open browser
Type string `yaml:"type" default:"swagger"` //ui type. swagger\rapi\openapi-ui
Path string `yaml:"path" default:"/docs"`
GroupQueryName string `yaml:"groupQueryName" default:"urls.primaryName"`
OpenApiPath string `yaml:"openApiPath" default:"/openapi.json"`
}
Click to show internal directories.
Click to hide internal directories.