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

feat: add --json / --output-format=json flag for structured error output in CI pipelines

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

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
65/100
Tipo de issue
Nueva funcionalidad
Claridad
Bien especificado
Estado de actividad
Tranquilo
Stack tecnológico
openapi, python
Área
api, cli, devtools

Línea de trabajo

Look at the existing CLI output formatters in the codebase, likely in a module like openapi_spec_validator/cli.py or openapi_spec_validator/formatters.py. Study how spectral and vacuum implement JSON output. The first step is to add a --format json argument to the CLI parser and create a new formatter class that outputs structured error objects with the specified fields. Test by running the validator on a sample spec and verifying the JSON output is valid and contains the expected keys.

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

Descripción

The CLI currently outputs human-readable error messages, which works well for interactive use but is harder to parse in CI/CD pipelines or editor integrations.

Issue #160 ("No specific error information available", open since 2022) highlights how vague error messages make debugging difficult. A structured JSON output mode would solve this by emitting parseable error objects with:

  • path: the location in the spec where the error occurred
  • message: human-readable description
  • rule: the specification rule that was violated (e.g. openapi.3.1.schema-validation)
  • severity: error / warning / info
  • suggestion: (optional) guidance on how to fix

This could be activated via --format json or controlled through the Python API by passing a structured formatter. Existing validators like spectral (--format json) and vacuum already support this pattern.

The openapi-core ecosystem would also benefit — consumers like prism or openapi-core could consume structured validation results without string-parsing output.

Lenguaje dominante
Python
Estrellas
409
Forks
73
Métricas de merge de PR
Sin PR fusionados en 30 d

Guía de contribución

Abrir la guía de contribución

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 python-openapi/openapi-spec-validator

Todos los issues de python-openapi/openapi-spec-validator

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.