Generated schemas keep OpenAPI `nullable`, so required-but-nullable fields reject null
Los mantenedores suelen responder en 1 día
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 72/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Tranquilo
- Stack tecnológico
- github, javascript, openapi
- Área
- api, build-system, tooling
Línea de trabajo
Empieza por script/build-schema e inspecciona cómo selecciona la instantánea de GitHub OpenAPI; después compara esa fuente con descriptions-next/. Regenera schema/dereferenced/settings.json y valida la configuración nullable mostrada en la issue; se considera terminado cuando required_status_checks y restrictions acepten null con draft 2020-12 sin depender de nullable.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
The schemas in schema/dereferenced/ declare "$schema": "https://json-schema.org/draft/2020-12/schema", but script/build-schema copies subschemas out of GitHub's OpenAPI 3.0 description, which marks null-able fields with nullable: true. That keyword doesn't exist in JSON Schema draft 2020-12, so any compliant validator ignores it and the fields reject null.
This bites exactly where the GitHub API forces null into configs. The update-branch-protection endpoint requires required_status_checks, enforce_admins, and restrictions to be present, and documents "Set to null to disable". A minimal config:
branches:
- name: main
protection:
required_status_checks: null
enforce_admins: true
restrictions: null
fails validation against the current schema/dereferenced/settings.json:
$.branches[0].protection.required_status_checks: None is not of type 'object'
$.branches[0].protection.restrictions: None is not of type 'object'
There are 13-14 nullable: true occurrences per generated file, all silently dropped this way.
GitHub publishes an OpenAPI 3.1 variant of the same spec (descriptions-next/, same dated snapshots). 3.1 is natively JSON Schema 2020-12: those fields are type: [X, "null"] unions and nullable doesn't exist. Pointing the build at it makes the generated schemas actually conform to the dialect they declare, with no post-processing.
- Lenguaje dominante
- JavaScript
- Estrellas
- 924
- Forks
- 227
- Merge medio
- 6 h 8 min
- PR fusionados (30 d)
- 15
Preparar el entorno
Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.
- Incluye un Dockerfile o un archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
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 github-community-projects/safe-settings
-
app_installations reports an error on every repo or suborg change when the plugin is not configuredAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 64/100
github-community-projects/safe-settings#1111 ·
Los mantenedores suelen responder en 1 día
-
Repos transferred into the org are not synced (no repository.transferred handler)Posiblemente ocupada @breymander la tomó hace 4 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
github-community-projects/safe-settings#1107 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dry run only inspects the first 30 changed files (pulls.listFiles is not paginated)Posiblemente ocupada @3rwww1 la tomó hace 27 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
github-community-projects/safe-settings#1080 ·
Los mantenedores suelen responder en 1 día
-
PR comment diff table shows an empty vertical scrollbar due to malformed <tr> markupQuizá libre de nuevo Un pull request para esta issue se cerró sin fusionarse. Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
github-community-projects/safe-settings#1077 ·
Los mantenedores suelen responder en 1 día
-
Bug Report: environment and repo variables API calls don't paginate, failing with more than 10 itemsPosiblemente ocupada @cdav la tomó hace 79 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
github-community-projects/safe-settings#1040 ·
Los mantenedores suelen responder en 1 día
Todos los issues de github-community-projects/safe-settings
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
keyxmakerx/Chronicle#1532 ·
Los mantenedores suelen responder en 1 día
-
enhancement feature good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
-
bug lsp sev-3
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 90/100
Miaotofu01/Study-Mate#206 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 95/100
Uuriko/project-room#3998 ·
Los mantenedores suelen responder en 1 día