InvalidSpecification raised for OperationId
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- openapi, python
- Lĩnh vực
- api, backend-api-design
Hướng nghiên cứu
Reproduce the regression with the conflicting paths in openapi.yaml and inspect the duplicate OperationId validation introduced while resolving issue #96. Compare the behavior in version 0.3.0 with the controller-qualified operation IDs described here. Done means the intended uniqueness behavior is established and the breaking-change or compatibility behavior is covered and documented.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
The resolution for issue #96 (duplicated OperationID not detected) introduced a breaking-change or regression. Upon updating dependencies to version 0.3.0, the connexion library now reports this error when I run my longstanding openapi.yaml:
connexion.exceptions.InvalidSpecification: Operation ID 'find' for 'get' in '/apikey' is not unique
Each of my path prefixes refers to a different x-openapi-router-controller class; because they share similar logic, I use the same operationId function name for methods like get/find/delete for each of the controllers.
Shouldn't the duplicate detection logic look for a uniqueness across both x-openapi-router-controller and operationId? If my openapi.yaml file needs updating (due to a change in the standard, or my misunderstanding of the standard), then this breaking-change needs to be called out clearly in changelog / release notes.
I'd like it to handle this use-case; for now I'll adjust openapi.yaml to handle this new behavior in 0.3.0 but this could be a huge headache for other users. Perhaps you should add a compatibility flag for such users to transition between now and the next release.
Below is an example of conflicting paths:
/apikey:
get:
summary: Find APIkeys by conditions
operationId: find
parameters:
- description: APIkey ID
...
responses:
200:
...
x-openapi-router-controller: controllers.apikey.APIkeyController
/message:
get:
summary: Find messages by conditions
operationId: find
parameters:
- description: Message ID
...
responses:
200:
...
x-openapi-router-controller: controllers.message.MessageController
- Ngôn ngữ chính
- Python
- Star
- 409
- Fork
- 73
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
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 python-openapi/openapi-spec-validator
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 55/100
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 55/100
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 30/100
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 42/100
python-openapi/openapi-spec-validator#400 · 1 bình luận ·
-
kind/bug/confirmed
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
python-openapi/openapi-spec-validator#373 · 1 bình luận ·
Tất cả issue của python-openapi/openapi-spec-validator
Issue tương tự
-
货币战争手改优先级配置缺少列表元素类型校验(P3) Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
syfoud/Simulated_Scepter#172 ·
-
A cancelled tests run makes the coverage comment workflow fail and reports it as a red check on main Đang mởarea: ci bug perceived difficulty: 3
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Nitjsefnie-Harness-Commons/daedalus#921 · 1 bình luận ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
EleutherAI/lm-evaluation-harness#4207 ·
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 92/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
ClickHouse/clickhouse-connect#1057 ·