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

Better handling of [ApiController] usage #1246

Merged
merged 2 commits into from Feb 5, 2023
Merged

Conversation

bkoelman
Copy link
Member

Enhancements:

  • Log a warning when [ApiController] is used on a JSON:API controller.
  • Better error response on invalid ModelState when [ApiController] is used on a JSON:API controller.

Based on the work in #1225.
Closes #1224.

QUALITY CHECKLIST

@codecov
Copy link

codecov bot commented Jan 20, 2023

Codecov Report

Merging #1246 (79cfb3d) into master (be99234) will increase coverage by 0.01%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #1246      +/-   ##
==========================================
+ Coverage   92.62%   92.63%   +0.01%     
==========================================
  Files         243      243              
  Lines        7795     7806      +11     
==========================================
+ Hits         7220     7231      +11     
  Misses        575      575              
Impacted Files Coverage Δ
...etCore/Errors/UnsuccessfulActionResultException.cs 96.00% <100.00%> (+1.00%) ⬆️
...iDotNetCore/Middleware/JsonApiRoutingConvention.cs 92.75% <100.00%> (+0.69%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@bkoelman bkoelman marked this pull request as ready for review January 20, 2023 02:48
@bkoelman bkoelman requested a review from maurei January 20, 2023 02:48
@maurei maurei merged commit cd6d5bd into master Feb 5, 2023
@maurei maurei deleted the api-controller-attribute branch February 5, 2023 10:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Poor error response when using ModelState Validation with [ApiController]
2 participants