Documentation ¶
Index ¶
Constants ¶
View Source
const ( KeyOpenAPITags = restfulSpec.KeyOpenAPITags SecurityDefinitionKey = "OAPI_SECURITY_DEFINITION" )
Variables ¶
This section is empty.
Functions ¶
func AddMetaDataTags ¶
func AddMetaDataTags(ws *restful.WebService, tags []string)
AddMetaDataTags add metadata tags to Webservice all routes
func Serve ¶
func Serve(container *restful.Container, servIndex int)
Serve rest webservice index start from 1 func Serve(svc []*restful.WebService) {
func ServeDefault ¶
func ServeDefault()
ServeDefault serve with default container and first server config
Types ¶
type OpenAPIConfig ¶
type OpenAPIConfig struct { Enabled bool `yaml:"enabled"` Host string `yaml:"host"` BasePath string `yaml:"base_path"` Schemas []string `yaml:"schemas"` Auth string Spec struct { Title string Description string `yaml:"desc"` Contact struct { Name string Email string URL string } `yaml:"contact"` License struct { Name string URL string } `yaml:"license"` Version string } Tags []OpenapiTagConfig `yaml:",flow"` UI OpenapiUIConfig `yaml:"ui"` }
OpenAPIConfig open api config
type OpenapiTagConfig ¶
OpenapiTagConfig openapi tag
type OpenapiUIConfig ¶
type OpenapiUIConfig struct { API string `yaml:"api"` Dist string `yaml:"dist"` Entrypoint string `yaml:"entrypoint"` External string `yaml:"external"` }
OpenapiUIConfig swagger ui config
type RestfulConfig ¶
type RestfulConfig struct { OpenAPI OpenAPIConfig `yaml:"openapi"` Servers []ServerConfig `yaml:"servers"` }
type ServerConfig ¶
type ServerConfig struct { Name string Addr string Description string OpenAPI OpenAPIConfig `yaml:"openapi"` }
ServerConfig
Click to show internal directories.
Click to hide internal directories.