Skip to content

OpenAPI generator crashes on oneof void variants #63

@disjukr

Description

@disjukr

Summary

The OpenAPI generator crashes when it tries to emit a component schema for a oneof that contains a void variant.

Current behavior

Running bdlc openapi3 against the generated Swagger petstore BDL fails with GenerateOasError: Unknown primitive type: void.

Expected behavior

oneof variants that use void should still be representable in generated OpenAPI so the overall schema generation can complete.

Impact

This blocks end-to-end OpenAPI regeneration for schemas that model response variants with empty bodies.

Relevant files

  • bdl-ts/src/generator/openapi/oas-30-generator.ts
  • bdl-ts/src/generator/openapi/oas-30-generator.test.ts

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions