2 static const char _afb_description_v2_monitor[] =
3 "{\"openapi\":\"3.0.0\",\"info\":{\"description\":\"\",\"title\":\"monito"
4 "r\",\"version\":\"1.0\",\"x-binding\":{\"version\":2,\"prefix\":\"f_\",\""
5 "postfix\":\"\",\"start\":null,\"onevent\":null,\"init\":null,\"scope\":\""
6 "static\",\"private\":true}},\"servers\":[{\"url\":\"ws://{host}:{port}/a"
7 "pi/monitor\",\"description\":\"The API server.\",\"variables\":{\"host\""
8 ":{\"default\":\"localhost\"},\"port\":{\"default\":\"1234\"}},\"x-afb-ev"
9 "ents\":[{\"$ref\":\"#/components/schemas/afb-event\"}]}],\"components\":"
10 "{\"schemas\":{\"afb-reply\":{\"$ref\":\"#/components/schemas/afb-reply-v"
11 "1\"},\"afb-event\":{\"$ref\":\"#/components/schemas/afb-event-v1\"},\"af"
12 "b-reply-v1\":{\"title\":\"Generic response.\",\"type\":\"object\",\"requ"
13 "ired\":[\"jtype\",\"request\"],\"properties\":{\"jtype\":{\"const\":\"af"
14 "b-reply\"},\"request\":{\"type\":\"object\",\"required\":[\"status\"],\""
15 "properties\":{\"status\":{\"type\":\"string\"},\"info\":{\"type\":\"stri"
16 "ng\"},\"token\":{\"type\":\"string\"},\"uuid\":{\"type\":\"string\"},\"r"
17 "eqid\":{\"type\":\"string\"}}},\"response\":{\"type\":\"object\"}}},\"af"
18 "b-event-v1\":{\"type\":\"object\",\"properties\":{\"jtype\":{\"type\":\""
19 "string\"},\"event\":{\"type\":\"string\"},\"data\":{\"type\":\"object\"}"
20 "}}},\"x-permissions\":{\"set\":{\"permission\":\"urn:AGL:permission:moni"
21 "tor:public:set\"},\"get\":{\"permission\":\"urn:AGL:permission:monitor:p"
22 "ublic:get\"},\"get-or-set\":{\"anyOf\":[{\"$ref\":\"#/components/x-permi"
23 "ssions/get\"},{\"$ref\":\"#/components/x-permissions/set\"}]}}},\"paths\""
24 ":{\"/get\":{\"description\":\"Get monitoring data.\",\"x-permissions\":{"
25 "\"$ref\":\"#/components/x-permissions/get-or-set\"},\"get\":{\"parameter"
26 "s\":[{\"in\":\"query\",\"name\":\"filter\",\"required\":false,\"schema\""
27 ":{\"type\":\"object\",\"properties\":{\"event\":{\"type\":\"string\"}}}}"
28 "],\"responses\":{\"200\":{\"description\":\"A complex object array respo"
29 "nse\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/compon"
30 "ents/schemas/afb-reply\"}}}}}}},\"/set\":{\"description\":\"Set monitori"
31 "ng actions.\",\"x-permissions\":{\"$ref\":\"#/components/x-permissions/s"
32 "et\"},\"get\":{\"parameters\":[{\"in\":\"query\",\"name\":\"filter\",\"r"
33 "equired\":false,\"schema\":{\"type\":\"object\",\"properties\":{\"event\""
34 ":{\"type\":\"string\"}}}}],\"responses\":{\"200\":{\"description\":\"A c"
35 "omplex object array response\",\"content\":{\"application/json\":{\"sche"
36 "ma\":{\"$ref\":\"#/components/schemas/afb-reply\"}}}}}}}}}"
39 static const struct afb_auth _afb_auths_v2_monitor[] = {
40 { .type = afb_auth_Permission, .text = "urn:AGL:permission:monitor:public:set" },
41 { .type = afb_auth_Permission, .text = "urn:AGL:permission:monitor:public:get" },
42 { .type = afb_auth_Or, .first = &_afb_auths_v2_monitor[1], .next = &_afb_auths_v2_monitor[0] }
45 static void f_get(struct afb_req req);
46 static void f_set(struct afb_req req);
48 static const struct afb_verb_v2 _afb_verbs_v2_monitor[] = {
52 .auth = &_afb_auths_v2_monitor[2],
58 .auth = &_afb_auths_v2_monitor[0],
64 static const struct afb_binding_v2 _afb_binding_v2_monitor = {
66 .specification = _afb_description_v2_monitor,
67 .verbs = _afb_verbs_v2_monitor,