Open kierson opened 5 years ago
👍 Thanks for opening this issue! 🏷 I have applied any labels matching special text in your issue.
The team will review the labels and make any necessary changes.
I would suggest to write a small script in your build/generation process that
replaces the content of all but one runtime.ts
with something like
export * from 'path/to/my/master/runtime';
Allow to generate
runtime.ts
only for projects with multiple clients.My frontend application is consuming many microservices. Each of them has its own swagger definition file. For each of them I generate API client using
typescript-fetch
generator.Now I have two problems:
I've read in other issue about rewriting all typescript generators into single one that you want to put more and more abstraction into
runtime.ts
. I think my issue will be even bigger then. I think runtime should be as thin as possible.For example I would like to have a single
Configuration
for each of API clients.Such code won't compile:
Describe the solution you'd like
Ideally I would to have possibility to:
This would require that generated code depends more on interfaces rather than particular classes. I think this has other advantage like I can pass my own runtime as long as it implements proper interface if I want to customize it somehow.