mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-25 11:16: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
2140faab07
commit
706f3a2360
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,17 +614,16 @@ components:
|
||||||
type: boolean
|
type: boolean
|
||||||
|
|
||||||
NoteRevisionsMetadata:
|
NoteRevisionsMetadata:
|
||||||
type: object
|
|
||||||
properties:
|
|
||||||
revision:
|
|
||||||
type: array
|
type: array
|
||||||
description: Array that holds all revision-info objects.
|
|
||||||
items:
|
items:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
time:
|
id:
|
||||||
type: integer
|
type: integer
|
||||||
description: UNIX-timestamp of when the revision was saved. Is also the revision-id.
|
description: The id of the revision
|
||||||
|
createdAt:
|
||||||
|
type: integer
|
||||||
|
description: ISO-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.
|
||||||
|
|
Loading…
Reference in a new issue