OData / OData/AspNetCoreOData

ODataConventionModelBuilder.EnableLowerCamelCase() breaks navigation properties

Open
#391 4 comments 1 reaction 1 assignee View on GitHub

@xuzhg is already working on this.

Since Nov 30, 2021.

Fixed investigating
Dominant language
C#
Stars
505
Forks
186
PR merge metrics
No merged PRs in 30d

Description

Hi,

Following on from my comment on issue #251 (https://github.com/OData/AspNetCoreOData/issues/251#issuecomment-937673732), I attach a sample demonstrating the problem (Microsoft.AspNetCore.OData v8.0.4).

Initially, the sample code has ODataConventionModelBuilder.EnableLowerCamelCase() commented out.

If you run the sample in IIS Express and navigate to https://localhost:44310/$odata, the list of mapped endpoints is as listed below.

However, uncommenting EnableLowerCamelCase() (Startup.cs, Line 67) and running again results in the loss of 4 endpoints (bold + italic below).

  • odata/ProductGroups
  • odata/ProductGroups/$count
  • odata/ProductGroups({key})
  • odata/ProductGroups/{key}
  • odata/ProductGroups({key})/ODataSample.Models.ProductGroup
  • odata/ProductGroups/{key}/ODataSample.Models.ProductGroup
  • odata/ProductGroups({key})/Products
  • odata/ProductGroups/{key}/Products
  • odata/ProductGroups({key})/Products/$count
  • odata/ProductGroups/{key}/Products/$count
  • odata/$metadata
  • odata

This worked fine in v7.5.11.

ODataSample.zip

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.