-
Notifications
You must be signed in to change notification settings - Fork 5.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cognitive Services URL template (endpoint) #3489
Labels
Comments
10 tasks
Face PR: |
10 tasks
TextAnalytics PR: |
10 tasks
LUIS PR: |
10 tasks
Content Moderator PR: |
bsiegel
added
the
Service Attention
Workflow: This issue is responsible by Azure service team.
label
Sep 26, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Creating this issue for PRs.
Background:
Final Design:
Swagger:
C# Client:
FAQ
Where to find the "Endpoint".
Endpoint is the terminology we've been used for years. You can find the "Endpoint" on the Azure Portal resource.
We will try to provide consistent Endpoint format among Cognitive Services.
We will also try to ensure developers can directly copy the Endpoint without modification.
Why "Endpoint" is a "$ref" parameter.
If we put "Endpoint" definition in
x-ms-parameterized-host.parameters
, autorest will treat the Endpoint parameter as"x-ms-parameter-location": "method"
. Not confirmed but this is probably a bug.When the issue get fixed, we can put "Endpoint" back to
x-ms-parameterized-host.parameters
. No SDK update required.Why "Endpoint" doesn't contain "/face/v1.0".
A couple of reasons:
Swagger 2.0 use "host+basePath+scheme", and when basePath exists, autorest will append basePath to the tail of x-ms-parameterized-host. So to make it possible to support both autorest and other tools, x-ms-parameterized-host can only contain scheme and host.
History Changes:
Some of the SDKs changed to below before change to final design.
This is because:
This design has a flaw that if user forgot to set endpoint, they will get 404 (which is not perfect). The new design, they will get an error "Endpoint should not be null".
As we've found a workaround (use $ref), I think its better to switch to the new design.
The text was updated successfully, but these errors were encountered: