validator

package
v1.3.0-rc.0...-12c9840 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OAS2JSON = "oas2-json"
	OAS2YAML = "oas2-yaml"
	OAS3YAML = "oas3-yaml"
	OAS3JSON = "oas3-json"
)

Variables

This section is empty.

Functions

func BasicallyValidateSwagger

func BasicallyValidateSwagger(data []byte) (*spec.Swagger, error)

对 swagger 合法性进行基础性校验

func ValidateOAS2

func ValidateOAS2(data []byte, protocol string) (swagger *openapi3.Swagger, err error)

校验 swagger 2.x 格式合法性

func ValidateOAS3

func ValidateOAS3(data []byte, protocol string) (oas3 *openapi3.Swagger, err error)

校验 openapi 3 合法性

func ValidateOpenapi

func ValidateOpenapi(data []byte) (*openapi3.Swagger, error)

校验OpenAPI格式的合法性

Types

This section is empty.

Jump to

Keyboard shortcuts

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