Help us shape the future of Go! Take the 2026 Go Developer Survey

openapi2apisix

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// LoadOpenAPIError  is the error type for loading OpenAPI
	LoadOpenAPIError = errors.New("load OpenAPI file error")
)

Functions

func Convert

func Convert(ctx context.Context, oas []byte) (*apitypes.Configuration, error)

Convert convert OAS to API Service and Routes

func Slugify

func Slugify(name ...string) string

Slugify converts a name to a valid name by removing and replacing unallowed characters and sanitizing non-latin characters. Multiple inputs will be concatenated using '_'.

Types

type OAS

type OAS []byte

func (OAS) LoadOpenAPI

func (s OAS) LoadOpenAPI(ctx context.Context) (*openapi3.T, error)

type ResultBundle

type ResultBundle struct {
	Services []*apitypes.Service `json:"service"`
	Routes   []*apitypes.Route   `json:"routes"`
}

Jump to

Keyboard shortcuts

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