Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Circular reference causes memory leak / crashes #36

Open
AbhimanyuG opened this issue Apr 6, 2019 · 3 comments
Open

Circular reference causes memory leak / crashes #36

AbhimanyuG opened this issue Apr 6, 2019 · 3 comments
Labels
bug Something isn't working upstream

Comments

@AbhimanyuG
Copy link

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.

@AbhimanyuG
Copy link
Author

Workarounds:

  • Keep distributed schemas in same directory.
  • Avoid circular references by using a shared schema file like common.yaml

@yaronius
Copy link
Contributor

@AbhimanyuG Thanks for sharing workarounds. Are you sure this is an APISprout issue? This tool uses https://github.com/getkin/kin-openapi internally for parsing and validating those YAML files. Also, it would be very helpful to see some crash reports/stack traces that you experienced.

@danielgtaylor danielgtaylor added bug Something isn't working upstream labels May 31, 2019
@danielgtaylor
Copy link
Owner

Can you share a specific example? E.g. what is a small working OpenAPI file and web request I can make to reproduce this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working upstream
Projects
None yet
Development

No branches or pull requests

3 participants