-
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
Fixing swagger correctness and completeness issues for RecoveryServicesBackup #15024
Conversation
RecoveryServicesBackup
Hi, @pratimaupadhyay02 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 |
---|---|
1038 - AddedPath |
The new version is adding a path that was not found in the old version. New: Microsoft.RecoveryServices/stable/2021-04-01/bms.json#L21:5 |
️❌
LintDiff: 1 Errors, 7 Warnings failed [Detail]
- Linted configuring files (Based on source branch, openapi-validator v1.10.0 , classic-openapi-validator v1.1.8 )
- Linted configuring files (Based on target branch, openapi-validator v1.10.0 , classic-openapi-validator v1.1.8 )
Rule | Message |
---|---|
R3021 - PathResourceTypeNameCamelCase |
Resource type naming must follow camel case. Path: '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig' Location: Microsoft.RecoveryServices/stable/2021-04-01/bms.json#L21 |
'PUT' operation 'BackupResourceStorageConfigsNonCRR_Update' should use method name 'Create'. Note: If you have already shipped an SDK on top of this spec, fixing this warning may introduce a breaking change. Location: Microsoft.RecoveryServices/stable/2021-04-01/bms.json#L70 |
|
'PATCH' operation 'BackupResourceStorageConfigsNonCRR_patch' should use method name 'Update'. Note: If you have already shipped an SDK on top of this spec, fixing this warning may introduce a breaking change. Location: Microsoft.RecoveryServices/stable/2021-04-01/bms.json#L122 |
|
Consider using x-ms-client-flatten to provide a better end user experience Location: Microsoft.RecoveryServices/stable/2018-12-20/bms.json#L2375 |
|
Booleans are not descriptive and make them hard to use. Consider using string enums with allowed set of values defined. Property: crossRegionRestoreFlag Location: Microsoft.RecoveryServices/stable/2018-12-20/bms.json#L2333 |
|
Do not have duplicate name of x-ms-example, make sure every x-ms-example name unique. Duplicate x-ms-example: Get Vault Storage Configuration Location: Microsoft.RecoveryServices/stable/2018-12-20/bms.json#L529 |
|
Do not have duplicate name of x-ms-example, make sure every x-ms-example name unique. Duplicate x-ms-example: Update Vault Storage Configuration Location: Microsoft.RecoveryServices/stable/2018-12-20/bms.json#L581 |
|
Do not have duplicate name of x-ms-example, make sure every x-ms-example name unique. Duplicate x-ms-example: Update Vault Storage Configuration Location: Microsoft.RecoveryServices/stable/2021-04-01/bms.json#L157 |
The following errors/warnings exist before current PR submission:
Only 10 items are listed, please refer to log for more details.
Rule | Message |
---|---|
R3021 - PathResourceTypeNameCamelCase |
Resource type naming must follow camel case. Path: '/Subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupPreValidateProtection' Location: Microsoft.RecoveryServices/stable/2021-04-01/bms.json#L164 |
R3021 - PathResourceTypeNameCamelCase |
Resource type naming must follow camel case. Path: '/Subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupStatus' Location: Microsoft.RecoveryServices/stable/2021-04-01/bms.json#L209 |
R3021 - PathResourceTypeNameCamelCase |
Resource type naming must follow camel case. Path: '/Subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupValidateFeatures' Location: Microsoft.RecoveryServices/stable/2021-04-01/bms.json#L254 |
R3021 - PathResourceTypeNameCamelCase |
Resource type naming must follow camel case. Path: '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/backupProtectionIntent/{intentObjectName}' Location: Microsoft.RecoveryServices/stable/2021-04-01/bms.json#L299 |
R3021 - PathResourceTypeNameCamelCase |
Resource type naming must follow camel case. Path: '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupProtectionIntents' Location: Microsoft.RecoveryServices/stable/2021-04-01/bms.json#L460 |
R3021 - PathResourceTypeNameCamelCase |
Resource type naming must follow camel case. Path: '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupUsageSummaries' Location: Microsoft.RecoveryServices/stable/2021-04-01/bms.json#L517 |
R4010 - RequiredDefaultResponse |
The response is defined but without a default error response implementation.Consider adding it.' Location: Microsoft.RecoveryServices/stable/2021-04-01/bms.json#L194 |
R4010 - RequiredDefaultResponse |
The response is defined but without a default error response implementation.Consider adding it.' Location: Microsoft.RecoveryServices/stable/2021-04-01/bms.json#L239 |
R4010 - RequiredDefaultResponse |
The response is defined but without a default error response implementation.Consider adding it.' Location: Microsoft.RecoveryServices/stable/2021-04-01/bms.json#L284 |
R4010 - RequiredDefaultResponse |
The response is defined but without a default error response implementation.Consider adding it.' Location: Microsoft.RecoveryServices/stable/2021-04-01/bms.json#L337 |
️⚠️
Avocado: 1 Warnings warning [Detail]
Rule | Message |
---|---|
The default tag contains multiple API versions swaggers. readme: specification/recoveryservicesbackup/resource-manager/readme.md tag: specification/recoveryservicesbackup/resource-manager/readme.md#tag-package-2021-04 |
️️✔️
ModelValidation succeeded [Detail] [Expand]
Validation passes for ModelValidation.
️️✔️
SemanticValidation succeeded [Detail] [Expand]
Validation passes for SemanticValidation.
️️✔️
Cross-Version Breaking Changes succeeded [Detail] [Expand]
There are no breaking changes.
️️✔️
CredScan succeeded [Detail] [Expand]
There is no credential detected.
️❌
[Staging] SDK Track2 Validation: 11 Errors, 0 Warnings failed [Detail]
- The following tags are being changed in this PR
Only 10 items are listed, please refer to log for more details.
Rule | Message |
---|---|
PreCheck/DuplicateSchema |
"readme":"recoveryservicesbackup/resource-manager/readme.md", "tag":"package-2021-04", "details":"Duplicate Schema named NewErrorResponse -- properties.error.$ref: undefined => "#/components/schemas/schemas:1087" ; This error can be temporarily avoided by using the 'modelerfour.lenient-model-deduplication' setting. NOTE: This setting will be removed in a future version of @autorest/modelerfour; schemas should be updated to fix this issue sooner than that." |
PreCheck/DuplicateSchema |
"readme":"recoveryservicesbackup/resource-manager/readme.md", "tag":"package-2021-04", "details":"Duplicate Schema named NewErrorResponse-error -- properties.details.$ref: undefined => "#/components/schemas/schemas:1091" ; This error can be temporarily avoided by using the 'modelerfour.lenient-model-deduplication' setting. NOTE: This setting will be removed in a future version of @autorest/modelerfour; schemas should be updated to fix this issue sooner than that." |
PreCheck/DuplicateSchema |
"readme":"recoveryservicesbackup/resource-manager/readme.md", "tag":"package-2021-04", "details":"Duplicate Schema named AzureFileShareRecoveryPoint -- properties.recoveryPointType.$ref: undefined => "#/components/schemas/schemas:1115", properties.recoveryPointType.readOnly: undefined => true, properties.recoveryPointTime.$ref: undefined => "#/components/schemas/schemas:1116", properties.recoveryPointTime.readOnly: undefined => true, properties.fileShareSnapshotUri.$ref: undefined => "#/components/schemas/schemas:1117", properties.fileShareSnapshotUri.readOnly: undefined => true, properties.recoveryPointSizeInGB.$ref: undefined => "#/components/schemas/schemas:1118", properties.recoveryPointSizeInGB.readOnly: undefined => true ; This error can be temporarily avoided by using the 'modelerfour.lenient-model-deduplication' setting. NOTE: This setting will be removed in a future version of @autorest/modelerfour; schemas should be updated to fix this issue sooner than that." |
PreCheck/DuplicateSchema |
"readme":"recoveryservicesbackup/resource-manager/readme.md", "tag":"package-2021-04", "details":"Duplicate Schema named AzureWorkloadPointInTimeRecoveryPoint -- allOf.0.$ref: undefined => "#/components/schemas/schemas:1252" ; This error can be temporarily avoided by using the 'modelerfour.lenient-model-deduplication' setting. NOTE: This setting will be removed in a future version of @autorest/modelerfour; schemas should be updated to fix this issue sooner than that." |
PreCheck/DuplicateSchema |
"readme":"recoveryservicesbackup/resource-manager/readme.md", "tag":"package-2021-04", "details":"Duplicate Schema named AzureWorkloadRecoveryPoint -- properties.recoveryPointTimeInUTC.$ref: undefined => "#/components/schemas/schemas:1253", properties.recoveryPointTimeInUTC.readOnly: undefined => true, properties.type.readOnly: undefined => true ; This error can be temporarily avoided by using the 'modelerfour.lenient-model-deduplication' setting. NOTE: This setting will be removed in a future version of @autorest/modelerfour; schemas should be updated to fix this issue sooner than that." |
PreCheck/DuplicateSchema |
"readme":"recoveryservicesbackup/resource-manager/readme.md", "tag":"package-2021-04", "details":"Duplicate Schema named AzureWorkloadSAPHanaPointInTimeRecoveryPoint -- allOf.0.$ref: undefined => "#/components/schemas/schemas:1248" ; This error can be temporarily avoided by using the 'modelerfour.lenient-model-deduplication' setting. NOTE: This setting will be removed in a future version of @autorest/modelerfour; schemas should be updated to fix this issue sooner than that." |
PreCheck/DuplicateSchema |
"readme":"recoveryservicesbackup/resource-manager/readme.md", "tag":"package-2021-04", "details":"Duplicate Schema named AzureWorkloadSAPHanaRecoveryPoint -- allOf.0.$ref: undefined => "#/components/schemas/schemas:1252" ; This error can be temporarily avoided by using the 'modelerfour.lenient-model-deduplication' setting. NOTE: This setting will be removed in a future version of @autorest/modelerfour; schemas should be updated to fix this issue sooner than that." |
PreCheck/DuplicateSchema |
"readme":"recoveryservicesbackup/resource-manager/readme.md", "tag":"package-2021-04", "details":"Duplicate Schema named AzureWorkloadSQLPointInTimeRecoveryPoint -- allOf.0.$ref: undefined => "#/components/schemas/schemas:1273" ; This error can be temporarily avoided by using the 'modelerfour.lenient-model-deduplication' setting. NOTE: This setting will be removed in a future version of @autorest/modelerfour; schemas should be updated to fix this issue sooner than that." |
PreCheck/DuplicateSchema |
"readme":"recoveryservicesbackup/resource-manager/readme.md", "tag":"package-2021-04", "details":"Duplicate Schema named AzureWorkloadSQLRecoveryPoint -- allOf.0.$ref: undefined => "#/components/schemas/schemas:1252", properties.extendedInfo.$ref: undefined => "#/components/schemas/schemas:1274" ; This error can be temporarily avoided by using the 'modelerfour.lenient-model-deduplication' setting. NOTE: This setting will be removed in a future version of @autorest/modelerfour; schemas should be updated to fix this issue sooner than that." |
PreCheck/DuplicateSchema |
"readme":"recoveryservicesbackup/resource-manager/readme.md", "tag":"package-2021-04", "details":"Duplicate Schema named AzureWorkloadSQLRecoveryPointExtendedInfo -- properties.dataDirectoryTimeInUTC.$ref: undefined => "#/components/schemas/schemas:1275", properties.dataDirectoryTimeInUTC.readOnly: undefined => true, properties.dataDirectoryPaths.$ref: undefined => "#/components/schemas/schemas:1276", properties.dataDirectoryPaths.readOnly: undefined => true ; This error can be temporarily avoided by using the 'modelerfour.lenient-model-deduplication' setting. NOTE: This setting will be removed in a future version of @autorest/modelerfour; schemas should be updated to fix this issue sooner than that." |
The following errors/warnings exist before current PR submission:
Rule | Message |
---|---|
PreCheck/DuplicateSchema |
"readme":"recoveryservicesbackup/resource-manager/readme.md", "tag":"package-2021-04", "details":"Duplicate Schema named AzureFileshareProtectedItem -- properties.healthStatus: undefined => "x-ms-enum":"name":"HealthStatus", "modelAsString":true, "$ref":"#/components/schemas/HealthStatus", "description":"backups running status for this backup item." ; This error can be temporarily avoided by using the 'modelerfour.lenient-model-deduplication' setting. NOTE: This setting will be removed in a future version of @autorest/modelerfour; schemas should be updated to fix this issue sooner than that." |
AutorestCore/Exception |
"readme":"recoveryservicesbackup/resource-manager/readme.md", "tag":"package-2021-04", "details":"Error: Plugin prechecker reported failure." |
💬 AutorestCore/Exception | "readme":"recoveryservicesbackup/resource-manager/readme.md", "tag":"package-2021-04", "details":"> Loading AutoRest extension '@autorest/modelerfour' (4.15.456->4.15.456)" |
️️✔️
[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 @pratimaupadhyay02, 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. |
NewApiVersionRequired reason: |
@@ -18,6 +18,149 @@ | |||
"application/json" | |||
], | |||
"paths": { | |||
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig": { |
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.
The api-version 2018-12-20 has the same path, but the tag is different. So it's conflict. Pls fix it
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.
Hi @ruowan In this PR the API BackupResourceStorageConfigs which is already present in the version 2018-12-20, is being added in the version 2021-04-01(which routes the request to the active stamp) with different operationId and tag which will ensure a new SDK function is generated for this API that routes the request specifically to active stamp.
We have followed similar procedure for a number of other APIs and the SDK generation has always worked in the past. This is an example of such a scenario : This is the API in 2021-04-01 :
Line 374 in 8dff86d
"/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupUsageSummaries": { |
This is the same API in 2018-12-20 with different operationId and tag :
Line 21 in 8dff86d
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupUsageSummaries": { |
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.
It seems you changed the tags of the below api in the new api version , this caused conflict.
$.paths["/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.RecoveryServices/vaults/vaultName/backupstorageconfig/vaultstorageconfig"].get
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.
discussed offline, accept this change as this situation exists for historical reason, and cannot easily fix.
Hi, @pratimaupadhyay02 your PR are labelled with WaitForARMFeedback. A notification email will be sent out shortly afterwards to notify ARM review board(armapireview@microsoft.com). |
discussed offline, ARM review is not needed as this is copied from old version. |
…esBackup (Azure#15024) * Fixing swagger correctness and completeness issues for RecoveryServicesBackup * Adding examples * Fixing swagger completness * Updating tag in 2021-04-01 * Update * Update
RecoveryServicesBackup
MSFT employees can try out our new experience at OpenAPI Hub - one location for using our validation tools and finding your workflow.
Changelog
Please ensure to add changelog with 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
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.
Please 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 there are following updates in the PR, ensure to request an approval from 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.