christianhelle / apiclientcodegen

A collection of Visual Studio custom tool code generators for Swagger / OpenAPI specification files
http://bit.ly/restapicodegen
GNU General Public License v3.0
177 stars 24 forks source link

Run command from folder path #60

Open maxkisung opened 5 years ago

maxkisung commented 5 years ago

Can you have autorest run from the swagger doc's folder path so it can read configuration from a readme.md?

I would be able to override the client name from there.

christianhelle commented 5 years ago

I didn't know AutoRest could do that!! What arguments do I need to pass in for that and how would you structure your README.md for this to work?

maxkisung commented 5 years ago

The documentation is scattered and not consistent. http://azure.github.io/autorest/user/configuration.html https://github.com/Azure/autorest/wiki/How-do-configuration-files-work-with-AutoRest%3F https://github.com/Azure/autorest/tree/master/Samples https://github.com/Azure/autorest/blob/master/docs/user/literate-file-formats/configuration.md

Configuration files can be in json, yaml, or markdown (.md).

Command-line Usage autorest [config-file.md | config-file.json | config-file.yaml] [additional options]

It will automatically find readme.md files. So you wouldn't have to add a command line argument if you used a readme.md. I've only tried it with the readme.md.

for markdown files, autorest will look for this line > see https://aka.ms/autorest and then yaml or json between two sets of ```

christianhelle commented 5 years ago

Thanks for the links! I'll see what I can do!