File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ JsonApiDotnetCore provides a framework for building [json:api](http://jsonapi.or
2222 - [Non-Integer Type Keys](#non-integer-type-keys)
2323 - [Routing](#routing)
2424 - [Namespacing and Versioning URLs](#namespacing-and-versioning-urls)
25+ - [Disable Convention](#disable-convention)
2526 - [Defining Custom Data Access Methods](#defining-custom-data-access-methods)
2627 - [Pagination](#pagination)
2728 - [Filtering](#filtering)
@@ -244,6 +245,24 @@ services.AddJsonApi<AppDbContext>(
244245 opt => opt .Namespace = " api/v1" );
245246```
246247
248+ #### Disable Convention
249+
250+ You can disable the dasherized convention and specify your own template
251+ by using the ` DisableRoutingConvention ` Attribute:
252+
253+ ``` csharp
254+ [DisableRoutingConvention ]
255+ public class CamelCasedModelsController : JsonApiController <CamelCasedModel >
256+ {
257+ public CamelCasedModelsController (
258+ IJsonApiContext jsonApiContext ,
259+ IResourceService <CamelCasedModel > resourceService ,
260+ ILoggerFactory loggerFactory )
261+ : base (jsonApiContext , resourceService , loggerFactory )
262+ { }
263+ }
264+ ```
265+
247266### Defining Custom Data Access Methods
248267
249268By default, data retrieval is distributed across 3 layers:
You can’t perform that action at this time.
0 commit comments