-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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
[SRP] 2021-06-01 Swagger Api #15627
[SRP] 2021-06-01 Swagger Api #15627
Conversation
Hi, @HimanshuChhabra Thanks for your PR. I am workflow bot for review process. Here are some small tips. Any feedback about review process or workflow bot, pls contact swagger and tools team. vsswagger@microsoft.com |
[Call for Action] To better understand Azure service dev/test scenario, and support Azure service developer better on Swagger and REST API related tests in early phase, please help to fill in with this survey https://aka.ms/SurveyForEarlyPhase. It will take 5 to 10 minutes. If you already complete survey, please neglect this comment. Thanks. |
Swagger Validation Report
|
Rule | Message |
---|---|
OperationId should contain the verb: 'hnsonmigration' in:'StorageAccounts_HierarchicalNamespaceMigration'. Consider updating the operationId Location: Microsoft.Storage/stable/2021-06-01/storage.json#L755 |
|
OperationId should contain the verb: 'aborthnsonmigration' in:'StorageAccounts_AbortHierarchicalNamespaceMigration'. Consider updating the operationId Location: Microsoft.Storage/stable/2021-06-01/storage.json#L808 |
The following errors/warnings exist before current PR submission:
Only 30 items are listed, please refer to log for more details.
Rule | Message |
---|---|
R3021 - PathResourceTypeNameCamelCase |
Resource type naming must follow camel case. Path: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/ListAccountSas' Location: Microsoft.Storage/stable/2021-06-01/storage.json#L620 |
R3021 - PathResourceTypeNameCamelCase |
Resource type naming must follow camel case. Path: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/ListServiceSas' Location: Microsoft.Storage/stable/2021-06-01/storage.json#L665 |
R3021 - PathResourceTypeNameCamelCase |
Resource type naming must follow camel case. Path: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/{BlobServicesName}' Location: Microsoft.Storage/stable/2021-06-01/blob.json#L58 |
R3021 - PathResourceTypeNameCamelCase |
Resource type naming must follow camel case. Path: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/fileServices/{FileServicesName}' Location: Microsoft.Storage/stable/2021-06-01/file.json#L61 |
R4009 - RequiredReadOnlySystemData |
The response of operation:'BlobContainers_Get' is defined without 'systemData'. Consider adding the systemData to the response. Location: Microsoft.Storage/stable/2021-06-01/blob.json#L320 |
R4009 - RequiredReadOnlySystemData |
The response of operation:'BlobContainers_GetImmutabilityPolicy' is defined without 'systemData'. Consider adding the systemData to the response. Location: Microsoft.Storage/stable/2021-06-01/blob.json#L562 |
R4009 - RequiredReadOnlySystemData |
The response of operation:'FileShares_Get' is defined without 'systemData'. Consider adding the systemData to the response. Location: Microsoft.Storage/stable/2021-06-01/file.json#L362 |
R4009 - RequiredReadOnlySystemData |
The response of operation:'Queue_Get' is defined without 'systemData'. Consider adding the systemData to the response. Location: Microsoft.Storage/stable/2021-06-01/queue.json#L266 |
R4009 - RequiredReadOnlySystemData |
The response of operation:'Table_Get' is defined without 'systemData'. Consider adding the systemData to the response. Location: Microsoft.Storage/stable/2021-06-01/table.json#L245 |
R4009 - RequiredReadOnlySystemData |
The response of operation:'BlobContainers_Create' is defined without 'systemData'. Consider adding the systemData to the response. Location: Microsoft.Storage/stable/2021-06-01/blob.json#L215 |
R4009 - RequiredReadOnlySystemData |
The response of operation:'BlobContainers_CreateOrUpdateImmutabilityPolicy' is defined without 'systemData'. Consider adding the systemData to the response. Location: Microsoft.Storage/stable/2021-06-01/blob.json#L498 |
R4009 - RequiredReadOnlySystemData |
The response of operation:'FileShares_Create' is defined without 'systemData'. Consider adding the systemData to the response. Location: Microsoft.Storage/stable/2021-06-01/file.json#L235 |
R4009 - RequiredReadOnlySystemData |
The response of operation:'Queue_Create' is defined without 'systemData'. Consider adding the systemData to the response. Location: Microsoft.Storage/stable/2021-06-01/queue.json#L159 |
R4009 - RequiredReadOnlySystemData |
The response of operation:'Table_Create' is defined without 'systemData'. Consider adding the systemData to the response. Location: Microsoft.Storage/stable/2021-06-01/table.json#L159 |
R4009 - RequiredReadOnlySystemData |
The response of operation:'BlobContainers_Update' is defined without 'systemData'. Consider adding the systemData to the response. Location: Microsoft.Storage/stable/2021-06-01/blob.json#L273 |
R4009 - RequiredReadOnlySystemData |
The response of operation:'FileShares_Update' is defined without 'systemData'. Consider adding the systemData to the response. Location: Microsoft.Storage/stable/2021-06-01/file.json#L306 |
R4009 - RequiredReadOnlySystemData |
The response of operation:'Queue_Update' is defined without 'systemData'. Consider adding the systemData to the response. Location: Microsoft.Storage/stable/2021-06-01/queue.json#L214 |
R4009 - RequiredReadOnlySystemData |
The response of operation:'Table_Update' is defined without 'systemData'. Consider adding the systemData to the response. Location: Microsoft.Storage/stable/2021-06-01/table.json#L202 |
R4010 - RequiredDefaultResponse |
The response is defined but without a default error response implementation.Consider adding it.' Location: Microsoft.Storage/stable/2021-06-01/storage.json#L36 |
R4010 - RequiredDefaultResponse |
The response is defined but without a default error response implementation.Consider adding it.' Location: Microsoft.Storage/stable/2021-06-01/storage.json#L69 |
R4010 - RequiredDefaultResponse |
The response is defined but without a default error response implementation.Consider adding it.' Location: Microsoft.Storage/stable/2021-06-01/storage.json#L111 |
R4010 - RequiredDefaultResponse |
The response is defined but without a default error response implementation.Consider adding it.' Location: Microsoft.Storage/stable/2021-06-01/storage.json#L171 |
R4010 - RequiredDefaultResponse |
The response is defined but without a default error response implementation.Consider adding it.' Location: Microsoft.Storage/stable/2021-06-01/storage.json#L209 |
R4010 - RequiredDefaultResponse |
The response is defined but without a default error response implementation.Consider adding it.' Location: Microsoft.Storage/stable/2021-06-01/storage.json#L261 |
R4010 - RequiredDefaultResponse |
The response is defined but without a default error response implementation.Consider adding it.' Location: Microsoft.Storage/stable/2021-06-01/storage.json#L319 |
R4010 - RequiredDefaultResponse |
The response is defined but without a default error response implementation.Consider adding it.' Location: Microsoft.Storage/stable/2021-06-01/storage.json#L434 |
R4010 - RequiredDefaultResponse |
The response is defined but without a default error response implementation.Consider adding it.' Location: Microsoft.Storage/stable/2021-06-01/storage.json#L470 |
R4010 - RequiredDefaultResponse |
The response is defined but without a default error response implementation.Consider adding it.' Location: Microsoft.Storage/stable/2021-06-01/storage.json#L522 |
R4010 - RequiredDefaultResponse |
The response is defined but without a default error response implementation.Consider adding it.' Location: Microsoft.Storage/stable/2021-06-01/storage.json#L570 |
R4010 - RequiredDefaultResponse |
The response is defined but without a default error response implementation.Consider adding it.' Location: Microsoft.Storage/stable/2021-06-01/storage.json#L607 |
️️✔️
Avocado succeeded [Detail] [Expand]
Validation passes for Avocado.
️️✔️
ModelValidation succeeded [Detail] [Expand]
Validation passes for ModelValidation.
️️✔️
SemanticValidation succeeded [Detail] [Expand]
Validation passes for SemanticValidation.
️❌
Cross-Version Breaking Changes: 1 Errors, 11 Warnings failed [Detail]
- Compared Swaggers (Based on Oad v0.9.0)
- current:stable/2021-06-01/blob.json compared with base:stable/2021-04-01/blob.json
- current:stable/2021-06-01/blob.json compared with base:preview/2020-08-01-preview/blob.json
- current:stable/2021-06-01/common.json compared with base:stable/2021-04-01/common.json
- current:stable/2021-06-01/common.json compared with base:preview/2020-08-01-preview/common.json
- current:stable/2021-06-01/file.json compared with base:stable/2021-04-01/file.json
- current:stable/2021-06-01/file.json compared with base:preview/2020-08-01-preview/file.json
- current:stable/2021-06-01/privatelinks.json compared with base:stable/2021-04-01/privatelinks.json
- current:stable/2021-06-01/privatelinks.json compared with base:preview/2020-08-01-preview/privatelinks.json
- current:stable/2021-06-01/queue.json compared with base:stable/2021-04-01/queue.json
- current:stable/2021-06-01/queue.json compared with base:preview/2020-08-01-preview/queue.json
- current:stable/2021-06-01/storage.json compared with base:stable/2021-04-01/storage.json
- current:stable/2021-06-01/storage.json compared with base:preview/2020-08-01-preview/storage.json
- current:stable/2021-06-01/table.json compared with base:stable/2021-04-01/table.json
- current:stable/2021-06-01/table.json compared with base:preview/2020-08-01-preview/table.json
Rule | Message |
---|---|
1019 - RemovedEnumValue |
The new version is removing enum value(s) 'StorageFileDataSmbShareOwner' from the old version. New: Microsoft.Storage/stable/2021-06-01/storage.json#L2544:9 Old: Microsoft.Storage/stable/2021-04-01/storage.json#L2430:9 |
The following breaking changes are detected by comparison with latest preview version:
️️✔️
CredScan succeeded [Detail] [Expand]
There is no credential detected.
️❌
[Staging] SDK Track2 Validation: 1 Errors, 0 Warnings failed [Detail]
- The following tags are being changed in this PR
Rule | Message |
---|---|
AutorestCore/Exception |
"readme":"storage/resource-manager/readme.md", "tag":"package-2021-06", "details":"Error: Plugin prechecker reported failure." |
️️✔️
[Staging] PrettierCheck succeeded [Detail] [Expand]
Validation passes for PrettierCheck.
️️✔️
[Staging] SpellCheck succeeded [Detail] [Expand]
Validation passes for SpellCheck.
️️✔️
[Staging] Lint(RPaaS) succeeded [Detail] [Expand]
Validation passes for Lint(RPaaS).
Swagger Generation Artifacts
|
Hi @HimanshuChhabra, Your PR has some issues. Please fix the CI sequentially by following the order of
|
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.
Please remove unsupported "StorageFileDataSmbShareOwner" before merge.
Hi @HimanshuChhabra, one or multiple breaking change(s) is detected in your PR. Please check out the breaking change(s), and provide business justification in the PR comment and @ PR assignee why you must have these change(s), and how external customer impact can be mitigated. Please ensure to follow breaking change policy to request breaking change review and approval before proceeding swagger PR review. |
I think I got tagged here by mistake. Kindly tag the right person. Thanks |
There is a cross version breaking change , please follow the action #15627 (comment) to get approval |
"202": { | ||
"description": "Accepted -- Hierarchical namespace migration request accepted; operation will complete asynchronously." | ||
}, | ||
"default": { |
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.
We might should remove the "default" responds handling part, since:
- Without the default part, the error will be handled by default CloudException in .net SDK, and the error details will be in exception message.
- With the default part, the error will be handle by storage defined "#/definitions/ErrorResponse", the returned exception in .net SDK will only has error code in exception message, but won't has detail error message in the exception message. It will be difficult for customer to find the detail error message, as they need go into the exception properties and try to find which property contains the error.
As the default error handling can handle error with following body very well. I would suggest:
- if the error body of an API have following format, we should not add "default" responds part for it.
- only add default responds handling for error , when the error body is not in following format.
Body:
{
"error": {
"code": "***",
"message": "****"
}
}
For you reference, following are errors from .net SDK:
Error from API without default responds section:
Microsoft.Rest.Azure.CloudException: An operation is currently performing on this storage account that requires exclusive access.
at Microsoft.Azure.Management.Storage.StorageAccountsOperations.<DeleteWithHttpMessagesAsync>d__7.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Azure.Management.Storage.StorageAccountsOperationsExtensions.<DeleteAsync>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Azure.Management.Storage.StorageAccountsOperationsExtensions.Delete(IStorageAccountsOperations operations, String resourceGroupName, String accountName)
at Microsoft.Azure.Commands.Management.Storage.RemoveAzureStorageAccountCommand.ExecuteCmdlet()
at Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet.ProcessRecord()
Error from API with default responds section:
Microsoft.Azure.Management.Storage.Models.ErrorResponseException: Operation returned an invalid status code 'BadRequest'
at Microsoft.Azure.Management.Storage.StorageAccountsOperations.<BeginHierarchicalNamespaceMigrationWithHttpMessagesAsync>d__23.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
at Microsoft.Azure.Management.Storage.StorageAccountsOperations.<HierarchicalNamespaceMigrationWithHttpMessagesAsync>d__17.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
at Microsoft.Azure.Management.Storage.StorageAccountsOperationsExtensions.<HierarchicalNamespaceMigrationAsync>d__25.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
at Microsoft.Azure.Management.Storage.StorageAccountsOperationsExtensions.HierarchicalNamespaceMigration(IStorageAccountsOperations operations, String resourceGroupName, String accountName, String requestType)
at Microsoft.Azure.Commands.Management.Storage.InvokeAzureStorageAccountHierarchicalNamespaceUpgradeCommand.ExecuteCmdlet()
at Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet.ProcessRecord()
}, | ||
"allowProtectedAppendWritesAll": { | ||
"type": "boolean", | ||
"description": "This property can only be changed for unlocked time-based retention policies. When enabled, new blocks can be written to both 'Appened and Bock Blobs' while maintaining immutability protection and compliance. Only new blocks can be added and any existing blocks cannot be modified or deleted. This property cannot be changed with ExtendImmutabilityPolicy API. The 'allowProtectedAppendWrites' and 'allowProtectedAppendWritesAll' properties are mutually exclusive." |
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.
(Optional ) We should change the "name": "parameters",
to "name": "immutabilityPolicy"
, on line 532 and 750 in blob.json.
Not sure if ARM team will have concern for this change as it's breaking, but if not change, the API parameter name looks not right.
If not change, the generated SDK will has the parameter name for input immutabilityPolicy as "parameters", which doesn't make sense.
Before adding "allowProtectedAppendWritesAll", this issue not appear in SDK, since immutabilityPolicy only has 2 properties can be input (immutabilityPeriodSinceCreationInDays, allowProtectedAppendWrites), the Set/extend immutabilityPolicy API will have the 2 immutabilityPolicy properties just as the API paramters (see link); but after adding one more property "allowProtectedAppendWritesAll", the Set/extend immutabilityPolicy API will have the whole immutabilityPolicy as parameter, and the API to create immutabilityPolicy object has wrong parameter name (use name "parameters" for immutabilityPolicy parameter ).
The .net SDK API with current swagger (See "ImmutabilityPolicy parameters = default(ImmutabilityPolicy) ")
public static ImmutabilityPolicy CreateOrUpdateImmutabilityPolicy(this IBlobContainersOperations operations, string resourceGroupName, string accountName, string containerName, ImmutabilityPolicy parameters = default(ImmutabilityPolicy), string ifMatch = default(string))
The .net SDK API after change "name": "parameters",
to "name": "immutabilityPolicy"
in swagger: (See "ImmutabilityPolicy immutabilityPolicy = default(ImmutabilityPolicy)")
public static ImmutabilityPolicy CreateOrUpdateImmutabilityPolicy(this IBlobContainersOperations operations, string resourceGroupName, string accountName, string containerName, ImmutabilityPolicy immutabilityPolicy = default(ImmutabilityPolicy), string ifMatch = default(string))
specification/storage/resource-manager/Microsoft.Storage/stable/2021-06-01/blob.json
Show resolved
Hide resolved
* Add June21 Swagger Api version, Updated Readme files * adding abort and hnson migration swagger API * swagger: marking requesttype as required parameter for hns onmigration * Added new PublicNetworkAccess property to swagger spec * Add enableNfsV3RootSquash and enableNfsV3AllSquash to June21 swagger * Add Account Level VLW Swagger changes and example * Update Blob Inventory Api comment to include AccessTierInferred and Tags * Rename HnsOn to hierarchical namespace * [Swagger] [June21] Added defaultToOAuthAuthentication to swagger spec * Update Spell check custom words list. Correct incorrect spellings * Add missing refrences to PublicNetworkAccess Examples * Add required type:object, Add default return type for hns migration apis * Prettier tool update to storage.json * Add update account with immutability policy example * Removed StorageFileDataSmbShareOwner as Server side does not support it * Add AllowProtectedAppendWritesAll feature changes with example * Updated enum values and description for PublicNetworkAccess * Add type:object to ProtectedAppendWritesHistory ; Spellcheck
MSFT employees can try out our new experience at OpenAPI Hub - one location for using our validation tools and finding your workflow.
Changelog
Add a changelog entry for this PR by answering the following questions:
Contribution checklist:
If any further question about AME onboarding or validation tools, please view the FAQ.
ARM API Review Checklist
Otherwise your PR may be subject to ARM review requirements. Complete the following:
Check this box if any of the following apply to the PR so that label “WaitForARMFeedback” will be added automatically to begin ARM API Review. Failure to comply may result in delays to the manifest.
-[ ] To review changes efficiently, ensure you copy the existing version into the new directory structure for first commit and then push new changes, including version updates, in separate commits.
Ensure you've reviewed following guidelines including ARM resource provider contract and REST guidelines. Estimated time (4 hours). This is required before you can request review from ARM API Review board.
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 any of the following scenarios apply to the PR, request approval from the Breaking Change Review Board as defined in the Breaking Change Policy.
Action: to initiate an evaluation of the breaking change, create a new intake using the template for breaking changes. Addition details on the process and office hours are on the Breaking change Wiki.
Please follow the link to find more details on PR review process.