Uh oh!
There was an error while loading. Please reload this page.
Add encoding, itemEncoding, and prefixEncoding fields to OpenApiEncoding class for OpenAPI 3.2.0 support - #52
Conversation
…2 support Co-authored-by: baywet <7905502+baywet@users.noreply.github.com>
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.
baywet
commented
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:
|
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.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
baywet
commented
Oct 10, 2025
@copilot run the following commands and commit the changed performance reports, do nothing else cd performance/benchmark
dotnet run -c Release |
Uh oh!
There was an error while loading. Please reload this page.
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.