- handle contact PATCH failures by checking model save result and returning HTTP 400 with the model error message - update ContactDetailModel nested updates to enforce active-detail checks and use model update() with explicit failure propagation - extend contact patch assertions and align test-create variants expectations to status=success for POST responses - refresh composer lock metadata/dependency constraints and include generated docs/data/test files updated during normalization - impact: API contract unchanged except clearer 400 error responses on invalid contact detail updates
121 lines
2.7 KiB
YAML
Executable File
121 lines
2.7 KiB
YAML
Executable File
User:
|
|
type: object
|
|
properties:
|
|
UserID:
|
|
type: integer
|
|
description: Unique user identifier
|
|
Username:
|
|
type: string
|
|
description: Unique login username
|
|
Email:
|
|
type: string
|
|
format: email
|
|
description: User email address
|
|
Name:
|
|
type: string
|
|
description: Full name of the user
|
|
Role:
|
|
type: string
|
|
description: User role (admin, technician, doctor, etc.)
|
|
Department:
|
|
type: string
|
|
description: Department name
|
|
IsActive:
|
|
type: boolean
|
|
description: Whether the user account is active
|
|
CreatedAt:
|
|
type: string
|
|
format: date-time
|
|
description: Creation timestamp
|
|
UpdatedAt:
|
|
type: string
|
|
format: date-time
|
|
description: Last update timestamp
|
|
DelDate:
|
|
type: string
|
|
format: date-time
|
|
nullable: true
|
|
description: Soft delete timestamp (null if active)
|
|
|
|
UserCreate:
|
|
type: object
|
|
required:
|
|
- Username
|
|
- Email
|
|
properties:
|
|
Username:
|
|
type: string
|
|
minLength: 3
|
|
maxLength: 50
|
|
description: Unique login username
|
|
Email:
|
|
type: string
|
|
format: email
|
|
maxLength: 100
|
|
description: User email address
|
|
Name:
|
|
type: string
|
|
description: Full name of the user
|
|
Role:
|
|
type: string
|
|
description: User role
|
|
Department:
|
|
type: string
|
|
description: Department name
|
|
IsActive:
|
|
type: boolean
|
|
default: true
|
|
description: Whether the user account is active
|
|
|
|
UserUpdate:
|
|
type: object
|
|
required:
|
|
- UserID
|
|
properties:
|
|
UserID:
|
|
type: integer
|
|
description: User ID to update
|
|
Email:
|
|
type: string
|
|
format: email
|
|
description: User email address
|
|
Name:
|
|
type: string
|
|
description: Full name of the user
|
|
Role:
|
|
type: string
|
|
description: User role
|
|
Department:
|
|
type: string
|
|
description: Department name
|
|
IsActive:
|
|
type: boolean
|
|
description: Whether the user account is active
|
|
|
|
UserListResponse:
|
|
type: object
|
|
properties:
|
|
status:
|
|
type: string
|
|
example: success
|
|
message:
|
|
type: string
|
|
example: Users retrieved successfully
|
|
data:
|
|
type: object
|
|
properties:
|
|
users:
|
|
type: array
|
|
items:
|
|
$ref: '#/User'
|
|
pagination:
|
|
type: object
|
|
properties:
|
|
current_page:
|
|
type: integer
|
|
per_page:
|
|
type: integer
|
|
total:
|
|
type: integer
|
|
total_pages:
|
|
type: integer |