operator

package
v0.0.0-...-0c1943d Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package operator converts the openAPI v3 and/or v2 content To MgwSwagger objects which is the intermediate representation maintained by the microgateway.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetOpenAPIV2Struct

func GetOpenAPIV2Struct(openAPIJson []byte) (spec.Swagger, error)

GetOpenAPIV2Struct converts the json content to the openAPIv2 struct TODO: (VirajSalaka) Use the MGWSwagger instead of this.

func GetOpenAPIV3Struct

func GetOpenAPIV3Struct(openAPIJson []byte) (openapi3.Swagger, error)

GetOpenAPIV3Struct converts the json content to the openAPIv3 struct TODO: (VirajSalaka) Use the MGWSwagger instead of this.

func GetOpenAPIVersionAndJSONContent

func GetOpenAPIVersionAndJSONContent(apiContent []byte) (string, []byte, error)

GetOpenAPIVersionAndJSONContent get the json content and openapi version The input can be either json content or yaml content TODO: (VirajSalaka) Use the MGWSwagger instead of this.

func GetXWso2Labels

func GetXWso2Labels(vendorExtensionsMap map[string]interface{}) []string

GetXWso2Labels returns the labels provided using x-wso2-label extension. If extension does not exit it would return 'default' TODO: (VirajSalaka) generalize this with openAPI3 getLabels method.

func GetXWso2LabelsWebSocket

func GetXWso2LabelsWebSocket(webSocketAPIDef model.MgwSwagger) []string

GetXWso2LabelsWebSocket returns a string array of labels provided using extensions. For web sockets, since we are using the api.yaml file, need to figure out a way to pass labels. Currently value "DefaultGatewayName" is returned

Types

This section is empty.

Jump to

Keyboard shortcuts

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