azure-rest-api-specs
azure-rest-api-specs copied to clipboard
Security RP swagger correctness issue and API version issue result to SDK issue
- As the SDK is generated from api version 2017-08-01-preview which is configured from https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager#tag-package-composite-v3
And some of the properties we see when using Azure CLI of api version 2020-01-01-preview has not been added in api version 2017-08-01-preview yet. for example notificationsByRole
- Both in api version 2017-08-01-preview and api version 2020-01-01-preview, there's a x-ms-client-flatten https://github.com/Azure/azure-rest-api-specs/blob/main/specification/security/resource-manager/Microsoft.Security/preview/2017-08-01-preview/securityContacts.json#L267 set here, which tells the client side to put all the properties under properties to be the direct property of top level, for example alertNotifications should be a property of properties but now it's a property of root directly. that's why we don't see properties in the SDK response.
- There's a response structure change compared between api version 2017-08-01-preview and 2020-01-01-preview which cause even if we generate the SDK from 2020-01-01-preview now, we still can't get the result of securityContacts.list() to resolve this issue. here's the raw response structure of 2017-08-01-preview version { "value": [ { "etag": "", "id": "", "location": "West Europe", "name": "default", "properties": { .... }, "type": "Microsoft.Security/securityContacts" } ] } here's the raw response structure of 2020-01-01-preview version
[ { "etag": "", "id": "", "location": "West Europe", "name": "default", "properties": { ..... }, "type": "Microsoft.Security/securityContacts" } ] which contradict with their swagger definition of SecurityContactList response type here https://github.com/Azure/azure-rest-api-specs/blob/main/specification/security/resource-manager/Microsoft.Security/preview/2020-01-01-preview/securityContacts.json#L200-L217 we will need to ask service team to fix that in service returned response.
Routed from https://github.com/Azure/azure-sdk-for-js/issues/22351
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @chlahav.
Issue Details
- As the SDK is generated from api version 2017-08-01-preview which is configured from https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager#tag-package-composite-v3
And some of the properties we see when using Azure CLI of api version 2020-01-01-preview has not been added in api version 2017-08-01-preview yet. for example notificationsByRole
- Both in api version 2017-08-01-preview and api version 2020-01-01-preview, there's a x-ms-client-flatten https://github.com/Azure/azure-rest-api-specs/blob/main/specification/security/resource-manager/Microsoft.Security/preview/2017-08-01-preview/securityContacts.json#L267 set here, which tells the client side to put all the properties under properties to be the direct property of top level, for example alertNotifications should be a property of properties but now it's a property of root directly. that's why we don't see properties in the SDK response.
- There's a response structure change compared between api version 2017-08-01-preview and 2020-01-01-preview which cause even if we generate the SDK from 2020-01-01-preview now, we still can't get the result of securityContacts.list() to resolve this issue. here's the raw response structure of 2017-08-01-preview version { "value": [ { "etag": "", "id": "", "location": "West Europe", "name": "default", "properties": { .... }, "type": "Microsoft.Security/securityContacts" } ] } here's the raw response structure of 2020-01-01-preview version
[ { "etag": "", "id": "", "location": "West Europe", "name": "default", "properties": { ..... }, "type": "Microsoft.Security/securityContacts" } ] which contradict with their swagger definition of SecurityContactList response type here https://github.com/Azure/azure-rest-api-specs/blob/main/specification/security/resource-manager/Microsoft.Security/preview/2020-01-01-preview/securityContacts.json#L200-L217 we will need to ask service team to fix that in service returned response.
Routed from https://github.com/Azure/azure-sdk-for-js/issues/22351
Author: | xboxeer |
---|---|
Assignees: | - |
Labels: |
|
Milestone: | - |