Don't hard-code endpoint URL, allow to provide that form web.config
See original GitHub issueIs there a way to provide endpoint URL from app.config
(or other config method) rather than hard-coding the value?
Here is the scenario: I’m developing API and a client for that API. API will be deployed to Azure API Apps, Client will be a WebApp (MVC application). I would like to be able to run both API and a client locally for development phase. Not a problem, I run API locally, point code generator to the local endpoint, get the models created for me - bang! Then I publish API to Azure, I need to update the URL in the generated code on the client. But if I forget to change the endpoint URL on the client, I get into trouble for using http://localhost:5555 when the client app is deployed in Azure.
So it would be good if I could specify a way to store the endpoint URL in web.config
and on publish stage I could overwrite it for the real endpoint.
I can always change the URL myself and take it from web.config
, but it’ll be overwritten on the next code generation…
Issue Analytics
- State:
- Created 8 years ago
- Comments:11 (7 by maintainers)
Top GitHub Comments
You can pass -useDateTimeOffset flag to AutoRest.exe or even specify it in
x-ms-code-generation-setting
extension.Please create an issue and request the enhancement. It sounds like a good idea and one I’d like to get the rest of the team’s feedback on.
@bradygaster and @mlorbetske, any thoughts on this?