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 Detector Endpoints for Web Apps and App Service Environments #2764

Merged
merged 7 commits into from
Apr 16, 2018

Conversation

stevenernst131
Copy link
Contributor

@stevenernst131 stevenernst131 commented Mar 28, 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

There were errors and warnings that already exist in the Microsoft.Web provider, but there are no new errors and warnings introduced.

@AutorestCI
Copy link

AutorestCI commented Mar 28, 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

@AutorestCI
Copy link

AutorestCI commented Mar 28, 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 28, 2018

Automation for azure-sdk-for-go

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-go#1624

@AutorestCI
Copy link

AutorestCI commented Mar 28, 2018

Automation for azure-sdk-for-node

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-node#2612

"type": "object",
"properties": {
"description": {
"description": "Description",
Copy link
Contributor

Choose a reason for hiding this comment

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

Please make this a little more descriptive :)

"type": "string"
},
"description": {
"description": "Description",
Copy link
Contributor

Choose a reason for hiding this comment

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

Same here

@@ -15,6 +15,236 @@
"application/json"
],
"paths": {
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/detectors": {
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 examples for these new operations.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There are 4 new endpoints, 6 if you include the slot variations, and they all have examples. Let me know if you are not seeing one though.

Copy link
Contributor

Choose a reason for hiding this comment

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

Sorry for the late response - You need to reference them through "x-ms-examples" on the operation. https://github.com/Azure/azure-rest-api-specs/blob/master/documentation/x-ms-examples.md

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi @jianghaolu, thanks for the resource, I have added the references to the examples.

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks @stevenernst131 I'll take a look at the examples now

@stevenernst131
Copy link
Contributor Author

@jianghaolu I have added the richer descriptions and pushed the change.

"responses": {
"200": {
"body": {
"value": {
Copy link
Contributor

Choose a reason for hiding this comment

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

Please move everything under "value" to under "body". The Swagger definition doesn't contain a "value" for DetectorResponse.

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 catching, I think this was a copy paste error. I have removed value in all 3 places

Copy link
Contributor

Choose a reason for hiding this comment

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

This one, however, should have "value" removed.

"subCategory": "App Availability",
"supportTopicId": ""
},
"dataset": [
Copy link
Contributor

Choose a reason for hiding this comment

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

dataset is defined as an object in type DetectorResponse.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

dataset is an array, I have updated it in the definition. It is an array in all examples.

"responses": {
"200": {
"body": {
"value": {
Copy link
Contributor

Choose a reason for hiding this comment

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

Please remove "value".

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

"subCategory": "App Availability",
"supportTopicId": ""
},
"dataset": [
Copy link
Contributor

Choose a reason for hiding this comment

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

"dataset" is not a list.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changed to list.

"responses": {
"200": {
"body": {
"value": {
Copy link
Contributor

Choose a reason for hiding this comment

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

Please remove "value".

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

}
}
]
"id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/Sample-WestUSResourceGroup/providers/Microsoft.Web/hostingEnvironments/SampleAppServiceEnvironment/detectors/runtimeavailability",
Copy link
Contributor

Choose a reason for hiding this comment

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

the "value" here is actually correct since this is from a list operation.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed it from the wrong file, added it back to this file and removed it from Diagnostics_GetHostingEnvironmentDetectorResponse.

"body": {
"id": "/subscriptions/ef90e930-9d7f-4a60-8a99-748e0eea69de/resourceGroups/Build2015DemoRG/providers/Microsoft.Web/sites/BuggyBakery/detectors/runtimeavailability",
"name": "runtimeavailability",
"location": "West US",
Copy link
Contributor

Choose a reason for hiding this comment

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

"location" is not allowed for a proxy resource.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed

"type": "array",
"description": "Data Set",
"items": {
"$ref": "#/definitions/Solution"
Copy link
Contributor

Choose a reason for hiding this comment

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

Why did you change the item type from DiagnosticData to Solution?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy paste error, corrected.

@stevenernst131
Copy link
Contributor Author

Hi @jianghaolu, I believe I have addressed all your issues. Let me know if there is anything else from your side to be addressed.

]
},
"renderingProperties": {
"renderingType": 2,
Copy link
Contributor

Choose a reason for hiding this comment

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

This is defined as an enum but this is an integer. Same elsewhere.

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 have changed it to return a string, which is the actual way that we return enums.

@jianghaolu
Copy link
Contributor

@stevenernst131 Sorry for the late response. One more issue and we should be good to go. (The new issue was in Dataset which was invalid earlier so the tool didn't report it earlier)

@jianghaolu
Copy link
Contributor

jianghaolu commented Apr 6, 2018

Oh I just realized you changed all the error response types - that's a breaking change - let me sync with Samer to see what to do here.

@stevenernst131
Copy link
Contributor Author

Hi @jianghaolu, I did not mean to change the Error Response in a way that caused a breaking change, that was not my intention. I have changed it back to how it was before, so let me know if that is correct.

@stevenernst131
Copy link
Contributor Author

@jianghaolu Please let me know if there is anything else I need to do.

@jianghaolu
Copy link
Contributor

@stevenernst131 Hi Steve! Sorry for the late response. Been crazy busy with other deliverables.

Actually, do you think you can just remove those added "default" sections? Our SDKs default to throw CloudException when a default section is not provided. Changing them to CommonDefinitions.json#/definitions/DefaultErrorResponse is also a breaking change.

@stevenernst131
Copy link
Contributor Author

@jianghaolu Thanks for the response, I have pushed a change to remove all the default sections, let me know if that works for you.

@azuresdkciprbot
Copy link

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:

File: specification/web/resource-manager/readme.md
Before the PR: Warning(s): 0 Error(s): 26
After the PR: Warning(s): 0 Error(s): 26

AutoRest Linter Guidelines | AutoRest Linter Issues | Send feedback

Thanks for your co-operation.

@azuresdkciprbot
Copy link

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: specification/web/resource-manager/readme.md
Before the PR: Warning(s): 783 Error(s): 0
After the PR: Warning(s): 792 Error(s): 0

AutoRest Linter Guidelines | AutoRest Linter Issues | Send feedback

Thanks for your co-operation.

@jianghaolu
Copy link
Contributor

Thanks! Merging!

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.

4 participants