Skip to content

Commit

Permalink
test: add a test for getkin#499
Browse files Browse the repository at this point in the history
  • Loading branch information
AnatolyRugalev committed Jul 10, 2024
1 parent a7bc0ff commit f0e3b3f
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 0 deletions.
13 changes: 13 additions & 0 deletions openapi3/issue499_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package openapi3

import (
"github.com/stretchr/testify/require"
"testing"
)

func TestIssue499(t *testing.T) {
loader := NewLoader()
loader.IsExternalRefsAllowed = true
_, err := loader.LoadFromFile("testdata/issue499/main.yml")
require.NoError(t, err)
}
1 change: 1 addition & 0 deletions openapi3/testdata/issue499/foo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
type: string
24 changes: 24 additions & 0 deletions openapi3/testdata/issue499/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
openapi: 3.0.0
info:
title: 'spec'
version: 1.2.3

paths:
/foo:
get:
summary: get foo
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: "#/components/schemas/Foo"

components:
schemas:
Foo:
type: object
properties:
id:
$ref: "./foo.yml"

0 comments on commit f0e3b3f

Please sign in to comment.