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

All response types are any #17

Open
jboolean opened this issue Feb 7, 2025 · 3 comments
Open

All response types are any #17

jboolean opened this issue Feb 7, 2025 · 3 comments

Comments

@jboolean
Copy link
Contributor

jboolean commented Feb 7, 2025

All the clients return CancelablePromise<any>, meaning there's effectively no typing on API responses.

I think the issue is openapi-typescript-codegen is unmaintained and does not work. I tried switching to @hey-api/openapi-ts which fixes this issue but generates a very different structure that would be a breaking change.

@spencerlepine
Copy link
Owner

Hey @jboolean, thanks for the feedback! I'll take a look at @hey-api/openapi-ts and release v2.1.0-beta if everything works.

Documentation wasn't quite readable with that library.. I'll see if migrating can help with that too.

@jboolean
Copy link
Contributor Author

jboolean commented Feb 8, 2025

Cool! You may run into the same challenges I did with hey which is that it doesn't seem to do a good job making packaged clients like this library. Filed this ticket hey-api/openapi-ts#1685.

Maybe there's a better solution… but I gave up for now as my use for the printful api is minimal and I'll probably just go without a typed library for now.

@spencerlepine
Copy link
Owner

Ahh, thanks for the heads up, I'll browse around for alternatives then

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