Open JasonSmyr opened 6 years ago
Is there a workaround with autorest directives ?
Is there a workaround with autorest directives ?
I have not figured out one if there is , currently we manually change the code and have a unit test to check incase we forget
This issue is causing us some pain too.
https://github.com/Azure/autorest/blob/master/docs/user/literate-file-formats/configuration.md A workaround with "directives" :
I guess that is a fix.. seems that code gen just needs to use UriKind.RelativeOrAbsolute and all would be covered
@deka that link does not seem to work.
@deka that link does not seem to work. https://github.com/Azure/autorest/wiki/How-Do-I... https://github.com/Azure/autorest/blob/master/docs/proposals/generator-specific-settings/literate-configuration.md
Over a year and still no fix? I have to manually edit this every time I update API clients.
Is there any update on this. We are experiencing the same issue and the given directive workaround is not working.
When generating from a swagger document that uses a relative URL for host, the initialize sets the base URL without saying that it should be UriKind.Relative or possibly UriKind.RelativeOrAbsolute
This causes an exception ""Invalid URI: The format of the URI could not be determined."
private void Initialize() { BaseUri = new System.Uri("/monarch/mapping"); .. }
should be:
private void Initialize() { BaseUri = new System.Uri("/monarch/mapping",UriKind.RelativeOrAbsolute); .. }
fix https://github.com/Azure/autorest/issues/2746 seems to be linked to this as does https://github.com/Azure/autorest.modeler/pull/40 by @olydis