recator placement of code

This commit is contained in:
2026-02-17 11:46:57 -06:00
parent 31f8c368d9
commit 23c000fa7f
77 changed files with 4528 additions and 2697 deletions

View File

@@ -0,0 +1,77 @@
import type { OpenAPIV3_1 } from "openapi-types";
export const getDatamartSpec: OpenAPIV3_1.PathsObject = {
"/api/datamart/{name}": {
get: {
summary: "Runs the query by name",
description:
"This will allow to run any query by its name and optional parameters to be sent over as well, up to 3 params can be added",
tags: ["Datamart"],
parameters: [
{
name: "name",
in: "path",
required: false,
description: "Name to look up",
schema: {
type: "string",
},
example: "exampleName",
},
{
name: "limit",
in: "query",
required: false, // 👈 optional
description: "Maximum number of records to return",
schema: {
type: "integer",
minimum: 1,
maximum: 100,
},
example: 10,
},
],
responses: {
"200": {
description: "Successful response",
content: {
"application/json": {
schema: {
type: "object",
properties: {
success: { type: "boolean", example: true },
data: {
type: "object",
example: {
name: "exampleName",
value: "some value",
},
},
},
},
},
},
},
"400": {
description: "Bad request",
content: {
"application/json": {
schema: {
type: "object",
properties: {
success: { type: "boolean", example: false },
message: {
type: "string",
example: "Invalid name parameter",
},
},
},
},
},
},
},
},
},
};