mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-07-27 10:02:59 +08:00
Fix doc comment, fix OpenAPI types
This commit is contained in:
parent
059553fd81
commit
c8d5d69193
@ -4,7 +4,8 @@ import swaggerJsdoc from "swagger-jsdoc";
|
|||||||
import fs from "fs";
|
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/
|
* Inspect generated file by opening it in https://editor-next.swagger.io/
|
||||||
*
|
*
|
||||||
@ -33,7 +34,7 @@ const options = {
|
|||||||
"./src/routes/api/setup.ts",
|
"./src/routes/api/setup.ts",
|
||||||
// all other files
|
// all other files
|
||||||
"./src/routes/api/*.ts",
|
"./src/routes/api/*.ts",
|
||||||
"./bin/generate-openapi.js"
|
"./bin/generate-openapi.ts"
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -124,14 +124,14 @@ function forceFullSync() {
|
|||||||
* type: object
|
* type: object
|
||||||
* properties:
|
* properties:
|
||||||
* entityChanges:
|
* entityChanges:
|
||||||
* type: list
|
* type: array
|
||||||
* items:
|
* items:
|
||||||
* $ref: '#/components/schemas/EntityChange'
|
* $ref: '#/components/schemas/EntityChange'
|
||||||
* lastEntityChangeId:
|
* lastEntityChangeId:
|
||||||
* type: integer
|
* type: integer
|
||||||
* description: If `outstandingPullCount > 0`, pass this as parameter in your next request to continue.
|
* description: If `outstandingPullCount > 0`, pass this as parameter in your next request to continue.
|
||||||
* outstandingPullCount:
|
* outstandingPullCount:
|
||||||
* type: int
|
* type: integer
|
||||||
* example: 42
|
* example: 42
|
||||||
* description: Number of changes not yet returned by the remote.
|
* description: Number of changes not yet returned by the remote.
|
||||||
* security:
|
* security:
|
||||||
@ -247,7 +247,7 @@ const partialRequests: Record<
|
|||||||
* type: string
|
* type: string
|
||||||
* description: Local instance ID
|
* description: Local instance ID
|
||||||
* entities:
|
* entities:
|
||||||
* type: list
|
* type: array
|
||||||
* items:
|
* items:
|
||||||
* $ref: '#/components/schemas/EntityChange'
|
* $ref: '#/components/schemas/EntityChange'
|
||||||
* responses:
|
* responses:
|
||||||
|
@ -152,15 +152,15 @@ function getNotesAndBranchesAndAttributes(_noteIds: string[] | Set<string>) {
|
|||||||
* type: object
|
* type: object
|
||||||
* properties:
|
* properties:
|
||||||
* branches:
|
* branches:
|
||||||
* type: list
|
* type: array
|
||||||
* items:
|
* items:
|
||||||
* $ref: '#/components/schemas/Branch'
|
* $ref: '#/components/schemas/Branch'
|
||||||
* notes:
|
* notes:
|
||||||
* type: list
|
* type: array
|
||||||
* items:
|
* items:
|
||||||
* $ref: '#/components/schemas/Note'
|
* $ref: '#/components/schemas/Note'
|
||||||
* attributes:
|
* attributes:
|
||||||
* type: list
|
* type: array
|
||||||
* items:
|
* items:
|
||||||
* $ref: '#/components/schemas/Attribute'
|
* $ref: '#/components/schemas/Attribute'
|
||||||
* security:
|
* security:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user