apiclientcodegen icon indicating copy to clipboard operation
apiclientcodegen copied to clipboard

Run command from folder path

Open maxkisung opened this issue 4 years ago • 3 comments

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.

maxkisung avatar Sep 27 '19 22:09 maxkisung

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?

christianhelle avatar Sep 28 '19 06:09 christianhelle

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 ```

maxkisung avatar Sep 28 '19 07:09 maxkisung

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

christianhelle avatar Sep 28 '19 09:09 christianhelle