Closed austinvalle closed 1 year ago
Proposal sounds good to me, nice write up. 👍 If it makes any potential difference at all, one additional thing to consider is that a developer may want to bring their own attribute description in the configuration at some point, which should always be preserved/highest precedence.
Good point, I think most of this suggests we should refactor the merge functions so we can eventually consider configuration or other sources 😵
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
Background
Given the following OAS + config, in the context of a data source:
You'll generate the following IR, with a description:
However, in the context of a resource, with the same OAS, you don't get a description in the resulting IR:
Proposal
This is occurring because during the merging process (currently a very simple merge of
n
schemas across request body/response body, etc.), there is no functionality to preserve descriptions across multiple merges.We should refactor and update the merging process to have the following behavior after merge:
description
, keep the highest precedencedescription
(current behavior)description
, take the next highest precedencedescription