Documentation ¶
Overview ¶
Package packageA provides primitives to interact with the openapi HTTP API.
Code generated by github.com/cparta/oapi-codegen version (devel) DO NOT EDIT.
Index ¶
- func GetSwagger() (swagger *openapi3.T, err error)
- func PathToRawSpec(pathToFile string) map[string]func() ([]byte, error)
- func RegisterHandlers(router gin.IRouter, si ServerInterface) gin.IRouter
- func RegisterHandlersWithOptions(router gin.IRouter, si ServerInterface, options GinServerOptions) gin.IRouter
- type GinServerOptions
- type MiddlewareFunc
- type ObjectA
- type ServerInterface
- type ServerInterfaceWrapper
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetSwagger ¶
GetSwagger returns the Swagger specification corresponding to the generated code in this file. The external references of Swagger specification are resolved. The logic of resolving external references is tightly connected to "import-mapping" feature. Externally referenced files must be embedded in the corresponding golang packages. Urls can be supported but this task was out of the scope.
func PathToRawSpec ¶
Constructs a synthetic filesystem for resolving external references when loading openapi specifications.
func RegisterHandlers ¶ added in v1.9.3
func RegisterHandlers(router gin.IRouter, si ServerInterface) gin.IRouter
RegisterHandlers creates http.Handler with routing matching OpenAPI spec.
func RegisterHandlersWithOptions ¶ added in v1.9.3
func RegisterHandlersWithOptions(router gin.IRouter, si ServerInterface, options GinServerOptions) gin.IRouter
RegisterHandlersWithOptions creates http.Handler with additional options
Types ¶
type GinServerOptions ¶ added in v1.9.3
type GinServerOptions struct { BaseURL string Middlewares []gin.HandlerFunc }
GinServerOptions provides options for the Gin server.
type MiddlewareFunc ¶ added in v1.9.3
type MiddlewareFunc = gin.HandlerFunc
keeping for backward compatibility
type ObjectA ¶
type ObjectA struct { Name *string `json:"name,omitempty"` ObjectB *externalRef0.ObjectB `json:"object_b,omitempty"` }
ObjectA defines model for ObjectA.
type ServerInterface ¶ added in v1.9.3
type ServerInterface interface { }
ServerInterface represents all server handlers.
type ServerInterfaceWrapper ¶ added in v1.9.3
type ServerInterfaceWrapper struct {
Handler ServerInterface
}
ServerInterfaceWrapper converts contexts to parameters.