Schema Validation Failed - Storage Service
Data ingestion through Storage PUT service
does not validate schema, kind & attributes.
As in below request able to ingest "TestAttribute": "Test-Sami"
attribute/value which is not defined in Contract type reference data - WKS schema.
Storage PUT Request
curl --location --request PUT 'https://osdu-ship.msft-osdu-test.org/api/storage/v2/records' \
--header 'Content-Type: application/json' \
--header 'data-partition-id: opendes' \
--header 'Authorization: Bearer eyJ0eXAiOiJKV1Qi ' \
--data-raw '[
{
"id": "opendes:reference-data--ContractorType:test-sami01",
"kind": "osdu:wks:reference-data--ContractorType:1.0.0",
"acl": {
"owners": [
"data.default.owners@opendes.contoso.com"
],
"viewers": [
"data.default.viewers@opendes.contoso.com"
]
},
"legal": {
"legaltags": [
"opendes-public-usa-dataset-7643990"
],
"otherRelevantDataCountries": [
"US"
]
},
"data": {
"Name2": "Well",
"ID2": "Well",
"Code2": "Well",
"Source2": "Workbook Published/FacilityTypeType.1.0.0.xlsx; commit SHA 0b4db59a.",
"TestAttribute" : "Test-Sami"
}
}
]'
Storage GET Request
{
"data": {
"Name2": "Well",
"ID2": "Well",
"Code2": "Well",
"Source2": "Workbook Published/FacilityTypeType.1.0.0.xlsx; commit SHA 0b4db59a.",
"TestAttribute": "Test-Sami"
},
"meta": null,
"id": "opendes:reference-data--ContractorType:test-sami01",
"version": 1658769507968280,
"kind": "osdu:wks:reference-data--ContractorType:1.0.0",
"acl": {
"viewers": [
"data.default.viewers@opendes.contoso.com"
],
"owners": [
"data.default.owners@opendes.contoso.com"
]
},
"legal": {
"legaltags": [
"opendes-public-usa-dataset-7643990"
],
"otherRelevantDataCountries": [
"US"
],
"status": "compliant"
},
"createUser": "preshipping@azureglobal1.onmicrosoft.com",
"createTime": "2022-07-05T17:06:37.282Z",
"modifyUser": "preshipping@azureglobal1.onmicrosoft.com",
"modifyTime": "2022-07-25T17:18:28.992Z"
}
Also, able to ingest and fetch data through Storage Service without creating schema osdu:wks:reference-data--ContractorTypeTestSami:1.0.0
in OSDU system as noticed below :
Storage PUT Request
curl --location --request PUT 'https://osdu-ship.msft-osdu-test.org/api/storage/v2/records' \
--header 'Content-Type: application/json' \
--header 'data-partition-id: opendes' \
--header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSU ' \
--data-raw '[
{
"id": "opendes:reference-data--ContractorTypeTestSami:test-sami01",
"kind": "osdu:wks:reference-data--ContractorTypeTestSami:1.0.0",
"acl": {
"owners": [
"data.default.owners@opendes.contoso.com"
],
"viewers": [
"data.default.viewers@opendes.contoso.com"
]
},
"legal": {
"legaltags": [
"opendes-public-usa-dataset-7643990"
],
"otherRelevantDataCountries": [
"US"
]
},
"data": {
"Name2": "Well",
"ID2": "Well",
"Code2": "Well",
"Source2": "Workbook Published/FacilityTypeType.1.0.0.xlsx; commit SHA 0b4db59a.",
"TestAttribute" : "Test-Sami"
}
}
]'
Storage GET Request
{
"data": {
"Name2": "Well",
"ID2": "Well",
"Code2": "Well",
"Source2": "Workbook Published/FacilityTypeType.1.0.0.xlsx; commit SHA 0b4db59a.",
"TestAttribute": "Test-Sami"
},
"meta": null,
"id": "opendes:reference-data--ContractorTypeTestSami:test-sami01",
"version": 1658770548926014,
"kind": "osdu:wks:reference-data--ContractorTypeTestSami:1.0.0",
"acl": {
"viewers": [
"data.default.viewers@opendes.contoso.com"
],
"owners": [
"data.default.owners@opendes.contoso.com"
]
},
"legal": {
"legaltags": [
"opendes-public-usa-dataset-7643990"
],
"otherRelevantDataCountries": [
"US"
],
"status": "compliant"
},
"createUser": "preshipping@azureglobal1.onmicrosoft.com",
"createTime": "2022-07-25T17:35:49.251Z"
}