Skip to content

Commit

Permalink
add openapi specs
Browse files Browse the repository at this point in the history
for new endpoint `/application/preferences`
  • Loading branch information
peterstadler committed Aug 5, 2022
1 parent 5c85bfd commit a9dd731
Show file tree
Hide file tree
Showing 3 changed files with 72 additions and 0 deletions.
2 changes: 2 additions & 0 deletions api/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ paths:
$ref: "./openapi/paths/code-findByElement.yaml"
/application/status:
$ref: "./openapi/paths/application-status.yaml"
/application/preferences:
$ref: "./openapi/paths/application-preferences.yaml"
/application/newID:
$ref: "./openapi/paths/application-newID.yaml"
/facets/{facet}:
Expand Down
34 changes: 34 additions & 0 deletions api/v1/openapi/paths/application-preferences.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# /application/preferences path
get:
tags:
- Application
summary: Get user preferences
responses:
200:
description: User preferences
content:
application/json:
schema:
$ref: '../schemas/preferences.yaml'
default:
$ref: '../responses/unexpectedError.yaml'

post:
tags:
- Application
summary: Set user preferences
requestBody:
description: User preferences
content:
'application/json':
schema:
$ref: '../schemas/preferences.yaml'
responses:
200:
description: User preferences
content:
application/json:
schema:
$ref: '../schemas/preferences.yaml'
default:
$ref: '../responses/unexpectedError.yaml'
36 changes: 36 additions & 0 deletions api/v1/openapi/schemas/preferences.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# preferences schema
type: object
properties:
line-wrap:
type: boolean
description: Set line wrap for xml preview
default: true
limit:
type: integer
format: int32
description: Set the limit for list views
default: 10
enum:
- 10
- 25
- 50
rdg-marker:
type: boolean
description: Show reading markers within the text view
default: false
textConst-marker:
type: boolean
description: Show text constitution markers within the text view
default: true
supplied-marker:
type: boolean
description: Show supplied markers within the text view
default: true
note-marker:
type: boolean
description: Show note markers within the text view
default: true
thematicCommentaries-marker:
type: boolean
description: Show thematic commentaries markers within the text view
default: true

0 comments on commit a9dd731

Please sign in to comment.