swagger

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2022 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PublicConnectionType = "PUBLIC"
	ConnectionType       = "CONNECTION_TYPE"
	VPCLinkID            = "VPC_LINK_ID"
	GoModelRegex         = "(model.)(.*)"
	AuthType             = "AUTH_TYPE"
	AuthUrl              = "AUTH_URL"
	AuthName             = "AUTH_NAME"
	ApiGwName            = "API_GATEWAY_NAME"
	CustomAuth           = "apiKey"
	OAuth2               = "oauth2"
	EndpointUrl          = "ENDPOINT_URL"
	CorsEnabled          = "CORS_ENABLED"
	CustomHeaders        = "CUSTOM_HEADERS"
)

Variables

View Source
var DEFAULT_JSON_MIME_TYPE = []string{"application/json"}

Functions

This section is empty.

Types

type SwaggerParser

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

SwaggerParser responsible for the followings: 1. Fetches the swagger document for a given service and a given environment 2. Apply filters such as removing `example` tag and some unsupported feature of OpenAPI by AWS REST API Gateway restrictions 3. Add AWS API Gateway integration extensions to the vanilla swagger doc

func NewSwaggerClient

func NewSwaggerClient(swaggerUrl string) SwaggerParser

NewSwaggerClient - Function

func (SwaggerParser) FetchSwagger

func (client SwaggerParser) FetchSwagger() (swg.Swagger, error)

FetchSwagger - Function Fetches Swagger for a given service from the its deployed environment

func (SwaggerParser) RenderSwagger

func (client SwaggerParser) RenderSwagger(doc swg.Swagger) ([]byte, error)

RenderSwagger - Function Renders the vanilla swagger document into one that can be published to AWS api gateway

Jump to

Keyboard shortcuts

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