Skip to content

Add CustomEntityLookupSkill#10832

Merged
lmazuel merged 9 commits intoAzure:masterfrom
shuyangmsft:master
Oct 9, 2020
Merged

Add CustomEntityLookupSkill#10832
lmazuel merged 9 commits intoAzure:masterfrom
shuyangmsft:master

Conversation

@shuyangmsft
Copy link
Contributor

@shuyangmsft shuyangmsft commented Sep 17, 2020

MSFT employees can try out our new experience at OpenAPI Hub - one location for using our validation tools and finding your workflow.

Contribution checklist:

If any further question about AME onboarding or validation tools, please view the FAQ.

ARM API Review Checklist

  • Ensure to check this box if one of the following scenarios meet updates in the PR, so that label “WaitForARMFeedback” will be added automatically to involve ARM API Review. Failure to comply may result in delays for manifest application. Note this does not apply to data plane APIs, all “removals” and “adding a new property” no more require ARM API review.

    • Adding new API(s)
    • Adding a new API version
    • Adding a new service
  • If you are blocked on ARM review and want to get the PR merged with urgency, please get the ARM oncall for reviews (RP Manifest Approvers team under Azure Resource Manager service) from IcM and reach out to them.

Breaking Change Review Checklist

If there are following updates in the PR, ensure to request an approval from API Review Board as defined in the Breaking Change Policy.

  • Removing API(s) in stable version
  • Removing properties in stable version
  • Removing API version(s) in stable version
  • Updating API in stable version with Breaking Change Validation errors
  • Updating API(s) in preview over 1 year

Please follow the link to find more details on PR review process.

@openapi-pipeline-app
Copy link

openapi-pipeline-app bot commented Sep 17, 2020

Swagger pipeline restarted successfully, please wait for status update in this comment.

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@openapi-sdkautomation
Copy link

openapi-sdkautomation bot commented Sep 17, 2020

azure-sdk-for-java - Release

No readme.md specification configuration files were found that are associated with the files modified in this pull request, or swagger_to_sdk section in readme.md is not configured

@openapi-sdkautomation
Copy link

openapi-sdkautomation bot commented Sep 17, 2020

Azure CLI Extension Generation - Release

No readme.md specification configuration files were found that are associated with the files modified in this pull request, or swagger_to_sdk section in readme.md is not configured

@openapi-sdkautomation
Copy link

openapi-sdkautomation bot commented Sep 17, 2020

azure-sdk-for-go - Release

No readme.md specification configuration files were found that are associated with the files modified in this pull request, or swagger_to_sdk section in readme.md is not configured

@openapi-sdkautomation
Copy link

openapi-sdkautomation bot commented Sep 17, 2020

azure-sdk-for-net - Release

No readme.md specification configuration files were found that are associated with the files modified in this pull request, or swagger_to_sdk section in readme.md is not configured

@openapi-sdkautomation
Copy link

openapi-sdkautomation bot commented Sep 17, 2020

azure-sdk-for-python - Release

No readme.md specification configuration files were found that are associated with the files modified in this pull request, or swagger_to_sdk section in readme.md is not configured

@openapi-sdkautomation
Copy link

openapi-sdkautomation bot commented Sep 17, 2020

azure-sdk-for-js - Release

No readme.md specification configuration files were found that are associated with the files modified in this pull request, or swagger_to_sdk section in readme.md is not configured

@openapi-sdkautomation
Copy link

openapi-sdkautomation bot commented Sep 17, 2020

azure-resource-manager-schemas - Release

No readme.md specification configuration files were found that are associated with the files modified in this pull request, or swagger_to_sdk section in readme.md is not configured

@openapi-sdkautomation
Copy link

openapi-sdkautomation bot commented Sep 17, 2020

Trenton Generation - Release

No readme.md specification configuration files were found that are associated with the files modified in this pull request, or swagger_to_sdk section in readme.md is not configured

Copy link
Member

@lmazuel lmazuel left a comment

Choose a reason for hiding this comment

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

From a Swagger perspective LGTM

Copy link
Member

@heaths heaths left a comment

Choose a reason for hiding this comment

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

I know a precedent is set with so many nullable properties, but wouldn't it save bandwidth to just not serialize them across the wire?

},
"caseSensitive": {
"type": "boolean",
"x-nullable": true,
Copy link
Member

Choose a reason for hiding this comment

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

There are a lot of x-nullable fields. Can you just not send them when null? Is there an advantage to sending, for example, "caseSensitive": null and similar for everything that isn't explicitly set?

"caseSensitive": {
"type": "boolean",
"x-nullable": true,
"description": "Determine if the alias is case sentitive."
Copy link
Member

Choose a reason for hiding this comment

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

You should document the default either in the description or in swagger. Note that the generators won't (or at least shouldn't) generate code for the default since that creates a tight coupling across versions. Defaults must be applied at the service.

}
],
"properties": {
"defaultLanguageCode": {
Copy link
Member

Choose a reason for hiding this comment

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

Based on other skills, this should be "x-nullable": true since you send the others will a null value, or will that not be the case here? Better not to waste bandwidth with null values if there's no benefit.

},
"entitiesDefinitionUri": {
"type": "string",
"description": "Path to a JSON or CSV file containing all the target text to match against."
Copy link
Member

Choose a reason for hiding this comment

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

Any auth requirements that should be documented? E.g. "Must be publicly accessible via a GET query."

"url": "https://docs.microsoft.com/en-us/azure/search/cognitive-search-skill-custom-entity-lookup"
},
"description": "A skill looks for text from a custom, user-defined list of words and phrases."
},
Copy link
Member

Choose a reason for hiding this comment

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

No required values? I would assume that at least the inline or URI parameters need to be specified. You might add that to the description. Swagger can actually require one of the two, but I'm not sure our generators would handle that.

Copy link
Member

@brjohnstmsft brjohnstmsft left a comment

Choose a reason for hiding this comment

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

This appears to be targeting the wrong API version. We shouldn't be making changes to the 2019 specs anymore.

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@openapi-sdkautomation
Copy link

openapi-sdkautomation bot commented Sep 28, 2020

azure-sdk-for-python-track2 - Release

No readme.md specification configuration files were found that are associated with the files modified in this pull request, or swagger_to_sdk section in readme.md is not configured

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

},
"globalDefaultCaseSensitive": {
"type": "boolean",
"x-nullable": true,
Copy link
Member

Choose a reason for hiding this comment

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

Why is this property both optional and nullable? What is the difference between the key/value not being present and the key/value being present with a null value?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

For some reason all my replies seem gone...

The key/value not being present and key/value being present with a null value don't make a difference from the backend service perspective. Do you recommend me to remove "x-nullable" here and for all other similar fields?

Copy link
Member

Choose a reason for hiding this comment

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

I would recommend for the service to not send the null value on the wire if that is the case. If the service isn't actually sending null on the wire, then the x-nullable annotation should be removed.

If the service is sending a null value on the wire, it is unfortunate, but it has to be marked as x-nullable in the swagger. At the end of the day, the swagger has to describe what how the service is behaving regardless of if it is following best practices or not...

Copy link
Member

Choose a reason for hiding this comment

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

I recently had this question with @bleroy and @brjohnstmsft. Not only is it a waste of bandwidth, but it has been causing problems since not nearly everything that should be marked x-nullable is, and our generators do care that it's authored correctly. Alas, it sounds like the OData library they use does this. Still, is there some way to get that fixed, or opt into a more wire-friendly serializer? I know Newtonsoft.Json won't send explicit nulls by default, so it seems OData is overriding that. Why, I can't imagine.

Copy link
Member

Choose a reason for hiding this comment

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

I know Newtonsoft.Json won't send explicit nulls by default, so it seems OData is overriding that.

OData .NET has its own serializer; It's not based on JSON.NET.

Trying to fix this would be a potentially costly change for us (either swapping out OData's serializer, or forking the library and fixing it), and would be hard to justify given our other priorities. You should proceed on the assumption that the service behaviour isn't going to change.

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Remove unnecessary x-nullable
@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

…0-Preview/searchservice.json

Co-authored-by: Heath Stewart <heaths@outlook.com>
@azure-pipelines
Copy link

No pipelines are associated with this pull request.

@lmazuel
Copy link
Member

lmazuel commented Oct 9, 2020

ADO seems stuck, second to last commit was green, and last commit was just string replace, merging

@lmazuel lmazuel merged commit c53d3cb into Azure:master Oct 9, 2020
jhendrixMSFT pushed a commit that referenced this pull request Oct 9, 2020
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

Comments