- ABP Framework version: v8.1.3
- UI Type: Blazor Server
- Database System: EF Core (SQL Server)
- Tiered (for MVC) or Auth Server Separated (for Angular): no
- Exception message and full stack trace:
- Steps to reproduce the issue:
When creating auto API controllers, the properties of complex types that are populated from the query string default to PascalCase. How can I change this to camelCase or kebab-case?
5 Answer(s)
-
0
Yes.
Markdown supported.Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post) -
0
hi
You can try to replace the
ConventionalRouteBuilderservicehttps://github.com/abpframework/abp/blob/dev/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Conventions/ConventionalRouteBuilder.cs#L13
https://docs.abp.io/en/abp/latest/API/Auto-API-Controllers#version-3-x-style-route-calculation
Markdown supported.Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post) -
0
Ok thanks. Did a bit more investigating. It looks like the default ASP.NET Core model binding works for any casing of query string parameters. So you just need to tell Swagger to use camel casing:
SwaggerGenOptions.DescribeAllParametersInCamelCase()so they appear correctly in the generated API docs.Markdown supported.Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
