Skip to content

Commit

Permalink
Add support for x-open-execute-after field in OpenAPI Specification (…
Browse files Browse the repository at this point in the history
…Swagger)
  • Loading branch information
gharbat committed Jun 17, 2024
1 parent 2722afe commit 92ac158
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions docs/api-reference/endpoint/import-actions-from-swagger.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,20 @@ This endpoint points to the (v2) version of the API. The (v2) version of the API
</Warning>


### OpenAPI Specification (Swagger)

This endpoint supports the [OpenAPI V3 Specification (Swagger)](https://swagger.io/specification/). We have introduced some new fields to the OpenAPI specification that are custom to Open. These fields are:

- **`x-open-execute-after`: `string[]`**
This field is useful when you want to execute other operation(s) before the current operation/action. it takes an array of operation IDs. The AI will execute the operations in the order they are listed in the array.

**Example:**

Suppose you have an action with the operation ID `deleteUserCourses`. Before performing this action, you want to force the AI to list all the courses the user has and then delete them.

You can achieve this by adding `['listUserCourses']` to the `x-open-execute-after` field. The AI will first execute the `listUserCourses` operation and then proceed to execute the `deleteUserCourses` operation.


### Body

<ParamField path="id" type="string">
Expand Down

0 comments on commit 92ac158

Please sign in to comment.