|
| 1 | +{ |
| 2 | + "openapi": "3.1.0", |
| 3 | + "info": { |
| 4 | + "title": "FastAPI", |
| 5 | + "version": "0.1.0" |
| 6 | + }, |
| 7 | + "paths": { |
| 8 | + "/dashboard/messages": { |
| 9 | + "get": { |
| 10 | + "tags": [ |
| 11 | + "Dashboard" |
| 12 | + ], |
| 13 | + "summary": "Get Messages", |
| 14 | + "description": "Get all the messages from the database and return them as a list of conversations.", |
| 15 | + "operationId": "get_messages_dashboard_messages_get", |
| 16 | + "responses": { |
| 17 | + "200": { |
| 18 | + "description": "Successful Response", |
| 19 | + "content": { |
| 20 | + "application/json": { |
| 21 | + "schema": { |
| 22 | + "items": { |
| 23 | + "$ref": "#/components/schemas/Conversation" |
| 24 | + }, |
| 25 | + "type": "array", |
| 26 | + "title": "Response Get Messages Dashboard Messages Get" |
| 27 | + } |
| 28 | + } |
| 29 | + } |
| 30 | + } |
| 31 | + } |
| 32 | + } |
| 33 | + }, |
| 34 | + "/dashboard/alerts": { |
| 35 | + "get": { |
| 36 | + "tags": [ |
| 37 | + "Dashboard" |
| 38 | + ], |
| 39 | + "summary": "Get Alerts", |
| 40 | + "description": "Get all the messages from the database and return them as a list of conversations.", |
| 41 | + "operationId": "get_alerts_dashboard_alerts_get", |
| 42 | + "responses": { |
| 43 | + "200": { |
| 44 | + "description": "Successful Response", |
| 45 | + "content": { |
| 46 | + "application/json": { |
| 47 | + "schema": { |
| 48 | + "items": { |
| 49 | + "$ref": "#/components/schemas/AlertConversation" |
| 50 | + }, |
| 51 | + "type": "array", |
| 52 | + "title": "Response Get Alerts Dashboard Alerts Get" |
| 53 | + } |
| 54 | + } |
| 55 | + } |
| 56 | + } |
| 57 | + } |
| 58 | + } |
| 59 | + }, |
| 60 | + "/dashboard/alerts_notification": { |
| 61 | + "get": { |
| 62 | + "tags": [ |
| 63 | + "Dashboard" |
| 64 | + ], |
| 65 | + "summary": "Stream Sse", |
| 66 | + "description": "Send alerts event", |
| 67 | + "operationId": "stream_sse_dashboard_alerts_notification_get", |
| 68 | + "responses": { |
| 69 | + "200": { |
| 70 | + "description": "Successful Response", |
| 71 | + "content": { |
| 72 | + "application/json": { |
| 73 | + "schema": {} |
| 74 | + } |
| 75 | + } |
| 76 | + } |
| 77 | + } |
| 78 | + } |
| 79 | + } |
| 80 | + }, |
| 81 | + "components": { |
| 82 | + "schemas": { |
| 83 | + "AlertConversation": { |
| 84 | + "properties": { |
| 85 | + "conversation": { |
| 86 | + "$ref": "#/components/schemas/Conversation" |
| 87 | + }, |
| 88 | + "alert_id": { |
| 89 | + "type": "string", |
| 90 | + "title": "Alert Id" |
| 91 | + }, |
| 92 | + "code_snippet": { |
| 93 | + "anyOf": [ |
| 94 | + { |
| 95 | + "$ref": "#/components/schemas/CodeSnippet" |
| 96 | + }, |
| 97 | + { |
| 98 | + "type": "null" |
| 99 | + } |
| 100 | + ] |
| 101 | + }, |
| 102 | + "trigger_string": { |
| 103 | + "anyOf": [ |
| 104 | + { |
| 105 | + "type": "string" |
| 106 | + }, |
| 107 | + { |
| 108 | + "type": "object" |
| 109 | + }, |
| 110 | + { |
| 111 | + "type": "null" |
| 112 | + } |
| 113 | + ], |
| 114 | + "title": "Trigger String" |
| 115 | + }, |
| 116 | + "trigger_type": { |
| 117 | + "type": "string", |
| 118 | + "title": "Trigger Type" |
| 119 | + }, |
| 120 | + "trigger_category": { |
| 121 | + "anyOf": [ |
| 122 | + { |
| 123 | + "type": "string" |
| 124 | + }, |
| 125 | + { |
| 126 | + "type": "null" |
| 127 | + } |
| 128 | + ], |
| 129 | + "title": "Trigger Category" |
| 130 | + }, |
| 131 | + "timestamp": { |
| 132 | + "type": "string", |
| 133 | + "format": "date-time", |
| 134 | + "title": "Timestamp" |
| 135 | + } |
| 136 | + }, |
| 137 | + "type": "object", |
| 138 | + "required": [ |
| 139 | + "conversation", |
| 140 | + "alert_id", |
| 141 | + "code_snippet", |
| 142 | + "trigger_string", |
| 143 | + "trigger_type", |
| 144 | + "trigger_category", |
| 145 | + "timestamp" |
| 146 | + ], |
| 147 | + "title": "AlertConversation", |
| 148 | + "description": "Represents an alert with it's respective conversation." |
| 149 | + }, |
| 150 | + "ChatMessage": { |
| 151 | + "properties": { |
| 152 | + "message": { |
| 153 | + "type": "string", |
| 154 | + "title": "Message" |
| 155 | + }, |
| 156 | + "timestamp": { |
| 157 | + "type": "string", |
| 158 | + "format": "date-time", |
| 159 | + "title": "Timestamp" |
| 160 | + }, |
| 161 | + "message_id": { |
| 162 | + "type": "string", |
| 163 | + "title": "Message Id" |
| 164 | + } |
| 165 | + }, |
| 166 | + "type": "object", |
| 167 | + "required": [ |
| 168 | + "message", |
| 169 | + "timestamp", |
| 170 | + "message_id" |
| 171 | + ], |
| 172 | + "title": "ChatMessage", |
| 173 | + "description": "Represents a chat message." |
| 174 | + }, |
| 175 | + "CodeSnippet": { |
| 176 | + "properties": { |
| 177 | + "code": { |
| 178 | + "type": "string", |
| 179 | + "title": "Code" |
| 180 | + }, |
| 181 | + "language": { |
| 182 | + "anyOf": [ |
| 183 | + { |
| 184 | + "type": "string" |
| 185 | + }, |
| 186 | + { |
| 187 | + "type": "null" |
| 188 | + } |
| 189 | + ], |
| 190 | + "title": "Language" |
| 191 | + }, |
| 192 | + "filepath": { |
| 193 | + "anyOf": [ |
| 194 | + { |
| 195 | + "type": "string" |
| 196 | + }, |
| 197 | + { |
| 198 | + "type": "null" |
| 199 | + } |
| 200 | + ], |
| 201 | + "title": "Filepath" |
| 202 | + }, |
| 203 | + "libraries": { |
| 204 | + "items": { |
| 205 | + "type": "string" |
| 206 | + }, |
| 207 | + "type": "array", |
| 208 | + "title": "Libraries" |
| 209 | + } |
| 210 | + }, |
| 211 | + "type": "object", |
| 212 | + "required": [ |
| 213 | + "code", |
| 214 | + "language", |
| 215 | + "filepath" |
| 216 | + ], |
| 217 | + "title": "CodeSnippet" |
| 218 | + }, |
| 219 | + "Conversation": { |
| 220 | + "properties": { |
| 221 | + "question_answers": { |
| 222 | + "items": { |
| 223 | + "$ref": "#/components/schemas/QuestionAnswer" |
| 224 | + }, |
| 225 | + "type": "array", |
| 226 | + "title": "Question Answers" |
| 227 | + }, |
| 228 | + "provider": { |
| 229 | + "anyOf": [ |
| 230 | + { |
| 231 | + "type": "string" |
| 232 | + }, |
| 233 | + { |
| 234 | + "type": "null" |
| 235 | + } |
| 236 | + ], |
| 237 | + "title": "Provider" |
| 238 | + }, |
| 239 | + "type": { |
| 240 | + "type": "string", |
| 241 | + "title": "Type" |
| 242 | + }, |
| 243 | + "chat_id": { |
| 244 | + "type": "string", |
| 245 | + "title": "Chat Id" |
| 246 | + }, |
| 247 | + "conversation_timestamp": { |
| 248 | + "type": "string", |
| 249 | + "format": "date-time", |
| 250 | + "title": "Conversation Timestamp" |
| 251 | + } |
| 252 | + }, |
| 253 | + "type": "object", |
| 254 | + "required": [ |
| 255 | + "question_answers", |
| 256 | + "provider", |
| 257 | + "type", |
| 258 | + "chat_id", |
| 259 | + "conversation_timestamp" |
| 260 | + ], |
| 261 | + "title": "Conversation", |
| 262 | + "description": "Represents a conversation." |
| 263 | + }, |
| 264 | + "QuestionAnswer": { |
| 265 | + "properties": { |
| 266 | + "question": { |
| 267 | + "$ref": "#/components/schemas/ChatMessage" |
| 268 | + }, |
| 269 | + "answer": { |
| 270 | + "anyOf": [ |
| 271 | + { |
| 272 | + "$ref": "#/components/schemas/ChatMessage" |
| 273 | + }, |
| 274 | + { |
| 275 | + "type": "null" |
| 276 | + } |
| 277 | + ] |
| 278 | + } |
| 279 | + }, |
| 280 | + "type": "object", |
| 281 | + "required": [ |
| 282 | + "question", |
| 283 | + "answer" |
| 284 | + ], |
| 285 | + "title": "QuestionAnswer", |
| 286 | + "description": "Represents a question and answer pair." |
| 287 | + } |
| 288 | + } |
| 289 | + } |
| 290 | +} |
0 commit comments