Octane API Client
Loading...
Searching...
No Matches
api_schema.h
Go to the documentation of this file.
1
11#ifndef OCTANE_API_CLIENT_API_SCHEMA_H_
12#define OCTANE_API_CLIENT_API_SCHEMA_H_
13
14namespace octane::internal {
15 constexpr auto SCHEMA_ERROR_RESPONSE = R"(
16 {
17 "$schema": "https://json-schema.org/draft/2020-12/schema",
18 "type": "object",
19 "properties": {
20 "code": {
21 "type": "string",
22 "title": "code"
23 },
24 "reason": {
25 "type": "string",
26 "title": "reason"
27 }
28 },
29 "required": ["code", "reason"]
30 }
31 )";
32 constexpr auto SCHEMA_HEALTH_GET = R"(
33 {
34 "$schema": "https://json-schema.org/draft/2020-12/schema",
35 "type": "object",
36 "properties": {
37 "health": {
38 "enum": ["degraded", "faulty", "healthy"],
39 "type": "string",
40 "title": "health"
41 },
42 "message": {
43 "type": "string",
44 "title": "message"
45 }
46 },
47 "required": ["health"]
48 }
49 )";
50 constexpr auto SCHEMA_ROOM_POST = R"(
51 {
52 "$schema": "https://json-schema.org/draft/2020-12/schema",
53 "type": "object",
54 "properties": {
55 "id": {
56 "type": "number",
57 "title": "id"
58 }
59 },
60 "required": ["id"]
61 }
62 )";
63 constexpr auto SCHEMA_ROOM_ID_GET = R"(
64 {
65 "$schema": "https://json-schema.org/draft/2020-12/schema",
66 "type": "object",
67 "properties": {
68 "id": {
69 "type": "number",
70 "title": "id"
71 },
72 "name": {
73 "type": "string",
74 "title": "name"
75 },
76 "devices": {
77 "type": "array",
78 "items": {
79 "type": "object",
80 "properties": {
81 "name": {
82 "type": "string",
83 "title": "name"
84 },
85 "timestamp": {
86 "type": "number",
87 "title": "timestamp"
88 }
89 },
90 "required": ["name", "timestamp"]
91 },
92 "title": "devices"
93 }
94 },
95 "required": ["devices", "id", "name"]
96 }
97 )";
98 constexpr auto SCHEMA_ROOM_ID_DELETE = R"(
99 {
100 "$schema": "https://json-schema.org/draft/2020-12/schema",
101 "type": "object",
102 "properties": {}
103 }
104 )";
105 constexpr auto SCHEMA_ROOM_ID_POST = R"(
106 {
107 "$schema": "https://json-schema.org/draft/2020-12/schema",
108 "type": "object",
109 "properties": {}
110 }
111 )";
112 constexpr auto SCHEMA_ROOM_ID_STATUS_GET = R"(
113 {
114 "$schema": "https://json-schema.org/draft/2020-12/schema",
115 "type": "object",
116 "properties": {
117 "device": {
118 "type": "string",
119 "title": "device"
120 },
121 "timestamp": {
122 "type": "number",
123 "title": "timestamp"
124 },
125 "type": {
126 "enum": ["clipboard", "file"],
127 "type": "string",
128 "title": "type"
129 },
130 "name": {
131 "type": "string",
132 "title": "name"
133 },
134 "mime": {
135 "type": "string",
136 "title": "mime"
137 },
138 "hash": {
139 "type": "string",
140 "title": "hash"
141 }
142 },
143 "required": ["device", "hash", "mime", "timestamp", "type"]
144 }
145 )";
146 constexpr auto SCHEMA_ROOM_ID_STATUS_PUT = R"(
147 {
148 "$schema": "https://json-schema.org/draft/2020-12/schema",
149 "type": "object",
150 "properties": {}
151 }
152 )";
153 constexpr auto SCHEMA_ROOM_ID_STATUS_DELETE = R"(
154 {
155 "$schema": "https://json-schema.org/draft/2020-12/schema",
156 "type": "object",
157 "properties": {}
158 }
159 )";
160} // namespace octane::internal
161
162#endif // OCTANE_API_CLIENT_API_SCHEMA_H_
constexpr auto SCHEMA_ROOM_ID_STATUS_GET
Definition: api_schema.h:112
constexpr auto SCHEMA_ROOM_ID_DELETE
Definition: api_schema.h:98
constexpr auto SCHEMA_ROOM_ID_POST
Definition: api_schema.h:105
constexpr auto SCHEMA_ROOM_POST
Definition: api_schema.h:50
constexpr auto SCHEMA_ROOM_ID_GET
Definition: api_schema.h:63
constexpr auto SCHEMA_ROOM_ID_STATUS_DELETE
Definition: api_schema.h:153
constexpr auto SCHEMA_HEALTH_GET
Definition: api_schema.h:32
constexpr auto SCHEMA_ROOM_ID_STATUS_PUT
Definition: api_schema.h:146
Definition: api_bridge.cpp:25