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 ¶
- func GetOpenAPIV2Struct(openAPIJson []byte) (spec.Swagger, error)
- func GetOpenAPIV3Struct(openAPIJson []byte) (openapi3.Swagger, error)
- func GetOpenAPIVersionAndJSONContent(apiContent []byte) (string, []byte, error)
- func GetXWso2Labels(vendorExtensionsMap map[string]interface{}) []string
- func GetXWso2LabelsWebSocket(webSocketAPIDef model.MgwSwagger) []string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetOpenAPIV2Struct ¶
GetOpenAPIV2Struct converts the json content to the openAPIv2 struct TODO: (VirajSalaka) Use the MGWSwagger instead of this.
func GetOpenAPIV3Struct ¶
GetOpenAPIV3Struct converts the json content to the openAPIv3 struct TODO: (VirajSalaka) Use the MGWSwagger instead of this.
func GetOpenAPIVersionAndJSONContent ¶
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 ¶
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.