Implement CRUD for CEC content schema
Implement POST/api/rafs-ddms/cec/{record_id}/data is implemented and available on Swagger
- record_id is the SamplesAnalysis WPC which was created previously
- User should be able to fill the SamplesAnalysis report with measurements taken in this analysis
- Successful response (200 status code) should update SamplesAnalysis record and include DDMSDatasets array with GET endpoint to the linked bulk data of cec
- Validation cases should be covered with appropriate status codes
- Request & response structure should correspond to populated JSON
Implement GET/api/rafs-ddms/cec/{record_id}/data endpoint is implemented and available on Swagger
- record_id is the SamplesAnalysis WPC
- User should be able to retrieve bulk data of cec using new endpoint
- Successful response (200 status code) should retrieve all existing cec Measurements (bulk data) linked to specified record id (SamplesAnalysis WPC)
- Validation cases should be covered with appropriate status codes
- Structure of request and response should correspond to populated JSON content schema
CEC Schema
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"SamplesAnalysisID": {
"type": "string",
"pattern": "^[\\w\\-\\.]+:work-product-component\\-\\-SamplesAnalysis:[\\w\\-\\.\\:\\%]+:[0-9]*$"
},
"SamplesID": {
"type": "string",
"pattern": "^[\\w-.]+:master-data-Samples:[\\w\\-\\.\\:\\%]+:[0-9]*$"
},
"BrineConcentration": {
"type": "object",
"properties": {
"Value": {
"type": "number"
},
"UnitOfMeasure": {
"type": "string",
"pattern": "^[\\w-.]:reference-data--UnitOfMeasure:[\\w\\-\\.\\:\\%]+:[0-9]*$"
}
}
},
"CeC": {
"type": "object",
"properties": {
"Value": {
"type": "number"
},
"UnitOfMeasure": {
"type": "string",
"pattern": "^[\\w-.]:reference-data--UnitOfMeasure:[\\w\\-\\.\\:\\%]+:[0-9]*$"
}
}
},
"Qv": {
"type": "object",
"properties": {
"Value": {
"type": "number"
},
"Description": "Contribution per unit pore volume",
"UnitOfMeasure": {
"type": "string",
"pattern": "^[\\w-.]:reference-data--UnitOfMeasure:[\\w\\-\\.\\:\\%]+:[0-9]*$"
}
}
},
"required": [
"SamplesAnalysisID",
"SamplesID"
]
}
}
Edited by Mykhailo Buriak