dotnet / dotnet/aspnetcore

Support custom error messages when validation fails on minimal APIs

Open
#35,501 20 comments 23 reactions 0 assignees View on GitHub
area-minimal feature-minimal-actions triage-focus
Dominant language
C#
Stars
38.4k
Forks
10.9k
Avg merge
2d 5h
Merged PRs (30d)
276

Description

This issue captures user feedback from https://twitter.com/davidfowl/status/1428228518953984005?s=20.

Currently, the feature to support treating parameters that are nullable or have default values as optional will return a status code and no error message as part of the response. This is largely because (1) it builds on top of the existing try-parse parsing logic which does nothing and (2) when we were working through the feature we had punted on the problem of what message to send back.

Users want to be be able to customize the message to:
- Provide clearer info to the client
- Conform to a specific API implementation

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.