Post/Patch/Delete Paths not generated for type casts
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 54/100
Hướng nghiên cứu
Bắt đầu với src/Microsoft.OpenApi.OData.Reader/PathItem/ODataTypeCastPathItemHandler.cs, cụ thể là phần xử lý đường dẫn ép kiểu được tham chiếu trong issue. Tái hiện trường hợp với lớp cơ sở A, lớp dẫn xuất B và RequireDerivedTypesConstraintForODataTypeCastSegments được đặt thành false. Hoàn tất khi các đường dẫn được tạo cho kiểu được ép kiểu bao gồm POST, PATCH và DELETE cùng với GET.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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:
- Ngôn ngữ chính
- C#
- Star
- 240
- Fork
- 70
- Merge trung bình
- 7 giờ 59 phút
- Pull request đã merge (30 ngày)
- 13
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của microsoft/OpenAPI.NET.OData
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
microsoft/OpenAPI.NET.OData#661 ·
-
Microsoft.OpenApi.OData.Reader.dll ships unversioned (0.0.0.0) since the 2026-01-16 releases Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 58/100
microsoft/OpenAPI.NET.OData#852 ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
microsoft/OpenAPI.NET.OData#833 ·
-
status:needs-more-information
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 42/100
microsoft/OpenAPI.NET.OData#723 · 1 bình luận · 1 reaction ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 45/100
microsoft/OpenAPI.NET.OData#720 ·
Tất cả issue của microsoft/OpenAPI.NET.OData
Issue tương tự
-
type/automation type/tech-debt
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
-
t/bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
-
ci-failure-cause test-failure
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
-
area:auth FE mvp P3
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
klasolsson81/jobbliggaren#1788 ·