Repository navigation
fix(v2): map OpenAPI 2.0 response schema type file to binary format - #3150
Merged
Vincent Biret (baywet) merged 5 commits intoOct 27, 2026
Conversation
…schema deserializer
Contributor
Author
|
This PR addresses #3149 by bringing schema deserialization in OpenAPI 2.0 into alignment with parameter deserialization:
|
Contributor
Author
|
I've pushed an update addressing the failing response schema test in CI. In OpenAPI 2.0, response Ready for your review when you have a moment. |
Vincent Biret (baywet)
approved these changes
Oct 27, 2026
Vincent Biret (baywet)
added a commit
that referenced
this pull request
Oct 28, 2026
…3150) (#3151) * test(v2): add unit test for OpenAPI 2.0 schema type file mapping to binary format * fix(v2): set format binary when reading OpenAPI 2.0 schema with type file * test(v2): add response schema integration test for type file * docs(v2): document OpenAPI 2.0 file type to binary format mapping in schema deserializer * test(v2): parse enclosing operation with produces to populate response content schema Co-authored-by: Hardik K <hardikkaurani1@gmail.com>
This was referenced Nov 17, 2026
This was referenced Nov 23, 2026
github-actions Bot
pushed a commit
to EelcoLos/nx-tinkering
that referenced
this pull request
Nov 24, 2026
Updated [Microsoft.OpenApi](https://github.com/Microsoft/OpenAPI.NET) from 3.11.0 to 3.11.1. <details> <summary>Release notes</summary> _Sourced from [Microsoft.OpenApi's releases](https://github.com/Microsoft/OpenAPI.NET/releases)._ ## 3.11.1 ## [3.11.1](microsoft/OpenAPI.NET@v3.11.0...v3.11.1) (2026-11-16) ### Bug Fixes * improved external ref file loading ([#3164](microsoft/OpenAPI.NET#3164)) ([a4a4de6](microsoft/OpenAPI.NET@a4a4de6)) * **models:** preserve specification extensions in OpenApiPaths and OpenApiResponses copy constructors ([#3162](microsoft/OpenAPI.NET#3162)) ([a68f8be](microsoft/OpenAPI.NET@a68f8be)) * **models:** preserve tag collection types and comparers in copy constructors ([#3141](microsoft/OpenAPI.NET#3141)) ([76ea786](microsoft/OpenAPI.NET@76ea786)) * **models:** preserve tag collection types and comparers in OpenApiDocument copy constructor ([76ea786](microsoft/OpenAPI.NET@76ea786)) * **reader:** reduce reference parsing memory allocations ([#3171](microsoft/OpenAPI.NET#3171)) ([d14d0a1](microsoft/OpenAPI.NET@d14d0a1)) * Support custom tag ordering and null assignment in OpenApiOperation.Tags ([#3128](microsoft/OpenAPI.NET#3128)) ([d868431](microsoft/OpenAPI.NET@d868431)) * support reinitializing OpenApiOperation.Tags to null and custom comparers ([#3116](microsoft/OpenAPI.NET#3116)) ([4f53ad5](microsoft/OpenAPI.NET@4f53ad5)) * **v2:** map OpenAPI 2.0 response schema type file to binary format ([#3150](microsoft/OpenAPI.NET#3150)) ([e41f0e8](microsoft/OpenAPI.NET@e41f0e8)) * **v3:** retain full JSON pointer path on OpenAPI 3.0 schema references ([#3155](microsoft/OpenAPI.NET#3155)) ([d8f20e8](microsoft/OpenAPI.NET@d8f20e8)) * **validations:** include properties segment in ValidateSchemaPropertyHasValue pointer ([#3165](microsoft/OpenAPI.NET#3165)) ([4d59cb0](microsoft/OpenAPI.NET@4d59cb0)) Commits viewable in [compare view](microsoft/OpenAPI.NET@v3.11.0...v3.11.1). </details> [](https://github.com/proxy/docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Eelco Los <5102501+EelcoLos@users.noreply.github.com>
This was referenced Nov 24, 2026
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
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.

Summary of Changes
Resolves #3149.
In OpenAPI 2.0, the Response Object specifies:
While
OpenApiParameterDeserializeralready mapstype: filetoType = JsonSchemaType.StringandFormat = "binary",OpenApiSchemaDeserializerpreviously omitted settingFormat = "binary"whentype: filewas encountered. As a result, OpenAPI 2.0 response schemas returning files were deserialized into plain strings without format metadata.This PR adds:
Format = "binary"assignment whentypeequals"file"(case-insensitive) inOpenApiSchemaDeserializer, matchingOpenApiParameterDeserializer.OpenApiSchemaTests.csverifying both direct schema parsing and response object schema resolution fortype: file.Verification
type: file->JsonSchemaType.StringwithFormat = "binary"."binary".