mockAPI · Schema
mockAPI Resource
Schema describing a mockAPI.io resource definition. Captures the resource name, fields, relationships, and seed configuration so a portable definition can be replayed in mockAPI or another mock platform.
API MockingCRUDMock ServerMockingPlatformPrototypingRESTTesting
Properties
| Name | Type | Description |
|---|---|---|
| id | string | |
| name | string | Resource name. Used to derive REST paths (e.g., /users). |
| description | string | |
| fields | array | |
| relationships | array | |
| seedCount | integer | Number of records to generate when the resource is provisioned. |
| endpoints | array |
JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://raw.githubusercontent.com/api-evangelist/mockapi/main/json-schema/mockapi-resource-schema.json",
"title": "mockAPI Resource",
"description": "Schema describing a mockAPI.io resource definition. Captures the resource name, fields, relationships, and seed configuration so a portable definition can be replayed in mockAPI or another mock platform.",
"type": "object",
"required": ["name", "fields"],
"properties": {
"id": { "type": "string" },
"name": {
"type": "string",
"description": "Resource name. Used to derive REST paths (e.g., /users)."
},
"description": { "type": "string" },
"fields": {
"type": "array",
"items": {
"type": "object",
"required": ["name", "type"],
"properties": {
"name": { "type": "string" },
"type": {
"type": "string",
"enum": ["string", "integer", "number", "boolean", "object", "array", "datetime", "uuid", "faker"]
},
"faker": {
"type": "string",
"description": "Faker.js expression used to generate seed values (e.g., name.firstName)."
},
"required": { "type": "boolean", "default": false },
"default": {},
"description": { "type": "string" }
}
}
},
"relationships": {
"type": "array",
"items": {
"type": "object",
"required": ["resource", "type"],
"properties": {
"resource": { "type": "string" },
"type": { "type": "string", "enum": ["hasOne", "hasMany", "belongsTo"] }
}
}
},
"seedCount": {
"type": "integer",
"minimum": 0,
"description": "Number of records to generate when the resource is provisioned."
},
"endpoints": {
"type": "array",
"items": {
"type": "object",
"required": ["method", "path"],
"properties": {
"method": { "type": "string", "enum": ["GET", "POST", "PUT", "PATCH", "DELETE"] },
"path": { "type": "string" },
"responseCode": { "type": "integer", "minimum": 100, "maximum": 599 },
"delayMs": { "type": "integer", "minimum": 0 }
}
}
}
}
}
Work with this as data
Every JSON Schema here is available over the APIs.io API and to AI agents over MCP.
MCP server
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
Tools for schemas
4 MCP tools reach this
find_json_schemasBrowse and filter every JSON Schema in the catalog.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.
Call it yourself
curl for this page
This JSON Schema
curl "https://apis.io/api/v1/json-schemas/mockapi-resource"
All schemas
curl "https://apis.io/api/v1/json-schemas?limit=25"
Discovery needs no key. Ratings and market analysis are Pro.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.