Validation for whole schema
Summary
As highlighted in preship testing for M15 issue - osdu/platform/pre-shipping#405 (comment 190480), user is able to pass in non-master data ("id": "{{data_partition_id}}:work-product-component--WellLog:{{NewWellLogUWI}}"
) into the MasterData
field and ingestion runs successfully without throwing error.
Steps:
curl --location --request POST 'https://r3m15.preshiptesting.osdu.aws/api/workflow/v1/workflow/Osdu_ingest/workflowRun'
Response
{
"runId": "{{$guid}}",
"executionContext": {
"acl": {
"owners": [
"{{New_OwnerDataGroup}}@{{data_partition_id}}{{domain}}"
],
"viewers": [
"{{New_ViewerDataGroup}}@{{data_partition_id}}{{domain}}"
]
},
"legal": {
"legaltags": [
"{{tagName}}"
],
"otherRelevantDataCountries": [
"US"
]
},
"Payload": {
"AppKey": "test-app",
"data-partition-id": "{{data_partition_id}}"
},
"manifest": {
"kind": "{{authority}}:{{schemaSource}}:Manifest:1.0.0",
"MasterData": [
{
"id": "{{data_partition_id}}:master-data--Organisation:Auto_Test_{{NewWellLogUWI}}",
"kind": "{{authority}}:{{schemaSource}}:master-data--Organisation:1.0.0",
"acl": {
"owners": [
"{{New_OwnerDataGroup}}@{{data_partition_id}}{{domain}}"
],
"viewers": [
"{{New_ViewerDataGroup}}@{{data_partition_id}}{{domain}}"
]
},
"legal": {
"legaltags": [
"{{tagName}}"
],
"otherRelevantDataCountries": [
"US"
]
},
"data": {
"Source": "AUTO test",
"OrganisationName": "Auto_Test_{{NewWellLogUWI}}"
}
},
{
"id": "{{data_partition_id}}:work-product-component--WellLog:{{NewWellLogUWI}}",
"kind": "{{authority}}:{{schemaSource}}:work-product-component--WellLog:1.0.0",
"acl": {
"owners": [
"{{New_OwnerDataGroup}}@{{data_partition_id}}{{domain}}"
],
"viewers": [
"{{New_ViewerDataGroup}}@{{data_partition_id}}{{domain}}"
]
},
"legal": {
"legaltags": [
"{{tagName}}"
],
"otherRelevantDataCountries": [
"US"
]
},
"data": {
"Source": "AUTO test NL_TNO",
"SpatialLocation": {
"Wgs84Coordinates": {
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
3.51906683,
55.68101428
]
},
"properties": {}
}
]
}
},
"FacilityID": "FaciltyIdAutoTest_{{NewWellLogUWI}}",
"FacilityTypeID": "{{FacilityTypeRecordID}}:",
"FacilityOperator": [
{
"FacilityOperatorID": "FacilityOperatorIdAutoTest_{{NewWellLogUWI}}",
"FacilityOperatorOrganisationID": "{{data_partition_id}}:master-data--Organisation:Auto_Test_{{NewWellLogUWI}}:"
}
],
"FacilityName": "FacilityNameAutoTest_{{NewWellLogUWI}}",
"FacilityNameAlias": [
{
"AliasName": "Alias_Auto_Test_{{NewWellLogUWI}}",
"AliasNameTypeID": "{{AliasNameTypeRecordID}}:"
}
],
"FacilityEvent": [
{
"FacilityEventTypeID": "{{FacilityEventTypeSpudDateRecordID}}:",
"EffectiveDateTime": "1999-06-03T00:00:00"
}
],
"VerticalMeasurements": [
{
"VerticalMeasurementID": "Kelly Bushing",
"VerticalMeasurement": 36.6,
"VerticalMeasurementPathID": "{{VerticalMeasPathRecordID}}:"
}
],
"NameAliases": [],
"GeoContexts": []
}
}
]
}
}
}
Expected Behavior:
Ingestion workflow should throw a validation error because "id": "{{data_partition_id}}:work-product-component--WellLog:{{NewWellLogUWI}}"
belongs to the work product component and should be in the Data
field.
Observed Behavior:
Ingestion runs successfully and no error is shown