@unito/integration-debugger
Version:
The Unito Integration Debugger
40 lines (39 loc) • 950 B
TypeScript
import * as CrawlerDriver from '../crawlerDriver';
/**
* Check: Update Item - Invalid
*
* The Specification defines specific error codes that can be returned in case of failure for a given action
* This check will generate invalid update 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 `PATCH /foos/${existingId}` 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;