-
Notifications
You must be signed in to change notification settings - Fork 5.2k
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
Add Microsoft.Web ResourceHealthMetadata swagger #2588
Conversation
Adding a new set of Resource Health Metadata API swagger files for Microsoft.Web
…wagger file Update the Microsoft.Web autorest config to test validity of the ResourceHealthMetadata swagger file
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: |
Automation for azure-sdk-for-goA PR has been created for you: |
Greetings @pavelzel ! These look like new APIs, so I'm going to ask @ravbhatnagar to do a quick review as well. Straight off they look pretty good; were you going to add |
Adding examples for the Microsoft.Web ResourceHealthMetdata APIs
Automation for azure-sdk-for-nodeNothing to generate for azure-sdk-for-node |
@fearthecowboy Added x-ms-examples as requested |
@fearthecowboy @ravbhatnagar , is there anything else you need from me for this PR? |
Your examples are failing validation: https://travis-ci.org/Azure/azure-rest-api-specs/jobs/350123757 |
"$ref": "#/parameters/apiVersionParameter" | ||
} | ||
], | ||
"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.
Add "default" response to all APIs to capture error cases. Schema complies with the ARM RPC error contract. example from Batch RP swagger.
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.
@ravbhatnagar This looks to be a newer requirement for swagger files. Since we (Microsoft.Web) auto-generate our swagger files from code, is it okay to not have the "default" response for this file while we work on adding support for this in the auto-generation?
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 up the responses to have a default error response
"properties": { | ||
"description": "ResourceHealthMetadata resource specific properties", | ||
"properties": { | ||
"category": { |
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 a candidate for an enum?
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 is a string as per spec provided by the RHC team, relevant part of spec:
Category (string) - this is the category of the sku that you have communicated to RHC. RHC Rp will select the policy based on this value. If the sku's category does not match existing categories, we will fall back to the default category
"description": "The category that the resource matches in the RHC Policy File", | ||
"type": "string" | ||
}, | ||
"signalAvailability": { |
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.
ideally this should be an enum with multiple states. Currently you might just require true or false for this but in future as scenario evolves you might want to indicate more states.
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.
Same as category, this is a boolean as per the spec I was given by RHC team:
SignalAvailability (boolean) - This field is to notify us if the signal for a resource is reaching us or not. This can come into picture when you are aware that a particular set of resources (possibly belonging a test region or a legacy region) are not sending RHC signals. When this is false, we will put the corresponding resource into unknown events bucket.
@fearthecowboy - no blocking feedback from my side. Feel free to merge based on response to above comments. |
The location should not have been populated for the Microsoft.Web ResourceHealthMetadata API examples. The single ResourceHealthMetadata GET call should return ResourceHealthMetadata and not a collection of them
Automation for azure-libraries-for-javaA 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: |
Adding the default errror responses to the Microsoft.Web ResourceHealthMetadata API swagger
For Microsoft.Web ResourceHealthMetadata APIs renaming the default error response from ErrorResponse to DefaultErrorResponse to fix the python SDK generation. The DefaultErrorResponse will be the default error response for our other APIs in the future as well
@AutorestCI rebuild azure-sdk-for-go |
@fearthecowboy is there anything else you need from me for this PR? |
Looks good to me @pavelzel -- you want me to merge this now? |
@fearthecowboy Yes, please go ahead and merge. Thank you! |
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. |
@AutorestCI rebuild azure-sdk-for-go |
…nfix Replace cred with placeholder
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