http service: /swagger returns 500 because of a mis-indented requestBody schema in the broken site report batch endpoint
Los mantenedores suelen responder en 3 días
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 1/5
- Tiempo estimado
- Menos de una hora
- Aptitud para principiantes
- 78/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- openapi, python
- Área
- backend-api-design
Línea de trabajo
Encuentra el docstring de batch_prediction_broken_site_report, que documenta POST /<model_name>/predict/broken_site_report/batch. Empieza corrigiendo la indentación de reports: y sus elementos secundarios bajo properties:. Luego llama a /swagger para confirmar que la especificación se carga; añadir una prueba para ese endpoint ayudaría a detectar errores similares.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
The /swagger endpoint of the http service fails with a 500:
File ".../apispec/ext/marshmallow/schema_resolver.py", line 290, in resolve_schema_dict
for k, v in schema["properties"].items()
AttributeError: 'NoneType' object has no attribute 'items'
The spec is generated from the docstrings of all routes, and the failing one is batch_prediction_broken_site_report (POST /<model_name>/predict/broken_site_report/batch). In its requestBody schema, reports: is at the same indentation level as properties: instead of being nested under it:
schema:
type: object
properties:
reports:
type: array
...
so properties is parsed as null. It dates back to bb54c090 (#3846). Since a single bad route makes the whole spec fail, /swagger (and the /doc page using it) are broken for every endpoint.
Fix: indent reports: (and its children) under properties:. A test calling /swagger would catch similar docstring mistakes in the future.
- Lenguaje dominante
- Python
- Estrellas
- 579
- Forks
- 369
- Merge medio
- 3 d 5 h
- PR fusionados (30 d)
- 139
Preparar el entorno
- 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 mozilla/bugbug
-
Replace the direct useag of `recorder.record()` in agent with the tool usagePosiblemente ocupada @SanyaKor la tomó hace 10 días. Abiertohackbot
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 3 días
-
hackbot
Dificultad 2/5 1-3 horas Aptitud para principiantes 73/100
Los mantenedores suelen responder en 3 días
-
hackbot
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
Los mantenedores suelen responder en 3 días
-
Fix ASYNC109 Ruff violationsPosiblemente ocupada @reginaldalfret la tomó hace 44 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
mozilla/bugbug#6987 · 1 comentario ·
Los mantenedores suelen responder en 3 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 3 días
Todos los issues de mozilla/bugbug
Issues similares
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 77/100
canonical/paas-charm#407 · 1 comentario ·
Los mantenedores suelen responder en 5 días
-
bug
Dificultad 1/5 Menos de una hora Aptitud para principiantes 90/100
FAIRmat-NFDI/pynxtools-spm#136 ·
Los mantenedores suelen responder en 1 día
-
enhancement tooling
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
Los mantenedores suelen responder en 1 día
-
`read_nexus` entry point points to a function that no longer existsPosiblemente ocupada @RubelMozumder la tomó hoy. Abiertoannotator bug
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
FAIRmat-NFDI/pynxtools#876 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
[Bug]: HTTP 499 (Client Closed Request) is classified as a non-retryable format_error, so a mid-flight abort fails the turn over instead of retryingPosiblemente ocupada @yipinghuang1991 la tomó hoy. Abiertocomp/agent P2 type/bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
NousResearch/hermes-agent#156837 ·
Los mantenedores suelen responder en 1 día