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

Is it possible to fetch file from remote and then generate #99

Closed BioPhoton closed 3 years ago

BioPhoton commented 3 years ago

Is is possible that the generate command resolves files over HTTP?

vmasek commented 3 years ago

Currently, the easiest way to do so is to use for example curl and chain the commands.

curl https://raw.githubusercontent.com/flowup/api-client-generator/master/tests/custom/swagger.yaml -o swagger.yaml &&npm run generate -- -s swagger.yaml -o ./output

This will download and save the swagger.yaml and use the file to generate API client. What would be a nice improvement is an ability to feed the swagger file via stdin so we don't have to save it, this can be added in next release (I'll add it to backlog).