Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(client): Handle empty responses #2397

Open
rozzilla opened this issue Apr 15, 2024 · 1 comment
Open

feat(client): Handle empty responses #2397

rozzilla opened this issue Apr 15, 2024 · 1 comment
Assignees

Comments

@rozzilla
Copy link
Contributor

Given an OpenAPI schema containing no body (f.e. for a 204 status code):

"/public/internal/test": {
      "get": {
        "responses": {
          "204": {
            "description": "Default Response"
          }
        }
      }
    },

We currently return export type GetPublicInternalTestResponses = undefined; while we should return this type:export type GetPublicInternalTaxAccountsResponses = FullResponse<unknown, 204>

P.S. This has already been addressed on #2338 but only for the front-end (not the TypeScript types).

@leorossi
Copy link
Contributor

This is similar to #2338 where the fix was in the implementation.

Having something like this for the response would help

@leorossi leorossi self-assigned this Apr 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants