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

[Azure Search] Swagger specs and examples for data plane GA version 2… #2843

Merged
merged 2 commits into from
Apr 12, 2018

Conversation

brjohnstmsft
Copy link
Member

@brjohnstmsft brjohnstmsft commented Apr 10, 2018

…017-11-11

This updates the Swagger specs for the new GA version of the Azure Search data
plane. These new specs are exact copies of the 2016-09-01-Preview specs, with
the api-version changed. Same for the examples.


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

…017-11-11

This updates the Swagger specs for the new GA version of the Azure Search data
plane. These new specs are exact copies of the 2016-09-01-Preview specs, with
the api-version changed. Same for the examples.
@AutorestCI
Copy link

AutorestCI commented Apr 10, 2018

Automation for azure-sdk-for-go

Nothing to generate for azure-sdk-for-go

@AutorestCI
Copy link

AutorestCI commented Apr 10, 2018

Automation for azure-libraries-for-java

Nothing to generate for azure-libraries-for-java

@AutorestCI
Copy link

AutorestCI commented Apr 10, 2018

Automation for azure-sdk-for-python

Nothing to generate for azure-sdk-for-python

@AutorestCI
Copy link

AutorestCI commented Apr 10, 2018

Automation for azure-sdk-for-node

Nothing to generate for azure-sdk-for-node

@brjohnstmsft
Copy link
Member Author

@jianghaolu -- Can you please look at this today?

"description": "A value indicating whether the original token will be kept. Default is false."
}
},
"description": "Converts alphabetic, numeric, and symbolic Unicode characters which are not in the first 127 ASCII characters (the \"Basic Latin\" Unicode block) into their ASCII equivalents, if such equivalents exist. T
Copy link
Contributor

Choose a reason for hiding this comment

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

This parameter is required but is missing in the examples.

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 can't tell from the context -- Which parameter are you referring to?

"x-ms-parameter-location": "client"
},
"SearchDnsSuffixParameter": {
"name": "searchDnsSuffix",
Copy link
Contributor

Choose a reason for hiding this comment

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

This required parameter is not provided in any example.

Copy link
Member Author

Choose a reason for hiding this comment

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

Do downstream consumers of these examples do anything useful with x-ms-parameterized-host parameters like this one? For example, when we start generating REST API documentation from Swagger (we aren't yet for our data plane, for historical reasons), will the examples in the docs put this parameter and searchServiceName in the host name part of the request URL where it should be?

Copy link
Contributor

Choose a reason for hiding this comment

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

The doc team is using the x-ms-examples for generating examples in the docs. I think they are doing that. Here is an example for the Storage Management API. Please contact the doc team for feature requests or any feedback.

Copy link
Member Author

Choose a reason for hiding this comment

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

@amarzavery Do you happen to know if these KeyVault docs are auto-generated as well? This seems to be an example of what we're hoping for.

"description": "A value indicating whether the original token will be kept. Default is false."
}
},
"description": "Converts alphabetic, numeric, and symbolic Unicode characters which are not in the first 127 ASCII characters (the \"Basic Latin\" Unicode block) into their ASCII equivalents, if such equivalents exist. T
Copy link
Contributor

Choose a reason for hiding this comment

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

Please add this required parameter to the examples.

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 can't tell from the context -- Which parameter are you referring to?

},
"dataDeletionDetectionPolicy": {
"@odata.type": "#Microsoft.Azure.Search.SoftDeleteColumnDeletionDetectionPolicy",
"softDeleteColumnName": "isDeleted",
Copy link
Contributor

Choose a reason for hiding this comment

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

These 2 properties are not defined in the type definition of "DataDeletionDetectionPolicy".

Copy link
Member Author

Choose a reason for hiding this comment

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

This is a polymorphic type. Note the use of the discriminator property in DataDeletionDetectionPolicy. The value of @odata.type indicates that this object is of type SoftDeleteColumnDeletionPolicy. If you look at the definition of SoftDeleteColumnDeletionPolicy in the Swagger, you'll see the softDeleteColumnName and softDeleteMarkerValue properties are defined. Also note the use of x-ms-discriminator-value and allOf in SoftDeleteColumnDeletionPolicy.

Please ensure your validation tools understand polymorphism, as it is a crucial feature for modeling data plane APIs using AutoRest.

"description": "another cool indexer",
"dataSourceName": "myblobdatasource",
"targetIndexName": "orders",
"schedule": { },
Copy link
Contributor

Choose a reason for hiding this comment

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

"interval" is required here.

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 think the example is meant to show that the schedule itself is not required. I'll remove it.

@jianghaolu
Copy link
Contributor

The GitHub review link is broken - The major valid error the tool is reporting is missing required parameters from the global "parameters" section, like "Prefer", or missing required parameters on the parameterized host, like "searchDnsSuffix".

@jianghaolu jianghaolu merged commit c9c0734 into Azure:master Apr 12, 2018
@brjohnstmsft brjohnstmsft deleted the search-2017-11-11 branch April 12, 2018 18:55
@azuresdkciprbot
Copy link

Hi There,

I am the AutoRest Linter Azure bot. I am here to help. My task is to analyze the situation from the AutoRest linter perspective. Please review the below analysis result:

File: specification/search/data-plane/Microsoft.Azure.Search.Data/readme.md
Before the PR: Warning(s): 0 Error(s): 0
After the PR: Warning(s): 0 Error(s): 0

File: specification/search/data-plane/Microsoft.Azure.Search.Service/readme.md
Before the PR: Warning(s): 1 Error(s): 0
After the PR: Warning(s): 1 Error(s): 0

AutoRest Linter Guidelines | AutoRest Linter Issues | Send feedback

Thanks for your co-operation.

@azuresdkciprbot
Copy link

Hi There,

I am the AutoRest Linter Azure bot. I am here to help. My task is to analyze the situation from the AutoRest linter perspective. Please review the below analysis result:

File: specification/search/data-plane/Microsoft.Azure.Search.Data/readme.md
Before the PR: Warning(s): 0 Error(s): 0
After the PR: Warning(s): 0 Error(s): 0

File: specification/search/data-plane/Microsoft.Azure.Search.Service/readme.md
Before the PR: Warning(s): 0 Error(s): 0
After the PR: Warning(s): 0 Error(s): 0

AutoRest Linter Guidelines | AutoRest Linter Issues | Send feedback

Thanks for your co-operation.

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.

5 participants