ReadKeep/readeck_api/traits.yaml
Ilyas Hallak 98a914cb2e feat: Implementierung der Readeck API mit kompletter Architektur
- API-Klasse mit allen CRUD-Operationen für Bookmarks
  - Login/Authentifizierung mit Bearer Token
  - Bookmarks abrufen (Liste und Details)
  - Artikel-Inhalt abrufen
- DTO-Strukturen in separate Dateien aufgeteilt
  - UserDto für Authentifizierung
  - BookmarkDto für Bookmark-Listen
  - BookmarkDetailDto mit vollständigen Metadaten
- MVVM-Architektur mit @Observable
  - SettingsViewModel für Anmeldung
  - BookmarksViewModel für Bookmark-Verwaltung
- SwiftUI Views mit modernem Design
  - SettingsView mit Eingabefeldern und Validierung
  - BookmarksView mit Pull-to-Refresh und Leerzustand
  - MainTabView als Navigation
- Use Case Pattern implementiert
  - LoginUseCase für Authentifizierung
  - GetBookmarksUseCase für Datenabfrage
  - DefaultUseCaseFactory für Dependency Injection
- Fehlerbehandlung und Loading States
- Protocol-basierte Architektur für bessere Testbarkeit
2025-06-11 11:02:19 +02:00

126 lines
3.3 KiB
YAML

---
# SPDX-FileCopyrightText: © 2023 Olivier Meunier <olivier@neokraft.net>
#
# SPDX-License-Identifier: AGPL-3.0-only
authenticated:
responses:
"401":
description: |
Unauthorized. The request token found in the Authorization header is not valid.
content:
application/json:
schema:
$ref: "#/components/schemas/message"
"403":
description: |
Forbidden. The user doesn't have permission to fetch users for the specified,
but has other account permissions
content:
application/json:
schema:
$ref: "#/components/schemas/message"
paginated:
parameters:
- name: limit
in: query
description: Number of items per page
schema:
type: integer
- name: offset
in: query
description: Pagination offset
schema:
type: integer
responses:
'200':
headers:
Link:
description: Link to other pages in paginated results
schema:
type: array
items:
type: string
Current-Page:
description: Current page number
schema:
type: integer
Total-Count:
description: Total number of items
schema:
type: integer
Total-Pages:
description: Total number of pages
schema:
type: integer
created:
responses:
"201":
headers:
Location:
description: URL of the created resource
schema:
type: string
format: uri
content:
application/json:
schema:
$ref: "#/components/schemas/message"
deferred:
responses:
"202":
headers:
Location:
description: URL of the created resource
schema:
type: string
format: uri
content:
application/json:
schema:
$ref: "#/components/schemas/message"
validator:
responses:
"422":
description: |
This HTTP response is sent when the input data is not valid. It contains an object
with all the detected errors.
content:
application/json:
schema:
properties:
is_valid:
type: boolean
description: |
`true` if the input is valid
errors:
type: "[string]"
nullable: true
description: List of global input errors
fields:
type: object
description: |
All the fields, with and without errors
additionalProperties:
properties:
is_null:
type: boolean
description: |
`true` if the input value is null
is_bound:
type: boolean
description: |
`true` when the value is bound to the form
value:
type: any
description: Item's value; can be any type
errors:
type: "[string]"
nullable: true
description: List of errors for this field