Skip to content

[BUG] Request body validation is skipped for some paths or HTTP methods #1987

@ScriptShah

Description

@ScriptShah

Describe the bug.

When using request validation in the CLI, request body validation is skipped or reported as unsupported for certain paths or HTTP methods, even when a valid request body schema is defined for the operation.

As a result, invalid request bodies may pass validation without errors, or the CLI may indicate that validation is not supported, leading to incomplete or misleading validation results.

Expected behavior

If a request body schema is defined for an operation, the CLI should validate the request body against that schema for all supported paths and HTTP methods.

Invalid request bodies should consistently fail validation with clear and actionable error messages.

Screenshots

N/A – this is a validation logic issue and does not produce visual UI output.

How to Reproduce

  1. Create or use an AsyncAPI document with a defined request body schema.
  2. Select an operation that maps to a path or HTTP method currently reported as unsupported by the validator.
  3. Run the CLI request validation using a request body that violates the schema.
  4. Observe that validation is skipped or reported as unsupported instead of failing.

🖥️ Device Information [optional]

  • Operating System (OS): Windows 10 / Linux / macOS
  • AsyncAPI CLI version: latest
  • Node.js version: 22.x

👀 Have you checked for similar open issues?

  • I checked and didn't find similar issue

🏢 Have you read the Contributing Guidelines?

Are you willing to work on this issue ?

Yes I am willing to submit a PR!

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    Status

    To Triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions