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

checker: [3.1] add formatMinimum/formatMaximum diff and breaking-change rules

Đang mở
#925 2 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
35/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, tooling

Hướng nghiên cứu

Start with the existing numeric min/max rules, such as request-property-min-set and request-property-max-set, which oasdiff checks lists, and trace how the schema diff reports minimum and maximum changes. Use the base.yaml and revision.yaml reproduction in the issue as a test case, and confirm that the formatMinimum and formatMaximum changes are currently missed. Done means the diff reports these changes and the matching format-min and format-max breaking-change rules fire for the request and response cases.

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

Mô tả

Summary

oasdiff (verified on v1.15.3) does not appear to surface changes to the JSON Schema 2020-12 format-assertion keywords formatMinimum, formatMaximum, formatExclusiveMinimum, formatExclusiveMaximum.

These keywords exist specifically so OpenAPI 3.1 / JSON Schema 2020-12 specs can express bounds on format: date, format: time, and format: date-time string values — something that has no equivalent in OpenAPI 3.0 (where minimum/maximum apply only to numerics).

Reproduction

base.yaml:

openapi: 3.1.0
info: { title: t, version: "1" }
paths:
  /x:
    post:
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                start_date:
                  type: string
                  format: date
      responses: { "200": { description: ok } }

revision.yaml — same, but adds bounds:

                start_date:
                  type: string
                  format: date
                  formatMinimum: "2000-01-01"
                  formatMaximum: "2099-12-31"
$ oasdiff breaking base.yaml revision.yaml
No breaking changes
$ oasdiff diff base.yaml revision.yaml
# (empty — no change detected)

Expected

Symmetric to the existing numeric rules
(request-property-min-set / request-property-max-set etc.), there
should be:

  • request-body-format-min-set
  • request-body-format-max-set
  • request-body-format-min-decreased (breaking when widening)
  • request-body-format-max-increased (breaking when widening)
  • request-parameter-format-min-set (and -max-, -decreased/increased)
  • request-property-format-min-set (etc.)
  • Corresponding response-property-format-* rules

Same severity ladder as the numeric counterparts.

oasdiff checks | grep -i format

format-min/format-max returns nothing in v1.15.3; only the integer/numeric min-set/max-set family is present.

Why it matters

Narrowing the accepted date range on a format: date or format: date-time field — e.g. tightening from "any date" to a
specific representable range — is silently invisible to oasdiff, even though it's exactly the kind of breaking change breaking-change detection exists to surface.

Ngôn ngữ chính
Go
Star
1.4k
Fork
109
Merge trung bình
12 giờ 11 phút
Pull request đã merge (30 ngày)
35

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.