Replies: 1 comment 1 reply
-
|
Hi there, this is currently not supported. Fabrikt uses the individual paths to construct the client (and controller) names. You could define a wrapping StorefrontApiClient facade which delegates to the individual clients, but I get that you would prefer this to happen as part of the generation process. It would be possible to expand Fabrikt to support this behavior via a configuration flag, but it will require quite a bit of refactoring. Creating a wrapper/facade is your best bet, I would say. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Consider this exert from my
openapi.yamlfile, in this instances defines two endpoints mounted at/api/storefront(for reference these are implemented with Django DRF) and I extensively annotated things (as you can see by theSPEC) where each of them are grouped by the sametagandoperationIdso provide the best developer experience on the client side.while
fabriktturns theoperationIdsinto nice method names and where there are multiple operations they are grouped together, it still devices to produce anApiClientclass per from what I can tellTitleCasedversion of the URL endpoints.It would be nice for us to be able to group these together (which what I thought
tagswould do for me) so I would have say theApiStorefrontClientwhich would contain all the methods tagged with thestorefronttag.Either I am misunderstanding OpenApi Tags or how fabrikt thinks of endpoints. I did try and look through the documentation and examples to see what I can do to wrangle it to produce what I need to. I am using the
gradleplugin (for reference).I was hoping someone here can shed some light onto what either I might be doing wrong or if I can make fabrkt work the way I want to.
Beta Was this translation helpful? Give feedback.
All reactions