Azure / Azure/azure-rest-api-specs

[spec-model] Cache content of Swagger objects with identical paths

Open
#36,148 0 comments 0 reactions 1 assignee Claimed by @mikeharder View on GitHub
Dominant language
TypeSpec
Stars
3.1k
Forks
5.9k
Avg merge
2d 22h
Merged PRs (30d)
444

Description

spec-model can create multiple instances of `Swagger` objects pointing to the same path, if the same path is referenced mutliple times (e.g. in multiple tags, $ref from multiple other swagger, etc).

This should be fine for correctness, but we could improve perf by caching these objects, to avoid reading and parsing the same content multiple times.

The gap is Swagger objects point to their Tag. So we might need to refactor into a SwaggerContent object for the contents (which are cached by path), and Swagger includes the tag.

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.