Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

Refresh openapi.yaml and remove spec workarounds fixed upstream

Abierto
#463 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 3 días

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
58/100
Tipo de issue
Refactorización
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
git, openapi, swift

Línea de trabajo

Read Makefile, Scripts/prepare_openapi.py, and the three named workaround scripts, then run make generate to compare regenerated output. Remove the scripts and calls only if the output is unchanged; update the Makefile comment with fork commit 87d1f6f. Run swift package diagnose-api-breaking-changes on the regeneration diff and follow CONTRIBUTING.md under “Generated types” for any breaks.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

The upstream openai-openapi spec has fixed three of the problems that Scripts/prepare_openapi.py works around. Against a fresh download of upstream openapi.yaml, each of these scripts is now a no-op:

Script Upstream state
Scripts/fix_rounded_int64_bounds.py Exact bounds (-9223372036854775808 / 9223372036854775807), no rounded values left
Scripts/fix_boolean_exclusive_minimum.py exclusiveMinimum is numeric everywhere, no boolean form left
Scripts/fix_recursive_reference.py No $recursiveRef left; CompoundFilter now references itself with a plain $ref

Tasks

  • Run make generate to refresh openapi.yaml and regenerate Components.swift
  • Remove the three scripts above and their calls in Scripts/prepare_openapi.py, after confirming the regenerated output is unchanged without them
  • Run swift package diagnose-api-breaking-changes on the regeneration diff and handle any breaks as described in CONTRIBUTING.md (Generated types)
  • Document fork commit 87d1f6f ("Unwrap nullable anyOf discriminator properties in oneOf switch cases") in the Makefile comment, which currently lists only the other three required generator changes

Workarounds that are still needed

Checked at the same time, for reference:

  • Generator fork, nullable anyOf: [T, {type: null}]: not supported upstream (apple/swift-openapi-generator#928, #931 and #933 closed unmerged; #831 open)
  • Generator fork, discriminators without mapping: openai/openai-openapi#542 still open; 138 unmapped discriminators have runtime values that differ from schema names
  • Generator fork, colliding discriminator values: message still collides in Item, ItemResource, RealtimeConversationItem, BetaItem and BetaItemResource
  • remove_unsupported_webhooks.py: the spec still has top-level webhooks; generator fix apple/swift-openapi-generator#734 is still open
  • remove_required_properties.py: all six entries are still required in the spec without being declared as properties
  • Typealias stripping in extract_components.py: still triggered (100 lines stripped on the last run)
Lenguaje dominante
Swift
Estrellas
2.9k
Forks
519
Merge medio
4 d 9 h
PR fusionados (30 d)
13

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de MacPaw/OpenAI

Todos los issues de MacPaw/OpenAI

Issues similares

Más issues de Swift

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.