openapiconvert

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FormatSwagger20     = "swagger2"
	FormatOpenAPI30     = "openapi3"
	FormatOpenAPI30JSON = "openapi3-json"
)

Variables

View Source
var (
	ErrInvalidInputFormat    = fmt.Errorf("invalid input format")
	ErrInvalidOutputFormat   = fmt.Errorf("invalid output format")
	ErrUnsupportedConversion = fmt.Errorf("unsupported conversion")
	SupportedInputFormats    = []string{FormatSwagger20}
	SupportedOutputFormats   = []string{FormatOpenAPI30, FormatOpenAPI30JSON}
)

Functions

func ConvertSpec

func ConvertSpec(inputPath, formatIn, formatOut, converter string) ([]byte, error)

ConvertSpec converts an input specification file to the desired output format.

func ConvertSwaggerToOpenAPIUsingSpeakeasy

func ConvertSwaggerToOpenAPIUsingSpeakeasy(swaggerData []byte) ([]byte, error)

func ConvertSwaggerToOpenAPIUsingSwaggerConverter

func ConvertSwaggerToOpenAPIUsingSwaggerConverter(swaggerData []byte, converterUrl string) ([]byte, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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