diff --git a/openapi3/issue961_test.go b/openapi3/issue961_test.go new file mode 100644 index 00000000..5dcbe973 --- /dev/null +++ b/openapi3/issue961_test.go @@ -0,0 +1,14 @@ +package openapi3 + +import ( + "testing" + + "github.com/stretchr/testify/require" +) + +func TestIssue961(t *testing.T) { + loader := NewLoader() + loader.IsExternalRefsAllowed = true + _, err := loader.LoadFromFile("./testdata/issue961/main.yml") + require.NoError(t, err) +} diff --git a/openapi3/testdata/issue961/config_param.yml b/openapi3/testdata/issue961/config_param.yml new file mode 100644 index 00000000..aa861ac0 --- /dev/null +++ b/openapi3/testdata/issue961/config_param.yml @@ -0,0 +1,41 @@ +oneOf: + - title: "text" + description: | + type "text": **text** is a simple string. + type: object + required: + - type + properties: + default: + type: string + position: + type: number + format: int32 + minimum: 0 + description: | + Position of the parameter in the output. + name: + type: string + description: "name of the parameter as used in the API" + - title: "table" + description: | + type "table" + type: object + required: + - type + properties: + default: + type: string + position: + type: number + format: int32 + minimum: 0 + description: | + Position of the parameter in the output. + name: + type: string + description: "name of the parameter as used in the API" + fields: + type: array + items: + $ref: '#' diff --git a/openapi3/testdata/issue961/main.yml b/openapi3/testdata/issue961/main.yml new file mode 100644 index 00000000..4d090c16 --- /dev/null +++ b/openapi3/testdata/issue961/main.yml @@ -0,0 +1,4 @@ +components: + schemas: + configParam: + $ref: './config_param.yml' \ No newline at end of file