Add LRO to archboard feedback guidance (#4527)

* Update archboard_feedback.md

* Update archboard_feedback.md

* Update archboard_feedback.md

* Update archboard_feedback.md
This commit is contained in:
Laurent Mazuel 2022-05-03 15:06:34 -07:00 коммит произвёл GitHub
Родитель c6172bf992
Коммит 77ac9545ce
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
1 изменённых файлов: 26 добавлений и 1 удалений

Просмотреть файл

@ -16,6 +16,7 @@ Content:
- [Rename a model name](#rename-a-model-name)
- [Rename a model attribute](#rename-a-model-attribute)
- [Operation should be pageable](#operation-should-be-pageable)
- [Operation should be LRO](#operation-should-be-lro)
## Need for more/less SDK package(s)
@ -154,4 +155,28 @@ At a glance:
"x-ms-pageable": {
"nextLinkName": null
}
```
```
## Operation should be LRO
You will get this feedback if your operation is a Long Running Operation (LRO), and follow the LRO protocol (usually using Location, Operation-Location, etc.). Those operations need to be tagged as LRO in the Swagger, as this makes SDK generates a specific return type as a poller. For this, use the ["x-ms-long-running-operation"](https://github.com/Azure/autorest/blob/main/docs/extensions/readme.md#x-ms-long-running-operation) option.
```json
"/myservice/subscriptions" :
"put": {
"operationId": "CreateVirtualMachine",
"x-ms-long-running-operation": true
```
For most of the time, _there is no additional information to provide_ as the language runtime will auto-detect what polling mechanism to use.
Some options can be configured with the node ["x-ms-long-running-operation-options"](https://github.com/Azure/autorest/blob/main/docs/extensions/readme.md#x-ms-long-running-operation-options):
- "final-state-via": Is here to prematuraly stop the polling in case your service do not respect the LRO correctly. _Do not use this option if you think your service respects the LRO guidelines, as you could break SDK_. In doubt about this option, please talk to the RestAPI stewardship board.
Example:
```json
"x-ms-long-running-operation": true,
"x-ms-long-running-operation-options": {
"final-state-via": "location"
}
```