Implement endpoints to CRUD High Pressure Mercury Injection Analysis (data)
Implement POST/api/rafs-ddms/samplesanalysis/{record_id}/data/mercuryinjectionanalyses is implemented and available on Swagger
- record_id is the SamplesAnalysis WPC which was created previously
- User should be able to fill the mercuryinjectionanalyses report with measurements taken in this analysis
- Successful response (200 status code) should update mercuryinjectionanalyses record and include DDMSDatasets array with GET endpoint to the linked bulk data of mercuryinjectionanalyses
- Validation cases should be covered with appropriate status codes
- Request & response structure should correspond to populated JSON
Implement GET/api/rafs-ddms/samplesanalysis/{record_id}/data/mercuryinjectionanalyses endpoint is implemented and available on Swagger
- record_id is the SamplesAnalysis WPC
- User should be able to retrieve bulk data of mercuryinjectionanalyses using new endpoint
- Successful response (200 status code) should retrieve all existing mercuryinjectionanalyses Measurements (bulk data) linked to specified record id
- Validation cases should be covered with appropriate status codes
- Structure of request and response should correspond to populated JSON content schema
Click to expand
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"SamplesAnalysisID": {
"type": "string"
},
"InjectionSampleData": {
"type": "array",
"items": {
"type": "object",
"properties": {
"SampleID": {
"type": "string"
},
"Porosity": {
"type": "object",
"properties": {
"Value": {
"type": "number"
},
"UnitOfMeasure": {
"type": "string",
"pattern": "^[\\w\\-\\.]+:reference-data\\-\\-UnitOfMeasure:[\\w\\-\\.\\:\\%]+:[0-9]*$"
}
}
},
"PoreVolume": {
"type": "object",
"properties": {
"Value": {
"type": "number"
},
"UnitOfMeasure": {
"type": "string",
"pattern": "^[\\w\\-\\.]+:reference-data\\-\\-UnitOfMeasure:[\\w\\-\\.\\:\\%]+:[0-9]*$"
}
}
},
"BulkVolume": {
"type": "object",
"properties": {
"Value": {
"type": "number"
},
"UnitOfMeasure": {
"type": "string",
"pattern": "^[\\w\\-\\.]+:reference-data\\-\\-UnitOfMeasure:[\\w\\-\\.\\:\\%]+:[0-9]*$"
}
}
},
"BrineDensityGradient": {
"type": "object",
"properties": {
"Value": {
"type": "number"
},
"UnitOfMeasure": {
"type": "string",
"pattern": "^[\\w\\-\\.]+:reference-data\\-\\-UnitOfMeasure:[\\w\\-\\.\\:\\%]+:[0-9]*$"
}
}
},
"GasDensityGradient": {
"type": "object",
"properties": {
"Value": {
"type": "number"
},
"UnitOfMeasure": {
"type": "string",
"pattern": "^[\\w\\-\\.]+:reference-data\\-\\-UnitOfMeasure:[\\w\\-\\.\\:\\%]+:[0-9]*$"
}
}
},
"AvgHydraulicRadius": {
"type": "object",
"properties": {
"Value": {
"type": "number"
},
"UnitOfMeasure": {
"type": "string",
"pattern": "^[\\w\\-\\.]+:reference-data\\-\\-UnitOfMeasure:[\\w\\-\\.\\:\\%]+:[0-9]*$"
}
}
},
"FZI": {
"type": "number"
},
"SwansonParameter": {
"type": "number"
}
}
}
},
"IftCosineContactAngle": {
"type": "array",
"items": {
"type": "object",
"properties": {
"LabAirBrineAngle": {
"type": "object",
"properties": {
"Value": {
"type": "number"
},
"UnitOfMeasure": {
"type": "string",
"pattern": "^[\\w\\-\\.]+:reference-data\\-\\-UnitOfMeasure:[\\w\\-\\.\\:\\%]+:[0-9]*$"
}
}
},
"ReservoirAirBrineAngle": {
"type": "object",
"properties": {
"Value": {
"type": "number"
},
"UnitOfMeasure": {
"type": "string",
"pattern": "^[\\w\\-\\.]+:reference-data\\-\\-UnitOfMeasure:[\\w\\-\\.\\:\\%]+:[0-9]*$"
}
}
},
"LabAirOilAngle": {
"type": "object",
"properties": {
"Value": {
"type": "number"
},
"UnitOfMeasure": {
"type": "string",
"pattern": "^[\\w\\-\\.]+:reference-data\\-\\-UnitOfMeasure:[\\w\\-\\.\\:\\%]+:[0-9]*$"
}
}
},
"ReservoirAirOilAngle": {
"type": "object",
"properties": {
"Value": {
"type": "number"
},
"UnitOfMeasure": {
"type": "string",
"pattern": "^[\\w\\-\\.]+:reference-data\\-\\-UnitOfMeasure:[\\w\\-\\.\\:\\%]+:[0-9]*$"
}
}
},
"LabOilBrineAngle": {
"type": "object",
"properties": {
"Value": {
"type": "number"
},
"UnitOfMeasure": {
"type": "string",
"pattern": "^[\\w\\-\\.]+:reference-data\\-\\-UnitOfMeasure:[\\w\\-\\.\\:\\%]+:[0-9]*$"
}
}
},
"ReservoirOilBrineAngle": {
"type": "object",
"properties": {
"Value": {
"type": "number"
},
"UnitOfMeasure": {
"type": "string",
"pattern": "^[\\w\\-\\.]+:reference-data\\-\\-UnitOfMeasure:[\\w\\-\\.\\:\\%]+:[0-9]*$"
}
}
},
"LabAirMercuryAngle": {
"type": "object",
"properties": {
"Value": {
"type": "number"
},
"UnitOfMeasure": {
"type": "string",
"pattern": "^[\\w\\-\\.]+:reference-data\\-\\-UnitOfMeasure:[\\w\\-\\.\\:\\%]+:[0-9]*$"
}
}
},
"ReservoirAirMercuryAngle": {
"type": "object",
"properties": {
"Value": {
"type": "number"
},
"UnitOfMeasure": {
"type": "string",
"pattern": "^[\\w\\-\\.]+:reference-data\\-\\-UnitOfMeasure:[\\w\\-\\.\\:\\%]+:[0-9]*$"
}
}
}
}
}
},
"InjectionTestSteps": {
"type": "array",
"items": {
"type": "object",
"properties": {
"StepNumber": {
"type": "string"
},
"MercurySaturationFraction": {
"type": "object",
"properties": {
"Value": {
"type": "number"
},
"UnitOfMeasure": {
"type": "string",
"pattern": "^[\\w\\-\\.]+:reference-data\\-\\-UnitOfMeasure:[\\w\\-\\.\\:\\%]+:[0-9]*$"
}
}
},
"EquivalentSaturationFraction": {
"type": "object",
"properties": {
"Value": {
"type": "number"
},
"UnitOfMeasure": {
"type": "string",
"pattern": "^[\\w\\-\\.]+:reference-data\\-\\-UnitOfMeasure:[\\w\\-\\.\\:\\%]+:[0-9]*$"
}
}
},
"PoreThroatRadius": {
"type": "object",
"properties": {
"Value": {
"type": "number"
},
"UnitOfMeasure": {
"type": "string",
"pattern": "^[\\w\\-\\.]+:reference-data\\-\\-UnitOfMeasure:[\\w\\-\\.\\:\\%]+:[0-9]*$"
}
}
},
"NormalizedPoreSizeDistributionFunction": {
"type": "number"
},
"OnBottomPressure": {
"type": "object",
"properties": {
"Value": {
"type": "number"
},
"UnitOfMeasure": {
"type": "string",
"pattern": "^[\\w\\-\\.]+:reference-data\\-\\-UnitOfMeasure:[\\w\\-\\.\\:\\%]+:[0-9]*$"
}
}
},
"GasBubblePressure": {
"type": "object",
"properties": {
"Value": {
"type": "number"
},
"UnitOfMeasure": {
"type": "string",
"pattern": "^[\\w\\-\\.]+:reference-data\\-\\-UnitOfMeasure:[\\w\\-\\.\\:\\%]+:[0-9]*$"
}
}
},
"AnnulusBorePressure": {
"type": "object",
"properties": {
"Value": {
"type": "number"
},
"UnitOfMeasure": {
"type": "string",
"pattern": "^[\\w\\-\\.]+:reference-data\\-\\-UnitOfMeasure:[\\w\\-\\.\\:\\%]+:[0-9]*$"
}
}
},
"HeightAboveFreeWater": {
"type": "object",
"properties": {
"Value": {
"type": "number"
},
"UnitOfMeasure": {
"type": "string",
"pattern": "^[\\w\\-\\.]+:reference-data\\-\\-UnitOfMeasure:[\\w\\-\\.\\:\\%]+:[0-9]*$"
}
}
},
"NormalizedPermeabilityDistributionFunction": {
"type": "number"
},
"jFunction": {
"type": "number"
}
}
}
}
},
"required": [
"SamplesAnalysisID"
]
}
Edited by Mykhailo Buriak