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 encoding, itemEncoding, and prefixEncoding fields to OpenApiEncoding class for OpenAPI 3.2.0 support #52
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 <[email protected]>
Copilot
AI
changed the title
[WIP] Add missing fields to encoding object
Add encoding Dictionary field to OpenApiEncoding class for OpenAPI 3.2.0 support
Oct 9, 2025
Copilot finished work on behalf of
baywet
October 9, 2025 18:23
baywet
suggested changes
Oct 9, 2025
|
@copilot implement the requested changes |
…r encoding serialization Co-authored-by: baywet <[email protected]>
Author
|
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
AI
changed the title
Add encoding Dictionary field to OpenApiEncoding class for OpenAPI 3.2.0 support
Add encoding, itemEncoding, and prefixEncoding fields to OpenApiEncoding class for OpenAPI 3.2.0 support
Oct 9, 2025
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 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.
Overview
This PR implements the missing
encoding,itemEncoding, andprefixEncodingfields for theOpenApiEncodingclass as specified in the OpenAPI 3.2.0 specification.Problem
The
OpenApiEncodingclass 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 theOpenApiMediaTypeclass has anencodingdictionaryitemEncoding: 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:
OpenApiEncodingclass:EncodingasIDictionary<string, OpenApiEncoding>?ItemEncodingasOpenApiEncoding?PrefixEncodingasIList<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.