37 lines
980 B
Plaintext
37 lines
980 B
Plaintext
|
|
let method_type = [| 'GET, 'POST, 'PUT, 'DELETE, 'PATCH |] in
|
||
|
|
let auth_type = [| 'None, 'Viewer, 'Bearer, 'Admin |] in
|
||
|
|
let actor_type = [| 'Developer, 'Agent, 'Ci, 'Admin |] in
|
||
|
|
|
||
|
|
let param_type = {
|
||
|
|
name | String,
|
||
|
|
kind | String,
|
||
|
|
constraint | String | default = "optional",
|
||
|
|
description | String | default = "",
|
||
|
|
} in
|
||
|
|
|
||
|
|
let route_type = {
|
||
|
|
method | method_type,
|
||
|
|
path | String,
|
||
|
|
description | String | default = "",
|
||
|
|
auth | auth_type | default = 'None,
|
||
|
|
actors | Array actor_type | default = [],
|
||
|
|
params | Array param_type | default = [],
|
||
|
|
tags | Array String | default = [],
|
||
|
|
feature | String | default = "",
|
||
|
|
source_file | String | default = "",
|
||
|
|
} in
|
||
|
|
|
||
|
|
let catalog_type = {
|
||
|
|
crate | String,
|
||
|
|
routes | Array route_type,
|
||
|
|
} in
|
||
|
|
|
||
|
|
{
|
||
|
|
Method = method_type,
|
||
|
|
Auth = auth_type,
|
||
|
|
Actor = actor_type,
|
||
|
|
Param = param_type,
|
||
|
|
Route = route_type,
|
||
|
|
Catalog = catalog_type,
|
||
|
|
}
|