Implement CRUD endpoints to manage Tensile Strength Analysis endpoints

Implement POST/api/rafs-ddms/TensileStrength/{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 TensileStrength
  • Validation cases should be covered with appropriate status codes
  • Request & response structure should correspond to populated JSON

Implement GET/api/rafs-ddms/TensileStrength/{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 TensileStrength using new endpoint
  • Successful response (200 status code) should retrieve all existing TensileStrength 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

Build schema and register based on the following example:

Schema Example
"data": [
    {
        "SampleID": "^[\\w\\-\\.]+:master-data\\-\\-Sample:26Hb",
        "Unit": "Example Unit 4",
        "PeakForce": {
            "Value": 28.01,
            "UnitOfMeasure": "opendes:reference-data--UnitOfMeasure:lbf"
        },
        "TensileStrength": [
            {
                "Value": 22.08,
                "Type": "opendes:reference-data--TensileStrengthMethod:ASTM",
                "UnitOfMeasure": "opendes:reference-data--UnitOfMeasure:psi"
            },
            {
                "Value": 26.70,
                "Type": "opendes:reference-data--TensileStrengthMethod:YongYu",
                "UnitOfMeasure": "opendes:reference-data--UnitOfMeasure:psi"
            }
        ]
    },
    {
        "SampleID": "^[\\w\\-\\.]+:master-data\\-\\-Sample:59Hb",
        "TVD": {
            "Value": 5413.57,
            "UnitOfMeasure": "opendes:reference-data--UnitOfMeasure:m"
        },
        "Unit": "Example Unit 4",
        "PeakForce": {
            "Value": 27.10,
            "UnitOfMeasure": "opendes:reference-data--UnitOfMeasure:lbf"
        },
        "TensileStrength": [
            {
                "Value": 22.74,
                "Type": "opendes:reference-data--TensileStrengthMethod:ASTM",
                "UnitOfMeasure": "opendes:reference-data--UnitOfMeasure:psi"
            },
            {
                "Value": 27.19,
                "Type": "opendes:reference-data--TensileStrengthMethod:YongYu",
                "UnitOfMeasure": "opendes:reference-data--UnitOfMeasure:psi"
            }
        ]
    }
]

}

Reference Value List Draft for TensileStrengthMethod: TensileStrengthMethod.json

Edited Sep 28, 2023 by Michael Jones
Assignee Loading
Time tracking Loading