Create WPC GET Method for Fluid Model schema
As an OSDU data definitions member, I want the GET method to be created to support the Fluid Model WPC. The method must fetch the record and throw the corresponding messages,(Check AC section).
Dependencies before start the development :
| Task | Status (Y / N) |
|---|---|
| Proposal document revised | Y |
| Multi – company review | Y |
| OSDU Forum approval |
Acceptance criteria:
The following acceptance criteria are verifiable via Postman collection, based strictly on the provided FastAPI code implementation.
| AC | Completed |
|---|---|
| The user can send a GET request to the endpoint /{record_id}. | |
| Path parameter validation: Valid record_id passes, Invalid record_id returns 422 Unprocessable Entity. | |
| If the specified ID does not exist, the system should return a 404 Not Found status | |
| Response: 200 OK with JSON body. | |
| Caching: Same response within TTL. | |
| No extra fields beyond service output. Postman Tests: Send valid GET ® 200 OK. Invalid record_id ® 422. Repeat ® consistent cached response. | |
| If the user is not authorized to access the saturation function set, the system should return a 403 Forbidden status. |
End point:
/api/rafs-ddms/v2/fluidmodel/{record_id}
SCHEMA and reference links
You can access the json example file here: https://gitlab.opengroup.org/osdu/subcommittees/data-def/work-products/schema/-/blob/master/Generated/work-product-component/FluidModel.1.0.0.json
Source data sample:
Reference list(s):
Edited by Raul Isunza