mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-23 02:06:29 -05:00
added /n/ prefix to note calls
added Note object
This commit is contained in:
parent
c7511df450
commit
ba3ea8a073
1 changed files with 142 additions and 4 deletions
|
@ -141,12 +141,91 @@ paths:
|
||||||
content:
|
content:
|
||||||
text/plain:
|
text/plain:
|
||||||
example: my-note
|
example: my-note
|
||||||
/{note}/download:
|
/n/{note}:
|
||||||
get:
|
get:
|
||||||
tags:
|
tags:
|
||||||
- note
|
- note
|
||||||
|
summary: Returns the note.
|
||||||
|
operationId: getNote
|
||||||
|
description: This includes all metadata and the content of the note.
|
||||||
|
responses:
|
||||||
|
200:
|
||||||
|
description: All data of the note
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
"$ref": "#/components/schemas/Note"
|
||||||
|
404:
|
||||||
|
description: Note does not exist
|
||||||
|
parameters:
|
||||||
|
- name: note
|
||||||
|
in: path
|
||||||
|
required: true
|
||||||
|
description: The note for which the info should be shown
|
||||||
|
content:
|
||||||
|
text/plain:
|
||||||
|
example: my-note
|
||||||
|
/n/{note}/export/markdown:
|
||||||
|
get:
|
||||||
|
tags:
|
||||||
|
- note
|
||||||
|
- export
|
||||||
summary: Returns the raw markdown content of a note.
|
summary: Returns the raw markdown content of a note.
|
||||||
operationId: getNoteContent
|
operationId: getNoteContent
|
||||||
|
responses:
|
||||||
|
200:
|
||||||
|
description: The raw markdown content of the note
|
||||||
|
content:
|
||||||
|
'text/markdown':
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
examples:
|
||||||
|
markdownExample:
|
||||||
|
"$ref": '#/components/examples/markdownExample'
|
||||||
|
404:
|
||||||
|
description: Note does not exist
|
||||||
|
parameters:
|
||||||
|
- name: note
|
||||||
|
in: path
|
||||||
|
required: true
|
||||||
|
description: The note for which the revision should be shown
|
||||||
|
content:
|
||||||
|
text/plain:
|
||||||
|
example: my-note
|
||||||
|
/n/{note}/export/html:
|
||||||
|
get:
|
||||||
|
tags:
|
||||||
|
- note
|
||||||
|
- export
|
||||||
|
summary: Returns the content of a note as HTML.
|
||||||
|
operationId: getNoteContentAsHTML
|
||||||
|
responses:
|
||||||
|
200:
|
||||||
|
description: The raw markdown content of the note
|
||||||
|
content:
|
||||||
|
'text/markdown':
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
examples:
|
||||||
|
markdownExample:
|
||||||
|
"$ref": '#/components/examples/markdownExample'
|
||||||
|
404:
|
||||||
|
description: Note does not exist
|
||||||
|
parameters:
|
||||||
|
- name: note
|
||||||
|
in: path
|
||||||
|
required: true
|
||||||
|
description: The note for which the revision should be shown
|
||||||
|
content:
|
||||||
|
text/plain:
|
||||||
|
example: my-note
|
||||||
|
/n/{note}/export/gist:
|
||||||
|
get:
|
||||||
|
tags:
|
||||||
|
- note
|
||||||
|
- export
|
||||||
|
summary: Exports the content of a note to a gist.
|
||||||
|
operationId: exportNoteToGist
|
||||||
responses:
|
responses:
|
||||||
200:
|
200:
|
||||||
description: The raw markdown content of the note
|
description: The raw markdown content of the note
|
||||||
|
@ -167,7 +246,34 @@ paths:
|
||||||
content:
|
content:
|
||||||
text/plain:
|
text/plain:
|
||||||
example: my-note
|
example: my-note
|
||||||
/{note}/info:
|
/n/{note}/export/dropbox:
|
||||||
|
get:
|
||||||
|
tags:
|
||||||
|
- note
|
||||||
|
- export
|
||||||
|
summary: Exports the content of a note to dropbox.
|
||||||
|
operationId: exportNoteToDropbox
|
||||||
|
responses:
|
||||||
|
200:
|
||||||
|
description: The raw markdown content of the note
|
||||||
|
content:
|
||||||
|
'text/markdown':
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
examples:
|
||||||
|
markdownExample:
|
||||||
|
"$ref": '#/components/examples/markdownExample'
|
||||||
|
404:
|
||||||
|
description: Note does not exist
|
||||||
|
parameters:
|
||||||
|
- name: note
|
||||||
|
in: path
|
||||||
|
required: true
|
||||||
|
description: The note which should be downloaded
|
||||||
|
content:
|
||||||
|
text/plain:
|
||||||
|
example: my-note
|
||||||
|
/n/{note}/info:
|
||||||
get:
|
get:
|
||||||
tags:
|
tags:
|
||||||
- note
|
- note
|
||||||
|
@ -191,7 +297,7 @@ paths:
|
||||||
content:
|
content:
|
||||||
text/plain:
|
text/plain:
|
||||||
example: my-note
|
example: my-note
|
||||||
/{note}/revision:
|
/n/{note}/revision:
|
||||||
get:
|
get:
|
||||||
tags:
|
tags:
|
||||||
- note
|
- note
|
||||||
|
@ -216,7 +322,7 @@ paths:
|
||||||
text/plain:
|
text/plain:
|
||||||
example: my-note
|
example: my-note
|
||||||
|
|
||||||
/{note}/revision/{revision-id}:
|
/n/{note}/revision/{revision-id}:
|
||||||
get:
|
get:
|
||||||
tags:
|
tags:
|
||||||
- note
|
- note
|
||||||
|
@ -260,6 +366,38 @@ components:
|
||||||
photo:
|
photo:
|
||||||
type: string
|
type: string
|
||||||
format: uri
|
format: uri
|
||||||
|
Note:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
id:
|
||||||
|
type: string
|
||||||
|
format: UUIDv4
|
||||||
|
description: The id of the note
|
||||||
|
alias:
|
||||||
|
type: string
|
||||||
|
description: The alias of the note
|
||||||
|
lastChange:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
userId:
|
||||||
|
type: string
|
||||||
|
format: UUIDv4
|
||||||
|
description: The id of the user that last changed the note
|
||||||
|
user:
|
||||||
|
type: string
|
||||||
|
description: The name of the user that last changed the note
|
||||||
|
timestamp:
|
||||||
|
type: integer
|
||||||
|
description: UNIX-timestamp of when the note was last changed.
|
||||||
|
content:
|
||||||
|
type: string
|
||||||
|
description: The raw markdown content of the note revision
|
||||||
|
authorship:
|
||||||
|
type: array
|
||||||
|
description: Data which gives insights about who worked on the note
|
||||||
|
items:
|
||||||
|
type: integer
|
||||||
|
description: Unique user ids and additional data
|
||||||
NoteRevisionsMetadata:
|
NoteRevisionsMetadata:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
|
|
Loading…
Reference in a new issue