api

package
v0.0.0-...-317be3a Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2024 License: MIT Imports: 14 Imported by: 0

README

oapi-codegen -config cfg.yaml ../discriminators.yaml

Documentation

Overview

Package api provides primitives to interact with the openapi HTTP API.

Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.3.0 DO NOT EDIT.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetSwagger

func GetSwagger() (swagger *openapi3.T, err error)

GetSwagger returns the Swagger specification corresponding to the generated code in this file. The external references of Swagger specification are resolved. The logic of resolving external references is tightly connected to "import-mapping" feature. Externally referenced files must be embedded in the corresponding golang packages. Urls can be supported but this task was out of the scope.

func Handler

func Handler(si ServerInterface) http.Handler

Handler creates http.Handler with routing matching OpenAPI spec.

func HandlerFromMux

func HandlerFromMux(si ServerInterface, r *mux.Router) http.Handler

HandlerFromMux creates http.Handler with routing matching OpenAPI spec based on the provided mux.

func HandlerFromMuxWithBaseURL

func HandlerFromMuxWithBaseURL(si ServerInterface, r *mux.Router, baseURL string) http.Handler

func HandlerWithOptions

func HandlerWithOptions(si ServerInterface, options GorillaServerOptions) http.Handler

HandlerWithOptions creates http.Handler with additional options

func PathToRawSpec

func PathToRawSpec(pathToFile string) map[string]func() ([]byte, error)

Constructs a synthetic filesystem for resolving external references when loading openapi specifications.

Types

type ApplicationApprovedEvent

type ApplicationApprovedEvent = BasePurchaseWebhookEvent

ApplicationApprovedEvent Purchase webhook event

type ApplicationDeniedEvent

type ApplicationDeniedEvent = BasePurchaseWebhookEvent

ApplicationDeniedEvent Purchase webhook event

type BaseBuyerWebhookEvent

type BaseBuyerWebhookEvent struct {
	// BuyerId ID of the buyer the event corresponds to.
	BuyerId string `json:"buyer_id"`

	// EventId ID of the event.
	EventId string `json:"event_id"`

	// EventType Type of the webhook event.
	EventType BaseBuyerWebhookEventEventType `json:"event_type"`
}

BaseBuyerWebhookEvent defines model for BaseBuyerWebhookEvent.

type BaseBuyerWebhookEventEventType

type BaseBuyerWebhookEventEventType string

BaseBuyerWebhookEventEventType Type of the webhook event.

const (
	BaseBuyerWebhookEventEventTypeApplicationApproved BaseBuyerWebhookEventEventType = "application_approved"
	BaseBuyerWebhookEventEventTypeApplicationDenied   BaseBuyerWebhookEventEventType = "application_denied"
)

Defines values for BaseBuyerWebhookEventEventType.

type BasePurchaseWebhookEvent

type BasePurchaseWebhookEvent struct {
	// BuyerId ID of the buyer the event corresponds to.
	BuyerId string `json:"buyer_id"`

	// EventId ID of the event.
	EventId string `json:"event_id"`

	// EventType Type of the webhook event.
	EventType BasePurchaseWebhookEventEventType `json:"event_type"`

	// OrderId Provided Partner Order ID.
	OrderId *string `json:"order_id,omitempty"`
}

BasePurchaseWebhookEvent defines model for BasePurchaseWebhookEvent.

type BasePurchaseWebhookEventEventType

type BasePurchaseWebhookEventEventType string

BasePurchaseWebhookEventEventType Type of the webhook event.

const (
	BasePurchaseWebhookEventEventTypeApplicationApproved BasePurchaseWebhookEventEventType = "application_approved"
	BasePurchaseWebhookEventEventTypeApplicationDenied   BasePurchaseWebhookEventEventType = "application_denied"
)

Defines values for BasePurchaseWebhookEventEventType.

type BaseVehicle

type BaseVehicle struct {
	// IdealTerrain A road, river, air... Where does this vehicle thrive?
	IdealTerrain *string `json:"idealTerrain,omitempty"`

	// PowerSource How is the vehicle powered.
	PowerSource *string `json:"powerSource,omitempty"`

	// Range The 95th percentile range of a trip in kilometers.
	Range *int `json:"range,omitempty"`

	// TopSpeed The top speed in kilometers per hour rounded to the nearest integer.
	TopSpeed *int `json:"topSpeed,omitempty"`

	// VehicleType The type of vehicle.
	VehicleType *string `json:"vehicleType,omitempty"`
}

BaseVehicle Vehicle (from [Redocly example](https://redocly.com/docs/resources/discriminator#when-to-use-the-openapi-discriminator))

type BaseWebhookEvent

type BaseWebhookEvent struct {
	// EventId ID of the event.
	EventId string `json:"event_id"`

	// EventType Type of the webhook event.
	EventType BaseWebhookEventEventType `json:"event_type"`
}

BaseWebhookEvent Base webhook event

type BaseWebhookEventEventType

type BaseWebhookEventEventType string

BaseWebhookEventEventType Type of the webhook event.

const (
	ApplicationApproved BaseWebhookEventEventType = "application_approved"
	ApplicationDenied   BaseWebhookEventEventType = "application_denied"
)

Defines values for BaseWebhookEventEventType.

type Cat

type Cat struct {
	Age     *int   `json:"age,omitempty"`
	Hunts   *bool  `json:"hunts,omitempty"`
	PetType string `json:"pet_type"`
}

Cat defines model for Cat.

type CatNoDisc

type CatNoDisc struct {
	Age     *int   `json:"age,omitempty"`
	Hunts   *bool  `json:"hunts,omitempty"`
	PetType string `json:"pet_type"`
}

CatNoDisc defines model for CatNoDisc.

type CustomServer

type CustomServer struct {
	Lock sync.Mutex
}

func NewCustomServer

func NewCustomServer() *CustomServer

type Dog

type Dog struct {
	Bark    *bool     `json:"bark,omitempty"`
	Breed   *DogBreed `json:"breed,omitempty"`
	PetType string    `json:"pet_type"`
}

Dog defines model for Dog.

type DogBreed

type DogBreed string

DogBreed defines model for Dog.Breed.

const (
	DogBreedDingo     DogBreed = "Dingo"
	DogBreedHusky     DogBreed = "Husky"
	DogBreedRetriever DogBreed = "Retriever"
	DogBreedShepherd  DogBreed = "Shepherd"
)

Defines values for DogBreed.

type DogNoDisc

type DogNoDisc struct {
	Bark    *bool           `json:"bark,omitempty"`
	Breed   *DogNoDiscBreed `json:"breed,omitempty"`
	PetType string          `json:"pet_type"`
}

DogNoDisc defines model for DogNoDisc.

type DogNoDiscBreed

type DogNoDiscBreed string

DogNoDiscBreed defines model for DogNoDisc.Breed.

const (
	DogNoDiscBreedDingo     DogNoDiscBreed = "Dingo"
	DogNoDiscBreedHusky     DogNoDiscBreed = "Husky"
	DogNoDiscBreedRetriever DogNoDiscBreed = "Retriever"
	DogNoDiscBreedShepherd  DogNoDiscBreed = "Shepherd"
)

Defines values for DogNoDiscBreed.

type GcsImport

type GcsImport struct {
	GcsBucket *string `json:"gcs_bucket,omitempty"`
	GcsPrefix *string `json:"gcs_prefix,omitempty"`
}

GcsImport Import into Google cloud service

type GorillaServerOptions

type GorillaServerOptions struct {
	BaseURL          string
	BaseRouter       *mux.Router
	Middlewares      []MiddlewareFunc
	ErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error)
}

type InvalidParamFormatError

type InvalidParamFormatError struct {
	ParamName string
	Err       error
}

func (*InvalidParamFormatError) Error

func (e *InvalidParamFormatError) Error() string

func (*InvalidParamFormatError) Unwrap

func (e *InvalidParamFormatError) Unwrap() error

type MappingOfSchemaNames200Response

type MappingOfSchemaNames200Response struct {
}

func (MappingOfSchemaNames200Response) VisitMappingOfSchemaNamesResponse

func (response MappingOfSchemaNames200Response) VisitMappingOfSchemaNamesResponse(w http.ResponseWriter) error

type MappingOfSchemaNamesJSONBody

type MappingOfSchemaNamesJSONBody struct {
	// contains filtered or unexported fields
}

MappingOfSchemaNamesJSONBody defines parameters for MappingOfSchemaNames.

type MappingOfSchemaNamesJSONRequestBody

type MappingOfSchemaNamesJSONRequestBody MappingOfSchemaNamesJSONBody

MappingOfSchemaNamesJSONRequestBody defines body for MappingOfSchemaNames for application/json ContentType.

type MappingOfSchemaNamesRequestObject

type MappingOfSchemaNamesRequestObject struct {
	Body *MappingOfSchemaNamesJSONRequestBody
}

type MappingOfSchemaNamesResponseObject

type MappingOfSchemaNamesResponseObject interface {
	VisitMappingOfSchemaNamesResponse(w http.ResponseWriter) error
}

type MappingWithDuplicateSchemas201Response

type MappingWithDuplicateSchemas201Response struct {
}

func (MappingWithDuplicateSchemas201Response) VisitMappingWithDuplicateSchemasResponse

func (response MappingWithDuplicateSchemas201Response) VisitMappingWithDuplicateSchemasResponse(w http.ResponseWriter) error

type MappingWithDuplicateSchemasJSONBody

type MappingWithDuplicateSchemasJSONBody struct {
	DiscrimValue *MappingWithDuplicateSchemasJSONBodyDiscrimValue `json:"discrimValue,omitempty"`
	// contains filtered or unexported fields
}

MappingWithDuplicateSchemasJSONBody defines parameters for MappingWithDuplicateSchemas.

type MappingWithDuplicateSchemasJSONBodyDiscrimValue

type MappingWithDuplicateSchemasJSONBodyDiscrimValue string

MappingWithDuplicateSchemasJSONBodyDiscrimValue defines parameters for MappingWithDuplicateSchemas.

type MappingWithDuplicateSchemasJSONRequestBody

type MappingWithDuplicateSchemasJSONRequestBody MappingWithDuplicateSchemasJSONBody

MappingWithDuplicateSchemasJSONRequestBody defines body for MappingWithDuplicateSchemas for application/json ContentType.

type MappingWithDuplicateSchemasRequestObject

type MappingWithDuplicateSchemasRequestObject struct {
	Body *MappingWithDuplicateSchemasJSONRequestBody
}

type MappingWithDuplicateSchemasResponseObject

type MappingWithDuplicateSchemasResponseObject interface {
	VisitMappingWithDuplicateSchemasResponse(w http.ResponseWriter) error
}

type MiddlewareFunc

type MiddlewareFunc func(http.Handler) http.Handler

type Object1

type Object1 struct {
	A *string `json:"a,omitempty"`
	B *string `json:"b,omitempty"`
}

Object1 First type of object

type Object2

type Object2 struct {
	C *string `json:"c,omitempty"`
	D *string `json:"d,omitempty"`
}

Object2 Second type of object

type OneOfWithImproperlyPlacedDiscriminator200Response

type OneOfWithImproperlyPlacedDiscriminator200Response struct {
}

func (OneOfWithImproperlyPlacedDiscriminator200Response) VisitOneOfWithImproperlyPlacedDiscriminatorResponse

func (response OneOfWithImproperlyPlacedDiscriminator200Response) VisitOneOfWithImproperlyPlacedDiscriminatorResponse(w http.ResponseWriter) error

type OneOfWithImproperlyPlacedDiscriminatorJSONBody

type OneOfWithImproperlyPlacedDiscriminatorJSONBody struct {
	ConnectorProperties *OneOfWithImproperlyPlacedDiscriminatorJSONBody_ConnectorProperties `json:"connector_properties,omitempty"`
	ConnectorType       *OneOfWithImproperlyPlacedDiscriminatorJSONBodyConnectorType        `json:"connector_type,omitempty"`
}

OneOfWithImproperlyPlacedDiscriminatorJSONBody defines parameters for OneOfWithImproperlyPlacedDiscriminator.

type OneOfWithImproperlyPlacedDiscriminatorJSONBodyConnectorType

type OneOfWithImproperlyPlacedDiscriminatorJSONBodyConnectorType string

OneOfWithImproperlyPlacedDiscriminatorJSONBodyConnectorType defines parameters for OneOfWithImproperlyPlacedDiscriminator.

const (
	OneOfWithImproperlyPlacedDiscriminatorJSONBodyConnectorTypeGcsImport OneOfWithImproperlyPlacedDiscriminatorJSONBodyConnectorType = "gcsImport"
	OneOfWithImproperlyPlacedDiscriminatorJSONBodyConnectorTypeS3Import  OneOfWithImproperlyPlacedDiscriminatorJSONBodyConnectorType = "s3Import"
)

Defines values for OneOfWithImproperlyPlacedDiscriminatorJSONBodyConnectorType.

type OneOfWithImproperlyPlacedDiscriminatorJSONBody_ConnectorProperties

type OneOfWithImproperlyPlacedDiscriminatorJSONBody_ConnectorProperties struct {
	// contains filtered or unexported fields
}

OneOfWithImproperlyPlacedDiscriminatorJSONBody_ConnectorProperties defines parameters for OneOfWithImproperlyPlacedDiscriminator.

type OneOfWithImproperlyPlacedDiscriminatorJSONRequestBody

type OneOfWithImproperlyPlacedDiscriminatorJSONRequestBody OneOfWithImproperlyPlacedDiscriminatorJSONBody

OneOfWithImproperlyPlacedDiscriminatorJSONRequestBody defines body for OneOfWithImproperlyPlacedDiscriminator for application/json ContentType.

type OneOfWithImproperlyPlacedDiscriminatorRequestObject

type OneOfWithImproperlyPlacedDiscriminatorRequestObject struct {
	Body *OneOfWithImproperlyPlacedDiscriminatorJSONRequestBody
}

type OneOfWithImproperlyPlacedDiscriminatorResponseObject

type OneOfWithImproperlyPlacedDiscriminatorResponseObject interface {
	VisitOneOfWithImproperlyPlacedDiscriminatorResponse(w http.ResponseWriter) error
}

type OneOfWithNestedAllOfAndEmbeddedDiscriminator200Response

type OneOfWithNestedAllOfAndEmbeddedDiscriminator200Response struct {
}

func (OneOfWithNestedAllOfAndEmbeddedDiscriminator200Response) VisitOneOfWithNestedAllOfAndEmbeddedDiscriminatorResponse

func (response OneOfWithNestedAllOfAndEmbeddedDiscriminator200Response) VisitOneOfWithNestedAllOfAndEmbeddedDiscriminatorResponse(w http.ResponseWriter) error

type OneOfWithNestedAllOfAndEmbeddedDiscriminatorJSONBody

type OneOfWithNestedAllOfAndEmbeddedDiscriminatorJSONBody struct {
	// contains filtered or unexported fields
}

OneOfWithNestedAllOfAndEmbeddedDiscriminatorJSONBody defines parameters for OneOfWithNestedAllOfAndEmbeddedDiscriminator.

type OneOfWithNestedAllOfAndEmbeddedDiscriminatorJSONRequestBody

type OneOfWithNestedAllOfAndEmbeddedDiscriminatorJSONRequestBody OneOfWithNestedAllOfAndEmbeddedDiscriminatorJSONBody

OneOfWithNestedAllOfAndEmbeddedDiscriminatorJSONRequestBody defines body for OneOfWithNestedAllOfAndEmbeddedDiscriminator for application/json ContentType.

type OneOfWithNestedAllOfAndEmbeddedDiscriminatorRequestObject

type OneOfWithNestedAllOfAndEmbeddedDiscriminatorRequestObject struct {
	Body *OneOfWithNestedAllOfAndEmbeddedDiscriminatorJSONRequestBody
}

type OneOfWithNestedAllOfAndEmbeddedDiscriminatorResponseObject

type OneOfWithNestedAllOfAndEmbeddedDiscriminatorResponseObject interface {
	VisitOneOfWithNestedAllOfAndEmbeddedDiscriminatorResponse(w http.ResponseWriter) error
}

type OneOfWithNestedAllOfAndTopLevelDiscriminator200Response

type OneOfWithNestedAllOfAndTopLevelDiscriminator200Response struct {
}

func (OneOfWithNestedAllOfAndTopLevelDiscriminator200Response) VisitOneOfWithNestedAllOfAndTopLevelDiscriminatorResponse

func (response OneOfWithNestedAllOfAndTopLevelDiscriminator200Response) VisitOneOfWithNestedAllOfAndTopLevelDiscriminatorResponse(w http.ResponseWriter) error

type OneOfWithNestedAllOfAndTopLevelDiscriminatorJSONBody

type OneOfWithNestedAllOfAndTopLevelDiscriminatorJSONBody struct {
	// contains filtered or unexported fields
}

OneOfWithNestedAllOfAndTopLevelDiscriminatorJSONBody defines parameters for OneOfWithNestedAllOfAndTopLevelDiscriminator.

type OneOfWithNestedAllOfAndTopLevelDiscriminatorJSONRequestBody

type OneOfWithNestedAllOfAndTopLevelDiscriminatorJSONRequestBody OneOfWithNestedAllOfAndTopLevelDiscriminatorJSONBody

OneOfWithNestedAllOfAndTopLevelDiscriminatorJSONRequestBody defines body for OneOfWithNestedAllOfAndTopLevelDiscriminator for application/json ContentType.

type OneOfWithNestedAllOfAndTopLevelDiscriminatorRequestObject

type OneOfWithNestedAllOfAndTopLevelDiscriminatorRequestObject struct {
	Body *OneOfWithNestedAllOfAndTopLevelDiscriminatorJSONRequestBody
}

type OneOfWithNestedAllOfAndTopLevelDiscriminatorResponseObject

type OneOfWithNestedAllOfAndTopLevelDiscriminatorResponseObject interface {
	VisitOneOfWithNestedAllOfAndTopLevelDiscriminatorResponse(w http.ResponseWriter) error
}

type OneOfWithNestedOneOfAndEmbeddedDiscriminator200Response

type OneOfWithNestedOneOfAndEmbeddedDiscriminator200Response struct {
}

func (OneOfWithNestedOneOfAndEmbeddedDiscriminator200Response) VisitOneOfWithNestedOneOfAndEmbeddedDiscriminatorResponse

func (response OneOfWithNestedOneOfAndEmbeddedDiscriminator200Response) VisitOneOfWithNestedOneOfAndEmbeddedDiscriminatorResponse(w http.ResponseWriter) error

type OneOfWithNestedOneOfAndEmbeddedDiscriminatorJSONBody

type OneOfWithNestedOneOfAndEmbeddedDiscriminatorJSONBody struct {
	Config *OneOfWithNestedOneOfAndEmbeddedDiscriminatorJSONBody_Config `json:"config,omitempty"`
}

OneOfWithNestedOneOfAndEmbeddedDiscriminatorJSONBody defines parameters for OneOfWithNestedOneOfAndEmbeddedDiscriminator.

type OneOfWithNestedOneOfAndEmbeddedDiscriminatorJSONBodyConfig2

type OneOfWithNestedOneOfAndEmbeddedDiscriminatorJSONBodyConfig2 struct {
	// contains filtered or unexported fields
}

OneOfWithNestedOneOfAndEmbeddedDiscriminatorJSONBodyConfig2 defines parameters for OneOfWithNestedOneOfAndEmbeddedDiscriminator.

type OneOfWithNestedOneOfAndEmbeddedDiscriminatorJSONBody_Config

type OneOfWithNestedOneOfAndEmbeddedDiscriminatorJSONBody_Config struct {
	// contains filtered or unexported fields
}

OneOfWithNestedOneOfAndEmbeddedDiscriminatorJSONBody_Config defines parameters for OneOfWithNestedOneOfAndEmbeddedDiscriminator.

type OneOfWithNestedOneOfAndEmbeddedDiscriminatorJSONRequestBody

type OneOfWithNestedOneOfAndEmbeddedDiscriminatorJSONRequestBody OneOfWithNestedOneOfAndEmbeddedDiscriminatorJSONBody

OneOfWithNestedOneOfAndEmbeddedDiscriminatorJSONRequestBody defines body for OneOfWithNestedOneOfAndEmbeddedDiscriminator for application/json ContentType.

type OneOfWithNestedOneOfAndEmbeddedDiscriminatorRequestObject

type OneOfWithNestedOneOfAndEmbeddedDiscriminatorRequestObject struct {
	Body *OneOfWithNestedOneOfAndEmbeddedDiscriminatorJSONRequestBody
}

type OneOfWithNestedOneOfAndEmbeddedDiscriminatorResponseObject

type OneOfWithNestedOneOfAndEmbeddedDiscriminatorResponseObject interface {
	VisitOneOfWithNestedOneOfAndEmbeddedDiscriminatorResponse(w http.ResponseWriter) error
}

type OneOfWithTopLevelDiscriminatorAndMapping200Response

type OneOfWithTopLevelDiscriminatorAndMapping200Response struct {
}

func (OneOfWithTopLevelDiscriminatorAndMapping200Response) VisitOneOfWithTopLevelDiscriminatorAndMappingResponse

func (response OneOfWithTopLevelDiscriminatorAndMapping200Response) VisitOneOfWithTopLevelDiscriminatorAndMappingResponse(w http.ResponseWriter) error

type OneOfWithTopLevelDiscriminatorAndMappingJSONBody

type OneOfWithTopLevelDiscriminatorAndMappingJSONBody struct {
	// contains filtered or unexported fields
}

OneOfWithTopLevelDiscriminatorAndMappingJSONBody defines parameters for OneOfWithTopLevelDiscriminatorAndMapping.

type OneOfWithTopLevelDiscriminatorAndMappingJSONRequestBody

type OneOfWithTopLevelDiscriminatorAndMappingJSONRequestBody OneOfWithTopLevelDiscriminatorAndMappingJSONBody

OneOfWithTopLevelDiscriminatorAndMappingJSONRequestBody defines body for OneOfWithTopLevelDiscriminatorAndMapping for application/json ContentType.

type OneOfWithTopLevelDiscriminatorAndMappingRequestObject

type OneOfWithTopLevelDiscriminatorAndMappingRequestObject struct {
	Body *OneOfWithTopLevelDiscriminatorAndMappingJSONRequestBody
}

type OneOfWithTopLevelDiscriminatorAndMappingResponseObject

type OneOfWithTopLevelDiscriminatorAndMappingResponseObject interface {
	VisitOneOfWithTopLevelDiscriminatorAndMappingResponse(w http.ResponseWriter) error
}

type OneOfWithTopLevelDiscriminatorNoMapping200Response

type OneOfWithTopLevelDiscriminatorNoMapping200Response struct {
}

func (OneOfWithTopLevelDiscriminatorNoMapping200Response) VisitOneOfWithTopLevelDiscriminatorNoMappingResponse

func (response OneOfWithTopLevelDiscriminatorNoMapping200Response) VisitOneOfWithTopLevelDiscriminatorNoMappingResponse(w http.ResponseWriter) error

type OneOfWithTopLevelDiscriminatorNoMappingJSONBody

type OneOfWithTopLevelDiscriminatorNoMappingJSONBody struct {
	// contains filtered or unexported fields
}

OneOfWithTopLevelDiscriminatorNoMappingJSONBody defines parameters for OneOfWithTopLevelDiscriminatorNoMapping.

type OneOfWithTopLevelDiscriminatorNoMappingJSONRequestBody

type OneOfWithTopLevelDiscriminatorNoMappingJSONRequestBody OneOfWithTopLevelDiscriminatorNoMappingJSONBody

OneOfWithTopLevelDiscriminatorNoMappingJSONRequestBody defines body for OneOfWithTopLevelDiscriminatorNoMapping for application/json ContentType.

type OneOfWithTopLevelDiscriminatorNoMappingRequestObject

type OneOfWithTopLevelDiscriminatorNoMappingRequestObject struct {
	Body *OneOfWithTopLevelDiscriminatorNoMappingJSONRequestBody
}

type OneOfWithTopLevelDiscriminatorNoMappingResponseObject

type OneOfWithTopLevelDiscriminatorNoMappingResponseObject interface {
	VisitOneOfWithTopLevelDiscriminatorNoMappingResponse(w http.ResponseWriter) error
}

type OptionOneNoDisc

type OptionOneNoDisc struct {
	Discrim   string   `json:"discrim"`
	Optionone *float32 `json:"optionone,omitempty"`
}

OptionOneNoDisc Option one no discriminator

type OptionThreeNoDisc

type OptionThreeNoDisc struct {
	Discrim     string  `json:"discrim"`
	Optionthree *string `json:"optionthree,omitempty"`
}

OptionThreeNoDisc Option three no discriminator

type OptionTwoNoDisc

type OptionTwoNoDisc struct {
	Discrim   string  `json:"discrim"`
	Optiontwo *string `json:"optiontwo,omitempty"`
}

OptionTwoNoDisc Option two no discriminator

type Pet

type Pet struct {
	PetType string `json:"pet_type"`
}

Pet Definition of a pet

type PetNoDisc

type PetNoDisc struct {
	PetType string `json:"pet_type"`
}

PetNoDisc Pet with no discriminator

type PotentiallyUndefinedFormData200Response

type PotentiallyUndefinedFormData200Response struct {
}

func (PotentiallyUndefinedFormData200Response) VisitPotentiallyUndefinedFormDataResponse

func (response PotentiallyUndefinedFormData200Response) VisitPotentiallyUndefinedFormDataResponse(w http.ResponseWriter) error

type PotentiallyUndefinedFormDataJSONBody

type PotentiallyUndefinedFormDataJSONBody struct {
	// contains filtered or unexported fields
}

PotentiallyUndefinedFormDataJSONBody defines parameters for PotentiallyUndefinedFormData.

type PotentiallyUndefinedFormDataJSONRequestBody

type PotentiallyUndefinedFormDataJSONRequestBody PotentiallyUndefinedFormDataJSONBody

PotentiallyUndefinedFormDataJSONRequestBody defines body for PotentiallyUndefinedFormData for application/json ContentType.

type PotentiallyUndefinedFormDataRequestObject

type PotentiallyUndefinedFormDataRequestObject struct {
	Body *PotentiallyUndefinedFormDataJSONRequestBody
}

type PotentiallyUndefinedFormDataResponseObject

type PotentiallyUndefinedFormDataResponseObject interface {
	VisitPotentiallyUndefinedFormDataResponse(w http.ResponseWriter) error
}

type RedoclyQuirk200Response

type RedoclyQuirk200Response struct {
}

func (RedoclyQuirk200Response) VisitRedoclyQuirkResponse

func (response RedoclyQuirk200Response) VisitRedoclyQuirkResponse(w http.ResponseWriter) error

type RedoclyQuirkJSONBody

type RedoclyQuirkJSONBody struct {
	// SomeOtherProperty Some other property that should render alongside the discriminated property
	SomeOtherProperty *string `json:"some_other_property,omitempty"`

	// Vehicle Vehicle (from [Redocly example](https://redocly.com/docs/resources/discriminator#when-to-use-the-openapi-discriminator))
	Vehicle *BaseVehicle `json:"vehicle,omitempty"`
}

RedoclyQuirkJSONBody defines parameters for RedoclyQuirk.

type RedoclyQuirkJSONRequestBody

type RedoclyQuirkJSONRequestBody RedoclyQuirkJSONBody

RedoclyQuirkJSONRequestBody defines body for RedoclyQuirk for application/json ContentType.

type RedoclyQuirkRequestObject

type RedoclyQuirkRequestObject struct {
	Body *RedoclyQuirkJSONRequestBody
}

type RedoclyQuirkResponseObject

type RedoclyQuirkResponseObject interface {
	VisitRedoclyQuirkResponse(w http.ResponseWriter) error
}

type RequiredHeaderError

type RequiredHeaderError struct {
	ParamName string
	Err       error
}

func (*RequiredHeaderError) Error

func (e *RequiredHeaderError) Error() string

func (*RequiredHeaderError) Unwrap

func (e *RequiredHeaderError) Unwrap() error

type RequiredParamError

type RequiredParamError struct {
	ParamName string
}

func (*RequiredParamError) Error

func (e *RequiredParamError) Error() string

type S3Import

type S3Import struct {
	S3Bucket *string `json:"s3_bucket,omitempty"`
	S3Prefix *string `json:"s3_prefix,omitempty"`
}

S3Import Import into S3

type ServerInterface

type ServerInterface interface {
	// oneOf with discriminator and mapping
	// (PATCH /discriminator-with-mapping)
	OneOfWithTopLevelDiscriminatorAndMapping(w http.ResponseWriter, r *http.Request)
	// oneOf with top-level discriminator (no mapping)
	// (PATCH /discriminator-with-no-mapping)
	OneOfWithTopLevelDiscriminatorNoMapping(w http.ResponseWriter, r *http.Request)
	// oneOf request with a nested allOf and embedded discriminator
	// (PATCH /embedded-discriminator)
	OneOfWithNestedAllOfAndEmbeddedDiscriminator(w http.ResponseWriter, r *http.Request)
	// oneOf with a discriminator that is referencing a property up a level
	// (PATCH /improper-discriminator-placement)
	OneOfWithImproperlyPlacedDiscriminator(w http.ResponseWriter, r *http.Request)
	// Discriminator with a schema name mapping
	// (PATCH /mapping-of-schema-names)
	MappingOfSchemaNames(w http.ResponseWriter, r *http.Request)
	// Handle a schema with duplicate mapping schemas
	// (PATCH /mapping-with-duplicate-schemas)
	MappingWithDuplicateSchemas(w http.ResponseWriter, r *http.Request)
	// oneOf request with a nested oneOf, and embedded discriminator
	// (PATCH /nested-one-of-object-with-nested-one-of)
	OneOfWithNestedOneOfAndEmbeddedDiscriminator(w http.ResponseWriter, r *http.Request)
	// oneOf request with a nested allOf and top level discriminator
	// (PATCH /oneof-allof-top-level-disc)
	OneOfWithNestedAllOfAndTopLevelDiscriminator(w http.ResponseWriter, r *http.Request)
	// Handling for potentially undefined formData
	// (POST /potentially-undefined-formData)
	PotentiallyUndefinedFormData(w http.ResponseWriter, r *http.Request)
	// Discriminator without `anyOf` or `oneOf` that Redocly supports
	// (PATCH /redocly-flavored-discriminator)
	RedoclyQuirk(w http.ResponseWriter, r *http.Request)
}

ServerInterface represents all server handlers.

func NewStrictHandler

func NewStrictHandler(ssi StrictServerInterface, middlewares []StrictMiddlewareFunc) ServerInterface

func NewStrictHandlerWithOptions

func NewStrictHandlerWithOptions(ssi StrictServerInterface, middlewares []StrictMiddlewareFunc, options StrictHTTPServerOptions) ServerInterface

type ServerInterfaceWrapper

type ServerInterfaceWrapper struct {
	Handler            ServerInterface
	HandlerMiddlewares []MiddlewareFunc
	ErrorHandlerFunc   func(w http.ResponseWriter, r *http.Request, err error)
}

ServerInterfaceWrapper converts contexts to parameters.

func (*ServerInterfaceWrapper) MappingOfSchemaNames

func (siw *ServerInterfaceWrapper) MappingOfSchemaNames(w http.ResponseWriter, r *http.Request)

MappingOfSchemaNames operation middleware

func (*ServerInterfaceWrapper) MappingWithDuplicateSchemas

func (siw *ServerInterfaceWrapper) MappingWithDuplicateSchemas(w http.ResponseWriter, r *http.Request)

MappingWithDuplicateSchemas operation middleware

func (*ServerInterfaceWrapper) OneOfWithImproperlyPlacedDiscriminator

func (siw *ServerInterfaceWrapper) OneOfWithImproperlyPlacedDiscriminator(w http.ResponseWriter, r *http.Request)

OneOfWithImproperlyPlacedDiscriminator operation middleware

func (*ServerInterfaceWrapper) OneOfWithNestedAllOfAndEmbeddedDiscriminator

func (siw *ServerInterfaceWrapper) OneOfWithNestedAllOfAndEmbeddedDiscriminator(w http.ResponseWriter, r *http.Request)

OneOfWithNestedAllOfAndEmbeddedDiscriminator operation middleware

func (*ServerInterfaceWrapper) OneOfWithNestedAllOfAndTopLevelDiscriminator

func (siw *ServerInterfaceWrapper) OneOfWithNestedAllOfAndTopLevelDiscriminator(w http.ResponseWriter, r *http.Request)

OneOfWithNestedAllOfAndTopLevelDiscriminator operation middleware

func (*ServerInterfaceWrapper) OneOfWithNestedOneOfAndEmbeddedDiscriminator

func (siw *ServerInterfaceWrapper) OneOfWithNestedOneOfAndEmbeddedDiscriminator(w http.ResponseWriter, r *http.Request)

OneOfWithNestedOneOfAndEmbeddedDiscriminator operation middleware

func (*ServerInterfaceWrapper) OneOfWithTopLevelDiscriminatorAndMapping

func (siw *ServerInterfaceWrapper) OneOfWithTopLevelDiscriminatorAndMapping(w http.ResponseWriter, r *http.Request)

OneOfWithTopLevelDiscriminatorAndMapping operation middleware

func (*ServerInterfaceWrapper) OneOfWithTopLevelDiscriminatorNoMapping

func (siw *ServerInterfaceWrapper) OneOfWithTopLevelDiscriminatorNoMapping(w http.ResponseWriter, r *http.Request)

OneOfWithTopLevelDiscriminatorNoMapping operation middleware

func (*ServerInterfaceWrapper) PotentiallyUndefinedFormData

func (siw *ServerInterfaceWrapper) PotentiallyUndefinedFormData(w http.ResponseWriter, r *http.Request)

PotentiallyUndefinedFormData operation middleware

func (*ServerInterfaceWrapper) RedoclyQuirk

func (siw *ServerInterfaceWrapper) RedoclyQuirk(w http.ResponseWriter, r *http.Request)

RedoclyQuirk operation middleware

type StrictHTTPServerOptions

type StrictHTTPServerOptions struct {
	RequestErrorHandlerFunc  func(w http.ResponseWriter, r *http.Request, err error)
	ResponseErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error)
}

type StrictServerInterface

type StrictServerInterface interface {
	// oneOf with discriminator and mapping
	// (PATCH /discriminator-with-mapping)
	OneOfWithTopLevelDiscriminatorAndMapping(ctx context.Context, request OneOfWithTopLevelDiscriminatorAndMappingRequestObject) (OneOfWithTopLevelDiscriminatorAndMappingResponseObject, error)
	// oneOf with top-level discriminator (no mapping)
	// (PATCH /discriminator-with-no-mapping)
	OneOfWithTopLevelDiscriminatorNoMapping(ctx context.Context, request OneOfWithTopLevelDiscriminatorNoMappingRequestObject) (OneOfWithTopLevelDiscriminatorNoMappingResponseObject, error)
	// oneOf request with a nested allOf and embedded discriminator
	// (PATCH /embedded-discriminator)
	OneOfWithNestedAllOfAndEmbeddedDiscriminator(ctx context.Context, request OneOfWithNestedAllOfAndEmbeddedDiscriminatorRequestObject) (OneOfWithNestedAllOfAndEmbeddedDiscriminatorResponseObject, error)
	// oneOf with a discriminator that is referencing a property up a level
	// (PATCH /improper-discriminator-placement)
	OneOfWithImproperlyPlacedDiscriminator(ctx context.Context, request OneOfWithImproperlyPlacedDiscriminatorRequestObject) (OneOfWithImproperlyPlacedDiscriminatorResponseObject, error)
	// Discriminator with a schema name mapping
	// (PATCH /mapping-of-schema-names)
	MappingOfSchemaNames(ctx context.Context, request MappingOfSchemaNamesRequestObject) (MappingOfSchemaNamesResponseObject, error)
	// Handle a schema with duplicate mapping schemas
	// (PATCH /mapping-with-duplicate-schemas)
	MappingWithDuplicateSchemas(ctx context.Context, request MappingWithDuplicateSchemasRequestObject) (MappingWithDuplicateSchemasResponseObject, error)
	// oneOf request with a nested oneOf, and embedded discriminator
	// (PATCH /nested-one-of-object-with-nested-one-of)
	OneOfWithNestedOneOfAndEmbeddedDiscriminator(ctx context.Context, request OneOfWithNestedOneOfAndEmbeddedDiscriminatorRequestObject) (OneOfWithNestedOneOfAndEmbeddedDiscriminatorResponseObject, error)
	// oneOf request with a nested allOf and top level discriminator
	// (PATCH /oneof-allof-top-level-disc)
	OneOfWithNestedAllOfAndTopLevelDiscriminator(ctx context.Context, request OneOfWithNestedAllOfAndTopLevelDiscriminatorRequestObject) (OneOfWithNestedAllOfAndTopLevelDiscriminatorResponseObject, error)
	// Handling for potentially undefined formData
	// (POST /potentially-undefined-formData)
	PotentiallyUndefinedFormData(ctx context.Context, request PotentiallyUndefinedFormDataRequestObject) (PotentiallyUndefinedFormDataResponseObject, error)
	// Discriminator without `anyOf` or `oneOf` that Redocly supports
	// (PATCH /redocly-flavored-discriminator)
	RedoclyQuirk(ctx context.Context, request RedoclyQuirkRequestObject) (RedoclyQuirkResponseObject, error)
}

StrictServerInterface represents all server handlers.

type TooManyValuesForParamError

type TooManyValuesForParamError struct {
	ParamName string
	Count     int
}

func (*TooManyValuesForParamError) Error

type UnescapedCookieParamError

type UnescapedCookieParamError struct {
	ParamName string
	Err       error
}

func (*UnescapedCookieParamError) Error

func (e *UnescapedCookieParamError) Error() string

func (*UnescapedCookieParamError) Unwrap

func (e *UnescapedCookieParamError) Unwrap() error

type UnmarshalingParamError

type UnmarshalingParamError struct {
	ParamName string
	Err       error
}

func (*UnmarshalingParamError) Error

func (e *UnmarshalingParamError) Error() string

func (*UnmarshalingParamError) Unwrap

func (e *UnmarshalingParamError) Unwrap() error

Jump to

Keyboard shortcuts

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