Skip to content

[BUG] Generated TypeScript client fails to handle HTTP 204 No Content #7720

@astraljava

Description

@astraljava
Description

When we generate a TypeScript API client from our schema, it generates a correct call for fetching data from backend systems and expects to receive a list in return. This works fine, when we receive HTTP 200 OK and deserialize a JSON object with the aforementioned list.

But if there aren't any data to return, we expect to see HTTP 204 No Content, but the client fails as it attempts to deserialize an empty JSON object.

The schema passes online validation.

openapi-generator version

4.3.1

have tested also with 5.0.0-beta2

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions