mirror of
https://github.com/navidrome/navidrome.git
synced 2026-11-13 05:38:47 +01:00
feat(api): enforce API v1 security from the spec and harden problem responses
This commit is contained in:
parent
71c379ff44
commit
3e645959f8
13 changed files with 918 additions and 34 deletions
|
|
@ -23,11 +23,20 @@ properties:
|
|||
enum:
|
||||
- validation
|
||||
- unauthorized
|
||||
- token_expired
|
||||
- forbidden
|
||||
- insufficient_scope
|
||||
- not_found
|
||||
- method_not_allowed
|
||||
- setup_complete
|
||||
- password_managed_externally
|
||||
- payload_too_large
|
||||
- rate_limited
|
||||
- unavailable
|
||||
- internal
|
||||
referenceId:
|
||||
type: string
|
||||
description: Present on internal errors. Quote it when reporting a problem; it tags the server's log lines for this request.
|
||||
errors:
|
||||
type: array
|
||||
description: Per-field failures. Present only when `code` is `validation`.
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ json:
|
|||
x-module: core
|
||||
x-stability-level: alpha
|
||||
tags: [server]
|
||||
security: []
|
||||
summary: Get the OpenAPI document (JSON)
|
||||
description: The bundled OpenAPI document of the running server version. Supports ETag revalidation.
|
||||
responses:
|
||||
|
|
@ -25,6 +26,7 @@ yaml:
|
|||
x-module: core
|
||||
x-stability-level: alpha
|
||||
tags: [server]
|
||||
security: []
|
||||
summary: Get the OpenAPI document (YAML)
|
||||
description: The bundled OpenAPI document of the running server version. Supports ETag revalidation.
|
||||
responses:
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ get:
|
|||
x-module: core
|
||||
x-stability-level: alpha
|
||||
tags: [server]
|
||||
security: []
|
||||
summary: Describe the server
|
||||
description: |
|
||||
Returns the public server description. No authentication required.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue