Skip to content
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

Fix ModelMetadata for TryParse-parameters in ApiExplorer #58350

Merged
merged 3 commits into from
Oct 11, 2024

Conversation

captainsafia
Copy link
Member

Closes #58318.

@captainsafia captainsafia requested a review from a team as a code owner October 10, 2024 18:45
@dotnet-issue-labeler dotnet-issue-labeler bot added the area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates label Oct 10, 2024
@captainsafia captainsafia enabled auto-merge (squash) October 10, 2024 23:40
@captainsafia captainsafia merged commit 579b3fd into main Oct 11, 2024
27 checks passed
@captainsafia captainsafia deleted the safia/fix-tryparse-type branch October 11, 2024 01:29
@dotnet-policy-service dotnet-policy-service bot added this to the 10.0-preview1 milestone Oct 11, 2024
@captainsafia
Copy link
Member Author

/backport to release/9.0

Copy link
Contributor

Started backporting to release/9.0: https://github.com/dotnet/aspnetcore/actions/runs/11286219015

Copy link
Contributor

@captainsafia backporting to release/9.0 failed, the patch most likely resulted in conflicts:

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

Applying: Fix ModelMetadata for TryParse-parameters in ApiExplorer
Using index info to reconstruct a base tree...
M	src/OpenApi/src/Services/OpenApiDocumentService.cs
M	src/OpenApi/test/Microsoft.AspNetCore.OpenApi.Tests/Services/OpenApiSchemaService/OpenApiSchemaService.ParameterSchemas.cs
Falling back to patching base and 3-way merge...
Auto-merging src/OpenApi/test/Microsoft.AspNetCore.OpenApi.Tests/Services/OpenApiSchemaService/OpenApiSchemaService.ParameterSchemas.cs
CONFLICT (content): Merge conflict in src/OpenApi/test/Microsoft.AspNetCore.OpenApi.Tests/Services/OpenApiSchemaService/OpenApiSchemaService.ParameterSchemas.cs
Auto-merging src/OpenApi/src/Services/OpenApiDocumentService.cs
CONFLICT (content): Merge conflict in src/OpenApi/src/Services/OpenApiDocumentService.cs
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config advice.mergeConflict false"
Patch failed at 0001 Fix ModelMetadata for TryParse-parameters in ApiExplorer
Error: The process '/usr/bin/git' failed with exit code 128

Please backport manually!

Copy link
Contributor

@captainsafia an error occurred while backporting to release/9.0, please check the run log for details!

Error: git am failed, most likely due to a merge conflict.

captainsafia added a commit that referenced this pull request Oct 11, 2024
* Fix ModelMetadata for TryParse-parameters in ApiExplorer

* Add tests and update code comments

* Update src/OpenApi/src/Services/OpenApiDocumentService.cs
captainsafia added a commit that referenced this pull request Oct 14, 2024
* Fix ModelMetadata for TryParse-parameters in ApiExplorer

* Add tests and update code comments

* Update src/OpenApi/src/Services/OpenApiDocumentService.cs
wtgodbe pushed a commit that referenced this pull request Oct 15, 2024
#58372)

* Fix ModelMetadata for TryParse-parameters in ApiExplorer (#58350)

* Fix ModelMetadata for TryParse-parameters in ApiExplorer

* Add tests and update code comments

* Update src/OpenApi/src/Services/OpenApiDocumentService.cs

* Remove duplicate ambient route param test
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
2 participants