Quantcast
Channel: Active questions tagged rest - Stack Overflow
Viewing all articles
Browse latest Browse all 3655

How to globally configure ASP.NET Core 6+ API routes to be formatted as kebab-case when generated from controller names?

$
0
0

I have an ASP.NET Core 6 Web API project. Some of the endpoints are related to controllers whose names consist of multiple words and thus are in PascalCase format as per the convention in .NET. Suppose I have a PackageGroupsController. I'd like its route to be /package-groups instead of the default /PackageGroups and I don't want to specify a hardcoded route for each controller. How can I achieve that using a global configuration or something?


Viewing all articles
Browse latest Browse all 3655

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>