flowup / api-client-generator

Angular REST API client generator from Swagger YAML or JSON file with camel case settigs
MIT License
115 stars 21 forks source link

Restriction of subsets of swagger-files used for generation #86

Open paveltobias opened 4 years ago

paveltobias commented 4 years ago

A single swagger-file might:

Currently there is no way to restrict which definitions and paths/endpoints will be used for model+service generation, i.e. some of them might be superfluous for a given front-end. It would be nice to have (at least) one of the following features:

Does it sound reasonable?

vmasek commented 3 years ago

As of right now, the tags might be able to solve this. With each endpoint, you can specify a tags string array in to distinguish the endpoints used for "user-consumption" and for "other-purposes" and then generate only certain tags. But this would group all the endpoints under one tag to the same service.

ad x-acg-omit: true I can see the benefit of being able to specify it manually, but I'm not sure if such a feature is needed as auto-gen tools will not support it and you'd always have to manually edit the swagger file, which is close to manually deleting such methods from API service or ignoring them.

ad PCRE this could be more useful as you could use the "path based filter" on more use-cases than just this one.


It would be nice to see if there are similar needs coming from more users.