Hacktoberfest 2026 : les issues que les mainteneurs ont marquées pour octobre, ouvertes et accessibles aux débutants. Parcourir les issues Hacktoberfest

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

Ouverte
#925 2 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Les mainteneurs répondent en général sous 1 jour

Personne n'a encore pris cette issue.

Évaluation

Difficulté
4/5
Temps estimé
3-5 jours
Accessibilité débutants
35/100
Type d'issue
Fonctionnalité
Clarté
Plutôt claire
Activité
Calme
Stack technique
go
Domaine
api, tooling

Piste de recherche

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.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

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.

Langage dominant
Go
Étoiles
1.4k
Forks
109
Merge moyen
19 h 39 min
PR mergées (30 j)
20

Préparer son environnement

Ce projet ne fournit ni conteneur de développement, ni Dockerfile, ni guide de contribution : l'installation est à votre charge. Commencez par son README, et consultez notre guide de la première contribution pour les étapes générales.

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de oasdiff/oasdiff

Toutes les issues de oasdiff/oasdiff

Issues similaires

Plus d'issues Go

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.