Skip to content

[BUG]: Generator does not validate template parameter types (invalid values silently ignored) #1845

@sahillllllllll-bit

Description

@sahillllllllll-bit

Describe the bug.

The AsyncAPI Generator does not validate template parameter types. When an invalid value is provided for a template parameter (e.g., a non-boolean value for a boolean parameter), the generator silently accepts it and proceeds with generation without any error or warning.

Expected behavior

When a template parameter is provided with an invalid type (for example, a non-boolean value for a boolean parameter like singleFile), the AsyncAPI Generator should fail and display a clear, descriptive validation error instead of proceeding with generation.

Screenshots

Image

How to Reproduce

  1. I first ran the AsyncAPI Generator with an invalid template parameter value:
    asyncapi generate fromTemplate asyncapi.yaml @asyncapi/html-template -o output -p singleFile=abc
    
  2. I observed that the generator started and completed successfully without showing any error or warning.
  3. I checked the generated output and confirmed that the invalid parameter value was silently ignored.

🖥️ Device Information [optional]

  • Operating System (OS):Windows(WSL)
  • Browser:N/A
  • Browser Version:N/A

👀 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

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions