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

Adding BillingMeters API #2745

Merged
merged 9 commits into from
Mar 30, 2018
Merged

Adding BillingMeters API #2745

merged 9 commits into from
Mar 30, 2018

Conversation

andreyse
Copy link
Contributor

@andreyse andreyse commented Mar 23, 2018

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

@AutorestCI
Copy link

AutorestCI commented Mar 23, 2018

Automation for azure-sdk-for-python

A PR has been created for you based on this PR content.

Once this PR will be merged, content will be added to your service PR:
Azure/azure-sdk-for-python#2065

"application/json"
],
"paths": {
"/subscriptions/{subscriptionId}/providers/Microsoft.Web/billingMeters": {
Copy link
Contributor

Choose a reason for hiding this comment

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

This should be referenced in the readme.md config file here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for review. I added it there

@AutorestCI
Copy link

AutorestCI commented Mar 23, 2018

Automation for azure-libraries-for-java

The initial PR has been merged into your service PR:
AutorestCI/azure-libraries-for-java#4

@AutorestCI
Copy link

AutorestCI commented Mar 23, 2018

Automation for azure-sdk-for-node

The initial PR has been merged into your service PR:
Azure/azure-sdk-for-node#2612

@AutorestCI
Copy link

AutorestCI commented Mar 23, 2018

Automation for azure-sdk-for-go

The initial PR has been merged into your service PR:
Azure/azure-sdk-for-go#1475

Copy link
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.

Left a few more comments.
Please check the linter violations too

],
"summary": "Gets a list of meters for a given location.",
"description": "Gets a list of meters for a given location.",
"operationId": "Global_GetBillingMeters",
Copy link
Contributor

Choose a reason for hiding this comment

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

Recommended operation id is GlobalBillingMeters_get or BillingMeters_Get

Copy link
Contributor

Choose a reason for hiding this comment

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

Please add x-ms-examples for this operation

"responses": {
"200": {
"description": "OK",
"schema": {
Copy link
Contributor

Choose a reason for hiding this comment

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

inline definitions are discouraged. Please create a model definition for this array

Copy link
Contributor

Choose a reason for hiding this comment

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

Also, please add the x-ms-pageable extension here.

},
"definitions": {
"BillingMeter": {
"description": "Billing meter.",
Copy link
Contributor

Choose a reason for hiding this comment

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

please provide a more useful description, applies to other properties too

@andreyse
Copy link
Contributor Author

Look like I added billingmeters in the wrong file. Putting everything together now and addressing your comments

@andreyse
Copy link
Contributor Author

Added example

Copy link
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.

Left some comments.

@@ -178,6 +178,44 @@
}
}
}
},
"/subscriptions/{subscriptionId}/providers/Microsoft.Web/billingMeters": {
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: fix indentation

Copy link
Contributor Author

Choose a reason for hiding this comment

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

can you please provide more details on this?

Copy link
Contributor

Choose a reason for hiding this comment

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

The indentation is off to the right by a tab, just align it to the closing bracket above

}
],
"properties": {
"properties": {
Copy link
Contributor

Choose a reason for hiding this comment

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

Consider creating another model for these properties, something like BillingMeterProperties and then apply the x-ms-client-flatten extension

}
},
"default": {
"description": "Default error response",
Copy link
Contributor

Choose a reason for hiding this comment

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

Consider adding a better description, an example here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I removed this. Other our API in this json don't have it .

"type": "object",
"properties": {
"value": {
"description": "Collection of resources.",
Copy link
Contributor

Choose a reason for hiding this comment

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

Please verify description or add more relevant information

}
},
{
"id": "subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/providers/Microsoft.Web/billingMeters/6318825b-98b6-4b3c-883f-52a9d1560dae",
Copy link
Contributor

Choose a reason for hiding this comment

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

It is discouraged to use production style subscription ids in public repo, please replace these with {subId}, {billingId}, etc

"name": "billingLocation",
"in": "query",
"description": "Azure Location of billable resource",
"type": "string"
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this parameter required?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, it is not required. You can call api without billingLocation , it will return default values.

"get": {
"summary": "Gets a list of meters for a given location.",
"description": "Gets a list of meters for a given location.",
"operationId": "ListBillingMeters",
Copy link
Contributor

Choose a reason for hiding this comment

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

Recommended pattern is BillingMeters_List

"default": {
"description": "Default error response",
"schema": {
"$ref": "./CommonDefinitions.json#/definitions/ErrorResponse"
Copy link
Contributor

Choose a reason for hiding this comment

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

ErrorResponse reference does not exist, please fix this

Copy link
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.

LGTM

@dsgouda dsgouda merged commit 47d267f into Azure:master Mar 30, 2018
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.

3 participants