microsoft / microsoft/OpenAPI.NET.OData

NavigationProperty has all possible methods, while base endpoint only has GET available.

Open
#569 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
240
Forks
70
Avg merge
7h 59m
Merged PRs (30d)
13

Description

Im pretty new to C# development, so let me know if i need to include more details!

I am trying to use metadata (edmx file) from Business Central to generate swaggerUI docs for our custom API, but im having issues with navigation properties.

The base endpoint gets converted properly, only showing the valid methods for the endpoint:
image

But the NavigationProperty endpoints seem to get generated with no regard to the base endpoint:
image

I tried to use the "RequireDerivedTypesConstraintForBoundOperations" parameter in the ConvertSettings of the OoasUtil tool, with no luck.

Is there a way for me to either configure the converter or edit my edmx file in order to only show actually available methods for "nested" endpoints?

NavigationProperty for EntityType company:
image

EntitySet for custLedgerEntries endpoint:
image

Contributor guide

Open the contributing guide

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.

Research direction

Reproduce the conversion with the Business Central EDMX and compare the generated methods for the base endpoint and its NavigationProperty endpoints. Start with ConvertSettings, including RequireDerivedTypesConstraintForBoundOperations, and inspect the converter entry point used by OoasUtil. Done means nested endpoints expose only methods actually available for them.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
api
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.