checker: [3.1] add formatMinimum/formatMaximum diff and breaking-change rules
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
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-setrequest-body-format-max-setrequest-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
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de oasdiff/oasdiff
-
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
oasdiff/oasdiff#1308 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 15/100
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 3/5 1-2 jours Accessibilité débutants 62/100
oasdiff/oasdiff#1320 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 4/5 3-5 jours Accessibilité débutants 35/100
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 4/5 3-5 jours Accessibilité débutants 30/100
Les mainteneurs répondent en général sous 1 jour
Toutes les issues de oasdiff/oasdiff
Issues similaires
-
goose sub-agent runs are never indexed: blame finds no session for any file a `delegate` child wroteOuvertebug
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
Les mainteneurs répondent en général sous 1 jour
-
triage
Difficulté 2/5 1-3 heures Accessibilité débutants 86/100
wakatime/wakatime-cli#1649 ·
Les mainteneurs répondent en général sous 1 jour
-
PathBuffer.Pop corrupts later error locations when a key contains "." or "["Peut-être pris Une pull request liée à cette issue est ouverte ou déjà fusionnée. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
danielgtaylor/huma#1135 ·
Les mainteneurs répondent en général sous 1 jour
-
needs-triage
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
stacklok/toolhive-catalog#1734 ·
Les mainteneurs répondent en général sous 1 jour
-
Docs: how to get more careful answers (Effort, reasoning models, Reasoning level, Deliberate)Ouvertedocumentation priority:p1
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
yeixio/toskar-core#697 ·
Les mainteneurs répondent en général sous 1 jour