flatten: allOf silently drops 3.1-specific schema keywords
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 60/100
Línea de trabajo
Start in flatten/allof/merge_allof.go and read how the existing MinItems/MaxItems and type-conflict logic merges subschemas. Pick one of the easy items, such as Const or MinContains/MaxContains, and add its merge rule following that pattern. Check docs/ALLOF.md for the documented field list. Done means the keyword is merged or reports a conflict, with a test covering it.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Follow-up to #868 / #873.
flatten/allof/merge_allof.go doesn't reference any 3.1-specific schema keyword introduced by JSON Schema 2020-12. Every one of the 18 keywords below is silently dropped from the merged schema today — same class of bug as the numeric exclusiveMinimum / exclusiveMaximum issue that #873 just fixed.
Verified by grepping each field name against flatten/allof/merge_allof.go on main after #873 merge — zero references for all of them.
Easy — mirror existing patterns
Small, mechanical fixes. Land each in its own PR (or in one small batch).
-
Const— must be equal across subschemas; conflict if not (mirrors existing type-conflict logic). High priority — likely to appear in real specs. -
MinContains/MaxContains— mirrorsMinItems/MaxItems(most-restrictive wins). -
ContentMediaType/ContentEncoding— string equality, conflict if mismatched. -
DependentRequired— union ofmap[string][]stringentries. -
$defs(Defsin kin-openapi) — copy/merge by name.
Medium — schema-valued, need recursive merge
-
Contains/PropertyNames— single*SchemaRef; the conjunction is the merged schema of all subschemas' values. -
PatternProperties/DependentSchemas—Schemasmap; merge by key with recursive merge on value collisions. -
PrefixItems—SchemaRefsslice; merge position-by-position.
Hard — semantics don't compose cleanly
For these, we should decide at the product level whether flatten errors out (safer) or silently approximates (today's behavior, but the result may be misleading).
-
If/Then/Else— conditional logic; the conjunction of twoif/then/elseschemas can't be expressed as a singleif/then/elsein general. -
UnevaluatedItems/UnevaluatedProperties— semantics depend on which sibling keywords were considered "evaluating"; merging changes that context.
Out of scope
A few non-3.1 fields are also not merged today (XML, ExternalDocs, Example, Deprecated, AllowEmptyValue) and are documented as such in docs/ALLOF.md. Those are a separate decision.
- Lenguaje dominante
- Go
- Estrellas
- 1.4k
- Forks
- 109
- Merge medio
- 12 h 11 min
- PR fusionados (30 d)
- 35
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de oasdiff/oasdiff
-
Discriminator mapping keys are listed in a random orderPosiblemente ocupada @reuvenharrison la tomó hace 3 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
Removing an alternative from the top-level security is reported at infoPosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abierto
Dificultad 3/5 Medio día Aptitud para principiantes 62/100
Los mantenedores suelen responder en 1 día
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 45/100
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 55/100
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 52/100
Los mantenedores suelen responder en 1 día
Todos los issues de oasdiff/oasdiff
Issues similares
-
docs(prompt): filer socket fragment hardcodes an issue-intent cap of 8 that Chore runs overrideAbiertoagent-butler-finding chore
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
jordansmall/spindrift#5128 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 84/100
Los mantenedores suelen responder en 2 días
-
License GOtome under Apache 2.0 instead of AGPL-3.0Posiblemente ocupada @praetorianer777 la tomó hoy. Abiertoarea:workflow documentation
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
praetorianer777/GoTome#212 ·
Los mantenedores suelen responder en 1 día
-
ci: pin Go version in Build and Unit Test workflows (>=1.26.6 floats to 1.27.2 and breaks golangci-lint)Posiblemente ocupada @leninmehedy la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 87/100
hashgraph/solo-weaver#1255 ·
Los mantenedores suelen responder en 1 día
-
area/infra backlog type/chore
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
praetorianer777/Stator#374 ·
Los mantenedores suelen responder en 1 día