Documentation
¶
Index ¶
- func GetOpenAPISpecJSON() ([]byte, error)
- func NewCreateItemRequest(server string, body createItemJSONRequestBody) (*http.Request, error)
- func NewCreateItemRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewCreateOrderRequest(server string, body createOrderJSONRequestBody) (*http.Request, error)
- func NewCreateOrderRequestWithApplicationJsonPatchJsonBody(server string, body createOrderApplicationJsonPatchJsonRequestBody) (*http.Request, error)
- func NewCreateOrderRequestWithApplicationMergePatchJsonBody(server string, body createOrderApplicationMergePatchJsonRequestBody) (*http.Request, error)
- func NewCreateOrderRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewCreatePetRequest(server string, body createPetJSONRequestBody) (*http.Request, error)
- func NewCreatePetRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewGetQuxRequest(server string) (*http.Request, error)
- func NewGetStatusRequest(server string) (*http.Request, error)
- func NewGetZapRequest(server string) (*http.Request, error)
- func NewListEntitiesRequest(server string) (*http.Request, error)
- func NewListItemsRequest(server string) (*http.Request, error)
- func NewPatchResourceRequest(server string, id string, body patchResourceJSONRequestBody) (*http.Request, error)
- func NewPatchResourceRequestWithApplicationJsonPatchJsonBody(server string, id string, ...) (*http.Request, error)
- func NewPatchResourceRequestWithApplicationMergePatchJsonBody(server string, id string, ...) (*http.Request, error)
- func NewPatchResourceRequestWithBody(server string, id string, contentType string, body io.Reader) (*http.Request, error)
- func NewPostFooRequest(server string, params *PostFooParams, body postFooJSONRequestBody) (*http.Request, error)
- func NewPostFooRequestWithBody(server string, params *PostFooParams, contentType string, body io.Reader) (*http.Request, error)
- func NewPostQuxRequest(server string, body postQuxJSONRequestBody) (*http.Request, error)
- func NewPostQuxRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewPostZapRequest(server string, body postZapJSONRequestBody) (*http.Request, error)
- func NewPostZapRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewQueryRequest(server string, body queryJSONRequestBody) (*http.Request, error)
- func NewQueryRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- type Bar
- type Bar2
- type Client
- func (c *Client) CreateItem(ctx context.Context, body createItemJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) CreateItemWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) CreateOrder(ctx context.Context, body createOrderJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) CreateOrderWithApplicationJsonPatchJsonBody(ctx context.Context, body createOrderApplicationJsonPatchJsonRequestBody, ...) (*http.Response, error)
- func (c *Client) CreateOrderWithApplicationMergePatchJsonBody(ctx context.Context, body createOrderApplicationMergePatchJsonRequestBody, ...) (*http.Response, error)
- func (c *Client) CreateOrderWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) CreatePet(ctx context.Context, body createPetJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) CreatePetWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) GetQux(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetStatus(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetZap(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) ListEntities(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) ListItems(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) PatchResource(ctx context.Context, id string, body patchResourceJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) PatchResourceWithApplicationJsonPatchJsonBody(ctx context.Context, id string, ...) (*http.Response, error)
- func (c *Client) PatchResourceWithApplicationMergePatchJsonBody(ctx context.Context, id string, ...) (*http.Response, error)
- func (c *Client) PatchResourceWithBody(ctx context.Context, id string, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) PostFoo(ctx context.Context, params *PostFooParams, body postFooJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) PostFooWithBody(ctx context.Context, params *PostFooParams, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) PostQux(ctx context.Context, body postQuxJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) PostQuxWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) PostZap(ctx context.Context, body postZapJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) PostZapWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) Query(ctx context.Context, body queryJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) QueryWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- type ClientHttpError
- type ClientInterface
- type ClientOption
- type CreateItemJSONRequest
- type CreateItemResponse
- type CreateOrderJSONRequest1
- type CreateOrderJSONRequest2
- type CreateOrderJSONRequest3
- type CreatePetJSONRequest
- type CustomQux
- type GetEntities200Response
- type GetQuxJSONResponse
- type GetStatusResponse
- type GetZapJSONResponse
- type HttpRequestDoer
- type JSONPatch
- type JSONPatchItem
- type ListEntitiesJSONResponse
- type ListItemsResponse
- type Metadata
- type Order
- type PatchResourceJSONResponse2001
- func (t *PatchResourceJSONResponse2001) ApplyDefaults()
- func (t PatchResourceJSONResponse2001) AsPatchResourcesID200ResponseJSONOneOf11() (PatchResourcesID200ResponseJSONOneOf11, error)
- func (t PatchResourceJSONResponse2001) AsPatchResourcesID200ResponseJSONOneOf21() (PatchResourcesID200ResponseJSONOneOf21, error)
- func (t PatchResourceJSONResponse2001) AsResource() (Resource, error)
- func (t *PatchResourceJSONResponse2001) FromPatchResourcesID200ResponseJSONOneOf11(v PatchResourcesID200ResponseJSONOneOf11) error
- func (t *PatchResourceJSONResponse2001) FromPatchResourcesID200ResponseJSONOneOf21(v PatchResourcesID200ResponseJSONOneOf21) error
- func (t *PatchResourceJSONResponse2001) FromResource(v Resource) error
- func (t PatchResourceJSONResponse2001) MarshalJSON() ([]byte, error)
- func (t *PatchResourceJSONResponse2001) MergePatchResourcesID200ResponseJSONOneOf11(v PatchResourcesID200ResponseJSONOneOf11) error
- func (t *PatchResourceJSONResponse2001) MergePatchResourcesID200ResponseJSONOneOf21(v PatchResourcesID200ResponseJSONOneOf21) error
- func (t *PatchResourceJSONResponse2001) MergeResource(v Resource) error
- func (t *PatchResourceJSONResponse2001) UnmarshalJSON(b []byte) error
- type PatchResourceJSONResponse2002
- func (t *PatchResourceJSONResponse2002) ApplyDefaults()
- func (t PatchResourceJSONResponse2002) AsPatchResourcesID200ResponseJSONOneOf12() (PatchResourcesID200ResponseJSONOneOf12, error)
- func (t PatchResourceJSONResponse2002) AsPatchResourcesID200ResponseJSONOneOf22() (PatchResourcesID200ResponseJSONOneOf22, error)
- func (t PatchResourceJSONResponse2002) AsResource() (Resource, error)
- func (t *PatchResourceJSONResponse2002) FromPatchResourcesID200ResponseJSONOneOf12(v PatchResourcesID200ResponseJSONOneOf12) error
- func (t *PatchResourceJSONResponse2002) FromPatchResourcesID200ResponseJSONOneOf22(v PatchResourcesID200ResponseJSONOneOf22) error
- func (t *PatchResourceJSONResponse2002) FromResource(v Resource) error
- func (t PatchResourceJSONResponse2002) MarshalJSON() ([]byte, error)
- func (t *PatchResourceJSONResponse2002) MergePatchResourcesID200ResponseJSONOneOf12(v PatchResourcesID200ResponseJSONOneOf12) error
- func (t *PatchResourceJSONResponse2002) MergePatchResourcesID200ResponseJSONOneOf22(v PatchResourcesID200ResponseJSONOneOf22) error
- func (t *PatchResourceJSONResponse2002) MergeResource(v Resource) error
- func (t *PatchResourceJSONResponse2002) UnmarshalJSON(b []byte) error
- type PatchResourcesID200ResponseJSONOneOf11
- type PatchResourcesID200ResponseJSONOneOf12
- type PatchResourcesID200ResponseJSONOneOf21
- type PatchResourcesID200ResponseJSONOneOf22
- type Pet
- type PostFooJSONRequest
- type PostFooJSONResponse
- type PostFooParams
- type PostOrdersRequest
- type QueryJSONRequest
- type QueryResponse
- type RequestEditorFn
- type Resource
- type ResourceMVO
- type SimpleClient
- func (c *SimpleClient) CreateItem(ctx context.Context, body createItemJSONRequestBody, ...) (CreateItemResponse, error)
- func (c *SimpleClient) CreateOrder(ctx context.Context, body createOrderJSONRequestBody, ...) (Order, error)
- func (c *SimpleClient) CreatePet(ctx context.Context, body createPetJSONRequestBody, ...) (Pet, error)
- func (c *SimpleClient) GetQux(ctx context.Context, reqEditors ...RequestEditorFn) (map[string]any, error)
- func (c *SimpleClient) GetStatus(ctx context.Context, reqEditors ...RequestEditorFn) (GetStatusResponse, error)
- func (c *SimpleClient) GetZap(ctx context.Context, reqEditors ...RequestEditorFn) (map[string]any, error)
- func (c *SimpleClient) ListEntities(ctx context.Context, reqEditors ...RequestEditorFn) (map[string]any, error)
- func (c *SimpleClient) ListItems(ctx context.Context, reqEditors ...RequestEditorFn) (ListItemsResponse, error)
- func (c *SimpleClient) PostFoo(ctx context.Context, params *PostFooParams, body postFooJSONRequestBody, ...) (map[string]any, error)
- func (c *SimpleClient) Query(ctx context.Context, body queryJSONRequestBody, reqEditors ...RequestEditorFn) (QueryResponse, error)
- type Widget
- type Zap
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetOpenAPISpecJSON ¶
GetOpenAPISpecJSON returns the raw OpenAPI spec as JSON bytes.
func NewCreateItemRequest ¶
NewCreateItemRequest creates a POST request for /items with application/json body
func NewCreateItemRequestWithBody ¶
func NewCreateItemRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
NewCreateItemRequestWithBody creates a POST request for /items with any body
func NewCreateOrderRequest ¶
NewCreateOrderRequest creates a POST request for /orders with application/json body
func NewCreateOrderRequestWithApplicationJsonPatchJsonBody ¶
func NewCreateOrderRequestWithApplicationJsonPatchJsonBody(server string, body createOrderApplicationJsonPatchJsonRequestBody) (*http.Request, error)
NewCreateOrderRequestWithApplicationJsonPatchJsonBody creates a POST request for /orders with application/json-patch+json body
func NewCreateOrderRequestWithApplicationMergePatchJsonBody ¶
func NewCreateOrderRequestWithApplicationMergePatchJsonBody(server string, body createOrderApplicationMergePatchJsonRequestBody) (*http.Request, error)
NewCreateOrderRequestWithApplicationMergePatchJsonBody creates a POST request for /orders with application/merge-patch+json body
func NewCreateOrderRequestWithBody ¶
func NewCreateOrderRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
NewCreateOrderRequestWithBody creates a POST request for /orders with any body
func NewCreatePetRequest ¶
NewCreatePetRequest creates a POST request for /pets with application/json body
func NewCreatePetRequestWithBody ¶
func NewCreatePetRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
NewCreatePetRequestWithBody creates a POST request for /pets with any body
func NewGetQuxRequest ¶
NewGetQuxRequest creates a GET request for /qux
func NewGetStatusRequest ¶
NewGetStatusRequest creates a GET request for /status
func NewGetZapRequest ¶
NewGetZapRequest creates a GET request for /zap
func NewListEntitiesRequest ¶
NewListEntitiesRequest creates a GET request for /entities
func NewListItemsRequest ¶
NewListItemsRequest creates a GET request for /items
func NewPatchResourceRequest ¶
func NewPatchResourceRequest(server string, id string, body patchResourceJSONRequestBody) (*http.Request, error)
NewPatchResourceRequest creates a PATCH request for /resources/{id} with application/json body
func NewPatchResourceRequestWithApplicationJsonPatchJsonBody ¶
func NewPatchResourceRequestWithApplicationJsonPatchJsonBody(server string, id string, body patchResourceApplicationJsonPatchJsonRequestBody) (*http.Request, error)
NewPatchResourceRequestWithApplicationJsonPatchJsonBody creates a PATCH request for /resources/{id} with application/json-patch+json body
func NewPatchResourceRequestWithApplicationMergePatchJsonBody ¶
func NewPatchResourceRequestWithApplicationMergePatchJsonBody(server string, id string, body patchResourceApplicationMergePatchJsonRequestBody) (*http.Request, error)
NewPatchResourceRequestWithApplicationMergePatchJsonBody creates a PATCH request for /resources/{id} with application/merge-patch+json body
func NewPatchResourceRequestWithBody ¶
func NewPatchResourceRequestWithBody(server string, id string, contentType string, body io.Reader) (*http.Request, error)
NewPatchResourceRequestWithBody creates a PATCH request for /resources/{id} with any body
func NewPostFooRequest ¶
func NewPostFooRequest(server string, params *PostFooParams, body postFooJSONRequestBody) (*http.Request, error)
NewPostFooRequest creates a POST request for /foo with application/json body
func NewPostFooRequestWithBody ¶
func NewPostFooRequestWithBody(server string, params *PostFooParams, contentType string, body io.Reader) (*http.Request, error)
NewPostFooRequestWithBody creates a POST request for /foo with any body
func NewPostQuxRequest ¶
NewPostQuxRequest creates a POST request for /qux with application/json body
func NewPostQuxRequestWithBody ¶
func NewPostQuxRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
NewPostQuxRequestWithBody creates a POST request for /qux with any body
func NewPostZapRequest ¶
NewPostZapRequest creates a POST request for /zap with application/json body
func NewPostZapRequestWithBody ¶
func NewPostZapRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
NewPostZapRequestWithBody creates a POST request for /zap with any body
func NewQueryRequest ¶
NewQueryRequest creates a POST request for /query with application/json body
Types ¶
type Bar ¶
type Bar struct {
Value *string `form:"value,omitempty" json:"value,omitempty"`
}
#/components/schemas/Bar
func (*Bar) ApplyDefaults ¶
func (s *Bar) ApplyDefaults()
ApplyDefaults sets default values for fields that are nil.
type Bar2 ¶
type Bar2 struct {
Value *float32 `form:"value,omitempty" json:"value,omitempty"`
}
#/components/schemas/Bar2
func (*Bar2) ApplyDefaults ¶
func (s *Bar2) ApplyDefaults()
ApplyDefaults sets default values for fields that are nil.
type Client ¶
type Client struct {
// The endpoint of the server conforming to this interface, with scheme,
// https://api.deepmap.com for example. This can contain a path relative
// to the server, such as https://api.deepmap.com/dev-test, and all the
// paths in the OpenAPI spec will be appended to the server.
Server string
// Doer for performing requests, typically a *http.Client with any
// customized settings, such as certificate chains.
Client HttpRequestDoer
// A list of callbacks for modifying requests which are generated before sending over
// the network.
RequestEditors []RequestEditorFn
}
Client which conforms to the OpenAPI3 specification for this service.
func NewClient ¶
func NewClient(server string, opts ...ClientOption) (*Client, error)
NewClient creates a new Client with reasonable defaults.
func (*Client) CreateItem ¶
func (c *Client) CreateItem(ctx context.Context, body createItemJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
CreateItem makes a POST request to /items with application/json body
func (*Client) CreateItemWithBody ¶
func (*Client) CreateOrder ¶
func (c *Client) CreateOrder(ctx context.Context, body createOrderJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
CreateOrder makes a POST request to /orders with application/json body
func (*Client) CreateOrderWithApplicationJsonPatchJsonBody ¶
func (c *Client) CreateOrderWithApplicationJsonPatchJsonBody(ctx context.Context, body createOrderApplicationJsonPatchJsonRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
CreateOrderWithApplicationJsonPatchJsonBody makes a POST request to /orders with application/json-patch+json body
func (*Client) CreateOrderWithApplicationMergePatchJsonBody ¶
func (c *Client) CreateOrderWithApplicationMergePatchJsonBody(ctx context.Context, body createOrderApplicationMergePatchJsonRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
CreateOrderWithApplicationMergePatchJsonBody makes a POST request to /orders with application/merge-patch+json body
func (*Client) CreateOrderWithBody ¶
func (*Client) CreatePet ¶
func (c *Client) CreatePet(ctx context.Context, body createPetJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
CreatePet makes a POST request to /pets with application/json body
func (*Client) CreatePetWithBody ¶
func (*Client) ListEntities ¶
func (*Client) PatchResource ¶
func (c *Client) PatchResource(ctx context.Context, id string, body patchResourceJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
PatchResource makes a PATCH request to /resources/{id} with application/json body
func (*Client) PatchResourceWithApplicationJsonPatchJsonBody ¶
func (c *Client) PatchResourceWithApplicationJsonPatchJsonBody(ctx context.Context, id string, body patchResourceApplicationJsonPatchJsonRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
PatchResourceWithApplicationJsonPatchJsonBody makes a PATCH request to /resources/{id} with application/json-patch+json body
func (*Client) PatchResourceWithApplicationMergePatchJsonBody ¶
func (c *Client) PatchResourceWithApplicationMergePatchJsonBody(ctx context.Context, id string, body patchResourceApplicationMergePatchJsonRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
PatchResourceWithApplicationMergePatchJsonBody makes a PATCH request to /resources/{id} with application/merge-patch+json body
func (*Client) PatchResourceWithBody ¶
func (*Client) PostFoo ¶
func (c *Client) PostFoo(ctx context.Context, params *PostFooParams, body postFooJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
PostFoo makes a POST request to /foo with application/json body
func (*Client) PostFooWithBody ¶
func (*Client) PostQux ¶
func (c *Client) PostQux(ctx context.Context, body postQuxJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
PostQux makes a POST request to /qux with application/json body
func (*Client) PostQuxWithBody ¶
func (*Client) PostZap ¶
func (c *Client) PostZap(ctx context.Context, body postZapJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
PostZap makes a POST request to /zap with application/json body
func (*Client) PostZapWithBody ¶
type ClientHttpError ¶
ClientHttpError represents an HTTP error response. The type parameter E is the type of the parsed error body.
func (*ClientHttpError[E]) Error ¶
func (e *ClientHttpError[E]) Error() string
type ClientInterface ¶
type ClientInterface interface {
// ListEntities makes a GET request to /entities
ListEntities(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
// PostFooWithBody makes a POST request to /foo
PostFooWithBody(ctx context.Context, params *PostFooParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
PostFoo(ctx context.Context, params *PostFooParams, body postFooJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// ListItems makes a GET request to /items
ListItems(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
// CreateItemWithBody makes a POST request to /items
CreateItemWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
CreateItem(ctx context.Context, body createItemJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// CreateOrderWithBody makes a POST request to /orders
CreateOrderWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
CreateOrder(ctx context.Context, body createOrderJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
CreateOrderWithApplicationJsonPatchJsonBody(ctx context.Context, body createOrderApplicationJsonPatchJsonRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
CreateOrderWithApplicationMergePatchJsonBody(ctx context.Context, body createOrderApplicationMergePatchJsonRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// CreatePetWithBody makes a POST request to /pets
CreatePetWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
CreatePet(ctx context.Context, body createPetJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// QueryWithBody makes a POST request to /query
QueryWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
Query(ctx context.Context, body queryJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetQux makes a GET request to /qux
GetQux(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
// PostQuxWithBody makes a POST request to /qux
PostQuxWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
PostQux(ctx context.Context, body postQuxJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// PatchResourceWithBody makes a PATCH request to /resources/{id}
PatchResourceWithBody(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
PatchResource(ctx context.Context, id string, body patchResourceJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
PatchResourceWithApplicationJsonPatchJsonBody(ctx context.Context, id string, body patchResourceApplicationJsonPatchJsonRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
PatchResourceWithApplicationMergePatchJsonBody(ctx context.Context, id string, body patchResourceApplicationMergePatchJsonRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetStatus makes a GET request to /status
GetStatus(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetZap makes a GET request to /zap
GetZap(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
// PostZapWithBody makes a POST request to /zap
PostZapWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
PostZap(ctx context.Context, body postZapJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
}
ClientInterface is the interface specification for the client.
type ClientOption ¶
ClientOption allows setting custom parameters during construction.
func WithHTTPClient ¶
func WithHTTPClient(doer HttpRequestDoer) ClientOption
WithHTTPClient allows overriding the default Doer, which is automatically created using http.Client. This is useful for tests.
func WithRequestEditorFn ¶
func WithRequestEditorFn(fn RequestEditorFn) ClientOption
WithRequestEditorFn allows setting up a callback function, which will be called right before sending the request. This can be used to mutate the request.
type CreateItemJSONRequest ¶
type CreateItemJSONRequest struct {
Name *string `form:"name,omitempty" json:"name,omitempty"`
}
#/paths//items/post/requestBody/content/application/json/schema
func (*CreateItemJSONRequest) ApplyDefaults ¶
func (s *CreateItemJSONRequest) ApplyDefaults()
ApplyDefaults sets default values for fields that are nil.
type CreateItemResponse ¶
type CreateItemResponse struct {
ID *string `form:"id,omitempty" json:"id,omitempty"`
Name *string `form:"name,omitempty" json:"name,omitempty"`
}
#/components/schemas/CreateItemResponse
func (*CreateItemResponse) ApplyDefaults ¶
func (s *CreateItemResponse) ApplyDefaults()
ApplyDefaults sets default values for fields that are nil.
type CreateOrderJSONRequest1 ¶
type CreateOrderJSONRequest1 struct {
ID *string `form:"id,omitempty" json:"id,omitempty"`
Product *string `form:"product,omitempty" json:"product,omitempty"`
}
#/paths//orders/post/requestBody/content/application/json/schema
func (*CreateOrderJSONRequest1) ApplyDefaults ¶
func (s *CreateOrderJSONRequest1) ApplyDefaults()
ApplyDefaults sets default values for fields that are nil.
type CreateOrderJSONRequest2 ¶
type CreateOrderJSONRequest2 struct {
Product *string `form:"product,omitempty" json:"product,omitempty"`
}
#/paths//orders/post/requestBody/content/application/merge-patch+json/schema
func (*CreateOrderJSONRequest2) ApplyDefaults ¶
func (s *CreateOrderJSONRequest2) ApplyDefaults()
ApplyDefaults sets default values for fields that are nil.
type CreateOrderJSONRequest3 ¶
type CreateOrderJSONRequest3 = []PostOrdersRequest
#/paths//orders/post/requestBody/content/application/json-patch+json/schema
type CreatePetJSONRequest ¶
type CreatePetJSONRequest struct {
Name *string `form:"name,omitempty" json:"name,omitempty"`
Species *string `form:"species,omitempty" json:"species,omitempty"`
}
#/paths//pets/post/requestBody/content/application/json/schema
func (*CreatePetJSONRequest) ApplyDefaults ¶
func (s *CreatePetJSONRequest) ApplyDefaults()
ApplyDefaults sets default values for fields that are nil.
type CustomQux ¶
type CustomQux struct {
Label *string `form:"label,omitempty" json:"label,omitempty"`
}
#/components/schemas/Qux
func (*CustomQux) ApplyDefaults ¶
func (s *CustomQux) ApplyDefaults()
ApplyDefaults sets default values for fields that are nil.
type GetEntities200Response ¶
type GetEntities200Response = []Widget
#/paths//entities/get/responses/200/content/application/json/schema/properties/data
type GetQuxJSONResponse ¶
type GetQuxJSONResponse struct {
Data *string `form:"data,omitempty" json:"data,omitempty"`
}
#/paths//qux/get/responses/200/content/application/json/schema
func (*GetQuxJSONResponse) ApplyDefaults ¶
func (s *GetQuxJSONResponse) ApplyDefaults()
ApplyDefaults sets default values for fields that are nil.
type GetStatusResponse ¶
type GetStatusResponse struct {
Status *string `form:"status,omitempty" json:"status,omitempty"`
Timestamp *string `form:"timestamp,omitempty" json:"timestamp,omitempty"`
}
#/components/schemas/GetStatusResponse
func (*GetStatusResponse) ApplyDefaults ¶
func (s *GetStatusResponse) ApplyDefaults()
ApplyDefaults sets default values for fields that are nil.
type GetZapJSONResponse ¶
type GetZapJSONResponse struct {
Result *string `form:"result,omitempty" json:"result,omitempty"`
}
#/paths//zap/get/responses/200/content/application/json/schema
func (*GetZapJSONResponse) ApplyDefaults ¶
func (s *GetZapJSONResponse) ApplyDefaults()
ApplyDefaults sets default values for fields that are nil.
type HttpRequestDoer ¶
HttpRequestDoer performs HTTP requests. The standard http.Client implements this interface.
type JSONPatchItem ¶
type JSONPatchItem struct {
Op *string `form:"op,omitempty" json:"op,omitempty"`
Path *string `form:"path,omitempty" json:"path,omitempty"`
}
#/components/schemas/JsonPatch/items
func (*JSONPatchItem) ApplyDefaults ¶
func (s *JSONPatchItem) ApplyDefaults()
ApplyDefaults sets default values for fields that are nil.
type ListEntitiesJSONResponse ¶
type ListEntitiesJSONResponse struct {
Data []Widget `form:"data,omitempty" json:"data,omitempty"`
Metadata string `form:"metadata,omitempty" json:"metadata,omitempty"`
}
#/paths//entities/get/responses/200/content/application/json/schema
func (*ListEntitiesJSONResponse) ApplyDefaults ¶
func (s *ListEntitiesJSONResponse) ApplyDefaults()
ApplyDefaults sets default values for fields that are nil.
type Order ¶
type Order struct {
ID *string `form:"id,omitempty" json:"id,omitempty"`
Product *string `form:"product,omitempty" json:"product,omitempty"`
}
#/components/schemas/Order
func (*Order) ApplyDefaults ¶
func (s *Order) ApplyDefaults()
ApplyDefaults sets default values for fields that are nil.
type PatchResourceJSONResponse2001 ¶
type PatchResourceJSONResponse2001 struct {
// contains filtered or unexported fields
}
func (*PatchResourceJSONResponse2001) ApplyDefaults ¶
func (t *PatchResourceJSONResponse2001) ApplyDefaults()
ApplyDefaults sets default values for fields that are nil.
func (PatchResourceJSONResponse2001) AsPatchResourcesID200ResponseJSONOneOf11 ¶
func (t PatchResourceJSONResponse2001) AsPatchResourcesID200ResponseJSONOneOf11() (PatchResourcesID200ResponseJSONOneOf11, error)
AsPatchResourcesID200ResponseJSONOneOf11 returns the union data inside the PatchResourceJSONResponse2001 as a PatchResourcesID200ResponseJSONOneOf11.
func (PatchResourceJSONResponse2001) AsPatchResourcesID200ResponseJSONOneOf21 ¶
func (t PatchResourceJSONResponse2001) AsPatchResourcesID200ResponseJSONOneOf21() (PatchResourcesID200ResponseJSONOneOf21, error)
AsPatchResourcesID200ResponseJSONOneOf21 returns the union data inside the PatchResourceJSONResponse2001 as a PatchResourcesID200ResponseJSONOneOf21.
func (PatchResourceJSONResponse2001) AsResource ¶
func (t PatchResourceJSONResponse2001) AsResource() (Resource, error)
AsResource returns the union data inside the PatchResourceJSONResponse2001 as a Resource.
func (*PatchResourceJSONResponse2001) FromPatchResourcesID200ResponseJSONOneOf11 ¶
func (t *PatchResourceJSONResponse2001) FromPatchResourcesID200ResponseJSONOneOf11(v PatchResourcesID200ResponseJSONOneOf11) error
FromPatchResourcesID200ResponseJSONOneOf11 overwrites any union data inside the PatchResourceJSONResponse2001 as the provided PatchResourcesID200ResponseJSONOneOf11.
func (*PatchResourceJSONResponse2001) FromPatchResourcesID200ResponseJSONOneOf21 ¶
func (t *PatchResourceJSONResponse2001) FromPatchResourcesID200ResponseJSONOneOf21(v PatchResourcesID200ResponseJSONOneOf21) error
FromPatchResourcesID200ResponseJSONOneOf21 overwrites any union data inside the PatchResourceJSONResponse2001 as the provided PatchResourcesID200ResponseJSONOneOf21.
func (*PatchResourceJSONResponse2001) FromResource ¶
func (t *PatchResourceJSONResponse2001) FromResource(v Resource) error
FromResource overwrites any union data inside the PatchResourceJSONResponse2001 as the provided Resource.
func (PatchResourceJSONResponse2001) MarshalJSON ¶
func (t PatchResourceJSONResponse2001) MarshalJSON() ([]byte, error)
func (*PatchResourceJSONResponse2001) MergePatchResourcesID200ResponseJSONOneOf11 ¶
func (t *PatchResourceJSONResponse2001) MergePatchResourcesID200ResponseJSONOneOf11(v PatchResourcesID200ResponseJSONOneOf11) error
MergePatchResourcesID200ResponseJSONOneOf11 performs a merge with any union data inside the PatchResourceJSONResponse2001, using the provided PatchResourcesID200ResponseJSONOneOf11.
func (*PatchResourceJSONResponse2001) MergePatchResourcesID200ResponseJSONOneOf21 ¶
func (t *PatchResourceJSONResponse2001) MergePatchResourcesID200ResponseJSONOneOf21(v PatchResourcesID200ResponseJSONOneOf21) error
MergePatchResourcesID200ResponseJSONOneOf21 performs a merge with any union data inside the PatchResourceJSONResponse2001, using the provided PatchResourcesID200ResponseJSONOneOf21.
func (*PatchResourceJSONResponse2001) MergeResource ¶
func (t *PatchResourceJSONResponse2001) MergeResource(v Resource) error
MergeResource performs a merge with any union data inside the PatchResourceJSONResponse2001, using the provided Resource.
func (*PatchResourceJSONResponse2001) UnmarshalJSON ¶
func (t *PatchResourceJSONResponse2001) UnmarshalJSON(b []byte) error
type PatchResourceJSONResponse2002 ¶
type PatchResourceJSONResponse2002 struct {
// contains filtered or unexported fields
}
func (*PatchResourceJSONResponse2002) ApplyDefaults ¶
func (t *PatchResourceJSONResponse2002) ApplyDefaults()
ApplyDefaults sets default values for fields that are nil.
func (PatchResourceJSONResponse2002) AsPatchResourcesID200ResponseJSONOneOf12 ¶
func (t PatchResourceJSONResponse2002) AsPatchResourcesID200ResponseJSONOneOf12() (PatchResourcesID200ResponseJSONOneOf12, error)
AsPatchResourcesID200ResponseJSONOneOf12 returns the union data inside the PatchResourceJSONResponse2002 as a PatchResourcesID200ResponseJSONOneOf12.
func (PatchResourceJSONResponse2002) AsPatchResourcesID200ResponseJSONOneOf22 ¶
func (t PatchResourceJSONResponse2002) AsPatchResourcesID200ResponseJSONOneOf22() (PatchResourcesID200ResponseJSONOneOf22, error)
AsPatchResourcesID200ResponseJSONOneOf22 returns the union data inside the PatchResourceJSONResponse2002 as a PatchResourcesID200ResponseJSONOneOf22.
func (PatchResourceJSONResponse2002) AsResource ¶
func (t PatchResourceJSONResponse2002) AsResource() (Resource, error)
AsResource returns the union data inside the PatchResourceJSONResponse2002 as a Resource.
func (*PatchResourceJSONResponse2002) FromPatchResourcesID200ResponseJSONOneOf12 ¶
func (t *PatchResourceJSONResponse2002) FromPatchResourcesID200ResponseJSONOneOf12(v PatchResourcesID200ResponseJSONOneOf12) error
FromPatchResourcesID200ResponseJSONOneOf12 overwrites any union data inside the PatchResourceJSONResponse2002 as the provided PatchResourcesID200ResponseJSONOneOf12.
func (*PatchResourceJSONResponse2002) FromPatchResourcesID200ResponseJSONOneOf22 ¶
func (t *PatchResourceJSONResponse2002) FromPatchResourcesID200ResponseJSONOneOf22(v PatchResourcesID200ResponseJSONOneOf22) error
FromPatchResourcesID200ResponseJSONOneOf22 overwrites any union data inside the PatchResourceJSONResponse2002 as the provided PatchResourcesID200ResponseJSONOneOf22.
func (*PatchResourceJSONResponse2002) FromResource ¶
func (t *PatchResourceJSONResponse2002) FromResource(v Resource) error
FromResource overwrites any union data inside the PatchResourceJSONResponse2002 as the provided Resource.
func (PatchResourceJSONResponse2002) MarshalJSON ¶
func (t PatchResourceJSONResponse2002) MarshalJSON() ([]byte, error)
func (*PatchResourceJSONResponse2002) MergePatchResourcesID200ResponseJSONOneOf12 ¶
func (t *PatchResourceJSONResponse2002) MergePatchResourcesID200ResponseJSONOneOf12(v PatchResourcesID200ResponseJSONOneOf12) error
MergePatchResourcesID200ResponseJSONOneOf12 performs a merge with any union data inside the PatchResourceJSONResponse2002, using the provided PatchResourcesID200ResponseJSONOneOf12.
func (*PatchResourceJSONResponse2002) MergePatchResourcesID200ResponseJSONOneOf22 ¶
func (t *PatchResourceJSONResponse2002) MergePatchResourcesID200ResponseJSONOneOf22(v PatchResourcesID200ResponseJSONOneOf22) error
MergePatchResourcesID200ResponseJSONOneOf22 performs a merge with any union data inside the PatchResourceJSONResponse2002, using the provided PatchResourcesID200ResponseJSONOneOf22.
func (*PatchResourceJSONResponse2002) MergeResource ¶
func (t *PatchResourceJSONResponse2002) MergeResource(v Resource) error
MergeResource performs a merge with any union data inside the PatchResourceJSONResponse2002, using the provided Resource.
func (*PatchResourceJSONResponse2002) UnmarshalJSON ¶
func (t *PatchResourceJSONResponse2002) UnmarshalJSON(b []byte) error
type PatchResourcesID200ResponseJSONOneOf11 ¶
type PatchResourcesID200ResponseJSONOneOf11 = []Resource
#/paths//resources/{id}/patch/responses/200/content/application/json-patch+json/schema/oneOf/1
type PatchResourcesID200ResponseJSONOneOf12 ¶
type PatchResourcesID200ResponseJSONOneOf12 = []Resource
#/paths//resources/{id}/patch/responses/200/content/application/json-patch-query+json/schema/oneOf/1
type PatchResourcesID200ResponseJSONOneOf21 ¶
type PatchResourcesID200ResponseJSONOneOf21 = oapiCodegenTypesPkg.Nullable[string]
#/paths//resources/{id}/patch/responses/200/content/application/json-patch+json/schema/oneOf/2
type PatchResourcesID200ResponseJSONOneOf22 ¶
type PatchResourcesID200ResponseJSONOneOf22 = oapiCodegenTypesPkg.Nullable[string]
#/paths//resources/{id}/patch/responses/200/content/application/json-patch-query+json/schema/oneOf/2
type Pet ¶
type Pet struct {
ID *int `form:"id,omitempty" json:"id,omitempty"`
Name *string `form:"name,omitempty" json:"name,omitempty"`
}
#/components/schemas/Pet
func (*Pet) ApplyDefaults ¶
func (s *Pet) ApplyDefaults()
ApplyDefaults sets default values for fields that are nil.
type PostFooJSONRequest ¶
type PostFooJSONRequest struct {
Value *int `form:"value,omitempty" json:"value,omitempty"`
}
#/paths//foo/post/requestBody/content/application/json/schema
func (*PostFooJSONRequest) ApplyDefaults ¶
func (s *PostFooJSONRequest) ApplyDefaults()
ApplyDefaults sets default values for fields that are nil.
type PostFooJSONResponse ¶
type PostFooJSONResponse struct {
Value1 *Bar `form:"value1,omitempty" json:"value1,omitempty"`
Value2 *Bar2 `form:"value2,omitempty" json:"value2,omitempty"`
}
#/paths//foo/post/responses/200/content/application/json/schema
func (*PostFooJSONResponse) ApplyDefaults ¶
func (s *PostFooJSONResponse) ApplyDefaults()
ApplyDefaults sets default values for fields that are nil.
type PostFooParams ¶
type PostFooParams struct {
// bar (optional)
Bar *string `form:"bar" json:"bar"`
}
PostFooParams defines parameters for PostFoo.
type PostOrdersRequest ¶
type PostOrdersRequest struct {
Op *string `form:"op,omitempty" json:"op,omitempty"`
Path *string `form:"path,omitempty" json:"path,omitempty"`
Value *string `form:"value,omitempty" json:"value,omitempty"`
}
#/paths//orders/post/requestBody/content/application/json-patch+json/schema/items
func (*PostOrdersRequest) ApplyDefaults ¶
func (s *PostOrdersRequest) ApplyDefaults()
ApplyDefaults sets default values for fields that are nil.
type QueryJSONRequest ¶
type QueryJSONRequest struct {
Q *string `form:"q,omitempty" json:"q,omitempty"`
}
#/paths//query/post/requestBody/content/application/json/schema
func (*QueryJSONRequest) ApplyDefaults ¶
func (s *QueryJSONRequest) ApplyDefaults()
ApplyDefaults sets default values for fields that are nil.
type QueryResponse ¶
type QueryResponse struct {
Results []string `form:"results,omitempty" json:"results,omitempty"`
}
#/components/schemas/QueryResponse
func (*QueryResponse) ApplyDefaults ¶
func (s *QueryResponse) ApplyDefaults()
ApplyDefaults sets default values for fields that are nil.
type RequestEditorFn ¶
RequestEditorFn is the function signature for the RequestEditor callback function.
type Resource ¶
type Resource struct {
ID *string `form:"id,omitempty" json:"id,omitempty"`
Name *string `form:"name,omitempty" json:"name,omitempty"`
Status *string `form:"status,omitempty" json:"status,omitempty"`
}
#/components/schemas/Resource
func (*Resource) ApplyDefaults ¶
func (s *Resource) ApplyDefaults()
ApplyDefaults sets default values for fields that are nil.
type ResourceMVO ¶
type ResourceMVO struct {
Name *string `form:"name,omitempty" json:"name,omitempty"`
Status *string `form:"status,omitempty" json:"status,omitempty"`
}
#/components/schemas/Resource_MVO
func (*ResourceMVO) ApplyDefaults ¶
func (s *ResourceMVO) ApplyDefaults()
ApplyDefaults sets default values for fields that are nil.
type SimpleClient ¶
type SimpleClient struct {
*Client
}
SimpleClient wraps Client with typed responses for operations that have unambiguous response types. Methods return the success type directly, and HTTP errors are returned as *ClientHttpError[E] where E is the error type.
func NewSimpleClient ¶
func NewSimpleClient(server string, opts ...ClientOption) (*SimpleClient, error)
NewSimpleClient creates a new SimpleClient which wraps a Client.
func (*SimpleClient) CreateItem ¶
func (c *SimpleClient) CreateItem(ctx context.Context, body createItemJSONRequestBody, reqEditors ...RequestEditorFn) (CreateItemResponse, error)
On success, returns the response body. On HTTP error, returns *ClientHttpError[struct{}].
func (*SimpleClient) CreateOrder ¶
func (c *SimpleClient) CreateOrder(ctx context.Context, body createOrderJSONRequestBody, reqEditors ...RequestEditorFn) (Order, error)
On success, returns the response body. On HTTP error, returns *ClientHttpError[struct{}].
func (*SimpleClient) CreatePet ¶
func (c *SimpleClient) CreatePet(ctx context.Context, body createPetJSONRequestBody, reqEditors ...RequestEditorFn) (Pet, error)
On success, returns the response body. On HTTP error, returns *ClientHttpError[struct{}].
func (*SimpleClient) GetQux ¶
func (c *SimpleClient) GetQux(ctx context.Context, reqEditors ...RequestEditorFn) (map[string]any, error)
On success, returns the response body. On HTTP error, returns *ClientHttpError[struct{}].
func (*SimpleClient) GetStatus ¶
func (c *SimpleClient) GetStatus(ctx context.Context, reqEditors ...RequestEditorFn) (GetStatusResponse, error)
On success, returns the response body. On HTTP error, returns *ClientHttpError[struct{}].
func (*SimpleClient) GetZap ¶
func (c *SimpleClient) GetZap(ctx context.Context, reqEditors ...RequestEditorFn) (map[string]any, error)
On success, returns the response body. On HTTP error, returns *ClientHttpError[struct{}].
func (*SimpleClient) ListEntities ¶
func (c *SimpleClient) ListEntities(ctx context.Context, reqEditors ...RequestEditorFn) (map[string]any, error)
On success, returns the response body. On HTTP error, returns *ClientHttpError[struct{}].
func (*SimpleClient) ListItems ¶
func (c *SimpleClient) ListItems(ctx context.Context, reqEditors ...RequestEditorFn) (ListItemsResponse, error)
On success, returns the response body. On HTTP error, returns *ClientHttpError[struct{}].
func (*SimpleClient) PostFoo ¶
func (c *SimpleClient) PostFoo(ctx context.Context, params *PostFooParams, body postFooJSONRequestBody, reqEditors ...RequestEditorFn) (map[string]any, error)
On success, returns the response body. On HTTP error, returns *ClientHttpError[struct{}].
func (*SimpleClient) Query ¶
func (c *SimpleClient) Query(ctx context.Context, body queryJSONRequestBody, reqEditors ...RequestEditorFn) (QueryResponse, error)
On success, returns the response body. On HTTP error, returns *ClientHttpError[struct{}].