Skip to content

Bug fixes and a few missing APIs#1089

Merged
dsgouda merged 4 commits into
Azure:masterfrom
MabOneSdk:master3
Apr 4, 2017
Merged

Bug fixes and a few missing APIs#1089
dsgouda merged 4 commits into
Azure:masterfrom
MabOneSdk:master3

Conversation

@dragonfly91
Copy link
Copy Markdown

@dragonfly91 dragonfly91 commented Mar 31, 2017

This checklist is used to make sure that common issues in a pull request are addressed. This will expedite the process of getting your pull request merged and avoid extra work on your part to fix issues discovered during the review process.

PR information

  • The title of the PR is clear and informative.
  • There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For information on cleaning up the commits in your pull request, see this page.
  • Except for special cases involving multiple contributors, the PR is started from a fork of the main repository, not a branch.
  • If applicable, the PR references the bug/issue that it fixes.
  • Swagger files are correctly named (e.g. the api-version in the path should match the api-version in the spec).

Quality of Swagger

"$ref": "#/parameters/VaultName"
},
{
"name": "resourceBackupResourceVaultConfig",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

resourceBackupResourceVaultConfig sounds too wordy and doesn't provide a lot of semantic information, consider renaming it to just backupResourceVaultConfig

"$ref": "#/parameters/VaultName"
},
{
"name": "resourceBackupResourceConfig",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Same comment as above for naming the param

}
}
},
"BackupResourceVaultConfigResource": {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is Very confusing. I'd rather say BackupResourceVaultConfig with an allOf on BackupResourceVaultConfigProperties, on similar lines, you don't need to say BackupResource, just calling it Backup is just fine unless that is what makes semantic sense at your services' end.
My intention here is to point out that the model names are getting too verbose here without adding a lot of value.

}
},
"definitions": {
"BackupResourceConfig": {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Just call this BackupConfigProperties and call BackupResourceConfigResource as BackupConfig/BackupConfigResource

"properties": {
"properties": {
"$ref": "#/definitions/BackupResourceConfig",
"x-ms-client-flatten": true
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Good stuff! 👍

"readOnly": true
},
"lastUpdatedTimeUtc": {
"description": "UTC time at which the upgrade operation status was last updated.",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Consider setting a date-time format here

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Can't be changed - API is already in production

"type": "string",
"readOnly": true
},
"endTimeUtc": {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Consider setting a date-time format here

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Can't be changed - API is already in production

"properties": {
"$ref": "#/definitions/VaultProperties",
"x-ms-client-flatten": true
"$ref": "#/definitions/VaultProperties"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Any reason why you don't want the VaultProperties to be flattened here, it would be a better user experience if you did flattening

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

There seems to be a bug in our RP at this point where this structure bodes well with the service. When I applied client flattening, there were issues during Create Vault API call.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@olydis do we have any recommendations here, the nesting of properties seems a little unnatural.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Yes, flattening is recommended. If there was a bug with flattening applied, it would be very helpful for us to file that bug (tons of services rely on flattening - so it better be bug free).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I understand @dragonfly91 implied that there is a bug at their service end. If this indeed is the structure that the service expects, this shouldn't be a blocker but we highly recommend that this be revisited and fixed.

}
}
},
"/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupconfig/vaultconfig": {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

General convention for constructing URLs is providers/provider.namespace/typename/{typevalue} Consider parameterizing /backupconfig/vaultconfig accordingly

"deprecated": false
}
},
"/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig": {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

General convention for constructing URLs is providers/provider.namespace/typename/{typevalue} Consider parameterizing /backupstorageconfig/vaultstorageconfig accordingly

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

I acknowledge this issue but we can't take this at this moment, as this API is already in production

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks, please track this issue appropriately at your end since moving forward we plan to make these as hard requirements

Copy link
Copy Markdown
Contributor

@dsgouda dsgouda left a comment

Choose a reason for hiding this comment

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

I have a minor doubt regarding client flattening that I need to get resolved, will approve once that's done. Also, posted a couple of related questions

"type": "string",
"readOnly": true
},
"startTimeUtc": {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Just so I understand, do you mean that the service itself works with a plain string instead of a formatted date-time one?

"properties": {
"$ref": "#/definitions/VaultProperties",
"x-ms-client-flatten": true
"$ref": "#/definitions/VaultProperties"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@olydis do we have any recommendations here, the nesting of properties seems a little unnatural.

"deprecated": false
}
},
"/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig": {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks, please track this issue appropriately at your end since moving forward we plan to make these as hard requirements

}
},
"definitions": {
"BackupStorageConfig": {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is much better, but I would go further and simply name this as BackupStorageConfigProperties (same for BackupVaultConfigProperties)

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Is this fine for you:
BackupStorageConfigResource -> BackupStorageConfig
BackupStorageConfig -> BackupStorageConfigProperties

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I would like that very much!

Copy link
Copy Markdown
Contributor

@dsgouda dsgouda left a comment

Choose a reason for hiding this comment

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

Other than the comment about client flattening recommendations, LGTM
Pending CI builds

@dsgouda dsgouda merged commit 1c421b4 into Azure:master Apr 4, 2017
@AutorestCI
Copy link
Copy Markdown

No modification for Python

@AutorestCI
Copy link
Copy Markdown

No modification for NodeJS

@AutorestCI
Copy link
Copy Markdown

mccleanp pushed a commit that referenced this pull request Mar 23, 2022
Add new VSOnline Plan access token APIs to PPE and Prod Swagger
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