-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Added GA API version for Scheduled Query Rule #2858
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
Conversation
Added GA API version for Scheduled Query Rule
Automation for azure-sdk-for-pythonThe 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-libraries-for-javaThe initial PR has been merged into your service PR: |
Automation for azure-sdk-for-goThe initial PR has been merged into your service PR: |
|
Yoink! @sarangan12 -- I'm assigning this to me so I can use it to train more reviewers. You get a freebie! |
|
Hey @abversqr -- it appears you have a few validation errors in your spec -- can you correct these and update the PR? https://travis-ci.org/Azure/azure-rest-api-specs/jobs/365583431#L736 If you want to run the linter yourself locally, install autorest and try: # from the folder where the readme.md file is
autorest --azure-validator readme.md It looks mostly like one typo ( |
|
Hey @abversqr -- this looks like a new API is being added -- has this been reviewed by the API review board? If not, you should schedule a one hour SKYPE meeting with Garrett Serack, David Justice, Johan Stenberg, Gaurav Bhatnagar, Darrel Miller and Niklas Gustafsson . Preferably Tuesday afternoon sometime between 1 and 5pm. |
| "info": { | ||
| "title": "Microsoft Insights API", | ||
| "version": "2018-04-16", | ||
| "x-ms-code-generation-settings": { |
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.
You shouldn't have x-ms-code-generation-settings in the actual swagger file (I don't think we even use this anymore at all).
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.
Fixed.
| "tags": [ | ||
| "scheduledQueryRules" | ||
| ], | ||
| "operationId": "createOrUpdateScheduledQueryRules", |
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.
Operation IDs should be GROUP_METHOD -- Where GROUP is a plural (ie, in this case ScheduledQueryRules and METHOD should be CreateOrUpdate which means that this one should be ScheduledQueryRules_CreateOrUpdate
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.
Fixed in latest iteration
fearthecowboy
left a comment
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.
You will need to resolve a bunch of this before I can continue the review -- and the API review board should sign off.
| "paths": { | ||
| "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/microsoft.insights/scheduledQueryRules/{ruleName}": { | ||
| "put": { | ||
| "description": "Creates or updates an log search rule.\r\nRequest method: PUT\t\tRequest URI: https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/microsoft.insights/scheduledQueryRules/{logsearch-rule-name}?api-version={api-version}", |
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 description should document the API (the presence of the swagger file is telling you how you should physically call this method). You can drop everything after Creates or updates an log search rule.
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.
Fixed in latest iteration
| "schema": { | ||
| "$ref": "#/definitions/LogSearchRuleResource" | ||
| }, | ||
| "examples": { |
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 use x-ms-examples and the example data should be in a separate file. (and then the linter won't yell at you for missing examples :D )
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.
Fixed in latest iteration
| "tags": [ | ||
| "scheduledQueryRules" | ||
| ], | ||
| "operationId": "getScheduledQueryRule", |
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.
again, fix the operationId to match the pattern (ieScheduledQueryRules_Get)
| "schema": { | ||
| "$ref": "#/definitions/LogSearchRuleResource" | ||
| }, | ||
| "examples": { |
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.
again, move example into external file with x-ms-examples
| "description": "The parameters of the rule to create or update." | ||
| } | ||
| ], | ||
| "responses": { |
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.
You should support a "default" response for errors. (see example https://github.com/abversqr/azure-rest-api-specs/blob/2e4c790d16eb6be9299db7a75798bca1697fd5e9/specification/monitor/resource-manager/microsoft.insights/stable/2018-03-01/metricAlert_API.json#L503 )
| } | ||
| } | ||
| }, | ||
| "404": { |
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.
Error states should be modeled as "default" responses and have a model to deserialize the error into.
A lot of these things should have been caught in the API review board -- I'll pause the review here, and wait until after the review board has seen these APIs.
| "readOnly": true, | ||
| "description": "Azure resource Id" | ||
| }, | ||
| "name": { |
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 also be readonly since the name comes from URL
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.
Fixed in latest iteration
| "modelAsString": true | ||
| } | ||
| }, | ||
| "skuType": { |
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.
SKUs of a resource is indicated through the ARM top level "sku" property. The details can be found in the ARM resource provider contract
| "format": "date-time", | ||
| "description": "Last time the rule was updated in IS08601 format." | ||
| }, | ||
| "provisioningState": { |
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 define as an enum and list all the possible values.
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.
Fixed in latest iteration
Resolving Comments
|
Hi There, I am the AutoRest Linter Azure bot. I am here to help. My task is to analyze the situation from the AutoRest linter perspective. Please review the below analysis result: 💡 Please review potentially introduced Error(s)/Warning(s): Analysis Report 💡 File: AutoRest Linter Guidelines | AutoRest Linter Issues | Send feedback Thanks for your co-operation. |
…rmat Couple of changes - 1. Made SKU as top level proprty as mentioned here - https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/resource-api-reference.md#put-resource 2. including generic error response format
|
Hi There, I am the AutoRest Linter Azure bot. I am here to help. My task is to analyze the situation from the AutoRest linter perspective. Please review the below analysis result: 💡 Please review potentially introduced Error(s)/Warning(s): Analysis Report 💡 File: AutoRest Linter Guidelines | AutoRest Linter Issues | Send feedback Thanks for your co-operation. |
|
Looks good! |
|
Hey @fearthecowboy, I have resolved all comments. Can ou please have a look into this and sign-off if no blocking changes are pending, |
|
@abversqr -- hey just a few things to clean up:
You can run the model validator locally if you install it : npm install -g oavAnd then run it from your Which will tell you what's not quite right with your examples. Thanks! |
1. Removed SKU - Billing Model is still under discussion, hence need not to be exposed to customers. 2. Enabled field ichanged to align with camel case. 3. 'throttleTillDate' in properties.action changed to 'throttlingInMin' to denote correct meaning and it’s data type changed to number instead of date. 4. 'status' to be removed in properties.action from examples. 5. 'severity' made a required field in properties.action. 6. Removed Examples from original spec json
AutoRest linter results for SDK Related Validation Errors/WarningsThese errors are reported by the SDK team's validation tools, reachout to ADX Swagger Reviewers directly for any questions or concerns. File: specification/monitor/resource-manager/readme.md
|
AutoRest linter results for ARM Related Validation Errors/WarningsThese errors are reported by the ARM team's validation tools, reachout to ARM RP API Review directly for any questions or concerns. File: specification/monitor/resource-manager/readme.md
|
| Code | Id | Source | Message |
|---|---|---|---|
| TrackedResourcePatchOperation | R3026 | Link | Tracked resource 'LogSearchRuleResource' must have patch operation that at least supports the update of tags. It's strongly recommended that the PATCH operation supports update of all mutable properties as well. |
AutoRest Linter Guidelines | AutoRest Linter Issues | Send feedback
Thanks for your co-operation.
Updated Example to reflect AI instances in tags and 'dataSourceId"
AutoRest linter results for SDK Related Validation Errors/WarningsThese errors are reported by the SDK team's validation tools, reachout to ADX Swagger Reviewers directly for any questions or concerns. File: specification/monitor/resource-manager/readme.md
|
AutoRest linter results for ARM Related Validation Errors/WarningsThese errors are reported by the ARM team's validation tools, reachout to ARM RP API Review directly for any questions or concerns. File: specification/monitor/resource-manager/readme.md
|
| Code | Id | Source | Message |
|---|---|---|---|
| TrackedResourcePatchOperation | R3026 | Link | Tracked resource 'LogSearchRuleResource' must have patch operation that at least supports the update of tags. It's strongly recommended that the PATCH operation supports update of all mutable properties as well. |
AutoRest Linter Guidelines | AutoRest Linter Issues | Send feedback
Thanks for your co-operation.
AutoRest linter results for SDK Related Validation Errors/WarningsThese errors are reported by the SDK team's validation tools, reachout to ADX Swagger Reviewers directly for any questions or concerns. File: specification/monitor/resource-manager/readme.md
|
AutoRest linter results for ARM Related Validation Errors/WarningsThese errors are reported by the ARM team's validation tools, reachout to ARM RP API Review directly for any questions or concerns. File: specification/monitor/resource-manager/readme.md
|
Restore Tags Description
AutoRest linter results for ARM Related Validation Errors/WarningsThese errors are reported by the ARM team's validation tools, reachout to ARM RP API Review directly for any questions or concerns. File: specification/monitor/resource-manager/readme.md
|
| Code | Id | Source | Message |
|---|---|---|---|
| TrackedResourcePatchOperation | R3026 | Link | Tracked resource 'LogSearchRuleResource' must have patch operation that at least supports the update of tags. It's strongly recommended that the PATCH operation supports update of all mutable properties as well. |
AutoRest Linter Guidelines | AutoRest Linter Issues | Send feedback
Thanks for your co-operation.
AutoRest linter results for SDK Related Validation Errors/WarningsThese errors are reported by the SDK team's validation tools, reachout to ADX Swagger Reviewers directly for any questions or concerns. File: specification/monitor/resource-manager/readme.md
|
Fixed errores reported by running command "oav validate-example"
| "$ref": "#/parameters/SubscriptionIdParameter" | ||
| } | ||
| ], | ||
| "responses": { |
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.
You should have a default response modeled here -- if the service fails for any reason, the client needs to be able to get the error response.
AutoRest linter results for ARM Related Validation Errors/WarningsThese errors are reported by the ARM team's validation tools, reachout to ARM RP API Review directly for any questions or concerns. File: specification/monitor/resource-manager/readme.md
|
| Code | Id | Source | Message |
|---|---|---|---|
| TrackedResourcePatchOperation | R3026 | Link | Tracked resource 'LogSearchRuleResource' must have patch operation that at least supports the update of tags. It's strongly recommended that the PATCH operation supports update of all mutable properties as well. |
AutoRest Linter Guidelines | AutoRest Linter Issues | Send feedback
Thanks for your co-operation.
AutoRest linter results for SDK Related Validation Errors/WarningsThese errors are reported by the SDK team's validation tools, reachout to ADX Swagger Reviewers directly for any questions or concerns. File: specification/monitor/resource-manager/readme.md
|
Changes - 1. Added Default Response payload in all APIs 2. Made azNs description more clear
fearthecowboy
left a comment
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.
There is still a R3026 Linter violation -- the RP will fix in a subsequent PR : "we are working on this, but will take couple of weeks to get this done. Once this done, we will push this change in new PR for review. Let us know if you see any concern with this."
AutoRest linter results for ARM Related Validation Errors/WarningsThese errors are reported by the ARM team's validation tools, reachout to ARM RP API Review directly for any questions or concerns. File: specification/monitor/resource-manager/readme.md
|
| Code | Id | Source | Message |
|---|---|---|---|
| TrackedResourcePatchOperation | R3026 | Link | Tracked resource 'LogSearchRuleResource' must have patch operation that at least supports the update of tags. It's strongly recommended that the PATCH operation supports update of all mutable properties as well. |
AutoRest Linter Guidelines | AutoRest Linter Issues | Send feedback
Thanks for your co-operation.
AutoRest linter results for SDK Related Validation Errors/WarningsThese errors are reported by the SDK team's validation tools, reachout to ADX Swagger Reviewers directly for any questions or concerns. File: specification/monitor/resource-manager/readme.md
|
Added GA API version for Scheduled Query Rule
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-versionin the path should match theapi-versionin the spec).Quality of Swagger