UNPKG

@unito/integration-debugger

Version:

The Unito Integration Debugger

42 lines (41 loc) 995 B
import * as CrawlerDriver from '../crawlerDriver'; /** * Check: Create a valid item * * When `canCreateItem` is set to true, it is assumed one can `POST` new records to the relation's path. * It accepts a `Fields` object, and must return an `ItemSummary` on success with a `201` status code. * * This check seek to generate a **VALID** item and exercise the integration to validate that it can create * the corresponding Item successfully. * * @example * For the following item... * * ```json * { * "fields": {}, * "relations": [{ * "name": "foos", * "label": "Foos", * "path": "/foos", * "schema": { * "canCreateItem": true, * "fields": [{ * "name": "value", * "type": "string", * "readOnly": false * }] * } * }] * } * ``` * * ... we try a `POST /foos` with the following payload: * * ```json * { * "value": "<random string>" * } */ declare const check: CrawlerDriver.StepCheck; export default check;