fix schema issues and add tests to prevent regressions#4865
fix schema issues and add tests to prevent regressions#4865JC-wk wants to merge 8 commits intomicrosoft:mainfrom
Conversation
Unit Test Results673 tests 673 ✅ 7s ⏱️ Results for commit b84f896. ♻️ This comment has been updated with latest results. |
|
/test-extended |
|
🤖 pr-bot 🤖 🏃 Running extended tests: https://github.com/microsoft/AzureTRE/actions/runs/21754270598 (with refid (in response to this comment from @marrobi) |
|
🤖 pr-bot 🤖 🏃 Running extended tests: https://github.com/microsoft/AzureTRE/actions/runs/21754270598 (with refid (in response to this comment from @marrobi) |
There was a problem hiding this comment.
Pull request overview
This PR fixes mismatches between OpenAPI/schema example generators and the underlying domain models (Operation/OperationStep and AirlockRequest/AirlockReview), and adds regression tests to prevent invalid examples from reappearing. It also updates the API patch version and records the fixes in the changelog.
Changes:
- Align
get_sample_operation()step payload with theOperationStepdomain model (addsidandtemplateStepId, removes invalidstepId). - Fix Airlock request/review schema sample data to use correct field names and a valid
reviewDecisionenum value. - Add model-validation regression tests for schema example payloads; bump API patch version and update
CHANGELOG.md.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| api_app/models/schemas/operation.py | Fixes sample operation step fields to match OperationStep. |
| api_app/models/schemas/airlock_request.py | Fixes sample airlock request/review fields and enum example value. |
| api_app/tests_ma/test_models/test_operation_schema.py | Adds regression tests validating operation schema examples against domain models. |
| api_app/tests_ma/test_models/test_airlock_request_schema.py | Adds regression test validating airlock request + operation response schema example. |
| api_app/_version.py | Increments API patch version. |
| CHANGELOG.md | Adds unreleased bug-fix entries for the schema/example corrections. |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Resolves #4864
Resolves #4866
What is being addressed
How is this addressed