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

Fix user-assigned identity type names #20376

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -6161,7 +6161,7 @@
},
"SearchIndexerDataNoneIdentity": {
"description": "Clears the identity property of a datasource.",
"x-ms-discriminator-value": "#Microsoft.Azure.Search.SearchIndexerDataNoneIdentity",
"x-ms-discriminator-value": "#Microsoft.Azure.Search.DataNoneIdentity",
Copy link
Member

@weidongxu-microsoft weidongxu-microsoft Aug 31, 2022

Choose a reason for hiding this comment

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

This seems breaking changes?

What's the context? Is this api-version alive?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That was a bug (Azure/azure-sdk-for-net#29813), there is no such thing as Microsoft.Azure.Search.SearchIndexerDataNoneIdentity, so the back-end could not resolve that type and properly map the data, and consequently the API could not work with user-assigned managed identity. This can't break anything since no working code could exercise the previous value.

This is a preview version, that is available to the portal and to customers.

Copy link
Member

Choose a reason for hiding this comment

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

Thanks. I approved the PR.

But still @JeffreyRichter on the bug fix in shape of breaking changes, in case we have objection.

Copy link
Member

Choose a reason for hiding this comment

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

If the swagger was wrong, then we have to fix it, so I'd approve it.
But I don't see the BreakingChange label applied to this PR.

Copy link
Member

Choose a reason for hiding this comment

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

Added an issue for this case: Azure/openapi-diff#241

"allOf": [
{
"$ref": "#/definitions/SearchIndexerDataIdentity"
Expand All @@ -6170,7 +6170,7 @@
},
"SearchIndexerDataUserAssignedIdentity": {
"description": "Specifies the identity for a datasource to use.",
"x-ms-discriminator-value": "#Microsoft.Azure.Search.SearchIndexerDataUserAssignedIdentity",
"x-ms-discriminator-value": "#Microsoft.Azure.Search.DataUserAssignedIdentity",
"allOf": [
{
"$ref": "#/definitions/SearchIndexerDataIdentity"
Expand Down
22 changes: 22 additions & 0 deletions specification/search/data-plane/Azure.Search/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ These are the global settings for SearchServiceClient and SearchIndexClient.
title: SearchClient
opt-in-extensible-enums: true
openapi-type: data-plane
tag: package-2021-04-30-preview

directive:
- where:
Expand Down Expand Up @@ -170,6 +171,27 @@ directive:
- RequiredReadOnlyProperties
```

### Tag: package-2021-04-30-preview

These settings apply only when `--tag=package-2021-04-30-preview` is specified on the command line.

``` yaml $(tag) == 'package-2021-04-30-preview'
input-file:
- preview/2021-04-30-Preview/searchservice.json
- preview/2021-04-30-Preview/searchindex.json
```

#### Rename one of SearchError definitions

SearchError is duplicated between two swaggers, rename one of them

``` yaml $(tag) == 'package-2021-04-30-preview'
directive:
- from: preview/2021-04-30-Preview/searchservice.json
where: $.definitions.SearchError
transform: $["x-ms-client-name"] = "SearchServiceError"
```

### Tag: package-2021-04-searchservice-preview

These settings apply only when `--tag=package-2021-04-searchservice-preview` is specified on the command line.
Expand Down