EDU-15977 | add OpenAPI documentation for Shopee integration endpoints#1618
EDU-15977 | add OpenAPI documentation for Shopee integration endpoints#1618anabaarbosa wants to merge 3 commits intomasterfrom
Conversation
|
Thanks for your contribution. The .json file will be checked now with Spectral. |
| "$ref": "#/components/schemas/ErrorResponse" | ||
| }, | ||
| "example": { | ||
| "message": "Conta não encontrada." |
There was a problem hiding this comment.
Essa mensagem deveria ser em inglês, como as outras, ou apenas esta que é em português?
| { | ||
| "$ref": "#/components/parameters/MarketplaceOrderIdPath" | ||
| } | ||
| ], |
There was a problem hiding this comment.
Qual é o requestBody desse endpoint?
| ], | ||
| "summary": "Cancel marketplace delivery", | ||
| "description": "Cancels delivery for a marketplace order received through VTEX callback.\r\n\r\n## Permissions\r\n\r\nAny user or [API key](https://developers.vtex.com/docs/guides/api-authentication-using-api-keys) must have at least one of the appropriate [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) to be able to successfully run this request. Otherwise they will receive a status code `403` error. These are the applicable resources for this endpoint:\r\n\r\n| **Product** | **Category** | **Resource** |\r\n| --------------- | ----------------- | ----------------- |\r\n| OMS | OMS access | **View order** |\r\n| Checkout | CheckoutResources | **Orders Full Access** |\r\n\r\nYou can [create a custom role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-role) with that resource or use one of the following [predefined roles](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy):\r\n\r\n| **Role** | **Resource** | \r\n| --------------- | ----------------- | \r\n| OMS - Full access | View order |\r\n| Checkout Admin | View order |\r\n| IntegrationProfile - Fulfillment Oms | View order |\r\n| OMS - Full access | Orders Full Access |\r\n| Checkout Admin | Orders Full Access |\r\n| IntegrationProfile - Fulfillment Oms | Orders Full Access |\r\n\r\n>❗ Assigning a [predefined role](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy) to users or application keys usually grants permission to multiple [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3). If some of these permissions are not necessary, consider creating a custom role instead. For more information regarding security, see [Best practices for using application keys](https://help.vtex.com/en/tutorial/best-practices-api-keys--7b6nD1VMHa49aI5brlOvJm). To learn more about machine authentication at VTEX, see [Authentication overview](https://developers.vtex.com/docs/guides/authentication).", | ||
| "security": [], |
There was a problem hiding this comment.
Esses endpoints precisam ser públicos, sem security aplicado (security: [])? Pergunto porque a seção de Permissions fala em recursos e roles do License Manager, o que indica autenticação via appKey/appToken ou token de usuário.
Sugestão: alinhar com o bloco de security global:
- Se o endpoint requer autenticação, trocar o
security: []por algo como:
"security": [
{ "appKey": [], "appToken": [] }
]
(ou simplesmente remover osecurityno nível da operação para herdar o global). - Manter
security: []caso o endpoint seja público e não realizar verificações de recursos ou de roles no LM.
| ], | ||
| "summary": "Download legacy shipping label", | ||
| "description": "Downloads a legacy shipping label for the given Shopee order.\r\n\r\n## Permissions\r\n\r\nAny user or [API key](https://developers.vtex.com/docs/guides/api-authentication-using-api-keys) must have at least one of the appropriate [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) to be able to successfully run this request. Otherwise they will receive a status code `403` error. These are the applicable resources for this endpoint:\r\n\r\n| **Product** | **Category** | **Resource** |\r\n| --------------- | ----------------- | ----------------- |\r\n| OMS | OMS access | **View order** |\r\n| Checkout | CheckoutResources | **Orders Full Access** |\r\n\r\nYou can [create a custom role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-role) with that resource or use one of the following [predefined roles](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy):\r\n\r\n| **Role** | **Resource** | \r\n| --------------- | ----------------- | \r\n| OMS - Full access | View order |\r\n| Checkout Admin | View order |\r\n| IntegrationProfile - Fulfillment Oms | View order |\r\n| OMS - Full access | Orders Full Access |\r\n| Checkout Admin | Orders Full Access |\r\n| IntegrationProfile - Fulfillment Oms | Orders Full Access |\r\n\r\n>❗ Assigning a [predefined role](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy) to users or application keys usually grants permission to multiple [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3). If some of these permissions are not necessary, consider creating a custom role instead. For more information regarding security, see [Best practices for using application keys](https://help.vtex.com/en/tutorial/best-practices-api-keys--7b6nD1VMHa49aI5brlOvJm). To learn more about machine authentication at VTEX, see [Authentication overview](https://developers.vtex.com/docs/guides/authentication).", | ||
| "security": [], |
| } | ||
| } | ||
| }, | ||
| "/api/shopeeintegration/{accountName}/pub/orders/{mktplaceOrderId}/cancelDelivery": { |
There was a problem hiding this comment.
Fiquei em dúvida se esse endpoint for público (/pub), mas, ainda assim, exige recursos e roles no License Manager? Seria isso?
O path sugere algo público, a seção de Permissions fala em LM (OMS / Checkout) e o security: [] desativa os esquemas globais, o que pode sinalizar "sem autenticação".
| } | ||
| } | ||
| }, | ||
| "ShopeeOrderHookRequest": { |
There was a problem hiding this comment.
Não encontrei o ShopeeOrderHookRequest vinculado a nenhum endpoint. Ele deveria ser utilizado em algum dos endpoints?
Types of changes
Changelog
Do not forget to update your changes to our Developer Portal's changelog. Did you create a release note?