notonthehighstreet / svelte

Dynamic Ruby API Client from Swagger JSON Spec
MIT License
48 stars 17 forks source link

Option to run Svelte without path_builder #21

Open telekid opened 5 years ago

telekid commented 5 years ago

Howdy!

First, just wanted to say thank you for building such a great tool. We're very happy to have found a swagger client that doesn't require us to muck around with codegen.

We're experimenting with a modified version of Svelte that foregoes the creation of the module hierarchy. This allows us further decouple API implementation details (like endpoint paths) from method calls. As an added bonus, it makes method names much shorter. See this PR for more info.

That brings me to my question - would you be interested in accepting a PR that allows Svelte to run without generating the module hierarchy? It wouldn't be much work to modify the above PR to make this a configurable option. We'd love to contribute to Svelte, and it would be great to not need to rely on our own fork if possible.

Let me know what you think. Thanks!

brafales commented 5 years ago

Hey @telekid, thanks a lot for raising this, it looks great and I think we'd be happy to make this a configurable option. I'm at the moment a bit busy on paternity leave 😱 but I promise to take a look when I'm back, which should be some time next week.

telekid commented 5 years ago

Merging PRs from strangers isn’t as important as your new kid? 😂 Congrats - that’s super exciting.

When you do have a minute, let me know what you’d like the configuration API to look like so I can open a PR. No rush though, obviously.

brafales commented 5 years ago

Hi! I think we should add another key in the options parameter hash. What to name it and its options though... hard, as usual :)

Can you think of any names? Something on the lines of module_strategy and allowing verbose and compact. Happy to go with other suggestions.

telekid commented 5 years ago

Just wanted to stop by and say I haven't forgotten about this issue. I had to get it on a sprint for work, and it looks like I'll have time allocated sometime in the next four weeks.