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

multiple status response does not work with the group #28

Closed
tnraro opened this issue Mar 26, 2023 · 2 comments
Closed

multiple status response does not work with the group #28

tnraro opened this issue Mar 26, 2023 · 2 comments

Comments

@tnraro
Copy link

tnraro commented Mar 26, 2023

I tried to run the following code with the group.

new Elysia()
  .group("/", app =>
    app.get('/', () => "", {
      schema: {
        response: {
          200: t.String(),
          400: t.String()
        }
      }
    })
  ).listen(8080);

And, the following error occurs on the server.

u?.response?.Check is not a function. (In 'u?.response?.Check(d)', 'u?.response?.Check' is undefined)

My elysia version is 0.3.1

@SaltyAom
Copy link
Member

SaltyAom commented Mar 26, 2023

Thanks for reporting, this issue is likely to happen when Elysia is migrating from OpenAPI Schema 2.0 to 3.0.

Should be fixed with 8d00a56 and added your code sample as a test case here to prevent this from happening in the future

Please update to 0.3.2 to verify if the problem still persists.

@tnraro
Copy link
Author

tnraro commented Mar 28, 2023

Thank you for the update. The issue has been resolved.

However, I wanted to bring to your attention that some plugins are causing type errors after updating to elysia version 0.3.2. This issue is currently being tracked under #29. Thank you for your continued assistance in resolving this matter.

@tnraro tnraro closed this as completed Mar 28, 2023
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