Add example for skipping AllowAnonymous endpoints in OpenAPI docs#36902
Merged
wadepickett merged 6 commits intodotnet:mainfrom Mar 20, 2026
Merged
Conversation
Contributor
Author
|
@dotnet-policy-service agree |
Added missing code fence closure on example.
wadepickett
reviewed
Mar 20, 2026
wadepickett
reviewed
Mar 20, 2026
Update the ms.date to show the article has recently changed.
wadepickett
reviewed
Mar 20, 2026
wadepickett
reviewed
Mar 20, 2026
Contributor
|
Looks great! Thanks @Mohammed-Atef2004!! I only found a few minor items, noted. |
Co-authored-by: Wade Pickett <wpickett@microsoft.com>
Co-authored-by: Wade Pickett <wpickett@microsoft.com>
Co-authored-by: Wade Pickett <wpickett@microsoft.com>
Contributor
Author
|
@wadepickett wadepickett Applied the suggestion, Thank you for your comments |
Contributor
|
@Mohammed-Atef2004 thanks! Great work! I'll give @mikekistler some time to get a chance to review before merging. |
wadepickett
approved these changes
Mar 20, 2026
Contributor
wadepickett
left a comment
There was a problem hiding this comment.
Reviewed and approved after some suggestions added.
Contributor
Author
|
Sounds good! Thank you @wadepickett for the guidance and the kind words. I'll be standing by for @mikekistler review. |
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.
Description
Adds a practical example demonstrating how to conditionally apply security requirements in OpenAPI using an
IOpenApiOperationTransformer.Specifically, this shows how to skip endpoints decorated with
[AllowAnonymous], which is a common real-world scenario not clearly covered in the current documentation.This complements existing documentation improvements by providing a focused, end-to-end example.
Related Issue
Fixes #36904
Fixes dotnet/aspnetcore#61264 (Upstream doc issue originally referred to on the product repo)
Internal previews