weitere updates für instanzierbarkeit und sauberes testing

This commit is contained in:
2026-02-24 08:49:40 +01:00
parent 7b53faca37
commit 16759a2732
119 changed files with 6371 additions and 745 deletions

View File

@@ -18,6 +18,8 @@ tags:
- name: tenants
- name: departments
- name: roles
- name: permissions
- name: settings
paths:
/auth/login:
post:
@@ -88,6 +90,133 @@ paths:
$ref: '#/components/responses/Unauthorized'
'429':
$ref: '#/components/responses/RateLimited'
put:
tags: [me]
summary: Update authenticated user profile
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/MeUpdateRequest'
responses:
'200':
description: Updated profile
content:
application/json:
schema:
$ref: '#/components/schemas/MeResponse'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'422':
$ref: '#/components/responses/ValidationError'
'429':
$ref: '#/components/responses/RateLimited'
patch:
tags: [me]
summary: Patch authenticated user profile
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/MeUpdateRequest'
responses:
'200':
description: Updated profile
content:
application/json:
schema:
$ref: '#/components/schemas/MeResponse'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'422':
$ref: '#/components/responses/ValidationError'
'429':
$ref: '#/components/responses/RateLimited'
/me/password:
post:
tags: [me]
summary: Change password for authenticated user
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/MePasswordRequest'
responses:
'204':
description: No Content
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'422':
$ref: '#/components/responses/ValidationError'
'429':
$ref: '#/components/responses/RateLimited'
/me/avatar:
get:
tags: [me]
summary: Get avatar image for authenticated user
parameters:
- $ref: '#/components/parameters/AvatarSize'
responses:
'200':
description: Avatar binary
content:
image/jpeg: {}
image/png: {}
image/webp: {}
'401':
$ref: '#/components/responses/Unauthorized'
'404':
$ref: '#/components/responses/NotFound'
'429':
$ref: '#/components/responses/RateLimited'
post:
tags: [me]
summary: Upload avatar for authenticated user
requestBody:
required: true
content:
multipart/form-data:
schema:
type: object
required: [avatar]
properties:
avatar:
type: string
format: binary
responses:
'201':
$ref: '#/components/responses/DataObject'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'422':
$ref: '#/components/responses/ValidationError'
'429':
$ref: '#/components/responses/RateLimited'
delete:
tags: [me]
summary: Delete avatar for authenticated user
responses:
'204':
description: No Content
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'429':
$ref: '#/components/responses/RateLimited'
/me/tokens:
get:
@@ -350,6 +479,29 @@ paths:
'429':
$ref: '#/components/responses/RateLimited'
/users/avatar/{uuid}:
parameters:
- $ref: '#/components/parameters/UuidPath'
- $ref: '#/components/parameters/AvatarSize'
get:
tags: [users]
summary: Get avatar image by user UUID
responses:
'200':
description: Avatar binary
content:
image/jpeg: {}
image/png: {}
image/webp: {}
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
'429':
$ref: '#/components/responses/RateLimited'
/tenants:
get:
tags: [tenants]
@@ -474,6 +626,29 @@ paths:
'429':
$ref: '#/components/responses/RateLimited'
/tenants/avatar/{uuid}:
parameters:
- $ref: '#/components/parameters/UuidPath'
- $ref: '#/components/parameters/AvatarSize'
get:
tags: [tenants]
summary: Get avatar image by tenant UUID
responses:
'200':
description: Avatar binary
content:
image/jpeg: {}
image/png: {}
image/webp: {}
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
'429':
$ref: '#/components/responses/RateLimited'
/departments:
get:
tags: [departments]
@@ -722,6 +897,112 @@ paths:
'429':
$ref: '#/components/responses/RateLimited'
/permissions:
get:
tags: [permissions]
summary: List permissions
parameters:
- $ref: '#/components/parameters/Limit25'
- $ref: '#/components/parameters/Offset'
- $ref: '#/components/parameters/Search'
- $ref: '#/components/parameters/OrderPermissions'
- $ref: '#/components/parameters/Dir'
- $ref: '#/components/parameters/ActiveFilter'
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/PermissionListResponse'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'429':
$ref: '#/components/responses/RateLimited'
/settings:
get:
tags: [settings]
summary: Get application settings snapshot
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/SettingsResponse'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'429':
$ref: '#/components/responses/RateLimited'
put:
tags: [settings]
summary: Update application settings
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/SettingsUpdateRequest'
responses:
'200':
description: Updated settings snapshot
content:
application/json:
schema:
$ref: '#/components/schemas/SettingsResponse'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'422':
$ref: '#/components/responses/ValidationError'
'429':
$ref: '#/components/responses/RateLimited'
patch:
tags: [settings]
summary: Patch application settings
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/SettingsUpdateRequest'
responses:
'200':
description: Updated settings snapshot
content:
application/json:
schema:
$ref: '#/components/schemas/SettingsResponse'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'422':
$ref: '#/components/responses/ValidationError'
'429':
$ref: '#/components/responses/RateLimited'
/settings/public:
get:
tags: [settings]
summary: Get public app settings for unauthenticated clients
security: []
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/GenericDataResponse'
'429':
$ref: '#/components/responses/RateLimited'
components:
securitySchemes:
BearerAuth:
@@ -777,6 +1058,13 @@ components:
schema:
type: string
description: "Accepted aliases: 1, 0, true, false, active, inactive"
AvatarSize:
name: size
in: query
schema:
type: integer
minimum: 16
maximum: 1024
OrderUsers:
name: order
in: query
@@ -805,6 +1093,13 @@ components:
type: string
enum: [id, uuid, description, code, active, created, modified]
default: description
OrderPermissions:
name: order
in: query
schema:
type: string
enum: [key, description, active, created]
default: key
responses:
Unauthorized:
description: Unauthorized
@@ -930,6 +1225,195 @@ components:
format: date-time
nullable: true
description: UTC expiry timestamp of the token
MeUpdateRequest:
type: object
additionalProperties: false
properties:
first_name:
type: string
last_name:
type: string
profile_description:
type: string
job_title:
type: string
phone:
type: string
mobile:
type: string
short_dial:
type: string
address:
type: string
postal_code:
type: string
city:
type: string
country:
type: string
region:
type: string
locale:
type: string
theme:
type: string
current_tenant_uuid:
type: string
format: uuid
MePasswordRequest:
type: object
additionalProperties: false
required: [current_password, password, password2]
properties:
current_password:
type: string
password:
type: string
password2:
type: string
PermissionListItem:
type: object
properties:
key:
type: string
description:
type: string
active:
type: boolean
is_system:
type: boolean
PermissionListResponse:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/PermissionListItem'
total:
type: integer
limit:
type: integer
offset:
type: integer
SettingsObject:
type: object
properties:
app_title:
type: string
app_locale:
type: string
app_theme:
type: string
app_theme_user_allowed:
type: boolean
app_registration_enabled:
type: boolean
app_primary_color:
type: string
api_token_default_ttl_days:
type: integer
nullable: true
api_token_max_ttl_days:
type: integer
nullable: true
api_cors_allowed_origins:
type: string
default_tenant_id:
type: integer
nullable: true
default_role_id:
type: integer
nullable: true
default_department_id:
type: integer
nullable: true
user_inactivity_deactivate_days:
type: integer
nullable: true
user_inactivity_delete_days:
type: integer
nullable: true
microsoft_shared_client_id:
type: string
microsoft_authority:
type: string
smtp_host:
type: string
smtp_port:
type: integer
nullable: true
smtp_user:
type: string
smtp_secure:
type: string
smtp_from:
type: string
smtp_from_name:
type: string
SettingsResponse:
type: object
required: [data]
properties:
data:
$ref: '#/components/schemas/SettingsObject'
SettingsUpdateRequest:
type: object
additionalProperties: false
properties:
app_title:
type: string
app_locale:
type: string
app_theme:
type: string
app_theme_user_allowed:
type: boolean
app_registration_enabled:
type: boolean
app_primary_color:
type: string
api_token_default_ttl_days:
type: integer
nullable: true
api_token_max_ttl_days:
type: integer
nullable: true
api_cors_allowed_origins:
type: string
default_tenant_id:
type: integer
nullable: true
default_role_id:
type: integer
nullable: true
default_department_id:
type: integer
nullable: true
user_inactivity_deactivate_days:
type: integer
nullable: true
user_inactivity_delete_days:
type: integer
nullable: true
microsoft_shared_client_id:
type: string
microsoft_authority:
type: string
smtp_host:
type: string
smtp_port:
type: integer
nullable: true
smtp_user:
type: string
smtp_password:
type: string
smtp_secure:
type: string
smtp_from:
type: string
smtp_from_name:
type: string
RoleWriteRequest:
type: object
additionalProperties: false
@@ -946,14 +1430,14 @@ components:
DepartmentWriteRequest:
type: object
additionalProperties: false
required: [description, tenant_id]
required: [description, tenant_uuid]
properties:
description:
type: string
minLength: 1
tenant_id:
type: integer
minimum: 1
tenant_uuid:
type: string
format: uuid
code:
type: string
cost_center:
@@ -1066,24 +1550,24 @@ components:
type: string
password2:
type: string
tenant_ids:
tenant_uuids:
type: array
items:
type: integer
minimum: 1
primary_tenant_id:
type: integer
minimum: 1
role_ids:
type: string
format: uuid
primary_tenant_uuid:
type: string
format: uuid
role_uuids:
type: array
items:
type: integer
minimum: 1
department_ids:
type: string
format: uuid
department_uuids:
type: array
items:
type: integer
minimum: 1
type: string
format: uuid
UserUpdateRequest:
type: object
additionalProperties: false
@@ -1133,24 +1617,24 @@ components:
type: string
password2:
type: string
tenant_ids:
tenant_uuids:
type: array
items:
type: integer
minimum: 1
primary_tenant_id:
type: integer
minimum: 1
role_ids:
type: string
format: uuid
primary_tenant_uuid:
type: string
format: uuid
role_uuids:
type: array
items:
type: integer
minimum: 1
department_ids:
type: string
format: uuid
department_uuids:
type: array
items:
type: integer
minimum: 1
type: string
format: uuid
TenantSummary:
type: object
properties:
@@ -1436,6 +1920,8 @@ components:
type: string
email:
type: string
profile_description:
type: string
job_title:
type: string
phone:
@@ -1452,12 +1938,32 @@ components:
type: string
country:
type: string
region:
type: string
hire_date:
type: string
format: date
locale:
type: string
theme:
type: string
email_verified_at:
type: string
nullable: true
last_login_at:
type: string
nullable: true
last_login_provider:
type: string
nullable: true
active:
type: boolean
created:
type: string
modified:
type: string
current_tenant:
$ref: '#/components/schemas/TenantSummary'
primary_tenant:
$ref: '#/components/schemas/TenantSummary'
permissions:
@@ -1520,12 +2026,39 @@ components:
type: string
country:
type: string
region:
type: string
vat_id:
type: string
tax_number:
type: string
phone:
type: string
fax:
type: string
email:
type: string
support_email:
type: string
support_phone:
type: string
billing_email:
type: string
website:
type: string
privacy_url:
type: string
imprint_url:
type: string
primary_color:
type: string
primary_color_use_default:
type: boolean
default_theme:
type: string
allow_user_theme_mode:
type: string
enum: ['', '0', '1']
created:
type: string
modified:
@@ -1574,11 +2107,13 @@ components:
type: string
code:
type: string
cost_center:
type: string
active:
type: boolean
tenant_id:
type: integer
nullable: true
tenant_uuid:
type: string
format: uuid
created:
type: string
modified:
@@ -1625,6 +2160,10 @@ components:
type: string
active:
type: boolean
permission_keys:
type: array
items:
type: string
created:
type: string
modified: