hey-api / openapi-ts

🚀 The OpenAPI to TypeScript codegen. Generate clients, SDKs, validators, and more. Support: @mrlubos
https://heyapi.dev
Other
1.25k stars 98 forks source link

Vue client / vue data loader plugin #1159

Open josh-hemphill opened 1 week ago

josh-hemphill commented 1 week ago

Description

I got something working in the old openapi-typescript-codegen (and the vue specific bits if you want to look at it), and I had a fork to try and shim it in with increasingly complicated templates. I'd love to get something working here that would be more maintainable. I'd love to start on a PR; should it be a plugin or a client? I'm not super clear on the limitations between the two. I tried setting up a repo with the @tanstack/vue-query plugin, but really want to try and get the boilerplate code in vue to be much lower than what I was getting with that plugin.

mrlubos commented 1 week ago

Hey @josh-hemphill! Can you help me understand what problem do you need to solve? I'm not super familiar with Vue

josh-hemphill commented 1 week ago

For a basic Vue client, getting the reactive fetch bindings like @vueuse/fetch, that's what I had implemented using the fork of openapi-typescript-codegen. From experience, it's not really possible to just throw @vueuse/fetch on top of or behind the api codegen/interfaces, it doesn't work out, it requires a bespoke client (unfortunately)