-
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
Adding BillingMeters API #2745
Adding BillingMeters API #2745
Conversation
Automation for azure-sdk-for-pythonA 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: |
"application/json" | ||
], | ||
"paths": { | ||
"/subscriptions/{subscriptionId}/providers/Microsoft.Web/billingMeters": { |
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.
This should be referenced in the readme.md
config file here
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.
Thanks for review. I added it there
Automation for azure-libraries-for-javaThe initial PR has been merged into your service PR: |
Automation for azure-sdk-for-nodeThe initial PR has been merged into your service PR: |
Automation for azure-sdk-for-goThe initial PR has been merged into your service PR: |
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.
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", |
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.
Recommended operation id is GlobalBillingMeters_get
or BillingMeters_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.
Please add x-ms-examples
for this operation
"responses": { | ||
"200": { | ||
"description": "OK", | ||
"schema": { |
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.
inline definitions are discouraged. Please create a model definition for this array
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.
Also, please add the x-ms-pageable
extension here.
}, | ||
"definitions": { | ||
"BillingMeter": { | ||
"description": "Billing meter.", |
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 provide a more useful description, applies to other properties too
Look like I added billingmeters in the wrong file. Putting everything together now and addressing your comments |
Added example |
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.
Left some comments.
@@ -178,6 +178,44 @@ | |||
} | |||
} | |||
} | |||
}, | |||
"/subscriptions/{subscriptionId}/providers/Microsoft.Web/billingMeters": { |
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.
nit: fix indentation
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.
can you please provide more details on this?
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 indentation is off to the right by a tab, just align it to the closing bracket above
} | ||
], | ||
"properties": { | ||
"properties": { |
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.
Consider creating another model for these properties, something like BillingMeterProperties
and then apply the x-ms-client-flatten
extension
} | ||
}, | ||
"default": { | ||
"description": "Default error response", |
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.
Consider adding a better description, an example here
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.
I removed this. Other our API in this json don't have it .
"type": "object", | ||
"properties": { | ||
"value": { | ||
"description": "Collection of resources.", |
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 verify description or add more relevant information
} | ||
}, | ||
{ | ||
"id": "subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/providers/Microsoft.Web/billingMeters/6318825b-98b6-4b3c-883f-52a9d1560dae", |
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 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" |
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.
Is this parameter required?
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.
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", |
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.
Recommended pattern is BillingMeters_List
"default": { | ||
"description": "Default error response", | ||
"schema": { | ||
"$ref": "./CommonDefinitions.json#/definitions/ErrorResponse" |
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.
ErrorResponse
reference does not exist, please fix this
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.
LGTM
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
api-version
in the path should match theapi-version
in the spec).Quality of Swagger