-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Creating new swagger entry for Workbook resource #2658
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
Changes from 1 commit
eb38dfb
ea82a68
d869ce9
a17dde3
ed3d2c8
28d306e
397df4f
0f29489
5d4bc6e
acd3d3a
6b77397
302d2ae
cd35c44
75ea99e
6472b25
50fe051
edba30a
ac48433
056a8a4
602ed11
ef71f10
d917fb9
2e97001
b8b0791
61a643f
ab805ce
4a2bf77
0b960ec
7abe2b7
c33cb99
e55eef0
2add5e3
3dd49e7
a16b4b9
171ebd6
8ee7a77
7b0ce0c
5a69bbc
466e6f5
cbc9a29
4b30d56
7a2eba6
08eca8c
64ac742
80256d5
344b07a
d466710
7c8c0b0
b3f35f4
847e7eb
0efeae9
d7bde1c
a957d1b
564b51f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -34,7 +34,7 @@ | |
| } | ||
| }, | ||
| "paths": { | ||
| "/subscriptions/{subscriptionId}/resourceGroup/{resourceGroupName}/locations/{location}/providers/microsoft.insights/workbooks/category/{category}": { | ||
| "/subscriptions/{subscriptionId}/resourceGroup/{resourceGroupName}/providers/microsoft.insights/workbooks": { | ||
| "get": { | ||
| "description": "Get all Workbooks defined within a specified resource group and category.", | ||
| "operationId": "Workbooks_ListByResourceGroup", | ||
|
|
@@ -45,7 +45,7 @@ | |
| { | ||
| "$ref": "#/parameters/ResourceGroupNameParameter" | ||
| }, | ||
| { | ||
| { | ||
| "$ref": "#/parameters/LocationParameter" | ||
| }, | ||
| { | ||
|
|
@@ -70,6 +70,12 @@ | |
| "$ref": "#/definitions/Workbook" | ||
| } | ||
| } | ||
| }, | ||
| "default": { | ||
| "description": "Error response describing why the operation failed.", | ||
| "schema": { | ||
| "$ref": "#/definitions/ErrorResponse" | ||
| } | ||
| } | ||
| }, | ||
| "x-ms-examples": { | ||
|
|
@@ -79,41 +85,7 @@ | |
| } | ||
| } | ||
| }, | ||
| "/subscriptions/{subscriptionId}/resourceGroup/{resourceGroupName}/locations/{location}/providers/microsoft.insights/workbooks/{resourceName}": { | ||
| "get": { | ||
| "description": "Get a single workbook by its resourceName.", | ||
| "operationId": "Workbooks_Get", | ||
| "parameters": [ | ||
| { | ||
| "$ref": "#/parameters/SubscriptionIdParameter" | ||
| }, | ||
| { | ||
| "$ref": "#/parameters/ResourceGroupNameParameter" | ||
| }, | ||
| { | ||
| "$ref": "#/parameters/LocationParameter" | ||
| }, | ||
| { | ||
| "$ref": "#/parameters/WorkbookResourceNameParameter" | ||
| }, | ||
| { | ||
| "$ref": "#/parameters/ApiVersionParameter" | ||
| } | ||
| ], | ||
| "responses": { | ||
| "200": { | ||
| "description": "A workbook definition.", | ||
| "schema": { | ||
| "$ref": "#/definitions/Workbook" | ||
| } | ||
| } | ||
| }, | ||
| "x-ms-examples": { | ||
| "WorkbookGet": { | ||
| "$ref": "./examples/WorkbookGet.json" | ||
| } | ||
| } | ||
| }, | ||
| "/subscriptions/{subscriptionId}/resourceGroup/{resourceGroupName}/providers/microsoft.insights/workbooks/{resourceName}": { | ||
| "delete": { | ||
| "description": "Delete a workbook.", | ||
| "operationId": "Workbooks_Delete", | ||
|
|
@@ -137,16 +109,23 @@ | |
| "responses": { | ||
| "200": { | ||
| "description": "The workbook has been successfully deleted." | ||
| }, | ||
| "204": { | ||
| "description": "The resource doens't exisit." | ||
| }, | ||
| "default": { | ||
| "description": "Error response describing why the operation failed.", | ||
| "schema": { | ||
| "$ref": "#/definitions/ErrorResponse" | ||
| } | ||
| } | ||
| }, | ||
| "x-ms-examples": { | ||
| "WorkbookList": { | ||
| "$ref": "./examples/WorkbookResponseOnly.json" | ||
| } | ||
| } | ||
| } | ||
| }, | ||
| "/subscriptions/{subscriptionId}/resourceGroup/{resourceGroupName}/providers/microsoft.insights/workbooks/{resourceName}": { | ||
| }, | ||
| "put": { | ||
| "description": "Create a new workbook.", | ||
| "operationId": "Workbooks_Create", | ||
|
|
@@ -179,6 +158,12 @@ | |
| "schema": { | ||
| "$ref": "#/definitions/Workbook" | ||
| } | ||
| }, | ||
| "default": { | ||
| "description": "Error response describing why the operation failed.", | ||
| "schema": { | ||
| "$ref": "#/definitions/ErrorResponse" | ||
| } | ||
| } | ||
| }, | ||
| "x-ms-examples": { | ||
|
|
@@ -219,6 +204,12 @@ | |
| "schema": { | ||
| "$ref": "#/definitions/Workbook" | ||
| } | ||
| }, | ||
| "default": { | ||
| "description": "Error response describing why the operation failed.", | ||
| "schema": { | ||
| "$ref": "#/definitions/ErrorResponse" | ||
| } | ||
| } | ||
| }, | ||
| "x-ms-examples": { | ||
|
|
@@ -228,7 +219,46 @@ | |
| } | ||
| } | ||
| }, | ||
| "/providers/microsoft.insights/workbooks/category/{category}": { | ||
| "/subscriptions/{subscriptionId}/providers/microsoft.insights/workbooks/{resourceName}": { | ||
| "get": { | ||
| "description": "Get a single workbook by its resourceName.", | ||
| "operationId": "Workbooks_Get", | ||
| "parameters": [ | ||
| { | ||
| "$ref": "#/parameters/SubscriptionIdParameter" | ||
| }, | ||
| { | ||
| "$ref": "#/parameters/WorkbookResourceNameParameter" | ||
| }, | ||
| { | ||
| "$ref": "#/parameters/LocationParameter" | ||
| }, | ||
| { | ||
| "$ref": "#/parameters/ApiVersionParameter" | ||
| } | ||
| ], | ||
| "responses": { | ||
| "200": { | ||
| "description": "A workbook definition.", | ||
| "schema": { | ||
| "$ref": "#/definitions/Workbook" | ||
| } | ||
| }, | ||
| "default": { | ||
| "description": "Error response describing why the operation failed.", | ||
| "schema": { | ||
| "$ref": "#/definitions/ErrorResponse" | ||
| } | ||
| } | ||
| }, | ||
| "x-ms-examples": { | ||
| "WorkbookGet": { | ||
| "$ref": "./examples/WorkbookGet.json" | ||
| } | ||
| } | ||
| } | ||
| }, | ||
| "/providers/microsoft.insights/workbooks": { | ||
| "get": { | ||
| "description": "Gets a list of workbooks.", | ||
| "operationId": "Workbooks_ListBySourceId", | ||
|
|
@@ -258,19 +288,23 @@ | |
| "$ref": "#/definitions/Workbook" | ||
| } | ||
| } | ||
| }, | ||
| "default": { | ||
| "description": "Error response describing why the operation failed.", | ||
| "schema": { | ||
| "$ref": "#/definitions/ErrorResponse" | ||
| } | ||
| } | ||
| }, | ||
| "x-ms-examples": { | ||
| "WorkbooksList": { | ||
| "$ref": "./examples/WorkbooksListLink.json" | ||
| } | ||
| } | ||
| } | ||
| }, | ||
| "/subscriptions/{subscriptionId}/resourceGroup/{resourceGroupName}/resourceName/{resourceName}/providers/microsoft.insights/workbooks": { | ||
| }, | ||
| "put": { | ||
| "description": "Create a new workbook.", | ||
| "operationId": "Workbook_CreateLink", | ||
| "operationId": "Workbooks_CreateLink", | ||
| "parameters": [ | ||
|
Contributor
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 does this not have a request/response body? The operation Id seems to indicate it is creating some link and not an actual workbook. What is this link?
Contributor
Author
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. We are just create a link between a source resource and a workbook resource. Therefore, just return 200 is enough. |
||
| { | ||
| "$ref": "#/parameters/SubscriptionIdParameter" | ||
|
|
@@ -291,6 +325,12 @@ | |
| "responses": { | ||
| "200": { | ||
| "description": "The link has been created." | ||
| }, | ||
| "default": { | ||
| "description": "Error response describing why the operation failed.", | ||
| "schema": { | ||
| "$ref": "#/definitions/ErrorResponse" | ||
| } | ||
| } | ||
| }, | ||
| "x-ms-examples": { | ||
|
|
@@ -301,7 +341,7 @@ | |
| }, | ||
| "patch": { | ||
| "description": "Updates a workbook that has already been added.", | ||
| "operationId": "Workbook_UpdateLink", | ||
| "operationId": "Workbooks_UpdateLink", | ||
| "parameters": [ | ||
| { | ||
| "$ref": "#/parameters/SubscriptionIdParameter" | ||
|
|
@@ -325,6 +365,12 @@ | |
| "schema": { | ||
| "$ref": "#/definitions/Workbook" | ||
| } | ||
| }, | ||
| "default": { | ||
| "description": "Error response describing why the operation failed.", | ||
| "schema": { | ||
| "$ref": "#/definitions/ErrorResponse" | ||
| } | ||
| } | ||
| }, | ||
| "x-ms-examples": { | ||
|
|
@@ -335,7 +381,7 @@ | |
| }, | ||
| "delete": { | ||
| "description": "Delete a workbook.", | ||
| "operationId": "Workbook_DeleteLink", | ||
| "operationId": "Workbooks_DeleteLink", | ||
| "parameters": [ | ||
| { | ||
| "$ref": "#/parameters/ResourceGroupNameParameter" | ||
|
|
@@ -353,6 +399,15 @@ | |
| "responses": { | ||
| "200": { | ||
| "description": "The workbook link has been successfully deleted." | ||
| }, | ||
| "204": { | ||
| "description": "The resource doens't exisit." | ||
| }, | ||
| "default": { | ||
| "description": "Error response describing why the operation failed.", | ||
| "schema": { | ||
| "$ref": "#/definitions/ErrorResponse" | ||
| } | ||
| } | ||
| }, | ||
| "x-ms-examples": { | ||
|
|
@@ -492,6 +547,43 @@ | |
| "description": "Optional resourceId for a source resource." | ||
| } | ||
| } | ||
| }, | ||
| "ErrorFieldContract": { | ||
| "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." | ||
| } | ||
| }, | ||
| "description": "Error Field contract." | ||
| }, | ||
| "ErrorResponse": { | ||
| "properties": { | ||
| "code": { | ||
| "type": "string", | ||
| "description": "Service-defined error code. This code serves as a sub-status for the HTTP error code specified in the response." | ||
| }, | ||
| "message": { | ||
| "type": "string", | ||
| "description": "Human-readable representation of the error." | ||
| }, | ||
| "details": { | ||
| "type": "array", | ||
| "items": { | ||
| "$ref": "#/definitions/ErrorFieldContract" | ||
| }, | ||
| "description": "The list of invalid fields send in request, in case of validation error." | ||
| } | ||
| }, | ||
| "description": "Error Body contract." | ||
| } | ||
| }, | ||
| "parameters": { | ||
|
|
@@ -527,15 +619,15 @@ | |
| }, | ||
| "LocationParameter": { | ||
| "name": "location", | ||
| "in": "path", | ||
| "in": "query", | ||
| "required": true, | ||
| "type": "string", | ||
| "description": "The name of location where workbook is stored.", | ||
| "x-ms-parameter-location": "method" | ||
| }, | ||
| "CategoryParameter": { | ||
| "name": "category", | ||
| "in": "path", | ||
| "in": "query", | ||
| "required": true, | ||
| "type": "string", | ||
| "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 should return a "value" array which will be a collection of workbooks. But anyway, as stated above the API signature does not indicate that. As per the API signature, customer is doing a GET on the category/{categoryName} and is expected to return a "category" entity
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.
Will fix so that it will return object that contains an array. A workbook contains a category in properties field.