Post/Patch/Delete Paths not generated for type casts
まだ誰も着手していません。
評価
調査の方向性
src/Microsoft.OpenApi.OData.Reader/PathItem/ODataTypeCastPathItemHandler.cs から開始し、特に issue で参照されている型キャストパスの処理を確認します。ベース クラス A、派生クラス B を使用し、RequireDerivedTypesConstraintForODataTypeCastSegments を false に設定したケースを再現します。完了条件は、キャスト型の生成されたパスに GET だけでなく POST、PATCH、DELETE も含まれることです。
索引モデルが issue の本文から書いたものです。
説明
When generating an OpenAPI specification of the OData model, it does not generate the post/patch/delete paths for the type cast entities. In my example (see below) CreateJiraIssue is derived from Widget. But it does not generate the paths for post/patch/delete
OData supports post/patch/delete for the cast types! It works when you do an patch request to the correct url. It is also described here:
https://learn.microsoft.com/en-us/odata/webapi-8/fundamentals/entity-routing?tabs=net60%2Cvisual-studio
Assemblies affected
Microsoft.OpenApi.OData (1.6.3)
Steps to reproduce
Create a class A and a derived class B. Add class A as entity set to the odata model.
In the converter settings you need to set RequireDerivedTypesConstraintForODataTypeCastSegments to false.
Expected result
The post/patch/delete paths would be generated for all derived (cast) types.
Actual result
Only the get paths are generated for derived (class) types.
Additional detail
I looked into the code and I have an idea where this is coming from.
The ODataTypeCastPathItemHandler will be used for the path (because of the type cast kind). And there only the Get operation will be set:
- 主要言語
- C#
- スター
- 240
- フォーク
- 70
- 平均マージ
- 7時間 59分
- マージ済み PR(30日)
- 13
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
microsoft/OpenAPI.NET.OData のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
microsoft/OpenAPI.NET.OData#661 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 58/100
microsoft/OpenAPI.NET.OData#852 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
microsoft/OpenAPI.NET.OData#833 ·
-
status:needs-more-information
難易度 4/5 3〜5日 初心者へのやさしさ 42/100
microsoft/OpenAPI.NET.OData#723 · コメント 1 件 · リアクション 1 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 45/100
microsoft/OpenAPI.NET.OData#720 ·
microsoft/OpenAPI.NET.OData の issue をすべて見る
似ている issue
-
[Feat] 조합 영역 구분선 개선 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
-
type/automation type/tech-debt
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
-
t/bug
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
-
ci-failure-cause test-failure
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100