microsoft / microsoft/OpenAPI.NET.OData
Provide a way to not generate navigation paths with key
まだ誰も着手していません。
- 主要言語
- C#
- スター
- 240
- フォーク
- 70
- 平均マージ
- 7時間 59分
- マージ済み PR(30日)
- 13
説明
I am new to implementing my first OData service. I am using OData for .NET 8+ with the ODataConventionModelBuilder to generate my model.
When a navigation property references an entity that is indexable, a path is generated of the form
Entity({ID})/NavEntity({ID1}) or Entity/{ID}/NavEntity/{ID1}.
The routing conventions don't include this path. They only support navigation to the NavEntity level. It would be helpful if there were a way to configure the conversion not to generate navigation paths with the key, even though the entity has one. As a practical matter, I'm not sure when I would need to query the navigation property by key, especially if the navigation property is available as a root entity.
As a workaround, I have added code to remove the unsupported paths from the OpenApiDocument before serializing it. As the OData service evolves, this code has to also evolve. If the conversion didn't generate the path with multiple keys, this workaround code would be unnecessary.
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
ODataConventionModelBuilder の変換を、OpenApiDocument の生成およびルーティング規約を通して追跡します。キー付きナビゲーションパスがどこで追加されるかを特定し、次に設定によってそれらを抑制する方法を判断し、生成されたドキュメントでサポートされていないパスが省略され、正しいナビゲーションルートが削除されないことを検証します。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- csharp
- 領域
- api, backend-api-design
- issue の種類
- 機能追加
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 42/100