VisionUiCheckRequest vision.ui-check-request@1
Generated at from
openvibe-contracts v0.419.0 and
openvibe-sdk v0.161.0.
- Version
- 1.0.0
- Owner
- vision
- Visibility
- first-party
- Status
- active
- Compatibility
- backward
- Schema
https://openvibe.network/contracts/vision/ui-check-request.v1.json
vision.ui-check-request@1: the JSON body of POST /api/v1/ui-check on OpenVibe.Vision (Design's Arena and signed-in people; HTML, URL and screenshot checks also work anonymously). Send exactly one source: `html` with the markup, `url` with a public http(s) page, `image` with a data URL, or `image_url` with a public image URL. The multipart form field `image` is the same screenshot source. `viewport` defaults to 1280x800 and is clamped to 160..10000; the check executes no JavaScript and fetches only a public URL through the SSRF guard.
Fields
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
html | string | The HTML to check, including any inline CSS. |
| |
url | string | A public page to fetch and check. |
| |
image | string | A screenshot as an image data URL. |
| |
image_url | string | A public screenshot URL. |
| |
viewport | object |
| ||
viewport.w | integer | yes |
| |
viewport.h | integer | yes |
|
Examples
From the contract's own test fixtures: valid ones validate, rejected ones must fail.
Valid: html
{
"html": "<!doctype html><style>.card{width:1400px}</style><div class=\"card\">x</div>",
"viewport": {
"w": 390,
"h": 844
}
}Rejected: no-source
{
"viewport": {
"w": 390,
"h": 844
}
}Validate
const contracts = require('openvibe-contracts');
contracts.validate('vision.ui-check-request@1', value); // { valid, errors: [{ path, message }] }