Skip to content
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] Update endpoint URL template for TextAnalytics. #3491

Merged
merged 1 commit into from Jul 26, 2018
Merged

[Cognitive Services] Update endpoint URL template for TextAnalytics. #3491

merged 1 commit into from Jul 26, 2018

Conversation

yangyuan
Copy link
Member

@yangyuan yangyuan commented Jul 24, 2018

Detail background and explainations in here: #3489 Cognitive Services URL template (endpoint)

Please hold for TextAnalytics team's review.

This checklist is used to make sure that common issues in a pull request are addressed. This will expedite the process of getting your pull request merged and avoid extra work on your part to fix issues discovered during the review process.

PR information

  • The title of the PR is clear and informative.
  • There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For information on cleaning up the commits in your pull request, see this page.
  • Except for special cases involving multiple contributors, the PR is started from a fork of the main repository, not a branch.
  • If applicable, the PR references the bug/issue that it fixes.
  • Swagger files are correctly named (e.g. the api-version in the path should match the api-version in the spec).

Quality of Swagger

@AutorestCI
Copy link

AutorestCI commented Jul 24, 2018

Automation for azure-sdk-for-python

The initial PR has been merged into your service PR:
Azure/azure-sdk-for-python#2522

@AutorestCI
Copy link

AutorestCI commented Jul 24, 2018

Automation for azure-sdk-for-node

The initial PR has been merged into your service PR:
Azure/azure-sdk-for-node#2828

@AutorestCI
Copy link

AutorestCI commented Jul 24, 2018

Automation for azure-sdk-for-java

The initial PR has been merged into your service PR:
Azure/azure-sdk-for-java#2272

@AutorestCI
Copy link

AutorestCI commented Jul 24, 2018

Automation for azure-sdk-for-ruby

The initial PR has been merged into your service PR:
Azure/azure-sdk-for-ruby#1521

@AutorestCI
Copy link

AutorestCI commented Jul 24, 2018

Automation for azure-sdk-for-go

The initial PR has been merged into your service PR:
Azure/azure-sdk-for-go#2323

"parameters": {
"Endpoint": {
"name": "Endpoint",
"description": "Supported Cognitive Services endpoints (protocol and hostname, for example: https://westus.api.cognitive.microsoft.com).",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please note that the Azure Portal resource "Endpoint" includes the /text/analytics/v2.0. We should make sure the documentation is very clear here, or change it to include the suffix.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, please link to the documentation PR as well.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @assafi, we will update Azure Portal accordingly when we publish SDK.
As in description, I emphasized protocol and hostname and attached an example. Any suggestion how to make it more clear?

What which document you refer to?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you mean by updating the Azure portal?

I'm referring to the TA documentation from your previous PR, which says:

Replace the location in client.BaseUri to the endpoint you signed up for. You can find the endpoint on Azure Portal resource. The endpoint typically looks like "https://[region].api.cognitive.microsoft.com/text/analytics/v2.0".

If you will be using a similar language to describe this you should note that the endpoint from the Azure portal contains a suffix which you exclude in this PR.

Ideally, we should update the SDK and its documentation at the same time, to avoid recent issues like lagging documentation. Which is why I asked the description of this PR to contain a link to the documentation PR.

Copy link
Member Author

@yangyuan yangyuan Jul 25, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will change Azure Portal resource page to remove the suffix to keep consistent. The document will also say:

You can find the endpoint on Azure Portal resource. The endpoint typically looks like "https://[region].api.cognitive.microsoft.com/"

Does it make sense?

About document PR, I agree SDK (actually SDK package) and its documentation should be updated at the same time. But this is swagger PR?
After merge swagger PR, I will send C# SDK PR. I prefer send the documentation PR along with C# SDK PR, because at that time I can test the code in the documents. Also the document won't be accidentally published before NuGet (sometimes you say "please hold", but...)

We don't need to worry about the lagging documentation. It is hard to control when documents get updated, but we can control when to publish NuGet.

But I can send a document PR now if it is your concern.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Regarding the portal update - I don't think we need to change it. Not all users use the SDK, some simply write their own code in whatever language they want and they will need the full URL. It's important not to break existing or future customers just because we changed how a parameter looks in the SDK (because of some other swagger limitation). The solution for this should be better documentation and/or smarter SDK.

Regarding the documentation PR - sure, please attach it to the SDK PR.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved to offline...

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We've agreed to go with baseEndpoint instead of Endpoint at a later update.

@annatisch
Copy link
Member

@assafi and @yangyuan - please let me know when your internal review is complete and I will review.

@yangyuan
Copy link
Member Author

Hi @annatisch we've completed the internal review

@annatisch
Copy link
Member

Thanks @yangyuan - were you going to rename Endpoint -> baseEndpoint in this PR?

@yangyuan
Copy link
Member Author

@annatisch not in this PR.
We have a hard deadline for this PR so will process first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants