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

The OpenAPI validation for "multipart/form-data" is not working properly.

Abierto
#137 5 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
55/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
java
Área
api

Línea de trabajo

The issue is in RequestValidatorImpl where the body for multipart/form-data is null. Start by examining the validation flow for multipart requests in vertx-openapi. Look at the test suite for OpenAPI validation to understand how multipart/form-data is handled. The fix likely involves ensuring the body is properly extracted and passed to the validator. Check the linked image for the exact line (148) in RequestValidatorImpl.

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

Descripción

bug
Version

5.2.0

Context

I have an OpenAPI description for an endpoint with content “multipart/form-data”:

paths:
  /someEndpoint:
    post:
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              required:
                - someFile
                - someValue
              properties:
                someFile:
                  type: string
                  format: binary
                someValue:
                  type: string
            encoding:
              someFile:
                contentType: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet

In Vertx 4, this worked correctly, and I received validation errors for required fields:
for example (if missed) BodyProcessorException - "[Bad Request] Validation error for body multipart/form-data: provided object should contain property someValue"

After migrating to Vertx 5, it was broken, and I got the ValidatorException: "The related request does not contain the required body."

io.vertx.openapi.validation.impl.RequestValidatorImpl:
Image
The body in the request for multipart/form-data is always null, and we got an exception for the required body on 148 line.
Or if the body is not required, then all other validation for form fields will be skipped.

Steps to reproduce

No response

Do you have a reproducer?

No response

Lenguaje dominante
Java
Estrellas
15
Forks
19
Métricas de merge de PR
Sin PR fusionados en 30 d

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 eclipse-vertx/vertx-openapi

Todos los issues de eclipse-vertx/vertx-openapi

Issues similares

Más issues de Java

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.