`date` → `date-time` (and `time` → `date-time`) is classified as a widening, but a date is not a valid date-time
Maintainer thường phản hồi trong vòng 1 ngày
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 88/100
Hướng nghiên cứu
Bắt đầu với isFormatContained trong checker/check_types.go và bảng containment định dạng của nó; đọc cách request-property-type-generalized và request-property-type-changed được phát ra. Xóa các mục date/time → date-time để những thay đổi đó rơi vào đường dẫn type-changed, sau đó chạy các bài test của checker (tìm các test hiện có khẳng định thông điệp generalized cho trường hợp này) và kiểm chứng bằng các lệnh tái tạo oasdiff breaking và oasdiff changelog từ issue. Xong = thay đổi được báo cáo là lỗi và các cặp integer/number vẫn pass với tư cách widening.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
oasdiff version: 1.33.0
isFormatContained in checker/check_types.go treats date → date-time and time → date-time as a widening (the old format "contained" in the new one). For string formats that does not hold: per RFC 3339 / JSON Schema, 2020-01-01 is a valid date but not a valid date-time (which needs the T, the time and the offset), and 10:00:00Z is a valid time but not a date-time. The value sets are disjoint, so on a request this is a narrowing that rejects every payload that was valid before.
Base (base.yaml)
openapi: 3.0.3
info: {title: t, version: '1'}
paths:
/pets:
post:
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
born: {type: string, format: date}
responses:
'204': {description: ok}
Revision (revision.yaml)
Same, with format: date-time instead of format: date.
Command
oasdiff breaking base.yaml revision.yaml
oasdiff changelog base.yaml revision.yaml
Actual (abridged)
No breaking changes to report, but the specs are different.
1 changes: 0 error, 0 warning, 1 info
info [request-property-type-generalized]
in API POST /pets
the `born` request property `format` was widened from `date` to `date-time`
Expected
An error (request-property-type-changed): a client sending {"born": "2020-01-01"} is rejected by a server validating date-time. The integer/number pairs in the same function (int32 → int64, float → double) are genuine containments; the two string pairs are not, and could simply be dropped from the table so the change falls through to "type changed".
Noticed while comparing results across differs.
- Ngôn ngữ chính
- Go
- Star
- 1.4k
- Fork
- 109
- Merge trung bình
- 11 giờ 5 phút
- Pull request đã merge (30 ngày)
- 32
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
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 oasdiff/oasdiff
-
Độ khó 3/5 Nửa ngày Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Securing an anonymous operation is info, while making a secured operation anonymous is an errorĐang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 75/100
Maintainer thường phản hồi trong vòng 1 ngày
-
A required response property becoming `writeOnly` is reported at info, though it is no longer returnedCó thể đã có người làm @reuvenharrison đã nhận hôm nay. Đang mở
Độ khó 3/5 Nửa ngày Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
changelog --flatten-allof reports changes between two identical specs, at random (cyclic schema behind allOf/oneOf)Có thể đã có người làm @reuvenharrison đã nhận hôm nay. Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 74/100
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của oasdiff/oasdiff
Issue tương tự
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
vanderheijden86/b9s#20 ·
-
go-battery needs an ndsctl on PATH: TestPurchaseSessionGuardHoldsThroughTheOutcomeUnknownWindow fails on bare hosts (passes with stub)Có thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
OpenTollGate/tollgate-module-basic-go#726 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
ux waiting for feedback
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 63/100
evcc-io/evcc#34527 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
phase:v3 type:harness
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày