This repository was archived by the owner on Nov 11, 2025. It is now read-only.
forked from microsoft/OpenAPI.NET
-
Notifications
You must be signed in to change notification settings - Fork 0
Add support for response summary in OpenAPI 3.2.0 #23
Merged
baywet
merged 10 commits into
feat/oai-3-2-support
from
copilot/fix-55e26a3a-d7a0-498c-be08-65c41726cec3
Sep 29, 2025
Merged
Add support for response summary in OpenAPI 3.2.0 #23
baywet
merged 10 commits into
feat/oai-3-2-support
from
copilot/fix-55e26a3a-d7a0-498c-be08-65c41726cec3
Sep 29, 2025
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…tion Co-authored-by: baywet <[email protected]>
Co-authored-by: baywet <[email protected]>
Copilot
AI
changed the title
[WIP] add support for response summary
Add support for response summary in OpenAPI 3.2.0
Sep 27, 2025
|
@copilot also update the IOpenAPIResponse interface to derive from ISummarizedElement |
Co-authored-by: baywet <[email protected]>
Author
Updated the |
baywet
suggested changes
Sep 29, 2025
src/Microsoft.OpenApi/Models/References/OpenApiResponseReference.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.OpenApi/Models/References/OpenApiResponseReference.cs
Outdated
Show resolved
Hide resolved
Signed-off-by: Vincent Biret <[email protected]>
Signed-off-by: Vincent Biret <[email protected]>
Signed-off-by: Vincent Biret <[email protected]>
baywet
approved these changes
Sep 29, 2025
Signed-off-by: Vincent Biret <[email protected]>
kilifu
approved these changes
Sep 29, 2025
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.