output

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 15, 2026 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetOpenAPISpecJSON

func GetOpenAPISpecJSON() ([]byte, error)

GetOpenAPISpecJSON returns the raw OpenAPI spec as JSON bytes.

func NewCreateItemRequest

func NewCreateItemRequest(server string, body createItemJSONRequestBody) (*http.Request, error)

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

func NewCreateOrderRequest(server string, body createOrderJSONRequestBody) (*http.Request, error)

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

func NewCreatePetRequest(server string, body createPetJSONRequestBody) (*http.Request, error)

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

func NewGetQuxRequest(server string) (*http.Request, error)

NewGetQuxRequest creates a GET request for /qux

func NewGetStatusRequest

func NewGetStatusRequest(server string) (*http.Request, error)

NewGetStatusRequest creates a GET request for /status

func NewGetZapRequest

func NewGetZapRequest(server string) (*http.Request, error)

NewGetZapRequest creates a GET request for /zap

func NewListEntitiesRequest

func NewListEntitiesRequest(server string) (*http.Request, error)

NewListEntitiesRequest creates a GET request for /entities

func NewListItemsRequest

func NewListItemsRequest(server string) (*http.Request, error)

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

func NewPostQuxRequest(server string, body postQuxJSONRequestBody) (*http.Request, error)

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

func NewPostZapRequest(server string, body postZapJSONRequestBody) (*http.Request, error)

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

func NewQueryRequest(server string, body queryJSONRequestBody) (*http.Request, error)

NewQueryRequest creates a POST request for /query with application/json body

func NewQueryRequestWithBody

func NewQueryRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewQueryRequestWithBody creates a POST request for /query with any 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 (c *Client) CreateItemWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

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 (c *Client) CreateOrderWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

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 (c *Client) CreatePetWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetQux

func (c *Client) GetQux(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetStatus

func (c *Client) GetStatus(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetZap

func (c *Client) GetZap(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) ListEntities

func (c *Client) ListEntities(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) ListItems

func (c *Client) ListItems(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

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 (c *Client) PatchResourceWithBody(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

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 (c *Client) PostFooWithBody(ctx context.Context, params *PostFooParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

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 (c *Client) PostQuxWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

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

func (c *Client) PostZapWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) Query

func (c *Client) Query(ctx context.Context, body queryJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

Query makes a POST request to /query with application/json body

func (*Client) QueryWithBody

func (c *Client) QueryWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

type ClientHttpError

type ClientHttpError[E any] struct {
	StatusCode int
	Body       E
	RawBody    []byte
}

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

type ClientOption func(*Client) error

ClientOption allows setting custom parameters during construction.

func WithBaseURL

func WithBaseURL(baseURL string) ClientOption

WithBaseURL overrides the baseURL.

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

type HttpRequestDoer interface {
	Do(req *http.Request) (*http.Response, error)
}

HttpRequestDoer performs HTTP requests. The standard http.Client implements this interface.

type JSONPatch

type JSONPatch = []JSONPatchItem

#/components/schemas/JsonPatch

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 ListItemsResponse

type ListItemsResponse = string

#/components/schemas/ListItemsResponse

type Metadata

type Metadata = string

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

type RequestEditorFn func(ctx context.Context, req *http.Request) error

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{}].

type Widget

type Widget = string

type Zap

type Zap = string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL