Uh oh!
There was an error while loading. Please reload this page.
feat(models): add shared Content interface - #2695
Conversation
Vincent Biret (baywet)
left a comment
There was a problem hiding this comment.
Thanks for the contribution!
A couple of minor suggestions
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Co-authored-by: Vincent Biret <vincentbiret@hotmail.com>
Co-authored-by: Vincent Biret <vincentbiret@hotmail.com>
Co-authored-by: Vincent Biret <vincentbiret@hotmail.com>
Co-authored-by: Vincent Biret <vincentbiret@hotmail.com>
Vincent Biret (@baywet) I'm sure that you already know but the tests are failing on Windows due to differences in newline formats, specifically between CRLF and LF |
Vincent Biret (baywet)
left a comment
There was a problem hiding this comment.
Thank you for making the changes!
Vincent Biret (baywet)
commented
Jan 21, 2026
mdaneri do you mean the unit tests? or a formatting issue with the source code? |
mdaneri
commented
Jan 21, 2026
xunit tests 5 of 6 of them are failing on windows |
for example, |
mdaneri
commented
Jan 21, 2026
I think it's an issue with my environment I force windows to use \n only not \r\n |
Uh oh!
There was an error while loading. Please reload this page.
Co-authored-by: Vincent Biret <vincentbiret@hotmail.com>
Vincent Biret (baywet)
commented
Jan 21, 2026
mdaneri the public API export needs to be refreshed, would you mind pushing that latest change please? |
Head branch was pushed to by a user without write access
Uh oh!
There was an error while loading. Please reload this page.
feat(models): add shared Content interface * Update src/Microsoft.OpenApi/Models/Interfaces/IOpenApiContentElement.cs Co-authored-by: Vincent Biret <vincentbiret@hotmail.com> * Update src/Microsoft.OpenApi/Models/Interfaces/IOpenApiContentElement.cs Co-authored-by: Vincent Biret <vincentbiret@hotmail.com> * Update src/Microsoft.OpenApi/Models/OpenApiHeader.cs Co-authored-by: Vincent Biret <vincentbiret@hotmail.com> * Update src/Microsoft.OpenApi/Models/OpenApiResponse.cs Co-authored-by: Vincent Biret <vincentbiret@hotmail.com> * Remove inheritance from IOpenApiReadOnlyContentElement revert commit 7758a81 * Update src/Microsoft.OpenApi/Models/Interfaces/IOpenApiContentElement.cs Co-authored-by: Vincent Biret <vincentbiret@hotmail.com> * test(publicapi): approve content interface surface --------- Co-authored-by: Vincent Biret <vincentbiret@hotmail.com> Signed-off-by: Vincent Biret <vibiret@microsoft.com>
Pull Request
Description
Introduce a shared abstraction for OpenAPI elements that expose a
Contentmap, enabling generic helpers and reducing duplication across the model surface.Type of Change
Related Issue(s)
Fixes#2677
Changes Made
IOpenApiContentElement/IOpenApiReadOnlyContentElementto represent the sharedContentcapabilityIOpenApiResponse,IOpenApiRequestBody,IOpenApiParameter, andIOpenApiHeaderto inherit the shared interfaceTesting
Checklist
Versions applicability
Additional Notes
None