Skip to content

invalid sample data in Airlock Request API schemas #4866

@JC-wk

Description

@JC-wk

Describe the bug
The sample data generator functions in api_app/models/schemas/airlock_request.py were out of sync with the
AirlockRequest and AirlockReview domain models. This resulted in invalid examples being displayed in the
Swagger/OpenAPI documentation.

Identified Issues:

  • get_sample_airlock_request used the field requestId, whereas the model expects id.
  • get_sample_airlock_review used the field reviewId, whereas the model expects id.
  • get_sample_airlock_review provided a descriptive string for reviewDecision (e.g., "Describe why...") instead of a
    valid enum value from AirlockReviewDecision (e.g., "approved"), causing Pydantic validation failures.

Proposed Changes:

  • Update field names in get_sample_airlock_request and get_sample_airlock_review to match domain models.
  • Update reviewDecision to use a valid enum string.
  • Add regression tests in api_app/tests_ma/test_models/test_airlock_request_schema.py to validate sample data
    against domain models.

Azure TRE release version (e.g. v0.14.0 or main):
main
Deployed Azure TRE components - click the (i) in the UI:
latest

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions