name = Schema Object Validation
description = Collection-local schema declarations for object payload validation.
schema Author {
id: UUID
name: string
email: EMAIL
avatar: URI
}
schema Article {
slug: string
title: string
subtitle?: string
image: URI
author: Author
content: string
dateCreated: DATE_TIME
}
---
Validate article payload
GET https://lorem-api.com/api/article/foo
? format = json
# Response matches the Article schema
^ & body === Article