References to incorrect components should be considered invalid
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
Hướng nghiên cứu
Start with the Reader::readFromJson example and the $api->validate() call, then trace how the response $ref is resolved and validated against the referenced component. Add a regression case for a response referencing an invalid schema component; done means validation rejects the example instead of returning true.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Expected
Referencing a component that does not meet the criteria an object requires should be considered invalid.
Example
A Response object referencing a component that does not contain a "description" should be considered invalid.

Reasoning
"description" is a REQUIRED property for a Response object.
Actual
Referencing a component that does not meet the criteria an object requires is considered valid.
Example
$api = Reader::readFromJson(<<<JSON
{
"openapi": "3.0.0",
"info": {
"title": "Test API",
"version": "1.0.0"
},
"paths": {
"/path": {
"get": {
"responses": {
"200": {
"\$ref": "#/components/schemas/notAResponse"
}
}
}
}
},
"components": {
"schemas": {
"notAResponse": {
"type": "integer"
}
}
}
}
JSON);
var_dump($api->validate()); // bool(true)
- 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
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
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 cebe/php-openapi
-
Deprecated warnings in PHP 8.2 Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 48/100
cebe/php-openapi#250 ·
-
BC break in 1.8 Đang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
cebe/php-openapi#247 · 1 bình luận · 1 reaction ·
-
php 8.4 deprecations Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 58/100
cebe/php-openapi#245 · 3 bình luận ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 52/100
cebe/php-openapi#242 · 6 bình luận · 1 reaction ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 55/100
cebe/php-openapi#238 ·
Tất cả issue của cebe/php-openapi
Issue tương tự
-
tooling
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
UX
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
ProfessionalWiki/NeoWiki#1525 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
bug customer-reported
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
MagnaCapax/PMSS#949 ·
-
responsive-media kses allow-list strips clipPathUnits, collapsing objectBoundingBox clip paths Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
Automattic/static-site-importer#1829 ·