Documentation
¶
Index ¶
- func CleanAndCheckURL(url string) (string, error)
- func CleanURL(url string) string
- func CleanURLParameter(u string) string
- func GenMarkdownCustom(cmd *cobra.Command, w io.Writer, linkHandler func(string) string) error
- func GenerateDocumentation(root *cobra.Command, genPath, gitPath string) error
- type Doc
- type Method
- type Middleware
- type RouteInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CleanAndCheckURL ¶
CleanAndCheckURL returns cleaned URL but also an error if given url contains variables that can't be cleaned. Ex: /myresource/{permMyresourceID} should be transformed to /myresource/<myresource-id>, an error will be returned if permMyResourceID not converted.
func CleanURL ¶
CleanURL given a URL with declared variable inside, returns the same URL with harmonized variable names. Ex: permProjectKey -> projectKey
func CleanURLParameter ¶
func GenMarkdownCustom ¶
GenMarkdownCustom creates custom markdown output.
Types ¶
type Doc ¶
type Doc struct { Title string Description string Method string URL string QueryParams []string ResponseBody string RequestBody string Middlewares []Middleware Scopes []string HTTPOperation string }
Doc represents elements wanted in the documentation
type Middleware ¶
Middleware represents a middleware
Click to show internal directories.
Click to hide internal directories.