Commit graph

20 commits

Author SHA1 Message Date
Yannick Bungers
8a6e81e1c8
Merge branch 'develop' into public-api-uploads 2020-10-30 22:46:08 +01:00
David Mehren
b7195c563c
Public API: Cleanup history schemas
Signed-off-by: David Mehren <git@herrmehren.de>
Co-authored-by: Yannick Bungers <git@innay.de>
2020-10-24 22:20:00 +02:00
David Mehren
cfe8169fc2
Public API: NoteRevisionsMetadata is not an array
Signed-off-by: David Mehren <git@herrmehren.de>
Co-authored-by: Yannick Bungers <git@innay.de>
2020-10-24 22:20:00 +02:00
David Mehren
a4ac295ada
Public API: Remove PUT /notes/{note}/metadata
The note metadata will be automatically extracted from the note content and cannot be updated separately.

Signed-off-by: David Mehren <git@herrmehren.de>
Co-authored-by: Yannick Bungers <git@innay.de>
2020-10-24 22:19:59 +02:00
David Mehren
7adcad2ce6
Public API: Fix PUT /notes/{note}/permissions response
This route should return a full `NotePermissions` object instead of only `NotePermissionsUpdate`

Signed-off-by: David Mehren <git@herrmehren.de>
Co-authored-by: Yannick Bungers <git@innay.de>
2020-10-24 22:19:14 +02:00
David Mehren
a640dea1aa
Public API: Update description of /notes/{note} POST and PUT routes.
Signed-off-by: David Mehren <git@herrmehren.de>
Co-authored-by: Yannick Bungers <git@innay.de>
2020-10-24 22:19:14 +02:00
David Mehren
67633c375d
Public API: Successful POST requests should result in a 201.
Signed-off-by: David Mehren <git@herrmehren.de>
Co-authored-by: Yannick Bungers <git@innay.de>
2020-10-24 22:19:13 +02:00
David Mehren
b63593aa8b
Public API: Simplify PUT /me/history/{note}
Previously, one had to send a complete `NoteMetadata` object when updating the pinned status of a note. A new `HistoryUpdateObject` type was introduced, that only contains the pinned status boolean.

Signed-off-by: David Mehren <git@herrmehren.de>
Co-authored-by: Yannick Bungers <git@innay.de>
2020-10-24 22:19:13 +02:00
David Mehren
2be1defd7a
Public API: Split-out a /notes/{note}/permissions route to set only permissions
Previously, the metadata route was used to both update note metadata (like title, description and tags) and the permissions. Additionally, one had to send many unchangeable properties. In this commit, a /notes/{note}/permissions route is introduced, that only changes permissions. Additionally, PUT /notes/{note}/metadata now needs only the properties that are actually changeable.

Signed-off-by: David Mehren <git@herrmehren.de>
Co-authored-by: Yannick Bungers <git@innay.de>
2020-10-24 22:19:13 +02:00
David Mehren
4a975dcca2
Public API: Add routes to get uploads by user or note
Co-authored-by: Yannick Bungers <git@innay.de>
Signed-off-by: David Mehren <git@herrmehren.de>
2020-10-24 21:48:29 +02:00
David Mehren
a728866ebb
Public API: Add media deletion
Signed-off-by: David Mehren <git@herrmehren.de>
2020-10-17 21:55:05 +02:00
David Mehren
16b5f3a5c8
Use POST /media for file upload
The old `/media/upload` subpath does not follow the convention of REST APIs.

Signed-off-by: David Mehren <git@herrmehren.de>
2020-10-17 20:58:10 +02:00
David Mehren
e0f8031fab
Public API: Update /media/upload route with supported content-types
Signed-off-by: David Mehren <git@herrmehren.de>
2020-10-17 20:55:48 +02:00
David Mehren
b0b9b75e65
Public API: /media/upload returns the URL of the uploaded file
Signed-off-by: David Mehren <git@herrmehren.de>
2020-10-17 19:58:22 +02:00
Yannick Bungers
e86898ce18 Fixes types of timestamps and property name
Signed-off-by: Yannick Bungers <git@innay.de>
2020-10-01 13:11:47 +02:00
David Mehren
4f5bb75766
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>
2020-09-25 21:37:39 +02:00
Yannick Bungers
91200cb3b3
Removed unnecessary objects and flattened updateTime
Signed-off-by: Yannick Bungers <git@innay.de>
2020-08-20 19:43:17 +02:00
Yannick Bungers
3f6fe71bab
Fixed Typos, removed unnecessary type: object
and fixed copy paste errors in descriptions

Signed-off-by: Yannick Bungers <git@innay.de>
2020-08-20 19:43:17 +02:00
Yannick Bungers
7f00c87c68
Added GET /me/history/{note} to get data for updating history
Signed-off-by: Yannick Bungers <git@innay.de>
2020-08-20 19:43:16 +02:00
David Mehren
2398499f5d
Rename openapi.yml to public_api.yml 2020-08-20 19:43:16 +02:00
Renamed from docs/dev/openapi.yml (Browse further)