-
Notifications
You must be signed in to change notification settings - Fork 5.2k
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
[Hub Generated] Review request for Microsoft.Azure.Search.Service to add version 2017-11-11-preview #5410
Conversation
…rning This change is just to satisfy Swagger spec validation; It has no effect on code generation (at least for C#).
This is our first major push towards making searchservice.json pass all Swagger validation. The validator found several issues that this change fixes: - "Extensible enums" were being modeled incorrectly. On the wire, they are just strings, but we were modeling them as objects with a "name" property. This reflected the generated code, but not the wire format. The solution is to model them as proper enums in the Swagger. This causes new validation errors, since these enums should be open-ended, but that's an issue with the validator not understanding "extensible enums"; it's not a problem with our spec per se. - Properties of Skill were marked as "required", when they were being omitted or set to null in examples. This is because these properties actually appear to be optional from the point of view of the REST API, so now we model them as such. - "documentdb" was deprecated as a DataSourceType, but not replaced with "cosmosdb" in the examples. This is now fixed. - The example for "Get Indexer Execution Status" included properties in the response that aren't modeled in the Swagger. These properties actually do appear on the wire, but they shouldn't and will be removed in a future API version. In the meantime, I have removed them from the example.
Automation for azure-sdk-for-jsNothing to generate for azure-sdk-for-js |
Automation for azure-sdk-for-goNothing to generate for azure-sdk-for-go |
Automation for azure-sdk-for-pythonNothing to generate for azure-sdk-for-python |
Automation for azure-sdk-for-rubyNothing to generate for azure-sdk-for-ruby |
Can one of the admins verify this patch? |
Automation for azure-sdk-for-nodeNothing to generate for azure-sdk-for-node |
Automation for azure-sdk-for-javaNothing to generate for azure-sdk-for-java |
@jianghaolu Contrary to the PR title, this is not a new API version. These changes are meant to address validation errors that we have never attempted to fix before. See individual commits for details. I have already requested exceptions for the remaining validation errors as I believe them to be limitations or bugs in the validator itself. |
FYI @Yahnoosh Also FYI @arv100kri @mgottein since this contains Cognitive Search-related changes. See commits for details. A .NET SDK PR will follow once this is merged. |
@jianghaolu Also, please ignore the auto-generated .NET SDK PR. Our SDK includes custom code and other scripts that run during code generation. The auto-generated PRs will probably never succeed for our .NET SDK. Ask @shahabhijeet if you need details. |
Regarding this
@mgottein please comment on whether the comment is accurate or not |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally looks good, I had one request (NamedEntity -> Entity in examples) and the question I posed to @mgottein
....Azure.Search.Service/preview/2017-11-11-preview/examples/SearchServiceCreateDataSource.json
Show resolved
Hide resolved
....Search.Service/preview/2017-11-11-preview/examples/SearchServiceCreateOrUpdateSkillset.json
Show resolved
Hide resolved
...arch/data-plane/Microsoft.Azure.Search.Service/preview/2017-11-11-preview/searchservice.json
Show resolved
Hide resolved
@arv100kri I am asserting that it is accurate. :) The Get Indexer Status API re-uses a model class from the Indexing API internally (IndexResult). This is an accident of implementation. That type includes "success" and "statusCode" flags which are meaningless for "ItemError" (errors never succeed, and status code is meaningless for at least some indexer error conditions). I assume that is why these properties are not modeled in the Swagger (it was probably Eugene who did this work, and I would have reviewed and approved it back then). |
It turns out these properties are required by the API. Also replaced the deprecated NER skill in examples.
…Field Before this change, the descriptions in the Swagger for the Field type did not accurately describe the semantics of the Azure Search REST API, particularly around what the default values of the searchable, filterable, sortable, and facetable properties were. Instead, they reflected the defaults of our custom implementation of Field in the .NET SDK. This change corrects the descriptions to accurately reflect the REST API. It also adds more detail in anticipation of generating REST API documentation from the Swagger (which we don't currently do). A few other changes to Field are related to code generation: - Removed the x-ms-external flag so that AutoRest can generate this type. - Removed x-nullable: false and x-ms-client-name since they again reflect only the custom .NET code and not the desired REST API semantics. - Added regex transform rules to readme.md so that we can keep some of our custom code for Field in .NET purely for backward compatibility purposes. Our intention going forward for other languages is to rely solely on code generation for the Field type.
@jianghaolu Can you review and merge this please? |
If you are a MSFT employee you can view your work branch via this link.
Contribution checklist: