Skip to content

Fixup OpenAPI displayed param type when using TryParse#36526

Merged
BrennanConroy merged 3 commits into
mainfrom
brecon/type
Sep 16, 2021
Merged

Fixup OpenAPI displayed param type when using TryParse#36526
BrennanConroy merged 3 commits into
mainfrom
brecon/type

Conversation

@BrennanConroy

Copy link
Copy Markdown
Member

Fixes #36412

Before query and path would show object for complex types, now they display string and for primitives we keep them as the primitives name.

@BrennanConroy BrennanConroy added the old-area-web-frameworks-do-not-use *DEPRECATED* This label is deprecated in favor of the area-mvc and area-minimal labels label Sep 15, 2021
@ghost ghost added the area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates label Sep 15, 2021
@BrennanConroy

Copy link
Copy Markdown
Member Author

/backport to release/6.0

@github-actions

Copy link
Copy Markdown
Contributor

Started backporting to release/6.0: https://github.com/dotnet/aspnetcore/actions/runs/1238663268

@github-actions

Copy link
Copy Markdown
Contributor

@BrennanConroy backporting to release/6.0 failed, the patch most likely resulted in conflicts:

$ git am --3way --ignore-whitespace --keep-non-patch changes.patch

Applying: Fixup OpenAPI displayed param type when using TryParse
Using index info to reconstruct a base tree...
M	src/Mvc/Mvc.ApiExplorer/src/EndpointMetadataApiDescriptionProvider.cs
M	src/Mvc/Mvc.ApiExplorer/test/EndpointMetadataApiDescriptionProviderTest.cs
Falling back to patching base and 3-way merge...
Auto-merging src/Mvc/Mvc.ApiExplorer/test/EndpointMetadataApiDescriptionProviderTest.cs
CONFLICT (content): Merge conflict in src/Mvc/Mvc.ApiExplorer/test/EndpointMetadataApiDescriptionProviderTest.cs
Auto-merging src/Mvc/Mvc.ApiExplorer/src/EndpointMetadataApiDescriptionProvider.cs
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 Fixup OpenAPI displayed param type when using TryParse
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
Error: The process '/usr/bin/git' failed with exit code 128

Please backport manually!

Comment thread src/Mvc/Mvc.ApiExplorer/test/EndpointMetadataApiDescriptionProviderTest.cs Outdated
@BrennanConroy

Copy link
Copy Markdown
Member Author

FYI, added a nullable primitive type check

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates

Projects

None yet

Development

Successfully merging this pull request may close these issues.

OpenAPI documentation is incorrect when using custom TryParse() binding with Minimal APIs

3 participants