-
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
Users/tolee/workbooks s360 compliance #11746
Changes from all commits
6d7fc10
6ed2fe6
28bc4a2
84182aa
7a85cab
029e5ee
f908e21
da943d3
52f09dc
da280c8
865c9d2
a418bf8
89fb6f4
8db80e4
b7f1235
6c3dee3
3fefdbd
72cc9f9
6b38d9f
ba2bfe5
a970943
b736fdc
6ea471e
7afa423
dc913a3
5589467
a705d18
81ac6cc
7772dd5
9aa76af
f1c3eef
27139ef
ddf88f0
82bdfd4
b6a287f
6a82c5c
5f81d03
9a2a3e7
a190ed3
262366e
5cc408a
ffca810
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ | |
"resourceName": "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2" | ||
}, | ||
"responses": { | ||
"201": {}, | ||
"200": {}, | ||
"204": {} | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,7 +23,7 @@ | |
} | ||
}, | ||
"responses": { | ||
"200": { | ||
"201": { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 201 means Created. For Patch action, it should return 200. So to fix the s360, the service implementation need to be fixed. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm only updating the swagger documentation to reflect the actual response codes that are being returned form this api. Currently upon PATCH request for this api, it returns a 201 and not a 200. The way I understand it, the cause for the S360 error was because the actual response was returning a 201, but the existing swagger configuration was expecting a 200 (as you are suggesting it should be). Therefore, this PR changes the response code to 201 to match the existing api response code. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There are quite many breaking changes, as you may have noticed. Per rule made by breaking change review board, you will need follow the process defined in https://aka.ms/AzBreakingChangesPolicy to request breaking approval. Thus, for this specific issue, I would suggest you to change service implementation instead. That will also resolve the S360 issue, and there's no breaking change. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So it sounds like I understood the S360 error correctly. there are many breaking changes because the previous swagger definition was defined incorrectly to start with. that is why i'm requesting a breaking change exemption so that we can start regularly maintaining it and keeping it up to date. It seemed like the full breaking change approval process would take a long time and since the s360 deadline was approaching, I thought that the exception was the right request since these changes are not actually breaking changes - they are correcting the incorrect existing swagger definition. But if there's no way around it and we have to go through the whole process, then that is fine. I'm just concerned that we'd just be out of SLA for the long duration of the approval process. |
||
"body": { | ||
"id": "c0deea5e-3344-40f2-96f8-6f8e1c3b5722", | ||
"type": "Microsoft.Insights/myworkbooks", | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -47,7 +47,8 @@ | |
"storageUri": null | ||
} | ||
} | ||
] | ||
], | ||
"nextLink": null | ||
} | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"parameters": { | ||
"api-version": "2020-10-20", | ||
"subscriptionId": "6b643656-33eb-422f-aee8-3ac145d124af", | ||
"resourceGroupName": "my-resource-group", | ||
"category": "workbook" | ||
}, | ||
"responses": { | ||
"200": { | ||
"body": [], | ||
"nextLink": null | ||
} | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ | |
"resourceName": "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2" | ||
}, | ||
"responses": { | ||
"201": {}, | ||
"200": {}, | ||
"204": {} | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,7 +30,7 @@ | |
} | ||
}, | ||
"responses": { | ||
"200": { | ||
"201": { | ||
"body": { | ||
"identity": { | ||
"type": "UserAssigned", | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -50,7 +50,8 @@ | |
"storageUri": null | ||
} | ||
} | ||
] | ||
], | ||
"nextLink": null | ||
} | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -51,6 +51,9 @@ | |
{ | ||
"$ref": "#/parameters/TagsParameter" | ||
}, | ||
{ | ||
"$ref": "#/parameters/SourceIdParameter" | ||
}, | ||
{ | ||
"$ref": "#/parameters/CanFetchWorkbookContentParameter" | ||
}, | ||
|
@@ -73,11 +76,14 @@ | |
} | ||
}, | ||
"x-ms-pageable": { | ||
"nextLinkName": null | ||
"nextLinkName": "nextLink" | ||
}, | ||
"x-ms-examples": { | ||
"WorkbooksList": { | ||
"$ref": "./examples/MyWorkbooksList.json" | ||
}, | ||
"WorkbooksList2": { | ||
"$ref": "./examples/MyWorkbooksList2.json" | ||
} | ||
} | ||
} | ||
|
@@ -118,11 +124,14 @@ | |
} | ||
}, | ||
"x-ms-pageable": { | ||
"nextLinkName": null | ||
"nextLinkName": "nextLink" | ||
}, | ||
"x-ms-examples": { | ||
"WorkbooksList": { | ||
"$ref": "./examples/MyWorkbooksList.json" | ||
}, | ||
"WorkbooksList2": { | ||
"$ref": "./examples/MyWorkbooksList2.json" | ||
} | ||
} | ||
} | ||
|
@@ -183,7 +192,7 @@ | |
} | ||
], | ||
"responses": { | ||
"201": { | ||
"200": { | ||
"description": "The private workbook has been successfully deleted." | ||
}, | ||
"204": { | ||
|
@@ -215,6 +224,9 @@ | |
{ | ||
"$ref": "#/parameters/WorkbookResourceNameParameter" | ||
}, | ||
{ | ||
"$ref": "#/parameters/SourceIdParameter" | ||
}, | ||
{ | ||
"$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter" | ||
}, | ||
|
@@ -267,6 +279,9 @@ | |
{ | ||
"$ref": "#/parameters/WorkbookResourceNameParameter" | ||
}, | ||
{ | ||
"$ref": "#/parameters/SourceIdParameter" | ||
}, | ||
{ | ||
"$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter" | ||
}, | ||
|
@@ -281,7 +296,7 @@ | |
} | ||
], | ||
"responses": { | ||
"200": { | ||
"201": { | ||
"description": "The private workbook definition updated.", | ||
"schema": { | ||
"$ref": "#/definitions/MyWorkbook" | ||
|
@@ -346,6 +361,12 @@ | |
"type": "string" | ||
}, | ||
"description": "Resource tags" | ||
}, | ||
"etag": { | ||
"additionalProperties": { | ||
"type": "string" | ||
}, | ||
"description": "Resource etag" | ||
} | ||
}, | ||
"x-ms-azure-resource": true, | ||
|
@@ -360,6 +381,9 @@ | |
"$ref": "#/definitions/MyWorkbook" | ||
}, | ||
"description": "An array of private workbooks." | ||
}, | ||
"nextLink": { | ||
"type": "string" | ||
} | ||
}, | ||
"description": "Workbook list result." | ||
|
@@ -380,7 +404,7 @@ | |
"shared" | ||
], | ||
"x-ms-enum": { | ||
"name": "SharedTypeKind", | ||
"name": "kind", | ||
"modelAsString": true | ||
} | ||
}, | ||
|
@@ -405,6 +429,7 @@ | |
}, | ||
"serializedData": { | ||
"type": "string", | ||
"x-nullable": true, | ||
"description": "Configuration of this particular private workbook. Configuration data is a string containing valid JSON" | ||
}, | ||
"version": { | ||
|
@@ -438,46 +463,54 @@ | |
}, | ||
"storageUri": { | ||
"type": "string", | ||
"x-nullable": true, | ||
"description": "BYOS Storage Account URI" | ||
} | ||
} | ||
}, | ||
"ErrorFieldContract": { | ||
"MyWorkbookError": { | ||
"description": "Error response.", | ||
"properties": { | ||
"code": { | ||
"type": "string", | ||
"description": "Property level error code." | ||
}, | ||
"message": { | ||
"type": "string", | ||
"description": "Human-readable representation of property-level error." | ||
}, | ||
"target": { | ||
"type": "string", | ||
"description": "Property name." | ||
"error": { | ||
"$ref": "#/definitions/ErrorDefinition", | ||
"description": "The error details." | ||
} | ||
}, | ||
"description": "Error Field contract." | ||
} | ||
}, | ||
"MyWorkbookError": { | ||
"ErrorDefinition": { | ||
"description": "Error definition.", | ||
"properties": { | ||
"code": { | ||
"description": "Service specific error code which serves as the substatus for the HTTP error code.", | ||
"type": "string", | ||
"description": "Service-defined error code. This code serves as a sub-status for the HTTP error code specified in the response." | ||
"readOnly": true | ||
}, | ||
"message": { | ||
"description": "Description of the error.", | ||
"type": "string", | ||
"description": "Human-readable representation of the error." | ||
"readOnly": true | ||
}, | ||
"details": { | ||
"innererror": { | ||
"description": "Internal error details.", | ||
"items": { | ||
"$ref": "#/definitions/InnerErrorTrace" | ||
}, | ||
"readOnly": true | ||
} | ||
} | ||
}, | ||
"InnerErrorTrace": { | ||
"description": "Error details", | ||
"properties": { | ||
"trace": { | ||
"description": "detailed error trace", | ||
"type": "array", | ||
"items": { | ||
"$ref": "#/definitions/ErrorFieldContract" | ||
"type": "string" | ||
}, | ||
"description": "The list of invalid fields send in request, in case of validation error." | ||
"readOnly": true | ||
} | ||
}, | ||
"description": "Error message body that will indicate why the operation failed." | ||
} | ||
}, | ||
"ManagedIdentity": { | ||
"description": "Customer Managed Identity", | ||
|
@@ -541,19 +574,11 @@ | |
"SourceIdParameter": { | ||
"name": "sourceId", | ||
"in": "query", | ||
"required": true, | ||
"required": false, | ||
"type": "string", | ||
"description": "Azure Resource Id that will fetch all linked workbooks.", | ||
"x-ms-parameter-location": "method" | ||
}, | ||
"ResourceIdParameter": { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why are you removing the definition here? Better keep it to avoid breaking change error, if not necessary, There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It doesn't exist and it never has. Apparently the initial definition was incorrect and then still approved. So its been just wrong for many years. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I see. Then actually it's not a breaking change. You may ask for breaking change approval for this case. |
||
"name": "resourceId", | ||
"in": "query", | ||
"required": true, | ||
"type": "string", | ||
"description": "Azure Resource Id or any target workbook resource id.", | ||
"x-ms-parameter-location": "method" | ||
}, | ||
"CanFetchWorkbookContentParameter": { | ||
"name": "canFetchContent", | ||
"in": "query", | ||
|
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.
Delete should return 200 when done successfully rather than 201. So this is a bugfix. We'd suggest you to ask for approval from breaking change review board.
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.
Are you suggesting that I add this to the existing swagger kpi exemption request or to create a new one for this change.
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.
Nope, I suggest you to request breaking change approval for this case. See https://aka.ms/AzBreakingChangesPolicy