[api] Validate a config without starting a run

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

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
54/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
python
Área
api, backend

Línea de trabajo

Start by tracing POST /v1/run to find where request configs are merged with default.yaml and where world settings, agents, behavior services, and attacks are checked; review the related work in #214. Add a validation endpoint that runs checks without starting simulator components and returns 200 for valid configs or 422 with field paths for errors. Done means the endpoint accepts the same config shape as /v1/run and reports those results.

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

Descripción

Problem or motivation

Config errors are reported only after POST /v1/run has started the components: with --manage-components, the SUMO and CARLA adapters are started before the scenario reads agents, behavior services and attacks. A client learns about a typo from a failed task.

Scenario Manager builds configs in its editor and needs to show these errors to the user before a run. Without an API for it, the client has to duplicate the config rules of OpenCDA and keep them in sync.

Proposed solution
  • Add POST /v1/validate that takes the same config as POST /v1/run.
  • Merge it with default.yaml and run the config checks that do not need a running simulator: world settings, agents, behavior services and attacks (see #214).
  • Return 200 for a valid config, otherwise 422 with a list of errors, each with the field path.
Area

Scenario management

Lenguaje dominante
Python
Estrellas
11
Forks
11
Merge medio
1 d 16 h
PR fusionados (30 d)
12

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 CAVISE/OpenCDA

Todos los issues de CAVISE/OpenCDA

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.