Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

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

オープン
#137 コメント 5 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
55/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
java
領域
api

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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

主要言語
Java
スター
15
フォーク
19
PR マージ指標
30日以内にマージされた PR はありません

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

eclipse-vertx/vertx-openapi のほかの issue

eclipse-vertx/vertx-openapi の issue をすべて見る

似ている issue

Java の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。