Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Response header schema checks: remaining slices

Đang mở
#1,117 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

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
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Ít trao đổi
Công nghệ
go
Lĩnh vực
api

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, enum narrowing/widening, etc., the same checks response body properties already get.
  • Nested properties: walking a header schema that is itself an object/array, mirroring how ResponsePropertyTypeChangedCheck walks 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

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của oasdiff/oasdiff

Tất cả issue của oasdiff/oasdiff

Issue tương tự

Thêm issue về Go

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.