danielgtaylor / danielgtaylor/apisprout

Circular reference causes memory leak / crashes

Open
#36 3 comments 0 reactions 0 assignees View on GitHub
bug upstream
Dominant language
Go
Stars
719
Forks
70
PR merge metrics
No merged PRs in 30d

Description

Take this scenario

file1.yaml
```
field:
$ref: './file2.yaml#/components/schemas/Something'
```
file2.yaml
```
AnotherThing:
$ref: './file1.yaml#/components/schemas/SomethingElse'
```

Currently apisprout will spike in memory usage or crash in such a scenario, even though references are resolvable.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the issue with the two YAML files shown in the report, then trace apisprout's OpenAPI reference-resolution entry point to see how the cross-file cycle is handled. Done means these resolvable circular references no longer cause unbounded memory use or a crash.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
api
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.