Fury0508 opened a new pull request, #60973:
URL: https://github.com/apache/airflow/pull/60973

   This PR migrates the remaining user endpoints from Connexion to FastAPI as 
part of #56730.
   
   ## What's Changed
   
   **New endpoints in `api_fastapi/routes/users.py`:**
   - `GET /fab/v1/users` - List users with pagination and ordering
   - `GET /fab/v1/users/{username}` - Get a single user by username  
   - `PATCH /fab/v1/users/{username}` - Update user with `update_mask` support
   - `DELETE /fab/v1/users/{username}` - Delete a user
   
   **New datamodels in `api_fastapi/datamodels/users.py`:**
   - `UserPatchBody` - Request model for partial updates (all fields optional)
   - `UserCollectionResponse` - Response model for paginated user list
   
   **New service methods in `api_fastapi/services/users.py`:**
   - `get_user()` - Retrieve single user
   - `get_users()` - List users with pagination/ordering
   - `update_user()` - Partial update with `update_mask` support
   - `delete_user()` - Remove user
   
   **Tests added:**
   - Route tests for all new endpoints (success, 403, 404, 422 cases)
   - Service layer tests covering all methods
   - Datamodel tests for `UserPatchBody` and `UserCollectionResponse`
   
   ## Notes
   
   - Follows existing patterns from `roles.py` implementation
   - `update_mask` uses comma-separated string format (consistent with roles 
endpoint)
   - All 125 tests pass locally
   
   closes #60946
   
   ---
   ##### Was generative AI tooling used to co-author this PR?
   
   - [X] Yes (please specify the tool below)
   
   Generated-by: Claude following [the 
guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions)
   
   Claude was used for:
   - Code review and suggestions for implementation patterns
   - Writing test cases for routes, services, and datamodels
   - Debugging test environment setup issues
   ---


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to