-
Notifications
You must be signed in to change notification settings - Fork 10k
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
feat: extending ApiBehaviorOptions
with skip SkipStatusCodePages
#57597
base: main
Are you sure you want to change the base?
Conversation
Unless the attribute definition were moved down the stack from ViewFeatures to Core, you'll need to define an private implementation of |
Thanks for your response @martincostello. Do you think creating a private |
The only options are to create a private implementation of the interface and use that or for the implementation to be moved to a lower level of the stack. The latter would need approval from the team to move and would need type-forwarding to be set up. |
@onurkanbakirci Martin's recommendation for a private implementation of the interface is spot on. It's the general pattern we use for these things. That should allow you to resolve the issue without introducing circular dependencies or requiring another round of API review. |
Looks like this PR hasn't been active for some time and the codebase could have been changed in the meantime. |
Extending
ApiBehaviorOptions
with skipSkipStatusCodePages
I added a
SkipStatusCodePages
property to theApiBehaviorOptions
class to extend its functionality. I then referenced the newSkipStatusCodePagesConvention
from theApiBehaviorApplicationModelProvider
class. TheSkipStatusCodePagesConvention
class adds aSkipStatusCodePagesAttribute
to the API controller to disable the skip status code pages feature.However, I am encountering the following reference error:
What could be causing this problem, and how can I resolve it? What might I be missing?
Fixes #45369 , #45260