Response header schema checks: remaining slices
Maintainer thường phản hồi trong vòng 1 ngày
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
- 48/100
Hướng nghiên cứu
Start from slice 1 (#1116, oasdiff v1.26.0) to see how type/format/nullability checks were added for a response header's schema, then study the request-parameter checkers named as the closest template for walking nested properties and constraints. For part 2, find where ContentDiff is produced for headers and how request/response bodies already classify media types as strongly typed. Done means the new rule ids are registered and covered by tests for both the schema-property walk and the content path, symmetric across request and response headers.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Follow-up to #1094, which is closed now that slice 1 shipped in #1116 (oasdiff v1.26.0). Slice 1 added type, format, and nullability checks on a response header's schema. This issue tracks the rest.
1. Full property machinery for header schemas
Slice 1 only covers the header schema's own type/format/nullability. It does not yet cover:
- Constraints:
pattern,minLength/maxLength,minimum/maximum,enumnarrowing/widening, etc., the same checks response body properties already get. - Nested properties: walking a header schema that is itself an object/array, mirroring how
ResponsePropertyTypeChangedCheckwalks body properties.
This is the "walk header schemas through the same property machinery bodies use" part of #1094, and it is many new rule ids, so it is worth doing in further slices. The request-parameter checkers (which already walk parameter properties) are the closest template.
2. Content-serialized headers
A header can use content instead of schema (e.g. content: application/json) for complex serialization. That value is genuinely JSON, so it would be strongly typed, and it surfaces as a ContentDiff on the header, not a SchemaDiff. The current checks only walk SchemaDiff (the simple text serialization, correctly non-strongly-typed), so content-serialized headers are not checked at all.
This is a symmetric gap: request headers do not cover the content path either today, so both sides can be closed together, classifying the value strongly-typed via its media type the same way request and response bodies already are.
Context
The classification basis for slice 1: a header value is text on the wire, so the schema path is non-strongly-typed (a plain string to integer swap is backward compatible; dropping a parsed format or widening the returned type is breaking). The content path above is the exception that would be strongly typed.
- Ngôn ngữ chính
- Go
- Star
- 1.4k
- Fork
- 109
- Merge trung bình
- 9 giờ 35 phút
- Pull request đã merge (30 ngày)
- 31
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
-
Removing an alternative from the top-level security is reported at infoCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 3/5 Nửa ngày Mức phù hợp với người mới 62/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 45/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 55/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 52/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Changing the `type` of a security scheme in use (apiKey → http bearer) is reported at infoCó thể đã có người làm @reuvenharrison đã nhận 5 ngày trước. Đang mở
Độ 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
Tất cả issue của oasdiff/oasdiff
Issue tương tự
-
automation models
Độ khó 2/5 1-3 giờ 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
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
microsoft/TypeScript#64758 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
SocialGouv/iterion#2369 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
daemon/cluster: imageWithDigestString returns the mirror error even when upstream resolves the tagĐang mở
Độ khó 2/5 1-3 giờ 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
-
area/ci bug priority/p3
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày