openapi-ts icon indicating copy to clipboard operation
openapi-ts copied to clipboard

Pinia Colada plugin

Open ThatOneCalculator opened this issue 1 year ago • 14 comments

Please vote on this issue if you're interested in Pinia Colada plugin.

This issue will serve as a to-do list during development. To help us release this feature as quickly as possible, feel free to share the minimum requirements for your use case.

ThatOneCalculator avatar Nov 07 '24 13:11 ThatOneCalculator

Hey @ThatOneCalculator, let me put a vote on this issue and I will pick it up if there's a sufficient interest!

mrlubos avatar Nov 07 '24 13:11 mrlubos

I'm also interested in this, can try implementing a plugin myself later.

taskylizard avatar Dec 01 '24 09:12 taskylizard

Feel free @taskylizard! Would you like to add it to community plugins or possibly even this repository?

mrlubos avatar Dec 01 '24 10:12 mrlubos

Hopefully this repository, however I probably won't get far on my implementation if it doesn't work out.

taskylizard avatar Dec 01 '24 10:12 taskylizard

No problem at all, I could pick it up after you. I suggest doing only the plugin for experimental parser, unless you need support for OpenAPI 2.0 for some reason, since that is not supported in the experimental parser yet.

mrlubos avatar Dec 01 '24 12:12 mrlubos

This would also solve my issue #1159

josh-hemphill avatar Dec 11 '24 23:12 josh-hemphill

@josh-hemphill Can you explain how? Your issue is about a different library/client?

mrlubos avatar Dec 11 '24 23:12 mrlubos

@mrlubos I think Josh is saying that because Pinia Colada is a first-class Vue library, and having support for Pinia Colada would negate the need for a Vue/@vueuse/fetch client

ThatOneCalculator avatar Dec 12 '24 00:12 ThatOneCalculator

Yes, @ThatOneCalculator is correct. Also, while my issue might not have communicated it well, vueuse/client needed a lot of rewriting to work well in an SDK-like implementation. I only mentioned it since I had already done that for the old openapi-typescript-codegen, and had been trying to use that but wanted to reimplement it in this repo. But with vueuse/fetch's limitations Pinia Colada would be a much better option, and out of the box supports the Vue data loader RFC I had mentioned as well.

josh-hemphill avatar Dec 12 '24 00:12 josh-hemphill

I went ahead and created a rough plugin for this, and could use feedback on the PR (#1680 )

Should be able to import the plugin after the typescript plugin and that's all it should need; it does it's own sdk output like the tanstack plugins do.

josh-hemphill avatar Feb 07 '25 00:02 josh-hemphill

Man, great work!

mrlubos avatar Feb 07 '25 00:02 mrlubos

Hey guys, sorry for my lack of response, I've unfortunately been busy with life and was unable to attend to this. Hope Josh's PR gets merged, and good luck to your project! I've been using the generator in 2 personal projects, and they've brought me immense joy in what had been a painful process with the other libraries.

taskylizard avatar Feb 07 '25 13:02 taskylizard

Thank you @taskylizard! I'm sure it will get merged, it's looking great!

mrlubos avatar Feb 07 '25 17:02 mrlubos

Very interested in this. We're planning to migrate to Pinia shortly, and enforcing OpenAPI specs for all APIs going forward. This would be huge 🙌

Swivelgames avatar Mar 28 '25 18:03 Swivelgames

Interested.

9M6 avatar Jun 03 '25 10:06 9M6

@josh-hemphill is your plugin still compatible with current developments, ie can it be rebased? What needs to be done to finalize it?

Jogai avatar Jun 26 '25 09:06 Jogai

@Jogai I plan to have a look at it after SDKs get more polished. We spoke with @josh-hemphill last month about this

mrlubos avatar Jun 26 '25 10:06 mrlubos

I needed to rework the SDK output to inherit from the actual SDK plugin for an MVP (there's still some Pinia Coloada features that aren't really implemented well yet); compared to that, rebasing and changing some of the options/interfaces to adhere to the recent updates shouldn't be too much work, but I'm currently focused on a couple of other projects that are blocking each other, so it might be a bit before I'm able to get back to this

josh-hemphill avatar Jun 26 '25 20:06 josh-hemphill

@josh-hemphill yeah don't spend time on it now please, I plan to look at it after I polish SDKs more and don't want your effort go to waste in case of changes

mrlubos avatar Jun 26 '25 20:06 mrlubos