-
Notifications
You must be signed in to change notification settings - Fork 92
Circular references in separate files results in stack overflow error #442
Copy link
Copy link
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
We have an open api specification with circular references where each object is stored in a separate file. This results in a stack overflow error:
runtime: goroutine stack exceeds 1000000000-byte limit
runtime: sp=0x140ade80340 stack=[0x140ade80000, 0x140cde80000]
fatal error: stack overflow
runtime stack:
runtime.throw({0x1048394c0?, 0x104347498?})
I am on the latest version and the pr #418 did not fix the issue for our scenario.
To Reproduce
I've made two example files based on the example files in pr #418:
circular2.yaml
openapi: 3.0.0
info:
title: Circular Reference Example
version: 1.0.0
paths:
/sample:
put:
requestBody:
required: true
content:
application/json:
schema:
$ref: './AwsEnvironmentSettings.yaml'
responses:
'200':
description: OkAwsEnvironmentSettings.yaml
type: object
properties:
children:
type: array
items:
$ref: './AWSEnvironmentSettings.yaml'
description: testSteps to reproduce the behavior:
- Create the 2 files above
oasdiff breaking ./circular2.yaml ./circular2.yaml
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working