Skip to content

[Azure Search] Add autocomplete to data plane spec for 2017-11-11-Preview#3106

Merged
sarangan12 merged 7 commits intoAzure:masterfrom
mhko:auto
May 21, 2018
Merged

[Azure Search] Add autocomplete to data plane spec for 2017-11-11-Preview#3106
sarangan12 merged 7 commits intoAzure:masterfrom
mhko:auto

Conversation

@mhko
Copy link
Member

@mhko mhko commented May 18, 2018

Add swagger spec for the new autocomplete API to 2017-11-11-preview.
@brjohnstmsft, @jhendrixMSFT, @Yahnoosh, @natinimni

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

  • [x ] 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 May 18, 2018

Automation for azure-sdk-for-python

Nothing to generate for azure-sdk-for-python

@AutorestCI
Copy link

AutorestCI commented May 18, 2018

Automation for azure-libraries-for-java

Nothing to generate for azure-libraries-for-java

@AutorestCI
Copy link

AutorestCI commented May 18, 2018

Automation for azure-sdk-for-node

Nothing to generate for azure-sdk-for-node

@@ -0,0 +1,29 @@
{
"parameters": {
Copy link
Member

Choose a reason for hiding this comment

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

This looks the same as the GET example. That can't be right -- most of these parameters should be in the request body, no? Did this pass validation?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, it does pass validation. I think the validation just checks the existence of example. In the entire spec undo this repo, I did not find an example where parameters are passed in the request body.

Copy link
Member

Choose a reason for hiding this comment

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

"name": "AutocompleteMode",
"modelAsString": false
},
"x-ms-parameter-location": "method",
Copy link
Member

Choose a reason for hiding this comment

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

I don't think you need x-ms-parameter-location for parameters that are inline with the operation.

Copy link
Member Author

Choose a reason for hiding this comment

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

You are right. I don't think it's needed.

"description": "Autocomplete mode."
},
{
"name":"search",
Copy link
Member

Choose a reason for hiding this comment

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

Maybe the search parameter should be first. I think it's the first parameter for Search and Suggest. I would argue it's the most important parameter.

"in": "query",
"required": true,
"type": "string",
"enum": [
Copy link
Member

Choose a reason for hiding this comment

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

There is already an AutocompleteMode enum definition later in the file. Can this parameter definition refer to that type instead of re-defining it?

Copy link
Member Author

Choose a reason for hiding this comment

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

I tried that. Doing so somehow makes AutocompleteMode a generic object type.

Copy link
Member

Choose a reason for hiding this comment

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

Too bad. Doing it this way still results in only one generated AutocompleteMode enum though, right?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes

@AutorestCI
Copy link

AutorestCI commented May 18, 2018

Automation for azure-sdk-for-go

Nothing to generate for azure-sdk-for-go

@@ -0,0 +1,29 @@
{
"parameters": {
Copy link
Member

Choose a reason for hiding this comment

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

"highlightPostTag": "</em>",
"highlightPreTag": "<em>",
"minimumCoverage": 80,
"searchFields": ["title", "description"],
Copy link
Member

Choose a reason for hiding this comment

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

searchFields is an IList in the C# SDK, but it's still a string as far as Swagger is concerned, right?

"highlightPostTag": "</em>",
"highlightPreTag": "<em>",
"minimumCoverage": 80,
"searchFields": ["title", "description"],
Copy link
Member

Choose a reason for hiding this comment

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

Same as above. Even in Search and Suggest POST, searchFields is a comma-separated string.

@brjohnstmsft
Copy link
Member

@sarangan12 Please review ASAP. This PR contains spec changes for a new feature called Autocomplete. We are announcing the Public Preview of this feature tomorrow, May 22nd. We'd like to generate the SDK from Azure/master by then.

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