diff --git a/_regroup/bin/generate-openapi.ts b/_regroup/bin/generate-openapi.ts index 4a2334bc5..6b0f737eb 100644 --- a/_regroup/bin/generate-openapi.ts +++ b/_regroup/bin/generate-openapi.ts @@ -4,7 +4,8 @@ import swaggerJsdoc from "swagger-jsdoc"; import fs from "fs"; /* - * Usage: npm run generate-openapi | tail -n1 > x.json + * Usage: npm run chore:generate-openapi + * Output: ./src/routes/api/openapi.json * * Inspect generated file by opening it in https://editor-next.swagger.io/ * @@ -33,7 +34,7 @@ const options = { "./src/routes/api/setup.ts", // all other files "./src/routes/api/*.ts", - "./bin/generate-openapi.js" + "./bin/generate-openapi.ts" ] }; diff --git a/apps/server/src/routes/api/sync.ts b/apps/server/src/routes/api/sync.ts index 50088a097..1454e4a48 100644 --- a/apps/server/src/routes/api/sync.ts +++ b/apps/server/src/routes/api/sync.ts @@ -124,14 +124,14 @@ function forceFullSync() { * type: object * properties: * entityChanges: - * type: list + * type: array * items: * $ref: '#/components/schemas/EntityChange' * lastEntityChangeId: * type: integer * description: If `outstandingPullCount > 0`, pass this as parameter in your next request to continue. * outstandingPullCount: - * type: int + * type: integer * example: 42 * description: Number of changes not yet returned by the remote. * security: @@ -247,7 +247,7 @@ const partialRequests: Record< * type: string * description: Local instance ID * entities: - * type: list + * type: array * items: * $ref: '#/components/schemas/EntityChange' * responses: diff --git a/apps/server/src/routes/api/tree.ts b/apps/server/src/routes/api/tree.ts index 610c82fde..885529c93 100644 --- a/apps/server/src/routes/api/tree.ts +++ b/apps/server/src/routes/api/tree.ts @@ -152,15 +152,15 @@ function getNotesAndBranchesAndAttributes(_noteIds: string[] | Set) { * type: object * properties: * branches: - * type: list + * type: array * items: * $ref: '#/components/schemas/Branch' * notes: - * type: list + * type: array * items: * $ref: '#/components/schemas/Note' * attributes: - * type: list + * type: array * items: * $ref: '#/components/schemas/Attribute' * security: