Reusables allow you to reuse content such as schemas and credentials without repetition. Reusable content is listed under the components section of your workflow and can be called by using a reference. The
$ref syntax should be familiar to OpenAPI users
Currently, only internal references are supported
Example: Basic Auth
version: "1.1" name: Basic Auth components: credentials: example: basic: username: hello password: world tests: example: steps: - name: Basic Auth http: url: https://httpbin.org/basic-auth/hello/world method: GET auth: $ref: "#/components/credentials/example"
Example: Post schema
version: "1.1" name: JSON Schema components: schemas: Post: type: object properties: userId: type: integer id: type: integer title: type: string body: type: string required: - userId - id - title - body tests: example: steps: - name: GET request http: url: https://jsonplaceholder.typicode.com/posts/1 method: GET check: schema: $ref: "#/components/schemas/Post"