mirror of
https://github.com/espocrm/espocrm.git
synced 2026-06-28 15:06:06 +00:00
59 lines
1.9 KiB
JSON
59 lines
1.9 KiB
JSON
{
|
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
"$id": "https://www.espocrm.com/schema/routes.json",
|
|
"title": "routes",
|
|
"description": "Backend API routes.",
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"description": "A route.",
|
|
"properties": {
|
|
"route": {
|
|
"type": "string",
|
|
"description": "A route path. Example: `/MyScope/:id/myAction`."
|
|
},
|
|
"method": {
|
|
"type": "string",
|
|
"enum": [
|
|
"get",
|
|
"post",
|
|
"put",
|
|
"delete",
|
|
"options",
|
|
"patch"
|
|
],
|
|
"description": "An HTTP method."
|
|
},
|
|
"noAuth": {
|
|
"type": "boolean",
|
|
"description": "Makes the route not requiring authentication."
|
|
},
|
|
"actionClassName": {
|
|
"type": "string",
|
|
"description": "An action class. Should implement the interface Espo\\Core\\Api\\Action."
|
|
},
|
|
"params": {
|
|
"type": "object",
|
|
"description": "Parameters. If starts with a colon, then will be parsed from the URI. Example: `:id`.",
|
|
"additionalProperties": {
|
|
"type": "string"
|
|
},
|
|
"properties": {
|
|
"controller": {
|
|
"type": "string",
|
|
"description": "A controller name."
|
|
},
|
|
"action": {
|
|
"type": "string",
|
|
"description": "A controller action name."
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"required": [
|
|
"route",
|
|
"method"
|
|
]
|
|
}
|
|
}
|