validator

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2022 License: Apache-2.0 Imports: 10 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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