Skip to content

Commit a621c4b

Browse files
committed
docs: add route into swagger
1 parent 1df8b1a commit a621c4b

File tree

1 file changed

+57
-0
lines changed

1 file changed

+57
-0
lines changed

docs/swagger.json

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3312,6 +3312,63 @@
33123312
}
33133313
]
33143314
}
3315+
},
3316+
"/{restaurant_id}/kpi/ordersCount": {
3317+
"get": {
3318+
"tags": ["KPI"],
3319+
"summary": "Count the number of orders in a given interval, with optional grouping by time slot.",
3320+
"parameters": [
3321+
{
3322+
"name": "restaurant_id",
3323+
"in": "path",
3324+
"description": "ID of the restaurant",
3325+
"required": true,
3326+
"schema": { "type": "integer" }
3327+
},
3328+
{
3329+
"name": "timeBegin",
3330+
"in": "query",
3331+
"description": "Start date/time of the interval (ISO 8601)",
3332+
"required": true,
3333+
"schema": { "type": "string", "format": "date-time" }
3334+
},
3335+
{
3336+
"name": "timeEnd",
3337+
"in": "query",
3338+
"description": "End date/time of the interval (ISO 8601)",
3339+
"required": true,
3340+
"schema": { "type": "string", "format": "date-time" }
3341+
},
3342+
{
3343+
"name": "breakdown",
3344+
"in": "query",
3345+
"description": "Slot duration in minutes for grouping (optional)",
3346+
"required": false,
3347+
"schema": { "type": "integer" }
3348+
}
3349+
],
3350+
"responses": {
3351+
"200": {
3352+
"description": "Returns either the total number of orders, or an object grouped by time slot.",
3353+
"content": {
3354+
"application/json": {
3355+
"examples": {
3356+
"Grouped": {
3357+
"value": { "00:00": 5, "00:15": 8 }
3358+
},
3359+
"Total": {
3360+
"value": 23
3361+
}
3362+
}
3363+
}
3364+
}
3365+
},
3366+
"400": { "description": "Invalid parameters" },
3367+
"401": { "$ref": "#/components/responses/Unauthorized" },
3368+
"5XX": { "$ref": "#/components/responses/ServerError" }
3369+
},
3370+
"security": [{ "BearerAuth": [] }]
3371+
}
33153372
}
33163373
},
33173374
"components": {

0 commit comments

Comments
 (0)