-
Notifications
You must be signed in to change notification settings - Fork 5.8k
add long running operation result to the botservice swagger #3214
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
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 |
|---|---|---|
|
|
@@ -683,6 +683,57 @@ | |
| } | ||
| } | ||
| }, | ||
| "/subscriptions/{subscriptionId}/providers/Microsoft.BotService/locations/{location}/operationresults/{operationId}": { | ||
| "get": { | ||
| "x-ms-examples": { | ||
| "Get Server Details": { | ||
| "$ref": "./examples/operationResults.json" | ||
| } | ||
| }, | ||
| "tags": [ | ||
| "Operations" | ||
| ], | ||
| "operationId": "OperationResult_Get", | ||
| "x-ms-long-running-operation": true, | ||
| "description": "List the result of the specified operation.", | ||
| "parameters": [ | ||
| { | ||
| "name": "location", | ||
| "in": "path", | ||
| "required": true, | ||
| "type": "string", | ||
| "description": "The region name which the operation will lookup into. including 'global'" | ||
| }, | ||
| { | ||
| "name": "operationId", | ||
| "in": "path", | ||
| "required": true, | ||
| "type": "string", | ||
| "description": "The target operation Id." | ||
| }, | ||
| { | ||
| "$ref": "#/parameters/apiVersionParameter" | ||
| }, | ||
| { | ||
| "$ref": "#/parameters/subscriptionIdParameter" | ||
| } | ||
| ], | ||
| "responses": { | ||
| "200": { | ||
| "description": "If the operation completed successfully, the service should return 200 (OK)." | ||
| }, | ||
| "202": { | ||
|
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. On similar lines, not sure if the service is supposed to return a
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. the above pattern is directly taken from azure-rest-api-specs\specification\analysisservices\resource-manager\Microsoft.AnalysisServices\stable\2016-05-16\analysisservices.json (please see line 425)
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. The file you pointed out is incorrect too. 202 is simply not acceptable for a GET operation. Does your service actually return that status code? |
||
| "description": "If the operation has been accepted and is ongoing, the service should return 202 (Accepted)" | ||
| }, | ||
| "default": { | ||
| "description": "Error response describing why the operation failed", | ||
| "schema": { | ||
| "$ref": "#/definitions/Error" | ||
| } | ||
| } | ||
| } | ||
| } | ||
| }, | ||
| "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/BotServices/listServiceProviders": { | ||
| "post": { | ||
| "tags": [ | ||
|
|
@@ -765,7 +816,7 @@ | |
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
| }, | ||
| "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}/Connections/{connectionName}": { | ||
| "put": { | ||
|
|
@@ -1990,7 +2041,7 @@ | |
| "description": "Diplay Name of the Service Provider", | ||
| "readOnly": true | ||
| }, | ||
| "serviceProviderName": { | ||
| "serviceProviderName": { | ||
| "type": "string", | ||
| "description": "Diplay Name of the Service Provider", | ||
| "readOnly": true | ||
|
|
@@ -2212,38 +2263,38 @@ | |
| "modelAsString": false, | ||
| "values": [ | ||
| { | ||
| "value": "FacebookChannel" | ||
| "value": "FacebookChannel" | ||
| }, | ||
| { | ||
| "value": "EmailChannel" | ||
| "value": "EmailChannel" | ||
| }, | ||
| { | ||
| "value": "KikChannel" | ||
| "value": "KikChannel" | ||
| }, | ||
| { | ||
| "value": "TelegramChannel" | ||
| "value": "TelegramChannel" | ||
| }, | ||
| { | ||
| "value": "SlackChannel" | ||
| "value": "SlackChannel" | ||
| }, | ||
| { | ||
| "value": "MsTeamsChannel" | ||
| "value": "MsTeamsChannel" | ||
| }, | ||
| { | ||
| "value": "SkypeChannel" | ||
| "value": "SkypeChannel" | ||
| }, | ||
| { | ||
| "value": "WebChatChannel" | ||
| "value": "WebChatChannel" | ||
| }, | ||
| { | ||
| "value": "DirectLineChannel" | ||
| "value": "DirectLineChannel" | ||
| }, | ||
| { | ||
| "value": "SmsChannel" | ||
| "value": "SmsChannel" | ||
| } | ||
| ] | ||
| }, | ||
| "description": "The name of the Channel resource." | ||
| } | ||
| } | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| { | ||
| "parameters": { | ||
| "subscriptionId": "613192d7-503f-477a-9cfe-4efc3ee2bd60", | ||
| "location": "global", | ||
| "operationId": "00000000000000000000000000000000", | ||
| "api-version": "2017-12-01" | ||
| }, | ||
| "responses": { | ||
| "200": { | ||
| "headers": {} | ||
| }, | ||
| "202": { | ||
| "headers": {} | ||
| } | ||
| } | ||
| } |
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.
GEToperations MUST not be long running. If the resource takes a long time to come up, please user provisioning 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.
i added the x-ms-longrunning attribute as autorest was complaining about it, so i have now removed it.
instead of a long running operation we merely want a way to query for an operation result. the operation result operation isnt longrunning itself. sorry for the confusion.