Uh oh!
There was an error while loading. Please reload this page.
Add support for response summary in OpenAPI 3.2.0 - #23
Conversation
…tion Co-authored-by: baywet <7905502+baywet@users.noreply.github.com>
Co-authored-by: baywet <7905502+baywet@users.noreply.github.com>
baywet
commented
Sep 27, 2025
@copilot also update the IOpenAPIResponse interface to derive from ISummarizedElement |
Co-authored-by: baywet <7905502+baywet@users.noreply.github.com>
Updated the |
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.
Uh oh!
There was an error while loading. Please reload this page.
Signed-off-by: Vincent Biret <vibiret@microsoft.com>
Signed-off-by: Vincent Biret <vibiret@microsoft.com>
Signed-off-by: Vincent Biret <vibiret@microsoft.com>
Signed-off-by: Vincent Biret <vibiret@microsoft.com>
This PR implements support for the new
summaryfield in response objects as defined in OpenAPI Specification 3.2.0.Changes Made
Core Implementation
Summaryproperty toOpenApiResponseclass implementingIOpenApiSummarizedElementIOpenApiResponseinterface to derive fromIOpenApiSummarizedElementmaking Summary part of the interface contractOpenApiResponseReferenceto properly delegate the Summary property to its targetVersion-Specific Serialization
The implementation follows the specification requirements for backward compatibility:
OpenAPI 3.2+: Summary is serialized as a standard field
{ "summary": "Successful response", "description": "A detailed description" }OpenAPI 3.1 and earlier: Summary is serialized as an extension field using the
x-oai-prefix{ "description": "A detailed description", "x-oai-summary": "Successful response" }Deserialization Support
Testing
Usage Example
This implementation maintains full backward compatibility while enabling the new summary functionality for OpenAPI 3.2.0 documents. The interface hierarchy now properly expresses that all response objects have a Summary property.
Fixes#17
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.