Validator
| Website | validator.letsemploy.org |
| API | REST, Swagger UI |
| Status | Stable, best effort |
The Validator checks an oJobPub document against the oJobPub JSON Schema (draft 2020-12), including the date, date-time and uri formats. It checks the schema only. It doesn't check that lastUpdated is current, that every url resolves, or the description policy that SourceTracker applies.
Web UI
Paste a document into the editor at validator.letsemploy.org and press Validate (or Ctrl/⌘ + Enter). Load example fills in a valid document, Format pretty-prints your input. Each violation is listed with its JSON path, e.g. $.jobs[0].url. JSON syntax errors show the line and column.
REST API
curl -s https://validator.letsemploy.org/api/v1/validate \
-H 'Content-Type: application/json' \
--data @ojobpub.json
| Status | Meaning |
|---|---|
200 | Validation ran. Check valid |
400 | The body is not valid JSON (errors holds line and column) |
413 | The body exceeds the size limit (1 MiB by default) |
415 | Content-Type is not application/json |
503 | The schema could not be loaded |
The OpenAPI spec is at /api/v1/openapi.json.
Offline validation
Any JSON Schema draft 2020-12 validator works, e.g. in CI:
check-jsonschema \
--schemafile https://raw.githubusercontent.com/letsemploy/schema/main/v1/ojobpub.json \
public/.well-known/ojobpub.json
The schema validates structure only. Also make sure lastUpdated is current and every url resolves.
Self-hosting
| Variable | Default | Purpose |
|---|---|---|
SCHEMA_URL | oJobPub v1 schema on GitHub | Schema to validate against |
SCHEMA_CACHE_TTL | 300 | Seconds to cache the schema |
MAX_CONTENT_LENGTH | 1048576 | Maximum request size in bytes |