removed /note/{note}/info

This commit is contained in:
Philip Molares 2020-05-27 11:30:32 +02:00 committed by David Mehren
parent 41f0ebcf4b
commit 7649a46ff8
No known key found for this signature in database
GPG key ID: 185982BA4C42B7C3

View file

@ -31,7 +31,48 @@ paths:
responses: responses:
200: 200:
description: login succesful description: login succesful
content: {} headers:
Set-Cookie:
schema:
type: string
/auth/ldap:
post:
tags:
- auth
summary: Trying to login via LDAP
operationId: loginLdap
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/LdapLogin'
responses:
200:
description: login succesful
headers:
Set-Cookie:
schema:
type: string
/auth/openid:
post:
tags:
- auth
summary: Trying to login via OpenID
operationId: loginOpenId
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/OpenIdLogin'
responses:
200:
description: login succesful
headers:
Set-Cookie:
schema:
type: string
/me: /me:
get: get:
tags: tags:
@ -70,20 +111,7 @@ paths:
application/json: application/json:
schema: schema:
"$ref": "#/components/schemas/ServerStatus" "$ref": "#/components/schemas/ServerStatus"
/new: /note:
get:
tags:
- note
summary: Creates a new note.
operationId: createNote
description: A random id will be assigned and the content will equal to the template (blank by default). After note creation a redirect is issued to the created note.
responses:
200:
description: Get information about the newly created note
content:
application/json:
schema:
"$ref": "#/components/schemas/NewNote"
post: post:
tags: tags:
- note - note
@ -91,7 +119,7 @@ paths:
operationId: createNoteFromMarkdown operationId: createNoteFromMarkdown
description: A random id will be assigned and the content will equal to the body of the received HTTP-request. description: A random id will be assigned and the content will equal to the body of the received HTTP-request.
requestBody: requestBody:
required: true required: false
description: The content of the note to be imported as markdown description: The content of the note to be imported as markdown
content: content:
'text/markdown': 'text/markdown':
@ -107,7 +135,30 @@ paths:
application/json: application/json:
schema: schema:
"$ref": "#/components/schemas/NewNote" "$ref": "#/components/schemas/NewNote"
/new/{alias}: /note/{note}:
get:
tags:
- 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
post: post:
tags: tags:
- note - note
@ -133,30 +184,6 @@ paths:
"$ref": "#/components/schemas/NewNote" "$ref": "#/components/schemas/NewNote"
409: 409:
description: This alias is already in use description: This alias is already in use
parameters:
- name: alias
in: path
required: true
description: The alias for the note-id under which the note will be saved
content:
text/plain:
example: my-note
/n/{note}:
get:
tags:
- 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: parameters:
- name: note - name: note
in: path in: path
@ -165,7 +192,7 @@ paths:
content: content:
text/plain: text/plain:
example: my-note example: my-note
/n/{note}/export/markdown: /note/{note}/export/markdown:
get: get:
tags: tags:
- note - note
@ -179,20 +206,18 @@ paths:
'text/markdown': 'text/markdown':
schema: schema:
type: string type: string
examples: format: binary
markdownExample:
"$ref": '#/components/examples/markdownExample'
404: 404:
description: Note does not exist description: Note does not exist
parameters: parameters:
- name: note - name: note
in: path in: path
required: true required: true
description: The note for which the revision should be shown description: The note for which the markdown should be exported
content: content:
text/plain: text/plain:
example: my-note example: my-note
/n/{note}/export/html: /note/{note}/export/html:
get: get:
tags: tags:
- note - note
@ -201,25 +226,23 @@ paths:
operationId: getNoteContentAsHTML operationId: getNoteContentAsHTML
responses: responses:
200: 200:
description: The raw markdown content of the note description: The raw html content of the note
content: content:
'text/markdown': 'text/html':
schema: schema:
type: string type: string
examples: format: binary
markdownExample:
"$ref": '#/components/examples/markdownExample'
404: 404:
description: Note does not exist description: Note does not exist
parameters: parameters:
- name: note - name: note
in: path in: path
required: true required: true
description: The note for which the revision should be shown description: The note for which the html should be exported
content: content:
text/plain: text/plain:
example: my-note example: my-note
/n/{note}/export/gist: /note/{note}/export/gist:
get: get:
tags: tags:
- note - note
@ -228,25 +251,22 @@ paths:
operationId: exportNoteToGist operationId: exportNoteToGist
responses: responses:
200: 200:
description: The raw markdown content of the note description: The link to Gist of the note
content: content:
'text/markdown': application/json:
schema: schema:
type: string "$ref": '#/components/schemas/GistLink'
examples:
markdownExample:
"$ref": '#/components/examples/markdownExample'
404: 404:
description: Note does not exist description: Note does not exist
parameters: parameters:
- name: note - name: note
in: path in: path
required: true required: true
description: The note which should be downloaded description: The note which should be exported to gist
content: content:
text/plain: text/plain:
example: my-note example: my-note
/n/{note}/export/dropbox: /note/{note}/export/dropbox:
get: get:
tags: tags:
- note - note
@ -255,49 +275,47 @@ paths:
operationId: exportNoteToDropbox operationId: exportNoteToDropbox
responses: responses:
200: 200:
description: The raw markdown content of the note description: The dropbox link 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:
tags:
- note
summary: Returns metadata about the note.
operationId: getNoteInfo
description: This includes the title and description of the note as well as the creation date and viewcount.
responses:
200:
description: Metadata about the note
content: content:
application/json: application/json:
schema: schema:
"$ref": "#/components/schemas/NoteInfo" "$ref": '#/components/schemas/DropboxLink'
404: 404:
description: Note does not exist description: Note does not exist
parameters: parameters:
- name: note - name: note
in: path in: path
required: true required: true
description: The note for which the info should be shown description: The note which should be exported to dropbox
content: content:
text/plain: text/plain:
example: my-note example: my-note
/n/{note}/revision: /note/{note}/export/pdf:
get:
tags:
- note
- export
summary: Exports the content of a note as PDF.
operationId: exportNoteToPDF
responses:
200:
description: The note as an PDF
content:
application/pdf:
schema:
type: string
format: binary
404:
description: Note does not exist
parameters:
- name: note
in: path
required: true
description: The note which should be exported to dropbox
content:
text/plain:
example: my-note
/note/{note}/revision:
get: get:
tags: tags:
- note - note
@ -322,7 +340,7 @@ paths:
text/plain: text/plain:
example: my-note example: my-note
/n/{note}/revision/{revision-id}: /note/{note}/revision/{revision-id}:
get: get:
tags: tags:
- note - note
@ -389,6 +407,13 @@ components:
timestamp: timestamp:
type: integer type: integer
description: UNIX-timestamp of when the note was last changed. description: UNIX-timestamp of when the note was last changed.
viewcount:
type: integer
minimum: 0
description: How often the published version of the note was viewed
createtime:
type: string
description: The timestamp when the note was created in ISO 8601 format.
content: content:
type: string type: string
description: The raw markdown content of the note revision description: The raw markdown content of the note revision
@ -430,26 +455,20 @@ components:
description: Data which gives insight about what changed in comparison to former revisions description: Data which gives insight about what changed in comparison to former revisions
items: items:
type: string type: string
NoteInfo: GistLink:
type: object type: object
properties: properties:
title: link:
type: string type: string
description: The title of the note format: uri
default: Untitled description: A Gist link
description: DropboxLink:
type: object
properties:
link:
type: string type: string
description: The description of the note or the first words from the note format: uri
viewcount: description: A Dropbox link
type: integer
minimum: 0
description: How often the published version of the note was viewed
createtime:
type: string
description: The timestamp when the note was created in ISO 8601 format.
updatetime:
type: string
description: The timestamp when the note was last updated in ISO 8601 format.
EmailLogin: EmailLogin:
type: object type: object
properties: properties:
@ -459,6 +478,20 @@ components:
password: password:
type: string type: string
format: password format: password
LdapLogin:
type: object
properties:
username:
type: string
format: email
password:
type: string
format: password
OpenIdLogin:
type: object
properties:
openId:
type: string
NewNote: NewNote:
type: object type: object
properties: properties: