MCPcopy Create free account
hub / github.com/goadesign/goa / validateSwagger

Function validateSwagger

http/codegen/openapi/v3/files_test.go:108–116  ·  view source on GitHub ↗
(t *testing.T, b []byte)

Source from the content-addressed store, hash-verified

106}
107
108func validateSwagger(t *testing.T, b []byte) {
109 swagger, err := openapi3.NewLoader().LoadFromData(b)
110 if err == nil {
111 err = swagger.Validate(context.Background())
112 }
113 if err != nil {
114 t.Errorf("invalid spec: %s\nspec:\n%s", err.Error(), string(b))
115 }
116}

Callers 1

TestFilesFunction · 0.70

Calls 2

ValidateMethod · 0.65
ErrorMethod · 0.45

Tested by

no test coverage detected