mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-29 20:14:31 -05:00
Public API spec: Update NoteRevisionsMetadata and timestamp definition
NoteRevisionsMetadata is an array containing revision data and not an object with a single property containing an array. Revision timestamps are ISO strings, not UNIX timestamps. Signed-off-by: David Mehren <git@herrmehren.de>
This commit is contained in:
parent
7c0e069cbf
commit
4f5bb75766
1 changed files with 18 additions and 19 deletions
|
@ -368,7 +368,7 @@ paths:
|
||||||
- note
|
- note
|
||||||
summary: Returns a list of the available note revisions
|
summary: Returns a list of the available note revisions
|
||||||
operationId: getAllRevisionsOfNote
|
operationId: getAllRevisionsOfNote
|
||||||
description: The list is returned as a JSON object with an array of revision-id and length associations. The revision-id equals to the timestamp when the revision was saved.
|
description: The list contains the revision-id, the length and a ISO-timestamp of the creation date.
|
||||||
responses:
|
responses:
|
||||||
'200':
|
'200':
|
||||||
description: Revisions of the note.
|
description: Revisions of the note.
|
||||||
|
@ -399,7 +399,7 @@ paths:
|
||||||
description: The revision is returned as a JSON object with the content of the note and the authorship.
|
description: The revision is returned as a JSON object with the content of the note and the authorship.
|
||||||
responses:
|
responses:
|
||||||
'200':
|
'200':
|
||||||
description: Revision of the note for the given timestamp.
|
description: Revision of the note for the given id.
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
|
@ -421,7 +421,7 @@ paths:
|
||||||
- name: revision-id
|
- name: revision-id
|
||||||
in: path
|
in: path
|
||||||
required: true
|
required: true
|
||||||
description: The id (timestamp) of the revision to fetch.
|
description: The id of the revision to fetch.
|
||||||
content:
|
content:
|
||||||
text/plain:
|
text/plain:
|
||||||
example: 1570921051959
|
example: 1570921051959
|
||||||
|
@ -579,7 +579,7 @@ components:
|
||||||
description: A tag
|
description: A tag
|
||||||
updateTime:
|
updateTime:
|
||||||
type: integer
|
type: integer
|
||||||
description: UNIX-timestamp of when the note was last changed.
|
description: ISO-timestamp of when the note was last changed.
|
||||||
updateUser:
|
updateUser:
|
||||||
$ref: "#/components/schemas/UserInfo"
|
$ref: "#/components/schemas/UserInfo"
|
||||||
viewCount:
|
viewCount:
|
||||||
|
@ -588,7 +588,7 @@ components:
|
||||||
description: How often the published version of the note was viewed.
|
description: How often the published version of the note was viewed.
|
||||||
createTime:
|
createTime:
|
||||||
type: string
|
type: string
|
||||||
description: The timestamp when the note was created in ISO 8601 format.
|
description: The ISO-timestamp when the note was created in ISO 8601 format.
|
||||||
editedBy:
|
editedBy:
|
||||||
type: array
|
type: array
|
||||||
description: List of usernames who edited the note.
|
description: List of usernames who edited the note.
|
||||||
|
@ -614,20 +614,19 @@ components:
|
||||||
type: boolean
|
type: boolean
|
||||||
|
|
||||||
NoteRevisionsMetadata:
|
NoteRevisionsMetadata:
|
||||||
type: object
|
type: array
|
||||||
properties:
|
items:
|
||||||
revision:
|
type: object
|
||||||
type: array
|
properties:
|
||||||
description: Array that holds all revision-info objects.
|
id:
|
||||||
items:
|
type: integer
|
||||||
type: object
|
description: The id of the revision
|
||||||
properties:
|
createdAt:
|
||||||
time:
|
type: integer
|
||||||
type: integer
|
description: ISO-timestamp of when the revision was saved. Is also the revision-id.
|
||||||
description: UNIX-timestamp of when the revision was saved. Is also the revision-id.
|
length:
|
||||||
length:
|
type: integer
|
||||||
type: integer
|
description: Length of the document to the timepoint the revision was saved.
|
||||||
description: Length of the document to the timepoint the revision was saved.
|
|
||||||
NoteRevision:
|
NoteRevision:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
|
|
Loading…
Reference in a new issue