Skip to content

Support default response in OpenAPI endpoint parsing #38

@halotukozak

Description

@halotukozak

Description

ClientGenerator.kt:171 resolves the return type by filtering responses whose key starts with "2". The OpenAPI default response is ignored entirely. When an endpoint only defines a default response (without explicit 2xx), the generated function returns Unit even though a response schema exists.

Acceptance criteria

  • ClientGenerator falls back to default response schema when no explicit 2xx response is defined
  • When both 2xx and default are present, 2xx takes precedence
  • Tests cover endpoints with only default response, and with both default + 2xx

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions