Update API response structure to include pagination metadata.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 705f2157-ef97-4fbd-89e4-8c7f2ecaea90
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/7ed01c5f-a82d-405a-b728-b2e3d127c60c/c818a471-e356-4d5e-8f68-50e8c07bc1d5.jpg
This commit is contained in:
alphaeusmote
2025-04-09 14:44:02 +00:00
parent bbb0cbe1b0
commit 0a8c06c782
2 changed files with 39 additions and 6 deletions
+33
View File
@@ -106,6 +106,7 @@ const swaggerOptions = {
lastLogon: { type: "string", format: "date-time" },
memberOf: { type: "array", items: { type: "string" } },
adProperties: { type: "object" },
objectType: { type: "string", enum: ["user"] },
},
},
AdGroup: {
@@ -122,6 +123,7 @@ const swaggerOptions = {
description: { type: "string" },
members: { type: "array", items: { type: "string" } },
adProperties: { type: "object" },
objectType: { type: "string", enum: ["group"] },
},
},
AdOrgUnit: {
@@ -136,6 +138,7 @@ const swaggerOptions = {
name: { type: "string" },
description: { type: "string" },
adProperties: { type: "object" },
objectType: { type: "string", enum: ["organizationalUnit"] },
},
},
AdComputer: {
@@ -154,6 +157,7 @@ const swaggerOptions = {
lastLogon: { type: "string", format: "date-time" },
enabled: { type: "boolean" },
adProperties: { type: "object" },
objectType: { type: "string", enum: ["computer"] },
},
},
AdDomain: {
@@ -170,6 +174,7 @@ const swaggerOptions = {
forestName: { type: "string" },
domainFunctionality: { type: "string" },
adProperties: { type: "object" },
objectType: { type: "string", enum: ["domain"] },
},
},
LdapAttribute: {
@@ -312,6 +317,34 @@ const swaggerOptions = {
},
},
},
PaginatedResponse: {
description: "Successful response with pagination metadata",
content: {
"application/json": {
schema: {
type: "object",
properties: {
data: {
type: "array",
items: {
type: "object"
}
},
metadata: {
type: "object",
properties: {
currentPage: { type: "integer" },
totalPages: { type: "integer" },
totalRecords: { type: "integer" },
nextPage: { type: "string", nullable: true },
previousPage: { type: "string", nullable: true }
}
}
}
}
}
}
}
},
},
security: [