ModelState serializing
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 505
- Forks
- 186
- PR merge metrics
- No merged PRs in 30d
Description
class Test
{
[Required]
public string Value {get; set;}
}
Posting a Test object with Value == null will cause an invalid model state.
Doing BadRequest(ModelState) yields the following response:
{"error":{"code":"","message":"The input was not valid.","details":[{"code":"","message":"The input was not valid."}]}}
Expected
The response to contain the name of the property with an invalid value.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the Test example with a null required Value and inspect the BadRequest(ModelState) response path. Trace how model-state errors are serialized, then verify that the resulting details identify the invalid property name while preserving the existing error response behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100