mirror of
https://github.com/spacebarchat/server.git
synced 2026-05-14 20:35:17 +00:00
gifs and query params
This commit is contained in:
@@ -202,6 +202,19 @@ function apiRoutes() {
|
||||
}));
|
||||
}
|
||||
|
||||
if (route.query) {
|
||||
// map to array
|
||||
const query = Object.entries(route.query).map(([k, v]) => ({
|
||||
name: k,
|
||||
in: "query",
|
||||
required: v.required,
|
||||
schema: { type: v.type },
|
||||
description: v.description,
|
||||
}));
|
||||
|
||||
obj.parameters = [...(obj.parameters || []), ...query];
|
||||
}
|
||||
|
||||
obj.tags = [...(obj.tags || []), getTag(p)].unique();
|
||||
|
||||
specification.paths[path] = {
|
||||
|
||||
Reference in New Issue
Block a user