mirror of
https://github.com/zadam/trilium.git
synced 2025-11-06 05:15:59 +01:00
Document some note, branch, tree routes
This commit is contained in:
@@ -43,12 +43,78 @@ console.log(JSON.stringify(openapiSpecification));
|
||||
* description: Authentication
|
||||
* - name: sync
|
||||
* description: Synchronization
|
||||
* - name: data
|
||||
*/
|
||||
|
||||
/**
|
||||
* @swagger
|
||||
* components:
|
||||
* schemas:
|
||||
* Attribute:
|
||||
* type: object
|
||||
* properties:
|
||||
* attributeId:
|
||||
* type: string
|
||||
* example: "4G1DPrI58PAb"
|
||||
* noteId:
|
||||
* $ref: "#/components/schemas/NoteId"
|
||||
* type:
|
||||
* type: string
|
||||
* enum: ["attribute", "relation"]
|
||||
* name:
|
||||
* type: string
|
||||
* example: "internalLink"
|
||||
* value:
|
||||
* type: string
|
||||
* example: "hA8aHSpTRdZ6"
|
||||
* description: "If type = \"relation\", a note ID. Otherwise, the attribute content."
|
||||
* position:
|
||||
* type: integer
|
||||
* example: 20
|
||||
* isInheritable:
|
||||
* type: boolean
|
||||
* Blob:
|
||||
* type: object
|
||||
* properties:
|
||||
* blobId:
|
||||
* type: string
|
||||
* example: "8iqMIB8eiY1tPYmElfjm"
|
||||
* content:
|
||||
* type:
|
||||
* - string
|
||||
* - 'null'
|
||||
* description: "`null` if not text."
|
||||
* contentLength:
|
||||
* type: integer
|
||||
* dateModified:
|
||||
* $ref: "#/components/schemas/DateTime"
|
||||
* utcDateModified:
|
||||
* $ref: "#/components/schemas/UtcDateTime"
|
||||
* Branch:
|
||||
* type: object
|
||||
* properties:
|
||||
* branchId:
|
||||
* $ref: "#/components/schemas/BranchId"
|
||||
* noteId:
|
||||
* $ref: "#/components/schemas/NoteId"
|
||||
* parentNoteId:
|
||||
* $ref: "#/components/schemas/NoteId"
|
||||
* notePosition:
|
||||
* type: integer
|
||||
* example: 20
|
||||
* prefix:
|
||||
* type:
|
||||
* - string
|
||||
* - 'null'
|
||||
* isExpanded:
|
||||
* type: boolean
|
||||
* BranchId:
|
||||
* type: string
|
||||
* example: "WUjhaGp4EKah_ur11rSfHkzeV"
|
||||
* description: Equal to `{parentNoteId}_{noteId}`
|
||||
* DateTime:
|
||||
* type: string
|
||||
* example: "2025-02-14 08:19:59.203+0100"
|
||||
* EntityChange:
|
||||
* type: object
|
||||
* properties:
|
||||
@@ -66,9 +132,45 @@ console.log(JSON.stringify(openapiSpecification));
|
||||
* entity:
|
||||
* type: object
|
||||
* description: Encoded entity data. Object has one property for each database column.
|
||||
* Note:
|
||||
* type: object
|
||||
* properties:
|
||||
* noteId:
|
||||
* $ref: "#/components/schemas/NoteId"
|
||||
* title:
|
||||
* type: string
|
||||
* isProtected:
|
||||
* type: boolean
|
||||
* type:
|
||||
* type: string
|
||||
* example: "text"
|
||||
* enum: ["text", "code", "render", "file", "image", "search", "relationMap", "book", "noteMap", "mermaid", "canvas", "webView", "launcher", "doc", "contentWidget", "mindMap", "geoMap"]
|
||||
* description: "[Reference list](https://github.com/TriliumNext/Notes/blob/v0.91.6/src/services/note_types.ts)"
|
||||
* mime:
|
||||
* type: string
|
||||
* example: "text/html"
|
||||
* blobId:
|
||||
* type: string
|
||||
* example: "z4PhNX7vuL3xVChQ1m2A"
|
||||
* NoteId:
|
||||
* type: string
|
||||
* example: "ur11rSfHkzeV"
|
||||
* description: "12-character note ID. Special values: \"none\"`, `\"root\"."
|
||||
* Timestamps:
|
||||
* type: object
|
||||
* properties:
|
||||
* dateCreated:
|
||||
* $ref: "#/components/schemas/DateTime"
|
||||
* dateModified:
|
||||
* $ref: "#/components/schemas/DateTime"
|
||||
* utcDateCreated:
|
||||
* $ref: "#/components/schemas/UtcDateTime"
|
||||
* utcDateModified:
|
||||
* $ref: "#/components/schemas/UtcDateTime"
|
||||
* UtcDateTime:
|
||||
* type: string
|
||||
* example: "2025-02-13T07:42:47.698Z"
|
||||
* description: "Result of `new Date().toISOString().replace('T', ' ')`"
|
||||
* securitySchemes:
|
||||
* user-password:
|
||||
* type: apiKey
|
||||
|
||||
Reference in New Issue
Block a user