forked from microsoft/OpenAPI.NET
-
Notifications
You must be signed in to change notification settings - Fork 0
Add encoding, itemEncoding, and prefixEncoding fields to OpenApiEncoding class for OpenAPI 3.2.0 support #52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
baywet
merged 7 commits into
feat/oai-3-2-support
from
copilot/add-encoding-object-fields
Oct 10, 2025
Merged
Add encoding, itemEncoding, and prefixEncoding fields to OpenApiEncoding class for OpenAPI 3.2.0 support #52
baywet
merged 7 commits into
feat/oai-3-2-support
from
copilot/add-encoding-object-fields
Oct 10, 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
…2 support Co-authored-by: baywet <7905502+baywet@users.noreply.github.com>
Copilot finished work on behalf of
baywet
October 9, 2025 18:23
baywet
requested changes
Oct 9, 2025
@copilot implement the requested changes |
…r encoding serialization Co-authored-by: baywet <7905502+baywet@users.noreply.github.com>
Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
Copilot finished work on behalf of
baywet
October 9, 2025 19:22
baywet
reviewed
Oct 9, 2025
baywet
reviewed
Oct 9, 2025
baywet
reviewed
Oct 9, 2025
baywet
reviewed
Oct 9, 2025
baywet
reviewed
Oct 9, 2025
baywet
reviewed
Oct 9, 2025
baywet
approved these changes
Oct 9, 2025
baywet
reviewed
Oct 9, 2025
baywet
approved these changes
Oct 9, 2025
kilifu
approved these changes
Oct 9, 2025
@copilot run the following commands and commit the changed performance reports, do nothing else cd performance/benchmark
dotnet run -c Release |
baywet
approved these changes
Oct 10, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Overview
This PR implements the missing
encoding
,itemEncoding
, andprefixEncoding
fields for theOpenApiEncoding
class as specified in the OpenAPI 3.2.0 specification.Problem
The
OpenApiEncoding
class was missing several fields from the OpenAPI 3.2.0 specification:encoding
: A dictionary that allows encoding objects to have their own nested encoding specifications, creating a recursive structure similar to how theOpenApiMediaType
class has anencoding
dictionaryitemEncoding
: Encoding object for array itemsprefixEncoding
: Encoding objects for tuple-style arraysAccording to the OpenAPI 3.2.0 spec, the Encoding Object should support these nested encoding configurations to handle complex data structures.
Solution
Added support for all three fields with the following changes:
OpenApiEncoding
class:Encoding
asIDictionary<string, OpenApiEncoding>?
ItemEncoding
asOpenApiEncoding?
PrefixEncoding
asIList<OpenApiEncoding>?
encoding
,itemEncoding
,prefixEncoding
)x-oai-encoding
,x-oai-itemEncoding
,x-oai-prefixEncoding
)Example Usage
Testing
Breaking Changes
None. This is a backward-compatible addition that only affects OpenAPI 3.2 documents with nested encoding structures. For older versions, the new fields are automatically serialized as extensions to maintain compatibility.
Fixes #51
Original prompt
Fixes #51
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.