Documentation ¶
Overview ¶
Package openapimap provides code to map openapi config from the proto messages to openapiv3 types.
Index ¶
- func AnyMap(items map[string]*structpb.Value) map[string]any
- func AnySlice(items []*structpb.Value) []any
- func Components(components *openapi.Components) (*openapiv3.Components, error)
- func Discriminator(value *openapi.Discriminator) (*openapiv3.Discriminator, error)
- func Document(doc *openapi.Document) (*openapiv3.Document, error)
- func EncodingMap(encodings map[string]*openapi.Encoding) (map[string]*openapiv3.Encoding, error)
- func Extensions(table map[string]*structpb.Value) (map[string]any, error)
- func ExternalDoc(doc *openapi.ExternalDocumentation) (*openapiv3.ExternalDocumentation, error)
- func HeaderMap(headerMap map[string]*openapi.Header) (map[string]*openapiv3.Ref[openapiv3.Header], error)
- func Info(info *openapi.Info) (*openapiv3.Info, error)
- func LinksMap(links map[string]*openapi.Link) (map[string]*openapiv3.Ref[openapiv3.Link], error)
- func MakeReference[T any](ref *openapi.Reference) *openapiv3.Ref[T]
- func MediaTypes(mediaTypes map[string]*openapi.MediaType) (map[string]*openapiv3.MediaType, error)
- func OAuthFlow(flow *openapi.SecurityScheme_OAuthFlow) (*openapiv3.OAuthFlow, error)
- func OAuthFlows(flows *openapi.SecurityScheme_OAuthFlows) (*openapiv3.OAuthFlows, error)
- func Operation(operation *openapi.Operation) (*openapiv3.Operation, error)
- func Parameter(paramFromProto *openapi.Parameter) (*openapiv3.Ref[openapiv3.Parameter], error)
- func ParameterMap(parameterMap map[string]*openapi.Parameter) (map[string]*openapiv3.Ref[openapiv3.Parameter], error)
- func ParameterSlice(parameters []*openapi.Parameter) ([]*openapiv3.Ref[openapiv3.Parameter], error)
- func RequestBody(requestBody *openapi.RequestBody) (*openapiv3.Ref[openapiv3.RequestBody], error)
- func RequestBodyMap(requestBodies map[string]*openapi.RequestBody) (map[string]*openapiv3.Ref[openapiv3.RequestBody], error)
- func Response(response *openapi.Response) (*openapiv3.Ref[openapiv3.Response], error)
- func ResponseMap(responses map[string]*openapi.Response) (map[string]*openapiv3.Ref[openapiv3.Response], error)
- func Schema(schema *openapi.Schema) (*openapiv3.Schema, error)
- func SchemaItemSpec(spec *openapi.Schema_Item) (*openapiv3.ItemSpec, error)
- func SchemaList(schemas []*openapi.Schema) ([]*openapiv3.Schema, error)
- func SchemaMap(spec map[string]*openapi.Schema) (map[string]*openapiv3.Schema, error)
- func SecurityRequirementSlice(items []*openapi.SecurityRequirement) []map[string][]string
- func SecurityScheme(scheme *openapi.SecurityScheme) (*openapiv3.Ref[openapiv3.SecurityScheme], error)
- func SecuritySchemeMap(securitySchemes map[string]*openapi.SecurityScheme) (map[string]*openapiv3.Ref[openapiv3.SecurityScheme], error)
- func Server(server *openapi.Server) (*openapiv3.Server, error)
- func ServerSlice(servers []*openapi.Server) ([]*openapiv3.Server, error)
- func StructuredExample(example *openapi.Example) (*openapiv3.Ref[openapiv3.Example], error)
- func StructuredExampleMap(examples map[string]*openapi.Example) (map[string]*openapiv3.Ref[openapiv3.Example], error)
- func Tags(tags []*openapi.Tag) ([]*openapiv3.Tag, error)
- func Type(types []openapi.SchemaDataType) openapiv3.TypeSet
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Components ¶
func Components(components *openapi.Components) (*openapiv3.Components, error)
func Discriminator ¶
func Discriminator(value *openapi.Discriminator) (*openapiv3.Discriminator, error)
func EncodingMap ¶
func ExternalDoc ¶
func ExternalDoc(doc *openapi.ExternalDocumentation) (*openapiv3.ExternalDocumentation, error)
func MediaTypes ¶
func OAuthFlow ¶
func OAuthFlow(flow *openapi.SecurityScheme_OAuthFlow) (*openapiv3.OAuthFlow, error)
func OAuthFlows ¶
func OAuthFlows(flows *openapi.SecurityScheme_OAuthFlows) (*openapiv3.OAuthFlows, error)
func ParameterMap ¶
func ParameterSlice ¶
func RequestBody ¶
func RequestBody(requestBody *openapi.RequestBody) (*openapiv3.Ref[openapiv3.RequestBody], error)
func RequestBodyMap ¶
func RequestBodyMap( requestBodies map[string]*openapi.RequestBody) (map[string]*openapiv3.Ref[openapiv3.RequestBody], error)
func ResponseMap ¶
func SchemaItemSpec ¶
func SchemaItemSpec(spec *openapi.Schema_Item) (*openapiv3.ItemSpec, error)
func SecurityRequirementSlice ¶
func SecurityRequirementSlice(items []*openapi.SecurityRequirement) []map[string][]string
func SecurityScheme ¶
func SecurityScheme(scheme *openapi.SecurityScheme) (*openapiv3.Ref[openapiv3.SecurityScheme], error)
func SecuritySchemeMap ¶
func SecuritySchemeMap( securitySchemes map[string]*openapi.SecurityScheme) (map[string]*openapiv3.Ref[openapiv3.SecurityScheme], error)
func StructuredExample ¶
func StructuredExampleMap ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.