Describe the bug
Generate a new template but set -xf to None (no XML formatters).
Launch Swagger, make a POST request to cars.
Change the JSON Model property to null.
Notice you get a 406, not a 400.
Steps to reproduce
Generate a new template but set -xf to None (no XML formatters).
Launch Swagger, make a POST request to cars.
Change the JSON Model property to null.
Notice you get a 406, not a 400.
Expected behaviour
You should get a 400 with helpful model state errors.
Template
API
.NET Boxed Version
Latest
Visual Studio Version
VS22
.NET Version
.NET 7
Describe the bug
Generate a new template but set -xf to None (no XML formatters).
Launch Swagger, make a POST request to cars.
Change the JSON Model property to null.
Notice you get a 406, not a 400.
Steps to reproduce
Generate a new template but set -xf to None (no XML formatters).
Launch Swagger, make a POST request to cars.
Change the JSON Model property to null.
Notice you get a 406, not a 400.
Expected behaviour
You should get a 400 with helpful model state errors.
Template
API
.NET Boxed Version
Latest
Visual Studio Version
VS22
.NET Version
.NET 7