Skip to content

Commit

Permalink
reproduce getkin#594
Browse files Browse the repository at this point in the history
Signed-off-by: Pierre Fenoll <pierrefenoll@gmail.com>
  • Loading branch information
fenollp committed Sep 16, 2022
1 parent 68016e0 commit 163995e
Show file tree
Hide file tree
Showing 2 changed files with 48,163 additions and 0 deletions.
27 changes: 27 additions & 0 deletions openapi3/issue594_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
package openapi3

import (
"net/url"
"testing"

"github.com/stretchr/testify/require"
)

func TestIssue594(t *testing.T) {
sl := NewLoader()
doc, err := sl.LoadFromFile("testdata/oai_v3_stoplight.json")
require.NoError(t, err)

err = doc.Validate(sl.Context)
require.NoError(t, err)

uri, err := url.Parse("https://raw.githubusercontent.com/sendgrid/sendgrid-oai/c3aaa432b769faa47285166aca17c7ed2ea71787/oai_v3_stoplight.json")
require.NoError(t, err)

sl = NewLoader()
doc, err = sl.LoadFromURI(uri)
require.NoError(t, err)

err = doc.Validate(sl.Context)
require.NoError(t, err)
}
Loading

0 comments on commit 163995e

Please sign in to comment.