Skip to content

[Bug]: @opExample generation fails in @versioned namespaces with union + enum #8769

@Grryum

Description

@Grryum

Describe the bug

When a namespace is annotated with @versioned, example generation (@opExample) breaks if the operation’s return type includes a union that references an enum.

The same code works correctly if @versioned is removed.

Reproduction

  1. Create a @versioned namespace.
  2. Define an enum and a discriminated union using that enum.
  3. Add @opExample annotations to an operation returning that union.
  4. Compile or generate OpenAPI — the example generation fails or produces invalid output.

Minimal example here

Checklist

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions