Documentation ¶
Overview ¶
Package components provides primitives to interact with the openapi HTTP API.
Code generated by github.com/cparta/oapi-codegen version (devel) DO NOT EDIT.
Index ¶
- func RegisterHandlers(router gin.IRouter, si ServerInterface) gin.IRouter
- func RegisterHandlersWithOptions(router gin.IRouter, si ServerInterface, options GinServerOptions) gin.IRouter
- type AdditionalPropertiesObject1
- type AdditionalPropertiesObject2
- type AdditionalPropertiesObject3
- func (a AdditionalPropertiesObject3) Get(fieldName string) (value interface{}, found bool)
- func (a AdditionalPropertiesObject3) MarshalJSON() ([]byte, error)
- func (a *AdditionalPropertiesObject3) Set(fieldName string, value interface{})
- func (a *AdditionalPropertiesObject3) UnmarshalJSON(b []byte) error
- type AdditionalPropertiesObject4
- func (a AdditionalPropertiesObject4) Get(fieldName string) (value interface{}, found bool)
- func (a AdditionalPropertiesObject4) MarshalJSON() ([]byte, error)
- func (a *AdditionalPropertiesObject4) Set(fieldName string, value interface{})
- func (a *AdditionalPropertiesObject4) UnmarshalJSON(b []byte) error
- type AdditionalPropertiesObject4_Inner
- func (a AdditionalPropertiesObject4_Inner) Get(fieldName string) (value interface{}, found bool)
- func (a AdditionalPropertiesObject4_Inner) MarshalJSON() ([]byte, error)
- func (a *AdditionalPropertiesObject4_Inner) Set(fieldName string, value interface{})
- func (a *AdditionalPropertiesObject4_Inner) UnmarshalJSON(b []byte) error
- type AdditionalPropertiesObject5
- func (a AdditionalPropertiesObject5) Get(fieldName string) (value SchemaObject, found bool)
- func (a AdditionalPropertiesObject5) MarshalJSON() ([]byte, error)
- func (a *AdditionalPropertiesObject5) Set(fieldName string, value SchemaObject)
- func (a *AdditionalPropertiesObject5) UnmarshalJSON(b []byte) error
- type BodyWithAddPropsJSONBody
- type BodyWithAddPropsJSONBody_Inner
- func (a BodyWithAddPropsJSONBody_Inner) Get(fieldName string) (value int, found bool)
- func (a BodyWithAddPropsJSONBody_Inner) MarshalJSON() ([]byte, error)
- func (a *BodyWithAddPropsJSONBody_Inner) Set(fieldName string, value int)
- func (a *BodyWithAddPropsJSONBody_Inner) UnmarshalJSON(b []byte) error
- type BodyWithAddPropsJSONRequestBody
- type EnsureEverythingIsReferencedJSONRequestBody
- type GinServerOptions
- type MiddlewareFunc
- type ObjectWithJsonField
- type ParamsWithAddPropsParams
- type ParamsWithAddPropsParams_P1
- func (a ParamsWithAddPropsParams_P1) Get(fieldName string) (value interface{}, found bool)
- func (a ParamsWithAddPropsParams_P1) MarshalJSON() ([]byte, error)
- func (a *ParamsWithAddPropsParams_P1) Set(fieldName string, value interface{})
- func (a *ParamsWithAddPropsParams_P1) UnmarshalJSON(b []byte) error
- type ParamsWithAddPropsParams_P2_Inner
- func (a ParamsWithAddPropsParams_P2_Inner) Get(fieldName string) (value string, found bool)
- func (a ParamsWithAddPropsParams_P2_Inner) MarshalJSON() ([]byte, error)
- func (a *ParamsWithAddPropsParams_P2_Inner) Set(fieldName string, value string)
- func (a *ParamsWithAddPropsParams_P2_Inner) UnmarshalJSON(b []byte) error
- type RequestBody
- type ResponseObject
- type SchemaObject
- type ServerInterface
- type ServerInterfaceWrapper
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterHandlers ¶
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 AdditionalPropertiesObject1 ¶
type AdditionalPropertiesObject1 struct { Id int `json:"id"` Name string `json:"name"` Optional *string `json:"optional,omitempty"` AdditionalProperties map[string]int `json:"-"` }
Has additional properties of type int
func (AdditionalPropertiesObject1) Get ¶
func (a AdditionalPropertiesObject1) Get(fieldName string) (value int, found bool)
Getter for additional properties for AdditionalPropertiesObject1. Returns the specified element and whether it was found
func (AdditionalPropertiesObject1) MarshalJSON ¶
func (a AdditionalPropertiesObject1) MarshalJSON() ([]byte, error)
Override default JSON handling for AdditionalPropertiesObject1 to handle AdditionalProperties
func (*AdditionalPropertiesObject1) Set ¶
func (a *AdditionalPropertiesObject1) Set(fieldName string, value int)
Setter for additional properties for AdditionalPropertiesObject1
func (*AdditionalPropertiesObject1) UnmarshalJSON ¶
func (a *AdditionalPropertiesObject1) UnmarshalJSON(b []byte) error
Override default JSON handling for AdditionalPropertiesObject1 to handle AdditionalProperties
type AdditionalPropertiesObject2 ¶
Does not allow additional properties
type AdditionalPropertiesObject3 ¶
type AdditionalPropertiesObject3 struct { Name string `json:"name"` AdditionalProperties map[string]interface{} `json:"-"` }
Allows any additional property
func (AdditionalPropertiesObject3) Get ¶
func (a AdditionalPropertiesObject3) Get(fieldName string) (value interface{}, found bool)
Getter for additional properties for AdditionalPropertiesObject3. Returns the specified element and whether it was found
func (AdditionalPropertiesObject3) MarshalJSON ¶
func (a AdditionalPropertiesObject3) MarshalJSON() ([]byte, error)
Override default JSON handling for AdditionalPropertiesObject3 to handle AdditionalProperties
func (*AdditionalPropertiesObject3) Set ¶
func (a *AdditionalPropertiesObject3) Set(fieldName string, value interface{})
Setter for additional properties for AdditionalPropertiesObject3
func (*AdditionalPropertiesObject3) UnmarshalJSON ¶
func (a *AdditionalPropertiesObject3) UnmarshalJSON(b []byte) error
Override default JSON handling for AdditionalPropertiesObject3 to handle AdditionalProperties
type AdditionalPropertiesObject4 ¶
type AdditionalPropertiesObject4 struct { Inner AdditionalPropertiesObject4_Inner `json:"inner"` Name string `json:"name"` AdditionalProperties map[string]interface{} `json:"-"` }
Has anonymous field which has additional properties
func (AdditionalPropertiesObject4) Get ¶
func (a AdditionalPropertiesObject4) Get(fieldName string) (value interface{}, found bool)
Getter for additional properties for AdditionalPropertiesObject4. Returns the specified element and whether it was found
func (AdditionalPropertiesObject4) MarshalJSON ¶
func (a AdditionalPropertiesObject4) MarshalJSON() ([]byte, error)
Override default JSON handling for AdditionalPropertiesObject4 to handle AdditionalProperties
func (*AdditionalPropertiesObject4) Set ¶
func (a *AdditionalPropertiesObject4) Set(fieldName string, value interface{})
Setter for additional properties for AdditionalPropertiesObject4
func (*AdditionalPropertiesObject4) UnmarshalJSON ¶
func (a *AdditionalPropertiesObject4) UnmarshalJSON(b []byte) error
Override default JSON handling for AdditionalPropertiesObject4 to handle AdditionalProperties
type AdditionalPropertiesObject4_Inner ¶
type AdditionalPropertiesObject4_Inner struct { Name string `json:"name"` AdditionalProperties map[string]interface{} `json:"-"` }
AdditionalPropertiesObject4_Inner defines model for AdditionalPropertiesObject4.Inner.
func (AdditionalPropertiesObject4_Inner) Get ¶
func (a AdditionalPropertiesObject4_Inner) Get(fieldName string) (value interface{}, found bool)
Getter for additional properties for AdditionalPropertiesObject4_Inner. Returns the specified element and whether it was found
func (AdditionalPropertiesObject4_Inner) MarshalJSON ¶
func (a AdditionalPropertiesObject4_Inner) MarshalJSON() ([]byte, error)
Override default JSON handling for AdditionalPropertiesObject4_Inner to handle AdditionalProperties
func (*AdditionalPropertiesObject4_Inner) Set ¶
func (a *AdditionalPropertiesObject4_Inner) Set(fieldName string, value interface{})
Setter for additional properties for AdditionalPropertiesObject4_Inner
func (*AdditionalPropertiesObject4_Inner) UnmarshalJSON ¶
func (a *AdditionalPropertiesObject4_Inner) UnmarshalJSON(b []byte) error
Override default JSON handling for AdditionalPropertiesObject4_Inner to handle AdditionalProperties
type AdditionalPropertiesObject5 ¶
type AdditionalPropertiesObject5 struct {
AdditionalProperties map[string]SchemaObject `json:"-"`
}
Has additional properties with schema for dictionaries
func (AdditionalPropertiesObject5) Get ¶
func (a AdditionalPropertiesObject5) Get(fieldName string) (value SchemaObject, found bool)
Getter for additional properties for AdditionalPropertiesObject5. Returns the specified element and whether it was found
func (AdditionalPropertiesObject5) MarshalJSON ¶
func (a AdditionalPropertiesObject5) MarshalJSON() ([]byte, error)
Override default JSON handling for AdditionalPropertiesObject5 to handle AdditionalProperties
func (*AdditionalPropertiesObject5) Set ¶
func (a *AdditionalPropertiesObject5) Set(fieldName string, value SchemaObject)
Setter for additional properties for AdditionalPropertiesObject5
func (*AdditionalPropertiesObject5) UnmarshalJSON ¶
func (a *AdditionalPropertiesObject5) UnmarshalJSON(b []byte) error
Override default JSON handling for AdditionalPropertiesObject5 to handle AdditionalProperties
type BodyWithAddPropsJSONBody ¶
type BodyWithAddPropsJSONBody struct { Inner BodyWithAddPropsJSONBody_Inner `json:"inner"` Name string `json:"name"` AdditionalProperties map[string]interface{} `json:"-"` }
BodyWithAddPropsJSONBody defines parameters for BodyWithAddProps.
func (BodyWithAddPropsJSONBody) Get ¶
func (a BodyWithAddPropsJSONBody) Get(fieldName string) (value interface{}, found bool)
Getter for additional properties for BodyWithAddPropsJSONBody. Returns the specified element and whether it was found
func (BodyWithAddPropsJSONBody) MarshalJSON ¶
func (a BodyWithAddPropsJSONBody) MarshalJSON() ([]byte, error)
Override default JSON handling for BodyWithAddPropsJSONBody to handle AdditionalProperties
func (*BodyWithAddPropsJSONBody) Set ¶
func (a *BodyWithAddPropsJSONBody) Set(fieldName string, value interface{})
Setter for additional properties for BodyWithAddPropsJSONBody
func (*BodyWithAddPropsJSONBody) UnmarshalJSON ¶
func (a *BodyWithAddPropsJSONBody) UnmarshalJSON(b []byte) error
Override default JSON handling for BodyWithAddPropsJSONBody to handle AdditionalProperties
type BodyWithAddPropsJSONBody_Inner ¶
BodyWithAddPropsJSONBody_Inner defines parameters for BodyWithAddProps.
func (BodyWithAddPropsJSONBody_Inner) Get ¶
func (a BodyWithAddPropsJSONBody_Inner) Get(fieldName string) (value int, found bool)
Getter for additional properties for BodyWithAddPropsJSONBody_Inner. Returns the specified element and whether it was found
func (BodyWithAddPropsJSONBody_Inner) MarshalJSON ¶
func (a BodyWithAddPropsJSONBody_Inner) MarshalJSON() ([]byte, error)
Override default JSON handling for BodyWithAddPropsJSONBody_Inner to handle AdditionalProperties
func (*BodyWithAddPropsJSONBody_Inner) Set ¶
func (a *BodyWithAddPropsJSONBody_Inner) Set(fieldName string, value int)
Setter for additional properties for BodyWithAddPropsJSONBody_Inner
func (*BodyWithAddPropsJSONBody_Inner) UnmarshalJSON ¶
func (a *BodyWithAddPropsJSONBody_Inner) UnmarshalJSON(b []byte) error
Override default JSON handling for BodyWithAddPropsJSONBody_Inner to handle AdditionalProperties
type BodyWithAddPropsJSONRequestBody ¶
type BodyWithAddPropsJSONRequestBody BodyWithAddPropsJSONBody
BodyWithAddPropsJSONRequestBody defines body for BodyWithAddProps for application/json ContentType.
type EnsureEverythingIsReferencedJSONRequestBody ¶
type EnsureEverythingIsReferencedJSONRequestBody RequestBody
EnsureEverythingIsReferencedJSONRequestBody defines body for EnsureEverythingIsReferenced for application/json ContentType.
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 ObjectWithJsonField ¶
type ObjectWithJsonField struct { Name string `json:"name"` Value1 json.RawMessage `json:"value1"` Value2 json.RawMessage `json:"value2,omitempty"` }
ObjectWithJsonField defines model for ObjectWithJsonField.
type ParamsWithAddPropsParams ¶
type ParamsWithAddPropsParams struct { // This parameter has additional properties P1 ParamsWithAddPropsParams_P1 `json:"p1"` // This parameter has an anonymous inner property which needs to be // turned into a proper type for additionalProperties to work P2 struct { Inner ParamsWithAddPropsParams_P2_Inner `json:"inner"` } `json:"p2"` }
ParamsWithAddPropsParams defines parameters for ParamsWithAddProps.
type ParamsWithAddPropsParams_P1 ¶
type ParamsWithAddPropsParams_P1 struct {
AdditionalProperties map[string]interface{} `json:"-"`
}
ParamsWithAddPropsParams_P1 defines parameters for ParamsWithAddProps.
func (ParamsWithAddPropsParams_P1) Get ¶
func (a ParamsWithAddPropsParams_P1) Get(fieldName string) (value interface{}, found bool)
Getter for additional properties for ParamsWithAddPropsParams_P1. Returns the specified element and whether it was found
func (ParamsWithAddPropsParams_P1) MarshalJSON ¶
func (a ParamsWithAddPropsParams_P1) MarshalJSON() ([]byte, error)
Override default JSON handling for ParamsWithAddPropsParams_P1 to handle AdditionalProperties
func (*ParamsWithAddPropsParams_P1) Set ¶
func (a *ParamsWithAddPropsParams_P1) Set(fieldName string, value interface{})
Setter for additional properties for ParamsWithAddPropsParams_P1
func (*ParamsWithAddPropsParams_P1) UnmarshalJSON ¶
func (a *ParamsWithAddPropsParams_P1) UnmarshalJSON(b []byte) error
Override default JSON handling for ParamsWithAddPropsParams_P1 to handle AdditionalProperties
type ParamsWithAddPropsParams_P2_Inner ¶
ParamsWithAddPropsParams_P2_Inner defines parameters for ParamsWithAddProps.
func (ParamsWithAddPropsParams_P2_Inner) Get ¶
func (a ParamsWithAddPropsParams_P2_Inner) Get(fieldName string) (value string, found bool)
Getter for additional properties for ParamsWithAddPropsParams_P2_Inner. Returns the specified element and whether it was found
func (ParamsWithAddPropsParams_P2_Inner) MarshalJSON ¶
func (a ParamsWithAddPropsParams_P2_Inner) MarshalJSON() ([]byte, error)
Override default JSON handling for ParamsWithAddPropsParams_P2_Inner to handle AdditionalProperties
func (*ParamsWithAddPropsParams_P2_Inner) Set ¶
func (a *ParamsWithAddPropsParams_P2_Inner) Set(fieldName string, value string)
Setter for additional properties for ParamsWithAddPropsParams_P2_Inner
func (*ParamsWithAddPropsParams_P2_Inner) UnmarshalJSON ¶
func (a *ParamsWithAddPropsParams_P2_Inner) UnmarshalJSON(b []byte) error
Override default JSON handling for ParamsWithAddPropsParams_P2_Inner to handle AdditionalProperties
type RequestBody ¶
type RequestBody struct {
Field SchemaObject `json:"Field"`
}
RequestBody defines model for RequestBody.
type ResponseObject ¶
type ResponseObject struct {
Field SchemaObject `json:"Field"`
}
ResponseObject defines model for ResponseObject.
type SchemaObject ¶
SchemaObject defines model for SchemaObject.
type ServerInterface ¶
type ServerInterface interface { // (GET /ensure-everything-is-referenced) EnsureEverythingIsReferenced(c *gin.Context) // (GET /params_with_add_props) ParamsWithAddProps(c *gin.Context, params ParamsWithAddPropsParams) // (POST /params_with_add_props) BodyWithAddProps(c *gin.Context) }
ServerInterface represents all server handlers.
type ServerInterfaceWrapper ¶
type ServerInterfaceWrapper struct {
Handler ServerInterface
}
ServerInterfaceWrapper converts contexts to parameters.
func (*ServerInterfaceWrapper) BodyWithAddProps ¶
func (siw *ServerInterfaceWrapper) BodyWithAddProps(c *gin.Context)
BodyWithAddProps operation middleware
func (*ServerInterfaceWrapper) EnsureEverythingIsReferenced ¶
func (siw *ServerInterfaceWrapper) EnsureEverythingIsReferenced(c *gin.Context)
EnsureEverythingIsReferenced operation middleware
func (*ServerInterfaceWrapper) ParamsWithAddProps ¶
func (siw *ServerInterfaceWrapper) ParamsWithAddProps(c *gin.Context)
ParamsWithAddProps operation middleware