google / google/gnostic

Improve handling of references.

Open
#22 2 comments 0 reactions 1 assignee Claimed by @timburks View on GitHub
Dominant language
Go
Stars
2.3k
Forks
279
PR merge metrics
No merged PRs in 30d

Description

OpenAPI descriptions with large numbers of repeated $refs can take a long time to resolve. This is because we explicitly expand all $refs.

For example, this runs much faster with --keep_refs than without it:
`openapic --sample_out=- https://api.apis.guru/v2/specs/bitbucket.org/2.0/swagger.yaml --keep_refs`

A better approach would be to keep $refs in place but still expand each unique $ref and store the expansion in the compiled protos so it could be easily used in client code when needed.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.