schema HistoryItem {
timestamp: DATE_TIME
method: string
url: URI
}
schema ApprovalItem {
timestamp: DATE_TIME
approver: string
status: string
}
schema Item {
id: UUID
name: string
history: HistoryItem[]
approvals?: ApprovalItem[]
}
schema Response {
Items: Item[]
$metadata: {
requestId: UUID
timestamp: DATE_TIME
}
}
$ API_URL = https://lorem-api.com/api/echo
---
Validate item response
POST {{ API_URL }}
~~~application/json
{
"Items": [
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"name": "Test Item",
"history": [
{
"timestamp": "2024-06-01T12:00:00Z",
"method": "GET",
"url": "https://example.com/api/resource"
},
{
"timestamp": "2024-06-02T15:30:00Z",
"method": "POST",
"url": "https://example.com/api/resource"
}
]
}
],
"$metadata": {
"requestId": "123e4567-e89b-12d3-a456-426614174001",
"timestamp": "2024-06-03T10:00:00Z"
}
}
~~~
^ & body === Response