flatten: replace redirectSchemaRefs reflection with kin's SchemaRef.WalkSubtree
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
- 45/100
Línea de trabajo
First check whether the go.mod dependency on getkin/kin-openapi resolves to a release containing getkin/kin-openapi#1267 (SchemaRef.WalkSubtree); the issue explicitly forbids swapping before that. Then locate redirectSchemaRefs (introduced by #1233, the self-referential identity repair after MergeSpec) and replace it with the s.WalkSubtree callback sketched in the issue. Verify coverage against the two-object-cycle fixtures and the tests added for #1233, confirming the repointed ref's subtree is still reached despite the walker's *Schema seen-guard, then run the full go test suite.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
#1233 repairs self-referential identity after MergeSpec's write-back with redirectSchemaRefs, a reflection-driven walk over the merged subtree. Reflection was chosen because no exported per-schema walker existed: kin's WalkSchemas starts at the document, and its subtree descent is unexported.
That walker now exists upstream: getkin/kin-openapi#1267 adds SchemaRef.WalkSubtree (same descent, cycle guard, and SkipSubtree semantics as WalkSchemas, scoped to one schema), fixes three subschema keywords the descent was missing (unevaluatedItems, unevaluatedProperties, contentSchema), and adds a type-driven completeness gate so a new Schema field cannot be silently skipped.
Once a kin release carrying #1267 is picked up, replace redirectSchemaRefs with a WalkSubtree callback:
_ = s.WalkSubtree(func(_ string, ref *openapi3.SchemaRef) error {
if ref.Value == m {
ref.Value = s.Value
}
return nil
})
(One nuance to verify at swap time: the walker's seen-guard dedups by *Schema, and the repair must still reach a repointed ref's subtree; the current reflection walk recurses into the redirected target, so the replacement should confirm equivalent coverage on the two-object-cycle fixtures.)
The traversal's field list then lives in kin, next to the Schema type it enumerates, maintained once for every consumer — the reason the reflection version was always an interim. Do not swap before the kin dependency is on a release containing #1267.
- 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 2 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
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
Los mantenedores suelen responder en 1 día
-
accepted bug wg/agentic-context
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
vllm-project/semantic-router#4922 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
[Bug] Extraction-mode autogen returns pod templates in random order for map-keyed CRDs, so deny and report messages change between runsPosiblemente ocupada @ManojLamani la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
kyverno/kyverno#17980 · 1 reacción ·
Los mantenedores suelen responder en 1 día
-
raised-by:reviewer
Dificultad 1/5 1-3 horas Aptitud para principiantes 84/100
medici-finance/assay#2681 ·
Los mantenedores suelen responder en 1 día
-
bug triaged
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
fullsend-ai/fullsend#8353 · 4 comentarios · 1 reacción ·
Los mantenedores suelen responder en 1 día