cebe / cebe/php-openapi

Duplicate OperationIds should be considered invalid

Đang mở
#181 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
PHP
Star
500
Fork
99
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

## Expected
Calling `validate` on a `\cebe\openapi\spec\OpenApi` object containing duplicate operationIds will return false.
### Reasoning
[OperationIds MUST be unique among all operations described in the API.](https://spec.openapis.org/oas/v3.1.0#operation-object)

## Actual
Calling `validate` on a `\cebe\openapi\spec\OpenApi` object containing duplicate operationIds returns true.

### Example

```php
$api = Reader::readFromJson(<<validate()); // bool(true)
```

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Hướng nghiên cứu

Reproduce the duplicate-operationId example with Reader::readFromJson, then trace the OpenApi::validate entry point and the validation it delegates to. Check how operations are collected and how uniqueness is represented. Done means the same example returns false, with coverage for duplicate operationIds.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
openapi, php
Lĩnh vực
api, testing-qa
Loại issue
Lỗi
Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
48/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.