UNPKG

@unito/integration-debugger

Version:

The Unito Integration Debugger

40 lines (39 loc) 933 B
import * as CrawlerDriver from '../crawlerDriver'; /** * Check: Create Invalid Item * * The Specification defines specific error codes that can be returned in case of failure for a given action * This check will generate invalid create item request and validate that the integration returns a valid error. * @example * For the following item... * * ```json * { * "fields": {}, * "relations": [{ * "name": "foos", * "label": "Foos", * "path": "/foos", * "schema": { * "canCreateItem": true, * "fields": [{ * "name": "value", * "type": "boolean", * "readOnly": false * }] * } * }] * } * ``` * * ... trying a `POST /foos` with the following invalid payload: * * ```json * { * "value": "<random string>" * } * ``` * ... the integration should return a 400 or 422 error code. */ declare const check: CrawlerDriver.StepCheck; export default check;