AspNetConventions

Convention-driven standardization for ASP.NET Core.


What it does

AspNetConventions provides a unified framework for enforcing consistent API standards across your entire ASP.NET Core ecosystem. By centralizing route casing, response structures, global exception handling, and JSON serialization into a single configuration point.


Features

Route Standardization Automatically transforms route paths and parameters to your preferred casing style (kebab-case, snake_case, camelCase, or PascalCase) across MVC Controllers, Minimal APIs, and Razor Pages.

Exception Handling Catches unhandled exceptions globally and formats them into a consistent error response. Built-in support for common exceptions (ArgumentNullException, ValidationException, ArgumentException, etc.) and full support for custom exception mappers.

Response Formatting Uniform JSON response envelopes across all MVC Controllers and Minimal APIs. Every success and error response looks the same across your entire application and the response structure is fully customizable.

JSON Serialization Application-wide serialization settings to configure JSON property casing style, per-type property names, ordering, and ignore conditions with zero dependency on a specific serializer implementation.


Source

GitHub GitHubNuGet NuGet

Contributing

Contributions are welcome! Please read CONTRIBUTING before submitting a pull request.


License

This project is licensed under the MIT License — see the LICENSE file for details.