OpenAPI: migrate (#22429)
This commit is contained in:
parent
ed0b8d6e17
commit
9e9ff7a3ee
2 changed files with 1483 additions and 0 deletions
15
server/openapi_test.go
Normal file
15
server/openapi_test.go
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
package server
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/getkin/kin-openapi/openapi3"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
func TestOpenAPIValidation(t *testing.T) {
|
||||
loader := openapi3.NewLoader()
|
||||
doc, err := loader.LoadFromFile("openapi.yaml")
|
||||
require.NoError(t, err)
|
||||
require.NoError(t, doc.Validate(loader.Context))
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue