From 142df81dbafc45511e4ee26920d2d0d84a422bc2 Mon Sep 17 00:00:00 2001 From: AArora3 Date: Wed, 30 Mar 2022 13:06:35 +0530 Subject: [PATCH 01/15] fixed empty authority,source,entityType validation --- .../schema/constants/SchemaConstants.java | 1 + .../osdu/schema/model/SchemaIdentity.java | 5 + .../osdu/schema/api/SchemaControllerTest.java | 57 ++ ...hemaService_POST_SchemaValidations.feature | 12 + .../inputPayloadWithEmptyAuthority.json | 544 ++++++++++++++++++ .../inputPayloadWithEmptyEntity.json | 544 ++++++++++++++++++ .../inputPayloadWithEmptySource.json | 544 ++++++++++++++++++ .../EmptyAuthorityPayload.json | 13 + .../output_payloads/EmptyEntityPayload.json | 13 + .../output_payloads/EmptySourcePayload.json | 13 + 10 files changed, 1746 insertions(+) create mode 100644 testing/schema-test-core/src/test/resources/input_payloads/inputPayloadWithEmptyAuthority.json create mode 100644 testing/schema-test-core/src/test/resources/input_payloads/inputPayloadWithEmptyEntity.json create mode 100644 testing/schema-test-core/src/test/resources/input_payloads/inputPayloadWithEmptySource.json create mode 100644 testing/schema-test-core/src/test/resources/output_payloads/EmptyAuthorityPayload.json create mode 100644 testing/schema-test-core/src/test/resources/output_payloads/EmptyEntityPayload.json create mode 100644 testing/schema-test-core/src/test/resources/output_payloads/EmptySourcePayload.json diff --git a/schema-core/src/main/java/org/opengroup/osdu/schema/constants/SchemaConstants.java b/schema-core/src/main/java/org/opengroup/osdu/schema/constants/SchemaConstants.java index eaaac410..38af6fb5 100644 --- a/schema-core/src/main/java/org/opengroup/osdu/schema/constants/SchemaConstants.java +++ b/schema-core/src/main/java/org/opengroup/osdu/schema/constants/SchemaConstants.java @@ -21,6 +21,7 @@ public class SchemaConstants { public static final String SCHEMA_KIND_DELIMITER = ":"; public static final String SCHEMA_Version_DELIMITER = "."; public static final String SCHEMA_KIND_REGEX="^([^.:\\r\\n\\s]+):([^.:\\r\\n\\s]+):([^.:\\r\\n\\s]+):(([\\d]+)[.]([\\d]+)[.]([\\d]+))$"; + public static final String SCHEMA_EMPTY_REGEX = "^(?!\\s*$).+"; // schema public static final String SCHEMA_KIND = "schema"; diff --git a/schema-core/src/main/java/org/opengroup/osdu/schema/model/SchemaIdentity.java b/schema-core/src/main/java/org/opengroup/osdu/schema/model/SchemaIdentity.java index ada15fa5..b2b2424d 100644 --- a/schema-core/src/main/java/org/opengroup/osdu/schema/model/SchemaIdentity.java +++ b/schema-core/src/main/java/org/opengroup/osdu/schema/model/SchemaIdentity.java @@ -1,11 +1,13 @@ package org.opengroup.osdu.schema.model; import javax.validation.constraints.NotNull; +import javax.validation.constraints.Pattern; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; +import org.opengroup.osdu.schema.constants.SchemaConstants; @Data @Builder @@ -14,12 +16,15 @@ import lombok.NoArgsConstructor; public class SchemaIdentity { @NotNull(message = "authority must not be null") + @Pattern(regexp = SchemaConstants.SCHEMA_EMPTY_REGEX, message = "authority must not be empty") private String authority; @NotNull(message = "source must not be null") + @Pattern(regexp = SchemaConstants.SCHEMA_EMPTY_REGEX, message = "source must not be empty") private String source; @NotNull(message = "entityType must not be null") + @Pattern(regexp = SchemaConstants.SCHEMA_EMPTY_REGEX, message = "entityType must not be empty") private String entityType; @NotNull(message = "schemaVersionMajor must not be null") diff --git a/schema-core/src/test/java/org/opengroup/osdu/schema/api/SchemaControllerTest.java b/schema-core/src/test/java/org/opengroup/osdu/schema/api/SchemaControllerTest.java index f294e84b..75b6e4c8 100644 --- a/schema-core/src/test/java/org/opengroup/osdu/schema/api/SchemaControllerTest.java +++ b/schema-core/src/test/java/org/opengroup/osdu/schema/api/SchemaControllerTest.java @@ -79,6 +79,30 @@ public class SchemaControllerTest { schemaController.upsertSchema(schemaRequest); } + @Test(expected = BadRequestException.class) + public void testCreateEmptyAuthoritySchema_Failed() throws ApplicationException, BadRequestException { + schemaRequest = getSchemaRequestEmptyAuthority(); + + when(schemaService.createSchema(schemaRequest)).thenThrow(BadRequestException.class); + assertNotNull(schemaController.createSchema(schemaRequest)); + } + + @Test(expected = BadRequestException.class) + public void testCreateEmptyEntitySchema_Failed() throws ApplicationException, BadRequestException { + schemaRequest = getSchemaRequestEmptySource(); + + when(schemaService.createSchema(schemaRequest)).thenThrow(BadRequestException.class); + assertNotNull(schemaController.createSchema(schemaRequest)); + } + + @Test(expected = BadRequestException.class) + public void testCreateEmptySourceSchema_Failed() throws ApplicationException, BadRequestException { + schemaRequest = getSchemaRequestEmptyEntity(); + + when(schemaService.createSchema(schemaRequest)).thenThrow(BadRequestException.class); + assertNotNull(schemaController.createSchema(schemaRequest)); + } + @Test public void testGetSchemaInfoList() throws ApplicationException, NotFoundException, BadRequestException { schemaRequest = getSchemaRequestObject(); @@ -121,4 +145,37 @@ public class SchemaControllerTest { .schemaVersionMajor(1L).schemaVersionMinor(1L).source("wks").build()) .build(); } + + private SchemaRequest getSchemaRequestEmptyAuthority() { + return SchemaRequest.builder().schema(null).schemaInfo(SchemaInfo.builder().createdBy("creator") + .dateCreated(new Date(System.currentTimeMillis())) + .schemaIdentity(SchemaIdentity.builder().authority("").entityType("well").id("..wks.well.1.1") + .schemaVersionMajor(1L).schemaVersionMinor(1L).source("wks").build()) + .scope(SchemaScope.INTERNAL).status(SchemaStatus.DEVELOPMENT) + .supersededBy(SchemaIdentity.builder().authority("").entityType("well").id("..wks.well.1.4") + .schemaVersionMajor(1L).schemaVersionMinor(1L).source("wks").build()) + .build()).build(); + } + + private SchemaRequest getSchemaRequestEmptyEntity() { + return SchemaRequest.builder().schema(null).schemaInfo(SchemaInfo.builder().createdBy("creator") + .dateCreated(new Date(System.currentTimeMillis())) + .schemaIdentity(SchemaIdentity.builder().authority("os").entityType("").id("os..well.1.1") + .schemaVersionMajor(1L).schemaVersionMinor(1L).source("well").build()) + .scope(SchemaScope.INTERNAL).status(SchemaStatus.DEVELOPMENT) + .supersededBy(SchemaIdentity.builder().authority("os").entityType("").id("os..well.1.4") + .schemaVersionMajor(1L).schemaVersionMinor(1L).source("well").build()) + .build()).build(); + } + + private SchemaRequest getSchemaRequestEmptySource() { + return SchemaRequest.builder().schema(null).schemaInfo(SchemaInfo.builder().createdBy("creator") + .dateCreated(new Date(System.currentTimeMillis())) + .schemaIdentity(SchemaIdentity.builder().authority("os").entityType("well").id("os.well.1.1") + .schemaVersionMajor(1L).schemaVersionMinor(1L).source("").build()) + .scope(SchemaScope.INTERNAL).status(SchemaStatus.DEVELOPMENT) + .supersededBy(SchemaIdentity.builder().authority("os").entityType("well").id("os.well.1.4") + .schemaVersionMajor(1L).schemaVersionMinor(1L).source("").build()) + .build()).build(); + } } \ No newline at end of file diff --git a/testing/schema-test-core/src/test/resources/features/IntegrationTest_SchemaService_POST_SchemaValidations.feature b/testing/schema-test-core/src/test/resources/features/IntegrationTest_SchemaService_POST_SchemaValidations.feature index 38a79554..4b2c074a 100644 --- a/testing/schema-test-core/src/test/resources/features/IntegrationTest_SchemaService_POST_SchemaValidations.feature +++ b/testing/schema-test-core/src/test/resources/features/IntegrationTest_SchemaService_POST_SchemaValidations.feature @@ -562,3 +562,15 @@ Feature: To verify schema validation functionality of POST schema Service Examples: | RefBaseInputPayload | InputPayloadWithChanges | tenant | ReponseStatusCode | ResponseMessage1 | ReponseStatusCode1 | ResponseMessage | | "/input_payloads/RefBaseSchema_New.json" | "/input_payloads/RefBaseSchema_EntityNameChanged_MinorVersion.json" | "TENANT1" | "400" | "/output_payloads/SchemaPost_PrivateScope_SuccessfulCreation.json" | "201" | "/output_payloads/SchemaPost_MinorBreakingChangeError.json" | + + @SchemaService + Scenario Outline: Verify that Schema Service's POST API responds as bad request for empty value of authority, source and entity + When I hit schema service POST API with and data-partition-id as + Then service should respond back with error and + + Examples: + | InputPayload | ReponseStatusCode | ResponseMessage | tenant | + | "/input_payloads/inputPayloadWithEmptyAuthority.json" | "400" | "/output_payloads/EmptyAuthorityPayload.json" | "TENANT1" | + | "/input_payloads/inputPayloadWithEmptyEntity.json" | "400" | "/output_payloads/EmptyEntityPayload.json" | "TENANT1" | + | "/input_payloads/inputPayloadWithEmptySource.json" | "400" | "/output_payloads/EmptySourcePayload.json" | "TENANT1" | + diff --git a/testing/schema-test-core/src/test/resources/input_payloads/inputPayloadWithEmptyAuthority.json b/testing/schema-test-core/src/test/resources/input_payloads/inputPayloadWithEmptyAuthority.json new file mode 100644 index 00000000..a4477210 --- /dev/null +++ b/testing/schema-test-core/src/test/resources/input_payloads/inputPayloadWithEmptyAuthority.json @@ -0,0 +1,544 @@ +{ + "schemaInfo": { + "schemaIdentity": { + "authority": "", + "source": "testSource1", + "entityType": "testEntity1", + "schemaVersionMajor": 1, + "schemaVersionMinor": 1, + "schemaVersionPatch": 0, + "id": ":testSource1:testEntity1:1.1.0" + }, + "status": "DEVELOPMENT" + }, + "schema": { + "$schema": "http://json-schema.org/draft-07/schema#", + "description": "The entity well.", + "title": "Well", + "type": "object", + "x-slb-lifecycle-state": "published", + "definitions": { + "FeatureCollection": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "GeoJSON FeatureCollection", + "type": "object", + "required": [ + "type", + "features" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "FeatureCollection" + ] + }, + "features": { + "type": "array", + "items": { + "title": "GeoJSON Feature", + "type": "object", + "required": [ + "type", + "properties", + "geometry" + ], + "properties": { + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "geometry": { + "oneOf": [ + { + "type": "null" + }, + { + "title": "GeoJSON Point", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "coordinates": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + }, + "type": { + "type": "string", + "enum": [ + "Point" + ] + } + } + }, + { + "title": "GeoJSON LineString", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "coordinates": { + "minItems": 2, + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + }, + "type": { + "type": "string", + "enum": [ + "LineString" + ] + } + } + }, + { + "title": "GeoJSON Polygon", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "coordinates": { + "type": "array", + "items": { + "minItems": 4, + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + } + }, + "type": { + "type": "string", + "enum": [ + "Polygon" + ] + } + } + }, + { + "title": "GeoJSON MultiPoint", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "coordinates": { + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + }, + "type": { + "type": "string", + "enum": [ + "MultiPoint" + ] + } + } + }, + { + "title": "GeoJSON MultiLineString", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "coordinates": { + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + } + }, + "type": { + "type": "string", + "enum": [ + "MultiLineString" + ] + } + } + }, + { + "title": "GeoJSON MultiPolygon", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "coordinates": { + "type": "array", + "items": { + "type": "array", + "items": { + "minItems": 4, + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + } + } + }, + "type": { + "type": "string", + "enum": [ + "MultiPolygon" + ] + } + } + }, + { + "title": "GeoJSON GeometryCollection", + "type": "object", + "required": [ + "type", + "geometries" + ], + "properties": { + "geometries": { + "type": "array", + "items": { + "oneOf": [ + { + "title": "GeoJSON Point", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "coordinates": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + }, + "type": { + "type": "string", + "enum": [ + "Point" + ] + } + } + }, + { + "title": "GeoJSON LineString", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "coordinates": { + "minItems": 2, + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + }, + "type": { + "type": "string", + "enum": [ + "LineString" + ] + } + } + }, + { + "title": "GeoJSON Polygon", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "coordinates": { + "type": "array", + "items": { + "minItems": 4, + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + } + }, + "type": { + "type": "string", + "enum": [ + "Polygon" + ] + } + } + }, + { + "title": "GeoJSON MultiPoint", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "coordinates": { + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + }, + "type": { + "type": "string", + "enum": [ + "MultiPoint" + ] + } + } + }, + { + "title": "GeoJSON MultiLineString", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "coordinates": { + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + } + }, + "type": { + "type": "string", + "enum": [ + "MultiLineString" + ] + } + } + }, + { + "title": "GeoJSON MultiPolygon", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "coordinates": { + "type": "array", + "items": { + "type": "array", + "items": { + "minItems": 4, + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + } + } + }, + "type": { + "type": "string", + "enum": [ + "MultiPolygon" + ] + } + } + } + ] + } + }, + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "type": { + "type": "string", + "enum": [ + "GeometryCollection" + ] + } + } + } + ] + }, + "type": { + "type": "string", + "enum": [ + "Feature" + ] + }, + "properties": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object" + } + ] + } + } + } + }, + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + } + }, + "$id": "https://geojson.org/schema/FeatureCollection.json" + } + } + } +} \ No newline at end of file diff --git a/testing/schema-test-core/src/test/resources/input_payloads/inputPayloadWithEmptyEntity.json b/testing/schema-test-core/src/test/resources/input_payloads/inputPayloadWithEmptyEntity.json new file mode 100644 index 00000000..a3e09801 --- /dev/null +++ b/testing/schema-test-core/src/test/resources/input_payloads/inputPayloadWithEmptyEntity.json @@ -0,0 +1,544 @@ +{ + "schemaInfo": { + "schemaIdentity": { + "authority": "testAuthority2", + "source": "testSource2", + "entityType": "", + "schemaVersionMajor": 1, + "schemaVersionMinor": 1, + "schemaVersionPatch": 0, + "id": "testAuthority2:testSource2::1.1.0" + }, + "status": "DEVELOPMENT" + }, + "schema": { + "$schema": "http://json-schema.org/draft-07/schema#", + "description": "The entity well.", + "title": "Well", + "type": "object", + "x-slb-lifecycle-state": "published", + "definitions": { + "FeatureCollection": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "GeoJSON FeatureCollection", + "type": "object", + "required": [ + "type", + "features" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "FeatureCollection" + ] + }, + "features": { + "type": "array", + "items": { + "title": "GeoJSON Feature", + "type": "object", + "required": [ + "type", + "properties", + "geometry" + ], + "properties": { + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "geometry": { + "oneOf": [ + { + "type": "null" + }, + { + "title": "GeoJSON Point", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "coordinates": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + }, + "type": { + "type": "string", + "enum": [ + "Point" + ] + } + } + }, + { + "title": "GeoJSON LineString", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "coordinates": { + "minItems": 2, + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + }, + "type": { + "type": "string", + "enum": [ + "LineString" + ] + } + } + }, + { + "title": "GeoJSON Polygon", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "coordinates": { + "type": "array", + "items": { + "minItems": 4, + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + } + }, + "type": { + "type": "string", + "enum": [ + "Polygon" + ] + } + } + }, + { + "title": "GeoJSON MultiPoint", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "coordinates": { + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + }, + "type": { + "type": "string", + "enum": [ + "MultiPoint" + ] + } + } + }, + { + "title": "GeoJSON MultiLineString", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "coordinates": { + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + } + }, + "type": { + "type": "string", + "enum": [ + "MultiLineString" + ] + } + } + }, + { + "title": "GeoJSON MultiPolygon", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "coordinates": { + "type": "array", + "items": { + "type": "array", + "items": { + "minItems": 4, + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + } + } + }, + "type": { + "type": "string", + "enum": [ + "MultiPolygon" + ] + } + } + }, + { + "title": "GeoJSON GeometryCollection", + "type": "object", + "required": [ + "type", + "geometries" + ], + "properties": { + "geometries": { + "type": "array", + "items": { + "oneOf": [ + { + "title": "GeoJSON Point", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "coordinates": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + }, + "type": { + "type": "string", + "enum": [ + "Point" + ] + } + } + }, + { + "title": "GeoJSON LineString", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "coordinates": { + "minItems": 2, + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + }, + "type": { + "type": "string", + "enum": [ + "LineString" + ] + } + } + }, + { + "title": "GeoJSON Polygon", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "coordinates": { + "type": "array", + "items": { + "minItems": 4, + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + } + }, + "type": { + "type": "string", + "enum": [ + "Polygon" + ] + } + } + }, + { + "title": "GeoJSON MultiPoint", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "coordinates": { + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + }, + "type": { + "type": "string", + "enum": [ + "MultiPoint" + ] + } + } + }, + { + "title": "GeoJSON MultiLineString", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "coordinates": { + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + } + }, + "type": { + "type": "string", + "enum": [ + "MultiLineString" + ] + } + } + }, + { + "title": "GeoJSON MultiPolygon", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "coordinates": { + "type": "array", + "items": { + "type": "array", + "items": { + "minItems": 4, + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + } + } + }, + "type": { + "type": "string", + "enum": [ + "MultiPolygon" + ] + } + } + } + ] + } + }, + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "type": { + "type": "string", + "enum": [ + "GeometryCollection" + ] + } + } + } + ] + }, + "type": { + "type": "string", + "enum": [ + "Feature" + ] + }, + "properties": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object" + } + ] + } + } + } + }, + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + } + }, + "$id": "https://geojson.org/schema/FeatureCollection.json" + } + } + } +} \ No newline at end of file diff --git a/testing/schema-test-core/src/test/resources/input_payloads/inputPayloadWithEmptySource.json b/testing/schema-test-core/src/test/resources/input_payloads/inputPayloadWithEmptySource.json new file mode 100644 index 00000000..efc97539 --- /dev/null +++ b/testing/schema-test-core/src/test/resources/input_payloads/inputPayloadWithEmptySource.json @@ -0,0 +1,544 @@ +{ + "schemaInfo": { + "schemaIdentity": { + "authority": "testAuthority3", + "source": "", + "entityType": "testEntity3", + "schemaVersionMajor": 1, + "schemaVersionMinor": 1, + "schemaVersionPatch": 0, + "id": "testAuthority3::testEntity3:1.1.0" + }, + "status": "DEVELOPMENT" + }, + "schema": { + "$schema": "http://json-schema.org/draft-07/schema#", + "description": "The entity well.", + "title": "Well", + "type": "object", + "x-slb-lifecycle-state": "published", + "definitions": { + "FeatureCollection": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "GeoJSON FeatureCollection", + "type": "object", + "required": [ + "type", + "features" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "FeatureCollection" + ] + }, + "features": { + "type": "array", + "items": { + "title": "GeoJSON Feature", + "type": "object", + "required": [ + "type", + "properties", + "geometry" + ], + "properties": { + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "geometry": { + "oneOf": [ + { + "type": "null" + }, + { + "title": "GeoJSON Point", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "coordinates": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + }, + "type": { + "type": "string", + "enum": [ + "Point" + ] + } + } + }, + { + "title": "GeoJSON LineString", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "coordinates": { + "minItems": 2, + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + }, + "type": { + "type": "string", + "enum": [ + "LineString" + ] + } + } + }, + { + "title": "GeoJSON Polygon", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "coordinates": { + "type": "array", + "items": { + "minItems": 4, + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + } + }, + "type": { + "type": "string", + "enum": [ + "Polygon" + ] + } + } + }, + { + "title": "GeoJSON MultiPoint", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "coordinates": { + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + }, + "type": { + "type": "string", + "enum": [ + "MultiPoint" + ] + } + } + }, + { + "title": "GeoJSON MultiLineString", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "coordinates": { + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + } + }, + "type": { + "type": "string", + "enum": [ + "MultiLineString" + ] + } + } + }, + { + "title": "GeoJSON MultiPolygon", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "coordinates": { + "type": "array", + "items": { + "type": "array", + "items": { + "minItems": 4, + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + } + } + }, + "type": { + "type": "string", + "enum": [ + "MultiPolygon" + ] + } + } + }, + { + "title": "GeoJSON GeometryCollection", + "type": "object", + "required": [ + "type", + "geometries" + ], + "properties": { + "geometries": { + "type": "array", + "items": { + "oneOf": [ + { + "title": "GeoJSON Point", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "coordinates": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + }, + "type": { + "type": "string", + "enum": [ + "Point" + ] + } + } + }, + { + "title": "GeoJSON LineString", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "coordinates": { + "minItems": 2, + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + }, + "type": { + "type": "string", + "enum": [ + "LineString" + ] + } + } + }, + { + "title": "GeoJSON Polygon", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "coordinates": { + "type": "array", + "items": { + "minItems": 4, + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + } + }, + "type": { + "type": "string", + "enum": [ + "Polygon" + ] + } + } + }, + { + "title": "GeoJSON MultiPoint", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "coordinates": { + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + }, + "type": { + "type": "string", + "enum": [ + "MultiPoint" + ] + } + } + }, + { + "title": "GeoJSON MultiLineString", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "coordinates": { + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + } + }, + "type": { + "type": "string", + "enum": [ + "MultiLineString" + ] + } + } + }, + { + "title": "GeoJSON MultiPolygon", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "coordinates": { + "type": "array", + "items": { + "type": "array", + "items": { + "minItems": 4, + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + } + } + }, + "type": { + "type": "string", + "enum": [ + "MultiPolygon" + ] + } + } + } + ] + } + }, + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "type": { + "type": "string", + "enum": [ + "GeometryCollection" + ] + } + } + } + ] + }, + "type": { + "type": "string", + "enum": [ + "Feature" + ] + }, + "properties": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object" + } + ] + } + } + } + }, + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + } + }, + "$id": "https://geojson.org/schema/FeatureCollection.json" + } + } + } +} \ No newline at end of file diff --git a/testing/schema-test-core/src/test/resources/output_payloads/EmptyAuthorityPayload.json b/testing/schema-test-core/src/test/resources/output_payloads/EmptyAuthorityPayload.json new file mode 100644 index 00000000..15bfd759 --- /dev/null +++ b/testing/schema-test-core/src/test/resources/output_payloads/EmptyAuthorityPayload.json @@ -0,0 +1,13 @@ +{ + "error": { + "code": 400, + "message": "Validation Error", + "errors": [ + { + "domain": "global", + "reason": "badRequest", + "message": "authority must not be empty" + } + ] + } +} \ No newline at end of file diff --git a/testing/schema-test-core/src/test/resources/output_payloads/EmptyEntityPayload.json b/testing/schema-test-core/src/test/resources/output_payloads/EmptyEntityPayload.json new file mode 100644 index 00000000..a41b1f3a --- /dev/null +++ b/testing/schema-test-core/src/test/resources/output_payloads/EmptyEntityPayload.json @@ -0,0 +1,13 @@ +{ + "error": { + "code": 400, + "message": "Validation Error", + "errors": [ + { + "domain": "global", + "reason": "badRequest", + "message": "entityType must not be empty" + } + ] + } +} \ No newline at end of file diff --git a/testing/schema-test-core/src/test/resources/output_payloads/EmptySourcePayload.json b/testing/schema-test-core/src/test/resources/output_payloads/EmptySourcePayload.json new file mode 100644 index 00000000..851ab58c --- /dev/null +++ b/testing/schema-test-core/src/test/resources/output_payloads/EmptySourcePayload.json @@ -0,0 +1,13 @@ +{ + "error": { + "code": 400, + "message": "Validation Error", + "errors": [ + { + "domain": "global", + "reason": "badRequest", + "message": "source must not be empty" + } + ] + } +} \ No newline at end of file -- GitLab From 5cf118542b60023fc2b72c32104b0bdfd2d12e2a Mon Sep 17 00:00:00 2001 From: AArora3 Date: Thu, 31 Mar 2022 15:00:08 +0530 Subject: [PATCH 02/15] fixed comments --- .../schema/constants/SchemaConstants.java | 2 +- .../osdu/schema/model/SchemaIdentity.java | 6 +- .../osdu/schema/api/SchemaControllerTest.java | 76 +++ .../inputPayloadWithEmptyAuthority.json | 534 +----------------- .../inputPayloadWithEmptyEntity.json | 528 +---------------- .../inputPayloadWithEmptySource.json | 534 +----------------- .../EmptyAuthorityPayload.json | 2 +- .../output_payloads/EmptyEntityPayload.json | 2 +- .../output_payloads/EmptySourcePayload.json | 2 +- 9 files changed, 92 insertions(+), 1594 deletions(-) diff --git a/schema-core/src/main/java/org/opengroup/osdu/schema/constants/SchemaConstants.java b/schema-core/src/main/java/org/opengroup/osdu/schema/constants/SchemaConstants.java index 38af6fb5..c4622126 100644 --- a/schema-core/src/main/java/org/opengroup/osdu/schema/constants/SchemaConstants.java +++ b/schema-core/src/main/java/org/opengroup/osdu/schema/constants/SchemaConstants.java @@ -21,7 +21,7 @@ public class SchemaConstants { public static final String SCHEMA_KIND_DELIMITER = ":"; public static final String SCHEMA_Version_DELIMITER = "."; public static final String SCHEMA_KIND_REGEX="^([^.:\\r\\n\\s]+):([^.:\\r\\n\\s]+):([^.:\\r\\n\\s]+):(([\\d]+)[.]([\\d]+)[.]([\\d]+))$"; - public static final String SCHEMA_EMPTY_REGEX = "^(?!\\s*$).+"; + public static final String SCHEMA_EMPTY_REGEX = "^[\\w\\-\\.]+$"; // schema public static final String SCHEMA_KIND = "schema"; diff --git a/schema-core/src/main/java/org/opengroup/osdu/schema/model/SchemaIdentity.java b/schema-core/src/main/java/org/opengroup/osdu/schema/model/SchemaIdentity.java index b2b2424d..5809f68b 100644 --- a/schema-core/src/main/java/org/opengroup/osdu/schema/model/SchemaIdentity.java +++ b/schema-core/src/main/java/org/opengroup/osdu/schema/model/SchemaIdentity.java @@ -16,15 +16,15 @@ import org.opengroup.osdu.schema.constants.SchemaConstants; public class SchemaIdentity { @NotNull(message = "authority must not be null") - @Pattern(regexp = SchemaConstants.SCHEMA_EMPTY_REGEX, message = "authority must not be empty") + @Pattern(regexp = SchemaConstants.SCHEMA_EMPTY_REGEX, message = "authority must not contain whitespaces and special characters except - and .") private String authority; @NotNull(message = "source must not be null") - @Pattern(regexp = SchemaConstants.SCHEMA_EMPTY_REGEX, message = "source must not be empty") + @Pattern(regexp = SchemaConstants.SCHEMA_EMPTY_REGEX, message = "source must not contain whitespaces and special characters except - and .") private String source; @NotNull(message = "entityType must not be null") - @Pattern(regexp = SchemaConstants.SCHEMA_EMPTY_REGEX, message = "entityType must not be empty") + @Pattern(regexp = SchemaConstants.SCHEMA_EMPTY_REGEX, message = "entityType must not contain whitespaces and special characters except - and .") private String entityType; @NotNull(message = "schemaVersionMajor must not be null") diff --git a/schema-core/src/test/java/org/opengroup/osdu/schema/api/SchemaControllerTest.java b/schema-core/src/test/java/org/opengroup/osdu/schema/api/SchemaControllerTest.java index 75b6e4c8..8b2eff8a 100644 --- a/schema-core/src/test/java/org/opengroup/osdu/schema/api/SchemaControllerTest.java +++ b/schema-core/src/test/java/org/opengroup/osdu/schema/api/SchemaControllerTest.java @@ -103,6 +103,38 @@ public class SchemaControllerTest { assertNotNull(schemaController.createSchema(schemaRequest)); } + @Test(expected = BadRequestException.class) + public void testCreateAuthoritySchemaSpecialCharacters_Failed() throws ApplicationException, BadRequestException { + schemaRequest = getSchemaRequestSpecialCharactersAuthority(); + + when(schemaService.createSchema(schemaRequest)).thenThrow(BadRequestException.class); + assertNotNull(schemaController.createSchema(schemaRequest)); + } + + @Test(expected = BadRequestException.class) + public void testCreateSourceSchemaSpecialCharacters_Failed() throws ApplicationException, BadRequestException { + schemaRequest = getSchemaRequestSpecialCharactersSource(); + + when(schemaService.createSchema(schemaRequest)).thenThrow(BadRequestException.class); + assertNotNull(schemaController.createSchema(schemaRequest)); + } + + @Test(expected = BadRequestException.class) + public void testCreateEntitySchemaSpecialCharacters_Failed() throws ApplicationException, BadRequestException { + schemaRequest = getSchemaRequestSpecialCharactersEntity(); + + when(schemaService.createSchema(schemaRequest)).thenThrow(BadRequestException.class); + assertNotNull(schemaController.createSchema(schemaRequest)); + } + + @Test(expected = BadRequestException.class) + public void testCreateAuthorityMultipleSpaces_Failed() throws ApplicationException, BadRequestException { + schemaRequest = getSchemaRequestMultipleSpacesAuthority(); + + when(schemaService.createSchema(schemaRequest)).thenThrow(BadRequestException.class); + assertNotNull(schemaController.createSchema(schemaRequest)); + } + @Test public void testGetSchemaInfoList() throws ApplicationException, NotFoundException, BadRequestException { schemaRequest = getSchemaRequestObject(); @@ -178,4 +210,48 @@ public class SchemaControllerTest { .schemaVersionMajor(1L).schemaVersionMinor(1L).source("").build()) .build()).build(); } + + private SchemaRequest getSchemaRequestSpecialCharactersAuthority() { + return SchemaRequest.builder().schema(null).schemaInfo(SchemaInfo.builder().createdBy("creator") + .dateCreated(new Date(System.currentTimeMillis())) + .schemaIdentity(SchemaIdentity.builder().authority(" :").entityType("well").id(" :.well.1.1") + .schemaVersionMajor(1L).schemaVersionMinor(1L).source("").build()) + .scope(SchemaScope.INTERNAL).status(SchemaStatus.DEVELOPMENT) + .supersededBy(SchemaIdentity.builder().authority(" :").entityType("well").id(" :.well.1.4") + .schemaVersionMajor(1L).schemaVersionMinor(1L).source("").build()) + .build()).build(); + } + + private SchemaRequest getSchemaRequestSpecialCharactersSource() { + return SchemaRequest.builder().schema(null).schemaInfo(SchemaInfo.builder().createdBy("creator") + .dateCreated(new Date(System.currentTimeMillis())) + .schemaIdentity(SchemaIdentity.builder().authority("os").entityType("well").id("os. :.1.1") + .schemaVersionMajor(1L).schemaVersionMinor(1L).source(" :").build()) + .scope(SchemaScope.INTERNAL).status(SchemaStatus.DEVELOPMENT) + .supersededBy(SchemaIdentity.builder().authority("os").entityType("well").id("os. :.1.4") + .schemaVersionMajor(1L).schemaVersionMinor(1L).source(" :").build()) + .build()).build(); + } + + private SchemaRequest getSchemaRequestSpecialCharactersEntity() { + return SchemaRequest.builder().schema(null).schemaInfo(SchemaInfo.builder().createdBy("creator") + .dateCreated(new Date(System.currentTimeMillis())) + .schemaIdentity(SchemaIdentity.builder().authority("os").entityType(" :").id("os.source. :.1.1") + .schemaVersionMajor(1L).schemaVersionMinor(1L).source("source").build()) + .scope(SchemaScope.INTERNAL).status(SchemaStatus.DEVELOPMENT) + .supersededBy(SchemaIdentity.builder().authority("os").entityType(" :").id("os.source. :.1.4") + .schemaVersionMajor(1L).schemaVersionMinor(1L).source("source").build()) + .build()).build(); + } + + private SchemaRequest getSchemaRequestMultipleSpacesAuthority() { + return SchemaRequest.builder().schema(null).schemaInfo(SchemaInfo.builder().createdBy("creator") + .dateCreated(new Date(System.currentTimeMillis())) + .schemaIdentity(SchemaIdentity.builder().authority(" ").entityType("well").id(" .source.well.1.1") + .schemaVersionMajor(1L).schemaVersionMinor(1L).source("source").build()) + .scope(SchemaScope.INTERNAL).status(SchemaStatus.DEVELOPMENT) + .supersededBy(SchemaIdentity.builder().authority(" ").entityType("well").id(" .source.well.1.4") + .schemaVersionMajor(1L).schemaVersionMinor(1L).source("source").build()) + .build()).build(); + } } \ No newline at end of file diff --git a/testing/schema-test-core/src/test/resources/input_payloads/inputPayloadWithEmptyAuthority.json b/testing/schema-test-core/src/test/resources/input_payloads/inputPayloadWithEmptyAuthority.json index a4477210..26d86843 100644 --- a/testing/schema-test-core/src/test/resources/input_payloads/inputPayloadWithEmptyAuthority.json +++ b/testing/schema-test-core/src/test/resources/input_payloads/inputPayloadWithEmptyAuthority.json @@ -2,543 +2,17 @@ "schemaInfo": { "schemaIdentity": { "authority": "", - "source": "testSource1", - "entityType": "testEntity1", + "source": "testSource", + "entityType": "testEntity", "schemaVersionMajor": 1, "schemaVersionMinor": 1, "schemaVersionPatch": 0, - "id": ":testSource1:testEntity1:1.1.0" + "id": ":testSource:testEntity:1.1.0" }, "status": "DEVELOPMENT" }, "schema": { "$schema": "http://json-schema.org/draft-07/schema#", - "description": "The entity well.", - "title": "Well", - "type": "object", - "x-slb-lifecycle-state": "published", - "definitions": { - "FeatureCollection": { - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "GeoJSON FeatureCollection", - "type": "object", - "required": [ - "type", - "features" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "FeatureCollection" - ] - }, - "features": { - "type": "array", - "items": { - "title": "GeoJSON Feature", - "type": "object", - "required": [ - "type", - "properties", - "geometry" - ], - "properties": { - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - }, - "geometry": { - "oneOf": [ - { - "type": "null" - }, - { - "title": "GeoJSON Point", - "type": "object", - "required": [ - "type", - "coordinates" - ], - "properties": { - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - }, - "coordinates": { - "minItems": 2, - "type": "array", - "items": { - "type": "number" - } - }, - "type": { - "type": "string", - "enum": [ - "Point" - ] - } - } - }, - { - "title": "GeoJSON LineString", - "type": "object", - "required": [ - "type", - "coordinates" - ], - "properties": { - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - }, - "coordinates": { - "minItems": 2, - "type": "array", - "items": { - "minItems": 2, - "type": "array", - "items": { - "type": "number" - } - } - }, - "type": { - "type": "string", - "enum": [ - "LineString" - ] - } - } - }, - { - "title": "GeoJSON Polygon", - "type": "object", - "required": [ - "type", - "coordinates" - ], - "properties": { - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - }, - "coordinates": { - "type": "array", - "items": { - "minItems": 4, - "type": "array", - "items": { - "minItems": 2, - "type": "array", - "items": { - "type": "number" - } - } - } - }, - "type": { - "type": "string", - "enum": [ - "Polygon" - ] - } - } - }, - { - "title": "GeoJSON MultiPoint", - "type": "object", - "required": [ - "type", - "coordinates" - ], - "properties": { - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - }, - "coordinates": { - "type": "array", - "items": { - "minItems": 2, - "type": "array", - "items": { - "type": "number" - } - } - }, - "type": { - "type": "string", - "enum": [ - "MultiPoint" - ] - } - } - }, - { - "title": "GeoJSON MultiLineString", - "type": "object", - "required": [ - "type", - "coordinates" - ], - "properties": { - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - }, - "coordinates": { - "type": "array", - "items": { - "minItems": 2, - "type": "array", - "items": { - "minItems": 2, - "type": "array", - "items": { - "type": "number" - } - } - } - }, - "type": { - "type": "string", - "enum": [ - "MultiLineString" - ] - } - } - }, - { - "title": "GeoJSON MultiPolygon", - "type": "object", - "required": [ - "type", - "coordinates" - ], - "properties": { - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - }, - "coordinates": { - "type": "array", - "items": { - "type": "array", - "items": { - "minItems": 4, - "type": "array", - "items": { - "minItems": 2, - "type": "array", - "items": { - "type": "number" - } - } - } - } - }, - "type": { - "type": "string", - "enum": [ - "MultiPolygon" - ] - } - } - }, - { - "title": "GeoJSON GeometryCollection", - "type": "object", - "required": [ - "type", - "geometries" - ], - "properties": { - "geometries": { - "type": "array", - "items": { - "oneOf": [ - { - "title": "GeoJSON Point", - "type": "object", - "required": [ - "type", - "coordinates" - ], - "properties": { - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - }, - "coordinates": { - "minItems": 2, - "type": "array", - "items": { - "type": "number" - } - }, - "type": { - "type": "string", - "enum": [ - "Point" - ] - } - } - }, - { - "title": "GeoJSON LineString", - "type": "object", - "required": [ - "type", - "coordinates" - ], - "properties": { - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - }, - "coordinates": { - "minItems": 2, - "type": "array", - "items": { - "minItems": 2, - "type": "array", - "items": { - "type": "number" - } - } - }, - "type": { - "type": "string", - "enum": [ - "LineString" - ] - } - } - }, - { - "title": "GeoJSON Polygon", - "type": "object", - "required": [ - "type", - "coordinates" - ], - "properties": { - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - }, - "coordinates": { - "type": "array", - "items": { - "minItems": 4, - "type": "array", - "items": { - "minItems": 2, - "type": "array", - "items": { - "type": "number" - } - } - } - }, - "type": { - "type": "string", - "enum": [ - "Polygon" - ] - } - } - }, - { - "title": "GeoJSON MultiPoint", - "type": "object", - "required": [ - "type", - "coordinates" - ], - "properties": { - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - }, - "coordinates": { - "type": "array", - "items": { - "minItems": 2, - "type": "array", - "items": { - "type": "number" - } - } - }, - "type": { - "type": "string", - "enum": [ - "MultiPoint" - ] - } - } - }, - { - "title": "GeoJSON MultiLineString", - "type": "object", - "required": [ - "type", - "coordinates" - ], - "properties": { - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - }, - "coordinates": { - "type": "array", - "items": { - "minItems": 2, - "type": "array", - "items": { - "minItems": 2, - "type": "array", - "items": { - "type": "number" - } - } - } - }, - "type": { - "type": "string", - "enum": [ - "MultiLineString" - ] - } - } - }, - { - "title": "GeoJSON MultiPolygon", - "type": "object", - "required": [ - "type", - "coordinates" - ], - "properties": { - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - }, - "coordinates": { - "type": "array", - "items": { - "type": "array", - "items": { - "minItems": 4, - "type": "array", - "items": { - "minItems": 2, - "type": "array", - "items": { - "type": "number" - } - } - } - } - }, - "type": { - "type": "string", - "enum": [ - "MultiPolygon" - ] - } - } - } - ] - } - }, - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - }, - "type": { - "type": "string", - "enum": [ - "GeometryCollection" - ] - } - } - } - ] - }, - "type": { - "type": "string", - "enum": [ - "Feature" - ] - }, - "properties": { - "oneOf": [ - { - "type": "null" - }, - { - "type": "object" - } - ] - } - } - } - }, - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - } - }, - "$id": "https://geojson.org/schema/FeatureCollection.json" - } - } + "description": "The entity well." } } \ No newline at end of file diff --git a/testing/schema-test-core/src/test/resources/input_payloads/inputPayloadWithEmptyEntity.json b/testing/schema-test-core/src/test/resources/input_payloads/inputPayloadWithEmptyEntity.json index a3e09801..f6818a38 100644 --- a/testing/schema-test-core/src/test/resources/input_payloads/inputPayloadWithEmptyEntity.json +++ b/testing/schema-test-core/src/test/resources/input_payloads/inputPayloadWithEmptyEntity.json @@ -13,532 +13,6 @@ }, "schema": { "$schema": "http://json-schema.org/draft-07/schema#", - "description": "The entity well.", - "title": "Well", - "type": "object", - "x-slb-lifecycle-state": "published", - "definitions": { - "FeatureCollection": { - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "GeoJSON FeatureCollection", - "type": "object", - "required": [ - "type", - "features" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "FeatureCollection" - ] - }, - "features": { - "type": "array", - "items": { - "title": "GeoJSON Feature", - "type": "object", - "required": [ - "type", - "properties", - "geometry" - ], - "properties": { - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - }, - "geometry": { - "oneOf": [ - { - "type": "null" - }, - { - "title": "GeoJSON Point", - "type": "object", - "required": [ - "type", - "coordinates" - ], - "properties": { - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - }, - "coordinates": { - "minItems": 2, - "type": "array", - "items": { - "type": "number" - } - }, - "type": { - "type": "string", - "enum": [ - "Point" - ] - } - } - }, - { - "title": "GeoJSON LineString", - "type": "object", - "required": [ - "type", - "coordinates" - ], - "properties": { - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - }, - "coordinates": { - "minItems": 2, - "type": "array", - "items": { - "minItems": 2, - "type": "array", - "items": { - "type": "number" - } - } - }, - "type": { - "type": "string", - "enum": [ - "LineString" - ] - } - } - }, - { - "title": "GeoJSON Polygon", - "type": "object", - "required": [ - "type", - "coordinates" - ], - "properties": { - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - }, - "coordinates": { - "type": "array", - "items": { - "minItems": 4, - "type": "array", - "items": { - "minItems": 2, - "type": "array", - "items": { - "type": "number" - } - } - } - }, - "type": { - "type": "string", - "enum": [ - "Polygon" - ] - } - } - }, - { - "title": "GeoJSON MultiPoint", - "type": "object", - "required": [ - "type", - "coordinates" - ], - "properties": { - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - }, - "coordinates": { - "type": "array", - "items": { - "minItems": 2, - "type": "array", - "items": { - "type": "number" - } - } - }, - "type": { - "type": "string", - "enum": [ - "MultiPoint" - ] - } - } - }, - { - "title": "GeoJSON MultiLineString", - "type": "object", - "required": [ - "type", - "coordinates" - ], - "properties": { - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - }, - "coordinates": { - "type": "array", - "items": { - "minItems": 2, - "type": "array", - "items": { - "minItems": 2, - "type": "array", - "items": { - "type": "number" - } - } - } - }, - "type": { - "type": "string", - "enum": [ - "MultiLineString" - ] - } - } - }, - { - "title": "GeoJSON MultiPolygon", - "type": "object", - "required": [ - "type", - "coordinates" - ], - "properties": { - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - }, - "coordinates": { - "type": "array", - "items": { - "type": "array", - "items": { - "minItems": 4, - "type": "array", - "items": { - "minItems": 2, - "type": "array", - "items": { - "type": "number" - } - } - } - } - }, - "type": { - "type": "string", - "enum": [ - "MultiPolygon" - ] - } - } - }, - { - "title": "GeoJSON GeometryCollection", - "type": "object", - "required": [ - "type", - "geometries" - ], - "properties": { - "geometries": { - "type": "array", - "items": { - "oneOf": [ - { - "title": "GeoJSON Point", - "type": "object", - "required": [ - "type", - "coordinates" - ], - "properties": { - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - }, - "coordinates": { - "minItems": 2, - "type": "array", - "items": { - "type": "number" - } - }, - "type": { - "type": "string", - "enum": [ - "Point" - ] - } - } - }, - { - "title": "GeoJSON LineString", - "type": "object", - "required": [ - "type", - "coordinates" - ], - "properties": { - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - }, - "coordinates": { - "minItems": 2, - "type": "array", - "items": { - "minItems": 2, - "type": "array", - "items": { - "type": "number" - } - } - }, - "type": { - "type": "string", - "enum": [ - "LineString" - ] - } - } - }, - { - "title": "GeoJSON Polygon", - "type": "object", - "required": [ - "type", - "coordinates" - ], - "properties": { - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - }, - "coordinates": { - "type": "array", - "items": { - "minItems": 4, - "type": "array", - "items": { - "minItems": 2, - "type": "array", - "items": { - "type": "number" - } - } - } - }, - "type": { - "type": "string", - "enum": [ - "Polygon" - ] - } - } - }, - { - "title": "GeoJSON MultiPoint", - "type": "object", - "required": [ - "type", - "coordinates" - ], - "properties": { - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - }, - "coordinates": { - "type": "array", - "items": { - "minItems": 2, - "type": "array", - "items": { - "type": "number" - } - } - }, - "type": { - "type": "string", - "enum": [ - "MultiPoint" - ] - } - } - }, - { - "title": "GeoJSON MultiLineString", - "type": "object", - "required": [ - "type", - "coordinates" - ], - "properties": { - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - }, - "coordinates": { - "type": "array", - "items": { - "minItems": 2, - "type": "array", - "items": { - "minItems": 2, - "type": "array", - "items": { - "type": "number" - } - } - } - }, - "type": { - "type": "string", - "enum": [ - "MultiLineString" - ] - } - } - }, - { - "title": "GeoJSON MultiPolygon", - "type": "object", - "required": [ - "type", - "coordinates" - ], - "properties": { - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - }, - "coordinates": { - "type": "array", - "items": { - "type": "array", - "items": { - "minItems": 4, - "type": "array", - "items": { - "minItems": 2, - "type": "array", - "items": { - "type": "number" - } - } - } - } - }, - "type": { - "type": "string", - "enum": [ - "MultiPolygon" - ] - } - } - } - ] - } - }, - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - }, - "type": { - "type": "string", - "enum": [ - "GeometryCollection" - ] - } - } - } - ] - }, - "type": { - "type": "string", - "enum": [ - "Feature" - ] - }, - "properties": { - "oneOf": [ - { - "type": "null" - }, - { - "type": "object" - } - ] - } - } - } - }, - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - } - }, - "$id": "https://geojson.org/schema/FeatureCollection.json" - } - } + "description": "The entity well." } } \ No newline at end of file diff --git a/testing/schema-test-core/src/test/resources/input_payloads/inputPayloadWithEmptySource.json b/testing/schema-test-core/src/test/resources/input_payloads/inputPayloadWithEmptySource.json index efc97539..39c25196 100644 --- a/testing/schema-test-core/src/test/resources/input_payloads/inputPayloadWithEmptySource.json +++ b/testing/schema-test-core/src/test/resources/input_payloads/inputPayloadWithEmptySource.json @@ -1,544 +1,18 @@ { "schemaInfo": { "schemaIdentity": { - "authority": "testAuthority3", + "authority": "testAuthority2", "source": "", - "entityType": "testEntity3", + "entityType": "testEntity", "schemaVersionMajor": 1, "schemaVersionMinor": 1, "schemaVersionPatch": 0, - "id": "testAuthority3::testEntity3:1.1.0" + "id": "testAuthority2::testEntity:1.1.0" }, "status": "DEVELOPMENT" }, "schema": { "$schema": "http://json-schema.org/draft-07/schema#", - "description": "The entity well.", - "title": "Well", - "type": "object", - "x-slb-lifecycle-state": "published", - "definitions": { - "FeatureCollection": { - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "GeoJSON FeatureCollection", - "type": "object", - "required": [ - "type", - "features" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "FeatureCollection" - ] - }, - "features": { - "type": "array", - "items": { - "title": "GeoJSON Feature", - "type": "object", - "required": [ - "type", - "properties", - "geometry" - ], - "properties": { - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - }, - "geometry": { - "oneOf": [ - { - "type": "null" - }, - { - "title": "GeoJSON Point", - "type": "object", - "required": [ - "type", - "coordinates" - ], - "properties": { - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - }, - "coordinates": { - "minItems": 2, - "type": "array", - "items": { - "type": "number" - } - }, - "type": { - "type": "string", - "enum": [ - "Point" - ] - } - } - }, - { - "title": "GeoJSON LineString", - "type": "object", - "required": [ - "type", - "coordinates" - ], - "properties": { - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - }, - "coordinates": { - "minItems": 2, - "type": "array", - "items": { - "minItems": 2, - "type": "array", - "items": { - "type": "number" - } - } - }, - "type": { - "type": "string", - "enum": [ - "LineString" - ] - } - } - }, - { - "title": "GeoJSON Polygon", - "type": "object", - "required": [ - "type", - "coordinates" - ], - "properties": { - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - }, - "coordinates": { - "type": "array", - "items": { - "minItems": 4, - "type": "array", - "items": { - "minItems": 2, - "type": "array", - "items": { - "type": "number" - } - } - } - }, - "type": { - "type": "string", - "enum": [ - "Polygon" - ] - } - } - }, - { - "title": "GeoJSON MultiPoint", - "type": "object", - "required": [ - "type", - "coordinates" - ], - "properties": { - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - }, - "coordinates": { - "type": "array", - "items": { - "minItems": 2, - "type": "array", - "items": { - "type": "number" - } - } - }, - "type": { - "type": "string", - "enum": [ - "MultiPoint" - ] - } - } - }, - { - "title": "GeoJSON MultiLineString", - "type": "object", - "required": [ - "type", - "coordinates" - ], - "properties": { - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - }, - "coordinates": { - "type": "array", - "items": { - "minItems": 2, - "type": "array", - "items": { - "minItems": 2, - "type": "array", - "items": { - "type": "number" - } - } - } - }, - "type": { - "type": "string", - "enum": [ - "MultiLineString" - ] - } - } - }, - { - "title": "GeoJSON MultiPolygon", - "type": "object", - "required": [ - "type", - "coordinates" - ], - "properties": { - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - }, - "coordinates": { - "type": "array", - "items": { - "type": "array", - "items": { - "minItems": 4, - "type": "array", - "items": { - "minItems": 2, - "type": "array", - "items": { - "type": "number" - } - } - } - } - }, - "type": { - "type": "string", - "enum": [ - "MultiPolygon" - ] - } - } - }, - { - "title": "GeoJSON GeometryCollection", - "type": "object", - "required": [ - "type", - "geometries" - ], - "properties": { - "geometries": { - "type": "array", - "items": { - "oneOf": [ - { - "title": "GeoJSON Point", - "type": "object", - "required": [ - "type", - "coordinates" - ], - "properties": { - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - }, - "coordinates": { - "minItems": 2, - "type": "array", - "items": { - "type": "number" - } - }, - "type": { - "type": "string", - "enum": [ - "Point" - ] - } - } - }, - { - "title": "GeoJSON LineString", - "type": "object", - "required": [ - "type", - "coordinates" - ], - "properties": { - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - }, - "coordinates": { - "minItems": 2, - "type": "array", - "items": { - "minItems": 2, - "type": "array", - "items": { - "type": "number" - } - } - }, - "type": { - "type": "string", - "enum": [ - "LineString" - ] - } - } - }, - { - "title": "GeoJSON Polygon", - "type": "object", - "required": [ - "type", - "coordinates" - ], - "properties": { - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - }, - "coordinates": { - "type": "array", - "items": { - "minItems": 4, - "type": "array", - "items": { - "minItems": 2, - "type": "array", - "items": { - "type": "number" - } - } - } - }, - "type": { - "type": "string", - "enum": [ - "Polygon" - ] - } - } - }, - { - "title": "GeoJSON MultiPoint", - "type": "object", - "required": [ - "type", - "coordinates" - ], - "properties": { - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - }, - "coordinates": { - "type": "array", - "items": { - "minItems": 2, - "type": "array", - "items": { - "type": "number" - } - } - }, - "type": { - "type": "string", - "enum": [ - "MultiPoint" - ] - } - } - }, - { - "title": "GeoJSON MultiLineString", - "type": "object", - "required": [ - "type", - "coordinates" - ], - "properties": { - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - }, - "coordinates": { - "type": "array", - "items": { - "minItems": 2, - "type": "array", - "items": { - "minItems": 2, - "type": "array", - "items": { - "type": "number" - } - } - } - }, - "type": { - "type": "string", - "enum": [ - "MultiLineString" - ] - } - } - }, - { - "title": "GeoJSON MultiPolygon", - "type": "object", - "required": [ - "type", - "coordinates" - ], - "properties": { - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - }, - "coordinates": { - "type": "array", - "items": { - "type": "array", - "items": { - "minItems": 4, - "type": "array", - "items": { - "minItems": 2, - "type": "array", - "items": { - "type": "number" - } - } - } - } - }, - "type": { - "type": "string", - "enum": [ - "MultiPolygon" - ] - } - } - } - ] - } - }, - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - }, - "type": { - "type": "string", - "enum": [ - "GeometryCollection" - ] - } - } - } - ] - }, - "type": { - "type": "string", - "enum": [ - "Feature" - ] - }, - "properties": { - "oneOf": [ - { - "type": "null" - }, - { - "type": "object" - } - ] - } - } - } - }, - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - } - }, - "$id": "https://geojson.org/schema/FeatureCollection.json" - } - } + "description": "The entity well." } } \ No newline at end of file diff --git a/testing/schema-test-core/src/test/resources/output_payloads/EmptyAuthorityPayload.json b/testing/schema-test-core/src/test/resources/output_payloads/EmptyAuthorityPayload.json index 15bfd759..edf582f0 100644 --- a/testing/schema-test-core/src/test/resources/output_payloads/EmptyAuthorityPayload.json +++ b/testing/schema-test-core/src/test/resources/output_payloads/EmptyAuthorityPayload.json @@ -6,7 +6,7 @@ { "domain": "global", "reason": "badRequest", - "message": "authority must not be empty" + "message": "authority must not contain whitespaces and special characters except - and ." } ] } diff --git a/testing/schema-test-core/src/test/resources/output_payloads/EmptyEntityPayload.json b/testing/schema-test-core/src/test/resources/output_payloads/EmptyEntityPayload.json index a41b1f3a..db799f3c 100644 --- a/testing/schema-test-core/src/test/resources/output_payloads/EmptyEntityPayload.json +++ b/testing/schema-test-core/src/test/resources/output_payloads/EmptyEntityPayload.json @@ -6,7 +6,7 @@ { "domain": "global", "reason": "badRequest", - "message": "entityType must not be empty" + "message": "entityType must not contain whitespaces and special characters except - and ." } ] } diff --git a/testing/schema-test-core/src/test/resources/output_payloads/EmptySourcePayload.json b/testing/schema-test-core/src/test/resources/output_payloads/EmptySourcePayload.json index 851ab58c..87f40ade 100644 --- a/testing/schema-test-core/src/test/resources/output_payloads/EmptySourcePayload.json +++ b/testing/schema-test-core/src/test/resources/output_payloads/EmptySourcePayload.json @@ -6,7 +6,7 @@ { "domain": "global", "reason": "badRequest", - "message": "source must not be empty" + "message": "source must not contain whitespaces and special characters except - and ." } ] } -- GitLab From e2d1c8555f79c9f333f80d8dbf0920defe24c3e6 Mon Sep 17 00:00:00 2001 From: AArora3 Date: Wed, 30 Mar 2022 13:06:35 +0530 Subject: [PATCH 03/15] fixed empty authority,source,entityType validation --- .../schema/constants/SchemaConstants.java | 1 + .../osdu/schema/model/SchemaIdentity.java | 5 + .../osdu/schema/api/SchemaControllerTest.java | 57 ++ ...hemaService_POST_SchemaValidations.feature | 12 + .../inputPayloadWithEmptyAuthority.json | 544 ++++++++++++++++++ .../inputPayloadWithEmptyEntity.json | 544 ++++++++++++++++++ .../inputPayloadWithEmptySource.json | 544 ++++++++++++++++++ .../EmptyAuthorityPayload.json | 13 + .../output_payloads/EmptyEntityPayload.json | 13 + .../output_payloads/EmptySourcePayload.json | 13 + 10 files changed, 1746 insertions(+) create mode 100644 testing/schema-test-core/src/test/resources/input_payloads/inputPayloadWithEmptyAuthority.json create mode 100644 testing/schema-test-core/src/test/resources/input_payloads/inputPayloadWithEmptyEntity.json create mode 100644 testing/schema-test-core/src/test/resources/input_payloads/inputPayloadWithEmptySource.json create mode 100644 testing/schema-test-core/src/test/resources/output_payloads/EmptyAuthorityPayload.json create mode 100644 testing/schema-test-core/src/test/resources/output_payloads/EmptyEntityPayload.json create mode 100644 testing/schema-test-core/src/test/resources/output_payloads/EmptySourcePayload.json diff --git a/schema-core/src/main/java/org/opengroup/osdu/schema/constants/SchemaConstants.java b/schema-core/src/main/java/org/opengroup/osdu/schema/constants/SchemaConstants.java index eaaac410..38af6fb5 100644 --- a/schema-core/src/main/java/org/opengroup/osdu/schema/constants/SchemaConstants.java +++ b/schema-core/src/main/java/org/opengroup/osdu/schema/constants/SchemaConstants.java @@ -21,6 +21,7 @@ public class SchemaConstants { public static final String SCHEMA_KIND_DELIMITER = ":"; public static final String SCHEMA_Version_DELIMITER = "."; public static final String SCHEMA_KIND_REGEX="^([^.:\\r\\n\\s]+):([^.:\\r\\n\\s]+):([^.:\\r\\n\\s]+):(([\\d]+)[.]([\\d]+)[.]([\\d]+))$"; + public static final String SCHEMA_EMPTY_REGEX = "^(?!\\s*$).+"; // schema public static final String SCHEMA_KIND = "schema"; diff --git a/schema-core/src/main/java/org/opengroup/osdu/schema/model/SchemaIdentity.java b/schema-core/src/main/java/org/opengroup/osdu/schema/model/SchemaIdentity.java index ada15fa5..b2b2424d 100644 --- a/schema-core/src/main/java/org/opengroup/osdu/schema/model/SchemaIdentity.java +++ b/schema-core/src/main/java/org/opengroup/osdu/schema/model/SchemaIdentity.java @@ -1,11 +1,13 @@ package org.opengroup.osdu.schema.model; import javax.validation.constraints.NotNull; +import javax.validation.constraints.Pattern; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; +import org.opengroup.osdu.schema.constants.SchemaConstants; @Data @Builder @@ -14,12 +16,15 @@ import lombok.NoArgsConstructor; public class SchemaIdentity { @NotNull(message = "authority must not be null") + @Pattern(regexp = SchemaConstants.SCHEMA_EMPTY_REGEX, message = "authority must not be empty") private String authority; @NotNull(message = "source must not be null") + @Pattern(regexp = SchemaConstants.SCHEMA_EMPTY_REGEX, message = "source must not be empty") private String source; @NotNull(message = "entityType must not be null") + @Pattern(regexp = SchemaConstants.SCHEMA_EMPTY_REGEX, message = "entityType must not be empty") private String entityType; @NotNull(message = "schemaVersionMajor must not be null") diff --git a/schema-core/src/test/java/org/opengroup/osdu/schema/api/SchemaControllerTest.java b/schema-core/src/test/java/org/opengroup/osdu/schema/api/SchemaControllerTest.java index f294e84b..75b6e4c8 100644 --- a/schema-core/src/test/java/org/opengroup/osdu/schema/api/SchemaControllerTest.java +++ b/schema-core/src/test/java/org/opengroup/osdu/schema/api/SchemaControllerTest.java @@ -79,6 +79,30 @@ public class SchemaControllerTest { schemaController.upsertSchema(schemaRequest); } + @Test(expected = BadRequestException.class) + public void testCreateEmptyAuthoritySchema_Failed() throws ApplicationException, BadRequestException { + schemaRequest = getSchemaRequestEmptyAuthority(); + + when(schemaService.createSchema(schemaRequest)).thenThrow(BadRequestException.class); + assertNotNull(schemaController.createSchema(schemaRequest)); + } + + @Test(expected = BadRequestException.class) + public void testCreateEmptyEntitySchema_Failed() throws ApplicationException, BadRequestException { + schemaRequest = getSchemaRequestEmptySource(); + + when(schemaService.createSchema(schemaRequest)).thenThrow(BadRequestException.class); + assertNotNull(schemaController.createSchema(schemaRequest)); + } + + @Test(expected = BadRequestException.class) + public void testCreateEmptySourceSchema_Failed() throws ApplicationException, BadRequestException { + schemaRequest = getSchemaRequestEmptyEntity(); + + when(schemaService.createSchema(schemaRequest)).thenThrow(BadRequestException.class); + assertNotNull(schemaController.createSchema(schemaRequest)); + } + @Test public void testGetSchemaInfoList() throws ApplicationException, NotFoundException, BadRequestException { schemaRequest = getSchemaRequestObject(); @@ -121,4 +145,37 @@ public class SchemaControllerTest { .schemaVersionMajor(1L).schemaVersionMinor(1L).source("wks").build()) .build(); } + + private SchemaRequest getSchemaRequestEmptyAuthority() { + return SchemaRequest.builder().schema(null).schemaInfo(SchemaInfo.builder().createdBy("creator") + .dateCreated(new Date(System.currentTimeMillis())) + .schemaIdentity(SchemaIdentity.builder().authority("").entityType("well").id("..wks.well.1.1") + .schemaVersionMajor(1L).schemaVersionMinor(1L).source("wks").build()) + .scope(SchemaScope.INTERNAL).status(SchemaStatus.DEVELOPMENT) + .supersededBy(SchemaIdentity.builder().authority("").entityType("well").id("..wks.well.1.4") + .schemaVersionMajor(1L).schemaVersionMinor(1L).source("wks").build()) + .build()).build(); + } + + private SchemaRequest getSchemaRequestEmptyEntity() { + return SchemaRequest.builder().schema(null).schemaInfo(SchemaInfo.builder().createdBy("creator") + .dateCreated(new Date(System.currentTimeMillis())) + .schemaIdentity(SchemaIdentity.builder().authority("os").entityType("").id("os..well.1.1") + .schemaVersionMajor(1L).schemaVersionMinor(1L).source("well").build()) + .scope(SchemaScope.INTERNAL).status(SchemaStatus.DEVELOPMENT) + .supersededBy(SchemaIdentity.builder().authority("os").entityType("").id("os..well.1.4") + .schemaVersionMajor(1L).schemaVersionMinor(1L).source("well").build()) + .build()).build(); + } + + private SchemaRequest getSchemaRequestEmptySource() { + return SchemaRequest.builder().schema(null).schemaInfo(SchemaInfo.builder().createdBy("creator") + .dateCreated(new Date(System.currentTimeMillis())) + .schemaIdentity(SchemaIdentity.builder().authority("os").entityType("well").id("os.well.1.1") + .schemaVersionMajor(1L).schemaVersionMinor(1L).source("").build()) + .scope(SchemaScope.INTERNAL).status(SchemaStatus.DEVELOPMENT) + .supersededBy(SchemaIdentity.builder().authority("os").entityType("well").id("os.well.1.4") + .schemaVersionMajor(1L).schemaVersionMinor(1L).source("").build()) + .build()).build(); + } } \ No newline at end of file diff --git a/testing/schema-test-core/src/test/resources/features/IntegrationTest_SchemaService_POST_SchemaValidations.feature b/testing/schema-test-core/src/test/resources/features/IntegrationTest_SchemaService_POST_SchemaValidations.feature index 38a79554..4b2c074a 100644 --- a/testing/schema-test-core/src/test/resources/features/IntegrationTest_SchemaService_POST_SchemaValidations.feature +++ b/testing/schema-test-core/src/test/resources/features/IntegrationTest_SchemaService_POST_SchemaValidations.feature @@ -562,3 +562,15 @@ Feature: To verify schema validation functionality of POST schema Service Examples: | RefBaseInputPayload | InputPayloadWithChanges | tenant | ReponseStatusCode | ResponseMessage1 | ReponseStatusCode1 | ResponseMessage | | "/input_payloads/RefBaseSchema_New.json" | "/input_payloads/RefBaseSchema_EntityNameChanged_MinorVersion.json" | "TENANT1" | "400" | "/output_payloads/SchemaPost_PrivateScope_SuccessfulCreation.json" | "201" | "/output_payloads/SchemaPost_MinorBreakingChangeError.json" | + + @SchemaService + Scenario Outline: Verify that Schema Service's POST API responds as bad request for empty value of authority, source and entity + When I hit schema service POST API with and data-partition-id as + Then service should respond back with error and + + Examples: + | InputPayload | ReponseStatusCode | ResponseMessage | tenant | + | "/input_payloads/inputPayloadWithEmptyAuthority.json" | "400" | "/output_payloads/EmptyAuthorityPayload.json" | "TENANT1" | + | "/input_payloads/inputPayloadWithEmptyEntity.json" | "400" | "/output_payloads/EmptyEntityPayload.json" | "TENANT1" | + | "/input_payloads/inputPayloadWithEmptySource.json" | "400" | "/output_payloads/EmptySourcePayload.json" | "TENANT1" | + diff --git a/testing/schema-test-core/src/test/resources/input_payloads/inputPayloadWithEmptyAuthority.json b/testing/schema-test-core/src/test/resources/input_payloads/inputPayloadWithEmptyAuthority.json new file mode 100644 index 00000000..a4477210 --- /dev/null +++ b/testing/schema-test-core/src/test/resources/input_payloads/inputPayloadWithEmptyAuthority.json @@ -0,0 +1,544 @@ +{ + "schemaInfo": { + "schemaIdentity": { + "authority": "", + "source": "testSource1", + "entityType": "testEntity1", + "schemaVersionMajor": 1, + "schemaVersionMinor": 1, + "schemaVersionPatch": 0, + "id": ":testSource1:testEntity1:1.1.0" + }, + "status": "DEVELOPMENT" + }, + "schema": { + "$schema": "http://json-schema.org/draft-07/schema#", + "description": "The entity well.", + "title": "Well", + "type": "object", + "x-slb-lifecycle-state": "published", + "definitions": { + "FeatureCollection": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "GeoJSON FeatureCollection", + "type": "object", + "required": [ + "type", + "features" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "FeatureCollection" + ] + }, + "features": { + "type": "array", + "items": { + "title": "GeoJSON Feature", + "type": "object", + "required": [ + "type", + "properties", + "geometry" + ], + "properties": { + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "geometry": { + "oneOf": [ + { + "type": "null" + }, + { + "title": "GeoJSON Point", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "coordinates": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + }, + "type": { + "type": "string", + "enum": [ + "Point" + ] + } + } + }, + { + "title": "GeoJSON LineString", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "coordinates": { + "minItems": 2, + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + }, + "type": { + "type": "string", + "enum": [ + "LineString" + ] + } + } + }, + { + "title": "GeoJSON Polygon", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "coordinates": { + "type": "array", + "items": { + "minItems": 4, + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + } + }, + "type": { + "type": "string", + "enum": [ + "Polygon" + ] + } + } + }, + { + "title": "GeoJSON MultiPoint", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "coordinates": { + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + }, + "type": { + "type": "string", + "enum": [ + "MultiPoint" + ] + } + } + }, + { + "title": "GeoJSON MultiLineString", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "coordinates": { + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + } + }, + "type": { + "type": "string", + "enum": [ + "MultiLineString" + ] + } + } + }, + { + "title": "GeoJSON MultiPolygon", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "coordinates": { + "type": "array", + "items": { + "type": "array", + "items": { + "minItems": 4, + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + } + } + }, + "type": { + "type": "string", + "enum": [ + "MultiPolygon" + ] + } + } + }, + { + "title": "GeoJSON GeometryCollection", + "type": "object", + "required": [ + "type", + "geometries" + ], + "properties": { + "geometries": { + "type": "array", + "items": { + "oneOf": [ + { + "title": "GeoJSON Point", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "coordinates": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + }, + "type": { + "type": "string", + "enum": [ + "Point" + ] + } + } + }, + { + "title": "GeoJSON LineString", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "coordinates": { + "minItems": 2, + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + }, + "type": { + "type": "string", + "enum": [ + "LineString" + ] + } + } + }, + { + "title": "GeoJSON Polygon", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "coordinates": { + "type": "array", + "items": { + "minItems": 4, + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + } + }, + "type": { + "type": "string", + "enum": [ + "Polygon" + ] + } + } + }, + { + "title": "GeoJSON MultiPoint", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "coordinates": { + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + }, + "type": { + "type": "string", + "enum": [ + "MultiPoint" + ] + } + } + }, + { + "title": "GeoJSON MultiLineString", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "coordinates": { + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + } + }, + "type": { + "type": "string", + "enum": [ + "MultiLineString" + ] + } + } + }, + { + "title": "GeoJSON MultiPolygon", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "coordinates": { + "type": "array", + "items": { + "type": "array", + "items": { + "minItems": 4, + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + } + } + }, + "type": { + "type": "string", + "enum": [ + "MultiPolygon" + ] + } + } + } + ] + } + }, + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "type": { + "type": "string", + "enum": [ + "GeometryCollection" + ] + } + } + } + ] + }, + "type": { + "type": "string", + "enum": [ + "Feature" + ] + }, + "properties": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object" + } + ] + } + } + } + }, + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + } + }, + "$id": "https://geojson.org/schema/FeatureCollection.json" + } + } + } +} \ No newline at end of file diff --git a/testing/schema-test-core/src/test/resources/input_payloads/inputPayloadWithEmptyEntity.json b/testing/schema-test-core/src/test/resources/input_payloads/inputPayloadWithEmptyEntity.json new file mode 100644 index 00000000..a3e09801 --- /dev/null +++ b/testing/schema-test-core/src/test/resources/input_payloads/inputPayloadWithEmptyEntity.json @@ -0,0 +1,544 @@ +{ + "schemaInfo": { + "schemaIdentity": { + "authority": "testAuthority2", + "source": "testSource2", + "entityType": "", + "schemaVersionMajor": 1, + "schemaVersionMinor": 1, + "schemaVersionPatch": 0, + "id": "testAuthority2:testSource2::1.1.0" + }, + "status": "DEVELOPMENT" + }, + "schema": { + "$schema": "http://json-schema.org/draft-07/schema#", + "description": "The entity well.", + "title": "Well", + "type": "object", + "x-slb-lifecycle-state": "published", + "definitions": { + "FeatureCollection": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "GeoJSON FeatureCollection", + "type": "object", + "required": [ + "type", + "features" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "FeatureCollection" + ] + }, + "features": { + "type": "array", + "items": { + "title": "GeoJSON Feature", + "type": "object", + "required": [ + "type", + "properties", + "geometry" + ], + "properties": { + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "geometry": { + "oneOf": [ + { + "type": "null" + }, + { + "title": "GeoJSON Point", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "coordinates": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + }, + "type": { + "type": "string", + "enum": [ + "Point" + ] + } + } + }, + { + "title": "GeoJSON LineString", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "coordinates": { + "minItems": 2, + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + }, + "type": { + "type": "string", + "enum": [ + "LineString" + ] + } + } + }, + { + "title": "GeoJSON Polygon", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "coordinates": { + "type": "array", + "items": { + "minItems": 4, + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + } + }, + "type": { + "type": "string", + "enum": [ + "Polygon" + ] + } + } + }, + { + "title": "GeoJSON MultiPoint", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "coordinates": { + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + }, + "type": { + "type": "string", + "enum": [ + "MultiPoint" + ] + } + } + }, + { + "title": "GeoJSON MultiLineString", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "coordinates": { + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + } + }, + "type": { + "type": "string", + "enum": [ + "MultiLineString" + ] + } + } + }, + { + "title": "GeoJSON MultiPolygon", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "coordinates": { + "type": "array", + "items": { + "type": "array", + "items": { + "minItems": 4, + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + } + } + }, + "type": { + "type": "string", + "enum": [ + "MultiPolygon" + ] + } + } + }, + { + "title": "GeoJSON GeometryCollection", + "type": "object", + "required": [ + "type", + "geometries" + ], + "properties": { + "geometries": { + "type": "array", + "items": { + "oneOf": [ + { + "title": "GeoJSON Point", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "coordinates": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + }, + "type": { + "type": "string", + "enum": [ + "Point" + ] + } + } + }, + { + "title": "GeoJSON LineString", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "coordinates": { + "minItems": 2, + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + }, + "type": { + "type": "string", + "enum": [ + "LineString" + ] + } + } + }, + { + "title": "GeoJSON Polygon", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "coordinates": { + "type": "array", + "items": { + "minItems": 4, + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + } + }, + "type": { + "type": "string", + "enum": [ + "Polygon" + ] + } + } + }, + { + "title": "GeoJSON MultiPoint", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "coordinates": { + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + }, + "type": { + "type": "string", + "enum": [ + "MultiPoint" + ] + } + } + }, + { + "title": "GeoJSON MultiLineString", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "coordinates": { + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + } + }, + "type": { + "type": "string", + "enum": [ + "MultiLineString" + ] + } + } + }, + { + "title": "GeoJSON MultiPolygon", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "coordinates": { + "type": "array", + "items": { + "type": "array", + "items": { + "minItems": 4, + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + } + } + }, + "type": { + "type": "string", + "enum": [ + "MultiPolygon" + ] + } + } + } + ] + } + }, + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "type": { + "type": "string", + "enum": [ + "GeometryCollection" + ] + } + } + } + ] + }, + "type": { + "type": "string", + "enum": [ + "Feature" + ] + }, + "properties": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object" + } + ] + } + } + } + }, + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + } + }, + "$id": "https://geojson.org/schema/FeatureCollection.json" + } + } + } +} \ No newline at end of file diff --git a/testing/schema-test-core/src/test/resources/input_payloads/inputPayloadWithEmptySource.json b/testing/schema-test-core/src/test/resources/input_payloads/inputPayloadWithEmptySource.json new file mode 100644 index 00000000..efc97539 --- /dev/null +++ b/testing/schema-test-core/src/test/resources/input_payloads/inputPayloadWithEmptySource.json @@ -0,0 +1,544 @@ +{ + "schemaInfo": { + "schemaIdentity": { + "authority": "testAuthority3", + "source": "", + "entityType": "testEntity3", + "schemaVersionMajor": 1, + "schemaVersionMinor": 1, + "schemaVersionPatch": 0, + "id": "testAuthority3::testEntity3:1.1.0" + }, + "status": "DEVELOPMENT" + }, + "schema": { + "$schema": "http://json-schema.org/draft-07/schema#", + "description": "The entity well.", + "title": "Well", + "type": "object", + "x-slb-lifecycle-state": "published", + "definitions": { + "FeatureCollection": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "GeoJSON FeatureCollection", + "type": "object", + "required": [ + "type", + "features" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "FeatureCollection" + ] + }, + "features": { + "type": "array", + "items": { + "title": "GeoJSON Feature", + "type": "object", + "required": [ + "type", + "properties", + "geometry" + ], + "properties": { + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "geometry": { + "oneOf": [ + { + "type": "null" + }, + { + "title": "GeoJSON Point", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "coordinates": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + }, + "type": { + "type": "string", + "enum": [ + "Point" + ] + } + } + }, + { + "title": "GeoJSON LineString", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "coordinates": { + "minItems": 2, + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + }, + "type": { + "type": "string", + "enum": [ + "LineString" + ] + } + } + }, + { + "title": "GeoJSON Polygon", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "coordinates": { + "type": "array", + "items": { + "minItems": 4, + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + } + }, + "type": { + "type": "string", + "enum": [ + "Polygon" + ] + } + } + }, + { + "title": "GeoJSON MultiPoint", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "coordinates": { + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + }, + "type": { + "type": "string", + "enum": [ + "MultiPoint" + ] + } + } + }, + { + "title": "GeoJSON MultiLineString", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "coordinates": { + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + } + }, + "type": { + "type": "string", + "enum": [ + "MultiLineString" + ] + } + } + }, + { + "title": "GeoJSON MultiPolygon", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "coordinates": { + "type": "array", + "items": { + "type": "array", + "items": { + "minItems": 4, + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + } + } + }, + "type": { + "type": "string", + "enum": [ + "MultiPolygon" + ] + } + } + }, + { + "title": "GeoJSON GeometryCollection", + "type": "object", + "required": [ + "type", + "geometries" + ], + "properties": { + "geometries": { + "type": "array", + "items": { + "oneOf": [ + { + "title": "GeoJSON Point", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "coordinates": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + }, + "type": { + "type": "string", + "enum": [ + "Point" + ] + } + } + }, + { + "title": "GeoJSON LineString", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "coordinates": { + "minItems": 2, + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + }, + "type": { + "type": "string", + "enum": [ + "LineString" + ] + } + } + }, + { + "title": "GeoJSON Polygon", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "coordinates": { + "type": "array", + "items": { + "minItems": 4, + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + } + }, + "type": { + "type": "string", + "enum": [ + "Polygon" + ] + } + } + }, + { + "title": "GeoJSON MultiPoint", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "coordinates": { + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + }, + "type": { + "type": "string", + "enum": [ + "MultiPoint" + ] + } + } + }, + { + "title": "GeoJSON MultiLineString", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "coordinates": { + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + } + }, + "type": { + "type": "string", + "enum": [ + "MultiLineString" + ] + } + } + }, + { + "title": "GeoJSON MultiPolygon", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "coordinates": { + "type": "array", + "items": { + "type": "array", + "items": { + "minItems": 4, + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + } + } + }, + "type": { + "type": "string", + "enum": [ + "MultiPolygon" + ] + } + } + } + ] + } + }, + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "type": { + "type": "string", + "enum": [ + "GeometryCollection" + ] + } + } + } + ] + }, + "type": { + "type": "string", + "enum": [ + "Feature" + ] + }, + "properties": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object" + } + ] + } + } + } + }, + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + } + }, + "$id": "https://geojson.org/schema/FeatureCollection.json" + } + } + } +} \ No newline at end of file diff --git a/testing/schema-test-core/src/test/resources/output_payloads/EmptyAuthorityPayload.json b/testing/schema-test-core/src/test/resources/output_payloads/EmptyAuthorityPayload.json new file mode 100644 index 00000000..15bfd759 --- /dev/null +++ b/testing/schema-test-core/src/test/resources/output_payloads/EmptyAuthorityPayload.json @@ -0,0 +1,13 @@ +{ + "error": { + "code": 400, + "message": "Validation Error", + "errors": [ + { + "domain": "global", + "reason": "badRequest", + "message": "authority must not be empty" + } + ] + } +} \ No newline at end of file diff --git a/testing/schema-test-core/src/test/resources/output_payloads/EmptyEntityPayload.json b/testing/schema-test-core/src/test/resources/output_payloads/EmptyEntityPayload.json new file mode 100644 index 00000000..a41b1f3a --- /dev/null +++ b/testing/schema-test-core/src/test/resources/output_payloads/EmptyEntityPayload.json @@ -0,0 +1,13 @@ +{ + "error": { + "code": 400, + "message": "Validation Error", + "errors": [ + { + "domain": "global", + "reason": "badRequest", + "message": "entityType must not be empty" + } + ] + } +} \ No newline at end of file diff --git a/testing/schema-test-core/src/test/resources/output_payloads/EmptySourcePayload.json b/testing/schema-test-core/src/test/resources/output_payloads/EmptySourcePayload.json new file mode 100644 index 00000000..851ab58c --- /dev/null +++ b/testing/schema-test-core/src/test/resources/output_payloads/EmptySourcePayload.json @@ -0,0 +1,13 @@ +{ + "error": { + "code": 400, + "message": "Validation Error", + "errors": [ + { + "domain": "global", + "reason": "badRequest", + "message": "source must not be empty" + } + ] + } +} \ No newline at end of file -- GitLab From 5c489598e6cde5554bc2357166069df1c5c9e048 Mon Sep 17 00:00:00 2001 From: AArora3 Date: Thu, 31 Mar 2022 15:00:08 +0530 Subject: [PATCH 04/15] fixed comments --- .../schema/constants/SchemaConstants.java | 2 +- .../osdu/schema/model/SchemaIdentity.java | 6 +- .../osdu/schema/api/SchemaControllerTest.java | 76 +++ .../inputPayloadWithEmptyAuthority.json | 534 +----------------- .../inputPayloadWithEmptyEntity.json | 528 +---------------- .../inputPayloadWithEmptySource.json | 534 +----------------- .../EmptyAuthorityPayload.json | 2 +- .../output_payloads/EmptyEntityPayload.json | 2 +- .../output_payloads/EmptySourcePayload.json | 2 +- 9 files changed, 92 insertions(+), 1594 deletions(-) diff --git a/schema-core/src/main/java/org/opengroup/osdu/schema/constants/SchemaConstants.java b/schema-core/src/main/java/org/opengroup/osdu/schema/constants/SchemaConstants.java index 38af6fb5..c4622126 100644 --- a/schema-core/src/main/java/org/opengroup/osdu/schema/constants/SchemaConstants.java +++ b/schema-core/src/main/java/org/opengroup/osdu/schema/constants/SchemaConstants.java @@ -21,7 +21,7 @@ public class SchemaConstants { public static final String SCHEMA_KIND_DELIMITER = ":"; public static final String SCHEMA_Version_DELIMITER = "."; public static final String SCHEMA_KIND_REGEX="^([^.:\\r\\n\\s]+):([^.:\\r\\n\\s]+):([^.:\\r\\n\\s]+):(([\\d]+)[.]([\\d]+)[.]([\\d]+))$"; - public static final String SCHEMA_EMPTY_REGEX = "^(?!\\s*$).+"; + public static final String SCHEMA_EMPTY_REGEX = "^[\\w\\-\\.]+$"; // schema public static final String SCHEMA_KIND = "schema"; diff --git a/schema-core/src/main/java/org/opengroup/osdu/schema/model/SchemaIdentity.java b/schema-core/src/main/java/org/opengroup/osdu/schema/model/SchemaIdentity.java index b2b2424d..5809f68b 100644 --- a/schema-core/src/main/java/org/opengroup/osdu/schema/model/SchemaIdentity.java +++ b/schema-core/src/main/java/org/opengroup/osdu/schema/model/SchemaIdentity.java @@ -16,15 +16,15 @@ import org.opengroup.osdu.schema.constants.SchemaConstants; public class SchemaIdentity { @NotNull(message = "authority must not be null") - @Pattern(regexp = SchemaConstants.SCHEMA_EMPTY_REGEX, message = "authority must not be empty") + @Pattern(regexp = SchemaConstants.SCHEMA_EMPTY_REGEX, message = "authority must not contain whitespaces and special characters except - and .") private String authority; @NotNull(message = "source must not be null") - @Pattern(regexp = SchemaConstants.SCHEMA_EMPTY_REGEX, message = "source must not be empty") + @Pattern(regexp = SchemaConstants.SCHEMA_EMPTY_REGEX, message = "source must not contain whitespaces and special characters except - and .") private String source; @NotNull(message = "entityType must not be null") - @Pattern(regexp = SchemaConstants.SCHEMA_EMPTY_REGEX, message = "entityType must not be empty") + @Pattern(regexp = SchemaConstants.SCHEMA_EMPTY_REGEX, message = "entityType must not contain whitespaces and special characters except - and .") private String entityType; @NotNull(message = "schemaVersionMajor must not be null") diff --git a/schema-core/src/test/java/org/opengroup/osdu/schema/api/SchemaControllerTest.java b/schema-core/src/test/java/org/opengroup/osdu/schema/api/SchemaControllerTest.java index 75b6e4c8..8b2eff8a 100644 --- a/schema-core/src/test/java/org/opengroup/osdu/schema/api/SchemaControllerTest.java +++ b/schema-core/src/test/java/org/opengroup/osdu/schema/api/SchemaControllerTest.java @@ -103,6 +103,38 @@ public class SchemaControllerTest { assertNotNull(schemaController.createSchema(schemaRequest)); } + @Test(expected = BadRequestException.class) + public void testCreateAuthoritySchemaSpecialCharacters_Failed() throws ApplicationException, BadRequestException { + schemaRequest = getSchemaRequestSpecialCharactersAuthority(); + + when(schemaService.createSchema(schemaRequest)).thenThrow(BadRequestException.class); + assertNotNull(schemaController.createSchema(schemaRequest)); + } + + @Test(expected = BadRequestException.class) + public void testCreateSourceSchemaSpecialCharacters_Failed() throws ApplicationException, BadRequestException { + schemaRequest = getSchemaRequestSpecialCharactersSource(); + + when(schemaService.createSchema(schemaRequest)).thenThrow(BadRequestException.class); + assertNotNull(schemaController.createSchema(schemaRequest)); + } + + @Test(expected = BadRequestException.class) + public void testCreateEntitySchemaSpecialCharacters_Failed() throws ApplicationException, BadRequestException { + schemaRequest = getSchemaRequestSpecialCharactersEntity(); + + when(schemaService.createSchema(schemaRequest)).thenThrow(BadRequestException.class); + assertNotNull(schemaController.createSchema(schemaRequest)); + } + + @Test(expected = BadRequestException.class) + public void testCreateAuthorityMultipleSpaces_Failed() throws ApplicationException, BadRequestException { + schemaRequest = getSchemaRequestMultipleSpacesAuthority(); + + when(schemaService.createSchema(schemaRequest)).thenThrow(BadRequestException.class); + assertNotNull(schemaController.createSchema(schemaRequest)); + } + @Test public void testGetSchemaInfoList() throws ApplicationException, NotFoundException, BadRequestException { schemaRequest = getSchemaRequestObject(); @@ -178,4 +210,48 @@ public class SchemaControllerTest { .schemaVersionMajor(1L).schemaVersionMinor(1L).source("").build()) .build()).build(); } + + private SchemaRequest getSchemaRequestSpecialCharactersAuthority() { + return SchemaRequest.builder().schema(null).schemaInfo(SchemaInfo.builder().createdBy("creator") + .dateCreated(new Date(System.currentTimeMillis())) + .schemaIdentity(SchemaIdentity.builder().authority(" :").entityType("well").id(" :.well.1.1") + .schemaVersionMajor(1L).schemaVersionMinor(1L).source("").build()) + .scope(SchemaScope.INTERNAL).status(SchemaStatus.DEVELOPMENT) + .supersededBy(SchemaIdentity.builder().authority(" :").entityType("well").id(" :.well.1.4") + .schemaVersionMajor(1L).schemaVersionMinor(1L).source("").build()) + .build()).build(); + } + + private SchemaRequest getSchemaRequestSpecialCharactersSource() { + return SchemaRequest.builder().schema(null).schemaInfo(SchemaInfo.builder().createdBy("creator") + .dateCreated(new Date(System.currentTimeMillis())) + .schemaIdentity(SchemaIdentity.builder().authority("os").entityType("well").id("os. :.1.1") + .schemaVersionMajor(1L).schemaVersionMinor(1L).source(" :").build()) + .scope(SchemaScope.INTERNAL).status(SchemaStatus.DEVELOPMENT) + .supersededBy(SchemaIdentity.builder().authority("os").entityType("well").id("os. :.1.4") + .schemaVersionMajor(1L).schemaVersionMinor(1L).source(" :").build()) + .build()).build(); + } + + private SchemaRequest getSchemaRequestSpecialCharactersEntity() { + return SchemaRequest.builder().schema(null).schemaInfo(SchemaInfo.builder().createdBy("creator") + .dateCreated(new Date(System.currentTimeMillis())) + .schemaIdentity(SchemaIdentity.builder().authority("os").entityType(" :").id("os.source. :.1.1") + .schemaVersionMajor(1L).schemaVersionMinor(1L).source("source").build()) + .scope(SchemaScope.INTERNAL).status(SchemaStatus.DEVELOPMENT) + .supersededBy(SchemaIdentity.builder().authority("os").entityType(" :").id("os.source. :.1.4") + .schemaVersionMajor(1L).schemaVersionMinor(1L).source("source").build()) + .build()).build(); + } + + private SchemaRequest getSchemaRequestMultipleSpacesAuthority() { + return SchemaRequest.builder().schema(null).schemaInfo(SchemaInfo.builder().createdBy("creator") + .dateCreated(new Date(System.currentTimeMillis())) + .schemaIdentity(SchemaIdentity.builder().authority(" ").entityType("well").id(" .source.well.1.1") + .schemaVersionMajor(1L).schemaVersionMinor(1L).source("source").build()) + .scope(SchemaScope.INTERNAL).status(SchemaStatus.DEVELOPMENT) + .supersededBy(SchemaIdentity.builder().authority(" ").entityType("well").id(" .source.well.1.4") + .schemaVersionMajor(1L).schemaVersionMinor(1L).source("source").build()) + .build()).build(); + } } \ No newline at end of file diff --git a/testing/schema-test-core/src/test/resources/input_payloads/inputPayloadWithEmptyAuthority.json b/testing/schema-test-core/src/test/resources/input_payloads/inputPayloadWithEmptyAuthority.json index a4477210..26d86843 100644 --- a/testing/schema-test-core/src/test/resources/input_payloads/inputPayloadWithEmptyAuthority.json +++ b/testing/schema-test-core/src/test/resources/input_payloads/inputPayloadWithEmptyAuthority.json @@ -2,543 +2,17 @@ "schemaInfo": { "schemaIdentity": { "authority": "", - "source": "testSource1", - "entityType": "testEntity1", + "source": "testSource", + "entityType": "testEntity", "schemaVersionMajor": 1, "schemaVersionMinor": 1, "schemaVersionPatch": 0, - "id": ":testSource1:testEntity1:1.1.0" + "id": ":testSource:testEntity:1.1.0" }, "status": "DEVELOPMENT" }, "schema": { "$schema": "http://json-schema.org/draft-07/schema#", - "description": "The entity well.", - "title": "Well", - "type": "object", - "x-slb-lifecycle-state": "published", - "definitions": { - "FeatureCollection": { - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "GeoJSON FeatureCollection", - "type": "object", - "required": [ - "type", - "features" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "FeatureCollection" - ] - }, - "features": { - "type": "array", - "items": { - "title": "GeoJSON Feature", - "type": "object", - "required": [ - "type", - "properties", - "geometry" - ], - "properties": { - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - }, - "geometry": { - "oneOf": [ - { - "type": "null" - }, - { - "title": "GeoJSON Point", - "type": "object", - "required": [ - "type", - "coordinates" - ], - "properties": { - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - }, - "coordinates": { - "minItems": 2, - "type": "array", - "items": { - "type": "number" - } - }, - "type": { - "type": "string", - "enum": [ - "Point" - ] - } - } - }, - { - "title": "GeoJSON LineString", - "type": "object", - "required": [ - "type", - "coordinates" - ], - "properties": { - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - }, - "coordinates": { - "minItems": 2, - "type": "array", - "items": { - "minItems": 2, - "type": "array", - "items": { - "type": "number" - } - } - }, - "type": { - "type": "string", - "enum": [ - "LineString" - ] - } - } - }, - { - "title": "GeoJSON Polygon", - "type": "object", - "required": [ - "type", - "coordinates" - ], - "properties": { - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - }, - "coordinates": { - "type": "array", - "items": { - "minItems": 4, - "type": "array", - "items": { - "minItems": 2, - "type": "array", - "items": { - "type": "number" - } - } - } - }, - "type": { - "type": "string", - "enum": [ - "Polygon" - ] - } - } - }, - { - "title": "GeoJSON MultiPoint", - "type": "object", - "required": [ - "type", - "coordinates" - ], - "properties": { - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - }, - "coordinates": { - "type": "array", - "items": { - "minItems": 2, - "type": "array", - "items": { - "type": "number" - } - } - }, - "type": { - "type": "string", - "enum": [ - "MultiPoint" - ] - } - } - }, - { - "title": "GeoJSON MultiLineString", - "type": "object", - "required": [ - "type", - "coordinates" - ], - "properties": { - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - }, - "coordinates": { - "type": "array", - "items": { - "minItems": 2, - "type": "array", - "items": { - "minItems": 2, - "type": "array", - "items": { - "type": "number" - } - } - } - }, - "type": { - "type": "string", - "enum": [ - "MultiLineString" - ] - } - } - }, - { - "title": "GeoJSON MultiPolygon", - "type": "object", - "required": [ - "type", - "coordinates" - ], - "properties": { - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - }, - "coordinates": { - "type": "array", - "items": { - "type": "array", - "items": { - "minItems": 4, - "type": "array", - "items": { - "minItems": 2, - "type": "array", - "items": { - "type": "number" - } - } - } - } - }, - "type": { - "type": "string", - "enum": [ - "MultiPolygon" - ] - } - } - }, - { - "title": "GeoJSON GeometryCollection", - "type": "object", - "required": [ - "type", - "geometries" - ], - "properties": { - "geometries": { - "type": "array", - "items": { - "oneOf": [ - { - "title": "GeoJSON Point", - "type": "object", - "required": [ - "type", - "coordinates" - ], - "properties": { - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - }, - "coordinates": { - "minItems": 2, - "type": "array", - "items": { - "type": "number" - } - }, - "type": { - "type": "string", - "enum": [ - "Point" - ] - } - } - }, - { - "title": "GeoJSON LineString", - "type": "object", - "required": [ - "type", - "coordinates" - ], - "properties": { - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - }, - "coordinates": { - "minItems": 2, - "type": "array", - "items": { - "minItems": 2, - "type": "array", - "items": { - "type": "number" - } - } - }, - "type": { - "type": "string", - "enum": [ - "LineString" - ] - } - } - }, - { - "title": "GeoJSON Polygon", - "type": "object", - "required": [ - "type", - "coordinates" - ], - "properties": { - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - }, - "coordinates": { - "type": "array", - "items": { - "minItems": 4, - "type": "array", - "items": { - "minItems": 2, - "type": "array", - "items": { - "type": "number" - } - } - } - }, - "type": { - "type": "string", - "enum": [ - "Polygon" - ] - } - } - }, - { - "title": "GeoJSON MultiPoint", - "type": "object", - "required": [ - "type", - "coordinates" - ], - "properties": { - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - }, - "coordinates": { - "type": "array", - "items": { - "minItems": 2, - "type": "array", - "items": { - "type": "number" - } - } - }, - "type": { - "type": "string", - "enum": [ - "MultiPoint" - ] - } - } - }, - { - "title": "GeoJSON MultiLineString", - "type": "object", - "required": [ - "type", - "coordinates" - ], - "properties": { - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - }, - "coordinates": { - "type": "array", - "items": { - "minItems": 2, - "type": "array", - "items": { - "minItems": 2, - "type": "array", - "items": { - "type": "number" - } - } - } - }, - "type": { - "type": "string", - "enum": [ - "MultiLineString" - ] - } - } - }, - { - "title": "GeoJSON MultiPolygon", - "type": "object", - "required": [ - "type", - "coordinates" - ], - "properties": { - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - }, - "coordinates": { - "type": "array", - "items": { - "type": "array", - "items": { - "minItems": 4, - "type": "array", - "items": { - "minItems": 2, - "type": "array", - "items": { - "type": "number" - } - } - } - } - }, - "type": { - "type": "string", - "enum": [ - "MultiPolygon" - ] - } - } - } - ] - } - }, - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - }, - "type": { - "type": "string", - "enum": [ - "GeometryCollection" - ] - } - } - } - ] - }, - "type": { - "type": "string", - "enum": [ - "Feature" - ] - }, - "properties": { - "oneOf": [ - { - "type": "null" - }, - { - "type": "object" - } - ] - } - } - } - }, - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - } - }, - "$id": "https://geojson.org/schema/FeatureCollection.json" - } - } + "description": "The entity well." } } \ No newline at end of file diff --git a/testing/schema-test-core/src/test/resources/input_payloads/inputPayloadWithEmptyEntity.json b/testing/schema-test-core/src/test/resources/input_payloads/inputPayloadWithEmptyEntity.json index a3e09801..f6818a38 100644 --- a/testing/schema-test-core/src/test/resources/input_payloads/inputPayloadWithEmptyEntity.json +++ b/testing/schema-test-core/src/test/resources/input_payloads/inputPayloadWithEmptyEntity.json @@ -13,532 +13,6 @@ }, "schema": { "$schema": "http://json-schema.org/draft-07/schema#", - "description": "The entity well.", - "title": "Well", - "type": "object", - "x-slb-lifecycle-state": "published", - "definitions": { - "FeatureCollection": { - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "GeoJSON FeatureCollection", - "type": "object", - "required": [ - "type", - "features" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "FeatureCollection" - ] - }, - "features": { - "type": "array", - "items": { - "title": "GeoJSON Feature", - "type": "object", - "required": [ - "type", - "properties", - "geometry" - ], - "properties": { - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - }, - "geometry": { - "oneOf": [ - { - "type": "null" - }, - { - "title": "GeoJSON Point", - "type": "object", - "required": [ - "type", - "coordinates" - ], - "properties": { - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - }, - "coordinates": { - "minItems": 2, - "type": "array", - "items": { - "type": "number" - } - }, - "type": { - "type": "string", - "enum": [ - "Point" - ] - } - } - }, - { - "title": "GeoJSON LineString", - "type": "object", - "required": [ - "type", - "coordinates" - ], - "properties": { - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - }, - "coordinates": { - "minItems": 2, - "type": "array", - "items": { - "minItems": 2, - "type": "array", - "items": { - "type": "number" - } - } - }, - "type": { - "type": "string", - "enum": [ - "LineString" - ] - } - } - }, - { - "title": "GeoJSON Polygon", - "type": "object", - "required": [ - "type", - "coordinates" - ], - "properties": { - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - }, - "coordinates": { - "type": "array", - "items": { - "minItems": 4, - "type": "array", - "items": { - "minItems": 2, - "type": "array", - "items": { - "type": "number" - } - } - } - }, - "type": { - "type": "string", - "enum": [ - "Polygon" - ] - } - } - }, - { - "title": "GeoJSON MultiPoint", - "type": "object", - "required": [ - "type", - "coordinates" - ], - "properties": { - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - }, - "coordinates": { - "type": "array", - "items": { - "minItems": 2, - "type": "array", - "items": { - "type": "number" - } - } - }, - "type": { - "type": "string", - "enum": [ - "MultiPoint" - ] - } - } - }, - { - "title": "GeoJSON MultiLineString", - "type": "object", - "required": [ - "type", - "coordinates" - ], - "properties": { - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - }, - "coordinates": { - "type": "array", - "items": { - "minItems": 2, - "type": "array", - "items": { - "minItems": 2, - "type": "array", - "items": { - "type": "number" - } - } - } - }, - "type": { - "type": "string", - "enum": [ - "MultiLineString" - ] - } - } - }, - { - "title": "GeoJSON MultiPolygon", - "type": "object", - "required": [ - "type", - "coordinates" - ], - "properties": { - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - }, - "coordinates": { - "type": "array", - "items": { - "type": "array", - "items": { - "minItems": 4, - "type": "array", - "items": { - "minItems": 2, - "type": "array", - "items": { - "type": "number" - } - } - } - } - }, - "type": { - "type": "string", - "enum": [ - "MultiPolygon" - ] - } - } - }, - { - "title": "GeoJSON GeometryCollection", - "type": "object", - "required": [ - "type", - "geometries" - ], - "properties": { - "geometries": { - "type": "array", - "items": { - "oneOf": [ - { - "title": "GeoJSON Point", - "type": "object", - "required": [ - "type", - "coordinates" - ], - "properties": { - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - }, - "coordinates": { - "minItems": 2, - "type": "array", - "items": { - "type": "number" - } - }, - "type": { - "type": "string", - "enum": [ - "Point" - ] - } - } - }, - { - "title": "GeoJSON LineString", - "type": "object", - "required": [ - "type", - "coordinates" - ], - "properties": { - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - }, - "coordinates": { - "minItems": 2, - "type": "array", - "items": { - "minItems": 2, - "type": "array", - "items": { - "type": "number" - } - } - }, - "type": { - "type": "string", - "enum": [ - "LineString" - ] - } - } - }, - { - "title": "GeoJSON Polygon", - "type": "object", - "required": [ - "type", - "coordinates" - ], - "properties": { - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - }, - "coordinates": { - "type": "array", - "items": { - "minItems": 4, - "type": "array", - "items": { - "minItems": 2, - "type": "array", - "items": { - "type": "number" - } - } - } - }, - "type": { - "type": "string", - "enum": [ - "Polygon" - ] - } - } - }, - { - "title": "GeoJSON MultiPoint", - "type": "object", - "required": [ - "type", - "coordinates" - ], - "properties": { - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - }, - "coordinates": { - "type": "array", - "items": { - "minItems": 2, - "type": "array", - "items": { - "type": "number" - } - } - }, - "type": { - "type": "string", - "enum": [ - "MultiPoint" - ] - } - } - }, - { - "title": "GeoJSON MultiLineString", - "type": "object", - "required": [ - "type", - "coordinates" - ], - "properties": { - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - }, - "coordinates": { - "type": "array", - "items": { - "minItems": 2, - "type": "array", - "items": { - "minItems": 2, - "type": "array", - "items": { - "type": "number" - } - } - } - }, - "type": { - "type": "string", - "enum": [ - "MultiLineString" - ] - } - } - }, - { - "title": "GeoJSON MultiPolygon", - "type": "object", - "required": [ - "type", - "coordinates" - ], - "properties": { - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - }, - "coordinates": { - "type": "array", - "items": { - "type": "array", - "items": { - "minItems": 4, - "type": "array", - "items": { - "minItems": 2, - "type": "array", - "items": { - "type": "number" - } - } - } - } - }, - "type": { - "type": "string", - "enum": [ - "MultiPolygon" - ] - } - } - } - ] - } - }, - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - }, - "type": { - "type": "string", - "enum": [ - "GeometryCollection" - ] - } - } - } - ] - }, - "type": { - "type": "string", - "enum": [ - "Feature" - ] - }, - "properties": { - "oneOf": [ - { - "type": "null" - }, - { - "type": "object" - } - ] - } - } - } - }, - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - } - }, - "$id": "https://geojson.org/schema/FeatureCollection.json" - } - } + "description": "The entity well." } } \ No newline at end of file diff --git a/testing/schema-test-core/src/test/resources/input_payloads/inputPayloadWithEmptySource.json b/testing/schema-test-core/src/test/resources/input_payloads/inputPayloadWithEmptySource.json index efc97539..39c25196 100644 --- a/testing/schema-test-core/src/test/resources/input_payloads/inputPayloadWithEmptySource.json +++ b/testing/schema-test-core/src/test/resources/input_payloads/inputPayloadWithEmptySource.json @@ -1,544 +1,18 @@ { "schemaInfo": { "schemaIdentity": { - "authority": "testAuthority3", + "authority": "testAuthority2", "source": "", - "entityType": "testEntity3", + "entityType": "testEntity", "schemaVersionMajor": 1, "schemaVersionMinor": 1, "schemaVersionPatch": 0, - "id": "testAuthority3::testEntity3:1.1.0" + "id": "testAuthority2::testEntity:1.1.0" }, "status": "DEVELOPMENT" }, "schema": { "$schema": "http://json-schema.org/draft-07/schema#", - "description": "The entity well.", - "title": "Well", - "type": "object", - "x-slb-lifecycle-state": "published", - "definitions": { - "FeatureCollection": { - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "GeoJSON FeatureCollection", - "type": "object", - "required": [ - "type", - "features" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "FeatureCollection" - ] - }, - "features": { - "type": "array", - "items": { - "title": "GeoJSON Feature", - "type": "object", - "required": [ - "type", - "properties", - "geometry" - ], - "properties": { - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - }, - "geometry": { - "oneOf": [ - { - "type": "null" - }, - { - "title": "GeoJSON Point", - "type": "object", - "required": [ - "type", - "coordinates" - ], - "properties": { - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - }, - "coordinates": { - "minItems": 2, - "type": "array", - "items": { - "type": "number" - } - }, - "type": { - "type": "string", - "enum": [ - "Point" - ] - } - } - }, - { - "title": "GeoJSON LineString", - "type": "object", - "required": [ - "type", - "coordinates" - ], - "properties": { - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - }, - "coordinates": { - "minItems": 2, - "type": "array", - "items": { - "minItems": 2, - "type": "array", - "items": { - "type": "number" - } - } - }, - "type": { - "type": "string", - "enum": [ - "LineString" - ] - } - } - }, - { - "title": "GeoJSON Polygon", - "type": "object", - "required": [ - "type", - "coordinates" - ], - "properties": { - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - }, - "coordinates": { - "type": "array", - "items": { - "minItems": 4, - "type": "array", - "items": { - "minItems": 2, - "type": "array", - "items": { - "type": "number" - } - } - } - }, - "type": { - "type": "string", - "enum": [ - "Polygon" - ] - } - } - }, - { - "title": "GeoJSON MultiPoint", - "type": "object", - "required": [ - "type", - "coordinates" - ], - "properties": { - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - }, - "coordinates": { - "type": "array", - "items": { - "minItems": 2, - "type": "array", - "items": { - "type": "number" - } - } - }, - "type": { - "type": "string", - "enum": [ - "MultiPoint" - ] - } - } - }, - { - "title": "GeoJSON MultiLineString", - "type": "object", - "required": [ - "type", - "coordinates" - ], - "properties": { - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - }, - "coordinates": { - "type": "array", - "items": { - "minItems": 2, - "type": "array", - "items": { - "minItems": 2, - "type": "array", - "items": { - "type": "number" - } - } - } - }, - "type": { - "type": "string", - "enum": [ - "MultiLineString" - ] - } - } - }, - { - "title": "GeoJSON MultiPolygon", - "type": "object", - "required": [ - "type", - "coordinates" - ], - "properties": { - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - }, - "coordinates": { - "type": "array", - "items": { - "type": "array", - "items": { - "minItems": 4, - "type": "array", - "items": { - "minItems": 2, - "type": "array", - "items": { - "type": "number" - } - } - } - } - }, - "type": { - "type": "string", - "enum": [ - "MultiPolygon" - ] - } - } - }, - { - "title": "GeoJSON GeometryCollection", - "type": "object", - "required": [ - "type", - "geometries" - ], - "properties": { - "geometries": { - "type": "array", - "items": { - "oneOf": [ - { - "title": "GeoJSON Point", - "type": "object", - "required": [ - "type", - "coordinates" - ], - "properties": { - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - }, - "coordinates": { - "minItems": 2, - "type": "array", - "items": { - "type": "number" - } - }, - "type": { - "type": "string", - "enum": [ - "Point" - ] - } - } - }, - { - "title": "GeoJSON LineString", - "type": "object", - "required": [ - "type", - "coordinates" - ], - "properties": { - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - }, - "coordinates": { - "minItems": 2, - "type": "array", - "items": { - "minItems": 2, - "type": "array", - "items": { - "type": "number" - } - } - }, - "type": { - "type": "string", - "enum": [ - "LineString" - ] - } - } - }, - { - "title": "GeoJSON Polygon", - "type": "object", - "required": [ - "type", - "coordinates" - ], - "properties": { - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - }, - "coordinates": { - "type": "array", - "items": { - "minItems": 4, - "type": "array", - "items": { - "minItems": 2, - "type": "array", - "items": { - "type": "number" - } - } - } - }, - "type": { - "type": "string", - "enum": [ - "Polygon" - ] - } - } - }, - { - "title": "GeoJSON MultiPoint", - "type": "object", - "required": [ - "type", - "coordinates" - ], - "properties": { - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - }, - "coordinates": { - "type": "array", - "items": { - "minItems": 2, - "type": "array", - "items": { - "type": "number" - } - } - }, - "type": { - "type": "string", - "enum": [ - "MultiPoint" - ] - } - } - }, - { - "title": "GeoJSON MultiLineString", - "type": "object", - "required": [ - "type", - "coordinates" - ], - "properties": { - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - }, - "coordinates": { - "type": "array", - "items": { - "minItems": 2, - "type": "array", - "items": { - "minItems": 2, - "type": "array", - "items": { - "type": "number" - } - } - } - }, - "type": { - "type": "string", - "enum": [ - "MultiLineString" - ] - } - } - }, - { - "title": "GeoJSON MultiPolygon", - "type": "object", - "required": [ - "type", - "coordinates" - ], - "properties": { - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - }, - "coordinates": { - "type": "array", - "items": { - "type": "array", - "items": { - "minItems": 4, - "type": "array", - "items": { - "minItems": 2, - "type": "array", - "items": { - "type": "number" - } - } - } - } - }, - "type": { - "type": "string", - "enum": [ - "MultiPolygon" - ] - } - } - } - ] - } - }, - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - }, - "type": { - "type": "string", - "enum": [ - "GeometryCollection" - ] - } - } - } - ] - }, - "type": { - "type": "string", - "enum": [ - "Feature" - ] - }, - "properties": { - "oneOf": [ - { - "type": "null" - }, - { - "type": "object" - } - ] - } - } - } - }, - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - } - }, - "$id": "https://geojson.org/schema/FeatureCollection.json" - } - } + "description": "The entity well." } } \ No newline at end of file diff --git a/testing/schema-test-core/src/test/resources/output_payloads/EmptyAuthorityPayload.json b/testing/schema-test-core/src/test/resources/output_payloads/EmptyAuthorityPayload.json index 15bfd759..edf582f0 100644 --- a/testing/schema-test-core/src/test/resources/output_payloads/EmptyAuthorityPayload.json +++ b/testing/schema-test-core/src/test/resources/output_payloads/EmptyAuthorityPayload.json @@ -6,7 +6,7 @@ { "domain": "global", "reason": "badRequest", - "message": "authority must not be empty" + "message": "authority must not contain whitespaces and special characters except - and ." } ] } diff --git a/testing/schema-test-core/src/test/resources/output_payloads/EmptyEntityPayload.json b/testing/schema-test-core/src/test/resources/output_payloads/EmptyEntityPayload.json index a41b1f3a..db799f3c 100644 --- a/testing/schema-test-core/src/test/resources/output_payloads/EmptyEntityPayload.json +++ b/testing/schema-test-core/src/test/resources/output_payloads/EmptyEntityPayload.json @@ -6,7 +6,7 @@ { "domain": "global", "reason": "badRequest", - "message": "entityType must not be empty" + "message": "entityType must not contain whitespaces and special characters except - and ." } ] } diff --git a/testing/schema-test-core/src/test/resources/output_payloads/EmptySourcePayload.json b/testing/schema-test-core/src/test/resources/output_payloads/EmptySourcePayload.json index 851ab58c..87f40ade 100644 --- a/testing/schema-test-core/src/test/resources/output_payloads/EmptySourcePayload.json +++ b/testing/schema-test-core/src/test/resources/output_payloads/EmptySourcePayload.json @@ -6,7 +6,7 @@ { "domain": "global", "reason": "badRequest", - "message": "source must not be empty" + "message": "source must not contain whitespaces and special characters except - and ." } ] } -- GitLab From bb8d514c50f8d8e94167ba2dd8ae247994a5ce61 Mon Sep 17 00:00:00 2001 From: AArora3 Date: Wed, 30 Mar 2022 13:06:35 +0530 Subject: [PATCH 05/15] fixed empty authority,source,entityType validation --- .../schema/constants/SchemaConstants.java | 1 + .../osdu/schema/model/SchemaIdentity.java | 5 + .../osdu/schema/api/SchemaControllerTest.java | 57 ++ ...hemaService_POST_SchemaValidations.feature | 12 + .../inputPayloadWithEmptyAuthority.json | 544 ++++++++++++++++++ .../inputPayloadWithEmptyEntity.json | 544 ++++++++++++++++++ .../inputPayloadWithEmptySource.json | 544 ++++++++++++++++++ .../EmptyAuthorityPayload.json | 13 + .../output_payloads/EmptyEntityPayload.json | 13 + .../output_payloads/EmptySourcePayload.json | 13 + 10 files changed, 1746 insertions(+) create mode 100644 testing/schema-test-core/src/test/resources/input_payloads/inputPayloadWithEmptyAuthority.json create mode 100644 testing/schema-test-core/src/test/resources/input_payloads/inputPayloadWithEmptyEntity.json create mode 100644 testing/schema-test-core/src/test/resources/input_payloads/inputPayloadWithEmptySource.json create mode 100644 testing/schema-test-core/src/test/resources/output_payloads/EmptyAuthorityPayload.json create mode 100644 testing/schema-test-core/src/test/resources/output_payloads/EmptyEntityPayload.json create mode 100644 testing/schema-test-core/src/test/resources/output_payloads/EmptySourcePayload.json diff --git a/schema-core/src/main/java/org/opengroup/osdu/schema/constants/SchemaConstants.java b/schema-core/src/main/java/org/opengroup/osdu/schema/constants/SchemaConstants.java index eaaac410..38af6fb5 100644 --- a/schema-core/src/main/java/org/opengroup/osdu/schema/constants/SchemaConstants.java +++ b/schema-core/src/main/java/org/opengroup/osdu/schema/constants/SchemaConstants.java @@ -21,6 +21,7 @@ public class SchemaConstants { public static final String SCHEMA_KIND_DELIMITER = ":"; public static final String SCHEMA_Version_DELIMITER = "."; public static final String SCHEMA_KIND_REGEX="^([^.:\\r\\n\\s]+):([^.:\\r\\n\\s]+):([^.:\\r\\n\\s]+):(([\\d]+)[.]([\\d]+)[.]([\\d]+))$"; + public static final String SCHEMA_EMPTY_REGEX = "^(?!\\s*$).+"; // schema public static final String SCHEMA_KIND = "schema"; diff --git a/schema-core/src/main/java/org/opengroup/osdu/schema/model/SchemaIdentity.java b/schema-core/src/main/java/org/opengroup/osdu/schema/model/SchemaIdentity.java index ada15fa5..b2b2424d 100644 --- a/schema-core/src/main/java/org/opengroup/osdu/schema/model/SchemaIdentity.java +++ b/schema-core/src/main/java/org/opengroup/osdu/schema/model/SchemaIdentity.java @@ -1,11 +1,13 @@ package org.opengroup.osdu.schema.model; import javax.validation.constraints.NotNull; +import javax.validation.constraints.Pattern; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; +import org.opengroup.osdu.schema.constants.SchemaConstants; @Data @Builder @@ -14,12 +16,15 @@ import lombok.NoArgsConstructor; public class SchemaIdentity { @NotNull(message = "authority must not be null") + @Pattern(regexp = SchemaConstants.SCHEMA_EMPTY_REGEX, message = "authority must not be empty") private String authority; @NotNull(message = "source must not be null") + @Pattern(regexp = SchemaConstants.SCHEMA_EMPTY_REGEX, message = "source must not be empty") private String source; @NotNull(message = "entityType must not be null") + @Pattern(regexp = SchemaConstants.SCHEMA_EMPTY_REGEX, message = "entityType must not be empty") private String entityType; @NotNull(message = "schemaVersionMajor must not be null") diff --git a/schema-core/src/test/java/org/opengroup/osdu/schema/api/SchemaControllerTest.java b/schema-core/src/test/java/org/opengroup/osdu/schema/api/SchemaControllerTest.java index f294e84b..75b6e4c8 100644 --- a/schema-core/src/test/java/org/opengroup/osdu/schema/api/SchemaControllerTest.java +++ b/schema-core/src/test/java/org/opengroup/osdu/schema/api/SchemaControllerTest.java @@ -79,6 +79,30 @@ public class SchemaControllerTest { schemaController.upsertSchema(schemaRequest); } + @Test(expected = BadRequestException.class) + public void testCreateEmptyAuthoritySchema_Failed() throws ApplicationException, BadRequestException { + schemaRequest = getSchemaRequestEmptyAuthority(); + + when(schemaService.createSchema(schemaRequest)).thenThrow(BadRequestException.class); + assertNotNull(schemaController.createSchema(schemaRequest)); + } + + @Test(expected = BadRequestException.class) + public void testCreateEmptyEntitySchema_Failed() throws ApplicationException, BadRequestException { + schemaRequest = getSchemaRequestEmptySource(); + + when(schemaService.createSchema(schemaRequest)).thenThrow(BadRequestException.class); + assertNotNull(schemaController.createSchema(schemaRequest)); + } + + @Test(expected = BadRequestException.class) + public void testCreateEmptySourceSchema_Failed() throws ApplicationException, BadRequestException { + schemaRequest = getSchemaRequestEmptyEntity(); + + when(schemaService.createSchema(schemaRequest)).thenThrow(BadRequestException.class); + assertNotNull(schemaController.createSchema(schemaRequest)); + } + @Test public void testGetSchemaInfoList() throws ApplicationException, NotFoundException, BadRequestException { schemaRequest = getSchemaRequestObject(); @@ -121,4 +145,37 @@ public class SchemaControllerTest { .schemaVersionMajor(1L).schemaVersionMinor(1L).source("wks").build()) .build(); } + + private SchemaRequest getSchemaRequestEmptyAuthority() { + return SchemaRequest.builder().schema(null).schemaInfo(SchemaInfo.builder().createdBy("creator") + .dateCreated(new Date(System.currentTimeMillis())) + .schemaIdentity(SchemaIdentity.builder().authority("").entityType("well").id("..wks.well.1.1") + .schemaVersionMajor(1L).schemaVersionMinor(1L).source("wks").build()) + .scope(SchemaScope.INTERNAL).status(SchemaStatus.DEVELOPMENT) + .supersededBy(SchemaIdentity.builder().authority("").entityType("well").id("..wks.well.1.4") + .schemaVersionMajor(1L).schemaVersionMinor(1L).source("wks").build()) + .build()).build(); + } + + private SchemaRequest getSchemaRequestEmptyEntity() { + return SchemaRequest.builder().schema(null).schemaInfo(SchemaInfo.builder().createdBy("creator") + .dateCreated(new Date(System.currentTimeMillis())) + .schemaIdentity(SchemaIdentity.builder().authority("os").entityType("").id("os..well.1.1") + .schemaVersionMajor(1L).schemaVersionMinor(1L).source("well").build()) + .scope(SchemaScope.INTERNAL).status(SchemaStatus.DEVELOPMENT) + .supersededBy(SchemaIdentity.builder().authority("os").entityType("").id("os..well.1.4") + .schemaVersionMajor(1L).schemaVersionMinor(1L).source("well").build()) + .build()).build(); + } + + private SchemaRequest getSchemaRequestEmptySource() { + return SchemaRequest.builder().schema(null).schemaInfo(SchemaInfo.builder().createdBy("creator") + .dateCreated(new Date(System.currentTimeMillis())) + .schemaIdentity(SchemaIdentity.builder().authority("os").entityType("well").id("os.well.1.1") + .schemaVersionMajor(1L).schemaVersionMinor(1L).source("").build()) + .scope(SchemaScope.INTERNAL).status(SchemaStatus.DEVELOPMENT) + .supersededBy(SchemaIdentity.builder().authority("os").entityType("well").id("os.well.1.4") + .schemaVersionMajor(1L).schemaVersionMinor(1L).source("").build()) + .build()).build(); + } } \ No newline at end of file diff --git a/testing/schema-test-core/src/test/resources/features/IntegrationTest_SchemaService_POST_SchemaValidations.feature b/testing/schema-test-core/src/test/resources/features/IntegrationTest_SchemaService_POST_SchemaValidations.feature index 38a79554..4b2c074a 100644 --- a/testing/schema-test-core/src/test/resources/features/IntegrationTest_SchemaService_POST_SchemaValidations.feature +++ b/testing/schema-test-core/src/test/resources/features/IntegrationTest_SchemaService_POST_SchemaValidations.feature @@ -562,3 +562,15 @@ Feature: To verify schema validation functionality of POST schema Service Examples: | RefBaseInputPayload | InputPayloadWithChanges | tenant | ReponseStatusCode | ResponseMessage1 | ReponseStatusCode1 | ResponseMessage | | "/input_payloads/RefBaseSchema_New.json" | "/input_payloads/RefBaseSchema_EntityNameChanged_MinorVersion.json" | "TENANT1" | "400" | "/output_payloads/SchemaPost_PrivateScope_SuccessfulCreation.json" | "201" | "/output_payloads/SchemaPost_MinorBreakingChangeError.json" | + + @SchemaService + Scenario Outline: Verify that Schema Service's POST API responds as bad request for empty value of authority, source and entity + When I hit schema service POST API with and data-partition-id as + Then service should respond back with error and + + Examples: + | InputPayload | ReponseStatusCode | ResponseMessage | tenant | + | "/input_payloads/inputPayloadWithEmptyAuthority.json" | "400" | "/output_payloads/EmptyAuthorityPayload.json" | "TENANT1" | + | "/input_payloads/inputPayloadWithEmptyEntity.json" | "400" | "/output_payloads/EmptyEntityPayload.json" | "TENANT1" | + | "/input_payloads/inputPayloadWithEmptySource.json" | "400" | "/output_payloads/EmptySourcePayload.json" | "TENANT1" | + diff --git a/testing/schema-test-core/src/test/resources/input_payloads/inputPayloadWithEmptyAuthority.json b/testing/schema-test-core/src/test/resources/input_payloads/inputPayloadWithEmptyAuthority.json new file mode 100644 index 00000000..a4477210 --- /dev/null +++ b/testing/schema-test-core/src/test/resources/input_payloads/inputPayloadWithEmptyAuthority.json @@ -0,0 +1,544 @@ +{ + "schemaInfo": { + "schemaIdentity": { + "authority": "", + "source": "testSource1", + "entityType": "testEntity1", + "schemaVersionMajor": 1, + "schemaVersionMinor": 1, + "schemaVersionPatch": 0, + "id": ":testSource1:testEntity1:1.1.0" + }, + "status": "DEVELOPMENT" + }, + "schema": { + "$schema": "http://json-schema.org/draft-07/schema#", + "description": "The entity well.", + "title": "Well", + "type": "object", + "x-slb-lifecycle-state": "published", + "definitions": { + "FeatureCollection": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "GeoJSON FeatureCollection", + "type": "object", + "required": [ + "type", + "features" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "FeatureCollection" + ] + }, + "features": { + "type": "array", + "items": { + "title": "GeoJSON Feature", + "type": "object", + "required": [ + "type", + "properties", + "geometry" + ], + "properties": { + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "geometry": { + "oneOf": [ + { + "type": "null" + }, + { + "title": "GeoJSON Point", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "coordinates": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + }, + "type": { + "type": "string", + "enum": [ + "Point" + ] + } + } + }, + { + "title": "GeoJSON LineString", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "coordinates": { + "minItems": 2, + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + }, + "type": { + "type": "string", + "enum": [ + "LineString" + ] + } + } + }, + { + "title": "GeoJSON Polygon", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "coordinates": { + "type": "array", + "items": { + "minItems": 4, + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + } + }, + "type": { + "type": "string", + "enum": [ + "Polygon" + ] + } + } + }, + { + "title": "GeoJSON MultiPoint", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "coordinates": { + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + }, + "type": { + "type": "string", + "enum": [ + "MultiPoint" + ] + } + } + }, + { + "title": "GeoJSON MultiLineString", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "coordinates": { + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + } + }, + "type": { + "type": "string", + "enum": [ + "MultiLineString" + ] + } + } + }, + { + "title": "GeoJSON MultiPolygon", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "coordinates": { + "type": "array", + "items": { + "type": "array", + "items": { + "minItems": 4, + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + } + } + }, + "type": { + "type": "string", + "enum": [ + "MultiPolygon" + ] + } + } + }, + { + "title": "GeoJSON GeometryCollection", + "type": "object", + "required": [ + "type", + "geometries" + ], + "properties": { + "geometries": { + "type": "array", + "items": { + "oneOf": [ + { + "title": "GeoJSON Point", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "coordinates": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + }, + "type": { + "type": "string", + "enum": [ + "Point" + ] + } + } + }, + { + "title": "GeoJSON LineString", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "coordinates": { + "minItems": 2, + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + }, + "type": { + "type": "string", + "enum": [ + "LineString" + ] + } + } + }, + { + "title": "GeoJSON Polygon", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "coordinates": { + "type": "array", + "items": { + "minItems": 4, + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + } + }, + "type": { + "type": "string", + "enum": [ + "Polygon" + ] + } + } + }, + { + "title": "GeoJSON MultiPoint", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "coordinates": { + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + }, + "type": { + "type": "string", + "enum": [ + "MultiPoint" + ] + } + } + }, + { + "title": "GeoJSON MultiLineString", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "coordinates": { + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + } + }, + "type": { + "type": "string", + "enum": [ + "MultiLineString" + ] + } + } + }, + { + "title": "GeoJSON MultiPolygon", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "coordinates": { + "type": "array", + "items": { + "type": "array", + "items": { + "minItems": 4, + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + } + } + }, + "type": { + "type": "string", + "enum": [ + "MultiPolygon" + ] + } + } + } + ] + } + }, + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "type": { + "type": "string", + "enum": [ + "GeometryCollection" + ] + } + } + } + ] + }, + "type": { + "type": "string", + "enum": [ + "Feature" + ] + }, + "properties": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object" + } + ] + } + } + } + }, + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + } + }, + "$id": "https://geojson.org/schema/FeatureCollection.json" + } + } + } +} \ No newline at end of file diff --git a/testing/schema-test-core/src/test/resources/input_payloads/inputPayloadWithEmptyEntity.json b/testing/schema-test-core/src/test/resources/input_payloads/inputPayloadWithEmptyEntity.json new file mode 100644 index 00000000..a3e09801 --- /dev/null +++ b/testing/schema-test-core/src/test/resources/input_payloads/inputPayloadWithEmptyEntity.json @@ -0,0 +1,544 @@ +{ + "schemaInfo": { + "schemaIdentity": { + "authority": "testAuthority2", + "source": "testSource2", + "entityType": "", + "schemaVersionMajor": 1, + "schemaVersionMinor": 1, + "schemaVersionPatch": 0, + "id": "testAuthority2:testSource2::1.1.0" + }, + "status": "DEVELOPMENT" + }, + "schema": { + "$schema": "http://json-schema.org/draft-07/schema#", + "description": "The entity well.", + "title": "Well", + "type": "object", + "x-slb-lifecycle-state": "published", + "definitions": { + "FeatureCollection": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "GeoJSON FeatureCollection", + "type": "object", + "required": [ + "type", + "features" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "FeatureCollection" + ] + }, + "features": { + "type": "array", + "items": { + "title": "GeoJSON Feature", + "type": "object", + "required": [ + "type", + "properties", + "geometry" + ], + "properties": { + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "geometry": { + "oneOf": [ + { + "type": "null" + }, + { + "title": "GeoJSON Point", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "coordinates": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + }, + "type": { + "type": "string", + "enum": [ + "Point" + ] + } + } + }, + { + "title": "GeoJSON LineString", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "coordinates": { + "minItems": 2, + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + }, + "type": { + "type": "string", + "enum": [ + "LineString" + ] + } + } + }, + { + "title": "GeoJSON Polygon", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "coordinates": { + "type": "array", + "items": { + "minItems": 4, + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + } + }, + "type": { + "type": "string", + "enum": [ + "Polygon" + ] + } + } + }, + { + "title": "GeoJSON MultiPoint", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "coordinates": { + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + }, + "type": { + "type": "string", + "enum": [ + "MultiPoint" + ] + } + } + }, + { + "title": "GeoJSON MultiLineString", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "coordinates": { + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + } + }, + "type": { + "type": "string", + "enum": [ + "MultiLineString" + ] + } + } + }, + { + "title": "GeoJSON MultiPolygon", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "coordinates": { + "type": "array", + "items": { + "type": "array", + "items": { + "minItems": 4, + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + } + } + }, + "type": { + "type": "string", + "enum": [ + "MultiPolygon" + ] + } + } + }, + { + "title": "GeoJSON GeometryCollection", + "type": "object", + "required": [ + "type", + "geometries" + ], + "properties": { + "geometries": { + "type": "array", + "items": { + "oneOf": [ + { + "title": "GeoJSON Point", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "coordinates": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + }, + "type": { + "type": "string", + "enum": [ + "Point" + ] + } + } + }, + { + "title": "GeoJSON LineString", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "coordinates": { + "minItems": 2, + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + }, + "type": { + "type": "string", + "enum": [ + "LineString" + ] + } + } + }, + { + "title": "GeoJSON Polygon", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "coordinates": { + "type": "array", + "items": { + "minItems": 4, + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + } + }, + "type": { + "type": "string", + "enum": [ + "Polygon" + ] + } + } + }, + { + "title": "GeoJSON MultiPoint", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "coordinates": { + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + }, + "type": { + "type": "string", + "enum": [ + "MultiPoint" + ] + } + } + }, + { + "title": "GeoJSON MultiLineString", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "coordinates": { + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + } + }, + "type": { + "type": "string", + "enum": [ + "MultiLineString" + ] + } + } + }, + { + "title": "GeoJSON MultiPolygon", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "coordinates": { + "type": "array", + "items": { + "type": "array", + "items": { + "minItems": 4, + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + } + } + }, + "type": { + "type": "string", + "enum": [ + "MultiPolygon" + ] + } + } + } + ] + } + }, + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "type": { + "type": "string", + "enum": [ + "GeometryCollection" + ] + } + } + } + ] + }, + "type": { + "type": "string", + "enum": [ + "Feature" + ] + }, + "properties": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object" + } + ] + } + } + } + }, + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + } + }, + "$id": "https://geojson.org/schema/FeatureCollection.json" + } + } + } +} \ No newline at end of file diff --git a/testing/schema-test-core/src/test/resources/input_payloads/inputPayloadWithEmptySource.json b/testing/schema-test-core/src/test/resources/input_payloads/inputPayloadWithEmptySource.json new file mode 100644 index 00000000..efc97539 --- /dev/null +++ b/testing/schema-test-core/src/test/resources/input_payloads/inputPayloadWithEmptySource.json @@ -0,0 +1,544 @@ +{ + "schemaInfo": { + "schemaIdentity": { + "authority": "testAuthority3", + "source": "", + "entityType": "testEntity3", + "schemaVersionMajor": 1, + "schemaVersionMinor": 1, + "schemaVersionPatch": 0, + "id": "testAuthority3::testEntity3:1.1.0" + }, + "status": "DEVELOPMENT" + }, + "schema": { + "$schema": "http://json-schema.org/draft-07/schema#", + "description": "The entity well.", + "title": "Well", + "type": "object", + "x-slb-lifecycle-state": "published", + "definitions": { + "FeatureCollection": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "GeoJSON FeatureCollection", + "type": "object", + "required": [ + "type", + "features" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "FeatureCollection" + ] + }, + "features": { + "type": "array", + "items": { + "title": "GeoJSON Feature", + "type": "object", + "required": [ + "type", + "properties", + "geometry" + ], + "properties": { + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "geometry": { + "oneOf": [ + { + "type": "null" + }, + { + "title": "GeoJSON Point", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "coordinates": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + }, + "type": { + "type": "string", + "enum": [ + "Point" + ] + } + } + }, + { + "title": "GeoJSON LineString", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "coordinates": { + "minItems": 2, + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + }, + "type": { + "type": "string", + "enum": [ + "LineString" + ] + } + } + }, + { + "title": "GeoJSON Polygon", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "coordinates": { + "type": "array", + "items": { + "minItems": 4, + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + } + }, + "type": { + "type": "string", + "enum": [ + "Polygon" + ] + } + } + }, + { + "title": "GeoJSON MultiPoint", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "coordinates": { + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + }, + "type": { + "type": "string", + "enum": [ + "MultiPoint" + ] + } + } + }, + { + "title": "GeoJSON MultiLineString", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "coordinates": { + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + } + }, + "type": { + "type": "string", + "enum": [ + "MultiLineString" + ] + } + } + }, + { + "title": "GeoJSON MultiPolygon", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "coordinates": { + "type": "array", + "items": { + "type": "array", + "items": { + "minItems": 4, + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + } + } + }, + "type": { + "type": "string", + "enum": [ + "MultiPolygon" + ] + } + } + }, + { + "title": "GeoJSON GeometryCollection", + "type": "object", + "required": [ + "type", + "geometries" + ], + "properties": { + "geometries": { + "type": "array", + "items": { + "oneOf": [ + { + "title": "GeoJSON Point", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "coordinates": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + }, + "type": { + "type": "string", + "enum": [ + "Point" + ] + } + } + }, + { + "title": "GeoJSON LineString", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "coordinates": { + "minItems": 2, + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + }, + "type": { + "type": "string", + "enum": [ + "LineString" + ] + } + } + }, + { + "title": "GeoJSON Polygon", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "coordinates": { + "type": "array", + "items": { + "minItems": 4, + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + } + }, + "type": { + "type": "string", + "enum": [ + "Polygon" + ] + } + } + }, + { + "title": "GeoJSON MultiPoint", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "coordinates": { + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + }, + "type": { + "type": "string", + "enum": [ + "MultiPoint" + ] + } + } + }, + { + "title": "GeoJSON MultiLineString", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "coordinates": { + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + } + }, + "type": { + "type": "string", + "enum": [ + "MultiLineString" + ] + } + } + }, + { + "title": "GeoJSON MultiPolygon", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "coordinates": { + "type": "array", + "items": { + "type": "array", + "items": { + "minItems": 4, + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + } + } + }, + "type": { + "type": "string", + "enum": [ + "MultiPolygon" + ] + } + } + } + ] + } + }, + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "type": { + "type": "string", + "enum": [ + "GeometryCollection" + ] + } + } + } + ] + }, + "type": { + "type": "string", + "enum": [ + "Feature" + ] + }, + "properties": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object" + } + ] + } + } + } + }, + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + } + }, + "$id": "https://geojson.org/schema/FeatureCollection.json" + } + } + } +} \ No newline at end of file diff --git a/testing/schema-test-core/src/test/resources/output_payloads/EmptyAuthorityPayload.json b/testing/schema-test-core/src/test/resources/output_payloads/EmptyAuthorityPayload.json new file mode 100644 index 00000000..15bfd759 --- /dev/null +++ b/testing/schema-test-core/src/test/resources/output_payloads/EmptyAuthorityPayload.json @@ -0,0 +1,13 @@ +{ + "error": { + "code": 400, + "message": "Validation Error", + "errors": [ + { + "domain": "global", + "reason": "badRequest", + "message": "authority must not be empty" + } + ] + } +} \ No newline at end of file diff --git a/testing/schema-test-core/src/test/resources/output_payloads/EmptyEntityPayload.json b/testing/schema-test-core/src/test/resources/output_payloads/EmptyEntityPayload.json new file mode 100644 index 00000000..a41b1f3a --- /dev/null +++ b/testing/schema-test-core/src/test/resources/output_payloads/EmptyEntityPayload.json @@ -0,0 +1,13 @@ +{ + "error": { + "code": 400, + "message": "Validation Error", + "errors": [ + { + "domain": "global", + "reason": "badRequest", + "message": "entityType must not be empty" + } + ] + } +} \ No newline at end of file diff --git a/testing/schema-test-core/src/test/resources/output_payloads/EmptySourcePayload.json b/testing/schema-test-core/src/test/resources/output_payloads/EmptySourcePayload.json new file mode 100644 index 00000000..851ab58c --- /dev/null +++ b/testing/schema-test-core/src/test/resources/output_payloads/EmptySourcePayload.json @@ -0,0 +1,13 @@ +{ + "error": { + "code": 400, + "message": "Validation Error", + "errors": [ + { + "domain": "global", + "reason": "badRequest", + "message": "source must not be empty" + } + ] + } +} \ No newline at end of file -- GitLab From a467afdfe084b00853dbab9e4695427afb52d86a Mon Sep 17 00:00:00 2001 From: AArora3 Date: Thu, 31 Mar 2022 15:00:08 +0530 Subject: [PATCH 06/15] fixed comments --- .../schema/constants/SchemaConstants.java | 2 +- .../osdu/schema/model/SchemaIdentity.java | 6 +- .../osdu/schema/api/SchemaControllerTest.java | 76 +++ .../inputPayloadWithEmptyAuthority.json | 534 +----------------- .../inputPayloadWithEmptyEntity.json | 528 +---------------- .../inputPayloadWithEmptySource.json | 534 +----------------- .../EmptyAuthorityPayload.json | 2 +- .../output_payloads/EmptyEntityPayload.json | 2 +- .../output_payloads/EmptySourcePayload.json | 2 +- 9 files changed, 92 insertions(+), 1594 deletions(-) diff --git a/schema-core/src/main/java/org/opengroup/osdu/schema/constants/SchemaConstants.java b/schema-core/src/main/java/org/opengroup/osdu/schema/constants/SchemaConstants.java index 38af6fb5..c4622126 100644 --- a/schema-core/src/main/java/org/opengroup/osdu/schema/constants/SchemaConstants.java +++ b/schema-core/src/main/java/org/opengroup/osdu/schema/constants/SchemaConstants.java @@ -21,7 +21,7 @@ public class SchemaConstants { public static final String SCHEMA_KIND_DELIMITER = ":"; public static final String SCHEMA_Version_DELIMITER = "."; public static final String SCHEMA_KIND_REGEX="^([^.:\\r\\n\\s]+):([^.:\\r\\n\\s]+):([^.:\\r\\n\\s]+):(([\\d]+)[.]([\\d]+)[.]([\\d]+))$"; - public static final String SCHEMA_EMPTY_REGEX = "^(?!\\s*$).+"; + public static final String SCHEMA_EMPTY_REGEX = "^[\\w\\-\\.]+$"; // schema public static final String SCHEMA_KIND = "schema"; diff --git a/schema-core/src/main/java/org/opengroup/osdu/schema/model/SchemaIdentity.java b/schema-core/src/main/java/org/opengroup/osdu/schema/model/SchemaIdentity.java index b2b2424d..5809f68b 100644 --- a/schema-core/src/main/java/org/opengroup/osdu/schema/model/SchemaIdentity.java +++ b/schema-core/src/main/java/org/opengroup/osdu/schema/model/SchemaIdentity.java @@ -16,15 +16,15 @@ import org.opengroup.osdu.schema.constants.SchemaConstants; public class SchemaIdentity { @NotNull(message = "authority must not be null") - @Pattern(regexp = SchemaConstants.SCHEMA_EMPTY_REGEX, message = "authority must not be empty") + @Pattern(regexp = SchemaConstants.SCHEMA_EMPTY_REGEX, message = "authority must not contain whitespaces and special characters except - and .") private String authority; @NotNull(message = "source must not be null") - @Pattern(regexp = SchemaConstants.SCHEMA_EMPTY_REGEX, message = "source must not be empty") + @Pattern(regexp = SchemaConstants.SCHEMA_EMPTY_REGEX, message = "source must not contain whitespaces and special characters except - and .") private String source; @NotNull(message = "entityType must not be null") - @Pattern(regexp = SchemaConstants.SCHEMA_EMPTY_REGEX, message = "entityType must not be empty") + @Pattern(regexp = SchemaConstants.SCHEMA_EMPTY_REGEX, message = "entityType must not contain whitespaces and special characters except - and .") private String entityType; @NotNull(message = "schemaVersionMajor must not be null") diff --git a/schema-core/src/test/java/org/opengroup/osdu/schema/api/SchemaControllerTest.java b/schema-core/src/test/java/org/opengroup/osdu/schema/api/SchemaControllerTest.java index 75b6e4c8..8b2eff8a 100644 --- a/schema-core/src/test/java/org/opengroup/osdu/schema/api/SchemaControllerTest.java +++ b/schema-core/src/test/java/org/opengroup/osdu/schema/api/SchemaControllerTest.java @@ -103,6 +103,38 @@ public class SchemaControllerTest { assertNotNull(schemaController.createSchema(schemaRequest)); } + @Test(expected = BadRequestException.class) + public void testCreateAuthoritySchemaSpecialCharacters_Failed() throws ApplicationException, BadRequestException { + schemaRequest = getSchemaRequestSpecialCharactersAuthority(); + + when(schemaService.createSchema(schemaRequest)).thenThrow(BadRequestException.class); + assertNotNull(schemaController.createSchema(schemaRequest)); + } + + @Test(expected = BadRequestException.class) + public void testCreateSourceSchemaSpecialCharacters_Failed() throws ApplicationException, BadRequestException { + schemaRequest = getSchemaRequestSpecialCharactersSource(); + + when(schemaService.createSchema(schemaRequest)).thenThrow(BadRequestException.class); + assertNotNull(schemaController.createSchema(schemaRequest)); + } + + @Test(expected = BadRequestException.class) + public void testCreateEntitySchemaSpecialCharacters_Failed() throws ApplicationException, BadRequestException { + schemaRequest = getSchemaRequestSpecialCharactersEntity(); + + when(schemaService.createSchema(schemaRequest)).thenThrow(BadRequestException.class); + assertNotNull(schemaController.createSchema(schemaRequest)); + } + + @Test(expected = BadRequestException.class) + public void testCreateAuthorityMultipleSpaces_Failed() throws ApplicationException, BadRequestException { + schemaRequest = getSchemaRequestMultipleSpacesAuthority(); + + when(schemaService.createSchema(schemaRequest)).thenThrow(BadRequestException.class); + assertNotNull(schemaController.createSchema(schemaRequest)); + } + @Test public void testGetSchemaInfoList() throws ApplicationException, NotFoundException, BadRequestException { schemaRequest = getSchemaRequestObject(); @@ -178,4 +210,48 @@ public class SchemaControllerTest { .schemaVersionMajor(1L).schemaVersionMinor(1L).source("").build()) .build()).build(); } + + private SchemaRequest getSchemaRequestSpecialCharactersAuthority() { + return SchemaRequest.builder().schema(null).schemaInfo(SchemaInfo.builder().createdBy("creator") + .dateCreated(new Date(System.currentTimeMillis())) + .schemaIdentity(SchemaIdentity.builder().authority(" :").entityType("well").id(" :.well.1.1") + .schemaVersionMajor(1L).schemaVersionMinor(1L).source("").build()) + .scope(SchemaScope.INTERNAL).status(SchemaStatus.DEVELOPMENT) + .supersededBy(SchemaIdentity.builder().authority(" :").entityType("well").id(" :.well.1.4") + .schemaVersionMajor(1L).schemaVersionMinor(1L).source("").build()) + .build()).build(); + } + + private SchemaRequest getSchemaRequestSpecialCharactersSource() { + return SchemaRequest.builder().schema(null).schemaInfo(SchemaInfo.builder().createdBy("creator") + .dateCreated(new Date(System.currentTimeMillis())) + .schemaIdentity(SchemaIdentity.builder().authority("os").entityType("well").id("os. :.1.1") + .schemaVersionMajor(1L).schemaVersionMinor(1L).source(" :").build()) + .scope(SchemaScope.INTERNAL).status(SchemaStatus.DEVELOPMENT) + .supersededBy(SchemaIdentity.builder().authority("os").entityType("well").id("os. :.1.4") + .schemaVersionMajor(1L).schemaVersionMinor(1L).source(" :").build()) + .build()).build(); + } + + private SchemaRequest getSchemaRequestSpecialCharactersEntity() { + return SchemaRequest.builder().schema(null).schemaInfo(SchemaInfo.builder().createdBy("creator") + .dateCreated(new Date(System.currentTimeMillis())) + .schemaIdentity(SchemaIdentity.builder().authority("os").entityType(" :").id("os.source. :.1.1") + .schemaVersionMajor(1L).schemaVersionMinor(1L).source("source").build()) + .scope(SchemaScope.INTERNAL).status(SchemaStatus.DEVELOPMENT) + .supersededBy(SchemaIdentity.builder().authority("os").entityType(" :").id("os.source. :.1.4") + .schemaVersionMajor(1L).schemaVersionMinor(1L).source("source").build()) + .build()).build(); + } + + private SchemaRequest getSchemaRequestMultipleSpacesAuthority() { + return SchemaRequest.builder().schema(null).schemaInfo(SchemaInfo.builder().createdBy("creator") + .dateCreated(new Date(System.currentTimeMillis())) + .schemaIdentity(SchemaIdentity.builder().authority(" ").entityType("well").id(" .source.well.1.1") + .schemaVersionMajor(1L).schemaVersionMinor(1L).source("source").build()) + .scope(SchemaScope.INTERNAL).status(SchemaStatus.DEVELOPMENT) + .supersededBy(SchemaIdentity.builder().authority(" ").entityType("well").id(" .source.well.1.4") + .schemaVersionMajor(1L).schemaVersionMinor(1L).source("source").build()) + .build()).build(); + } } \ No newline at end of file diff --git a/testing/schema-test-core/src/test/resources/input_payloads/inputPayloadWithEmptyAuthority.json b/testing/schema-test-core/src/test/resources/input_payloads/inputPayloadWithEmptyAuthority.json index a4477210..26d86843 100644 --- a/testing/schema-test-core/src/test/resources/input_payloads/inputPayloadWithEmptyAuthority.json +++ b/testing/schema-test-core/src/test/resources/input_payloads/inputPayloadWithEmptyAuthority.json @@ -2,543 +2,17 @@ "schemaInfo": { "schemaIdentity": { "authority": "", - "source": "testSource1", - "entityType": "testEntity1", + "source": "testSource", + "entityType": "testEntity", "schemaVersionMajor": 1, "schemaVersionMinor": 1, "schemaVersionPatch": 0, - "id": ":testSource1:testEntity1:1.1.0" + "id": ":testSource:testEntity:1.1.0" }, "status": "DEVELOPMENT" }, "schema": { "$schema": "http://json-schema.org/draft-07/schema#", - "description": "The entity well.", - "title": "Well", - "type": "object", - "x-slb-lifecycle-state": "published", - "definitions": { - "FeatureCollection": { - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "GeoJSON FeatureCollection", - "type": "object", - "required": [ - "type", - "features" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "FeatureCollection" - ] - }, - "features": { - "type": "array", - "items": { - "title": "GeoJSON Feature", - "type": "object", - "required": [ - "type", - "properties", - "geometry" - ], - "properties": { - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - }, - "geometry": { - "oneOf": [ - { - "type": "null" - }, - { - "title": "GeoJSON Point", - "type": "object", - "required": [ - "type", - "coordinates" - ], - "properties": { - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - }, - "coordinates": { - "minItems": 2, - "type": "array", - "items": { - "type": "number" - } - }, - "type": { - "type": "string", - "enum": [ - "Point" - ] - } - } - }, - { - "title": "GeoJSON LineString", - "type": "object", - "required": [ - "type", - "coordinates" - ], - "properties": { - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - }, - "coordinates": { - "minItems": 2, - "type": "array", - "items": { - "minItems": 2, - "type": "array", - "items": { - "type": "number" - } - } - }, - "type": { - "type": "string", - "enum": [ - "LineString" - ] - } - } - }, - { - "title": "GeoJSON Polygon", - "type": "object", - "required": [ - "type", - "coordinates" - ], - "properties": { - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - }, - "coordinates": { - "type": "array", - "items": { - "minItems": 4, - "type": "array", - "items": { - "minItems": 2, - "type": "array", - "items": { - "type": "number" - } - } - } - }, - "type": { - "type": "string", - "enum": [ - "Polygon" - ] - } - } - }, - { - "title": "GeoJSON MultiPoint", - "type": "object", - "required": [ - "type", - "coordinates" - ], - "properties": { - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - }, - "coordinates": { - "type": "array", - "items": { - "minItems": 2, - "type": "array", - "items": { - "type": "number" - } - } - }, - "type": { - "type": "string", - "enum": [ - "MultiPoint" - ] - } - } - }, - { - "title": "GeoJSON MultiLineString", - "type": "object", - "required": [ - "type", - "coordinates" - ], - "properties": { - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - }, - "coordinates": { - "type": "array", - "items": { - "minItems": 2, - "type": "array", - "items": { - "minItems": 2, - "type": "array", - "items": { - "type": "number" - } - } - } - }, - "type": { - "type": "string", - "enum": [ - "MultiLineString" - ] - } - } - }, - { - "title": "GeoJSON MultiPolygon", - "type": "object", - "required": [ - "type", - "coordinates" - ], - "properties": { - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - }, - "coordinates": { - "type": "array", - "items": { - "type": "array", - "items": { - "minItems": 4, - "type": "array", - "items": { - "minItems": 2, - "type": "array", - "items": { - "type": "number" - } - } - } - } - }, - "type": { - "type": "string", - "enum": [ - "MultiPolygon" - ] - } - } - }, - { - "title": "GeoJSON GeometryCollection", - "type": "object", - "required": [ - "type", - "geometries" - ], - "properties": { - "geometries": { - "type": "array", - "items": { - "oneOf": [ - { - "title": "GeoJSON Point", - "type": "object", - "required": [ - "type", - "coordinates" - ], - "properties": { - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - }, - "coordinates": { - "minItems": 2, - "type": "array", - "items": { - "type": "number" - } - }, - "type": { - "type": "string", - "enum": [ - "Point" - ] - } - } - }, - { - "title": "GeoJSON LineString", - "type": "object", - "required": [ - "type", - "coordinates" - ], - "properties": { - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - }, - "coordinates": { - "minItems": 2, - "type": "array", - "items": { - "minItems": 2, - "type": "array", - "items": { - "type": "number" - } - } - }, - "type": { - "type": "string", - "enum": [ - "LineString" - ] - } - } - }, - { - "title": "GeoJSON Polygon", - "type": "object", - "required": [ - "type", - "coordinates" - ], - "properties": { - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - }, - "coordinates": { - "type": "array", - "items": { - "minItems": 4, - "type": "array", - "items": { - "minItems": 2, - "type": "array", - "items": { - "type": "number" - } - } - } - }, - "type": { - "type": "string", - "enum": [ - "Polygon" - ] - } - } - }, - { - "title": "GeoJSON MultiPoint", - "type": "object", - "required": [ - "type", - "coordinates" - ], - "properties": { - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - }, - "coordinates": { - "type": "array", - "items": { - "minItems": 2, - "type": "array", - "items": { - "type": "number" - } - } - }, - "type": { - "type": "string", - "enum": [ - "MultiPoint" - ] - } - } - }, - { - "title": "GeoJSON MultiLineString", - "type": "object", - "required": [ - "type", - "coordinates" - ], - "properties": { - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - }, - "coordinates": { - "type": "array", - "items": { - "minItems": 2, - "type": "array", - "items": { - "minItems": 2, - "type": "array", - "items": { - "type": "number" - } - } - } - }, - "type": { - "type": "string", - "enum": [ - "MultiLineString" - ] - } - } - }, - { - "title": "GeoJSON MultiPolygon", - "type": "object", - "required": [ - "type", - "coordinates" - ], - "properties": { - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - }, - "coordinates": { - "type": "array", - "items": { - "type": "array", - "items": { - "minItems": 4, - "type": "array", - "items": { - "minItems": 2, - "type": "array", - "items": { - "type": "number" - } - } - } - } - }, - "type": { - "type": "string", - "enum": [ - "MultiPolygon" - ] - } - } - } - ] - } - }, - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - }, - "type": { - "type": "string", - "enum": [ - "GeometryCollection" - ] - } - } - } - ] - }, - "type": { - "type": "string", - "enum": [ - "Feature" - ] - }, - "properties": { - "oneOf": [ - { - "type": "null" - }, - { - "type": "object" - } - ] - } - } - } - }, - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - } - }, - "$id": "https://geojson.org/schema/FeatureCollection.json" - } - } + "description": "The entity well." } } \ No newline at end of file diff --git a/testing/schema-test-core/src/test/resources/input_payloads/inputPayloadWithEmptyEntity.json b/testing/schema-test-core/src/test/resources/input_payloads/inputPayloadWithEmptyEntity.json index a3e09801..f6818a38 100644 --- a/testing/schema-test-core/src/test/resources/input_payloads/inputPayloadWithEmptyEntity.json +++ b/testing/schema-test-core/src/test/resources/input_payloads/inputPayloadWithEmptyEntity.json @@ -13,532 +13,6 @@ }, "schema": { "$schema": "http://json-schema.org/draft-07/schema#", - "description": "The entity well.", - "title": "Well", - "type": "object", - "x-slb-lifecycle-state": "published", - "definitions": { - "FeatureCollection": { - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "GeoJSON FeatureCollection", - "type": "object", - "required": [ - "type", - "features" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "FeatureCollection" - ] - }, - "features": { - "type": "array", - "items": { - "title": "GeoJSON Feature", - "type": "object", - "required": [ - "type", - "properties", - "geometry" - ], - "properties": { - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - }, - "geometry": { - "oneOf": [ - { - "type": "null" - }, - { - "title": "GeoJSON Point", - "type": "object", - "required": [ - "type", - "coordinates" - ], - "properties": { - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - }, - "coordinates": { - "minItems": 2, - "type": "array", - "items": { - "type": "number" - } - }, - "type": { - "type": "string", - "enum": [ - "Point" - ] - } - } - }, - { - "title": "GeoJSON LineString", - "type": "object", - "required": [ - "type", - "coordinates" - ], - "properties": { - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - }, - "coordinates": { - "minItems": 2, - "type": "array", - "items": { - "minItems": 2, - "type": "array", - "items": { - "type": "number" - } - } - }, - "type": { - "type": "string", - "enum": [ - "LineString" - ] - } - } - }, - { - "title": "GeoJSON Polygon", - "type": "object", - "required": [ - "type", - "coordinates" - ], - "properties": { - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - }, - "coordinates": { - "type": "array", - "items": { - "minItems": 4, - "type": "array", - "items": { - "minItems": 2, - "type": "array", - "items": { - "type": "number" - } - } - } - }, - "type": { - "type": "string", - "enum": [ - "Polygon" - ] - } - } - }, - { - "title": "GeoJSON MultiPoint", - "type": "object", - "required": [ - "type", - "coordinates" - ], - "properties": { - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - }, - "coordinates": { - "type": "array", - "items": { - "minItems": 2, - "type": "array", - "items": { - "type": "number" - } - } - }, - "type": { - "type": "string", - "enum": [ - "MultiPoint" - ] - } - } - }, - { - "title": "GeoJSON MultiLineString", - "type": "object", - "required": [ - "type", - "coordinates" - ], - "properties": { - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - }, - "coordinates": { - "type": "array", - "items": { - "minItems": 2, - "type": "array", - "items": { - "minItems": 2, - "type": "array", - "items": { - "type": "number" - } - } - } - }, - "type": { - "type": "string", - "enum": [ - "MultiLineString" - ] - } - } - }, - { - "title": "GeoJSON MultiPolygon", - "type": "object", - "required": [ - "type", - "coordinates" - ], - "properties": { - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - }, - "coordinates": { - "type": "array", - "items": { - "type": "array", - "items": { - "minItems": 4, - "type": "array", - "items": { - "minItems": 2, - "type": "array", - "items": { - "type": "number" - } - } - } - } - }, - "type": { - "type": "string", - "enum": [ - "MultiPolygon" - ] - } - } - }, - { - "title": "GeoJSON GeometryCollection", - "type": "object", - "required": [ - "type", - "geometries" - ], - "properties": { - "geometries": { - "type": "array", - "items": { - "oneOf": [ - { - "title": "GeoJSON Point", - "type": "object", - "required": [ - "type", - "coordinates" - ], - "properties": { - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - }, - "coordinates": { - "minItems": 2, - "type": "array", - "items": { - "type": "number" - } - }, - "type": { - "type": "string", - "enum": [ - "Point" - ] - } - } - }, - { - "title": "GeoJSON LineString", - "type": "object", - "required": [ - "type", - "coordinates" - ], - "properties": { - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - }, - "coordinates": { - "minItems": 2, - "type": "array", - "items": { - "minItems": 2, - "type": "array", - "items": { - "type": "number" - } - } - }, - "type": { - "type": "string", - "enum": [ - "LineString" - ] - } - } - }, - { - "title": "GeoJSON Polygon", - "type": "object", - "required": [ - "type", - "coordinates" - ], - "properties": { - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - }, - "coordinates": { - "type": "array", - "items": { - "minItems": 4, - "type": "array", - "items": { - "minItems": 2, - "type": "array", - "items": { - "type": "number" - } - } - } - }, - "type": { - "type": "string", - "enum": [ - "Polygon" - ] - } - } - }, - { - "title": "GeoJSON MultiPoint", - "type": "object", - "required": [ - "type", - "coordinates" - ], - "properties": { - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - }, - "coordinates": { - "type": "array", - "items": { - "minItems": 2, - "type": "array", - "items": { - "type": "number" - } - } - }, - "type": { - "type": "string", - "enum": [ - "MultiPoint" - ] - } - } - }, - { - "title": "GeoJSON MultiLineString", - "type": "object", - "required": [ - "type", - "coordinates" - ], - "properties": { - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - }, - "coordinates": { - "type": "array", - "items": { - "minItems": 2, - "type": "array", - "items": { - "minItems": 2, - "type": "array", - "items": { - "type": "number" - } - } - } - }, - "type": { - "type": "string", - "enum": [ - "MultiLineString" - ] - } - } - }, - { - "title": "GeoJSON MultiPolygon", - "type": "object", - "required": [ - "type", - "coordinates" - ], - "properties": { - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - }, - "coordinates": { - "type": "array", - "items": { - "type": "array", - "items": { - "minItems": 4, - "type": "array", - "items": { - "minItems": 2, - "type": "array", - "items": { - "type": "number" - } - } - } - } - }, - "type": { - "type": "string", - "enum": [ - "MultiPolygon" - ] - } - } - } - ] - } - }, - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - }, - "type": { - "type": "string", - "enum": [ - "GeometryCollection" - ] - } - } - } - ] - }, - "type": { - "type": "string", - "enum": [ - "Feature" - ] - }, - "properties": { - "oneOf": [ - { - "type": "null" - }, - { - "type": "object" - } - ] - } - } - } - }, - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - } - }, - "$id": "https://geojson.org/schema/FeatureCollection.json" - } - } + "description": "The entity well." } } \ No newline at end of file diff --git a/testing/schema-test-core/src/test/resources/input_payloads/inputPayloadWithEmptySource.json b/testing/schema-test-core/src/test/resources/input_payloads/inputPayloadWithEmptySource.json index efc97539..39c25196 100644 --- a/testing/schema-test-core/src/test/resources/input_payloads/inputPayloadWithEmptySource.json +++ b/testing/schema-test-core/src/test/resources/input_payloads/inputPayloadWithEmptySource.json @@ -1,544 +1,18 @@ { "schemaInfo": { "schemaIdentity": { - "authority": "testAuthority3", + "authority": "testAuthority2", "source": "", - "entityType": "testEntity3", + "entityType": "testEntity", "schemaVersionMajor": 1, "schemaVersionMinor": 1, "schemaVersionPatch": 0, - "id": "testAuthority3::testEntity3:1.1.0" + "id": "testAuthority2::testEntity:1.1.0" }, "status": "DEVELOPMENT" }, "schema": { "$schema": "http://json-schema.org/draft-07/schema#", - "description": "The entity well.", - "title": "Well", - "type": "object", - "x-slb-lifecycle-state": "published", - "definitions": { - "FeatureCollection": { - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "GeoJSON FeatureCollection", - "type": "object", - "required": [ - "type", - "features" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "FeatureCollection" - ] - }, - "features": { - "type": "array", - "items": { - "title": "GeoJSON Feature", - "type": "object", - "required": [ - "type", - "properties", - "geometry" - ], - "properties": { - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - }, - "geometry": { - "oneOf": [ - { - "type": "null" - }, - { - "title": "GeoJSON Point", - "type": "object", - "required": [ - "type", - "coordinates" - ], - "properties": { - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - }, - "coordinates": { - "minItems": 2, - "type": "array", - "items": { - "type": "number" - } - }, - "type": { - "type": "string", - "enum": [ - "Point" - ] - } - } - }, - { - "title": "GeoJSON LineString", - "type": "object", - "required": [ - "type", - "coordinates" - ], - "properties": { - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - }, - "coordinates": { - "minItems": 2, - "type": "array", - "items": { - "minItems": 2, - "type": "array", - "items": { - "type": "number" - } - } - }, - "type": { - "type": "string", - "enum": [ - "LineString" - ] - } - } - }, - { - "title": "GeoJSON Polygon", - "type": "object", - "required": [ - "type", - "coordinates" - ], - "properties": { - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - }, - "coordinates": { - "type": "array", - "items": { - "minItems": 4, - "type": "array", - "items": { - "minItems": 2, - "type": "array", - "items": { - "type": "number" - } - } - } - }, - "type": { - "type": "string", - "enum": [ - "Polygon" - ] - } - } - }, - { - "title": "GeoJSON MultiPoint", - "type": "object", - "required": [ - "type", - "coordinates" - ], - "properties": { - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - }, - "coordinates": { - "type": "array", - "items": { - "minItems": 2, - "type": "array", - "items": { - "type": "number" - } - } - }, - "type": { - "type": "string", - "enum": [ - "MultiPoint" - ] - } - } - }, - { - "title": "GeoJSON MultiLineString", - "type": "object", - "required": [ - "type", - "coordinates" - ], - "properties": { - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - }, - "coordinates": { - "type": "array", - "items": { - "minItems": 2, - "type": "array", - "items": { - "minItems": 2, - "type": "array", - "items": { - "type": "number" - } - } - } - }, - "type": { - "type": "string", - "enum": [ - "MultiLineString" - ] - } - } - }, - { - "title": "GeoJSON MultiPolygon", - "type": "object", - "required": [ - "type", - "coordinates" - ], - "properties": { - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - }, - "coordinates": { - "type": "array", - "items": { - "type": "array", - "items": { - "minItems": 4, - "type": "array", - "items": { - "minItems": 2, - "type": "array", - "items": { - "type": "number" - } - } - } - } - }, - "type": { - "type": "string", - "enum": [ - "MultiPolygon" - ] - } - } - }, - { - "title": "GeoJSON GeometryCollection", - "type": "object", - "required": [ - "type", - "geometries" - ], - "properties": { - "geometries": { - "type": "array", - "items": { - "oneOf": [ - { - "title": "GeoJSON Point", - "type": "object", - "required": [ - "type", - "coordinates" - ], - "properties": { - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - }, - "coordinates": { - "minItems": 2, - "type": "array", - "items": { - "type": "number" - } - }, - "type": { - "type": "string", - "enum": [ - "Point" - ] - } - } - }, - { - "title": "GeoJSON LineString", - "type": "object", - "required": [ - "type", - "coordinates" - ], - "properties": { - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - }, - "coordinates": { - "minItems": 2, - "type": "array", - "items": { - "minItems": 2, - "type": "array", - "items": { - "type": "number" - } - } - }, - "type": { - "type": "string", - "enum": [ - "LineString" - ] - } - } - }, - { - "title": "GeoJSON Polygon", - "type": "object", - "required": [ - "type", - "coordinates" - ], - "properties": { - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - }, - "coordinates": { - "type": "array", - "items": { - "minItems": 4, - "type": "array", - "items": { - "minItems": 2, - "type": "array", - "items": { - "type": "number" - } - } - } - }, - "type": { - "type": "string", - "enum": [ - "Polygon" - ] - } - } - }, - { - "title": "GeoJSON MultiPoint", - "type": "object", - "required": [ - "type", - "coordinates" - ], - "properties": { - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - }, - "coordinates": { - "type": "array", - "items": { - "minItems": 2, - "type": "array", - "items": { - "type": "number" - } - } - }, - "type": { - "type": "string", - "enum": [ - "MultiPoint" - ] - } - } - }, - { - "title": "GeoJSON MultiLineString", - "type": "object", - "required": [ - "type", - "coordinates" - ], - "properties": { - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - }, - "coordinates": { - "type": "array", - "items": { - "minItems": 2, - "type": "array", - "items": { - "minItems": 2, - "type": "array", - "items": { - "type": "number" - } - } - } - }, - "type": { - "type": "string", - "enum": [ - "MultiLineString" - ] - } - } - }, - { - "title": "GeoJSON MultiPolygon", - "type": "object", - "required": [ - "type", - "coordinates" - ], - "properties": { - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - }, - "coordinates": { - "type": "array", - "items": { - "type": "array", - "items": { - "minItems": 4, - "type": "array", - "items": { - "minItems": 2, - "type": "array", - "items": { - "type": "number" - } - } - } - } - }, - "type": { - "type": "string", - "enum": [ - "MultiPolygon" - ] - } - } - } - ] - } - }, - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - }, - "type": { - "type": "string", - "enum": [ - "GeometryCollection" - ] - } - } - } - ] - }, - "type": { - "type": "string", - "enum": [ - "Feature" - ] - }, - "properties": { - "oneOf": [ - { - "type": "null" - }, - { - "type": "object" - } - ] - } - } - } - }, - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - } - }, - "$id": "https://geojson.org/schema/FeatureCollection.json" - } - } + "description": "The entity well." } } \ No newline at end of file diff --git a/testing/schema-test-core/src/test/resources/output_payloads/EmptyAuthorityPayload.json b/testing/schema-test-core/src/test/resources/output_payloads/EmptyAuthorityPayload.json index 15bfd759..edf582f0 100644 --- a/testing/schema-test-core/src/test/resources/output_payloads/EmptyAuthorityPayload.json +++ b/testing/schema-test-core/src/test/resources/output_payloads/EmptyAuthorityPayload.json @@ -6,7 +6,7 @@ { "domain": "global", "reason": "badRequest", - "message": "authority must not be empty" + "message": "authority must not contain whitespaces and special characters except - and ." } ] } diff --git a/testing/schema-test-core/src/test/resources/output_payloads/EmptyEntityPayload.json b/testing/schema-test-core/src/test/resources/output_payloads/EmptyEntityPayload.json index a41b1f3a..db799f3c 100644 --- a/testing/schema-test-core/src/test/resources/output_payloads/EmptyEntityPayload.json +++ b/testing/schema-test-core/src/test/resources/output_payloads/EmptyEntityPayload.json @@ -6,7 +6,7 @@ { "domain": "global", "reason": "badRequest", - "message": "entityType must not be empty" + "message": "entityType must not contain whitespaces and special characters except - and ." } ] } diff --git a/testing/schema-test-core/src/test/resources/output_payloads/EmptySourcePayload.json b/testing/schema-test-core/src/test/resources/output_payloads/EmptySourcePayload.json index 851ab58c..87f40ade 100644 --- a/testing/schema-test-core/src/test/resources/output_payloads/EmptySourcePayload.json +++ b/testing/schema-test-core/src/test/resources/output_payloads/EmptySourcePayload.json @@ -6,7 +6,7 @@ { "domain": "global", "reason": "badRequest", - "message": "source must not be empty" + "message": "source must not contain whitespaces and special characters except - and ." } ] } -- GitLab From c72e62c2d58dd55f8723071f9d2a7819be3e38d6 Mon Sep 17 00:00:00 2001 From: Shrikant Garg Date: Mon, 28 Mar 2022 10:56:48 +0000 Subject: [PATCH 07/15] Update bootstrap.sh --- deployments/scripts/ibm/bootstrap.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deployments/scripts/ibm/bootstrap.sh b/deployments/scripts/ibm/bootstrap.sh index 34aca40f..9a33054d 100644 --- a/deployments/scripts/ibm/bootstrap.sh +++ b/deployments/scripts/ibm/bootstrap.sh @@ -1,5 +1,5 @@ curl -X DELETE -u $IBM_QA_DB_USER:$IBM_QA_DB_PASSWORD $IBM_QA_DB_URL/oc-cpd-dataecosystem-opendes-schema2 -curl -X DELETE -u $IBM_QA_DB_USER:$IBM_QA_DB_PASSWORD $IBM_QA_DB_URL/oc-cpd-dataecosystem-opendes-schema2 +curl -X DELETE -u $IBM_QA_DB_USER:$IBM_QA_DB_PASSWORD $IBM_QA_DB_URL/oc-cpd-dataecosystem-common-schema2 export IBM_SCHEMA_URL=$IBM_SCHEMA_HOST/api/schema-service/v1/schema BEARER_TOKEN=`python $IBM_DEPLOYMENTS_SUBDIR/Token.py` export BEARER_TOKEN=$BEARER_TOKEN -- GitLab From cab94da7208e034839a0142927e5dc8f435bfb10 Mon Sep 17 00:00:00 2001 From: Paresh Behede Date: Mon, 28 Mar 2022 12:35:11 +0000 Subject: [PATCH 08/15] M11 snapshot schema repo SHA b457e9eb8ce50f5a6904b886a35dff5a73f34daf (2022-03-16) --- ...AbstractAnyCrsFeatureCollection.1.0.0.json | 8 +- .../abstract/AbstractBusinessRule.1.0.0.json | 29 +- .../AbstractColumnBasedTable.1.0.0.json | 159 +++ ...lowSimulationBoundaryConnection.1.0.0.json | 100 ++ .../osdu/abstract/AbstractMetaItem.1.0.0.json | 6 +- .../AbstractReferenceLevel.1.0.0.json | 2 +- .../AbstractRepresentation.1.0.0.json | 6 +- .../AbstractSpatialReference.1.0.0.json | 8 +- .../osdu/dataset/File.OGC.GeoTIFF.1.0.0.json | 8 +- .../osdu/load_sequence.1.0.0.json | 112 +- .../osdu/master-data/ActivityPlan.1.0.0.json | 3 + .../ActivityTemplateArc.1.0.0.json | 2 +- .../osdu/master-data/BHARun.1.0.0.json | 34 + .../master-data/BoundaryFeature.1.0.0.json | 8 +- .../osdu/master-data/FluidsReport.1.0.0.json | 9 +- .../osdu/master-data/FluidsReport.1.1.0.json | 1084 +++++++++++++++++ .../osdu/master-data/ModelFeature.1.0.0.json | 8 +- .../master-data/OperationsReport.1.0.0.json | 91 +- .../osdu/master-data/Organisation.1.1.0.json | 220 ++++ .../master-data/RockVolumeFeature.1.0.0.json | 8 +- .../Seismic2DInterpretationSet.1.1.0.json | 2 +- .../Seismic3DInterpretationSet.1.1.0.json | 2 +- .../SeismicAcquisitionSurvey.1.1.0.json | 2 +- .../SeismicProcessingProject.1.1.0.json | 2 +- .../AzimuthReferenceType.1.0.0.json | 2 +- .../CalculationMethodType.1.0.0.json | 4 +- .../CatalogMapStateType.1.0.0.json | 159 +++ .../CoordinateReferenceSystem.1.0.0.json | 34 +- .../CoordinateTransformation.1.0.0.json | 16 +- .../reference-data/CurveSampleType.1.0.0.json | 159 +++ .../DrillingActivityClassType.1.0.0.json | 2 +- .../ExternalCatalogNamespace.1.0.0.json | 156 +++ .../ExternalUnitOfMeasure.1.0.0.json | 282 +++++ .../ExternalUnitQuantity.1.0.0.json | 234 ++++ .../reference-data/IjkCellFace.1.0.0.json | 159 +++ .../osdu/reference-data/MudClass.1.0.0.json | 2 +- .../reference-data/ObligationType.1.0.0.json | 4 +- .../OperatingEnvironment.1.0.0.json | 2 +- .../QualityDataRuleSet.1.0.0.json | 3 + .../QuantitativeAccuracyBand.1.0.0.json | 4 +- .../VerticalMeasurementPath.1.0.0.json | 4 +- .../VerticalMeasurementType.1.0.0.json | 4 +- .../AquiferInterpretation.1.0.0.json | 185 +++ .../ColumnBasedTable.1.0.0.json | 10 +- .../FaultSystem.1.0.0.json | 5 +- .../FaultSystem.1.1.0.json | 448 +++++++ ...dNumericalAquiferRepresentation.1.0.0.json | 280 +++++ .../SeismicFault.1.0.0.json | 346 ++++++ .../SeismicHorizon.1.1.0.json | 446 +++++++ ...graphicColumnRankInterpretation.1.1.0.json | 260 ++++ .../UnsealedSurfaceFramework.1.1.0.json | 254 ++++ .../work-product-component/WellLog.1.2.0.json | 534 ++++++++ .../WellboreIntervalSet.1.0.0.json | 385 ++++++ .../WellboreMarkerSet.1.2.0.json | 385 ++++++ .../WellboreTrajectory.1.0.0.json | 4 +- .../WellboreTrajectory.1.1.0.json | 4 +- 56 files changed, 6545 insertions(+), 144 deletions(-) create mode 100644 deployments/shared-schemas/osdu/abstract/AbstractColumnBasedTable.1.0.0.json create mode 100644 deployments/shared-schemas/osdu/abstract/AbstractIjkGridFlowSimulationBoundaryConnection.1.0.0.json create mode 100644 deployments/shared-schemas/osdu/master-data/FluidsReport.1.1.0.json create mode 100644 deployments/shared-schemas/osdu/master-data/Organisation.1.1.0.json create mode 100644 deployments/shared-schemas/osdu/reference-data/CatalogMapStateType.1.0.0.json create mode 100644 deployments/shared-schemas/osdu/reference-data/CurveSampleType.1.0.0.json create mode 100644 deployments/shared-schemas/osdu/reference-data/ExternalCatalogNamespace.1.0.0.json create mode 100644 deployments/shared-schemas/osdu/reference-data/ExternalUnitOfMeasure.1.0.0.json create mode 100644 deployments/shared-schemas/osdu/reference-data/ExternalUnitQuantity.1.0.0.json create mode 100644 deployments/shared-schemas/osdu/reference-data/IjkCellFace.1.0.0.json create mode 100644 deployments/shared-schemas/osdu/work-product-component/AquiferInterpretation.1.0.0.json create mode 100644 deployments/shared-schemas/osdu/work-product-component/FaultSystem.1.1.0.json create mode 100644 deployments/shared-schemas/osdu/work-product-component/IjkGridNumericalAquiferRepresentation.1.0.0.json create mode 100644 deployments/shared-schemas/osdu/work-product-component/SeismicFault.1.0.0.json create mode 100644 deployments/shared-schemas/osdu/work-product-component/SeismicHorizon.1.1.0.json create mode 100644 deployments/shared-schemas/osdu/work-product-component/StratigraphicColumnRankInterpretation.1.1.0.json create mode 100644 deployments/shared-schemas/osdu/work-product-component/UnsealedSurfaceFramework.1.1.0.json create mode 100644 deployments/shared-schemas/osdu/work-product-component/WellLog.1.2.0.json create mode 100644 deployments/shared-schemas/osdu/work-product-component/WellboreIntervalSet.1.0.0.json create mode 100644 deployments/shared-schemas/osdu/work-product-component/WellboreMarkerSet.1.2.0.json diff --git a/deployments/shared-schemas/osdu/abstract/AbstractAnyCrsFeatureCollection.1.0.0.json b/deployments/shared-schemas/osdu/abstract/AbstractAnyCrsFeatureCollection.1.0.0.json index 26e6d71a..0e1caa51 100644 --- a/deployments/shared-schemas/osdu/abstract/AbstractAnyCrsFeatureCollection.1.0.0.json +++ b/deployments/shared-schemas/osdu/abstract/AbstractAnyCrsFeatureCollection.1.0.0.json @@ -38,7 +38,7 @@ "description": "The CRS reference into the CoordinateReferenceSystem catalog.", "type": "string", "pattern": "^[\\w\\-\\.]+:reference-data\\-\\-CoordinateReferenceSystem:[\\w\\-\\.\\:\\%]+:[0-9]*$", - "example": "namespace:reference-data--CoordinateReferenceSystem:BoundCRS.SLB.32021.15851:", + "example": "namespace:reference-data--CoordinateReferenceSystem:BoundProjected:EPSG::32021_EPSG::15851:", "x-osdu-relationship": [ { "GroupType": "reference-data", @@ -51,7 +51,7 @@ "description": "The explicit VerticalCRS reference into the CoordinateReferenceSystem catalog. This property stays empty for 2D geometries. Absent or empty values for 3D geometries mean the context may be provided by a CompoundCRS in 'CoordinateReferenceSystemID' or implicitly EPSG:5714 MSL height", "type": "string", "pattern": "^[\\w\\-\\.]+:reference-data\\-\\-CoordinateReferenceSystem:[\\w\\-\\.\\:\\%]+:[0-9]*$", - "example": "namespace:reference-data--CoordinateReferenceSystem:VerticalCRS.EPSG.5773:", + "example": "namespace:reference-data--CoordinateReferenceSystem:Vertical:EPSG::5714:", "x-osdu-relationship": [ { "GroupType": "reference-data", @@ -63,13 +63,13 @@ "type": "string", "title": "CRS Reference", "description": "The CRS reference as persistableReference string. If populated, the CoordinateReferenceSystemID takes precedence.", - "example": "{\"lateBoundCRS\":{\"wkt\":\"PROJCS[\\\"NAD_1927_StatePlane_North_Dakota_South_FIPS_3302\\\",GEOGCS[\\\"GCS_North_American_1927\\\",DATUM[\\\"D_North_American_1927\\\",SPHEROID[\\\"Clarke_1866\\\",6378206.4,294.9786982]],PRIMEM[\\\"Greenwich\\\",0.0],UNIT[\\\"Degree\\\",0.0174532925199433]],PROJECTION[\\\"Lambert_Conformal_Conic\\\"],PARAMETER[\\\"False_Easting\\\",2000000.0],PARAMETER[\\\"False_Northing\\\",0.0],PARAMETER[\\\"Central_Meridian\\\",-100.5],PARAMETER[\\\"Standard_Parallel_1\\\",46.1833333333333],PARAMETER[\\\"Standard_Parallel_2\\\",47.4833333333333],PARAMETER[\\\"Latitude_Of_Origin\\\",45.6666666666667],UNIT[\\\"Foot_US\\\",0.304800609601219],AUTHORITY[\\\"EPSG\\\",32021]]\",\"ver\":\"PE_10_3_1\",\"name\":\"NAD_1927_StatePlane_North_Dakota_South_FIPS_3302\",\"authCode\":{\"auth\":\"EPSG\",\"code\":\"32021\"},\"type\":\"LBC\"},\"singleCT\":{\"wkt\":\"GEOGTRAN[\\\"NAD_1927_To_WGS_1984_79_CONUS\\\",GEOGCS[\\\"GCS_North_American_1927\\\",DATUM[\\\"D_North_American_1927\\\",SPHEROID[\\\"Clarke_1866\\\",6378206.4,294.9786982]],PRIMEM[\\\"Greenwich\\\",0.0],UNIT[\\\"Degree\\\",0.0174532925199433]],GEOGCS[\\\"GCS_WGS_1984\\\",DATUM[\\\"D_WGS_1984\\\",SPHEROID[\\\"WGS_1984\\\",6378137.0,298.257223563]],PRIMEM[\\\"Greenwich\\\",0.0],UNIT[\\\"Degree\\\",0.0174532925199433]],METHOD[\\\"NADCON\\\"],PARAMETER[\\\"Dataset_conus\\\",0.0],AUTHORITY[\\\"EPSG\\\",15851]]\",\"ver\":\"PE_10_3_1\",\"name\":\"NAD_1927_To_WGS_1984_79_CONUS\",\"authCode\":{\"auth\":\"EPSG\",\"code\":\"15851\"},\"type\":\"ST\"},\"ver\":\"PE_10_3_1\",\"name\":\"NAD27 * OGP-Usa Conus / North Dakota South [32021,15851]\",\"authCode\":{\"auth\":\"SLB\",\"code\":\"32021079\"},\"type\":\"EBC\"}" + "example": "{\"authCode\":{\"auth\":\"OSDU\",\"code\":\"32021079\"},\"lateBoundCRS\":{\"authCode\":{\"auth\":\"EPSG\",\"code\":\"32021\"},\"name\":\"NAD_1927_StatePlane_North_Dakota_South_FIPS_3302\",\"type\":\"LBC\",\"ver\":\"PE_10_9_1\",\"wkt\":\"PROJCS[\\\"NAD_1927_StatePlane_North_Dakota_South_FIPS_3302\\\",GEOGCS[\\\"GCS_North_American_1927\\\",DATUM[\\\"D_North_American_1927\\\",SPHEROID[\\\"Clarke_1866\\\",6378206.4,294.9786982]],PRIMEM[\\\"Greenwich\\\",0.0],UNIT[\\\"Degree\\\",0.0174532925199433]],PROJECTION[\\\"Lambert_Conformal_Conic\\\"],PARAMETER[\\\"False_Easting\\\",2000000.0],PARAMETER[\\\"False_Northing\\\",0.0],PARAMETER[\\\"Central_Meridian\\\",-100.5],PARAMETER[\\\"Standard_Parallel_1\\\",46.18333333333333],PARAMETER[\\\"Standard_Parallel_2\\\",47.48333333333333],PARAMETER[\\\"Latitude_Of_Origin\\\",45.66666666666666],UNIT[\\\"Foot_US\\\",0.3048006096012192],AUTHORITY[\\\"EPSG\\\",32021]]\"},\"name\":\"NAD27 * OGP-Usa Conus / North Dakota CS27 South zone [32021,15851]\",\"singleCT\":{\"authCode\":{\"auth\":\"EPSG\",\"code\":\"15851\"},\"name\":\"NAD_1927_To_WGS_1984_79_CONUS\",\"type\":\"ST\",\"ver\":\"PE_10_9_1\",\"wkt\":\"GEOGTRAN[\\\"NAD_1927_To_WGS_1984_79_CONUS\\\",GEOGCS[\\\"GCS_North_American_1927\\\",DATUM[\\\"D_North_American_1927\\\",SPHEROID[\\\"Clarke_1866\\\",6378206.4,294.9786982]],PRIMEM[\\\"Greenwich\\\",0.0],UNIT[\\\"Degree\\\",0.0174532925199433]],GEOGCS[\\\"GCS_WGS_1984\\\",DATUM[\\\"D_WGS_1984\\\",SPHEROID[\\\"WGS_1984\\\",6378137.0,298.257223563]],PRIMEM[\\\"Greenwich\\\",0.0],UNIT[\\\"Degree\\\",0.0174532925199433]],METHOD[\\\"NADCON\\\"],PARAMETER[\\\"Dataset_conus\\\",0.0],OPERATIONACCURACY[5.0],AUTHORITY[\\\"EPSG\\\",15851]]\"},\"type\":\"EBC\",\"ver\":\"PE_10_9_1\"}" }, "persistableReferenceVerticalCrs": { "type": "string", "title": "Vertical CRS Reference", "description": "The VerticalCRS reference as persistableReference string. If populated, the VerticalCoordinateReferenceSystemID takes precedence. The property is null or empty for 2D geometries. For 3D geometries and absent or null persistableReferenceVerticalCrs the vertical CRS is either provided via persistableReferenceCrs's CompoundCRS or it is implicitly defined as EPSG:5714 MSL height.", - "example": "{\"authCode\":{\"auth\":\"EPSG\",\"code\":\"5773\"},\"type\":\"LBC\",\"ver\":\"PE_10_3_1\",\"name\":\"EGM96_Geoid\",\"wkt\":\"VERTCS[\\\"EGM96_Geoid\\\",VDATUM[\\\"EGM96_Geoid\\\"],PARAMETER[\\\"Vertical_Shift\\\",0.0],PARAMETER[\\\"Direction\\\",1.0],UNIT[\\\"Meter\\\",1.0],AUTHORITY[\\\"EPSG\\\",5773]]\"}" + "example": "{\"authCode\":{\"auth\":\"EPSG\",\"code\":\"5714\"},\"name\":\"MSL_Height\",\"type\":\"LBC\",\"ver\":\"PE_10_9_1\",\"wkt\":\"VERTCS[\\\"MSL_Height\\\",VDATUM[\\\"Mean_Sea_Level\\\"],PARAMETER[\\\"Vertical_Shift\\\",0.0],PARAMETER[\\\"Direction\\\",1.0],UNIT[\\\"Meter\\\",1.0],AUTHORITY[\\\"EPSG\\\",5714]]\"}" }, "persistableReferenceUnitZ": { "type": "string", diff --git a/deployments/shared-schemas/osdu/abstract/AbstractBusinessRule.1.0.0.json b/deployments/shared-schemas/osdu/abstract/AbstractBusinessRule.1.0.0.json index 0f42cc08..7a4b3675 100644 --- a/deployments/shared-schemas/osdu/abstract/AbstractBusinessRule.1.0.0.json +++ b/deployments/shared-schemas/osdu/abstract/AbstractBusinessRule.1.0.0.json @@ -15,6 +15,7 @@ }, "schema": { "x-osdu-license": "Copyright 2022, The Open Group \\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.", + "x-osdu-review-status": "Accepted", "$id": "https://schema.osdu.opengroup.org/json/abstract/AbstractBusinessRule.1.0.0.json", "$schema": "http://json-schema.org/draft-07/schema#", "x-osdu-schema-source": "osdu:wks:AbstractBusinessRule:1.0.0", @@ -23,13 +24,20 @@ "type": "object", "properties": { "DataRuleSets": { - "description": "The list of data rule sets that is relevant for this business process. Each data rule set reference is associated with a run-status.", "type": "array", + "title": "Data Rule Sets", + "description": "The list of data rule sets that is relevant for this business process. Each data rule set reference is associated with a run-status.", + "x-osdu-indexing": { + "type": "nested" + }, "items": { "type": "object", + "title": "DataRuleSets", + "description": "The list of data rule sets that is relevant for this business process. Each data rule set reference is associated with a run-status.", "properties": { "DataRuleSetID": { "type": "string", + "title": "DataRuleSet ID", "description": "The relationship to the QualityDataRuleSet.", "pattern": "^[\\w\\-\\.]+:reference-data\\-\\-QualityDataRuleSet:[\\w\\-\\.\\:\\%]+:[0-9]*$", "x-osdu-relationship": [ @@ -40,20 +48,28 @@ ] }, "DataRuleSetRunStatus": { - "description": "True if data ruleset rule has passed, False if data ruleset rule dit not pass.", - "type": "boolean" + "type": "boolean", + "title": "DataRuleSet Run Status", + "description": "True if data ruleset rule has passed, False if data ruleset rule dit not pass." } } } }, "DataRules": { - "description": "The list of individual data rules that is relevant for this business process. Each data rule reference is associated with a run-status.", "type": "array", + "title": "Date Rules", + "description": "The list of individual data rules that is relevant for this business process. Each data rule reference is associated with a run-status.", + "x-osdu-indexing": { + "type": "nested" + }, "items": { "type": "object", + "title": "DataRules", + "description": "The list of individual data rules that is relevant for this business process. Each data rule reference is associated with a run-status.", "properties": { "DataRuleID": { "type": "string", + "title": "DataRule ID", "description": "The relationship to the individual QualityDataRule.", "pattern": "^[\\w\\-\\.]+:reference-data\\-\\-QualityDataRule:[\\w\\-\\.\\:\\%]+:[0-9]*$", "x-osdu-relationship": [ @@ -64,8 +80,9 @@ ] }, "DataRuleRunStatus": { - "description": "True if data rule has passed, False if data rule did not pass.", - "type": "boolean" + "type": "boolean", + "title": "DataRule Run Status", + "description": "True if data rule has passed, False if data rule did not pass." } } } diff --git a/deployments/shared-schemas/osdu/abstract/AbstractColumnBasedTable.1.0.0.json b/deployments/shared-schemas/osdu/abstract/AbstractColumnBasedTable.1.0.0.json new file mode 100644 index 00000000..ff7c0f56 --- /dev/null +++ b/deployments/shared-schemas/osdu/abstract/AbstractColumnBasedTable.1.0.0.json @@ -0,0 +1,159 @@ +{ + "schemaInfo": { + "schemaIdentity": { + "authority": "{{schema-authority}}", + "source": "wks", + "entityType": "AbstractColumnBasedTable", + "schemaVersionMajor": 1, + "schemaVersionMinor": 0, + "schemaVersionPatch": 0, + "id": "{{schema-authority}}:wks:AbstractColumnBasedTable:1.0.0" + }, + "createdBy": "OSDU Data Definition Group", + "scope": "SHARED", + "status": "DEVELOPMENT" + }, + "schema": { + "x-osdu-license": "Copyright 2022, The Open Group \\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.", + "x-osdu-review-status": "Accepted", + "$id": "https://schema.osdu.opengroup.org/json/abstract/AbstractColumnBasedTable.1.0.0.json", + "$schema": "http://json-schema.org/draft-07/schema#", + "x-osdu-schema-source": "osdu:wks:AbstractColumnBasedTable:1.0.0", + "title": "AbstractColumnBasedTable", + "description": "The ColumnBasedTable is a set of columns, which have equal length (data.ColumnSize) included by types carrying embedded table properties. Columns have a Property Kind, UnitOfMeasure and Facet. There are KeyColumns (index columns) and Columns (for look-up values). Examples are KrPc, PVT and Facies tables.", + "type": "object", + "properties": { + "KeyColumns": { + "type": "array", + "title": "Key columns", + "description": "A column whose values are considered as keys/indices. Do not use this attribute if you want to follow a given ColumnBasedTableType.", + "x-osdu-indexing": { + "type": "nested" + }, + "items": { + "$ref": "{{schema-authority}}:wks:AbstractReferencePropertyType:1.1.0" + } + }, + "Columns": { + "type": "array", + "title": "Common columns", + "description": "A common column storing values of a particular property kind. Do not use this attribute if you want to follow a given ColumnBasedTableType.", + "x-osdu-indexing": { + "type": "nested" + }, + "items": { + "$ref": "{{schema-authority}}:wks:AbstractReferencePropertyType:1.1.0" + } + }, + "ColumnSize": { + "type": "integer", + "title": "Size of columns", + "description": "The count of elements in each column", + "example": 5 + }, + "ColumnValues": { + "type": "array", + "title": "The values of each column", + "description": "First column values are related to first key column, second column values are related to the second key column, etc\u2026\nColumn values at index KeyColumns count are related to first (non key) column, Column values at index KeyColumns count + 1 are related to second (non key) column, etc...", + "items": { + "type": "object", + "title": "ColumnValues", + "description": "Value of the column. Generally only one of the attribute should be instantiated.", + "properties": { + "BooleanColumn": { + "type": "array", + "title": "Boolean Column", + "description": "A column of only boolean values", + "example": [ + true, + false, + true, + true, + false + ], + "items": { + "type": "boolean" + } + }, + "IntegerColumn": { + "type": "array", + "title": "Integer Column", + "description": "A column of only integer values", + "format": "integer", + "pattern": "^[0-9]+$", + "example": [ + 0, + 1, + 2, + 3, + 4 + ], + "items": { + "type": "integer" + } + }, + "NumberColumn": { + "type": "array", + "title": "Number Column", + "description": "A column of only number values", + "example": [ + 0.1, + 2.3, + 4.5, + 6.7, + 8.9 + ], + "items": { + "type": "number" + } + }, + "StringColumn": { + "type": "array", + "title": "String Column", + "description": "A column of only string values", + "example": [ + "foo", + "bar", + "foo again", + "bar again", + "foo bar" + ], + "items": { + "type": "string" + } + }, + "UndefinedValueRows": { + "type": "array", + "title": "Undefined value rows", + "description": "The row indexes for which the values are flagged as undefined.", + "format": "integer", + "pattern": "^[0-9]+$", + "example": [ + 3, + 4 + ], + "items": { + "type": "integer" + } + } + } + } + }, + "ColumnBasedTableType": { + "type": "string", + "title": "The type of the column based table", + "description": "Quickly indicate the type of the column based table (KrPc, PVT, Facies, ...) and its standard columns definition. It is supposed to be used when you don't use KeyColumns neither Columns as attributes of this WPC.", + "format": "uri-reference", + "example": "namespace:reference-data--ColumnBasedTableType:Facies:", + "pattern": "^[\\w\\-\\.]+:reference-data\\-\\-ColumnBasedTableType:[\\w\\-\\.\\:\\%]+:[0-9]*$", + "x-osdu-relationship": [ + { + "GroupType": "reference-data", + "EntityType": "ColumnBasedTableType" + } + ] + } + }, + "x-osdu-inheriting-from-kind": [] + } +} \ No newline at end of file diff --git a/deployments/shared-schemas/osdu/abstract/AbstractIjkGridFlowSimulationBoundaryConnection.1.0.0.json b/deployments/shared-schemas/osdu/abstract/AbstractIjkGridFlowSimulationBoundaryConnection.1.0.0.json new file mode 100644 index 00000000..899c2790 --- /dev/null +++ b/deployments/shared-schemas/osdu/abstract/AbstractIjkGridFlowSimulationBoundaryConnection.1.0.0.json @@ -0,0 +1,100 @@ +{ + "schemaInfo": { + "schemaIdentity": { + "authority": "{{schema-authority}}", + "source": "wks", + "entityType": "AbstractIjkGridFlowSimulationBoundaryConnection", + "schemaVersionMajor": 1, + "schemaVersionMinor": 0, + "schemaVersionPatch": 0, + "id": "{{schema-authority}}:wks:AbstractIjkGridFlowSimulationBoundaryConnection:1.0.0" + }, + "createdBy": "OSDU Data Definition Group", + "scope": "SHARED", + "status": "DEVELOPMENT" + }, + "schema": { + "x-osdu-license": "Copyright 2022, The Open Group \\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.", + "x-osdu-review-status": "Accepted", + "$id": "https://schema.osdu.opengroup.org/json/abstract/AbstractIjkGridFlowSimulationBoundaryConnection.1.0.0.json", + "$schema": "http://json-schema.org/draft-07/schema#", + "x-osdu-schema-source": "osdu:wks:AbstractIjkGridFlowSimulationBoundaryConnection:1.0.0", + "title": "AbstractIjkGridFlowSimulationBoundaryConnection", + "description": "This structure intends to define the reservoir boundary connection in an IJK grid such as aquifer connection. It can be reused in various Ijk Grid flow simulation related representations which need some boundary connections.", + "type": "object", + "properties": { + "GridID": { + "type": "string", + "title": "Grid ID", + "description": "The grid which is in connection", + "format": "uri-reference", + "example": "namespace:work-product-component--IjkGridRepresentation:85348741-3433-406B-9189-22B298C3E2D2:", + "pattern": "^[\\w\\-\\.]+:work-product-component\\-\\-IjkGridRepresentation:[\\w\\-\\.\\:\\%]+:[0-9]*$", + "x-osdu-relationship": [ + { + "GroupType": "work-product-component", + "EntityType": "IjkGridRepresentation" + } + ] + }, + "LowerI": { + "type": "integer", + "title": "Lower I index", + "description": "The lower included I index of the box of the grid in connection", + "example": 5 + }, + "UpperI": { + "type": "integer", + "title": "Upper I index", + "description": "The upper included I index of the box of the grid in connection", + "example": 10 + }, + "LowerJ": { + "type": "integer", + "title": "Lower J index", + "description": "The lower included J index of the box of the grid in connection", + "example": 1 + }, + "UpperJ": { + "type": "integer", + "title": "Upper J index", + "description": "The upper included J index of the box of the grid in connection", + "example": 1 + }, + "LowerK": { + "type": "integer", + "title": "Lower K index", + "description": "The lower included K index of the box of the grid in connection", + "example": 1 + }, + "UpperK": { + "type": "integer", + "title": "Upper K index", + "description": "The upper included K index of the box of the grid in connection", + "example": 10 + }, + "Face": { + "type": "string", + "title": "Face", + "description": "The faces of the box of the grid which are in connection", + "format": "uri-reference", + "example": "namespace:reference-data--IjkCellFace:J_MINUS:", + "pattern": "^[\\w\\-\\.]+:reference-data\\-\\-IjkCellFace:[\\w\\-\\.\\:\\%]+:[0-9]*$", + "x-osdu-relationship": [ + { + "GroupType": "reference-data", + "EntityType": "IjkCellFace" + } + ] + }, + "TransmissibilityMultiplier": { + "type": "number", + "title": "Transmissibility multiplier", + "description": "The transmissibility multiplier of the connection", + "example": 0.75, + "x-osdu-frame-of-reference": "UOM:dimensionless" + } + }, + "x-osdu-inheriting-from-kind": [] + } +} \ No newline at end of file diff --git a/deployments/shared-schemas/osdu/abstract/AbstractMetaItem.1.0.0.json b/deployments/shared-schemas/osdu/abstract/AbstractMetaItem.1.0.0.json index 70b34749..e4a4d6b9 100644 --- a/deployments/shared-schemas/osdu/abstract/AbstractMetaItem.1.0.0.json +++ b/deployments/shared-schemas/osdu/abstract/AbstractMetaItem.1.0.0.json @@ -85,19 +85,19 @@ "title": "CRS Name", "description": "The name of the CRS.", "type": "string", - "example": "NAD27 * OGP-Usa Conus / North Dakota South [32021,15851]" + "example": "WGS 84 / UTM zone 15N" }, "persistableReference": { "title": "CRS Persistable Reference", "description": "The self-contained, persistable reference string uniquely identifying the CRS.", "type": "string", - "example": "{\"authCode\":{\"auth\":\"EPSG\",\"code\":\"32615\"},\"type\":\"LBC\",\"ver\":\"PE_10_3_1\",\"name\":\"WGS_1984_UTM_Zone_15N\",\"wkt\":\"PROJCS[\\\"WGS_1984_UTM_Zone_15N\\\",GEOGCS[\\\"GCS_WGS_1984\\\",DATUM[\\\"D_WGS_1984\\\",SPHEROID[\\\"WGS_1984\\\",6378137.0,298.257223563]],PRIMEM[\\\"Greenwich\\\",0.0],UNIT[\\\"Degree\\\",0.0174532925199433]],PROJECTION[\\\"Transverse_Mercator\\\"],PARAMETER[\\\"False_Easting\\\",500000.0],PARAMETER[\\\"False_Northing\\\",0.0],PARAMETER[\\\"Central_Meridian\\\",-93.0],PARAMETER[\\\"Scale_Factor\\\",0.9996],PARAMETER[\\\"Latitude_Of_Origin\\\",0.0],UNIT[\\\"Meter\\\",1.0],AUTHORITY[\\\"EPSG\\\",32615]]\"}" + "example": "{\"authCode\":{\"auth\":\"EPSG\",\"code\":\"32615\"},\"name\":\"WGS_1984_UTM_Zone_15N\",\"type\":\"LBC\",\"ver\":\"PE_10_9_1\",\"wkt\":\"PROJCS[\\\"WGS_1984_UTM_Zone_15N\\\",GEOGCS[\\\"GCS_WGS_1984\\\",DATUM[\\\"D_WGS_1984\\\",SPHEROID[\\\"WGS_1984\\\",6378137.0,298.257223563]],PRIMEM[\\\"Greenwich\\\",0.0],UNIT[\\\"Degree\\\",0.0174532925199433]],PROJECTION[\\\"Transverse_Mercator\\\"],PARAMETER[\\\"False_Easting\\\",500000.0],PARAMETER[\\\"False_Northing\\\",0.0],PARAMETER[\\\"Central_Meridian\\\",-93.0],PARAMETER[\\\"Scale_Factor\\\",0.9996],PARAMETER[\\\"Latitude_Of_Origin\\\",0.0],UNIT[\\\"Meter\\\",1.0],AUTHORITY[\\\"EPSG\\\",32615]]\"}" }, "coordinateReferenceSystemID": { "description": "SRN to CRS reference.", "type": "string", "pattern": "^[\\w\\-\\.]+:reference-data\\-\\-CoordinateReferenceSystem:[\\w\\-\\.\\:\\%]+:[0-9]*$", - "example": "namespace:reference-data--CoordinateReferenceSystem:EPSG.32615:", + "example": "namespace:reference-data--CoordinateReferenceSystem:Projected:EPSG::32615:", "x-osdu-relationship": [ { "GroupType": "reference-data", diff --git a/deployments/shared-schemas/osdu/abstract/AbstractReferenceLevel.1.0.0.json b/deployments/shared-schemas/osdu/abstract/AbstractReferenceLevel.1.0.0.json index e3f33806..8ec07abb 100644 --- a/deployments/shared-schemas/osdu/abstract/AbstractReferenceLevel.1.0.0.json +++ b/deployments/shared-schemas/osdu/abstract/AbstractReferenceLevel.1.0.0.json @@ -34,7 +34,7 @@ "type": "string", "title": "Vertical Coordinate Reference System ID", "description": "The relationship to the vertical CRS defining the absolute reference surface.", - "example": "namespace:reference-data--CoordinateReferenceSystem:VerticalCRS.EPSG.5714:", + "example": "namespace:reference-data--CoordinateReferenceSystem:Vertical:EPSG::5714:", "pattern": "^[\\w\\-\\.]+:reference-data\\-\\-CoordinateReferenceSystem:[\\w\\-\\.\\:\\%]+:[0-9]*$", "x-osdu-relationship": [ { diff --git a/deployments/shared-schemas/osdu/abstract/AbstractRepresentation.1.0.0.json b/deployments/shared-schemas/osdu/abstract/AbstractRepresentation.1.0.0.json index cf2def61..0931916a 100644 --- a/deployments/shared-schemas/osdu/abstract/AbstractRepresentation.1.0.0.json +++ b/deployments/shared-schemas/osdu/abstract/AbstractRepresentation.1.0.0.json @@ -28,7 +28,7 @@ "title": "ID of the interpretation", "description": "Allow to link an interpretation with this representation", "format": "uri-reference", - "pattern": "^[\\w\\-\\.]+:(work-product-component\\-\\-EarthModelInterpretation|work-product-component\\-\\-GeobodyBoundaryInterpretation|work-product-component\\-\\-GeobodyInterpretation|work-product-component\\-\\-HorizonInterpretation|work-product-component\\-\\-RockFluidOrganizationInterpretation|work-product-component\\-\\-RockFluidUnitInterpretation|work-product-component\\-\\-StratigraphicUnitInterpretation|work-product-component\\-\\-StructuralOrganizationInterpretation|work-product-component\\-\\-FaultInterpretation):[\\w\\-\\.\\:\\%]+:[0-9]*$", + "pattern": "^[\\w\\-\\.]+:(work-product-component\\-\\-EarthModelInterpretation|work-product-component\\-\\-GeobodyBoundaryInterpretation|work-product-component\\-\\-GeobodyInterpretation|work-product-component\\-\\-HorizonInterpretation|work-product-component\\-\\-RockFluidOrganizationInterpretation|work-product-component\\-\\-RockFluidUnitInterpretation|work-product-component\\-\\-StratigraphicUnitInterpretation|work-product-component\\-\\-StructuralOrganizationInterpretation|work-product-component\\-\\-FaultInterpretation|work-product-component\\-\\-AquiferInterpretation):[\\w\\-\\.\\:\\%]+:[0-9]*$", "x-osdu-relationship": [ { "GroupType": "work-product-component", @@ -65,6 +65,10 @@ { "GroupType": "work-product-component", "EntityType": "FaultInterpretation" + }, + { + "GroupType": "work-product-component", + "EntityType": "AquiferInterpretation" } ] }, diff --git a/deployments/shared-schemas/osdu/abstract/AbstractSpatialReference.1.0.0.json b/deployments/shared-schemas/osdu/abstract/AbstractSpatialReference.1.0.0.json index 4b83df50..0b07b1f2 100644 --- a/deployments/shared-schemas/osdu/abstract/AbstractSpatialReference.1.0.0.json +++ b/deployments/shared-schemas/osdu/abstract/AbstractSpatialReference.1.0.0.json @@ -27,7 +27,7 @@ "type": "string", "title": "Coordinate Reference System ID", "description": "The CRS reference into the CoordinateReferenceSystem reference list.", - "example": "namespace:reference-data--CoordinateReferenceSystem:BoundCRS.OSDU::32021::15851:", + "example": "namespace:reference-data--CoordinateReferenceSystem:BoundProjected:EPSG::32021_EPSG::15851:", "pattern": "^[\\w\\-\\.]+:reference-data\\-\\-CoordinateReferenceSystem:[\\w\\-\\.\\:\\%]+:[0-9]*$", "x-osdu-relationship": [ { @@ -40,7 +40,7 @@ "type": "string", "title": "Vertical Coordinate Reference System ID", "description": "The explicit VerticalCRS reference into the CoordinateReferenceSystem reference list. This property stays empty for 2D geometries. Absent or empty values for 3D geometries mean the context may be provided by a CompoundCRS in 'CoordinateReferenceSystemID' or implicitly EPSG:5714 MSL height", - "example": "namespace:reference-data--CoordinateReferenceSystem:VerticalCRS::EPSG::5714:", + "example": "namespace:reference-data--CoordinateReferenceSystem:Vertical:EPSG::5714:", "pattern": "^[\\w\\-\\.]+:reference-data\\-\\-CoordinateReferenceSystem:[\\w\\-\\.\\:\\%]+:[0-9]*$", "x-osdu-relationship": [ { @@ -53,13 +53,13 @@ "type": "string", "title": "CRS Reference", "description": "The CRS reference as persistableReference string. If populated, the CoordinateReferenceSystemID takes precedence.", - "example": "{\"lateBoundCRS\":{\"wkt\":\"PROJCS[\\\"NAD_1927_StatePlane_North_Dakota_South_FIPS_3302\\\",GEOGCS[\\\"GCS_North_American_1927\\\",DATUM[\\\"D_North_American_1927\\\",SPHEROID[\\\"Clarke_1866\\\",6378206.4,294.9786982]],PRIMEM[\\\"Greenwich\\\",0.0],UNIT[\\\"Degree\\\",0.0174532925199433]],PROJECTION[\\\"Lambert_Conformal_Conic\\\"],PARAMETER[\\\"False_Easting\\\",2000000.0],PARAMETER[\\\"False_Northing\\\",0.0],PARAMETER[\\\"Central_Meridian\\\",-100.5],PARAMETER[\\\"Standard_Parallel_1\\\",46.1833333333333],PARAMETER[\\\"Standard_Parallel_2\\\",47.4833333333333],PARAMETER[\\\"Latitude_Of_Origin\\\",45.6666666666667],UNIT[\\\"Foot_US\\\",0.304800609601219],AUTHORITY[\\\"EPSG\\\",32021]]\",\"ver\":\"PE_10_3_1\",\"name\":\"NAD_1927_StatePlane_North_Dakota_South_FIPS_3302\",\"authCode\":{\"auth\":\"EPSG\",\"code\":\"32021\"},\"type\":\"LBC\"},\"singleCT\":{\"wkt\":\"GEOGTRAN[\\\"NAD_1927_To_WGS_1984_79_CONUS\\\",GEOGCS[\\\"GCS_North_American_1927\\\",DATUM[\\\"D_North_American_1927\\\",SPHEROID[\\\"Clarke_1866\\\",6378206.4,294.9786982]],PRIMEM[\\\"Greenwich\\\",0.0],UNIT[\\\"Degree\\\",0.0174532925199433]],GEOGCS[\\\"GCS_WGS_1984\\\",DATUM[\\\"D_WGS_1984\\\",SPHEROID[\\\"WGS_1984\\\",6378137.0,298.257223563]],PRIMEM[\\\"Greenwich\\\",0.0],UNIT[\\\"Degree\\\",0.0174532925199433]],METHOD[\\\"NADCON\\\"],PARAMETER[\\\"Dataset_conus\\\",0.0],AUTHORITY[\\\"EPSG\\\",15851]]\",\"ver\":\"PE_10_3_1\",\"name\":\"NAD_1927_To_WGS_1984_79_CONUS\",\"authCode\":{\"auth\":\"EPSG\",\"code\":\"15851\"},\"type\":\"ST\"},\"ver\":\"PE_10_3_1\",\"name\":\"NAD27 * OGP-Usa Conus / North Dakota South [32021,15851]\",\"authCode\":{\"auth\":\"OSDU\",\"code\":\"32021079\"},\"type\":\"EBC\"}" + "example": "{\"authCode\":{\"auth\":\"OSDU\",\"code\":\"32021079\"},\"lateBoundCRS\":{\"authCode\":{\"auth\":\"EPSG\",\"code\":\"32021\"},\"name\":\"NAD_1927_StatePlane_North_Dakota_South_FIPS_3302\",\"type\":\"LBC\",\"ver\":\"PE_10_9_1\",\"wkt\":\"PROJCS[\\\"NAD_1927_StatePlane_North_Dakota_South_FIPS_3302\\\",GEOGCS[\\\"GCS_North_American_1927\\\",DATUM[\\\"D_North_American_1927\\\",SPHEROID[\\\"Clarke_1866\\\",6378206.4,294.9786982]],PRIMEM[\\\"Greenwich\\\",0.0],UNIT[\\\"Degree\\\",0.0174532925199433]],PROJECTION[\\\"Lambert_Conformal_Conic\\\"],PARAMETER[\\\"False_Easting\\\",2000000.0],PARAMETER[\\\"False_Northing\\\",0.0],PARAMETER[\\\"Central_Meridian\\\",-100.5],PARAMETER[\\\"Standard_Parallel_1\\\",46.18333333333333],PARAMETER[\\\"Standard_Parallel_2\\\",47.48333333333333],PARAMETER[\\\"Latitude_Of_Origin\\\",45.66666666666666],UNIT[\\\"Foot_US\\\",0.3048006096012192],AUTHORITY[\\\"EPSG\\\",32021]]\"},\"name\":\"NAD27 * OGP-Usa Conus / North Dakota CS27 South zone [32021,15851]\",\"singleCT\":{\"authCode\":{\"auth\":\"EPSG\",\"code\":\"15851\"},\"name\":\"NAD_1927_To_WGS_1984_79_CONUS\",\"type\":\"ST\",\"ver\":\"PE_10_9_1\",\"wkt\":\"GEOGTRAN[\\\"NAD_1927_To_WGS_1984_79_CONUS\\\",GEOGCS[\\\"GCS_North_American_1927\\\",DATUM[\\\"D_North_American_1927\\\",SPHEROID[\\\"Clarke_1866\\\",6378206.4,294.9786982]],PRIMEM[\\\"Greenwich\\\",0.0],UNIT[\\\"Degree\\\",0.0174532925199433]],GEOGCS[\\\"GCS_WGS_1984\\\",DATUM[\\\"D_WGS_1984\\\",SPHEROID[\\\"WGS_1984\\\",6378137.0,298.257223563]],PRIMEM[\\\"Greenwich\\\",0.0],UNIT[\\\"Degree\\\",0.0174532925199433]],METHOD[\\\"NADCON\\\"],PARAMETER[\\\"Dataset_conus\\\",0.0],OPERATIONACCURACY[5.0],AUTHORITY[\\\"EPSG\\\",15851]]\"},\"type\":\"EBC\",\"ver\":\"PE_10_9_1\"}" }, "PersistableReferenceVerticalCRS": { "type": "string", "title": "Vertical CRS Reference", "description": "The VerticalCRS reference as persistableReference string. If populated, the VerticalCoordinateReferenceSystemID takes precedence. The property is null or empty for 2D geometries. For 3D geometries and absent or null persistableReferenceVerticalCrs the vertical CRS is either provided via persistableReferenceCrs's CompoundCRS or it is implicitly defined as EPSG:5714 MSL height.", - "example": "{\"authCode\":{\"auth\":\"EPSG\",\"code\":\"5714\"},\"name\":\"MSL_Height\",\"type\":\"LBC\",\"ver\":\"PE_10_3_1\",\"wkt\":\"VERTCS[\\\"MSL_Height\\\",VDATUM[\\\"Mean_Sea_Level\\\"],PARAMETER[\\\"Vertical_Shift\\\",0.0],PARAMETER[\\\"Direction\\\",1.0],UNIT[\\\"Meter\\\",1.0],AUTHORITY[\\\"EPSG\\\",5714]]\"}" + "example": "{\"authCode\":{\"auth\":\"EPSG\",\"code\":\"5714\"},\"name\":\"MSL_Height\",\"type\":\"LBC\",\"ver\":\"PE_10_9_1\",\"wkt\":\"VERTCS[\\\"MSL_Height\\\",VDATUM[\\\"Mean_Sea_Level\\\"],PARAMETER[\\\"Vertical_Shift\\\",0.0],PARAMETER[\\\"Direction\\\",1.0],UNIT[\\\"Meter\\\",1.0],AUTHORITY[\\\"EPSG\\\",5714]]\"}" }, "PersistableReferenceUnitZ": { "type": "string", diff --git a/deployments/shared-schemas/osdu/dataset/File.OGC.GeoTIFF.1.0.0.json b/deployments/shared-schemas/osdu/dataset/File.OGC.GeoTIFF.1.0.0.json index 33a8c6cc..70f61d73 100644 --- a/deployments/shared-schemas/osdu/dataset/File.OGC.GeoTIFF.1.0.0.json +++ b/deployments/shared-schemas/osdu/dataset/File.OGC.GeoTIFF.1.0.0.json @@ -121,7 +121,7 @@ "type": "string", "title": "Coordinate Reference System ID", "description": "The OSDU Platform CRS reference into the CoordinateReferenceSystem catalog matching the inlined geospatial definition. This CRS can also be a BoundCRS, which provides the transformation to WGS 84.", - "example": "namespace:reference-data--CoordinateReferenceSystem:BoundCRS.SLB.32021.15851:", + "example": "namespace:reference-data--CoordinateReferenceSystem:BoundProjected:EPSG::32012_EPSG::15851:", "pattern": "^[\\w\\-\\.]+:reference-data\\-\\-CoordinateReferenceSystem:[\\w\\-\\.\\:\\%]+:[0-9]*$", "x-osdu-relationship": [ { @@ -134,7 +134,7 @@ "type": "string", "title": "Vertical Coordinate Reference System ID", "description": "The explicit VerticalCRS reference into the CoordinateReferenceSystem catalog. This property stays empty for 2D geometries. Absent or empty values for 3D geometries mean the context may be provided by a CompoundCRS in 'CoordinateReferenceSystemID' or implicitly EPSG:5714 MSL height", - "example": "namespace:reference-data--CoordinateReferenceSystem:VerticalCRS.EPSG.5773:", + "example": "namespace:reference-data--CoordinateReferenceSystem:Vertical:EPSG::5714:", "pattern": "^[\\w\\-\\.]+:reference-data\\-\\-CoordinateReferenceSystem:[\\w\\-\\.\\:\\%]+:[0-9]*$", "x-osdu-relationship": [ { @@ -147,13 +147,13 @@ "type": "string", "title": "CRS Reference", "description": "The OSDU Platform CRS reference as persistableReference string. If populated, the CoordinateReferenceSystemID takes precedence. This CRS can also be a BoundCRS, which provides the transformation to WGS 84.", - "example": "{\"lateBoundCRS\":{\"wkt\":\"PROJCS[\\\"NAD_1927_StatePlane_North_Dakota_South_FIPS_3302\\\",GEOGCS[\\\"GCS_North_American_1927\\\",DATUM[\\\"D_North_American_1927\\\",SPHEROID[\\\"Clarke_1866\\\",6378206.4,294.9786982]],PRIMEM[\\\"Greenwich\\\",0.0],UNIT[\\\"Degree\\\",0.0174532925199433]],PROJECTION[\\\"Lambert_Conformal_Conic\\\"],PARAMETER[\\\"False_Easting\\\",2000000.0],PARAMETER[\\\"False_Northing\\\",0.0],PARAMETER[\\\"Central_Meridian\\\",-100.5],PARAMETER[\\\"Standard_Parallel_1\\\",46.1833333333333],PARAMETER[\\\"Standard_Parallel_2\\\",47.4833333333333],PARAMETER[\\\"Latitude_Of_Origin\\\",45.6666666666667],UNIT[\\\"Foot_US\\\",0.304800609601219],AUTHORITY[\\\"EPSG\\\",32021]]\",\"ver\":\"PE_10_3_1\",\"name\":\"NAD_1927_StatePlane_North_Dakota_South_FIPS_3302\",\"authCode\":{\"auth\":\"EPSG\",\"code\":\"32021\"},\"type\":\"LBC\"},\"singleCT\":{\"wkt\":\"GEOGTRAN[\\\"NAD_1927_To_WGS_1984_79_CONUS\\\",GEOGCS[\\\"GCS_North_American_1927\\\",DATUM[\\\"D_North_American_1927\\\",SPHEROID[\\\"Clarke_1866\\\",6378206.4,294.9786982]],PRIMEM[\\\"Greenwich\\\",0.0],UNIT[\\\"Degree\\\",0.0174532925199433]],GEOGCS[\\\"GCS_WGS_1984\\\",DATUM[\\\"D_WGS_1984\\\",SPHEROID[\\\"WGS_1984\\\",6378137.0,298.257223563]],PRIMEM[\\\"Greenwich\\\",0.0],UNIT[\\\"Degree\\\",0.0174532925199433]],METHOD[\\\"NADCON\\\"],PARAMETER[\\\"Dataset_conus\\\",0.0],AUTHORITY[\\\"EPSG\\\",15851]]\",\"ver\":\"PE_10_3_1\",\"name\":\"NAD_1927_To_WGS_1984_79_CONUS\",\"authCode\":{\"auth\":\"EPSG\",\"code\":\"15851\"},\"type\":\"ST\"},\"ver\":\"PE_10_3_1\",\"name\":\"NAD27 * OGP-Usa Conus / North Dakota South [32021,15851]\",\"authCode\":{\"auth\":\"SLB\",\"code\":\"32021079\"},\"type\":\"EBC\"}" + "example": "{\"authCode\":{\"auth\":\"OSDU\",\"code\":\"32021079\"},\"lateBoundCRS\":{\"authCode\":{\"auth\":\"EPSG\",\"code\":\"32021\"},\"name\":\"NAD_1927_StatePlane_North_Dakota_South_FIPS_3302\",\"type\":\"LBC\",\"ver\":\"PE_10_9_1\",\"wkt\":\"PROJCS[\\\"NAD_1927_StatePlane_North_Dakota_South_FIPS_3302\\\",GEOGCS[\\\"GCS_North_American_1927\\\",DATUM[\\\"D_North_American_1927\\\",SPHEROID[\\\"Clarke_1866\\\",6378206.4,294.9786982]],PRIMEM[\\\"Greenwich\\\",0.0],UNIT[\\\"Degree\\\",0.0174532925199433]],PROJECTION[\\\"Lambert_Conformal_Conic\\\"],PARAMETER[\\\"False_Easting\\\",2000000.0],PARAMETER[\\\"False_Northing\\\",0.0],PARAMETER[\\\"Central_Meridian\\\",-100.5],PARAMETER[\\\"Standard_Parallel_1\\\",46.18333333333333],PARAMETER[\\\"Standard_Parallel_2\\\",47.48333333333333],PARAMETER[\\\"Latitude_Of_Origin\\\",45.66666666666666],UNIT[\\\"Foot_US\\\",0.3048006096012192],AUTHORITY[\\\"EPSG\\\",32021]]\"},\"name\":\"NAD27 * OGP-Usa Conus / North Dakota CS27 South zone [32021,15851]\",\"singleCT\":{\"authCode\":{\"auth\":\"EPSG\",\"code\":\"15851\"},\"name\":\"NAD_1927_To_WGS_1984_79_CONUS\",\"type\":\"ST\",\"ver\":\"PE_10_9_1\",\"wkt\":\"GEOGTRAN[\\\"NAD_1927_To_WGS_1984_79_CONUS\\\",GEOGCS[\\\"GCS_North_American_1927\\\",DATUM[\\\"D_North_American_1927\\\",SPHEROID[\\\"Clarke_1866\\\",6378206.4,294.9786982]],PRIMEM[\\\"Greenwich\\\",0.0],UNIT[\\\"Degree\\\",0.0174532925199433]],GEOGCS[\\\"GCS_WGS_1984\\\",DATUM[\\\"D_WGS_1984\\\",SPHEROID[\\\"WGS_1984\\\",6378137.0,298.257223563]],PRIMEM[\\\"Greenwich\\\",0.0],UNIT[\\\"Degree\\\",0.0174532925199433]],METHOD[\\\"NADCON\\\"],PARAMETER[\\\"Dataset_conus\\\",0.0],OPERATIONACCURACY[5.0],AUTHORITY[\\\"EPSG\\\",15851]]\"},\"type\":\"EBC\",\"ver\":\"PE_10_9_1\"}" }, "PersistableReferenceVerticalCrs": { "type": "string", "title": "Vertical CRS Reference", "description": "The VerticalCRS reference as persistableReference string. If populated, the VerticalCoordinateReferenceSystemID takes precedence. The property is null or empty for 2D geometries. For 3D geometries and absent or null persistableReferenceVerticalCrs the vertical CRS is either provided via persistableReferenceCrs's CompoundCRS or it is implicitly defined as EPSG:5714 MSL height.", - "example": "{\"authCode\":{\"auth\":\"EPSG\",\"code\":\"5773\"},\"type\":\"LBC\",\"ver\":\"PE_10_3_1\",\"name\":\"EGM96_Geoid\",\"wkt\":\"VERTCS[\\\"EGM96_Geoid\\\",VDATUM[\\\"EGM96_Geoid\\\"],PARAMETER[\\\"Vertical_Shift\\\",0.0],PARAMETER[\\\"Direction\\\",1.0],UNIT[\\\"Meter\\\",1.0],AUTHORITY[\\\"EPSG\\\",5773]]\"}" + "example": "{\"authCode\":{\"auth\":\"EPSG\",\"code\":\"5714\"},\"name\":\"MSL_Height\",\"type\":\"LBC\",\"ver\":\"PE_10_9_1\",\"wkt\":\"VERTCS[\\\"MSL_Height\\\",VDATUM[\\\"Mean_Sea_Level\\\"],PARAMETER[\\\"Vertical_Shift\\\",0.0],PARAMETER[\\\"Direction\\\",1.0],UNIT[\\\"Meter\\\",1.0],AUTHORITY[\\\"EPSG\\\",5714]]\"}" } }, "required": [ diff --git a/deployments/shared-schemas/osdu/load_sequence.1.0.0.json b/deployments/shared-schemas/osdu/load_sequence.1.0.0.json index 0fa318e8..b2b6d740 100644 --- a/deployments/shared-schemas/osdu/load_sequence.1.0.0.json +++ b/deployments/shared-schemas/osdu/load_sequence.1.0.0.json @@ -35,6 +35,26 @@ "kind": "{{schema-authority}}:wks:AbstractBusinessRule:1.0.0", "relativePath": "shared-schemas/osdu/abstract/AbstractBusinessRule.1.0.0.json" }, + { + "kind": "{{schema-authority}}:wks:AbstractPropertyType:1.0.0", + "relativePath": "shared-schemas/osdu/abstract/AbstractPropertyType.1.0.0.json" + }, + { + "kind": "{{schema-authority}}:wks:AbstractFacet:1.0.0", + "relativePath": "shared-schemas/osdu/abstract/AbstractFacet.1.0.0.json" + }, + { + "kind": "{{schema-authority}}:wks:AbstractReferencePropertyType:1.1.0", + "relativePath": "shared-schemas/osdu/abstract/AbstractReferencePropertyType.1.1.0.json" + }, + { + "kind": "{{schema-authority}}:wks:AbstractReferencePropertyType:1.0.0", + "relativePath": "shared-schemas/osdu/abstract/AbstractReferencePropertyType.1.0.0.json" + }, + { + "kind": "{{schema-authority}}:wks:AbstractColumnBasedTable:1.0.0", + "relativePath": "shared-schemas/osdu/abstract/AbstractColumnBasedTable.1.0.0.json" + }, { "kind": "{{schema-authority}}:wks:AbstractColumnLayerGridPatch:1.0.0", "relativePath": "shared-schemas/osdu/abstract/AbstractColumnLayerGridPatch.1.0.0.json" @@ -55,10 +75,6 @@ "kind": "{{schema-authority}}:wks:AbstractDataset:1.0.0", "relativePath": "shared-schemas/osdu/abstract/AbstractDataset.1.0.0.json" }, - { - "kind": "{{schema-authority}}:wks:AbstractFacet:1.0.0", - "relativePath": "shared-schemas/osdu/abstract/AbstractFacet.1.0.0.json" - }, { "kind": "{{schema-authority}}:wks:AbstractFacilityOperator:1.0.0", "relativePath": "shared-schemas/osdu/abstract/AbstractFacilityOperator.1.0.0.json" @@ -131,6 +147,10 @@ "kind": "{{schema-authority}}:wks:AbstractGridRepresentation:1.0.0", "relativePath": "shared-schemas/osdu/abstract/AbstractGridRepresentation.1.0.0.json" }, + { + "kind": "{{schema-authority}}:wks:AbstractIjkGridFlowSimulationBoundaryConnection:1.0.0", + "relativePath": "shared-schemas/osdu/abstract/AbstractIjkGridFlowSimulationBoundaryConnection.1.0.0.json" + }, { "kind": "{{schema-authority}}:wks:AbstractIjkGridPatch:1.0.0", "relativePath": "shared-schemas/osdu/abstract/AbstractIjkGridPatch.1.0.0.json" @@ -167,10 +187,6 @@ "kind": "{{schema-authority}}:wks:AbstractProjectActivity:1.0.0", "relativePath": "shared-schemas/osdu/abstract/AbstractProjectActivity.1.0.0.json" }, - { - "kind": "{{schema-authority}}:wks:AbstractPropertyType:1.0.0", - "relativePath": "shared-schemas/osdu/abstract/AbstractPropertyType.1.0.0.json" - }, { "kind": "{{schema-authority}}:wks:AbstractQualityMetric:1.0.0", "relativePath": "shared-schemas/osdu/abstract/AbstractQualityMetric.1.0.0.json" @@ -179,14 +195,6 @@ "kind": "{{schema-authority}}:wks:AbstractReferenceLevel:1.0.0", "relativePath": "shared-schemas/osdu/abstract/AbstractReferenceLevel.1.0.0.json" }, - { - "kind": "{{schema-authority}}:wks:AbstractReferencePropertyType:1.1.0", - "relativePath": "shared-schemas/osdu/abstract/AbstractReferencePropertyType.1.1.0.json" - }, - { - "kind": "{{schema-authority}}:wks:AbstractReferencePropertyType:1.0.0", - "relativePath": "shared-schemas/osdu/abstract/AbstractReferencePropertyType.1.0.0.json" - }, { "kind": "{{schema-authority}}:wks:AbstractReferenceType:1.0.0", "relativePath": "shared-schemas/osdu/abstract/AbstractReferenceType.1.0.0.json" @@ -287,6 +295,10 @@ "kind": "{{schema-authority}}:wks:reference-data--AnisotropyType:1.0.0", "relativePath": "shared-schemas/osdu/reference-data/AnisotropyType.1.0.0.json" }, + { + "kind": "{{schema-authority}}:wks:work-product-component--AquiferInterpretation:1.0.0", + "relativePath": "shared-schemas/osdu/work-product-component/AquiferInterpretation.1.0.0.json" + }, { "kind": "{{schema-authority}}:wks:reference-data--ArtefactRole:1.0.0", "relativePath": "shared-schemas/osdu/reference-data/ArtefactRole.1.0.0.json" @@ -347,6 +359,10 @@ "kind": "{{schema-authority}}:wks:master-data--CasingDesign:1.0.0", "relativePath": "shared-schemas/osdu/master-data/CasingDesign.1.0.0.json" }, + { + "kind": "{{schema-authority}}:wks:reference-data--CatalogMapStateType:1.0.0", + "relativePath": "shared-schemas/osdu/reference-data/CatalogMapStateType.1.0.0.json" + }, { "kind": "{{schema-authority}}:wks:reference-data--CellShapeType:1.0.0", "relativePath": "shared-schemas/osdu/reference-data/CellShapeType.1.0.0.json" @@ -403,6 +419,10 @@ "kind": "{{schema-authority}}:wks:reference-data--CurveIndexDimensionType:1.0.0", "relativePath": "shared-schemas/osdu/reference-data/CurveIndexDimensionType.1.0.0.json" }, + { + "kind": "{{schema-authority}}:wks:reference-data--CurveSampleType:1.0.0", + "relativePath": "shared-schemas/osdu/reference-data/CurveSampleType.1.0.0.json" + }, { "kind": "{{schema-authority}}:wks:DataCollection:1.0.0", "relativePath": "shared-schemas/osdu/data-collection/DataCollection.1.0.0.json" @@ -463,6 +483,18 @@ "kind": "{{schema-authority}}:wks:reference-data--ExistenceKind:1.0.0", "relativePath": "shared-schemas/osdu/reference-data/ExistenceKind.1.0.0.json" }, + { + "kind": "{{schema-authority}}:wks:reference-data--ExternalCatalogNamespace:1.0.0", + "relativePath": "shared-schemas/osdu/reference-data/ExternalCatalogNamespace.1.0.0.json" + }, + { + "kind": "{{schema-authority}}:wks:reference-data--ExternalUnitOfMeasure:1.0.0", + "relativePath": "shared-schemas/osdu/reference-data/ExternalUnitOfMeasure.1.0.0.json" + }, + { + "kind": "{{schema-authority}}:wks:reference-data--ExternalUnitQuantity:1.0.0", + "relativePath": "shared-schemas/osdu/reference-data/ExternalUnitQuantity.1.0.0.json" + }, { "kind": "{{schema-authority}}:wks:reference-data--FacetRole:1.0.0", "relativePath": "shared-schemas/osdu/reference-data/FacetRole.1.0.0.json" @@ -487,6 +519,10 @@ "kind": "{{schema-authority}}:wks:work-product-component--FaultInterpretation:1.0.0", "relativePath": "shared-schemas/osdu/work-product-component/FaultInterpretation.1.0.0.json" }, + { + "kind": "{{schema-authority}}:wks:work-product-component--FaultSystem:1.1.0", + "relativePath": "shared-schemas/osdu/work-product-component/FaultSystem.1.1.0.json" + }, { "kind": "{{schema-authority}}:wks:work-product-component--FaultSystem:1.0.0", "relativePath": "shared-schemas/osdu/work-product-component/FaultSystem.1.0.0.json" @@ -587,6 +623,10 @@ "kind": "{{schema-authority}}:wks:master-data--FluidsProgram:1.0.0", "relativePath": "shared-schemas/osdu/master-data/FluidsProgram.1.0.0.json" }, + { + "kind": "{{schema-authority}}:wks:master-data--FluidsReport:1.1.0", + "relativePath": "shared-schemas/osdu/master-data/FluidsReport.1.1.0.json" + }, { "kind": "{{schema-authority}}:wks:master-data--FluidsReport:1.0.0", "relativePath": "shared-schemas/osdu/master-data/FluidsReport.1.0.0.json" @@ -691,6 +731,14 @@ "kind": "{{schema-authority}}:wks:work-product-component--HorizonInterpretation:1.0.0", "relativePath": "shared-schemas/osdu/work-product-component/HorizonInterpretation.1.0.0.json" }, + { + "kind": "{{schema-authority}}:wks:reference-data--IjkCellFace:1.0.0", + "relativePath": "shared-schemas/osdu/reference-data/IjkCellFace.1.0.0.json" + }, + { + "kind": "{{schema-authority}}:wks:work-product-component--IjkGridNumericalAquiferRepresentation:1.0.0", + "relativePath": "shared-schemas/osdu/work-product-component/IjkGridNumericalAquiferRepresentation.1.0.0.json" + }, { "kind": "{{schema-authority}}:wks:work-product-component--IjkGridRepresentation:1.0.0", "relativePath": "shared-schemas/osdu/work-product-component/IjkGridRepresentation.1.0.0.json" @@ -831,6 +879,10 @@ "kind": "{{schema-authority}}:wks:reference-data--OrderingCriteriaType:1.0.0", "relativePath": "shared-schemas/osdu/reference-data/OrderingCriteriaType.1.0.0.json" }, + { + "kind": "{{schema-authority}}:wks:master-data--Organisation:1.1.0", + "relativePath": "shared-schemas/osdu/master-data/Organisation.1.1.0.json" + }, { "kind": "{{schema-authority}}:wks:master-data--Organisation:1.0.0", "relativePath": "shared-schemas/osdu/master-data/Organisation.1.0.0.json" @@ -1127,6 +1179,10 @@ "kind": "{{schema-authority}}:wks:reference-data--SeismicEnergySourceType:1.0.0", "relativePath": "shared-schemas/osdu/reference-data/SeismicEnergySourceType.1.0.0.json" }, + { + "kind": "{{schema-authority}}:wks:work-product-component--SeismicFault:1.0.0", + "relativePath": "shared-schemas/osdu/work-product-component/SeismicFault.1.0.0.json" + }, { "kind": "{{schema-authority}}:wks:reference-data--SeismicFaultType:1.0.0", "relativePath": "shared-schemas/osdu/reference-data/SeismicFaultType.1.0.0.json" @@ -1143,6 +1199,10 @@ "kind": "{{schema-authority}}:wks:reference-data--SeismicGeometryType:1.0.0", "relativePath": "shared-schemas/osdu/reference-data/SeismicGeometryType.1.0.0.json" }, + { + "kind": "{{schema-authority}}:wks:work-product-component--SeismicHorizon:1.1.0", + "relativePath": "shared-schemas/osdu/work-product-component/SeismicHorizon.1.1.0.json" + }, { "kind": "{{schema-authority}}:wks:work-product-component--SeismicHorizon:1.0.0", "relativePath": "shared-schemas/osdu/work-product-component/SeismicHorizon.1.0.0.json" @@ -1227,6 +1287,10 @@ "kind": "{{schema-authority}}:wks:work-product-component--StratigraphicColumn:1.0.0", "relativePath": "shared-schemas/osdu/work-product-component/StratigraphicColumn.1.0.0.json" }, + { + "kind": "{{schema-authority}}:wks:work-product-component--StratigraphicColumnRankInterpretation:1.1.0", + "relativePath": "shared-schemas/osdu/work-product-component/StratigraphicColumnRankInterpretation.1.1.0.json" + }, { "kind": "{{schema-authority}}:wks:work-product-component--StratigraphicColumnRankInterpretation:1.0.0", "relativePath": "shared-schemas/osdu/work-product-component/StratigraphicColumnRankInterpretation.1.0.0.json" @@ -1359,6 +1423,10 @@ "kind": "{{schema-authority}}:wks:reference-data--UnitQuantity:1.0.0", "relativePath": "shared-schemas/osdu/reference-data/UnitQuantity.1.0.0.json" }, + { + "kind": "{{schema-authority}}:wks:work-product-component--UnsealedSurfaceFramework:1.1.0", + "relativePath": "shared-schemas/osdu/work-product-component/UnsealedSurfaceFramework.1.1.0.json" + }, { "kind": "{{schema-authority}}:wks:work-product-component--UnsealedSurfaceFramework:1.0.0", "relativePath": "shared-schemas/osdu/work-product-component/UnsealedSurfaceFramework.1.0.0.json" @@ -1431,6 +1499,10 @@ "kind": "{{schema-authority}}:wks:reference-data--WellInterestType:1.0.0", "relativePath": "shared-schemas/osdu/reference-data/WellInterestType.1.0.0.json" }, + { + "kind": "{{schema-authority}}:wks:work-product-component--WellLog:1.2.0", + "relativePath": "shared-schemas/osdu/work-product-component/WellLog.1.2.0.json" + }, { "kind": "{{schema-authority}}:wks:work-product-component--WellLog:1.1.0", "relativePath": "shared-schemas/osdu/work-product-component/WellLog.1.1.0.json" @@ -1463,6 +1535,14 @@ "kind": "{{schema-authority}}:wks:master-data--WellboreArchitecture:1.0.0", "relativePath": "shared-schemas/osdu/master-data/WellboreArchitecture.1.0.0.json" }, + { + "kind": "{{schema-authority}}:wks:work-product-component--WellboreIntervalSet:1.0.0", + "relativePath": "shared-schemas/osdu/work-product-component/WellboreIntervalSet.1.0.0.json" + }, + { + "kind": "{{schema-authority}}:wks:work-product-component--WellboreMarkerSet:1.2.0", + "relativePath": "shared-schemas/osdu/work-product-component/WellboreMarkerSet.1.2.0.json" + }, { "kind": "{{schema-authority}}:wks:work-product-component--WellboreMarkerSet:1.1.0", "relativePath": "shared-schemas/osdu/work-product-component/WellboreMarkerSet.1.1.0.json" diff --git a/deployments/shared-schemas/osdu/master-data/ActivityPlan.1.0.0.json b/deployments/shared-schemas/osdu/master-data/ActivityPlan.1.0.0.json index 29827c1c..ec62584a 100644 --- a/deployments/shared-schemas/osdu/master-data/ActivityPlan.1.0.0.json +++ b/deployments/shared-schemas/osdu/master-data/ActivityPlan.1.0.0.json @@ -438,6 +438,9 @@ "data.VirtualProperties.DefaultName": { "type": "string", "priority": [ + { + "path": "data.ProjectName" + }, { "path": "data.Name" } diff --git a/deployments/shared-schemas/osdu/master-data/ActivityTemplateArc.1.0.0.json b/deployments/shared-schemas/osdu/master-data/ActivityTemplateArc.1.0.0.json index 25868069..84354b27 100644 --- a/deployments/shared-schemas/osdu/master-data/ActivityTemplateArc.1.0.0.json +++ b/deployments/shared-schemas/osdu/master-data/ActivityTemplateArc.1.0.0.json @@ -19,7 +19,7 @@ "$schema": "http://json-schema.org/draft-07/schema#", "x-osdu-schema-source": "osdu:wks:master-data--ActivityTemplateArc:1.0.0", "title": "ActivityTemplateArc", - "description": "An 'arc' establishing a link between ActivityTemplate input and output parameters.", + "description": "An 'arc' establishing a link between ActivityTemplate output and input parameters.", "type": "object", "properties": { "id": { diff --git a/deployments/shared-schemas/osdu/master-data/BHARun.1.0.0.json b/deployments/shared-schemas/osdu/master-data/BHARun.1.0.0.json index 82db35e2..d6b37e7b 100644 --- a/deployments/shared-schemas/osdu/master-data/BHARun.1.0.0.json +++ b/deployments/shared-schemas/osdu/master-data/BHARun.1.0.0.json @@ -368,6 +368,7 @@ "type": "number", "title": "Value", "description": "The value observed at the measured depth", + "x-osdu-frame-of-reference": "UOM_via_property:ValueUnitID", "x-osdu-attribution-authority": "The Open Group", "x-osdu-attribution-publication": "The OSDU Data Platform", "x-osdu-attribution-revision": "evergreen" @@ -411,6 +412,7 @@ "type": "number", "title": "Value", "description": "The value at that point.", + "x-osdu-frame-of-reference": "UOM_via_property:ValueUnitID", "x-osdu-attribution-authority": "The Open Group", "x-osdu-attribution-publication": "The OSDU Data Platform", "x-osdu-attribution-revision": "evergreen" @@ -493,6 +495,7 @@ "type": "number", "title": "Value", "description": "The value observed at the measured depth", + "x-osdu-frame-of-reference": "UOM_via_property:ValueUnitID", "x-osdu-attribution-authority": "The Open Group", "x-osdu-attribution-publication": "The OSDU Data Platform", "x-osdu-attribution-revision": "evergreen" @@ -536,6 +539,7 @@ "type": "number", "title": "Value", "description": "The value at that point.", + "x-osdu-frame-of-reference": "UOM_via_property:ValueUnitID", "x-osdu-attribution-authority": "The Open Group", "x-osdu-attribution-publication": "The OSDU Data Platform", "x-osdu-attribution-revision": "evergreen" @@ -632,6 +636,7 @@ "type": "number", "title": "Value", "description": "The value observed at the measured depth", + "x-osdu-frame-of-reference": "UOM_via_property:ValueUnitID", "x-osdu-attribution-authority": "The Open Group", "x-osdu-attribution-publication": "The OSDU Data Platform", "x-osdu-attribution-revision": "evergreen" @@ -675,6 +680,7 @@ "type": "number", "title": "Value", "description": "The value at that point.", + "x-osdu-frame-of-reference": "UOM_via_property:ValueUnitID", "x-osdu-attribution-authority": "The Open Group", "x-osdu-attribution-publication": "The OSDU Data Platform", "x-osdu-attribution-revision": "evergreen" @@ -757,6 +763,7 @@ "type": "number", "title": "Value", "description": "The value observed at the measured depth", + "x-osdu-frame-of-reference": "UOM_via_property:ValueUnitID", "x-osdu-attribution-authority": "The Open Group", "x-osdu-attribution-publication": "The OSDU Data Platform", "x-osdu-attribution-revision": "evergreen" @@ -800,6 +807,7 @@ "type": "number", "title": "Value", "description": "The value at that point.", + "x-osdu-frame-of-reference": "UOM_via_property:ValueUnitID", "x-osdu-attribution-authority": "The Open Group", "x-osdu-attribution-publication": "The OSDU Data Platform", "x-osdu-attribution-revision": "evergreen" @@ -882,6 +890,7 @@ "type": "number", "title": "Value", "description": "The value observed at the measured depth", + "x-osdu-frame-of-reference": "UOM_via_property:ValueUnitID", "x-osdu-attribution-authority": "The Open Group", "x-osdu-attribution-publication": "The OSDU Data Platform", "x-osdu-attribution-revision": "evergreen" @@ -925,6 +934,7 @@ "type": "number", "title": "Value", "description": "The value at that point.", + "x-osdu-frame-of-reference": "UOM_via_property:ValueUnitID", "x-osdu-attribution-authority": "The Open Group", "x-osdu-attribution-publication": "The OSDU Data Platform", "x-osdu-attribution-revision": "evergreen" @@ -1004,6 +1014,7 @@ "type": "number", "title": "Value", "description": "The value observed at the measured depth", + "x-osdu-frame-of-reference": "UOM_via_property:ValueUnitID", "x-osdu-attribution-authority": "The Open Group", "x-osdu-attribution-publication": "The OSDU Data Platform", "x-osdu-attribution-revision": "evergreen" @@ -1047,6 +1058,7 @@ "type": "number", "title": "Value", "description": "The value at that point.", + "x-osdu-frame-of-reference": "UOM_via_property:ValueUnitID", "x-osdu-attribution-authority": "The Open Group", "x-osdu-attribution-publication": "The OSDU Data Platform", "x-osdu-attribution-revision": "evergreen" @@ -1126,6 +1138,7 @@ "type": "number", "title": "Value", "description": "The value observed at the measured depth", + "x-osdu-frame-of-reference": "UOM_via_property:ValueUnitID", "x-osdu-attribution-authority": "The Open Group", "x-osdu-attribution-publication": "The OSDU Data Platform", "x-osdu-attribution-revision": "evergreen" @@ -1169,6 +1182,7 @@ "type": "number", "title": "Value", "description": "The value at that point.", + "x-osdu-frame-of-reference": "UOM_via_property:ValueUnitID", "x-osdu-attribution-authority": "The Open Group", "x-osdu-attribution-publication": "The OSDU Data Platform", "x-osdu-attribution-revision": "evergreen" @@ -1248,6 +1262,7 @@ "type": "number", "title": "Value", "description": "The value observed at the measured depth", + "x-osdu-frame-of-reference": "UOM_via_property:ValueUnitID", "x-osdu-attribution-authority": "The Open Group", "x-osdu-attribution-publication": "The OSDU Data Platform", "x-osdu-attribution-revision": "evergreen" @@ -1291,6 +1306,7 @@ "type": "number", "title": "Value", "description": "The value at that point.", + "x-osdu-frame-of-reference": "UOM_via_property:ValueUnitID", "x-osdu-attribution-authority": "The Open Group", "x-osdu-attribution-publication": "The OSDU Data Platform", "x-osdu-attribution-revision": "evergreen" @@ -1383,6 +1399,7 @@ "type": "number", "title": "Value", "description": "The value observed at the measured depth", + "x-osdu-frame-of-reference": "UOM_via_property:ValueUnitID", "x-osdu-attribution-authority": "The Open Group", "x-osdu-attribution-publication": "The OSDU Data Platform", "x-osdu-attribution-revision": "evergreen" @@ -1426,6 +1443,7 @@ "type": "number", "title": "Value", "description": "The value at that point.", + "x-osdu-frame-of-reference": "UOM_via_property:ValueUnitID", "x-osdu-attribution-authority": "The Open Group", "x-osdu-attribution-publication": "The OSDU Data Platform", "x-osdu-attribution-revision": "evergreen" @@ -1508,6 +1526,7 @@ "type": "number", "title": "Value", "description": "The value observed at the measured depth", + "x-osdu-frame-of-reference": "UOM_via_property:ValueUnitID", "x-osdu-attribution-authority": "The Open Group", "x-osdu-attribution-publication": "The OSDU Data Platform", "x-osdu-attribution-revision": "evergreen" @@ -1551,6 +1570,7 @@ "type": "number", "title": "Value", "description": "The value at that point.", + "x-osdu-frame-of-reference": "UOM_via_property:ValueUnitID", "x-osdu-attribution-authority": "The Open Group", "x-osdu-attribution-publication": "The OSDU Data Platform", "x-osdu-attribution-revision": "evergreen" @@ -1633,6 +1653,7 @@ "type": "number", "title": "Value", "description": "The value observed at the measured depth", + "x-osdu-frame-of-reference": "UOM_via_property:ValueUnitID", "x-osdu-attribution-authority": "The Open Group", "x-osdu-attribution-publication": "The OSDU Data Platform", "x-osdu-attribution-revision": "evergreen" @@ -1676,6 +1697,7 @@ "type": "number", "title": "Value", "description": "The value at that point.", + "x-osdu-frame-of-reference": "UOM_via_property:ValueUnitID", "x-osdu-attribution-authority": "The Open Group", "x-osdu-attribution-publication": "The OSDU Data Platform", "x-osdu-attribution-revision": "evergreen" @@ -1772,6 +1794,7 @@ "type": "number", "title": "Value", "description": "The value observed at the measured depth", + "x-osdu-frame-of-reference": "UOM_via_property:ValueUnitID", "x-osdu-attribution-authority": "The Open Group", "x-osdu-attribution-publication": "The OSDU Data Platform", "x-osdu-attribution-revision": "evergreen" @@ -1815,6 +1838,7 @@ "type": "number", "title": "Value", "description": "The value at that point.", + "x-osdu-frame-of-reference": "UOM_via_property:ValueUnitID", "x-osdu-attribution-authority": "The Open Group", "x-osdu-attribution-publication": "The OSDU Data Platform", "x-osdu-attribution-revision": "evergreen" @@ -1897,6 +1921,7 @@ "type": "number", "title": "Value", "description": "The value observed at the measured depth", + "x-osdu-frame-of-reference": "UOM_via_property:ValueUnitID", "x-osdu-attribution-authority": "The Open Group", "x-osdu-attribution-publication": "The OSDU Data Platform", "x-osdu-attribution-revision": "evergreen" @@ -1940,6 +1965,7 @@ "type": "number", "title": "Value", "description": "The value at that point.", + "x-osdu-frame-of-reference": "UOM_via_property:ValueUnitID", "x-osdu-attribution-authority": "The Open Group", "x-osdu-attribution-publication": "The OSDU Data Platform", "x-osdu-attribution-revision": "evergreen" @@ -2022,6 +2048,7 @@ "type": "number", "title": "Value", "description": "The value observed at the measured depth", + "x-osdu-frame-of-reference": "UOM_via_property:ValueUnitID", "x-osdu-attribution-authority": "The Open Group", "x-osdu-attribution-publication": "The OSDU Data Platform", "x-osdu-attribution-revision": "evergreen" @@ -2065,6 +2092,7 @@ "type": "number", "title": "Value", "description": "The value at that point.", + "x-osdu-frame-of-reference": "UOM_via_property:ValueUnitID", "x-osdu-attribution-authority": "The Open Group", "x-osdu-attribution-publication": "The OSDU Data Platform", "x-osdu-attribution-revision": "evergreen" @@ -2161,6 +2189,7 @@ "type": "number", "title": "Value", "description": "The value observed at the measured depth", + "x-osdu-frame-of-reference": "UOM_via_property:ValueUnitID", "x-osdu-attribution-authority": "The Open Group", "x-osdu-attribution-publication": "The OSDU Data Platform", "x-osdu-attribution-revision": "evergreen" @@ -2204,6 +2233,7 @@ "type": "number", "title": "Value", "description": "The value at that point.", + "x-osdu-frame-of-reference": "UOM_via_property:ValueUnitID", "x-osdu-attribution-authority": "The Open Group", "x-osdu-attribution-publication": "The OSDU Data Platform", "x-osdu-attribution-revision": "evergreen" @@ -2286,6 +2316,7 @@ "type": "number", "title": "Value", "description": "The value observed at the measured depth", + "x-osdu-frame-of-reference": "UOM_via_property:ValueUnitID", "x-osdu-attribution-authority": "The Open Group", "x-osdu-attribution-publication": "The OSDU Data Platform", "x-osdu-attribution-revision": "evergreen" @@ -2329,6 +2360,7 @@ "type": "number", "title": "Value", "description": "The value at that point.", + "x-osdu-frame-of-reference": "UOM_via_property:ValueUnitID", "x-osdu-attribution-authority": "The Open Group", "x-osdu-attribution-publication": "The OSDU Data Platform", "x-osdu-attribution-revision": "evergreen" @@ -2411,6 +2443,7 @@ "type": "number", "title": "Value", "description": "The value observed at the measured depth", + "x-osdu-frame-of-reference": "UOM_via_property:ValueUnitID", "x-osdu-attribution-authority": "The Open Group", "x-osdu-attribution-publication": "The OSDU Data Platform", "x-osdu-attribution-revision": "evergreen" @@ -2454,6 +2487,7 @@ "type": "number", "title": "Value", "description": "The value at that point.", + "x-osdu-frame-of-reference": "UOM_via_property:ValueUnitID", "x-osdu-attribution-authority": "The Open Group", "x-osdu-attribution-publication": "The OSDU Data Platform", "x-osdu-attribution-revision": "evergreen" diff --git a/deployments/shared-schemas/osdu/master-data/BoundaryFeature.1.0.0.json b/deployments/shared-schemas/osdu/master-data/BoundaryFeature.1.0.0.json index 0685cdb5..6926c55f 100644 --- a/deployments/shared-schemas/osdu/master-data/BoundaryFeature.1.0.0.json +++ b/deployments/shared-schemas/osdu/master-data/BoundaryFeature.1.0.0.json @@ -113,7 +113,13 @@ }, { "type": "object", - "properties": {}, + "properties": { + "Name": { + "type": "string", + "title": "Name", + "description": "The name of the boundary feature." + } + }, "title": "IndividualProperties" }, { diff --git a/deployments/shared-schemas/osdu/master-data/FluidsReport.1.0.0.json b/deployments/shared-schemas/osdu/master-data/FluidsReport.1.0.0.json index a67a5fb8..8666ad10 100644 --- a/deployments/shared-schemas/osdu/master-data/FluidsReport.1.0.0.json +++ b/deployments/shared-schemas/osdu/master-data/FluidsReport.1.0.0.json @@ -151,7 +151,7 @@ "items": { "type": "object", "title": "Fluid", - "description": "Information regarding an individual activity that is part of the Drilling Report", + "description": "Information regarding an individual fluid that is part of the Drilling Report.", "properties": { "Type": { "type": "string", @@ -1021,6 +1021,11 @@ "EntityType": "Wellbore" } ] + }, + "Name": { + "type": "string", + "title": "Name", + "description": "Name of Fluids Report" } }, "required": [ @@ -1048,7 +1053,7 @@ "legal" ], "additionalProperties": false, - "x-osdu-review-status": "NOT APPROVED!", + "x-osdu-review-status": "Accepted", "x-osdu-virtual-properties": { "data.VirtualProperties.DefaultLocation": { "type": "object", diff --git a/deployments/shared-schemas/osdu/master-data/FluidsReport.1.1.0.json b/deployments/shared-schemas/osdu/master-data/FluidsReport.1.1.0.json new file mode 100644 index 00000000..f5c2cfaf --- /dev/null +++ b/deployments/shared-schemas/osdu/master-data/FluidsReport.1.1.0.json @@ -0,0 +1,1084 @@ +{ + "schemaInfo": { + "schemaIdentity": { + "authority": "{{schema-authority}}", + "source": "wks", + "entityType": "master-data--FluidsReport", + "schemaVersionMajor": 1, + "schemaVersionMinor": 1, + "schemaVersionPatch": 0, + "id": "{{schema-authority}}:wks:master-data--FluidsReport:1.1.0" + }, + "createdBy": "OSDU Data Definition Group", + "scope": "SHARED", + "status": "DEVELOPMENT" + }, + "schema": { + "x-osdu-license": "Copyright 2022, The Open Group \\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.", + "$id": "https://schema.osdu.opengroup.org/json/master-data/FluidsReport.1.1.0.json", + "$schema": "http://json-schema.org/draft-07/schema#", + "x-osdu-schema-source": "osdu:wks:master-data--FluidsReport:1.1.0", + "title": "FluidsReport", + "description": "Used to capture an analysis of the drilling mud.", + "type": "object", + "properties": { + "id": { + "description": "Previously called ResourceID or SRN which identifies this OSDU resource object without version.", + "title": "Entity ID", + "type": "string", + "pattern": "^[\\w\\-\\.]+:master-data\\-\\-FluidsReport:[\\w\\-\\.\\:\\%]+$", + "example": "namespace:master-data--FluidsReport:32810096-6f29-54d2-b221-2f4522048cc0" + }, + "kind": { + "description": "The schema identification for the OSDU resource object following the pattern {Namespace}:{Source}:{Type}:{VersionMajor}.{VersionMinor}.{VersionPatch}. The versioning scheme follows the semantic versioning, https://semver.org/.", + "title": "Entity Kind", + "type": "string", + "pattern": "^[\\w\\-\\.]+:[\\w\\-\\.]+:[\\w\\-\\.]+:[0-9]+.[0-9]+.[0-9]+$", + "example": "osdu:wks:master-data--FluidsReport:1.1.0" + }, + "version": { + "description": "The version number of this OSDU resource; set by the framework.", + "title": "Version Number", + "type": "integer", + "format": "int64", + "example": 1562066009929332 + }, + "acl": { + "description": "The access control tags associated with this entity.", + "title": "Access Control List", + "$ref": "{{schema-authority}}:wks:AbstractAccessControlList:1.0.0" + }, + "legal": { + "description": "The entity's legal tags and compliance status. The actual contents associated with the legal tags is managed by the Compliance Service.", + "title": "Legal Tags", + "$ref": "{{schema-authority}}:wks:AbstractLegalTags:1.0.0" + }, + "tags": { + "title": "Tag Dictionary", + "description": "A generic dictionary of string keys mapping to string value. Only strings are permitted as keys and values.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "example": { + "NameOfKey": "String value" + } + }, + "createTime": { + "description": "Timestamp of the time at which initial version of this OSDU resource object was created. Set by the System. The value is a combined date-time string in ISO-8601 given in UTC.", + "title": "Resource Object Creation DateTime", + "type": "string", + "format": "date-time", + "example": "2020-12-16T11:46:20.163Z" + }, + "createUser": { + "title": "Resource Object Creation User Reference", + "description": "The user reference, which created the first version of this resource object. Set by the System.", + "type": "string", + "example": "some-user@some-company-cloud.com" + }, + "modifyTime": { + "description": "Timestamp of the time at which this version of the OSDU resource object was created. Set by the System. The value is a combined date-time string in ISO-8601 given in UTC.", + "title": "Resource Object Version Creation DateTime", + "type": "string", + "format": "date-time", + "example": "2020-12-16T11:52:24.477Z" + }, + "modifyUser": { + "title": "Resource Object Version Creation User Reference", + "description": "The user reference, which created this version of this resource object. Set by the System.", + "type": "string", + "example": "some-user@some-company-cloud.com" + }, + "ancestry": { + "description": "The links to data, which constitute the inputs, from which this record instance is derived.", + "title": "Ancestry", + "$ref": "{{schema-authority}}:wks:AbstractLegalParentList:1.0.0" + }, + "meta": { + "description": "The Frame of Reference meta data section linking the named properties to self-contained definitions.", + "title": "Frame of Reference Meta Data", + "type": "array", + "items": { + "$ref": "{{schema-authority}}:wks:AbstractMetaItem:1.0.0" + } + }, + "data": { + "allOf": [ + { + "$ref": "{{schema-authority}}:wks:AbstractCommonResources:1.0.0" + }, + { + "$ref": "{{schema-authority}}:wks:AbstractMaster:1.0.0" + }, + { + "type": "object", + "properties": { + "StartDateTime": { + "type": "string", + "title": "Report Date Time", + "description": "Start DateTime of the reporting period", + "format": "date-time", + "x-osdu-frame-of-reference": "DateTime", + "x-osdu-attribution-authority": "The Open Group", + "x-osdu-attribution-publication": "The OSDU Data Platform", + "x-osdu-attribution-revision": "evergreen" + }, + "EndDateTime": { + "type": "string", + "title": "Report Date Time", + "description": "End DateTime of the reporting period", + "format": "date-time", + "x-osdu-frame-of-reference": "DateTime", + "x-osdu-attribution-authority": "The Open Group", + "x-osdu-attribution-publication": "The OSDU Data Platform", + "x-osdu-attribution-revision": "evergreen" + }, + "NumReport": { + "type": "number", + "title": "Report Number", + "description": "Fluids report number", + "x-osdu-attribution-authority": "The Open Group", + "x-osdu-attribution-publication": "The OSDU Data Platform", + "x-osdu-attribution-revision": "evergreen" + }, + "Fluid": { + "type": "array", + "title": "Fluid", + "description": "The drilling fluids that are represented on this report", + "x-osdu-attribution-authority": "The Open Group", + "x-osdu-attribution-publication": "The OSDU Data Platform", + "x-osdu-attribution-revision": "evergreen", + "items": { + "type": "object", + "title": "Fluid", + "description": "Information regarding an individual fluid that is part of the Drilling Report.", + "properties": { + "Type": { + "type": "string", + "title": "Type", + "description": "Description for the type of fluid.", + "x-osdu-attribution-authority": "The Open Group", + "x-osdu-attribution-publication": "The OSDU Data Platform", + "x-osdu-attribution-revision": "evergreen", + "pattern": "^[\\w\\-\\.]+:reference-data\\-\\-FluidType:[\\w\\-\\.\\:\\%]+:[0-9]*$", + "x-osdu-relationship": [ + { + "GroupType": "reference-data", + "EntityType": "FluidType" + } + ] + }, + "BrandName": { + "type": "string", + "title": "Brand Name", + "description": "The name of the fluid as given by the supplier", + "x-osdu-attribution-revision": "evergreen" + }, + "SampleLocation": { + "type": "string", + "title": "Sample Location", + "description": "Sample location.", + "x-osdu-attribution-authority": "The Open Group", + "x-osdu-attribution-publication": "The OSDU Data Platform", + "x-osdu-attribution-revision": "evergreen" + }, + "SampleDateTime": { + "type": "string", + "title": "Date Time", + "description": "The time when fluid readings were recorded.", + "format": "date-time", + "x-osdu-attribution-authority": "The Open Group", + "x-osdu-attribution-publication": "The OSDU Data Platform", + "x-osdu-attribution-revision": "evergreen" + }, + "MeasuredDepth": { + "type": "number", + "title": "Measured Depth", + "description": "The measured depth where the fluid readings were recorded.", + "x-osdu-frame-of-reference": "UOM:length", + "x-osdu-attribution-authority": "The Open Group", + "x-osdu-attribution-publication": "The OSDU Data Platform", + "x-osdu-attribution-revision": "evergreen" + }, + "TVD": { + "type": "number", + "title": "TVD", + "description": "The true vertical depth where the fluid readings were recorded.", + "x-osdu-frame-of-reference": "UOM:length", + "x-osdu-attribution-authority": "The Open Group", + "x-osdu-attribution-publication": "The OSDU Data Platform", + "x-osdu-attribution-revision": "evergreen" + }, + "EquivalentCirculatingDensity": { + "type": "number", + "title": "Equivalent Circulating Density", + "description": "Equivalent circulating density where fluid reading was recorded or calculated/simulated", + "x-osdu-frame-of-reference": "UOM:mass per volume", + "x-osdu-attribution-authority": "The Open Group", + "x-osdu-attribution-publication": "The OSDU Data Platform", + "x-osdu-attribution-revision": "evergreen" + }, + "EquivalentStaticDensity": { + "type": "number", + "title": "Equivalent Static Density", + "description": "Equivalent static density where fluid reading was recorded or calculated/simulated", + "x-osdu-frame-of-reference": "UOM:mass per volume", + "x-osdu-attribution-authority": "The Open Group", + "x-osdu-attribution-publication": "The OSDU Data Platform", + "x-osdu-attribution-revision": "evergreen" + }, + "KickToleranceVolume": { + "type": "number", + "title": "Kick Tolerance Volume", + "description": "Assumed kick volume for calculation of kick tolerance based on the kick intensity where the fluid reading was recorded.", + "x-osdu-frame-of-reference": "UOM:volume", + "x-osdu-attribution-authority": "The Open Group", + "x-osdu-attribution-publication": "The OSDU Data Platform", + "x-osdu-attribution-revision": "evergreen" + }, + "KickToleranceIntensity": { + "type": "number", + "title": "Kick Tolerance Intensity", + "description": "Assumed kick density for calculation of kick tolerance where the fluid reading was recorded.", + "x-osdu-frame-of-reference": "UOM:mass per volume", + "x-osdu-attribution-authority": "The Open Group", + "x-osdu-attribution-publication": "The OSDU Data Platform", + "x-osdu-attribution-revision": "evergreen" + }, + "TemperatureFlowLine": { + "type": "number", + "title": "Temperature Flow Line", + "description": "Flow line temperature measurement where the fluid reading was recorded.", + "x-osdu-frame-of-reference": "UOM:thermodynamic temperature", + "x-osdu-attribution-authority": "The Open Group", + "x-osdu-attribution-publication": "The OSDU Data Platform", + "x-osdu-attribution-revision": "evergreen" + }, + "MudClass": { + "type": "string", + "title": "Mud Class", + "description": "The class of the drilling fluid.", + "x-osdu-attribution-authority": "The Open Group", + "x-osdu-attribution-publication": "The OSDU Data Platform", + "x-osdu-attribution-revision": "evergreen", + "pattern": "^[\\w\\-\\.]+:reference-data\\-\\-MudClass:[\\w\\-\\.\\:\\%]+:[0-9]*$", + "x-osdu-relationship": [ + { + "GroupType": "reference-data", + "EntityType": "MudClass" + } + ] + }, + "Density": { + "type": "number", + "title": "Density", + "description": "Fluid density. This excludes the cuttings.", + "x-osdu-frame-of-reference": "UOM:mass per volume", + "x-osdu-attribution-authority": "The Open Group", + "x-osdu-attribution-publication": "The OSDU Data Platform", + "x-osdu-attribution-revision": "evergreen" + }, + "ViscosityFunnel": { + "type": "number", + "title": "Viscosity Funnel", + "description": "Funnel viscosity in seconds.", + "x-osdu-frame-of-reference": "UOM:time", + "x-osdu-attribution-authority": "The Open Group", + "x-osdu-attribution-publication": "The OSDU Data Platform", + "x-osdu-attribution-revision": "evergreen" + }, + "TemperatureViscosity": { + "type": "number", + "title": "Temperature Viscosity", + "description": "Funnel viscosity temperature.", + "x-osdu-frame-of-reference": "UOM:thermodynamic temperature", + "x-osdu-attribution-authority": "The Open Group", + "x-osdu-attribution-publication": "The OSDU Data Platform", + "x-osdu-attribution-revision": "evergreen" + }, + "PlasticViscosity": { + "type": "number", + "title": "Plastic Viscosity", + "description": "Plastic viscosity.", + "x-osdu-frame-of-reference": "UOM:dynamic viscosity", + "x-osdu-attribution-authority": "The Open Group", + "x-osdu-attribution-publication": "The OSDU Data Platform", + "x-osdu-attribution-revision": "evergreen" + }, + "YieldPoint": { + "type": "number", + "title": "Yield Point", + "description": "Yield point (Bingham and Herschel Bulkley models).", + "x-osdu-frame-of-reference": "UOM:pressure", + "x-osdu-attribution-authority": "The Open Group", + "x-osdu-attribution-publication": "The OSDU Data Platform", + "x-osdu-attribution-revision": "evergreen" + }, + "LowShearYieldPoint": { + "type": "number", + "title": "Low Shear Yield Point", + "description": "Shearing capacity of mud at low velocity", + "x-osdu-attribution-authority": "The Open Group", + "x-osdu-attribution-publication": "The OSDU Data Platform", + "x-osdu-attribution-revision": "evergreen" + }, + "Gel0Sec": { + "type": "number", + "title": "Gel0 Sec", + "description": "Zero-second gels.", + "x-osdu-frame-of-reference": "UOM:pressure", + "x-osdu-attribution-authority": "The Open Group", + "x-osdu-attribution-publication": "The OSDU Data Platform", + "x-osdu-attribution-revision": "evergreen" + }, + "Gel10Sec": { + "type": "number", + "title": "Gel10 Sec", + "description": "Ten-second gels.", + "x-osdu-frame-of-reference": "UOM:pressure", + "x-osdu-attribution-authority": "The Open Group", + "x-osdu-attribution-publication": "The OSDU Data Platform", + "x-osdu-attribution-revision": "evergreen" + }, + "Gel10Min": { + "type": "number", + "title": "Gel10 Min", + "description": "Ten-minute gels.", + "x-osdu-frame-of-reference": "UOM:pressure", + "x-osdu-attribution-authority": "The Open Group", + "x-osdu-attribution-publication": "The OSDU Data Platform", + "x-osdu-attribution-revision": "evergreen" + }, + "Gel30Min": { + "type": "number", + "title": "Gel30 Min", + "description": "Thirty-minute gels.", + "x-osdu-frame-of-reference": "UOM:pressure", + "x-osdu-attribution-authority": "The Open Group", + "x-osdu-attribution-publication": "The OSDU Data Platform", + "x-osdu-attribution-revision": "evergreen" + }, + "FilterCakeLtlp": { + "type": "number", + "title": "Filter Cake Ltlp", + "description": "Filter cake thickness at low (normal) temperature and pressure.", + "x-osdu-frame-of-reference": "UOM:length", + "x-osdu-attribution-authority": "The Open Group", + "x-osdu-attribution-publication": "The OSDU Data Platform", + "x-osdu-attribution-revision": "evergreen" + }, + "FiltrateLtlp": { + "type": "number", + "title": "Filtrate Ltlp", + "description": "API water loss (low temperature and pressure mud filtrate measurement) (volume per 30 min).", + "x-osdu-frame-of-reference": "UOM:volume", + "x-osdu-attribution-authority": "The Open Group", + "x-osdu-attribution-publication": "The OSDU Data Platform", + "x-osdu-attribution-revision": "evergreen" + }, + "AnnularShapeRatio": { + "type": "number", + "title": "Annular Shape Ratio", + "description": "Cleaning coefficient of drilling fluid", + "x-osdu-attribution-authority": "The Open Group", + "x-osdu-attribution-publication": "The OSDU Data Platform", + "x-osdu-attribution-revision": "evergreen" + }, + "FiltrateTemperatureHthp": { + "type": "number", + "title": "Filtrate Temperature Hthp", + "description": "High temperature high pressure (HTHP) temperature.", + "x-osdu-frame-of-reference": "UOM:thermodynamic temperature", + "x-osdu-attribution-authority": "The Open Group", + "x-osdu-attribution-publication": "The OSDU Data Platform", + "x-osdu-attribution-revision": "evergreen" + }, + "FiltratePressureHthp": { + "type": "number", + "title": "Filtrate Pressure Hthp", + "description": "High temperature high pressure (HTHP) pressure.", + "x-osdu-frame-of-reference": "UOM:pressure", + "x-osdu-attribution-authority": "The Open Group", + "x-osdu-attribution-publication": "The OSDU Data Platform", + "x-osdu-attribution-revision": "evergreen" + }, + "FiltrateHthp": { + "type": "number", + "title": "Filtrate Hthp", + "description": "High temperature high pressure (HTHP) filtrate (volume per 30 min).", + "x-osdu-frame-of-reference": "UOM:volume", + "x-osdu-attribution-authority": "The Open Group", + "x-osdu-attribution-publication": "The OSDU Data Platform", + "x-osdu-attribution-revision": "evergreen" + }, + "FilterCakeHthp": { + "type": "number", + "title": "Filter Cake Hthp", + "description": "High temperature high pressure (HTHP) filter cake thickness.", + "x-osdu-frame-of-reference": "UOM:length", + "x-osdu-attribution-authority": "The Open Group", + "x-osdu-attribution-publication": "The OSDU Data Platform", + "x-osdu-attribution-revision": "evergreen" + }, + "SolidsPc": { + "type": "number", + "title": "Solids Pc", + "description": "Solids percentage from retort.", + "x-osdu-frame-of-reference": "UOM:volume per volume", + "x-osdu-attribution-authority": "The Open Group", + "x-osdu-attribution-publication": "The OSDU Data Platform", + "x-osdu-attribution-revision": "evergreen" + }, + "WaterPc": { + "type": "number", + "title": "Water Pc", + "description": "Water content percent.", + "x-osdu-frame-of-reference": "UOM:volume per volume", + "x-osdu-attribution-authority": "The Open Group", + "x-osdu-attribution-publication": "The OSDU Data Platform", + "x-osdu-attribution-revision": "evergreen" + }, + "OilPc": { + "type": "number", + "title": "Oil Pc", + "description": "Percent oil content from retort.", + "x-osdu-frame-of-reference": "UOM:volume per volume", + "x-osdu-attribution-authority": "The Open Group", + "x-osdu-attribution-publication": "The OSDU Data Platform", + "x-osdu-attribution-revision": "evergreen" + }, + "SandPc": { + "type": "number", + "title": "Sand Pc", + "description": "Sand content percent.", + "x-osdu-frame-of-reference": "UOM:volume per volume", + "x-osdu-attribution-authority": "The Open Group", + "x-osdu-attribution-publication": "The OSDU Data Platform", + "x-osdu-attribution-revision": "evergreen" + }, + "SolidsLowGravPc": { + "type": "number", + "title": "Solids Low Grav Pc", + "description": "Low gravity solids percent.", + "x-osdu-frame-of-reference": "UOM:volume per volume", + "x-osdu-attribution-authority": "The Open Group", + "x-osdu-attribution-publication": "The OSDU Data Platform", + "x-osdu-attribution-revision": "evergreen" + }, + "SolidsLowGrav": { + "type": "number", + "title": "Solids Low Grav", + "description": "Solids low gravity content.", + "x-osdu-frame-of-reference": "UOM:mass per volume", + "x-osdu-attribution-authority": "The Open Group", + "x-osdu-attribution-publication": "The OSDU Data Platform", + "x-osdu-attribution-revision": "evergreen" + }, + "SolidsLowGravCorrected": { + "type": "number", + "title": "Solids Low Grav Corrected", + "description": "Solids low gravity content corrected for chloride content", + "x-osdu-frame-of-reference": "UOM:mass per volume", + "x-osdu-attribution-authority": "The Open Group", + "x-osdu-attribution-publication": "The OSDU Data Platform", + "x-osdu-attribution-revision": "evergreen" + }, + "SolidsHiGravPc": { + "type": "number", + "title": "Solids Hi Grav Pc", + "description": "Solids high gravity percent.", + "x-osdu-frame-of-reference": "UOM:volume per volume", + "x-osdu-attribution-authority": "The Open Group", + "x-osdu-attribution-publication": "The OSDU Data Platform", + "x-osdu-attribution-revision": "evergreen" + }, + "SolidsHiGrav": { + "type": "number", + "title": "Solids Hi Grav", + "description": "Solids high gravity content.", + "x-osdu-frame-of-reference": "UOM:mass per volume", + "x-osdu-attribution-authority": "The Open Group", + "x-osdu-attribution-publication": "The OSDU Data Platform", + "x-osdu-attribution-revision": "evergreen" + }, + "SolidsHiGravCorrected": { + "type": "number", + "title": "Solids Hi Grav Corrected", + "description": "Solids high gravity content corrected for chloride content", + "x-osdu-frame-of-reference": "UOM:mass per volume", + "x-osdu-attribution-authority": "The Open Group", + "x-osdu-attribution-publication": "The OSDU Data Platform", + "x-osdu-attribution-revision": "evergreen" + }, + "SolidsCalcPc": { + "type": "number", + "title": "Solids Calc Pc", + "description": "Percent calculated solids content.", + "x-osdu-frame-of-reference": "UOM:volume per volume", + "x-osdu-attribution-authority": "The Open Group", + "x-osdu-attribution-publication": "The OSDU Data Platform", + "x-osdu-attribution-revision": "evergreen" + }, + "BaritePc": { + "type": "number", + "title": "Barite Pc", + "description": "Barite content percent.", + "x-osdu-frame-of-reference": "UOM:volume per volume", + "x-osdu-attribution-authority": "The Open Group", + "x-osdu-attribution-publication": "The OSDU Data Platform", + "x-osdu-attribution-revision": "evergreen" + }, + "Lcm": { + "type": "number", + "title": "Lcm", + "description": "Lost circulation material.", + "x-osdu-frame-of-reference": "UOM:mass per volume", + "x-osdu-attribution-authority": "The Open Group", + "x-osdu-attribution-publication": "The OSDU Data Platform", + "x-osdu-attribution-revision": "evergreen" + }, + "Mbt": { + "type": "number", + "title": "Mbt", + "description": "Cation exchange capacity (CEC) of the mud sample as measured by methylene blue titration (MBT).\n\nNOTE: This is temporarily set to be a GenericMeasure with no unit validation, pending addition of CEC units to the Energistics UoM spec.", + "x-osdu-attribution-authority": "The Open Group", + "x-osdu-attribution-publication": "The OSDU Data Platform", + "x-osdu-attribution-revision": "evergreen" + }, + "MudPh": { + "type": "number", + "title": "Mud Ph", + "description": "Mud pH.", + "x-osdu-attribution-authority": "The Open Group", + "x-osdu-attribution-publication": "The OSDU Data Platform", + "x-osdu-attribution-revision": "evergreen" + }, + "MudTempPh": { + "type": "number", + "title": "Mud Temp Ph", + "description": "Mud pH measurement temperature.", + "x-osdu-frame-of-reference": "UOM:thermodynamic temperature", + "x-osdu-attribution-authority": "The Open Group", + "x-osdu-attribution-publication": "The OSDU Data Platform", + "x-osdu-attribution-revision": "evergreen" + }, + "Pm": { + "type": "number", + "title": "Pm", + "description": "Phenolphthalein alkalinity of whole mud.", + "x-osdu-frame-of-reference": "UOM:volume", + "x-osdu-attribution-authority": "The Open Group", + "x-osdu-attribution-publication": "The OSDU Data Platform", + "x-osdu-attribution-revision": "evergreen" + }, + "PmFiltrate": { + "type": "number", + "title": "Pm Filtrate", + "description": "Phenolphthalein alkalinity of mud filtrate.", + "x-osdu-frame-of-reference": "UOM:volume", + "x-osdu-attribution-authority": "The Open Group", + "x-osdu-attribution-publication": "The OSDU Data Platform", + "x-osdu-attribution-revision": "evergreen" + }, + "Mf": { + "type": "number", + "title": "Mf", + "description": "Methyl orange alkalinity of filtrate.", + "x-osdu-frame-of-reference": "UOM:volume", + "x-osdu-attribution-authority": "The Open Group", + "x-osdu-attribution-publication": "The OSDU Data Platform", + "x-osdu-attribution-revision": "evergreen" + }, + "AlkalinityP1": { + "type": "number", + "title": "Alkalinity P1", + "description": "Mud alkalinity P1 from alternate alkalinity method (volume in ml of 0.02N acid \nto reach the phenolphthalein endpoint).", + "x-osdu-frame-of-reference": "UOM:volume", + "x-osdu-attribution-authority": "The Open Group", + "x-osdu-attribution-publication": "The OSDU Data Platform", + "x-osdu-attribution-revision": "evergreen" + }, + "AlkalinityP2": { + "type": "number", + "title": "Alkalinity P2", + "description": "Mud alkalinity P2 from alternate alkalinity method (volume in ml of 0.02N acid to titrate, the reagent mixture to the phenolphthalein endpoint).", + "x-osdu-frame-of-reference": "UOM:volume", + "x-osdu-attribution-authority": "The Open Group", + "x-osdu-attribution-publication": "The OSDU Data Platform", + "x-osdu-attribution-revision": "evergreen" + }, + "Chloride": { + "type": "number", + "title": "Chloride", + "description": "Chloride content.", + "x-osdu-frame-of-reference": "UOM:mass per volume", + "x-osdu-attribution-authority": "The Open Group", + "x-osdu-attribution-publication": "The OSDU Data Platform", + "x-osdu-attribution-revision": "evergreen" + }, + "Calcium": { + "type": "number", + "title": "Calcium", + "description": "Calcium content.", + "x-osdu-frame-of-reference": "UOM:mass per volume", + "x-osdu-attribution-authority": "The Open Group", + "x-osdu-attribution-publication": "The OSDU Data Platform", + "x-osdu-attribution-revision": "evergreen" + }, + "Magnesium": { + "type": "number", + "title": "Magnesium", + "description": "Magnesium content.", + "x-osdu-frame-of-reference": "UOM:mass per volume", + "x-osdu-attribution-authority": "The Open Group", + "x-osdu-attribution-publication": "The OSDU Data Platform", + "x-osdu-attribution-revision": "evergreen" + }, + "Potassium": { + "type": "number", + "title": "Potassium", + "description": "Potassium content.", + "x-osdu-frame-of-reference": "UOM:mass per volume", + "x-osdu-attribution-authority": "The Open Group", + "x-osdu-attribution-publication": "The OSDU Data Platform", + "x-osdu-attribution-revision": "evergreen" + }, + "BrinePc": { + "type": "number", + "title": "Brine Pc", + "description": "Percent brine content.", + "x-osdu-frame-of-reference": "UOM:volume per volume", + "x-osdu-attribution-authority": "The Open Group", + "x-osdu-attribution-publication": "The OSDU Data Platform", + "x-osdu-attribution-revision": "evergreen" + }, + "BrineDensity": { + "type": "number", + "title": "Brine Density", + "description": "Density of water phase of NAF.", + "x-osdu-frame-of-reference": "UOM:mass per volume", + "x-osdu-attribution-authority": "The Open Group", + "x-osdu-attribution-publication": "The OSDU Data Platform", + "x-osdu-attribution-revision": "evergreen" + }, + "Lime": { + "type": "number", + "title": "Lime", + "description": "Lime content.", + "x-osdu-frame-of-reference": "UOM:mass per volume", + "x-osdu-attribution-authority": "The Open Group", + "x-osdu-attribution-publication": "The OSDU Data Platform", + "x-osdu-attribution-revision": "evergreen" + }, + "ElectStab": { + "type": "number", + "title": "Elect Stab", + "description": "Measurement of the emulsion stability and oil-wetting capability in oil-based muds.", + "x-osdu-frame-of-reference": "UOM:electric potential difference", + "x-osdu-attribution-authority": "The Open Group", + "x-osdu-attribution-publication": "The OSDU Data Platform", + "x-osdu-attribution-revision": "evergreen" + }, + "CalciumChloridePc": { + "type": "number", + "title": "Calcium Chloride Pc", + "description": "Calcium chloride percent.", + "x-osdu-frame-of-reference": "UOM:volume per volume", + "x-osdu-attribution-authority": "The Open Group", + "x-osdu-attribution-publication": "The OSDU Data Platform", + "x-osdu-attribution-revision": "evergreen" + }, + "CalciumChloride": { + "type": "number", + "title": "Calcium Chloride", + "description": "Calcium chloride content.", + "x-osdu-frame-of-reference": "UOM:mass per volume", + "x-osdu-attribution-authority": "The Open Group", + "x-osdu-attribution-publication": "The OSDU Data Platform", + "x-osdu-attribution-revision": "evergreen" + }, + "CompanyID": { + "type": "string", + "title": "Company", + "description": "Reference to the Company performing the analysis", + "x-osdu-attribution-authority": "The Open Group", + "x-osdu-attribution-publication": "The OSDU Data Platform", + "x-osdu-attribution-revision": "evergreen", + "pattern": "^[\\w\\-\\.]+:master-data\\-\\-Organisation:[\\w\\-\\.\\:\\%]+:[0-9]*$", + "x-osdu-relationship": [ + { + "GroupType": "master-data", + "EntityType": "Organisation" + } + ] + }, + "MudEngineer": { + "type": "string", + "title": "Mud Engineer", + "description": "The name of the Mud Engineer", + "x-osdu-attribution-authority": "The Open Group", + "x-osdu-attribution-publication": "The OSDU Data Platform", + "x-osdu-attribution-revision": "evergreen" + }, + "Asg": { + "type": "number", + "title": "Asg", + "description": "Average specific gravity of solids.", + "x-osdu-frame-of-reference": "UOM:mass per mass", + "x-osdu-attribution-authority": "The Open Group", + "x-osdu-attribution-publication": "The OSDU Data Platform", + "x-osdu-attribution-revision": "evergreen" + }, + "Polymer": { + "type": "number", + "title": "Polymer", + "description": "Polymers present in the mud system.", + "x-osdu-frame-of-reference": "UOM:volume per volume", + "x-osdu-attribution-authority": "The Open Group", + "x-osdu-attribution-publication": "The OSDU Data Platform", + "x-osdu-attribution-revision": "evergreen" + }, + "PolymerType": { + "type": "array", + "title": "Polymer Type", + "description": "Type of polymers present in the mud system.", + "x-osdu-attribution-authority": "The Open Group", + "x-osdu-attribution-publication": "The OSDU Data Platform", + "x-osdu-attribution-revision": "evergreen", + "items": { + "type": "string" + } + }, + "SolCorPc": { + "type": "number", + "title": "Sol Cor Pc", + "description": "Solids corrected for chloride content percent.", + "x-osdu-frame-of-reference": "UOM:volume per volume", + "x-osdu-attribution-authority": "The Open Group", + "x-osdu-attribution-publication": "The OSDU Data Platform", + "x-osdu-attribution-revision": "evergreen" + }, + "OilCtg": { + "type": "number", + "title": "Oil Ctg", + "description": "Oil on cuttings.", + "x-osdu-frame-of-reference": "UOM:mass per mass", + "x-osdu-attribution-authority": "The Open Group", + "x-osdu-attribution-publication": "The OSDU Data Platform", + "x-osdu-attribution-revision": "evergreen" + }, + "OilCtgDry": { + "type": "number", + "title": "Oil Ctg Dry", + "description": "Oil on dried cuttings.", + "x-osdu-frame-of-reference": "UOM:mass per volume", + "x-osdu-attribution-authority": "The Open Group", + "x-osdu-attribution-publication": "The OSDU Data Platform", + "x-osdu-attribution-revision": "evergreen" + }, + "HardnessCa": { + "type": "number", + "title": "Hardness Ca", + "description": "Total calcium hardness.", + "x-osdu-frame-of-reference": "UOM:mass per mass", + "x-osdu-attribution-authority": "The Open Group", + "x-osdu-attribution-publication": "The OSDU Data Platform", + "x-osdu-attribution-revision": "evergreen" + }, + "Sulfide": { + "type": "number", + "title": "Sulfide", + "description": "Sulfide content.", + "x-osdu-frame-of-reference": "UOM:mass per volume", + "x-osdu-attribution-authority": "The Open Group", + "x-osdu-attribution-publication": "The OSDU Data Platform", + "x-osdu-attribution-revision": "evergreen" + }, + "AverageCuttingSize": { + "type": "number", + "title": "Average Cutting Size", + "description": "Average size of the drill cuttings.", + "x-osdu-frame-of-reference": "UOM:length", + "x-osdu-attribution-authority": "The Open Group", + "x-osdu-attribution-publication": "The OSDU Data Platform", + "x-osdu-attribution-revision": "evergreen" + }, + "Carbonate": { + "type": "number", + "title": "Carbonate", + "description": "Carbonate content.", + "x-osdu-frame-of-reference": "UOM:mass per volume", + "x-osdu-attribution-authority": "The Open Group", + "x-osdu-attribution-publication": "The OSDU Data Platform", + "x-osdu-attribution-revision": "evergreen" + }, + "Iron": { + "type": "number", + "title": "Iron", + "description": "Iron content.", + "x-osdu-frame-of-reference": "UOM:mass per volume", + "x-osdu-attribution-authority": "The Open Group", + "x-osdu-attribution-publication": "The OSDU Data Platform", + "x-osdu-attribution-revision": "evergreen" + }, + "MetalRecovered": { + "type": "number", + "title": "Metal Recovered", + "description": "Metal recovered from the wellbore.", + "x-osdu-frame-of-reference": "UOM:mass", + "x-osdu-attribution-authority": "The Open Group", + "x-osdu-attribution-publication": "The OSDU Data Platform", + "x-osdu-attribution-revision": "evergreen" + }, + "Turbidity": { + "type": "number", + "title": "Turbidity", + "description": "Turbidity units to measure the cloudiness or haziness of a fluid.", + "x-osdu-attribution-authority": "The Open Group", + "x-osdu-attribution-publication": "The OSDU Data Platform", + "x-osdu-attribution-revision": "evergreen" + }, + "OilGrease": { + "type": "number", + "title": "Oil Grease", + "description": "Oil and grease content.", + "x-osdu-frame-of-reference": "UOM:mass per volume", + "x-osdu-attribution-authority": "The Open Group", + "x-osdu-attribution-publication": "The OSDU Data Platform", + "x-osdu-attribution-revision": "evergreen" + }, + "Salt": { + "type": "number", + "title": "Salt", + "description": "Salt content.", + "x-osdu-frame-of-reference": "UOM:mass per volume", + "x-osdu-attribution-authority": "The Open Group", + "x-osdu-attribution-publication": "The OSDU Data Platform", + "x-osdu-attribution-revision": "evergreen" + }, + "SaltPc": { + "type": "number", + "title": "Salt Pc", + "description": "Salt percent.", + "x-osdu-frame-of-reference": "UOM:volume per volume", + "x-osdu-attribution-authority": "The Open Group", + "x-osdu-attribution-publication": "The OSDU Data Platform", + "x-osdu-attribution-revision": "evergreen" + }, + "Tct": { + "type": "number", + "title": "Tct", + "description": "True crystallization temperature.", + "x-osdu-frame-of-reference": "UOM:thermodynamic temperature", + "x-osdu-attribution-authority": "The Open Group", + "x-osdu-attribution-publication": "The OSDU Data Platform", + "x-osdu-attribution-revision": "evergreen" + }, + "WaterPhaseSalinity": { + "type": "number", + "title": "Water Phase Salinity", + "description": "A factor showing the activity level of salt in oil-based mud.", + "x-osdu-frame-of-reference": "UOM:mass per volume", + "x-osdu-attribution-authority": "The Open Group", + "x-osdu-attribution-publication": "The OSDU Data Platform", + "x-osdu-attribution-revision": "evergreen" + }, + "WholeMudCalcium": { + "type": "number", + "title": "Whole Mud Calcium", + "description": "Calcium content in the whole mud sample, including oil and water phases.", + "x-osdu-frame-of-reference": "UOM:mass per volume", + "x-osdu-attribution-authority": "The Open Group", + "x-osdu-attribution-publication": "The OSDU Data Platform", + "x-osdu-attribution-revision": "evergreen" + }, + "WholeMudChloride": { + "type": "number", + "title": "Whole Mud Chloride", + "description": "Chloride content in the whole mud sample, including oil and water phases.", + "x-osdu-frame-of-reference": "UOM:mass per volume", + "x-osdu-attribution-authority": "The Open Group", + "x-osdu-attribution-publication": "The OSDU Data Platform", + "x-osdu-attribution-revision": "evergreen" + }, + "ZincOxide": { + "type": "number", + "title": "Zinc Oxide", + "description": "Zinc oxide content.", + "x-osdu-frame-of-reference": "UOM:mass per volume", + "x-osdu-attribution-authority": "The Open Group", + "x-osdu-attribution-publication": "The OSDU Data Platform", + "x-osdu-attribution-revision": "evergreen" + }, + "SodiumChloride": { + "type": "number", + "title": "Sodium Chloride", + "description": "Sodium chloride content.", + "x-osdu-frame-of-reference": "UOM:mass per volume", + "x-osdu-attribution-authority": "The Open Group", + "x-osdu-attribution-publication": "The OSDU Data Platform", + "x-osdu-attribution-revision": "evergreen" + }, + "SodiumChloridePc": { + "type": "number", + "title": "Sodium Chloride Pc", + "description": "Sodium chloride percent.", + "x-osdu-frame-of-reference": "UOM:volume per volume", + "x-osdu-attribution-authority": "The Open Group", + "x-osdu-attribution-publication": "The OSDU Data Platform", + "x-osdu-attribution-revision": "evergreen" + }, + "Comments": { + "type": "string", + "title": "Comments", + "description": "Comments and remarks.", + "x-osdu-attribution-authority": "The Open Group", + "x-osdu-attribution-publication": "The OSDU Data Platform", + "x-osdu-attribution-revision": "evergreen" + }, + "Rheometer": { + "type": "array", + "title": "Rheometer", + "description": "Details of the Rheometer tests performed on the fluid sample", + "x-osdu-attribution-authority": "The Open Group", + "x-osdu-attribution-publication": "The OSDU Data Platform", + "x-osdu-attribution-revision": "evergreen", + "items": { + "type": "object", + "title": "Rheometer", + "description": "Rheometer values observed", + "properties": { + "TemperatureRheometer": { + "type": "number", + "title": "Temperature Rheometer", + "description": "The temperature at which the rheometer values were measured", + "x-osdu-frame-of-reference": "UOM:thermodynamic temperature", + "x-osdu-attribution-authority": "The Open Group", + "x-osdu-attribution-publication": "The OSDU Data Platform", + "x-osdu-attribution-revision": "evergreen" + }, + "PressureRheometer": { + "type": "number", + "title": "Pressure Rheometer", + "description": "The pressure at which the rheometer values were measured", + "x-osdu-frame-of-reference": "UOM:pressure", + "x-osdu-attribution-authority": "The Open Group", + "x-osdu-attribution-publication": "The OSDU Data Platform", + "x-osdu-attribution-revision": "evergreen" + }, + "RheometerViscosities": { + "type": "array", + "title": "Rheometer Viscosities", + "description": "The viscosities recorder during the Rheometer test", + "x-osdu-attribution-authority": "The Open Group", + "x-osdu-attribution-publication": "The OSDU Data Platform", + "x-osdu-attribution-revision": "evergreen", + "items": { + "type": "object", + "title": "Rheometer Viscosity", + "description": "Viscosity values observed", + "properties": { + "Speed": { + "type": "number", + "title": "Speed", + "description": "Rotational speed of the rheometer, typically in RPM.", + "x-osdu-frame-of-reference": "UOM:angular velocity", + "x-osdu-attribution-authority": "The Open Group", + "x-osdu-attribution-publication": "The OSDU Data Platform", + "x-osdu-attribution-revision": "evergreen" + }, + "Viscosity": { + "type": "number", + "title": "Viscosity", + "description": "The raw reading from a rheometer. This could be, but is not necessarily, a viscosity.", + "x-osdu-frame-of-reference": "UOM:dynamic viscosity", + "x-osdu-attribution-authority": "The Open Group", + "x-osdu-attribution-publication": "The OSDU Data Platform", + "x-osdu-attribution-revision": "evergreen" + } + }, + "required": [ + "Speed", + "Viscosity" + ] + } + } + }, + "required": [ + "TemperatureRheometer", + "PressureRheometer" + ] + } + } + } + } + }, + "WellboreID": { + "type": "string", + "title": "Wellbore ID", + "description": "Reference to the wellbore that is the subject of this fluids report", + "x-osdu-attribution-authority": "The Open Group", + "x-osdu-attribution-publication": "The OSDU Data Platform", + "x-osdu-attribution-revision": "evergreen", + "pattern": "^[\\w\\-\\.]+:master-data\\-\\-Wellbore:[\\w\\-\\.\\:\\%]+:[0-9]*$", + "x-osdu-relationship": [ + { + "GroupType": "master-data", + "EntityType": "Wellbore" + } + ] + }, + "Name": { + "type": "string", + "title": "Name", + "description": "Name of Fluids Report" + } + }, + "required": [ + "StartDateTime", + "EndDateTime", + "WellboreID" + ], + "title": "IndividualProperties" + }, + { + "type": "object", + "properties": { + "ExtensionProperties": { + "type": "object" + } + }, + "title": "ExtensionProperties" + } + ] + } + }, + "required": [ + "kind", + "acl", + "legal" + ], + "additionalProperties": false, + "x-osdu-review-status": "Accepted", + "x-osdu-virtual-properties": { + "data.VirtualProperties.DefaultLocation": { + "type": "object", + "priority": [ + { + "path": "data.SpatialLocation" + } + ] + }, + "data.VirtualProperties.DefaultName": { + "type": "string", + "priority": [ + { + "path": "data.Name" + } + ] + } + }, + "x-osdu-inheriting-from-kind": [] + } +} \ No newline at end of file diff --git a/deployments/shared-schemas/osdu/master-data/ModelFeature.1.0.0.json b/deployments/shared-schemas/osdu/master-data/ModelFeature.1.0.0.json index 16891c2e..769ee174 100644 --- a/deployments/shared-schemas/osdu/master-data/ModelFeature.1.0.0.json +++ b/deployments/shared-schemas/osdu/master-data/ModelFeature.1.0.0.json @@ -113,7 +113,13 @@ }, { "type": "object", - "properties": {}, + "properties": { + "Name": { + "type": "string", + "title": "Name", + "description": "The name of the model feature." + } + }, "title": "IndividualProperties" }, { diff --git a/deployments/shared-schemas/osdu/master-data/OperationsReport.1.0.0.json b/deployments/shared-schemas/osdu/master-data/OperationsReport.1.0.0.json index f941362e..19d269f3 100644 --- a/deployments/shared-schemas/osdu/master-data/OperationsReport.1.0.0.json +++ b/deployments/shared-schemas/osdu/master-data/OperationsReport.1.0.0.json @@ -1557,49 +1557,6 @@ } ] }, - "TotalCost": { - "type": "number", - "title": "Total Cost", - "description": "Cumulative cost for the job through the end of current report", - "x-osdu-attribution-authority": "The Open Group", - "x-osdu-attribution-publication": "The OSDU Data Platform", - "x-osdu-attribution-revision": "1.0.0" - }, - "TargetCost": { - "type": "number", - "title": "Target Cost", - "description": "Authorized cost for the total job", - "x-osdu-attribution-authority": "The Open Group", - "x-osdu-attribution-publication": "The OSDU Data Platform", - "x-osdu-attribution-revision": "1.0.0" - }, - "TotalDays": { - "type": "number", - "title": "Total Days", - "description": "Cumulative days for the job through the end of the current report", - "x-osdu-frame-of-reference": "UOM:time", - "x-osdu-attribution-authority": "The Open Group", - "x-osdu-attribution-publication": "The OSDU Data Platform", - "x-osdu-attribution-revision": "1.0.0" - }, - "TargetDays": { - "type": "number", - "title": "Target Days", - "description": "Planned days for the total job", - "x-osdu-frame-of-reference": "UOM:time", - "x-osdu-attribution-authority": "The Open Group", - "x-osdu-attribution-publication": "The OSDU Data Platform", - "x-osdu-attribution-revision": "1.0.0" - }, - "TotalNPT": { - "type": "number", - "title": "Total Non-Productive Time", - "description": "Total days of non-productive time through the end of the current report", - "x-osdu-frame-of-reference": "UOM:time", - "x-osdu-attribution-authority": "The Open Group", - "x-osdu-attribution-publication": "The OSDU Data Platform", - "x-osdu-attribution-revision": "1.0.0" - }, "Weather": { "type": "array", "title": "Weather", @@ -3390,6 +3347,54 @@ "x-osdu-attribution-authority": "The Open Group", "x-osdu-attribution-publication": "The OSDU Data Platform", "x-osdu-attribution-revision": "1.0.0" + }, + "TotalCost": { + "type": "number", + "title": "Total Cost", + "description": "Cumulative cost for the job through the end of current report", + "x-osdu-attribution-authority": "The Open Group", + "x-osdu-attribution-publication": "The OSDU Data Platform", + "x-osdu-attribution-revision": "1.0.0" + }, + "TargetCost": { + "type": "number", + "title": "Target Cost", + "description": "Authorized cost for the total job", + "x-osdu-attribution-authority": "The Open Group", + "x-osdu-attribution-publication": "The OSDU Data Platform", + "x-osdu-attribution-revision": "1.0.0" + }, + "TargetDays": { + "type": "number", + "title": "Target Days", + "description": "Planned days for the total job", + "x-osdu-frame-of-reference": "UOM:time", + "x-osdu-attribution-authority": "The Open Group", + "x-osdu-attribution-publication": "The OSDU Data Platform", + "x-osdu-attribution-revision": "1.0.0" + }, + "TotalDays": { + "type": "number", + "title": "Total Days", + "description": "Cumulative days for the job through the end of the current report", + "x-osdu-frame-of-reference": "UOM:time", + "x-osdu-attribution-authority": "The Open Group", + "x-osdu-attribution-publication": "The OSDU Data Platform", + "x-osdu-attribution-revision": "1.0.0" + }, + "TotalNPT": { + "type": "number", + "title": "Total Non-Productive Time", + "description": "Total days of non-productive time through the end of the current report", + "x-osdu-frame-of-reference": "UOM:time", + "x-osdu-attribution-authority": "The Open Group", + "x-osdu-attribution-publication": "The OSDU Data Platform", + "x-osdu-attribution-revision": "1.0.0" + }, + "Name": { + "type": "string", + "title": "Name", + "description": "Name of Operations Report" } }, "required": [ diff --git a/deployments/shared-schemas/osdu/master-data/Organisation.1.1.0.json b/deployments/shared-schemas/osdu/master-data/Organisation.1.1.0.json new file mode 100644 index 00000000..be7c2f0a --- /dev/null +++ b/deployments/shared-schemas/osdu/master-data/Organisation.1.1.0.json @@ -0,0 +1,220 @@ +{ + "schemaInfo": { + "schemaIdentity": { + "authority": "{{schema-authority}}", + "source": "wks", + "entityType": "master-data--Organisation", + "schemaVersionMajor": 1, + "schemaVersionMinor": 1, + "schemaVersionPatch": 0, + "id": "{{schema-authority}}:wks:master-data--Organisation:1.1.0" + }, + "createdBy": "OSDU Data Definition Group", + "scope": "SHARED", + "status": "DEVELOPMENT" + }, + "schema": { + "x-osdu-license": "Copyright 2022, The Open Group \\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.", + "$id": "https://schema.osdu.opengroup.org/json/master-data/Organisation.1.1.0.json", + "$schema": "http://json-schema.org/draft-07/schema#", + "x-osdu-schema-source": "osdu:wks:master-data--Organisation:1.1.0", + "title": "Organisation", + "description": "A legal or administrative body, institution, or company, or any of its divisions.", + "type": "object", + "properties": { + "id": { + "description": "Previously called ResourceID or SRN which identifies this OSDU resource object without version.", + "title": "Entity ID", + "type": "string", + "pattern": "^[\\w\\-\\.]+:master-data\\-\\-Organisation:[\\w\\-\\.\\:\\%]+$", + "example": "namespace:master-data--Organisation:89137461-c8e6-5e41-8370-96229199da70" + }, + "kind": { + "description": "The schema identification for the OSDU resource object following the pattern {Namespace}:{Source}:{Type}:{VersionMajor}.{VersionMinor}.{VersionPatch}. The versioning scheme follows the semantic versioning, https://semver.org/.", + "title": "Entity Kind", + "type": "string", + "pattern": "^[\\w\\-\\.]+:[\\w\\-\\.]+:[\\w\\-\\.]+:[0-9]+.[0-9]+.[0-9]+$", + "example": "osdu:wks:master-data--Organisation:1.1.0" + }, + "version": { + "description": "The version number of this OSDU resource; set by the framework.", + "title": "Version Number", + "type": "integer", + "format": "int64", + "example": 1562066009929332 + }, + "acl": { + "description": "The access control tags associated with this entity.", + "title": "Access Control List", + "$ref": "{{schema-authority}}:wks:AbstractAccessControlList:1.0.0" + }, + "legal": { + "description": "The entity's legal tags and compliance status. The actual contents associated with the legal tags is managed by the Compliance Service.", + "title": "Legal Tags", + "$ref": "{{schema-authority}}:wks:AbstractLegalTags:1.0.0" + }, + "tags": { + "title": "Tag Dictionary", + "description": "A generic dictionary of string keys mapping to string value. Only strings are permitted as keys and values.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "example": { + "NameOfKey": "String value" + } + }, + "createTime": { + "description": "Timestamp of the time at which initial version of this OSDU resource object was created. Set by the System. The value is a combined date-time string in ISO-8601 given in UTC.", + "title": "Resource Object Creation DateTime", + "type": "string", + "format": "date-time", + "example": "2020-12-16T11:46:20.163Z" + }, + "createUser": { + "title": "Resource Object Creation User Reference", + "description": "The user reference, which created the first version of this resource object. Set by the System.", + "type": "string", + "example": "some-user@some-company-cloud.com" + }, + "modifyTime": { + "description": "Timestamp of the time at which this version of the OSDU resource object was created. Set by the System. The value is a combined date-time string in ISO-8601 given in UTC.", + "title": "Resource Object Version Creation DateTime", + "type": "string", + "format": "date-time", + "example": "2020-12-16T11:52:24.477Z" + }, + "modifyUser": { + "title": "Resource Object Version Creation User Reference", + "description": "The user reference, which created this version of this resource object. Set by the System.", + "type": "string", + "example": "some-user@some-company-cloud.com" + }, + "ancestry": { + "description": "The links to data, which constitute the inputs, from which this record instance is derived.", + "title": "Ancestry", + "$ref": "{{schema-authority}}:wks:AbstractLegalParentList:1.0.0" + }, + "meta": { + "description": "The Frame of Reference meta data section linking the named properties to self-contained definitions.", + "title": "Frame of Reference Meta Data", + "type": "array", + "items": { + "$ref": "{{schema-authority}}:wks:AbstractMetaItem:1.0.0" + } + }, + "data": { + "allOf": [ + { + "$ref": "{{schema-authority}}:wks:AbstractCommonResources:1.0.0" + }, + { + "$ref": "{{schema-authority}}:wks:AbstractMaster:1.0.0" + }, + { + "type": "object", + "properties": { + "OrganisationID": { + "type": "string", + "title": "External Organisation Identifier", + "description": "Native identifier from a Master Data Management System or other trusted source external to OSDU - stored here in order to allow for multi-system connection and synchronization. If used, the \"Source\" property should identify that source system." + }, + "OrganisationName": { + "type": "string", + "description": "Text which identifies an organisation." + }, + "OrganisationNameAliases": { + "type": "array", + "description": "DEPRECATED: please use data.NameAliases. Alternative names, including historical, by which this organisation entity is/has been known.", + "items": { + "$ref": "{{schema-authority}}:wks:AbstractAliasNames:1.0.0" + } + }, + "InternalOrganisationIndicator": { + "type": "boolean", + "description": "Indicates if the organisation is internal to the enterprise." + }, + "OrganisationPurposeDescription": { + "type": "string", + "description": "The reason why the organization was formed." + }, + "OrganisationDescription": { + "type": "string", + "description": "Textual description of the nature of the organisation." + }, + "EffectiveDate": { + "type": "string", + "description": "The date and time at which a given organisation becomes effective.", + "format": "date-time" + }, + "TerminationDate": { + "type": "string", + "description": "The date and time at which a given organisation is no longer in effect.", + "format": "date-time" + }, + "OrganisationTypeID": { + "type": "string", + "description": "Category the organisational structure fits into. Possible values - Operating Unit, Operating sub Unit, A Business, A Department, Government Agency, etc.", + "pattern": "^[\\w\\-\\.]+:reference-data\\-\\-OrganisationType:[\\w\\-\\.\\:\\%]+:[0-9]*$", + "x-osdu-relationship": [ + { + "GroupType": "reference-data", + "EntityType": "OrganisationType" + } + ] + }, + "ParentOrganisationID": { + "type": "string", + "title": "Parent Organisation ID", + "description": "If populated, this is the parent organisation of the current organisation.", + "pattern": "^[\\w\\-\\.]+:master-data\\-\\-Organisation:[\\w\\-\\.\\:\\%]+:[0-9]*$", + "x-osdu-relationship": [ + { + "GroupType": "master-data", + "EntityType": "Organisation" + } + ] + } + }, + "title": "IndividualProperties" + }, + { + "type": "object", + "properties": { + "ExtensionProperties": { + "type": "object" + } + }, + "title": "ExtensionProperties" + } + ] + } + }, + "required": [ + "kind", + "acl", + "legal" + ], + "additionalProperties": false, + "x-osdu-review-status": "Accepted", + "x-osdu-virtual-properties": { + "data.VirtualProperties.DefaultLocation": { + "type": "object", + "priority": [ + { + "path": "data.SpatialLocation" + } + ] + }, + "data.VirtualProperties.DefaultName": { + "type": "string", + "priority": [ + { + "path": "data.OrganisationName" + } + ] + } + }, + "x-osdu-inheriting-from-kind": [] + } +} \ No newline at end of file diff --git a/deployments/shared-schemas/osdu/master-data/RockVolumeFeature.1.0.0.json b/deployments/shared-schemas/osdu/master-data/RockVolumeFeature.1.0.0.json index 8c30c0fe..f203db4e 100644 --- a/deployments/shared-schemas/osdu/master-data/RockVolumeFeature.1.0.0.json +++ b/deployments/shared-schemas/osdu/master-data/RockVolumeFeature.1.0.0.json @@ -113,7 +113,13 @@ }, { "type": "object", - "properties": {}, + "properties": { + "Name": { + "type": "string", + "title": "Name", + "description": "The name of the rock volume feature." + } + }, "title": "IndividualProperties" }, { diff --git a/deployments/shared-schemas/osdu/master-data/Seismic2DInterpretationSet.1.1.0.json b/deployments/shared-schemas/osdu/master-data/Seismic2DInterpretationSet.1.1.0.json index ab270701..6ae1e368 100644 --- a/deployments/shared-schemas/osdu/master-data/Seismic2DInterpretationSet.1.1.0.json +++ b/deployments/shared-schemas/osdu/master-data/Seismic2DInterpretationSet.1.1.0.json @@ -183,7 +183,7 @@ "type": "string", "priority": [ { - "path": "data.Name" + "path": "data.ProjectName" } ] } diff --git a/deployments/shared-schemas/osdu/master-data/Seismic3DInterpretationSet.1.1.0.json b/deployments/shared-schemas/osdu/master-data/Seismic3DInterpretationSet.1.1.0.json index 02a70f04..1a19278c 100644 --- a/deployments/shared-schemas/osdu/master-data/Seismic3DInterpretationSet.1.1.0.json +++ b/deployments/shared-schemas/osdu/master-data/Seismic3DInterpretationSet.1.1.0.json @@ -166,7 +166,7 @@ "type": "string", "priority": [ { - "path": "data.Name" + "path": "data.ProjectName" } ] } diff --git a/deployments/shared-schemas/osdu/master-data/SeismicAcquisitionSurvey.1.1.0.json b/deployments/shared-schemas/osdu/master-data/SeismicAcquisitionSurvey.1.1.0.json index f3fe637e..4d73192f 100644 --- a/deployments/shared-schemas/osdu/master-data/SeismicAcquisitionSurvey.1.1.0.json +++ b/deployments/shared-schemas/osdu/master-data/SeismicAcquisitionSurvey.1.1.0.json @@ -433,7 +433,7 @@ "type": "string", "priority": [ { - "path": "data.Name" + "path": "data.ProjectName" } ] } diff --git a/deployments/shared-schemas/osdu/master-data/SeismicProcessingProject.1.1.0.json b/deployments/shared-schemas/osdu/master-data/SeismicProcessingProject.1.1.0.json index a6ae2767..825b9c6a 100644 --- a/deployments/shared-schemas/osdu/master-data/SeismicProcessingProject.1.1.0.json +++ b/deployments/shared-schemas/osdu/master-data/SeismicProcessingProject.1.1.0.json @@ -169,7 +169,7 @@ "type": "string", "priority": [ { - "path": "data.Name" + "path": "data.ProjectName" } ] } diff --git a/deployments/shared-schemas/osdu/reference-data/AzimuthReferenceType.1.0.0.json b/deployments/shared-schemas/osdu/reference-data/AzimuthReferenceType.1.0.0.json index 64f65351..80ac9370 100644 --- a/deployments/shared-schemas/osdu/reference-data/AzimuthReferenceType.1.0.0.json +++ b/deployments/shared-schemas/osdu/reference-data/AzimuthReferenceType.1.0.0.json @@ -19,7 +19,7 @@ "$schema": "http://json-schema.org/draft-07/schema#", "x-osdu-schema-source": "osdu:wks:reference-data--AzimuthReferenceType:1.0.0", "title": "AzimuthReferenceType", - "description": "Used to describe the type of azimuth reference, e.g. 'True North', 'Grid North', 'Magnetic North'.", + "description": "The definition of north in a spatial reference survey. A reference table identifying valid north references used in surveying to define angular measurements", "type": "object", "properties": { "id": { diff --git a/deployments/shared-schemas/osdu/reference-data/CalculationMethodType.1.0.0.json b/deployments/shared-schemas/osdu/reference-data/CalculationMethodType.1.0.0.json index ec715bb7..0772a2e3 100644 --- a/deployments/shared-schemas/osdu/reference-data/CalculationMethodType.1.0.0.json +++ b/deployments/shared-schemas/osdu/reference-data/CalculationMethodType.1.0.0.json @@ -19,7 +19,7 @@ "$schema": "http://json-schema.org/draft-07/schema#", "x-osdu-schema-source": "osdu:wks:reference-data--CalculationMethodType:1.0.0", "title": "CalculationMethodType", - "description": "The algorithm to determine the positional coordinates along a wellbore path.", + "description": "The method to calculate a wellbore path from the discrete station measurements of a wellbore directional survey.", "type": "object", "properties": { "id": { @@ -130,7 +130,7 @@ ], "additionalProperties": false, "x-osdu-governance-authorities": [ - "OSDU" + "PPDM" ], "x-osdu-governance-model": "OPEN", "x-osdu-virtual-properties": { diff --git a/deployments/shared-schemas/osdu/reference-data/CatalogMapStateType.1.0.0.json b/deployments/shared-schemas/osdu/reference-data/CatalogMapStateType.1.0.0.json new file mode 100644 index 00000000..4dbb8fbb --- /dev/null +++ b/deployments/shared-schemas/osdu/reference-data/CatalogMapStateType.1.0.0.json @@ -0,0 +1,159 @@ +{ + "schemaInfo": { + "schemaIdentity": { + "authority": "{{schema-authority}}", + "source": "wks", + "entityType": "reference-data--CatalogMapStateType", + "schemaVersionMajor": 1, + "schemaVersionMinor": 0, + "schemaVersionPatch": 0, + "id": "{{schema-authority}}:wks:reference-data--CatalogMapStateType:1.0.0" + }, + "createdBy": "OSDU Data Definition Group", + "scope": "SHARED", + "status": "DEVELOPMENT" + }, + "schema": { + "x-osdu-license": "Copyright 2022, The Open Group \\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.", + "$id": "https://schema.osdu.opengroup.org/json/reference-data/CatalogMapStateType.1.0.0.json", + "$schema": "http://json-schema.org/draft-07/schema#", + "x-osdu-schema-source": "osdu:wks:reference-data--CatalogMapStateType:1.0.0", + "title": "CatalogMapStateType", + "description": "A qualification of a mapping between catalog items. Mappings can be between 'identical' items, similar but not identical items or not supported.", + "type": "object", + "properties": { + "id": { + "description": "Previously called ResourceID or SRN which identifies this OSDU resource object without version.", + "title": "Entity ID", + "type": "string", + "pattern": "^[\\w\\-\\.]+:reference-data\\-\\-CatalogMapStateType:[\\w\\-\\.\\:\\%]+$", + "example": "namespace:reference-data--CatalogMapStateType:92c898a7-ab68-57e2-b9d6-132ddef25965" + }, + "kind": { + "description": "The schema identification for the OSDU resource object following the pattern {Namespace}:{Source}:{Type}:{VersionMajor}.{VersionMinor}.{VersionPatch}. The versioning scheme follows the semantic versioning, https://semver.org/.", + "title": "Entity Kind", + "type": "string", + "pattern": "^[\\w\\-\\.]+:[\\w\\-\\.]+:[\\w\\-\\.]+:[0-9]+.[0-9]+.[0-9]+$", + "example": "osdu:wks:reference-data--CatalogMapStateType:1.0.0" + }, + "version": { + "description": "The version number of this OSDU resource; set by the framework.", + "title": "Version Number", + "type": "integer", + "format": "int64", + "example": 1562066009929332 + }, + "acl": { + "description": "The access control tags associated with this entity.", + "title": "Access Control List", + "$ref": "{{schema-authority}}:wks:AbstractAccessControlList:1.0.0" + }, + "legal": { + "description": "The entity's legal tags and compliance status. The actual contents associated with the legal tags is managed by the Compliance Service.", + "title": "Legal Tags", + "$ref": "{{schema-authority}}:wks:AbstractLegalTags:1.0.0" + }, + "tags": { + "title": "Tag Dictionary", + "description": "A generic dictionary of string keys mapping to string value. Only strings are permitted as keys and values.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "example": { + "NameOfKey": "String value" + } + }, + "createTime": { + "description": "Timestamp of the time at which initial version of this OSDU resource object was created. Set by the System. The value is a combined date-time string in ISO-8601 given in UTC.", + "title": "Resource Object Creation DateTime", + "type": "string", + "format": "date-time", + "example": "2020-12-16T11:46:20.163Z" + }, + "createUser": { + "title": "Resource Object Creation User Reference", + "description": "The user reference, which created the first version of this resource object. Set by the System.", + "type": "string", + "example": "some-user@some-company-cloud.com" + }, + "modifyTime": { + "description": "Timestamp of the time at which this version of the OSDU resource object was created. Set by the System. The value is a combined date-time string in ISO-8601 given in UTC.", + "title": "Resource Object Version Creation DateTime", + "type": "string", + "format": "date-time", + "example": "2020-12-16T11:52:24.477Z" + }, + "modifyUser": { + "title": "Resource Object Version Creation User Reference", + "description": "The user reference, which created this version of this resource object. Set by the System.", + "type": "string", + "example": "some-user@some-company-cloud.com" + }, + "ancestry": { + "description": "The links to data, which constitute the inputs, from which this record instance is derived.", + "title": "Ancestry", + "$ref": "{{schema-authority}}:wks:AbstractLegalParentList:1.0.0" + }, + "meta": { + "description": "The Frame of Reference meta data section linking the named properties to self-contained definitions.", + "title": "Frame of Reference Meta Data", + "type": "array", + "items": { + "$ref": "{{schema-authority}}:wks:AbstractMetaItem:1.0.0" + } + }, + "data": { + "allOf": [ + { + "$ref": "{{schema-authority}}:wks:AbstractCommonResources:1.0.0" + }, + { + "$ref": "{{schema-authority}}:wks:AbstractReferenceType:1.0.0" + }, + { + "type": "object", + "properties": {}, + "title": "IndividualProperties" + }, + { + "type": "object", + "properties": { + "ExtensionProperties": { + "type": "object" + } + }, + "title": "ExtensionProperties" + } + ] + } + }, + "required": [ + "kind", + "acl", + "legal" + ], + "additionalProperties": false, + "x-osdu-review-status": "Accepted", + "x-osdu-governance-model": "FIXED", + "x-osdu-governance-authorities": [ + "OSDU" + ], + "x-osdu-virtual-properties": { + "data.VirtualProperties.DefaultName": { + "type": "string", + "priority": [ + { + "path": "data.Name" + } + ] + } + }, + "x-osdu-inheriting-from-kind": [ + { + "name": "ReferenceType", + "kind": "osdu:wks:AbstractReferenceType:1.0.0" + } + ] + } +} \ No newline at end of file diff --git a/deployments/shared-schemas/osdu/reference-data/CoordinateReferenceSystem.1.0.0.json b/deployments/shared-schemas/osdu/reference-data/CoordinateReferenceSystem.1.0.0.json index 0982bab6..6ac34bb6 100644 --- a/deployments/shared-schemas/osdu/reference-data/CoordinateReferenceSystem.1.0.0.json +++ b/deployments/shared-schemas/osdu/reference-data/CoordinateReferenceSystem.1.0.0.json @@ -162,7 +162,7 @@ "properties": { "AuthorityCode": { "title": "Horizontal CRS Authority Code", - "description": "The HorizontalCrs authority code, corresponding to the ISO19111 ID and 'projjson' id.", + "description": "The HorizontalCRS authority code, corresponding to the ISO19111 ID and 'projjson' id.", "type": "object", "properties": { "Authority": { @@ -191,7 +191,7 @@ "type": "string", "description": "The relationship to the HorizontalCrs.", "pattern": "^[\\w\\-\\.]+:reference-data\\-\\-CoordinateReferenceSystem:[\\w\\-\\.\\:\\%]+:[0-9]*$", - "example": "namespace:reference-data--CoordinateReferenceSystem:ProjectedCRS.EPSG.32615:", + "example": "namespace:reference-data--CoordinateReferenceSystem:Projected:EPSG::32615:", "x-osdu-relationship": [ { "GroupType": "reference-data", @@ -208,7 +208,7 @@ "properties": { "AuthorityCode": { "title": "Vertical CRS Authority Code", - "description": "The VerticalCrs authority code, corresponding to the ISO19111 ID and 'projjson' id.", + "description": "The VerticalCRS authority code, corresponding to the ISO19111 ID and 'projjson' id.", "type": "object", "properties": { "Authority": { @@ -237,7 +237,7 @@ "type": "string", "description": "The relationship to the VerticalCrs.", "pattern": "^[\\w\\-\\.]+:reference-data\\-\\-CoordinateReferenceSystem:[\\w\\-\\.\\:\\%]+:[0-9]*$", - "example": "namespace:reference-data--CoordinateReferenceSystem:VerticalCRS.EPSG.5714:", + "example": "namespace:reference-data--CoordinateReferenceSystem:Vertical:EPSG::5714:", "x-osdu-relationship": [ { "GroupType": "reference-data", @@ -283,7 +283,7 @@ "type": "string", "description": "The relationship to the bound transformation.", "pattern": "^[\\w\\-\\.]+:reference-data\\-\\-CoordinateTransformation:[\\w\\-\\.\\:\\%]+:[0-9]*$", - "example": "namespace:reference-data--CoordinateTransformation:Transformation.EPSG.1613:", + "example": "namespace:reference-data--CoordinateTransformation:EPSG::1613:", "x-osdu-relationship": [ { "GroupType": "reference-data", @@ -365,7 +365,7 @@ "properties": { "AuthorityCode": { "title": "Projection Operation Authority Code", - "description": "The DatumEnsemble authority code, corresponding to the ISO19111 ID and 'projjson' id.", + "description": "The Projection Operation authority code, corresponding to the ISO19111 ID and 'projjson' id.", "type": "object", "properties": { "Authority": { @@ -427,7 +427,7 @@ "type": "string", "description": "The relationship to the BaseCRS.", "pattern": "^[\\w\\-\\.]+:reference-data\\-\\-CoordinateReferenceSystem:[\\w\\-\\.\\:\\%]+:[0-9]*$", - "example": "namespace:reference-data--CoordinateReferenceSystem:GeodeticCRS.EPSG.4230:", + "example": "namespace:reference-data--CoordinateReferenceSystem:Geographic2D:EPSG:4230:", "x-osdu-relationship": [ { "GroupType": "reference-data", @@ -473,7 +473,7 @@ "type": "string", "description": "The relationship to the source CoordinateRefSystem.", "pattern": "^[\\w\\-\\.]+:reference-data\\-\\-CoordinateReferenceSystem:[\\w\\-\\.\\:\\%]+:[0-9]*$", - "example": "namespace:reference-data--CoordinateReferenceSystem:ProjectedCRS.EPSG.23031:", + "example": "namespace:reference-data--CoordinateReferenceSystem:Projected:EPSG::23031:", "x-osdu-relationship": [ { "GroupType": "reference-data", @@ -519,7 +519,7 @@ "type": "string", "description": "The relationship to the TargetCRS.", "pattern": "^[\\w\\-\\.]+:reference-data\\-\\-CoordinateReferenceSystem:[\\w\\-\\.\\:\\%]+:[0-9]*$", - "example": "namespace:reference-data--CoordinateReferenceSystem:GeodeticCRS.EPSG.4326:", + "example": "namespace:reference-data--CoordinateReferenceSystem:Geographic2D:EPSG::4326:", "x-osdu-relationship": [ { "GroupType": "reference-data", @@ -603,13 +603,13 @@ }, "BoundingBoxWestBoundLongitude": { "title": "West Longitude", - "description": "Western latitude limit of the bounding box in degrees based on WGS 84", + "description": "Western longitude limit of the bounding box in degrees based on WGS 84", "type": "number", "example": 0.0 }, "BoundingBoxEastBoundLongitude": { "title": "East Longitude", - "description": "Eastern latitude limit of the bounding box in degrees based on WGS 84", + "description": "Eastern longitude limit of the bounding box in degrees based on WGS 84", "type": "number", "example": 6.01 }, @@ -664,7 +664,7 @@ "properties": { "AuthorityCode": { "title": "CoordinateSystem Authority Code", - "description": "The CoordSys authority code, corresponding to the ISO19111 ID and 'projjson' id.", + "description": "The CoordinateSystem authority code, corresponding to the ISO19111 ID and 'projjson' id.", "type": "object", "properties": { "Authority": { @@ -721,7 +721,7 @@ "properties": { "AuthorityCode": { "title": "Preferred Usage Authority Code", - "description": "The Usage authority code, corresponding to the ISO19111 ID and 'projjson' id.", + "description": "The PreferredUsage authority code, corresponding to the ISO19111 ID and 'projjson' id.", "type": "object", "properties": { "Authority": { @@ -752,7 +752,7 @@ "properties": { "AuthorityCode": { "title": "Preferred Extent Authority Code", - "description": "The Extent authority code, corresponding to the ISO19111 ID and 'projjson' id.", + "description": "The Preferred Extent authority code, corresponding to the ISO19111 ID and 'projjson' id.", "type": "object", "properties": { "Authority": { @@ -784,13 +784,13 @@ }, "BoundingBoxWestBoundLongitude": { "title": "Preferred West Longitude", - "description": "Western latitude limit of the bounding box in degrees based on WGS 84", + "description": "Western longitude limit of the bounding box in degrees based on WGS 84", "type": "number", "example": 0.0 }, "BoundingBoxEastBoundLongitude": { "title": "Preferred East Longitude", - "description": "Eastern latitude limit of the bounding box in degrees based on WGS 84", + "description": "Eastern longitude limit of the bounding box in degrees based on WGS 84", "type": "number", "example": 6.01 }, @@ -809,7 +809,7 @@ "properties": { "AuthorityCode": { "title": "Preferred Scope Authority Code", - "description": "The Scope authority code, corresponding to the ISO19111 ID and 'projjson' id.", + "description": "The Preferred Scope authority code, corresponding to the ISO19111 ID and 'projjson' id.", "type": "object", "properties": { "Authority": { diff --git a/deployments/shared-schemas/osdu/reference-data/CoordinateTransformation.1.0.0.json b/deployments/shared-schemas/osdu/reference-data/CoordinateTransformation.1.0.0.json index 5e2ff6c7..3f210163 100644 --- a/deployments/shared-schemas/osdu/reference-data/CoordinateTransformation.1.0.0.json +++ b/deployments/shared-schemas/osdu/reference-data/CoordinateTransformation.1.0.0.json @@ -208,7 +208,7 @@ "description": "The relationship to the single Transformation item in the list of concatenated transformations.", "type": "string", "pattern": "^[\\w\\-\\.]+:reference-data\\-\\-CoordinateTransformation:[\\w\\-\\.\\:\\%]+:[0-9]*$", - "example": "namespace:reference-data--CoordinateTransformation:Transformation_EPSG_1613:", + "example": "namespace:reference-data--CoordinateTransformation:EPSG::1613:", "x-osdu-relationship": [ { "GroupType": "reference-data", @@ -290,7 +290,7 @@ "type": "string", "description": "The relationship to the source CoordinateReferenceSystem.", "pattern": "^[\\w\\-\\.]+:reference-data\\-\\-CoordinateReferenceSystem:[\\w\\-\\.\\:\\%]+:[0-9]*$", - "example": "namespace:reference-data--CoordinateReferenceSystem:ProjectedCrs_EPSG_4230:", + "example": "namespace:reference-data--CoordinateReferenceSystem:Geographic2D:EPSG::4230:", "x-osdu-relationship": [ { "GroupType": "reference-data", @@ -336,7 +336,7 @@ "type": "string", "description": "The relationship to the target CRS.", "pattern": "^[\\w\\-\\.]+:reference-data\\-\\-CoordinateReferenceSystem:[\\w\\-\\.\\:\\%]+:[0-9]*$", - "example": "namespace:reference-data--CoordinateReferenceSystem:GeodeticCrs_EPSG_4326:", + "example": "namespace:reference-data--CoordinateReferenceSystem:Geographic2D:EPSG::4326:", "x-osdu-relationship": [ { "GroupType": "reference-data", @@ -426,13 +426,13 @@ }, "BoundingBoxWestBoundLongitude": { "title": "West Longitude", - "description": "Western latitude limit of the bounding box in degrees based on WGS 84", + "description": "Western longitude limit of the bounding box in degrees based on WGS 84", "type": "number", "example": 1.37 }, "BoundingBoxEastBoundLongitude": { "title": "East Longitude", - "description": "Eastern latitude limit of the bounding box in degrees based on WGS 84", + "description": "Eastern longitude limit of the bounding box in degrees based on WGS 84", "type": "number", "example": 11.14 }, @@ -556,13 +556,13 @@ }, "BoundingBoxWestBoundLongitude": { "title": "Preferred Extent West Longitude", - "description": "Western latitude limit of the bounding box in degrees based on WGS 84", + "description": "Western longitude limit of the bounding box in degrees based on WGS 84", "type": "number", "example": 1.37 }, "BoundingBoxEastBoundLongitude": { "title": "Preferred Extent East Longitude", - "description": "Eastern latitude limit of the bounding box in degrees based on WGS 84", + "description": "Eastern longitude limit of the bounding box in degrees based on WGS 84", "type": "number", "example": 11.14 }, @@ -613,7 +613,7 @@ "title": "Persistable Reference", "description": "Used for export and actionable instructions to a conversion/transformation engine. It is initially based on Esri well-known text (WKT). Eventually, when Esri WKT are convertible into ISO WKT and vice versa, the definition can be replaced by https://proj.org/schemas/v0.2/projjson.schema.json.", "type": "string", - "example": "{\"authCode\":{\"auth\":\"EPSG\",\"code\":\"1613\"},\"type\":\"ST\",\"ver\":\"PE_10_3_1\",\"name\":\"ED_1950_To_WGS_1984_24\",\"wkt\":\"GEOGTRAN[\\\"ED_1950_To_WGS_1984_24\\\",GEOGCS[\\\"GCS_European_1950\\\",DATUM[\\\"D_European_1950\\\",SPHEROID[\\\"International_1924\\\",6378388.0,297.0]],PRIMEM[\\\"Greenwich\\\",0.0],UNIT[\\\"Degree\\\",0.0174532925199433]],GEOGCS[\\\"GCS_WGS_1984\\\",DATUM[\\\"D_WGS_1984\\\",SPHEROID[\\\"WGS_1984\\\",6378137.0,298.257223563]],PRIMEM[\\\"Greenwich\\\",0.0],UNIT[\\\"Degree\\\",0.0174532925199433]],METHOD[\\\"Position_Vector\\\"],PARAMETER[\\\"X_Axis_Translation\\\",-90.365],PARAMETER[\\\"Y_Axis_Translation\\\",-101.13],PARAMETER[\\\"Z_Axis_Translation\\\",-123.384],PARAMETER[\\\"X_Axis_Rotation\\\",0.333],PARAMETER[\\\"Y_Axis_Rotation\\\",0.077],PARAMETER[\\\"Z_Axis_Rotation\\\",0.894],PARAMETER[\\\"Scale_Difference\\\",1.994],AUTHORITY[\\\"EPSG\\\",1613]]\"}" + "example": "{\"authCode\":{\"auth\":\"EPSG\",\"code\":\"1613\"},\"name\":\"ED_1950_To_WGS_1984_24\",\"type\":\"ST\",\"ver\":\"PE_10_9_1\",\"wkt\":\"GEOGTRAN[\\\"ED_1950_To_WGS_1984_24\\\",GEOGCS[\\\"GCS_European_1950\\\",DATUM[\\\"D_European_1950\\\",SPHEROID[\\\"International_1924\\\",6378388.0,297.0]],PRIMEM[\\\"Greenwich\\\",0.0],UNIT[\\\"Degree\\\",0.0174532925199433]],GEOGCS[\\\"GCS_WGS_1984\\\",DATUM[\\\"D_WGS_1984\\\",SPHEROID[\\\"WGS_1984\\\",6378137.0,298.257223563]],PRIMEM[\\\"Greenwich\\\",0.0],UNIT[\\\"Degree\\\",0.0174532925199433]],METHOD[\\\"Position_Vector\\\"],PARAMETER[\\\"X_Axis_Translation\\\",-90.365],PARAMETER[\\\"Y_Axis_Translation\\\",-101.13],PARAMETER[\\\"Z_Axis_Translation\\\",-123.384],PARAMETER[\\\"X_Axis_Rotation\\\",0.333],PARAMETER[\\\"Y_Axis_Rotation\\\",0.077],PARAMETER[\\\"Z_Axis_Rotation\\\",0.894],PARAMETER[\\\"Scale_Difference\\\",1.994],OPERATIONACCURACY[1.0],AUTHORITY[\\\"EPSG\\\",1613]]\"}" } }, "title": "IndividualProperties" diff --git a/deployments/shared-schemas/osdu/reference-data/CurveSampleType.1.0.0.json b/deployments/shared-schemas/osdu/reference-data/CurveSampleType.1.0.0.json new file mode 100644 index 00000000..5e527eb4 --- /dev/null +++ b/deployments/shared-schemas/osdu/reference-data/CurveSampleType.1.0.0.json @@ -0,0 +1,159 @@ +{ + "schemaInfo": { + "schemaIdentity": { + "authority": "{{schema-authority}}", + "source": "wks", + "entityType": "reference-data--CurveSampleType", + "schemaVersionMajor": 1, + "schemaVersionMinor": 0, + "schemaVersionPatch": 0, + "id": "{{schema-authority}}:wks:reference-data--CurveSampleType:1.0.0" + }, + "createdBy": "OSDU Data Definition Group", + "scope": "SHARED", + "status": "DEVELOPMENT" + }, + "schema": { + "x-osdu-license": "Copyright 2022, The Open Group \\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.", + "$id": "https://schema.osdu.opengroup.org/json/reference-data/CurveSampleType.1.0.0.json", + "$schema": "http://json-schema.org/draft-07/schema#", + "x-osdu-schema-source": "osdu:wks:reference-data--CurveSampleType:1.0.0", + "title": "CurveSampleType", + "description": "The value type of well log curve samples, e.g. Float, double, string.", + "type": "object", + "properties": { + "id": { + "description": "Previously called ResourceID or SRN which identifies this OSDU resource object without version.", + "title": "Entity ID", + "type": "string", + "pattern": "^[\\w\\-\\.]+:reference-data\\-\\-CurveSampleType:[\\w\\-\\.\\:\\%]+$", + "example": "namespace:reference-data--CurveSampleType:7c1a89b2-a0a1-58d1-bac3-cacd19ac366c" + }, + "kind": { + "description": "The schema identification for the OSDU resource object following the pattern {Namespace}:{Source}:{Type}:{VersionMajor}.{VersionMinor}.{VersionPatch}. The versioning scheme follows the semantic versioning, https://semver.org/.", + "title": "Entity Kind", + "type": "string", + "pattern": "^[\\w\\-\\.]+:[\\w\\-\\.]+:[\\w\\-\\.]+:[0-9]+.[0-9]+.[0-9]+$", + "example": "osdu:wks:reference-data--CurveSampleType:1.0.0" + }, + "version": { + "description": "The version number of this OSDU resource; set by the framework.", + "title": "Version Number", + "type": "integer", + "format": "int64", + "example": 1562066009929332 + }, + "acl": { + "description": "The access control tags associated with this entity.", + "title": "Access Control List", + "$ref": "{{schema-authority}}:wks:AbstractAccessControlList:1.0.0" + }, + "legal": { + "description": "The entity's legal tags and compliance status. The actual contents associated with the legal tags is managed by the Compliance Service.", + "title": "Legal Tags", + "$ref": "{{schema-authority}}:wks:AbstractLegalTags:1.0.0" + }, + "tags": { + "title": "Tag Dictionary", + "description": "A generic dictionary of string keys mapping to string value. Only strings are permitted as keys and values.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "example": { + "NameOfKey": "String value" + } + }, + "createTime": { + "description": "Timestamp of the time at which initial version of this OSDU resource object was created. Set by the System. The value is a combined date-time string in ISO-8601 given in UTC.", + "title": "Resource Object Creation DateTime", + "type": "string", + "format": "date-time", + "example": "2020-12-16T11:46:20.163Z" + }, + "createUser": { + "title": "Resource Object Creation User Reference", + "description": "The user reference, which created the first version of this resource object. Set by the System.", + "type": "string", + "example": "some-user@some-company-cloud.com" + }, + "modifyTime": { + "description": "Timestamp of the time at which this version of the OSDU resource object was created. Set by the System. The value is a combined date-time string in ISO-8601 given in UTC.", + "title": "Resource Object Version Creation DateTime", + "type": "string", + "format": "date-time", + "example": "2020-12-16T11:52:24.477Z" + }, + "modifyUser": { + "title": "Resource Object Version Creation User Reference", + "description": "The user reference, which created this version of this resource object. Set by the System.", + "type": "string", + "example": "some-user@some-company-cloud.com" + }, + "ancestry": { + "description": "The links to data, which constitute the inputs, from which this record instance is derived.", + "title": "Ancestry", + "$ref": "{{schema-authority}}:wks:AbstractLegalParentList:1.0.0" + }, + "meta": { + "description": "The Frame of Reference meta data section linking the named properties to self-contained definitions.", + "title": "Frame of Reference Meta Data", + "type": "array", + "items": { + "$ref": "{{schema-authority}}:wks:AbstractMetaItem:1.0.0" + } + }, + "data": { + "allOf": [ + { + "$ref": "{{schema-authority}}:wks:AbstractCommonResources:1.0.0" + }, + { + "$ref": "{{schema-authority}}:wks:AbstractReferenceType:1.0.0" + }, + { + "type": "object", + "properties": {}, + "title": "IndividualProperties" + }, + { + "type": "object", + "properties": { + "ExtensionProperties": { + "type": "object" + } + }, + "title": "ExtensionProperties" + } + ] + } + }, + "required": [ + "kind", + "acl", + "legal" + ], + "additionalProperties": false, + "x-osdu-review-status": "Accepted", + "x-osdu-governance-model": "FIXED", + "x-osdu-governance-authorities": [ + "OSDU" + ], + "x-osdu-virtual-properties": { + "data.VirtualProperties.DefaultName": { + "type": "string", + "priority": [ + { + "path": "data.Name" + } + ] + } + }, + "x-osdu-inheriting-from-kind": [ + { + "name": "ReferenceType", + "kind": "osdu:wks:AbstractReferenceType:1.0.0" + } + ] + } +} \ No newline at end of file diff --git a/deployments/shared-schemas/osdu/reference-data/DrillingActivityClassType.1.0.0.json b/deployments/shared-schemas/osdu/reference-data/DrillingActivityClassType.1.0.0.json index 507acdf9..7ed5bed2 100644 --- a/deployments/shared-schemas/osdu/reference-data/DrillingActivityClassType.1.0.0.json +++ b/deployments/shared-schemas/osdu/reference-data/DrillingActivityClassType.1.0.0.json @@ -134,7 +134,7 @@ "legal" ], "additionalProperties": false, - "x-osdu-review-status": "NOT APPROVED!", + "x-osdu-review-status": "Accepted", "x-osdu-governance-model": "OPEN", "x-osdu-governance-authorities": [ "osdu" diff --git a/deployments/shared-schemas/osdu/reference-data/ExternalCatalogNamespace.1.0.0.json b/deployments/shared-schemas/osdu/reference-data/ExternalCatalogNamespace.1.0.0.json new file mode 100644 index 00000000..a372c52b --- /dev/null +++ b/deployments/shared-schemas/osdu/reference-data/ExternalCatalogNamespace.1.0.0.json @@ -0,0 +1,156 @@ +{ + "schemaInfo": { + "schemaIdentity": { + "authority": "{{schema-authority}}", + "source": "wks", + "entityType": "reference-data--ExternalCatalogNamespace", + "schemaVersionMajor": 1, + "schemaVersionMinor": 0, + "schemaVersionPatch": 0, + "id": "{{schema-authority}}:wks:reference-data--ExternalCatalogNamespace:1.0.0" + }, + "createdBy": "OSDU Data Definition Group", + "scope": "SHARED", + "status": "DEVELOPMENT" + }, + "schema": { + "x-osdu-license": "Copyright 2022, The Open Group \\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.", + "$id": "https://schema.osdu.opengroup.org/json/reference-data/ExternalCatalogNamespace.1.0.0.json", + "$schema": "http://json-schema.org/draft-07/schema#", + "x-osdu-schema-source": "osdu:wks:reference-data--ExternalCatalogNamespace:1.0.0", + "title": "ExternalCatalogNamespace", + "description": "A namespace for a group of catalog records. This is used in conjunction with external catalogs to group records of a particular kind belonging together to achieve unique code and name look-ups.", + "type": "object", + "properties": { + "id": { + "description": "Previously called ResourceID or SRN which identifies this OSDU resource object without version.", + "title": "Entity ID", + "type": "string", + "pattern": "^[\\w\\-\\.]+:reference-data\\-\\-ExternalCatalogNamespace:[\\w\\-\\.\\:\\%]+$", + "example": "namespace:reference-data--ExternalCatalogNamespace:9c8d9cf5-1d57-5f27-be20-4673e1f35fe9" + }, + "kind": { + "description": "The schema identification for the OSDU resource object following the pattern {Namespace}:{Source}:{Type}:{VersionMajor}.{VersionMinor}.{VersionPatch}. The versioning scheme follows the semantic versioning, https://semver.org/.", + "title": "Entity Kind", + "type": "string", + "pattern": "^[\\w\\-\\.]+:[\\w\\-\\.]+:[\\w\\-\\.]+:[0-9]+.[0-9]+.[0-9]+$", + "example": "osdu:wks:reference-data--ExternalCatalogNamespace:1.0.0" + }, + "version": { + "description": "The version number of this OSDU resource; set by the framework.", + "title": "Version Number", + "type": "integer", + "format": "int64", + "example": 1562066009929332 + }, + "acl": { + "description": "The access control tags associated with this entity.", + "title": "Access Control List", + "$ref": "{{schema-authority}}:wks:AbstractAccessControlList:1.0.0" + }, + "legal": { + "description": "The entity's legal tags and compliance status. The actual contents associated with the legal tags is managed by the Compliance Service.", + "title": "Legal Tags", + "$ref": "{{schema-authority}}:wks:AbstractLegalTags:1.0.0" + }, + "tags": { + "title": "Tag Dictionary", + "description": "A generic dictionary of string keys mapping to string value. Only strings are permitted as keys and values.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "example": { + "NameOfKey": "String value" + } + }, + "createTime": { + "description": "Timestamp of the time at which initial version of this OSDU resource object was created. Set by the System. The value is a combined date-time string in ISO-8601 given in UTC.", + "title": "Resource Object Creation DateTime", + "type": "string", + "format": "date-time", + "example": "2020-12-16T11:46:20.163Z" + }, + "createUser": { + "title": "Resource Object Creation User Reference", + "description": "The user reference, which created the first version of this resource object. Set by the System.", + "type": "string", + "example": "some-user@some-company-cloud.com" + }, + "modifyTime": { + "description": "Timestamp of the time at which this version of the OSDU resource object was created. Set by the System. The value is a combined date-time string in ISO-8601 given in UTC.", + "title": "Resource Object Version Creation DateTime", + "type": "string", + "format": "date-time", + "example": "2020-12-16T11:52:24.477Z" + }, + "modifyUser": { + "title": "Resource Object Version Creation User Reference", + "description": "The user reference, which created this version of this resource object. Set by the System.", + "type": "string", + "example": "some-user@some-company-cloud.com" + }, + "ancestry": { + "description": "The links to data, which constitute the inputs, from which this record instance is derived.", + "title": "Ancestry", + "$ref": "{{schema-authority}}:wks:AbstractLegalParentList:1.0.0" + }, + "meta": { + "description": "The Frame of Reference meta data section linking the named properties to self-contained definitions.", + "title": "Frame of Reference Meta Data", + "type": "array", + "items": { + "$ref": "{{schema-authority}}:wks:AbstractMetaItem:1.0.0" + } + }, + "data": { + "allOf": [ + { + "$ref": "{{schema-authority}}:wks:AbstractCommonResources:1.0.0" + }, + { + "$ref": "{{schema-authority}}:wks:AbstractReferenceType:1.0.0" + }, + { + "type": "object", + "properties": {}, + "title": "IndividualProperties" + }, + { + "type": "object", + "properties": { + "ExtensionProperties": { + "type": "object" + } + }, + "title": "ExtensionProperties" + } + ] + } + }, + "required": [ + "kind", + "acl", + "legal" + ], + "additionalProperties": false, + "x-osdu-review-status": "Accepted", + "x-osdu-governance-model": "LOCAL", + "x-osdu-virtual-properties": { + "data.VirtualProperties.DefaultName": { + "type": "string", + "priority": [ + { + "path": "data.Name" + } + ] + } + }, + "x-osdu-inheriting-from-kind": [ + { + "name": "ReferenceType", + "kind": "osdu:wks:AbstractReferenceType:1.0.0" + } + ] + } +} \ No newline at end of file diff --git a/deployments/shared-schemas/osdu/reference-data/ExternalUnitOfMeasure.1.0.0.json b/deployments/shared-schemas/osdu/reference-data/ExternalUnitOfMeasure.1.0.0.json new file mode 100644 index 00000000..b0e45c83 --- /dev/null +++ b/deployments/shared-schemas/osdu/reference-data/ExternalUnitOfMeasure.1.0.0.json @@ -0,0 +1,282 @@ +{ + "schemaInfo": { + "schemaIdentity": { + "authority": "{{schema-authority}}", + "source": "wks", + "entityType": "reference-data--ExternalUnitOfMeasure", + "schemaVersionMajor": 1, + "schemaVersionMinor": 0, + "schemaVersionPatch": 0, + "id": "{{schema-authority}}:wks:reference-data--ExternalUnitOfMeasure:1.0.0" + }, + "createdBy": "OSDU Data Definition Group", + "scope": "SHARED", + "status": "DEVELOPMENT" + }, + "schema": { + "x-osdu-license": "Copyright 2022, The Open Group \\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.", + "$id": "https://schema.osdu.opengroup.org/json/reference-data/ExternalUnitOfMeasure.1.0.0.json", + "$schema": "http://json-schema.org/draft-07/schema#", + "x-osdu-schema-source": "osdu:wks:reference-data--ExternalUnitOfMeasure:1.0.0", + "title": "ExternalUnitOfMeasure", + "description": "A unit of measure description belonging to an external system, which is intended to be mapped or related to a platform-standard UnitOfMeasure record. Mappings can be exact or not. This is expressed by he MapStatus. MapStatus:identical means that the external unit reference can be swapped out by the platform standard reference. MapStatus:corrected indicates same concept but differences in the conversion parameters. Data must be treated or re-labeled; the decision can only be taken on a case by case basis. Finally MapStatus:unsupported means that there is no equivalent platform standard reference. An ExternalUnitOfMeasure record can be seen as an 'alias' for the UnitOfMeasureID it refers to. Adding NameAliases to UnitOfMeasure is, however, not recommended because local overrides may be lost when new OSDU updates are shipped.", + "type": "object", + "properties": { + "id": { + "description": "Previously called ResourceID or SRN which identifies this OSDU resource object without version.", + "title": "Entity ID", + "type": "string", + "pattern": "^[\\w\\-\\.]+:reference-data\\-\\-ExternalUnitOfMeasure:[\\w\\-\\.\\:\\%]+$", + "example": "namespace:reference-data--ExternalUnitOfMeasure:91398c8a-8669-5a25-9a37-fc599434e484" + }, + "kind": { + "description": "The schema identification for the OSDU resource object following the pattern {Namespace}:{Source}:{Type}:{VersionMajor}.{VersionMinor}.{VersionPatch}. The versioning scheme follows the semantic versioning, https://semver.org/.", + "title": "Entity Kind", + "type": "string", + "pattern": "^[\\w\\-\\.]+:[\\w\\-\\.]+:[\\w\\-\\.]+:[0-9]+.[0-9]+.[0-9]+$", + "example": "osdu:wks:reference-data--ExternalUnitOfMeasure:1.0.0" + }, + "version": { + "description": "The version number of this OSDU resource; set by the framework.", + "title": "Version Number", + "type": "integer", + "format": "int64", + "example": 1562066009929332 + }, + "acl": { + "description": "The access control tags associated with this entity.", + "title": "Access Control List", + "$ref": "{{schema-authority}}:wks:AbstractAccessControlList:1.0.0" + }, + "legal": { + "description": "The entity's legal tags and compliance status. The actual contents associated with the legal tags is managed by the Compliance Service.", + "title": "Legal Tags", + "$ref": "{{schema-authority}}:wks:AbstractLegalTags:1.0.0" + }, + "tags": { + "title": "Tag Dictionary", + "description": "A generic dictionary of string keys mapping to string value. Only strings are permitted as keys and values.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "example": { + "NameOfKey": "String value" + } + }, + "createTime": { + "description": "Timestamp of the time at which initial version of this OSDU resource object was created. Set by the System. The value is a combined date-time string in ISO-8601 given in UTC.", + "title": "Resource Object Creation DateTime", + "type": "string", + "format": "date-time", + "example": "2020-12-16T11:46:20.163Z" + }, + "createUser": { + "title": "Resource Object Creation User Reference", + "description": "The user reference, which created the first version of this resource object. Set by the System.", + "type": "string", + "example": "some-user@some-company-cloud.com" + }, + "modifyTime": { + "description": "Timestamp of the time at which this version of the OSDU resource object was created. Set by the System. The value is a combined date-time string in ISO-8601 given in UTC.", + "title": "Resource Object Version Creation DateTime", + "type": "string", + "format": "date-time", + "example": "2020-12-16T11:52:24.477Z" + }, + "modifyUser": { + "title": "Resource Object Version Creation User Reference", + "description": "The user reference, which created this version of this resource object. Set by the System.", + "type": "string", + "example": "some-user@some-company-cloud.com" + }, + "ancestry": { + "description": "The links to data, which constitute the inputs, from which this record instance is derived.", + "title": "Ancestry", + "$ref": "{{schema-authority}}:wks:AbstractLegalParentList:1.0.0" + }, + "meta": { + "description": "The Frame of Reference meta data section linking the named properties to self-contained definitions.", + "title": "Frame of Reference Meta Data", + "type": "array", + "items": { + "$ref": "{{schema-authority}}:wks:AbstractMetaItem:1.0.0" + } + }, + "data": { + "allOf": [ + { + "$ref": "{{schema-authority}}:wks:AbstractCommonResources:1.0.0" + }, + { + "$ref": "{{schema-authority}}:wks:AbstractReferenceType:1.0.0" + }, + { + "type": "object", + "properties": { + "NamespaceID": { + "type": "string", + "title": "Catalog Namespace ID", + "description": "A namespace reference grouping a list of records with the goal of providing unique look-ups by Name/Code. It is strongly recommended to make the NamespaceID's code part of the system property id.", + "example": "partition-id:reference-data--ExternalCatalogNamespace:LIS-LAS:", + "pattern": "^[\\w\\-\\.]+:reference-data\\-\\-ExternalCatalogNamespace:[\\w\\-\\.\\:\\%]+:[0-9]*$", + "x-osdu-relationship": [ + { + "GroupType": "reference-data", + "EntityType": "ExternalCatalogNamespace" + } + ] + }, + "MapStateID": { + "type": "string", + "title": "Map State ID", + "description": "The mapping status declaring whether the mapping is straight forward, direct (identical) or whether special treatment is required (corrected). Items, which are known not to be mappable are declared as unsupported. In the latter case the UnitOfMeasureID is not expected to be populated.", + "example": "partition-id:reference-data--CatalogMapStateType:identical:", + "pattern": "^[\\w\\-\\.]+:reference-data\\-\\-CatalogMapStateType:[\\w\\-\\.\\:\\%]+:[0-9]*$", + "x-osdu-relationship": [ + { + "GroupType": "reference-data", + "EntityType": "CatalogMapStateType" + } + ] + }, + "CorrectToExternalUnitOfMeasureID": { + "type": "string", + "title": "Correct to External Unit of Measure ID", + "description": "For CatalogMapStateType:Corrected or CatalogMapStateType:Convert, use a conversion to this intermediate unit before swapping the reference to the platform standard UnitOfMeasure. Absent for other map states.", + "pattern": "^[\\w\\-\\.]+:reference-data\\-\\-ExternalUnitOfMeasure:[\\w\\-\\.\\:\\%]+:[0-9]*$", + "x-osdu-relationship": [ + { + "GroupType": "reference-data", + "EntityType": "ExternalUnitOfMeasure" + } + ] + }, + "UnitOfMeasureID": { + "type": "string", + "title": "Unit of Measure ID", + "description": "The platform standard UnitOfMeasure record, to which this ExternalUnitOfMeasure record is mapped. This record may be understood as an alias to the standard UnitOfMeasure.", + "example": "partition-id:reference-data--UnitOfMeasure:ft:", + "pattern": "^[\\w\\-\\.]+:reference-data\\-\\-UnitOfMeasure:[\\w\\-\\.\\:\\%]+:[0-9]*$", + "x-osdu-relationship": [ + { + "GroupType": "reference-data", + "EntityType": "UnitOfMeasure" + } + ] + }, + "ExternalUnitQuantityID": { + "type": "string", + "title": "External Unit Quantity ID", + "description": "The External Unit Quantity is a semantic description of the quantity this ExternalUnitOfMeasure is describing ('Length' for instance).", + "example": "partition-id:reference-data--ExternalUnitQuantity:Length:", + "pattern": "^[\\w\\-\\.]+:reference-data\\-\\-ExternalUnitQuantity:[\\w\\-\\.\\:\\%]+:[0-9]*$", + "x-osdu-relationship": [ + { + "GroupType": "reference-data", + "EntityType": "ExternalUnitQuantity" + } + ] + }, + "UnitQuantityID": { + "type": "string", + "title": "Unit Quantity ID", + "description": "De-normalized, mapped platform standard UnitQuantity, is the ExternalUnitQuantity was indeed mappable.", + "example": "partition-id:reference-data--UnitQuantity:length:", + "pattern": "^[\\w\\-\\.]+:reference-data\\-\\-UnitQuantity:[\\w\\-\\.\\:\\%]+:[0-9]*$", + "x-osdu-relationship": [ + { + "GroupType": "reference-data", + "EntityType": "UnitQuantity" + } + ] + }, + "UnitDimensionCode": { + "type": "string", + "title": "Unit Dimension Code", + "description": "The dimensionality using the symbols for dimension as defined in https://www.bipm.org/utils/common/documents/jcgm/JCGM_200_2012.pdf, i.e. L for length, M for mass, T for time, I for electric current, N for amount of substance, J for luminous intensity; except \u0398 for thermodynamic temperature, which is replaced by the symbol K, the additional symbol D for temperature difference and the additional symbol 0 for no dimension.", + "example": "L" + }, + "IsBaseUnit": { + "type": "boolean", + "title": "Base Unit Flag", + "description": "True if the unit is a base unit for the unit quantity. If the property is absent, it means the unit is not a base unit.", + "example": false + }, + "UnitDimensionName": { + "type": "string", + "title": "Unit Dimension Name", + "description": "The name of the unit dimension concept.", + "example": "Length" + }, + "CoefficientA": { + "type": "number", + "title": "A", + "description": "The A parameter; formula: y = (A+B*x)/(C+D*x)", + "example": 0.0 + }, + "CoefficientB": { + "type": "number", + "title": "B", + "description": "The B parameter; formula: y = (A+B*x)/(C+D*x)", + "example": 0.3048 + }, + "CoefficientC": { + "type": "number", + "title": "C", + "description": "The C parameter; formula: y = (A+B*x)/(C+D*x)", + "example": 1.0 + }, + "CoefficientD": { + "type": "number", + "title": "D", + "description": "The D parameter; formula: y = (A+B*x)/(C+D*x)", + "example": 0.0 + }, + "PersistableReference": { + "type": "string", + "title": "Persistable Reference", + "description": "The self-contained, stringified JSON reference for the unit. This value can be attached to data values and data records and carry the unit reference independent of a UnitOfMeasure instance.", + "example": "\"{\\\"scaleOffset\\\":{\\\"scale\\\":0.3048,\\\"offset\\\":0.0},\\\"symbol\\\":\\\"F\\\",\\\"baseMeasurement\\\":{\\\"ancestry\\\":\\\"Length\\\",\\\"type\\\":\\\"UM\\\"},\\\"type\\\":\\\"USO\\\"}\"" + } + }, + "title": "IndividualProperties" + }, + { + "type": "object", + "properties": { + "ExtensionProperties": { + "type": "object" + } + }, + "title": "ExtensionProperties" + } + ] + } + }, + "required": [ + "kind", + "acl", + "legal" + ], + "additionalProperties": false, + "x-osdu-review-status": "Accepted", + "x-osdu-governance-model": "LOCAL", + "x-osdu-virtual-properties": { + "data.VirtualProperties.DefaultName": { + "type": "string", + "priority": [ + { + "path": "data.Name" + } + ] + } + }, + "x-osdu-inheriting-from-kind": [ + { + "name": "ReferenceType", + "kind": "osdu:wks:AbstractReferenceType:1.0.0" + } + ] + } +} \ No newline at end of file diff --git a/deployments/shared-schemas/osdu/reference-data/ExternalUnitQuantity.1.0.0.json b/deployments/shared-schemas/osdu/reference-data/ExternalUnitQuantity.1.0.0.json new file mode 100644 index 00000000..9f692280 --- /dev/null +++ b/deployments/shared-schemas/osdu/reference-data/ExternalUnitQuantity.1.0.0.json @@ -0,0 +1,234 @@ +{ + "schemaInfo": { + "schemaIdentity": { + "authority": "{{schema-authority}}", + "source": "wks", + "entityType": "reference-data--ExternalUnitQuantity", + "schemaVersionMajor": 1, + "schemaVersionMinor": 0, + "schemaVersionPatch": 0, + "id": "{{schema-authority}}:wks:reference-data--ExternalUnitQuantity:1.0.0" + }, + "createdBy": "OSDU Data Definition Group", + "scope": "SHARED", + "status": "DEVELOPMENT" + }, + "schema": { + "x-osdu-license": "Copyright 2022, The Open Group \\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.", + "$id": "https://schema.osdu.opengroup.org/json/reference-data/ExternalUnitQuantity.1.0.0.json", + "$schema": "http://json-schema.org/draft-07/schema#", + "x-osdu-schema-source": "osdu:wks:reference-data--ExternalUnitQuantity:1.0.0", + "title": "ExternalUnitQuantity", + "description": "An external unit quantity definition to map to a platform standard UnitQuantity record. An ExternalUnitQuantity record can be seen as an 'alias' for the UnitQuantityID it refers to. Adding NameAliases to UnitQuantity is, however, not recommended because local overrides may be lost when new OSDU updates are shipped.", + "type": "object", + "properties": { + "id": { + "description": "Previously called ResourceID or SRN which identifies this OSDU resource object without version.", + "title": "Entity ID", + "type": "string", + "pattern": "^[\\w\\-\\.]+:reference-data\\-\\-ExternalUnitQuantity:[\\w\\-\\.\\:\\%]+$", + "example": "namespace:reference-data--ExternalUnitQuantity:f484c086-f97e-5b0a-9d57-470be108d2de" + }, + "kind": { + "description": "The schema identification for the OSDU resource object following the pattern {Namespace}:{Source}:{Type}:{VersionMajor}.{VersionMinor}.{VersionPatch}. The versioning scheme follows the semantic versioning, https://semver.org/.", + "title": "Entity Kind", + "type": "string", + "pattern": "^[\\w\\-\\.]+:[\\w\\-\\.]+:[\\w\\-\\.]+:[0-9]+.[0-9]+.[0-9]+$", + "example": "osdu:wks:reference-data--ExternalUnitQuantity:1.0.0" + }, + "version": { + "description": "The version number of this OSDU resource; set by the framework.", + "title": "Version Number", + "type": "integer", + "format": "int64", + "example": 1562066009929332 + }, + "acl": { + "description": "The access control tags associated with this entity.", + "title": "Access Control List", + "$ref": "{{schema-authority}}:wks:AbstractAccessControlList:1.0.0" + }, + "legal": { + "description": "The entity's legal tags and compliance status. The actual contents associated with the legal tags is managed by the Compliance Service.", + "title": "Legal Tags", + "$ref": "{{schema-authority}}:wks:AbstractLegalTags:1.0.0" + }, + "tags": { + "title": "Tag Dictionary", + "description": "A generic dictionary of string keys mapping to string value. Only strings are permitted as keys and values.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "example": { + "NameOfKey": "String value" + } + }, + "createTime": { + "description": "Timestamp of the time at which initial version of this OSDU resource object was created. Set by the System. The value is a combined date-time string in ISO-8601 given in UTC.", + "title": "Resource Object Creation DateTime", + "type": "string", + "format": "date-time", + "example": "2020-12-16T11:46:20.163Z" + }, + "createUser": { + "title": "Resource Object Creation User Reference", + "description": "The user reference, which created the first version of this resource object. Set by the System.", + "type": "string", + "example": "some-user@some-company-cloud.com" + }, + "modifyTime": { + "description": "Timestamp of the time at which this version of the OSDU resource object was created. Set by the System. The value is a combined date-time string in ISO-8601 given in UTC.", + "title": "Resource Object Version Creation DateTime", + "type": "string", + "format": "date-time", + "example": "2020-12-16T11:52:24.477Z" + }, + "modifyUser": { + "title": "Resource Object Version Creation User Reference", + "description": "The user reference, which created this version of this resource object. Set by the System.", + "type": "string", + "example": "some-user@some-company-cloud.com" + }, + "ancestry": { + "description": "The links to data, which constitute the inputs, from which this record instance is derived.", + "title": "Ancestry", + "$ref": "{{schema-authority}}:wks:AbstractLegalParentList:1.0.0" + }, + "meta": { + "description": "The Frame of Reference meta data section linking the named properties to self-contained definitions.", + "title": "Frame of Reference Meta Data", + "type": "array", + "items": { + "$ref": "{{schema-authority}}:wks:AbstractMetaItem:1.0.0" + } + }, + "data": { + "allOf": [ + { + "$ref": "{{schema-authority}}:wks:AbstractCommonResources:1.0.0" + }, + { + "$ref": "{{schema-authority}}:wks:AbstractReferenceType:1.0.0" + }, + { + "type": "object", + "properties": { + "NamespaceID": { + "type": "string", + "title": "Catalog Namespace ID", + "description": "A namespace reference grouping a list of records with the goal of providing unique look-ups by Name/Code. It is strongly recommended to make the NamespaceID's code part of the system property id.", + "example": "partition-id:reference-data--ExternalCatalogNamespace:LIS-LAS:", + "pattern": "^[\\w\\-\\.]+:reference-data\\-\\-ExternalCatalogNamespace:[\\w\\-\\.\\:\\%]+:[0-9]*$", + "x-osdu-relationship": [ + { + "GroupType": "reference-data", + "EntityType": "ExternalCatalogNamespace" + } + ] + }, + "MapStateID": { + "type": "string", + "title": "Map State ID", + "description": "The mapping status declaring whether the mapping is straight forward, direct (identical) or whether special treatment is required (corrected). Items, which are known not to be mappable are declared as unsupported. In the latter case the UnitQuantityID is not expected to be populated.", + "example": "partition-id:reference-data--CatalogMapStateType:identical:", + "pattern": "^[\\w\\-\\.]+:reference-data\\-\\-CatalogMapStateType:[\\w\\-\\.\\:\\%]+:[0-9]*$", + "x-osdu-relationship": [ + { + "GroupType": "reference-data", + "EntityType": "CatalogMapStateType" + } + ] + }, + "UnitQuantityID": { + "type": "string", + "title": "Unit Quantity ID", + "description": "The platform standard UnitQuantity record, to which this ExternalUnitQuantity record is mapped. This record may be understood as an alias to the standard UniQuantity.", + "example": "partition-id:reference-data--UnitQuantity:length:", + "pattern": "^[\\w\\-\\.]+:reference-data\\-\\-UnitQuantity:[\\w\\-\\.\\:\\%]+:[0-9]*$", + "x-osdu-relationship": [ + { + "GroupType": "reference-data", + "EntityType": "UnitQuantity" + } + ] + }, + "UnitDimension": { + "type": "string", + "title": "UnitDimension", + "description": "The UnitQuantity dimensionality using the symbols for dimension as defined in https://www.bipm.org/utils/common/documents/jcgm/JCGM_200_2012.pdf, i.e. L for length, M for mass, T for time, I for electric current, N for amount of substance, J for luminous intensity; except \u0398 for thermodynamic temperature, which is replaced by the symbol K, the additional symbol D for temperature difference and the additional symbol 0 for no dimension.", + "example": "L" + }, + "BaseForConversion": { + "type": "string", + "title": "Base Unit", + "description": "The base unit for unit conversion. The symbol of the unit which is used for conversion for of all members of this class. The corresponding baseForConversion must be a member of this class. To convert from one member to another member, you logically convert from the source member to the base and then convert from the base to the target member.", + "example": "M" + }, + "MemberUnits": { + "type": "array", + "title": "Member Units", + "description": "Specifies the symbol of a unit of which is a member of this class. Membership indicates that a value of that class can be converted to any other member unit of that class without loss of semantics. This because the conversion formula represents a unitless factor of one.", + "example": [ + "FT", + "F", + "M", + "KM" + ], + "items": { + "type": "string" + } + }, + "ParentUnitQuantity": { + "type": "string", + "title": "Parent Unit Quantity", + "description": "Optional parent unit quantity code in case a specialized unit quantity is needed. This is typically used to assign display units to particular measurements like cylinder diameter (small) versus geographic distance (large). I this case the persistable reference string will contain the full ancestry, e.g. \"L.length.CylinderDiameter\".", + "example": "Length" + }, + "PersistableReference": { + "type": "string", + "title": "Persistable Reference", + "description": "The self-contained, stringified JSON reference for the unit. This value can be attached to data values and data records and carry the unit quantity reference independent of a UnitQuantity instance.", + "example": "\"{\\\"ancestry\\\":\\\"Length\\\",\\\"type\\\":\\\"UM\\\"}\"" + } + }, + "title": "IndividualProperties" + }, + { + "type": "object", + "properties": { + "ExtensionProperties": { + "type": "object" + } + }, + "title": "ExtensionProperties" + } + ] + } + }, + "required": [ + "kind", + "acl", + "legal" + ], + "additionalProperties": false, + "x-osdu-review-status": "Accepted", + "x-osdu-governance-model": "LOCAL", + "x-osdu-virtual-properties": { + "data.VirtualProperties.DefaultName": { + "type": "string", + "priority": [ + { + "path": "data.Name" + } + ] + } + }, + "x-osdu-inheriting-from-kind": [ + { + "name": "ReferenceType", + "kind": "osdu:wks:AbstractReferenceType:1.0.0" + } + ] + } +} \ No newline at end of file diff --git a/deployments/shared-schemas/osdu/reference-data/IjkCellFace.1.0.0.json b/deployments/shared-schemas/osdu/reference-data/IjkCellFace.1.0.0.json new file mode 100644 index 00000000..4200be62 --- /dev/null +++ b/deployments/shared-schemas/osdu/reference-data/IjkCellFace.1.0.0.json @@ -0,0 +1,159 @@ +{ + "schemaInfo": { + "schemaIdentity": { + "authority": "{{schema-authority}}", + "source": "wks", + "entityType": "reference-data--IjkCellFace", + "schemaVersionMajor": 1, + "schemaVersionMinor": 0, + "schemaVersionPatch": 0, + "id": "{{schema-authority}}:wks:reference-data--IjkCellFace:1.0.0" + }, + "createdBy": "OSDU Data Definition Group", + "scope": "SHARED", + "status": "DEVELOPMENT" + }, + "schema": { + "x-osdu-license": "Copyright 2022, The Open Group \\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.", + "$id": "https://schema.osdu.opengroup.org/json/reference-data/IjkCellFace.1.0.0.json", + "$schema": "http://json-schema.org/draft-07/schema#", + "x-osdu-schema-source": "osdu:wks:reference-data--IjkCellFace:1.0.0", + "title": "IjkCellFace", + "description": "An enumeration of the face of a cell in an IJK grid.", + "type": "object", + "properties": { + "id": { + "description": "Previously called ResourceID or SRN which identifies this OSDU resource object without version.", + "title": "Entity ID", + "type": "string", + "pattern": "^[\\w\\-\\.]+:reference-data\\-\\-IjkCellFace:[\\w\\-\\.\\:\\%]+$", + "example": "namespace:reference-data--IjkCellFace:b46852fa-b6a0-5649-9412-2b74a7031da0" + }, + "kind": { + "description": "The schema identification for the OSDU resource object following the pattern {Namespace}:{Source}:{Type}:{VersionMajor}.{VersionMinor}.{VersionPatch}. The versioning scheme follows the semantic versioning, https://semver.org/.", + "title": "Entity Kind", + "type": "string", + "pattern": "^[\\w\\-\\.]+:[\\w\\-\\.]+:[\\w\\-\\.]+:[0-9]+.[0-9]+.[0-9]+$", + "example": "osdu:wks:reference-data--IjkCellFace:1.0.0" + }, + "version": { + "description": "The version number of this OSDU resource; set by the framework.", + "title": "Version Number", + "type": "integer", + "format": "int64", + "example": 1562066009929332 + }, + "acl": { + "description": "The access control tags associated with this entity.", + "title": "Access Control List", + "$ref": "{{schema-authority}}:wks:AbstractAccessControlList:1.0.0" + }, + "legal": { + "description": "The entity's legal tags and compliance status. The actual contents associated with the legal tags is managed by the Compliance Service.", + "title": "Legal Tags", + "$ref": "{{schema-authority}}:wks:AbstractLegalTags:1.0.0" + }, + "tags": { + "title": "Tag Dictionary", + "description": "A generic dictionary of string keys mapping to string value. Only strings are permitted as keys and values.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "example": { + "NameOfKey": "String value" + } + }, + "createTime": { + "description": "Timestamp of the time at which initial version of this OSDU resource object was created. Set by the System. The value is a combined date-time string in ISO-8601 given in UTC.", + "title": "Resource Object Creation DateTime", + "type": "string", + "format": "date-time", + "example": "2020-12-16T11:46:20.163Z" + }, + "createUser": { + "title": "Resource Object Creation User Reference", + "description": "The user reference, which created the first version of this resource object. Set by the System.", + "type": "string", + "example": "some-user@some-company-cloud.com" + }, + "modifyTime": { + "description": "Timestamp of the time at which this version of the OSDU resource object was created. Set by the System. The value is a combined date-time string in ISO-8601 given in UTC.", + "title": "Resource Object Version Creation DateTime", + "type": "string", + "format": "date-time", + "example": "2020-12-16T11:52:24.477Z" + }, + "modifyUser": { + "title": "Resource Object Version Creation User Reference", + "description": "The user reference, which created this version of this resource object. Set by the System.", + "type": "string", + "example": "some-user@some-company-cloud.com" + }, + "ancestry": { + "description": "The links to data, which constitute the inputs, from which this record instance is derived.", + "title": "Ancestry", + "$ref": "{{schema-authority}}:wks:AbstractLegalParentList:1.0.0" + }, + "meta": { + "description": "The Frame of Reference meta data section linking the named properties to self-contained definitions.", + "title": "Frame of Reference Meta Data", + "type": "array", + "items": { + "$ref": "{{schema-authority}}:wks:AbstractMetaItem:1.0.0" + } + }, + "data": { + "allOf": [ + { + "$ref": "{{schema-authority}}:wks:AbstractCommonResources:1.0.0" + }, + { + "$ref": "{{schema-authority}}:wks:AbstractReferenceType:1.0.0" + }, + { + "type": "object", + "properties": {}, + "title": "IndividualProperties" + }, + { + "type": "object", + "properties": { + "ExtensionProperties": { + "type": "object" + } + }, + "title": "ExtensionProperties" + } + ] + } + }, + "required": [ + "kind", + "acl", + "legal" + ], + "additionalProperties": false, + "x-osdu-review-status": "Accepted", + "x-osdu-governance-model": "FIXED", + "x-osdu-governance-authorities": [ + "OSDU" + ], + "x-osdu-virtual-properties": { + "data.VirtualProperties.DefaultName": { + "type": "string", + "priority": [ + { + "path": "data.Name" + } + ] + } + }, + "x-osdu-inheriting-from-kind": [ + { + "name": "ReferenceType", + "kind": "osdu:wks:AbstractReferenceType:1.0.0" + } + ] + } +} \ No newline at end of file diff --git a/deployments/shared-schemas/osdu/reference-data/MudClass.1.0.0.json b/deployments/shared-schemas/osdu/reference-data/MudClass.1.0.0.json index 2681c943..74bb166c 100644 --- a/deployments/shared-schemas/osdu/reference-data/MudClass.1.0.0.json +++ b/deployments/shared-schemas/osdu/reference-data/MudClass.1.0.0.json @@ -134,7 +134,7 @@ "legal" ], "additionalProperties": false, - "x-osdu-review-status": "NOT APPROVED!", + "x-osdu-review-status": "Accepted", "x-osdu-governance-model": "OPEN", "x-osdu-governance-authorities": [ "osdu" diff --git a/deployments/shared-schemas/osdu/reference-data/ObligationType.1.0.0.json b/deployments/shared-schemas/osdu/reference-data/ObligationType.1.0.0.json index f9b78bd2..ebad428e 100644 --- a/deployments/shared-schemas/osdu/reference-data/ObligationType.1.0.0.json +++ b/deployments/shared-schemas/osdu/reference-data/ObligationType.1.0.0.json @@ -19,7 +19,7 @@ "$schema": "http://json-schema.org/draft-07/schema#", "x-osdu-schema-source": "osdu:wks:reference-data--ObligationType:1.0.0", "title": "ObligationType", - "description": "A kind of commitment or duty that in specific scenarios requires a particular course of action as defined in an agreement.", + "description": "An article or clause [OSDU calls this Obligation Type] that introduces a condition or term which the fulfillment of an agreement depends (provides operational and/or earning requirements) A kind of commitment or duty that in specific scenarios requires a particular course of action as defined in an agreement.", "type": "object", "properties": { "id": { @@ -130,7 +130,7 @@ ], "additionalProperties": false, "x-osdu-governance-authorities": [ - "None" + "PPDM" ], "x-osdu-governance-model": "LOCAL", "x-osdu-virtual-properties": { diff --git a/deployments/shared-schemas/osdu/reference-data/OperatingEnvironment.1.0.0.json b/deployments/shared-schemas/osdu/reference-data/OperatingEnvironment.1.0.0.json index c86d74c9..bbcacc1d 100644 --- a/deployments/shared-schemas/osdu/reference-data/OperatingEnvironment.1.0.0.json +++ b/deployments/shared-schemas/osdu/reference-data/OperatingEnvironment.1.0.0.json @@ -19,7 +19,7 @@ "$schema": "http://json-schema.org/draft-07/schema#", "x-osdu-schema-source": "osdu:wks:reference-data--OperatingEnvironment:1.0.0", "title": "OperatingEnvironment", - "description": "Used to describe the operating environments, e.g. for well facilities or seismic acquisition.", + "description": "The geographic environment in which operations occur or data is collected.", "type": "object", "properties": { "id": { diff --git a/deployments/shared-schemas/osdu/reference-data/QualityDataRuleSet.1.0.0.json b/deployments/shared-schemas/osdu/reference-data/QualityDataRuleSet.1.0.0.json index 0d4719e4..a13181f9 100644 --- a/deployments/shared-schemas/osdu/reference-data/QualityDataRuleSet.1.0.0.json +++ b/deployments/shared-schemas/osdu/reference-data/QualityDataRuleSet.1.0.0.json @@ -122,6 +122,9 @@ "DataRules": { "description": "The list of QualityDataRule items that this QualityDataRuleSet consists of.", "type": "array", + "x-osdu-indexing": { + "type": "flattened" + }, "items": { "type": "object", "properties": { diff --git a/deployments/shared-schemas/osdu/reference-data/QuantitativeAccuracyBand.1.0.0.json b/deployments/shared-schemas/osdu/reference-data/QuantitativeAccuracyBand.1.0.0.json index bf43af4b..e9c1ce35 100644 --- a/deployments/shared-schemas/osdu/reference-data/QuantitativeAccuracyBand.1.0.0.json +++ b/deployments/shared-schemas/osdu/reference-data/QuantitativeAccuracyBand.1.0.0.json @@ -19,7 +19,7 @@ "$schema": "http://json-schema.org/draft-07/schema#", "x-osdu-schema-source": "osdu:wks:reference-data--QuantitativeAccuracyBand:1.0.0", "title": "QuantitativeAccuracyBand", - "description": "A number to express the proximity of a measurement to the true value. (Adapted from ISO)", + "description": "A number to express the proximity of a measurement to the true value.", "type": "object", "properties": { "id": { @@ -130,7 +130,7 @@ ], "additionalProperties": false, "x-osdu-governance-authorities": [ - "OSDU" + "PPDM" ], "x-osdu-governance-model": "OPEN", "x-osdu-virtual-properties": { diff --git a/deployments/shared-schemas/osdu/reference-data/VerticalMeasurementPath.1.0.0.json b/deployments/shared-schemas/osdu/reference-data/VerticalMeasurementPath.1.0.0.json index 9daa56c6..af8692b1 100644 --- a/deployments/shared-schemas/osdu/reference-data/VerticalMeasurementPath.1.0.0.json +++ b/deployments/shared-schemas/osdu/reference-data/VerticalMeasurementPath.1.0.0.json @@ -19,7 +19,7 @@ "$schema": "http://json-schema.org/draft-07/schema#", "x-osdu-schema-source": "osdu:wks:reference-data--VerticalMeasurementPath:1.0.0", "title": "VerticalMeasurementPath", - "description": "Used to describe the vertical measurement paths.", + "description": "The type of vertical distance of a point in a well relative to a defined reference point.", "type": "object", "properties": { "id": { @@ -130,7 +130,7 @@ ], "additionalProperties": false, "x-osdu-governance-authorities": [ - "OSDU" + "PPDM" ], "x-osdu-governance-model": "OPEN", "x-osdu-virtual-properties": { diff --git a/deployments/shared-schemas/osdu/reference-data/VerticalMeasurementType.1.0.0.json b/deployments/shared-schemas/osdu/reference-data/VerticalMeasurementType.1.0.0.json index 9aa8fe86..bdabc555 100644 --- a/deployments/shared-schemas/osdu/reference-data/VerticalMeasurementType.1.0.0.json +++ b/deployments/shared-schemas/osdu/reference-data/VerticalMeasurementType.1.0.0.json @@ -19,7 +19,7 @@ "$schema": "http://json-schema.org/draft-07/schema#", "x-osdu-schema-source": "osdu:wks:reference-data--VerticalMeasurementType:1.0.0", "title": "VerticalMeasurementType", - "description": "Used to describe the type of vertical measurements.", + "description": "The horizontal plane of reference for depth measurement in a well, where the measured value is zero.", "type": "object", "properties": { "id": { @@ -130,7 +130,7 @@ ], "additionalProperties": false, "x-osdu-governance-authorities": [ - "OSDU" + "PPDM" ], "x-osdu-governance-model": "OPEN", "x-osdu-virtual-properties": { diff --git a/deployments/shared-schemas/osdu/work-product-component/AquiferInterpretation.1.0.0.json b/deployments/shared-schemas/osdu/work-product-component/AquiferInterpretation.1.0.0.json new file mode 100644 index 00000000..22322eec --- /dev/null +++ b/deployments/shared-schemas/osdu/work-product-component/AquiferInterpretation.1.0.0.json @@ -0,0 +1,185 @@ +{ + "schemaInfo": { + "schemaIdentity": { + "authority": "{{schema-authority}}", + "source": "wks", + "entityType": "work-product-component--AquiferInterpretation", + "schemaVersionMajor": 1, + "schemaVersionMinor": 0, + "schemaVersionPatch": 0, + "id": "{{schema-authority}}:wks:work-product-component--AquiferInterpretation:1.0.0" + }, + "createdBy": "OSDU Data Definition Group", + "scope": "SHARED", + "status": "DEVELOPMENT" + }, + "schema": { + "x-osdu-license": "Copyright 2022, The Open Group \\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.", + "$id": "https://schema.osdu.opengroup.org/json/work-product-component/AquiferInterpretation.1.0.0.json", + "$schema": "http://json-schema.org/draft-07/schema#", + "x-osdu-schema-source": "osdu:wks:work-product-component--AquiferInterpretation:1.0.0", + "title": "AquiferInterpretation", + "description": "An interpretation of a RockVolumeFeature as water-bearing rocks", + "type": "object", + "properties": { + "id": { + "description": "Previously called ResourceID or SRN which identifies this OSDU resource object without version.", + "title": "Entity ID", + "type": "string", + "pattern": "^[\\w\\-\\.]+:work-product-component\\-\\-AquiferInterpretation:[\\w\\-\\.\\:\\%]+$", + "example": "namespace:work-product-component--AquiferInterpretation:2fada00d-eebf-5454-8592-a3820b7c2489" + }, + "kind": { + "description": "The schema identification for the OSDU resource object following the pattern {Namespace}:{Source}:{Type}:{VersionMajor}.{VersionMinor}.{VersionPatch}. The versioning scheme follows the semantic versioning, https://semver.org/.", + "title": "Entity Kind", + "type": "string", + "pattern": "^[\\w\\-\\.]+:[\\w\\-\\.]+:[\\w\\-\\.]+:[0-9]+.[0-9]+.[0-9]+$", + "example": "osdu:wks:work-product-component--AquiferInterpretation:1.0.0" + }, + "version": { + "description": "The version number of this OSDU resource; set by the framework.", + "title": "Version Number", + "type": "integer", + "format": "int64", + "example": 1562066009929332 + }, + "acl": { + "description": "The access control tags associated with this entity.", + "title": "Access Control List", + "$ref": "{{schema-authority}}:wks:AbstractAccessControlList:1.0.0" + }, + "legal": { + "description": "The entity's legal tags and compliance status. The actual contents associated with the legal tags is managed by the Compliance Service.", + "title": "Legal Tags", + "$ref": "{{schema-authority}}:wks:AbstractLegalTags:1.0.0" + }, + "tags": { + "title": "Tag Dictionary", + "description": "A generic dictionary of string keys mapping to string value. Only strings are permitted as keys and values.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "example": { + "NameOfKey": "String value" + } + }, + "createTime": { + "description": "Timestamp of the time at which initial version of this OSDU resource object was created. Set by the System. The value is a combined date-time string in ISO-8601 given in UTC.", + "title": "Resource Object Creation DateTime", + "type": "string", + "format": "date-time", + "example": "2020-12-16T11:46:20.163Z" + }, + "createUser": { + "title": "Resource Object Creation User Reference", + "description": "The user reference, which created the first version of this resource object. Set by the System.", + "type": "string", + "example": "some-user@some-company-cloud.com" + }, + "modifyTime": { + "description": "Timestamp of the time at which this version of the OSDU resource object was created. Set by the System. The value is a combined date-time string in ISO-8601 given in UTC.", + "title": "Resource Object Version Creation DateTime", + "type": "string", + "format": "date-time", + "example": "2020-12-16T11:52:24.477Z" + }, + "modifyUser": { + "title": "Resource Object Version Creation User Reference", + "description": "The user reference, which created this version of this resource object. Set by the System.", + "type": "string", + "example": "some-user@some-company-cloud.com" + }, + "ancestry": { + "description": "The links to data, which constitute the inputs, from which this record instance is derived.", + "title": "Ancestry", + "$ref": "{{schema-authority}}:wks:AbstractLegalParentList:1.0.0" + }, + "meta": { + "description": "The Frame of Reference meta data section linking the named properties to self-contained definitions.", + "title": "Frame of Reference Meta Data", + "type": "array", + "items": { + "$ref": "{{schema-authority}}:wks:AbstractMetaItem:1.0.0" + } + }, + "data": { + "allOf": [ + { + "$ref": "{{schema-authority}}:wks:AbstractCommonResources:1.0.0" + }, + { + "$ref": "{{schema-authority}}:wks:AbstractWPCGroupType:1.0.0" + }, + { + "$ref": "{{schema-authority}}:wks:AbstractWorkProductComponent:1.0.0" + }, + { + "$ref": "{{schema-authority}}:wks:AbstractInterpretation:1.0.0" + }, + { + "type": "object", + "properties": { + "FeatureID": { + "type": "string", + "title": "Aquifer ID", + "description": "The reference to a local rock volume feature to which this interpretation is associated.", + "pattern": "^[\\w\\-\\.]+:work-product-component\\-\\-LocalRockVolumeFeature:[\\w\\-\\.\\:\\%]+:[0-9]*$", + "x-osdu-relationship": [ + { + "GroupType": "work-product-component", + "EntityType": "LocalRockVolumeFeature" + } + ] + } + }, + "title": "IndividualProperties" + }, + { + "type": "object", + "properties": { + "ExtensionProperties": { + "type": "object" + } + }, + "title": "ExtensionProperties" + } + ] + } + }, + "required": [ + "kind", + "acl", + "legal" + ], + "additionalProperties": false, + "x-osdu-review-status": "Accepted", + "x-osdu-virtual-properties": { + "data.VirtualProperties.DefaultLocation": { + "type": "object", + "priority": [ + { + "path": "data.SpatialArea" + }, + { + "path": "data.SpatialPoint" + } + ] + }, + "data.VirtualProperties.DefaultName": { + "type": "string", + "priority": [ + { + "path": "data.Name" + } + ] + } + }, + "x-osdu-inheriting-from-kind": [ + { + "name": "WorkProductComponent", + "kind": "osdu:wks:AbstractWPCGroupType:1.0.0" + } + ] + } +} \ No newline at end of file diff --git a/deployments/shared-schemas/osdu/work-product-component/ColumnBasedTable.1.0.0.json b/deployments/shared-schemas/osdu/work-product-component/ColumnBasedTable.1.0.0.json index e332ae18..2102f126 100644 --- a/deployments/shared-schemas/osdu/work-product-component/ColumnBasedTable.1.0.0.json +++ b/deployments/shared-schemas/osdu/work-product-component/ColumnBasedTable.1.0.0.json @@ -146,12 +146,12 @@ "items": { "type": "object", "title": "Column values", - "description": "Values of column. Generally only of the attribute should be instantiated.", + "description": "Value of the column. Generally only one of the attribute should be instantiated.", "properties": { "BooleanColumn": { "type": "array", "title": "Boolean Column", - "description": "A columns of only boolean values", + "description": "A column of only boolean values", "example": [ true, false, @@ -166,7 +166,7 @@ "IntegerColumn": { "type": "array", "title": "Integer Column", - "description": "A columns of only integer values", + "description": "A column of only integer values", "format": "integer", "pattern": "^[0-9]+$", "example": [ @@ -183,7 +183,7 @@ "NumberColumn": { "type": "array", "title": "Number Column", - "description": "A columns of only number values", + "description": "A column of only number values", "example": [ 0.1, 2.3, @@ -198,7 +198,7 @@ "StringColumn": { "type": "array", "title": "String Column", - "description": "A columns of only string values", + "description": "A column of only string values", "example": [ "foo", "bar", diff --git a/deployments/shared-schemas/osdu/work-product-component/FaultSystem.1.0.0.json b/deployments/shared-schemas/osdu/work-product-component/FaultSystem.1.0.0.json index 6989d2cb..20ed04a1 100644 --- a/deployments/shared-schemas/osdu/work-product-component/FaultSystem.1.0.0.json +++ b/deployments/shared-schemas/osdu/work-product-component/FaultSystem.1.0.0.json @@ -374,10 +374,7 @@ "legal" ], "additionalProperties": false, - "x-osdu-supported-file-formats": [ - "RESQML", - "csv" - ], + "x-osdu-supported-file-formats": [], "x-osdu-virtual-properties": { "data.VirtualProperties.DefaultLocation": { "type": "object", diff --git a/deployments/shared-schemas/osdu/work-product-component/FaultSystem.1.1.0.json b/deployments/shared-schemas/osdu/work-product-component/FaultSystem.1.1.0.json new file mode 100644 index 00000000..fb91de74 --- /dev/null +++ b/deployments/shared-schemas/osdu/work-product-component/FaultSystem.1.1.0.json @@ -0,0 +1,448 @@ +{ + "schemaInfo": { + "schemaIdentity": { + "authority": "{{schema-authority}}", + "source": "wks", + "entityType": "work-product-component--FaultSystem", + "schemaVersionMajor": 1, + "schemaVersionMinor": 1, + "schemaVersionPatch": 0, + "id": "{{schema-authority}}:wks:work-product-component--FaultSystem:1.1.0" + }, + "createdBy": "OSDU Data Definition Group", + "scope": "SHARED", + "status": "DEVELOPMENT" + }, + "schema": { + "x-osdu-license": "Copyright 2022, The Open Group \\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.", + "$id": "https://schema.osdu.opengroup.org/json/work-product-component/FaultSystem.1.1.0.json", + "$schema": "http://json-schema.org/draft-07/schema#", + "x-osdu-schema-source": "osdu:wks:work-product-component--FaultSystem:1.1.0", + "title": "FaultSystem", + "description": "A set of picked faults. In the earth modeling domain this entity corresponds to a PersistedCollection containing GenericRepresentation or SeismicFault items.", + "type": "object", + "properties": { + "id": { + "description": "Previously called ResourceID or SRN which identifies this OSDU resource object without version.", + "title": "Entity ID", + "type": "string", + "pattern": "^[\\w\\-\\.]+:work-product-component\\-\\-FaultSystem:[\\w\\-\\.\\:\\%]+$", + "example": "namespace:work-product-component--FaultSystem:701e6ebb-0ad0-5547-9de2-5f4363ed3442" + }, + "kind": { + "description": "The schema identification for the OSDU resource object following the pattern {Namespace}:{Source}:{Type}:{VersionMajor}.{VersionMinor}.{VersionPatch}. The versioning scheme follows the semantic versioning, https://semver.org/.", + "title": "Entity Kind", + "type": "string", + "pattern": "^[\\w\\-\\.]+:[\\w\\-\\.]+:[\\w\\-\\.]+:[0-9]+.[0-9]+.[0-9]+$", + "example": "osdu:wks:work-product-component--FaultSystem:1.1.0" + }, + "version": { + "description": "The version number of this OSDU resource; set by the framework.", + "title": "Version Number", + "type": "integer", + "format": "int64", + "example": 1562066009929332 + }, + "acl": { + "description": "The access control tags associated with this entity.", + "title": "Access Control List", + "$ref": "{{schema-authority}}:wks:AbstractAccessControlList:1.0.0" + }, + "legal": { + "description": "The entity's legal tags and compliance status. The actual contents associated with the legal tags is managed by the Compliance Service.", + "title": "Legal Tags", + "$ref": "{{schema-authority}}:wks:AbstractLegalTags:1.0.0" + }, + "tags": { + "title": "Tag Dictionary", + "description": "A generic dictionary of string keys mapping to string value. Only strings are permitted as keys and values.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "example": { + "NameOfKey": "String value" + } + }, + "createTime": { + "description": "Timestamp of the time at which initial version of this OSDU resource object was created. Set by the System. The value is a combined date-time string in ISO-8601 given in UTC.", + "title": "Resource Object Creation DateTime", + "type": "string", + "format": "date-time", + "example": "2020-12-16T11:46:20.163Z" + }, + "createUser": { + "title": "Resource Object Creation User Reference", + "description": "The user reference, which created the first version of this resource object. Set by the System.", + "type": "string", + "example": "some-user@some-company-cloud.com" + }, + "modifyTime": { + "description": "Timestamp of the time at which this version of the OSDU resource object was created. Set by the System. The value is a combined date-time string in ISO-8601 given in UTC.", + "title": "Resource Object Version Creation DateTime", + "type": "string", + "format": "date-time", + "example": "2020-12-16T11:52:24.477Z" + }, + "modifyUser": { + "title": "Resource Object Version Creation User Reference", + "description": "The user reference, which created this version of this resource object. Set by the System.", + "type": "string", + "example": "some-user@some-company-cloud.com" + }, + "ancestry": { + "description": "The links to data, which constitute the inputs, from which this record instance is derived.", + "title": "Ancestry", + "$ref": "{{schema-authority}}:wks:AbstractLegalParentList:1.0.0" + }, + "meta": { + "description": "The Frame of Reference meta data section linking the named properties to self-contained definitions.", + "title": "Frame of Reference Meta Data", + "type": "array", + "items": { + "$ref": "{{schema-authority}}:wks:AbstractMetaItem:1.0.0" + } + }, + "data": { + "allOf": [ + { + "$ref": "{{schema-authority}}:wks:AbstractCommonResources:1.0.0" + }, + { + "$ref": "{{schema-authority}}:wks:AbstractWPCGroupType:1.0.0" + }, + { + "$ref": "{{schema-authority}}:wks:AbstractWorkProductComponent:1.0.0" + }, + { + "type": "object", + "properties": { + "SeismicPickingTypeID": { + "type": "string", + "description": "Method used to pick faults. E.g.Autotracked, Grid, Manual Picked, Mixed.", + "pattern": "^[\\w\\-\\.]+:reference-data\\-\\-SeismicPickingType:[\\w\\-\\.\\:\\%]+:[0-9]*$", + "x-osdu-relationship": [ + { + "GroupType": "reference-data", + "EntityType": "SeismicPickingType" + } + ] + }, + "Remark": { + "type": "string", + "description": "Optional comment to capture interpreter thoughts. Distinguished from Description which is a general explanation of the object." + }, + "SeismicTraceDataIDs": { + "type": "array", + "description": "Seismic Volumes picked against", + "items": { + "type": "string", + "pattern": "^[\\w\\-\\.]+:work-product-component\\-\\-SeismicTraceData:[\\w\\-\\.\\:\\%]+:[0-9]*$", + "x-osdu-relationship": [ + { + "GroupType": "work-product-component", + "EntityType": "SeismicTraceData" + } + ] + } + }, + "SeismicDomainTypeID": { + "type": "string", + "description": "Vertical domain of faults. E.g. Time, Depth", + "pattern": "^[\\w\\-\\.]+:reference-data\\-\\-SeismicDomainType:[\\w\\-\\.\\:\\%]+:[0-9]*$", + "x-osdu-relationship": [ + { + "GroupType": "reference-data", + "EntityType": "SeismicDomainType" + } + ] + }, + "SeismicDomainUOM": { + "type": "string", + "description": "Unit of measurement for vertical domain", + "pattern": "^[\\w\\-\\.]+:reference-data\\-\\-UnitOfMeasure:[\\w\\-\\.\\:\\%]+:[0-9]*$", + "x-osdu-relationship": [ + { + "GroupType": "reference-data", + "EntityType": "UnitOfMeasure" + } + ] + }, + "HorizontalCRSID": { + "type": "string", + "description": "The CRS for surface coordinates used in fault locations if not specified in File.", + "pattern": "^[\\w\\-\\.]+:reference-data\\-\\-CoordinateReferenceSystem:[\\w\\-\\.\\:\\%]+:[0-9]*$", + "x-osdu-relationship": [ + { + "GroupType": "reference-data", + "EntityType": "CoordinateReferenceSystem" + } + ] + }, + "BinGridID": { + "type": "string", + "description": "the Bin Grid of the Fault System when coordinates are specified in seismic bin inline/crossline.", + "pattern": "^[\\w\\-\\.]+:work-product-component\\-\\-SeismicBinGrid:[\\w\\-\\.\\:\\%]+:[0-9]*$", + "x-osdu-relationship": [ + { + "GroupType": "work-product-component", + "EntityType": "SeismicBinGrid" + } + ] + }, + "VerticalDatumOffset": { + "type": "number", + "description": "Datum value, the elevation of zero time/depth on the vertical axis in the domain of seismicdomaintype relative to the vertical reference datum used (usually MSL). Positive is upward from zero elevation to seismic datum).", + "x-osdu-frame-of-reference": "UOM:length" + }, + "VerticalMeasurementTypeID": { + "type": "string", + "description": "Identifies a vertical reference datum type. E.g. mean sea level, ground level, mudline.", + "pattern": "^[\\w\\-\\.]+:reference-data\\-\\-VerticalMeasurementType:[\\w\\-\\.\\:\\%]+:[0-9]*$", + "x-osdu-relationship": [ + { + "GroupType": "reference-data", + "EntityType": "VerticalMeasurementType" + } + ] + }, + "ReplacementVelocity": { + "type": "number", + "description": "Value used to produce vertical static shifts in data", + "x-osdu-frame-of-reference": "UOM:length per time" + }, + "Faults": { + "type": "array", + "description": "Array of Faults that comprise the Fault System", + "x-osdu-indexing": { + "type": "nested" + }, + "items": { + "type": "object", + "title": "Faults", + "description": "Array of Faults that comprise the Fault System", + "properties": { + "SeismicFaultName": { + "type": "string", + "description": "Name of an individual fault within a fault system." + }, + "FaultInterpretationID": { + "type": "string", + "title": "Fault Interpretation ID", + "description": "The related FaultInterpretation for collaborating with Earth Modeling.", + "pattern": "^[\\w\\-\\.]+:work-product-component\\-\\-FaultInterpretation:[\\w\\-\\.\\:\\%]+:[0-9]*$", + "x-osdu-relationship": [ + { + "GroupType": "work-product-component", + "EntityType": "FaultInterpretation" + } + ] + }, + "SeismicFaultTypeID": { + "type": "string", + "description": "Geological type of fault geometry. E.g. Thrust (thr), Reverse (rev), Normal(norm)", + "pattern": "^[\\w\\-\\.]+:reference-data\\-\\-SeismicFaultType:[\\w\\-\\.\\:\\%]+:[0-9]*$", + "x-osdu-relationship": [ + { + "GroupType": "reference-data", + "EntityType": "SeismicFaultType" + } + ] + }, + "SeismicPickingTypeID": { + "type": "string", + "description": "Method used to pick faults. E.g.Autotracked, Grid, Manual Picked", + "pattern": "^[\\w\\-\\.]+:reference-data\\-\\-SeismicPickingType:[\\w\\-\\.\\:\\%]+:[0-9]*$", + "x-osdu-relationship": [ + { + "GroupType": "reference-data", + "EntityType": "SeismicPickingType" + } + ] + }, + "SeismicFaultLength": { + "type": "number", + "description": "Maximum linear dimension measured along strike of the slip surface", + "x-osdu-frame-of-reference": "UOM_via_property:SeismicFaultLengthUOM" + }, + "SeismicFaultLengthUOM": { + "type": "string", + "description": "ID of the Unit of Measure of the Length of the Fault", + "pattern": "^[\\w\\-\\.]+:reference-data\\-\\-UnitOfMeasure:[\\w\\-\\.\\:\\%]+:[0-9]*$", + "x-osdu-relationship": [ + { + "GroupType": "reference-data", + "EntityType": "UnitOfMeasure" + } + ] + }, + "SeismicFaultSurfaceArea": { + "type": "number", + "description": "Surface Area of the Fault Plane", + "x-osdu-frame-of-reference": "UOM_via_property:SeismicFaultSurfaceAreaUOM" + }, + "SeismicFaultSurfaceAreaUOM": { + "type": "string", + "description": "ID of the Unit of Measure of the Surface Area of the Fault", + "pattern": "^[\\w\\-\\.]+:reference-data\\-\\-UnitOfMeasure:[\\w\\-\\.\\:\\%]+:[0-9]*$", + "x-osdu-relationship": [ + { + "GroupType": "reference-data", + "EntityType": "UnitOfMeasure" + } + ] + }, + "VerticalFaultDipAngle": { + "type": "number", + "description": "Maximum vertical angle of fault", + "x-osdu-frame-of-reference": "UOM_via_property:VerticalFaultDipAngleUOM" + }, + "VerticalFaultDipAngleUOM": { + "type": "string", + "description": "ID of the Unit of Measure of the Dip angle of the Fault", + "pattern": "^[\\w\\-\\.]+:reference-data\\-\\-UnitOfMeasure:[\\w\\-\\.\\:\\%]+:[0-9]*$", + "x-osdu-relationship": [ + { + "GroupType": "reference-data", + "EntityType": "UnitOfMeasure" + } + ] + }, + "FaultHeaveNumber": { + "type": "number", + "description": "Maximum stratigraphic heave, the apparent horizontal component of the net-slip.", + "x-osdu-frame-of-reference": "UOM_via_property:FaultHeaveNumberUOM" + }, + "FaultHeaveNumberUOM": { + "type": "string", + "description": "ID of the Unit of Measure of the FaultHeaveNumber", + "pattern": "^[\\w\\-\\.]+:reference-data\\-\\-UnitOfMeasure:[\\w\\-\\.\\:\\%]+:[0-9]*$", + "x-osdu-relationship": [ + { + "GroupType": "reference-data", + "EntityType": "UnitOfMeasure" + } + ] + }, + "FaultNetSlipNumber": { + "type": "number", + "description": "Net (average) Slip", + "x-osdu-frame-of-reference": "UOM_via_property:FaultNetSlipNumberUOM" + }, + "FaultNetSlipNumberUOM": { + "type": "string", + "description": "ID of the Unit of Measure of the FaultNetSlipNumber", + "pattern": "^[\\w\\-\\.]+:reference-data\\-\\-UnitOfMeasure:[\\w\\-\\.\\:\\%]+:[0-9]*$", + "x-osdu-relationship": [ + { + "GroupType": "reference-data", + "EntityType": "UnitOfMeasure" + } + ] + }, + "StratigraphicFaultOffset": { + "type": "number", + "description": "Maximum vertical offset of faulted strata.", + "x-osdu-frame-of-reference": "UOM_via_property:StratigraphicFaultOffsetUOM" + }, + "StratigraphicFaultOffsetUOM": { + "type": "string", + "description": "ID of the Unit of Measure of the StratigraphicFaultOffset", + "pattern": "^[\\w\\-\\.]+:reference-data\\-\\-UnitOfMeasure:[\\w\\-\\.\\:\\%]+:[0-9]*$", + "x-osdu-relationship": [ + { + "GroupType": "reference-data", + "EntityType": "UnitOfMeasure" + } + ] + }, + "Remark": { + "type": "string", + "description": "Optional comment" + }, + "Interpreter": { + "type": "string", + "description": "The person or team who interpreted the fault data." + }, + "Role": { + "type": "string", + "title": "Representation Role", + "description": "RepresentationRole for this Fault element if more than one role is in use for this FaultSystem.", + "format": "uri-reference", + "example": "namespace:reference-data--RepresentationRole:FaultSticks:", + "pattern": "^[\\w\\-\\.]+:reference-data\\-\\-RepresentationRole:[\\w\\-\\.\\:\\%]+:[0-9]*$", + "x-osdu-relationship": [ + { + "GroupType": "reference-data", + "EntityType": "RepresentationRole" + } + ] + }, + "Type": { + "type": "string", + "title": "Representation Type", + "description": "RepresentationType for this Fault element if more than one type is in use for this FaultSystem.", + "format": "uri-reference", + "example": "namespace:reference-data--RepresentationType:PolylineSet:", + "pattern": "^[\\w\\-\\.]+:reference-data\\-\\-RepresentationType:[\\w\\-\\.\\:\\%]+:[0-9]*$", + "x-osdu-relationship": [ + { + "GroupType": "reference-data", + "EntityType": "RepresentationType" + } + ] + } + } + } + } + }, + "title": "IndividualProperties" + }, + { + "type": "object", + "properties": { + "ExtensionProperties": { + "type": "object" + } + }, + "title": "ExtensionProperties" + } + ] + } + }, + "required": [ + "kind", + "acl", + "legal" + ], + "additionalProperties": false, + "x-osdu-review-status": "Accepted", + "x-osdu-virtual-properties": { + "data.VirtualProperties.DefaultLocation": { + "type": "object", + "priority": [ + { + "path": "data.SpatialArea" + }, + { + "path": "data.SpatialPoint" + } + ] + }, + "data.VirtualProperties.DefaultName": { + "type": "string", + "priority": [ + { + "path": "data.Name" + } + ] + } + }, + "x-osdu-inheriting-from-kind": [ + { + "name": "WorkProductComponent", + "kind": "osdu:wks:AbstractWPCGroupType:1.0.0" + } + ] + } +} \ No newline at end of file diff --git a/deployments/shared-schemas/osdu/work-product-component/IjkGridNumericalAquiferRepresentation.1.0.0.json b/deployments/shared-schemas/osdu/work-product-component/IjkGridNumericalAquiferRepresentation.1.0.0.json new file mode 100644 index 00000000..0bebd208 --- /dev/null +++ b/deployments/shared-schemas/osdu/work-product-component/IjkGridNumericalAquiferRepresentation.1.0.0.json @@ -0,0 +1,280 @@ +{ + "schemaInfo": { + "schemaIdentity": { + "authority": "{{schema-authority}}", + "source": "wks", + "entityType": "work-product-component--IjkGridNumericalAquiferRepresentation", + "schemaVersionMajor": 1, + "schemaVersionMinor": 0, + "schemaVersionPatch": 0, + "id": "{{schema-authority}}:wks:work-product-component--IjkGridNumericalAquiferRepresentation:1.0.0" + }, + "createdBy": "OSDU Data Definition Group", + "scope": "SHARED", + "status": "DEVELOPMENT" + }, + "schema": { + "x-osdu-license": "Copyright 2022, The Open Group \\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.", + "$id": "https://schema.osdu.opengroup.org/json/work-product-component/IjkGridNumericalAquiferRepresentation.1.0.0.json", + "$schema": "http://json-schema.org/draft-07/schema#", + "x-osdu-schema-source": "osdu:wks:work-product-component--IjkGridNumericalAquiferRepresentation:1.0.0", + "title": "IjkGridNumericalAquiferRepresentation", + "description": "A numerical aquifer representation defines the geometry of the aquifer as IJK grid cell indices.", + "type": "object", + "properties": { + "id": { + "description": "Previously called ResourceID or SRN which identifies this OSDU resource object without version.", + "title": "Entity ID", + "type": "string", + "pattern": "^[\\w\\-\\.]+:work-product-component\\-\\-IjkGridNumericalAquiferRepresentation:[\\w\\-\\.\\:\\%]+$", + "example": "namespace:work-product-component--IjkGridNumericalAquiferRepresentation:d7eb306b-24b5-582c-a201-0c4ed4b8605d" + }, + "kind": { + "description": "The schema identification for the OSDU resource object following the pattern {Namespace}:{Source}:{Type}:{VersionMajor}.{VersionMinor}.{VersionPatch}. The versioning scheme follows the semantic versioning, https://semver.org/.", + "title": "Entity Kind", + "type": "string", + "pattern": "^[\\w\\-\\.]+:[\\w\\-\\.]+:[\\w\\-\\.]+:[0-9]+.[0-9]+.[0-9]+$", + "example": "osdu:wks:work-product-component--IjkGridNumericalAquiferRepresentation:1.0.0" + }, + "version": { + "description": "The version number of this OSDU resource; set by the framework.", + "title": "Version Number", + "type": "integer", + "format": "int64", + "example": 1562066009929332 + }, + "acl": { + "description": "The access control tags associated with this entity.", + "title": "Access Control List", + "$ref": "{{schema-authority}}:wks:AbstractAccessControlList:1.0.0" + }, + "legal": { + "description": "The entity's legal tags and compliance status. The actual contents associated with the legal tags is managed by the Compliance Service.", + "title": "Legal Tags", + "$ref": "{{schema-authority}}:wks:AbstractLegalTags:1.0.0" + }, + "tags": { + "title": "Tag Dictionary", + "description": "A generic dictionary of string keys mapping to string value. Only strings are permitted as keys and values.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "example": { + "NameOfKey": "String value" + } + }, + "createTime": { + "description": "Timestamp of the time at which initial version of this OSDU resource object was created. Set by the System. The value is a combined date-time string in ISO-8601 given in UTC.", + "title": "Resource Object Creation DateTime", + "type": "string", + "format": "date-time", + "example": "2020-12-16T11:46:20.163Z" + }, + "createUser": { + "title": "Resource Object Creation User Reference", + "description": "The user reference, which created the first version of this resource object. Set by the System.", + "type": "string", + "example": "some-user@some-company-cloud.com" + }, + "modifyTime": { + "description": "Timestamp of the time at which this version of the OSDU resource object was created. Set by the System. The value is a combined date-time string in ISO-8601 given in UTC.", + "title": "Resource Object Version Creation DateTime", + "type": "string", + "format": "date-time", + "example": "2020-12-16T11:52:24.477Z" + }, + "modifyUser": { + "title": "Resource Object Version Creation User Reference", + "description": "The user reference, which created this version of this resource object. Set by the System.", + "type": "string", + "example": "some-user@some-company-cloud.com" + }, + "ancestry": { + "description": "The links to data, which constitute the inputs, from which this record instance is derived.", + "title": "Ancestry", + "$ref": "{{schema-authority}}:wks:AbstractLegalParentList:1.0.0" + }, + "meta": { + "description": "The Frame of Reference meta data section linking the named properties to self-contained definitions.", + "title": "Frame of Reference Meta Data", + "type": "array", + "items": { + "$ref": "{{schema-authority}}:wks:AbstractMetaItem:1.0.0" + } + }, + "data": { + "allOf": [ + { + "$ref": "{{schema-authority}}:wks:AbstractCommonResources:1.0.0" + }, + { + "$ref": "{{schema-authority}}:wks:AbstractWPCGroupType:1.0.0" + }, + { + "$ref": "{{schema-authority}}:wks:AbstractWorkProductComponent:1.0.0" + }, + { + "$ref": "{{schema-authority}}:wks:AbstractRepresentation:1.0.0" + }, + { + "type": "object", + "properties": { + "InterpretationID": { + "type": "string", + "title": "Aquifer Interpretation ID", + "description": "The reference to the AquiferInterpretation this representation belongs to.", + "format": "uri-reference", + "pattern": "^[\\w\\-\\.]+:work-product-component\\-\\-AquiferInterpretation:[\\w\\-\\.\\:\\%]+:[0-9]*$", + "x-osdu-relationship": [ + { + "GroupType": "work-product-component", + "EntityType": "AquiferInterpretation" + } + ] + }, + "SingleCellAquiferSet": { + "type": "array", + "title": "Single Cell Aquifer Set", + "description": "Describe the aquifer by means of one to many single cell of reservoir grids", + "items": { + "type": "object", + "title": "SingleCellAquifer", + "description": "Describe a cell which is a part or the whole definition of an aquifer.", + "properties": { + "SupportingGridID": { + "type": "string", + "title": "Supporting Grid", + "description": "The grid where the aquifer cell is defined", + "format": "uri-reference", + "example": "namespace:work-product-component--IjkGridRepresentation:85348741-3433-406B-9189-22B298C3E2D2:", + "pattern": "^[\\w\\-\\.]+:work-product-component\\-\\-IjkGridRepresentation:[\\w\\-\\.\\:\\%]+:[0-9]*$", + "x-osdu-relationship": [ + { + "GroupType": "work-product-component", + "EntityType": "IjkGridRepresentation" + } + ] + }, + "I": { + "type": "integer", + "title": "I index", + "description": "I index of the cell", + "example": 10 + }, + "J": { + "type": "integer", + "title": "J index", + "description": "J index of the cell", + "example": 20 + }, + "K": { + "type": "integer", + "title": "K index", + "description": "K index of the cell", + "example": 30 + }, + "Area": { + "type": "number", + "title": "Area", + "description": "Area of the aquifer.", + "example": 11520.56, + "x-osdu-frame-of-reference": "UOM:area" + }, + "Length": { + "type": "number", + "title": "Length", + "description": "Length of the aquifer.", + "example": 7045, + "x-osdu-frame-of-reference": "UOM:length" + }, + "Porosity": { + "type": "number", + "title": "Porosity", + "description": "Porosity of the aquifer. Default property, caution if the grid property has got multi realizations.", + "example": 0.2, + "x-osdu-frame-of-reference": "UOM:dimensionless" + }, + "Permeability": { + "type": "number", + "title": "Permeability", + "description": "Permeability of the aquifer. Default property, caution if the grid property has got multi realizations.", + "example": 180, + "x-osdu-frame-of-reference": "UOM:permeability rock" + }, + "Depth": { + "type": "number", + "title": "Depth", + "description": "Depth of the aquifer", + "example": 2150, + "x-osdu-frame-of-reference": "UOM:length" + }, + "InitialPressure": { + "type": "number", + "title": "Initial Pressure", + "description": "Initial pressure of the aquifer. Default property, caution if the grid property has got multi realizations.", + "example": 0, + "x-osdu-frame-of-reference": "UOM:pressure" + } + } + } + }, + "ConnectionSet": { + "type": "array", + "title": "Connection Set", + "description": "List all connections between the aquifer and reservoir grids.", + "items": { + "$ref": "{{schema-authority}}:wks:AbstractIjkGridFlowSimulationBoundaryConnection:1.0.0" + } + } + }, + "title": "IndividualProperties" + }, + { + "type": "object", + "properties": { + "ExtensionProperties": { + "type": "object" + } + }, + "title": "ExtensionProperties" + } + ] + } + }, + "required": [ + "kind", + "acl", + "legal" + ], + "additionalProperties": false, + "x-osdu-review-status": "Accepted", + "x-osdu-virtual-properties": { + "data.VirtualProperties.DefaultLocation": { + "type": "object", + "priority": [ + { + "path": "data.SpatialArea" + }, + { + "path": "data.SpatialPoint" + } + ] + }, + "data.VirtualProperties.DefaultName": { + "type": "string", + "priority": [ + { + "path": "data.Name" + } + ] + } + }, + "x-osdu-inheriting-from-kind": [ + { + "name": "WorkProductComponent", + "kind": "osdu:wks:AbstractWPCGroupType:1.0.0" + } + ] + } +} \ No newline at end of file diff --git a/deployments/shared-schemas/osdu/work-product-component/SeismicFault.1.0.0.json b/deployments/shared-schemas/osdu/work-product-component/SeismicFault.1.0.0.json new file mode 100644 index 00000000..f0b95697 --- /dev/null +++ b/deployments/shared-schemas/osdu/work-product-component/SeismicFault.1.0.0.json @@ -0,0 +1,346 @@ +{ + "schemaInfo": { + "schemaIdentity": { + "authority": "{{schema-authority}}", + "source": "wks", + "entityType": "work-product-component--SeismicFault", + "schemaVersionMajor": 1, + "schemaVersionMinor": 0, + "schemaVersionPatch": 0, + "id": "{{schema-authority}}:wks:work-product-component--SeismicFault:1.0.0" + }, + "createdBy": "OSDU Data Definition Group", + "scope": "SHARED", + "status": "DEVELOPMENT" + }, + "schema": { + "x-osdu-license": "Copyright 2022, The Open Group \\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.", + "$id": "https://schema.osdu.opengroup.org/json/work-product-component/SeismicFault.1.0.0.json", + "$schema": "http://json-schema.org/draft-07/schema#", + "x-osdu-schema-source": "osdu:wks:work-product-component--SeismicFault:1.0.0", + "title": "SeismicFault", + "description": "A representation of a single fault picked on the basis of seismic data. The record carries information about the seismic geometry context. It can be part of an UnsealedSurfaceFramework.", + "type": "object", + "properties": { + "id": { + "description": "Previously called ResourceID or SRN which identifies this OSDU resource object without version.", + "title": "Entity ID", + "type": "string", + "pattern": "^[\\w\\-\\.]+:work-product-component\\-\\-SeismicFault:[\\w\\-\\.\\:\\%]+$", + "example": "namespace:work-product-component--SeismicFault:3aca6542-c75b-559d-a865-0c67722e8fed" + }, + "kind": { + "description": "The schema identification for the OSDU resource object following the pattern {Namespace}:{Source}:{Type}:{VersionMajor}.{VersionMinor}.{VersionPatch}. The versioning scheme follows the semantic versioning, https://semver.org/.", + "title": "Entity Kind", + "type": "string", + "pattern": "^[\\w\\-\\.]+:[\\w\\-\\.]+:[\\w\\-\\.]+:[0-9]+.[0-9]+.[0-9]+$", + "example": "osdu:wks:work-product-component--SeismicFault:1.0.0" + }, + "version": { + "description": "The version number of this OSDU resource; set by the framework.", + "title": "Version Number", + "type": "integer", + "format": "int64", + "example": 1562066009929332 + }, + "acl": { + "description": "The access control tags associated with this entity.", + "title": "Access Control List", + "$ref": "{{schema-authority}}:wks:AbstractAccessControlList:1.0.0" + }, + "legal": { + "description": "The entity's legal tags and compliance status. The actual contents associated with the legal tags is managed by the Compliance Service.", + "title": "Legal Tags", + "$ref": "{{schema-authority}}:wks:AbstractLegalTags:1.0.0" + }, + "tags": { + "title": "Tag Dictionary", + "description": "A generic dictionary of string keys mapping to string value. Only strings are permitted as keys and values.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "example": { + "NameOfKey": "String value" + } + }, + "createTime": { + "description": "Timestamp of the time at which initial version of this OSDU resource object was created. Set by the System. The value is a combined date-time string in ISO-8601 given in UTC.", + "title": "Resource Object Creation DateTime", + "type": "string", + "format": "date-time", + "example": "2020-12-16T11:46:20.163Z" + }, + "createUser": { + "title": "Resource Object Creation User Reference", + "description": "The user reference, which created the first version of this resource object. Set by the System.", + "type": "string", + "example": "some-user@some-company-cloud.com" + }, + "modifyTime": { + "description": "Timestamp of the time at which this version of the OSDU resource object was created. Set by the System. The value is a combined date-time string in ISO-8601 given in UTC.", + "title": "Resource Object Version Creation DateTime", + "type": "string", + "format": "date-time", + "example": "2020-12-16T11:52:24.477Z" + }, + "modifyUser": { + "title": "Resource Object Version Creation User Reference", + "description": "The user reference, which created this version of this resource object. Set by the System.", + "type": "string", + "example": "some-user@some-company-cloud.com" + }, + "ancestry": { + "description": "The links to data, which constitute the inputs, from which this record instance is derived.", + "title": "Ancestry", + "$ref": "{{schema-authority}}:wks:AbstractLegalParentList:1.0.0" + }, + "meta": { + "description": "The Frame of Reference meta data section linking the named properties to self-contained definitions.", + "title": "Frame of Reference Meta Data", + "type": "array", + "items": { + "$ref": "{{schema-authority}}:wks:AbstractMetaItem:1.0.0" + } + }, + "data": { + "allOf": [ + { + "$ref": "{{schema-authority}}:wks:AbstractCommonResources:1.0.0" + }, + { + "$ref": "{{schema-authority}}:wks:AbstractWPCGroupType:1.0.0" + }, + { + "$ref": "{{schema-authority}}:wks:AbstractWorkProductComponent:1.0.0" + }, + { + "$ref": "{{schema-authority}}:wks:AbstractRepresentation:1.0.0" + }, + { + "type": "object", + "properties": { + "SeismicPickingTypeID": { + "type": "string", + "title": "Seismic Picking Type ID", + "description": "Method used to pick faults. E.g.Autotracked, Grid, Manual Picked", + "pattern": "^[\\w\\-\\.]+:reference-data\\-\\-SeismicPickingType:[\\w\\-\\.\\:\\%]+:[0-9]*$", + "x-osdu-relationship": [ + { + "GroupType": "reference-data", + "EntityType": "SeismicPickingType" + } + ] + }, + "Remark": { + "type": "string", + "title": "Remark", + "description": "Optional comment to capture interpreter thoughts. Distinguished from Description which is a general explanation of the object." + }, + "SeismicTraceDataIDs": { + "type": "array", + "title": "Seismic Trace Data IDs", + "description": "Seismic Volumes picked against", + "items": { + "type": "string", + "pattern": "^[\\w\\-\\.]+:work-product-component\\-\\-SeismicTraceData:[\\w\\-\\.\\:\\%]+:[0-9]*$", + "x-osdu-relationship": [ + { + "GroupType": "work-product-component", + "EntityType": "SeismicTraceData" + } + ] + } + }, + "SeismicDomainTypeID": { + "type": "string", + "title": "Seismic Domain Type ID", + "description": "Vertical domain of faults. E.g. Time, Depth", + "pattern": "^[\\w\\-\\.]+:reference-data\\-\\-SeismicDomainType:[\\w\\-\\.\\:\\%]+:[0-9]*$", + "x-osdu-relationship": [ + { + "GroupType": "reference-data", + "EntityType": "SeismicDomainType" + } + ] + }, + "BinGridID": { + "type": "string", + "title": "Bin Grid ID", + "description": "the Bin Grid of the Fault System when coordinates are specified in seismic bin inline/crossline.", + "pattern": "^[\\w\\-\\.]+:work-product-component\\-\\-SeismicBinGrid:[\\w\\-\\.\\:\\%]+:[0-9]*$", + "x-osdu-relationship": [ + { + "GroupType": "work-product-component", + "EntityType": "SeismicBinGrid" + } + ] + }, + "SeismicLineGeometryIDs": { + "type": "array", + "title": "Seismic Line Geometry IDs", + "description": "The list of explicit 2D seismic line geometries overriding any definitions inferred from Seismic2DInterpretationSet. If empty and Seismic2DInterpretationSetID is populated, Seismic2DInterpretationSet.SeismicLineGeometries[].SeismicLineGeometryID apply.", + "items": { + "type": "string" + } + }, + "VerticalDatumOffset": { + "type": "number", + "title": "Vertical Datum Offset", + "description": "Datum value, the elevation of zero time/depth on the vertical axis in the domain of seismicdomaintype relative to the vertical reference datum used (usually MSL). Positive is upward from zero elevation to seismic datum).", + "x-osdu-frame-of-reference": "UOM:length" + }, + "VerticalMeasurementTypeID": { + "type": "string", + "title": "Vertical Measurement Type ID", + "description": "Identifies a vertical reference datum type. E.g. mean sea level, ground level, mudline.", + "pattern": "^[\\w\\-\\.]+:reference-data\\-\\-VerticalMeasurementType:[\\w\\-\\.\\:\\%]+:[0-9]*$", + "x-osdu-relationship": [ + { + "GroupType": "reference-data", + "EntityType": "VerticalMeasurementType" + } + ] + }, + "ReplacementVelocity": { + "type": "number", + "title": "Replacement Velocity", + "description": "Value used to produce vertical static shifts in data.", + "x-osdu-frame-of-reference": "UOM:length per time" + }, + "SeismicFaultTypeID": { + "type": "string", + "title": "Seismic Fault Type ID", + "description": "Geological type of fault geometry. E.g. Thrust (thr), Reverse (rev), Normal(norm)", + "pattern": "^[\\w\\-\\.]+:reference-data\\-\\-SeismicFaultType:[\\w\\-\\.\\:\\%]+:[0-9]*$", + "x-osdu-relationship": [ + { + "GroupType": "reference-data", + "EntityType": "SeismicFaultType" + } + ] + }, + "SeismicFaultLength": { + "type": "number", + "title": "Seismic Fault Length", + "description": "Maximum linear dimension measured along strike of the slip surface", + "x-osdu-frame-of-reference": "UOM:length" + }, + "SeismicFaultSurfaceArea": { + "type": "number", + "title": "Seismic Fault Surface Area", + "description": "Surface Area of the Fault Plane", + "x-osdu-frame-of-reference": "UOM:area" + }, + "VerticalFaultDipAngle": { + "type": "number", + "title": "Vertical Fault Dip Angle", + "description": "Maximum vertical angle of fault", + "x-osdu-frame-of-reference": "UOM:plane angle" + }, + "FaultHeaveNumber": { + "type": "number", + "title": "Fault Heave Number", + "description": "Maximum stratigraphic heave, the apparent horizontal component of the net-slip.", + "x-osdu-frame-of-reference": "UOM:" + }, + "FaultNetSlipNumber": { + "type": "number", + "title": "Fault Net Slip Number", + "description": "Net (average) Slip.", + "x-osdu-frame-of-reference": "UOM:length" + }, + "StratigraphicFaultOffset": { + "type": "number", + "title": "Stratigraphic Fault Offset", + "description": "Maximum vertical offset of faulted strata.", + "x-osdu-frame-of-reference": "UOM:" + }, + "Interpreter": { + "type": "string", + "title": "Interpreter", + "description": "The person or team who interpreted the fault data." + }, + "Role": { + "type": "string", + "title": "Representation Role", + "description": "The RepresentationRole assigned to this SeismicFault. Examples: FaultSticks, Pick, FaultCenterLine.", + "format": "uri-reference", + "example": "namespace:reference-data--RepresentationRole:FaultSticks:", + "pattern": "^[\\w\\-\\.]+:reference-data\\-\\-RepresentationRole:[\\w\\-\\.\\:\\%]+:[0-9]*$", + "x-osdu-relationship": [ + { + "GroupType": "reference-data", + "EntityType": "RepresentationRole" + } + ] + }, + "Type": { + "type": "string", + "title": "Representation Type", + "description": "The FaultSystem RepresentationType assigned to this SeismicFault. Examples: PolylineSet, TriangulatedSurface.", + "format": "uri-reference", + "example": "namespace:reference-data--RepresentationType:PolylineSet:", + "pattern": "^[\\w\\-\\.]+:reference-data\\-\\-RepresentationType:[\\w\\-\\.\\:\\%]+:[0-9]*$", + "x-osdu-relationship": [ + { + "GroupType": "reference-data", + "EntityType": "RepresentationType" + } + ] + } + }, + "title": "IndividualProperties" + }, + { + "type": "object", + "properties": { + "ExtensionProperties": { + "type": "object" + } + }, + "title": "ExtensionProperties" + } + ] + } + }, + "required": [ + "kind", + "acl", + "legal" + ], + "additionalProperties": false, + "x-osdu-review-status": "Accepted", + "x-osdu-supported-file-formats": [ + "RESQML", + "csv" + ], + "x-osdu-virtual-properties": { + "data.VirtualProperties.DefaultName": { + "type": "string", + "priority": [ + { + "path": "data.Name" + } + ] + }, + "data.VirtualProperties.DefaultLocation": { + "type": "object", + "priority": [ + { + "path": "data.SpatialArea" + }, + { + "path": "data.SpatialPoint" + } + ] + } + }, + "x-osdu-inheriting-from-kind": [ + { + "name": "WorkProductComponent", + "kind": "osdu:wks:AbstractWPCGroupType:1.0.0" + } + ] + } +} \ No newline at end of file diff --git a/deployments/shared-schemas/osdu/work-product-component/SeismicHorizon.1.1.0.json b/deployments/shared-schemas/osdu/work-product-component/SeismicHorizon.1.1.0.json new file mode 100644 index 00000000..e16b3b80 --- /dev/null +++ b/deployments/shared-schemas/osdu/work-product-component/SeismicHorizon.1.1.0.json @@ -0,0 +1,446 @@ +{ + "schemaInfo": { + "schemaIdentity": { + "authority": "{{schema-authority}}", + "source": "wks", + "entityType": "work-product-component--SeismicHorizon", + "schemaVersionMajor": 1, + "schemaVersionMinor": 1, + "schemaVersionPatch": 0, + "id": "{{schema-authority}}:wks:work-product-component--SeismicHorizon:1.1.0" + }, + "createdBy": "OSDU Data Definition Group", + "scope": "SHARED", + "status": "DEVELOPMENT" + }, + "schema": { + "x-osdu-license": "Copyright 2022, The Open Group \\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.", + "$id": "https://schema.osdu.opengroup.org/json/work-product-component/SeismicHorizon.1.1.0.json", + "$schema": "http://json-schema.org/draft-07/schema#", + "x-osdu-schema-source": "osdu:wks:work-product-component--SeismicHorizon:1.1.0", + "title": "SeismicHorizon", + "description": "A set of picks related to seismic processing geometry which define a surface. The geometry used is referenced by the Interpretation Project.", + "type": "object", + "properties": { + "id": { + "description": "Previously called ResourceID or SRN which identifies this OSDU resource object without version.", + "title": "Entity ID", + "type": "string", + "pattern": "^[\\w\\-\\.]+:work-product-component\\-\\-SeismicHorizon:[\\w\\-\\.\\:\\%]+$", + "example": "namespace:work-product-component--SeismicHorizon:a7a81843-9bea-5ce4-913c-f67e4ea154ff" + }, + "kind": { + "description": "The schema identification for the OSDU resource object following the pattern {Namespace}:{Source}:{Type}:{VersionMajor}.{VersionMinor}.{VersionPatch}. The versioning scheme follows the semantic versioning, https://semver.org/.", + "title": "Entity Kind", + "type": "string", + "pattern": "^[\\w\\-\\.]+:[\\w\\-\\.]+:[\\w\\-\\.]+:[0-9]+.[0-9]+.[0-9]+$", + "example": "osdu:wks:work-product-component--SeismicHorizon:1.1.0" + }, + "version": { + "description": "The version number of this OSDU resource; set by the framework.", + "title": "Version Number", + "type": "integer", + "format": "int64", + "example": 1562066009929332 + }, + "acl": { + "description": "The access control tags associated with this entity.", + "title": "Access Control List", + "$ref": "{{schema-authority}}:wks:AbstractAccessControlList:1.0.0" + }, + "legal": { + "description": "The entity's legal tags and compliance status. The actual contents associated with the legal tags is managed by the Compliance Service.", + "title": "Legal Tags", + "$ref": "{{schema-authority}}:wks:AbstractLegalTags:1.0.0" + }, + "tags": { + "title": "Tag Dictionary", + "description": "A generic dictionary of string keys mapping to string value. Only strings are permitted as keys and values.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "example": { + "NameOfKey": "String value" + } + }, + "createTime": { + "description": "Timestamp of the time at which initial version of this OSDU resource object was created. Set by the System. The value is a combined date-time string in ISO-8601 given in UTC.", + "title": "Resource Object Creation DateTime", + "type": "string", + "format": "date-time", + "example": "2020-12-16T11:46:20.163Z" + }, + "createUser": { + "title": "Resource Object Creation User Reference", + "description": "The user reference, which created the first version of this resource object. Set by the System.", + "type": "string", + "example": "some-user@some-company-cloud.com" + }, + "modifyTime": { + "description": "Timestamp of the time at which this version of the OSDU resource object was created. Set by the System. The value is a combined date-time string in ISO-8601 given in UTC.", + "title": "Resource Object Version Creation DateTime", + "type": "string", + "format": "date-time", + "example": "2020-12-16T11:52:24.477Z" + }, + "modifyUser": { + "title": "Resource Object Version Creation User Reference", + "description": "The user reference, which created this version of this resource object. Set by the System.", + "type": "string", + "example": "some-user@some-company-cloud.com" + }, + "ancestry": { + "description": "The links to data, which constitute the inputs, from which this record instance is derived.", + "title": "Ancestry", + "$ref": "{{schema-authority}}:wks:AbstractLegalParentList:1.0.0" + }, + "meta": { + "description": "The Frame of Reference meta data section linking the named properties to self-contained definitions.", + "title": "Frame of Reference Meta Data", + "type": "array", + "items": { + "$ref": "{{schema-authority}}:wks:AbstractMetaItem:1.0.0" + } + }, + "data": { + "allOf": [ + { + "$ref": "{{schema-authority}}:wks:AbstractCommonResources:1.0.0" + }, + { + "$ref": "{{schema-authority}}:wks:AbstractWPCGroupType:1.0.0" + }, + { + "$ref": "{{schema-authority}}:wks:AbstractWorkProductComponent:1.0.0" + }, + { + "$ref": "{{schema-authority}}:wks:AbstractRepresentation:1.0.0" + }, + { + "type": "object", + "properties": { + "Seismic3DInterpretationSetID": { + "type": "string", + "description": "For picks on 3D datasets, reference to the 3D interpretation set (not the application project nor an acquisition survey) that supported this interpretation. The seismic geometry (bin grid) needed to interpret the location references is inferred through the interpretation survey and no longer explicitly through this object. The WPC SpatialArea may reflect the survey area that has the horizon picked on it for shallow search purposes. Only this or Seismic2DInterpretationSetID may be used, but not both.", + "pattern": "^[\\w\\-\\.]+:master-data\\-\\-Seismic3DInterpretationSet:[\\w\\-\\.\\:\\%]+:[0-9]*$", + "x-osdu-relationship": [ + { + "GroupType": "master-data", + "EntityType": "Seismic3DInterpretationSet" + } + ] + }, + "Seismic2DInterpretationSetID": { + "type": "string", + "description": "For picks on 2D datasets, reference to the 2D interpretation set (not the application project nor an acquisition survey) that supported this interpretation. The seismic geometries (seismic line geometries) needed to interpret the location references are inferred through the interpretation survey. The WPC SpatialArea may reflect the lines that have the horizon picked on it for shallow search purposes. Only this or Seismic3DInterpretationSetID may be used, but not both.", + "pattern": "^[\\w\\-\\.]+:master-data\\-\\-Seismic2DInterpretationSet:[\\w\\-\\.\\:\\%]+:[0-9]*$", + "x-osdu-relationship": [ + { + "GroupType": "master-data", + "EntityType": "Seismic2DInterpretationSet" + } + ] + }, + "SeismicPickingTypeID": { + "type": "string", + "description": "Picking method used for horizon e.g. Primary seed pick (seed), Interpolated seed pick (int), Autotracked seed pick (aut), Mixed, etc.", + "pattern": "^[\\w\\-\\.]+:reference-data\\-\\-SeismicPickingType:[\\w\\-\\.\\:\\%]+:[0-9]*$", + "x-osdu-relationship": [ + { + "GroupType": "reference-data", + "EntityType": "SeismicPickingType" + } + ] + }, + "SeismicDomainTypeID": { + "type": "string", + "description": "Vertical domain of faults. E.g. Time, Depth", + "pattern": "^[\\w\\-\\.]+:reference-data\\-\\-SeismicDomainType:[\\w\\-\\.\\:\\%]+:[0-9]*$", + "x-osdu-relationship": [ + { + "GroupType": "reference-data", + "EntityType": "SeismicDomainType" + } + ] + }, + "SeismicDomainUOM": { + "type": "string", + "description": "Unit of measurement for vertical domain", + "pattern": "^[\\w\\-\\.]+:reference-data\\-\\-UnitOfMeasure:[\\w\\-\\.\\:\\%]+:[0-9]*$", + "x-osdu-relationship": [ + { + "GroupType": "reference-data", + "EntityType": "UnitOfMeasure" + } + ] + }, + "VerticalDatumOffset": { + "type": "number", + "description": "Vertical reference datum points are stored in.", + "x-osdu-frame-of-reference": "UOM:length" + }, + "VerticalMeasurementTypeID": { + "type": "string", + "description": "Identifies a vertical reference datum type. E.g. mean sea level, ground level, mudline.", + "pattern": "^[\\w\\-\\.]+:reference-data\\-\\-VerticalMeasurementType:[\\w\\-\\.\\:\\%]+:[0-9]*$", + "x-osdu-relationship": [ + { + "GroupType": "reference-data", + "EntityType": "VerticalMeasurementType" + } + ] + }, + "ReplacementVelocity": { + "type": "number", + "description": "Value used to produce vertical static shifts in data", + "x-osdu-frame-of-reference": "UOM:length per time" + }, + "SeismicHorizonTypeID": { + "type": "string", + "description": "e.g. Peak (pk), Trough (tr), Plus to Minus Zero Crossing, Minus to Plus Zero Crossing, Envelope (env), Not Applicable (na)", + "pattern": "^[\\w\\-\\.]+:reference-data\\-\\-SeismicHorizonType:[\\w\\-\\.\\:\\%]+:[0-9]*$", + "x-osdu-relationship": [ + { + "GroupType": "reference-data", + "EntityType": "SeismicHorizonType" + } + ] + }, + "GeologicalUnitName": { + "type": "string", + "description": "Geological Unit (formation, bioevent, etc.) Name" + }, + "GeologicalUnitAgeYear": { + "type": "string", + "description": "Age of Geologic unit (geochronological). Number expected but is a string type to be consistent with wellbore marker." + }, + "GeologicalUnitAgePeriod": { + "type": "string", + "description": "Age period of geologic unit (geochronological name of stage, etc.)" + }, + "PetroleumSystemElementTypeID": { + "type": "string", + "description": "A petroleum system element such as Reservoir, Source, Seal, etc.", + "pattern": "^[\\w\\-\\.]+:reference-data\\-\\-PetroleumSystemElementType:[\\w\\-\\.\\:\\%]+:[0-9]*$", + "x-osdu-relationship": [ + { + "GroupType": "reference-data", + "EntityType": "PetroleumSystemElementType" + } + ] + }, + "SeismicVelocityModelID": { + "type": "string", + "description": "Velocity model used in depth conversion", + "pattern": "^[\\w\\-\\.]+:work-product-component\\-\\-VelocityModeling:[\\w\\-\\.\\:\\%]+:[0-9]*$", + "x-osdu-relationship": [ + { + "GroupType": "work-product-component", + "EntityType": "VelocityModeling" + } + ] + }, + "SeismicAttributes": { + "type": "array", + "description": "Summary of measurements included with horizon in addition to depth attribute.", + "x-osdu-indexing": { + "type": "flattened" + }, + "items": { + "type": "object", + "title": "SeismicAttributes", + "description": "Summary of measurements included with horizon in addition to depth attribute.", + "properties": { + "SeismicAttributeTypeID": { + "type": "string", + "description": "The type of attribute value captured", + "pattern": "^[\\w\\-\\.]+:reference-data\\-\\-SeismicAttributeType:[\\w\\-\\.\\:\\%]+:[0-9]*$", + "x-osdu-relationship": [ + { + "GroupType": "reference-data", + "EntityType": "SeismicAttributeType" + } + ] + }, + "SeismicAttributeUOM": { + "type": "string", + "description": "Unit of Measurement for attribute", + "pattern": "^[\\w\\-\\.]+:reference-data\\-\\-UnitOfMeasure:[\\w\\-\\.\\:\\%]+:[0-9]*$", + "x-osdu-relationship": [ + { + "GroupType": "reference-data", + "EntityType": "UnitOfMeasure" + } + ] + }, + "SeismicAttributeMaxNumber": { + "type": "number", + "description": "Max value of attribute", + "x-osdu-frame-of-reference": "UOM_via_property:SeismicAttributeUOM" + }, + "SeismicAttributeMinNumber": { + "type": "number", + "description": "Min value of attribute", + "x-osdu-frame-of-reference": "UOM_via_property:SeismicAttributeUOM" + }, + "SeismicAttributeMeanNumber": { + "type": "number", + "description": "Mean value of attribute", + "x-osdu-frame-of-reference": "UOM_via_property:SeismicAttributeUOM" + } + } + } + }, + "BinGridCoveragePercent": { + "type": "number", + "description": "Portion of bin grid covered by picked surface expressed in percent." + }, + "InlineMin": { + "type": "number", + "description": "Smallest inline picked in surface." + }, + "InlineMax": { + "type": "number", + "description": "Largest inline picked in surface." + }, + "CrosslineMin": { + "type": "number", + "description": "Smallest crossline picked in surface." + }, + "CrosslineMax": { + "type": "number", + "description": "Largest crossline picked in surface." + }, + "Remark": { + "type": "string", + "description": "Optional comment providing thoughts from the interpreter. Description is to provide a general explanation of the horizon." + }, + "Interpreter": { + "type": "string", + "description": "The person or team who interpreted the fault data." + }, + "SeismicTraceDataID": { + "type": "array", + "description": "Seismic Volumes picked against. Only applies to 3D.", + "items": { + "type": "string", + "pattern": "^[\\w\\-\\.]+:work-product-component\\-\\-SeismicTraceData:[\\w\\-\\.\\:\\%]+:[0-9]*$", + "x-osdu-relationship": [ + { + "GroupType": "work-product-component", + "EntityType": "SeismicTraceData" + } + ] + } + }, + "BinGridID": { + "type": "string", + "title": "Bin Grid ID", + "description": "The explicit bin grid geometry for this horizon overriding the geometry defined by the parent Seismic3DInterpretationSet. If empty and Seismic3DInterpretationSetID is populated, the Seismic3DInterpretationSet.SeismicBinGridID applies.", + "pattern": "^[\\w\\-\\.]+:work-product-component\\-\\-SeismicBinGrid:[\\w\\-\\.\\:\\%]+:[0-9]*$", + "x-osdu-relationship": [ + { + "GroupType": "work-product-component", + "EntityType": "SeismicBinGrid" + } + ] + }, + "SeismicLineGeometryIDs": { + "type": "array", + "title": "Seismic Line Geometry IDs", + "description": "The list of explicit 2D seismic line geometries overriding any definitions inferred from Seismic2DInterpretationSet. If empty and Seismic2DInterpretationSetID is populated, Seismic2DInterpretationSet.SeismicLineGeometries[].SeismicLineGeometryID apply.", + "items": { + "type": "string", + "pattern": "^[\\w\\-\\.]+:work-product-component\\-\\-SeismicLineGeometry:[\\w\\-\\.\\:\\%]+:[0-9]*$", + "x-osdu-relationship": [ + { + "GroupType": "work-product-component", + "EntityType": "SeismicLineGeometry" + } + ] + } + }, + "Role": { + "type": "string", + "title": "Representation Role", + "description": "The RepresentationRole assigned to this SeismicHorizon. Examples: Pick, Map.", + "format": "uri-reference", + "example": "namespace:reference-data--RepresentationRole:Pick:", + "pattern": "^[\\w\\-\\.]+:reference-data\\-\\-RepresentationRole:[\\w\\-\\.\\:\\%]+:[0-9]*$", + "x-osdu-relationship": [ + { + "GroupType": "reference-data", + "EntityType": "RepresentationRole" + } + ] + }, + "Type": { + "type": "string", + "title": "Representation Type", + "description": "The RepresentationType for this SeismicHorizon. Examples: PointSet, PolylineSet, Regular2DGrid, Irregular2DGrid, TriangulatedSurface.", + "format": "uri-reference", + "example": "namespace:reference-data--RepresentationType:Regular2DGrid:", + "pattern": "^[\\w\\-\\.]+:reference-data\\-\\-RepresentationType:[\\w\\-\\.\\:\\%]+:[0-9]*$", + "x-osdu-relationship": [ + { + "GroupType": "reference-data", + "EntityType": "RepresentationType" + } + ] + } + }, + "title": "IndividualProperties" + }, + { + "type": "object", + "properties": { + "ExtensionProperties": { + "type": "object" + } + }, + "title": "ExtensionProperties" + } + ] + } + }, + "required": [ + "kind", + "acl", + "legal" + ], + "additionalProperties": false, + "x-osdu-review-status": "Accepted", + "x-osdu-supported-file-formats": [ + "RESQML", + "csv" + ], + "x-osdu-virtual-properties": { + "data.VirtualProperties.DefaultLocation": { + "type": "object", + "priority": [ + { + "path": "data.SpatialArea" + }, + { + "path": "data.SpatialPoint" + } + ] + }, + "data.VirtualProperties.DefaultName": { + "type": "string", + "priority": [ + { + "path": "data.Name" + } + ] + } + }, + "x-osdu-inheriting-from-kind": [ + { + "name": "WorkProductComponent", + "kind": "osdu:wks:AbstractWPCGroupType:1.0.0" + } + ] + } +} \ No newline at end of file diff --git a/deployments/shared-schemas/osdu/work-product-component/StratigraphicColumnRankInterpretation.1.1.0.json b/deployments/shared-schemas/osdu/work-product-component/StratigraphicColumnRankInterpretation.1.1.0.json new file mode 100644 index 00000000..73ba80a9 --- /dev/null +++ b/deployments/shared-schemas/osdu/work-product-component/StratigraphicColumnRankInterpretation.1.1.0.json @@ -0,0 +1,260 @@ +{ + "schemaInfo": { + "schemaIdentity": { + "authority": "{{schema-authority}}", + "source": "wks", + "entityType": "work-product-component--StratigraphicColumnRankInterpretation", + "schemaVersionMajor": 1, + "schemaVersionMinor": 1, + "schemaVersionPatch": 0, + "id": "{{schema-authority}}:wks:work-product-component--StratigraphicColumnRankInterpretation:1.1.0" + }, + "createdBy": "OSDU Data Definition Group", + "scope": "SHARED", + "status": "DEVELOPMENT" + }, + "schema": { + "x-osdu-license": "Copyright 2022, The Open Group \\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.", + "$id": "https://schema.osdu.opengroup.org/json/work-product-component/StratigraphicColumnRankInterpretation.1.1.0.json", + "$schema": "http://json-schema.org/draft-07/schema#", + "x-osdu-schema-source": "osdu:wks:work-product-component--StratigraphicColumnRankInterpretation:1.1.0", + "title": "StratigraphicColumnRankInterpretation", + "description": "A global hierarchy containing an ordered list of stratigraphic unit interpretations", + "type": "object", + "properties": { + "id": { + "description": "Previously called ResourceID or SRN which identifies this OSDU resource object without version.", + "title": "Entity ID", + "type": "string", + "pattern": "^[\\w\\-\\.]+:work-product-component\\-\\-StratigraphicColumnRankInterpretation:[\\w\\-\\.\\:\\%]+$", + "example": "namespace:work-product-component--StratigraphicColumnRankInterpretation:a86f0c8d-45e9-5128-a383-c1a002ee22be" + }, + "kind": { + "description": "The schema identification for the OSDU resource object following the pattern {Namespace}:{Source}:{Type}:{VersionMajor}.{VersionMinor}.{VersionPatch}. The versioning scheme follows the semantic versioning, https://semver.org/.", + "title": "Entity Kind", + "type": "string", + "pattern": "^[\\w\\-\\.]+:[\\w\\-\\.]+:[\\w\\-\\.]+:[0-9]+.[0-9]+.[0-9]+$", + "example": "osdu:wks:work-product-component--StratigraphicColumnRankInterpretation:1.1.0" + }, + "version": { + "description": "The version number of this OSDU resource; set by the framework.", + "title": "Version Number", + "type": "integer", + "format": "int64", + "example": 1562066009929332 + }, + "acl": { + "description": "The access control tags associated with this entity.", + "title": "Access Control List", + "$ref": "{{schema-authority}}:wks:AbstractAccessControlList:1.0.0" + }, + "legal": { + "description": "The entity's legal tags and compliance status. The actual contents associated with the legal tags is managed by the Compliance Service.", + "title": "Legal Tags", + "$ref": "{{schema-authority}}:wks:AbstractLegalTags:1.0.0" + }, + "tags": { + "title": "Tag Dictionary", + "description": "A generic dictionary of string keys mapping to string value. Only strings are permitted as keys and values.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "example": { + "NameOfKey": "String value" + } + }, + "createTime": { + "description": "Timestamp of the time at which initial version of this OSDU resource object was created. Set by the System. The value is a combined date-time string in ISO-8601 given in UTC.", + "title": "Resource Object Creation DateTime", + "type": "string", + "format": "date-time", + "example": "2020-12-16T11:46:20.163Z" + }, + "createUser": { + "title": "Resource Object Creation User Reference", + "description": "The user reference, which created the first version of this resource object. Set by the System.", + "type": "string", + "example": "some-user@some-company-cloud.com" + }, + "modifyTime": { + "description": "Timestamp of the time at which this version of the OSDU resource object was created. Set by the System. The value is a combined date-time string in ISO-8601 given in UTC.", + "title": "Resource Object Version Creation DateTime", + "type": "string", + "format": "date-time", + "example": "2020-12-16T11:52:24.477Z" + }, + "modifyUser": { + "title": "Resource Object Version Creation User Reference", + "description": "The user reference, which created this version of this resource object. Set by the System.", + "type": "string", + "example": "some-user@some-company-cloud.com" + }, + "ancestry": { + "description": "The links to data, which constitute the inputs, from which this record instance is derived.", + "title": "Ancestry", + "$ref": "{{schema-authority}}:wks:AbstractLegalParentList:1.0.0" + }, + "meta": { + "description": "The Frame of Reference meta data section linking the named properties to self-contained definitions.", + "title": "Frame of Reference Meta Data", + "type": "array", + "items": { + "$ref": "{{schema-authority}}:wks:AbstractMetaItem:1.0.0" + } + }, + "data": { + "allOf": [ + { + "$ref": "{{schema-authority}}:wks:AbstractCommonResources:1.0.0" + }, + { + "$ref": "{{schema-authority}}:wks:AbstractWPCGroupType:1.0.0" + }, + { + "$ref": "{{schema-authority}}:wks:AbstractWorkProductComponent:1.0.0" + }, + { + "$ref": "{{schema-authority}}:wks:AbstractInterpretation:1.0.0" + }, + { + "type": "object", + "properties": { + "StratigraphicRoleType": { + "type": "string", + "title": "StratigraphicRoleType", + "description": "Geological concept used to produce the type, i.e. lithostratigraphy", + "format": "uri-reference", + "example": "namespace:reference-data--StratigraphicRoleType:Lithostratigraphy:", + "pattern": "^[\\w\\-\\.]+:reference-data\\-\\-StratigraphicRoleType:[\\w\\-\\.\\:\\%]+:[0-9]*$", + "x-osdu-relationship": [ + { + "GroupType": "reference-data", + "EntityType": "StratigraphicRoleType" + } + ] + }, + "StratigraphicColumnRankUnitType": { + "type": "string", + "title": "StratigraphicColumnRankUnitType", + "description": "Type of all stratigraphic units in this rank, i.e. Erathem", + "format": "uri-reference", + "example": "namespace:reference-data--StratigraphicColumnRankUnitType:Erathem:", + "pattern": "^[\\w\\-\\.]+:reference-data\\-\\-StratigraphicColumnRankUnitType:[\\w\\-\\.\\:\\%]+:[0-9]*$", + "x-osdu-relationship": [ + { + "GroupType": "reference-data", + "EntityType": "StratigraphicColumnRankUnitType" + } + ] + }, + "StratigraphicUnitInterpretationSet": { + "type": "array", + "title": "Stratigraphic Unit Interpretation Set", + "description": "Array of Stratigraphic Unit Interpretations the StratigraphicColumnRank is composed of. Units are ordered by ascending age or apparent depth. Only one of ChronoStratigraphySet or StratigraphicUnitInterpretationSet must be populated, never both.", + "example": [ + "namespace:work-product-component--StratigraphicUnitInterpretation:90008741-3433-406B-9189-22B298C3E2D2:", + "namespace:work-product-component--StratigraphicUnitInterpretation:11008888-3433-406B-9189-33B298F3E2D4:" + ], + "items": { + "type": "string", + "pattern": "^[\\w\\-\\.]+:work-product-component\\-\\-StratigraphicUnitInterpretation:[\\w\\-\\.\\:\\%]+:[0-9]*$", + "x-osdu-relationship": [ + { + "GroupType": "work-product-component", + "EntityType": "StratigraphicUnitInterpretation" + } + ] + } + }, + "ChronoStratigraphySet": { + "type": "array", + "title": "Chrono-Stratigraphy Set", + "description": "A set of references to ChronoStratigraphy reference data, which belong to the same StratigraphicColumnRankUnitType, e.g. \"namespace:reference-data--StratigraphicColumnRankUnitType:Chronostratigraphic.System:\" Only one of ChronoStratigraphySet or StratigraphicUnitInterpretationSet must be populated, never both.", + "example": [ + "namespace:reference-data--ChronoStratigraphy:Phanerozoic.Mesozoic.Cretaceous.UpperCretaceous:", + "namespace:reference-data--ChronoStratigraphy:Phanerozoic.Mesozoic.Cretaceous.LowerCretaceous:", + "namespace:reference-data--ChronoStratigraphy:Phanerozoic.Mesozoic.Jurassic.UpperJurassic:" + ], + "items": { + "type": "string", + "pattern": "^[\\w\\-\\.]+:reference-data\\-\\-ChronoStratigraphy:[\\w\\-\\.\\:\\%]+:[0-9]*$", + "x-osdu-relationship": [ + { + "GroupType": "reference-data", + "EntityType": "ChronoStratigraphy" + } + ] + } + }, + "SequenceStratigraphicSchemaType": { + "type": "string", + "title": "SequenceStratigraphicSchemaType", + "description": "Valid if Stratigraphic role type is set to Chronostratigraphic ex.: GeneticSequence", + "format": "uri-reference", + "example": "namespace:reference-data--SequenceStratigraphicSchemaType:DepositionalSequence2:", + "pattern": "^[\\w\\-\\.]+:reference-data\\-\\-SequenceStratigraphicSchemaType:[\\w\\-\\.\\:\\%]+:[0-9]*$", + "x-osdu-relationship": [ + { + "GroupType": "reference-data", + "EntityType": "SequenceStratigraphicSchemaType" + } + ] + } + }, + "title": "IndividualProperties" + }, + { + "type": "object", + "properties": { + "ExtensionProperties": { + "type": "object" + } + }, + "title": "ExtensionProperties" + } + ] + } + }, + "required": [ + "kind", + "acl", + "legal" + ], + "additionalProperties": false, + "x-osdu-review-status": "Accepted", + "x-osdu-supported-file-formats": [ + "RESQML" + ], + "x-osdu-governance-authorities": [ + "OSDU" + ], + "x-osdu-virtual-properties": { + "data.VirtualProperties.DefaultLocation": { + "type": "object", + "priority": [ + { + "path": "data.SpatialArea" + }, + { + "path": "data.SpatialPoint" + } + ] + }, + "data.VirtualProperties.DefaultName": { + "type": "string", + "priority": [ + { + "path": "data.Name" + } + ] + } + }, + "x-osdu-inheriting-from-kind": [ + { + "name": "WorkProductComponent", + "kind": "osdu:wks:AbstractWPCGroupType:1.0.0" + } + ] + } +} \ No newline at end of file diff --git a/deployments/shared-schemas/osdu/work-product-component/UnsealedSurfaceFramework.1.1.0.json b/deployments/shared-schemas/osdu/work-product-component/UnsealedSurfaceFramework.1.1.0.json new file mode 100644 index 00000000..9b4e72bf --- /dev/null +++ b/deployments/shared-schemas/osdu/work-product-component/UnsealedSurfaceFramework.1.1.0.json @@ -0,0 +1,254 @@ +{ + "schemaInfo": { + "schemaIdentity": { + "authority": "{{schema-authority}}", + "source": "wks", + "entityType": "work-product-component--UnsealedSurfaceFramework", + "schemaVersionMajor": 1, + "schemaVersionMinor": 1, + "schemaVersionPatch": 0, + "id": "{{schema-authority}}:wks:work-product-component--UnsealedSurfaceFramework:1.1.0" + }, + "createdBy": "OSDU Data Definition Group", + "scope": "SHARED", + "status": "DEVELOPMENT" + }, + "schema": { + "x-osdu-license": "Copyright 2022, The Open Group \\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.", + "$id": "https://schema.osdu.opengroup.org/json/work-product-component/UnsealedSurfaceFramework.1.1.0.json", + "$schema": "http://json-schema.org/draft-07/schema#", + "x-osdu-schema-source": "osdu:wks:work-product-component--UnsealedSurfaceFramework:1.1.0", + "title": "UnsealedSurfaceFramework", + "description": "Unsealed structural model representations associated to geometric elements such as faults, horizons, and intrusions on a scale of meters to kilometers.", + "type": "object", + "properties": { + "id": { + "description": "Previously called ResourceID or SRN which identifies this OSDU resource object without version.", + "title": "Entity ID", + "type": "string", + "pattern": "^[\\w\\-\\.]+:work-product-component\\-\\-UnsealedSurfaceFramework:[\\w\\-\\.\\:\\%]+$", + "example": "namespace:work-product-component--UnsealedSurfaceFramework:d61be9b4-d2d8-534d-a4ef-ed531d195459" + }, + "kind": { + "description": "The schema identification for the OSDU resource object following the pattern {Namespace}:{Source}:{Type}:{VersionMajor}.{VersionMinor}.{VersionPatch}. The versioning scheme follows the semantic versioning, https://semver.org/.", + "title": "Entity Kind", + "type": "string", + "pattern": "^[\\w\\-\\.]+:[\\w\\-\\.]+:[\\w\\-\\.]+:[0-9]+.[0-9]+.[0-9]+$", + "example": "osdu:wks:work-product-component--UnsealedSurfaceFramework:1.1.0" + }, + "version": { + "description": "The version number of this OSDU resource; set by the framework.", + "title": "Version Number", + "type": "integer", + "format": "int64", + "example": 1562066009929332 + }, + "acl": { + "description": "The access control tags associated with this entity.", + "title": "Access Control List", + "$ref": "{{schema-authority}}:wks:AbstractAccessControlList:1.0.0" + }, + "legal": { + "description": "The entity's legal tags and compliance status. The actual contents associated with the legal tags is managed by the Compliance Service.", + "title": "Legal Tags", + "$ref": "{{schema-authority}}:wks:AbstractLegalTags:1.0.0" + }, + "tags": { + "title": "Tag Dictionary", + "description": "A generic dictionary of string keys mapping to string value. Only strings are permitted as keys and values.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "example": { + "NameOfKey": "String value" + } + }, + "createTime": { + "description": "Timestamp of the time at which initial version of this OSDU resource object was created. Set by the System. The value is a combined date-time string in ISO-8601 given in UTC.", + "title": "Resource Object Creation DateTime", + "type": "string", + "format": "date-time", + "example": "2020-12-16T11:46:20.163Z" + }, + "createUser": { + "title": "Resource Object Creation User Reference", + "description": "The user reference, which created the first version of this resource object. Set by the System.", + "type": "string", + "example": "some-user@some-company-cloud.com" + }, + "modifyTime": { + "description": "Timestamp of the time at which this version of the OSDU resource object was created. Set by the System. The value is a combined date-time string in ISO-8601 given in UTC.", + "title": "Resource Object Version Creation DateTime", + "type": "string", + "format": "date-time", + "example": "2020-12-16T11:52:24.477Z" + }, + "modifyUser": { + "title": "Resource Object Version Creation User Reference", + "description": "The user reference, which created this version of this resource object. Set by the System.", + "type": "string", + "example": "some-user@some-company-cloud.com" + }, + "ancestry": { + "description": "The links to data, which constitute the inputs, from which this record instance is derived.", + "title": "Ancestry", + "$ref": "{{schema-authority}}:wks:AbstractLegalParentList:1.0.0" + }, + "meta": { + "description": "The Frame of Reference meta data section linking the named properties to self-contained definitions.", + "title": "Frame of Reference Meta Data", + "type": "array", + "items": { + "$ref": "{{schema-authority}}:wks:AbstractMetaItem:1.0.0" + } + }, + "data": { + "allOf": [ + { + "$ref": "{{schema-authority}}:wks:AbstractCommonResources:1.0.0" + }, + { + "$ref": "{{schema-authority}}:wks:AbstractWPCGroupType:1.0.0" + }, + { + "$ref": "{{schema-authority}}:wks:AbstractWorkProductComponent:1.0.0" + }, + { + "$ref": "{{schema-authority}}:wks:AbstractRepresentation:1.0.0" + }, + { + "type": "object", + "properties": { + "InterpretationID": { + "type": "string", + "title": "ID of the interpretation", + "description": "The reference to the StructuralOrganizationInterpretation this framework belongs to.", + "pattern": "^[\\w\\-\\.]+:work-product-component\\-\\-StructuralOrganizationInterpretation:[\\w\\-\\.\\:\\%]+:[0-9]*$", + "x-osdu-relationship": [ + { + "GroupType": "work-product-component", + "EntityType": "StructuralOrganizationInterpretation" + } + ] + }, + "GenericRepresentationIDs": { + "type": "array", + "title": "Generic Representation IDs", + "description": "List of Generic Representations linked to structural model inputs and outputs, for example fault sticks and triangulated surfaces, Horizon data points and triangulated surfaces, geobody boundary triangulated surfaces.", + "items": { + "type": "string", + "pattern": "^[\\w\\-\\.]+:work-product-component\\-\\-GenericRepresentation:[\\w\\-\\.\\:\\%]+:[0-9]*$", + "x-osdu-relationship": [ + { + "GroupType": "work-product-component", + "EntityType": "GenericRepresentation" + } + ] + } + }, + "SeismicHorizonIDs": { + "type": "array", + "title": "Seismic Horizon IDs", + "description": "List of SeismicHorizons part of structural model inputs.", + "items": { + "type": "string", + "pattern": "^[\\w\\-\\.]+:work-product-component\\-\\-SeismicHorizon:[\\w\\-\\.\\:\\%]+:[0-9]*$", + "x-osdu-relationship": [ + { + "GroupType": "work-product-component", + "EntityType": "SeismicHorizon" + } + ] + } + }, + "SeismicFaultIDs": { + "type": "array", + "title": "Seismic Fault IDs", + "description": "List of individual SeismicFault representations contributing to this structural model. Alternatively FaultSystem can be used as single coherent set of fault representation. Only one property is expected to be populated, either SeismicFaultIDs or FaultSystem.", + "items": { + "type": "string", + "pattern": "^[\\w\\-\\.]+:work-product-component\\-\\-SeismicFault:[\\w\\-\\.\\:\\%]+:[0-9]*$", + "x-osdu-relationship": [ + { + "GroupType": "work-product-component", + "EntityType": "SeismicFault" + } + ] + } + }, + "FaultSystemID": { + "type": "string", + "title": "Fault System ID", + "description": "An alternative, coherent set of fault representations under one work-product-component. Only one property is expected to be populated, either FaultSystem or SeismicFaultIDs.", + "pattern": "^[\\w\\-\\.]+:work-product-component\\-\\-FaultSystem:[\\w\\-\\.\\:\\%]+:[0-9]*$", + "x-osdu-relationship": [ + { + "GroupType": "work-product-component", + "EntityType": "FaultSystem" + } + ] + }, + "MarkerSetCollectionID": { + "type": "string", + "title": "Marker Set Collection ID", + "description": "List of marker set where horizon, fault and geo-boundary markers from different wellbores (potentially the result of a query) are used as input for the structural model.", + "pattern": "^[\\w\\-\\.]+:work-product-component\\-\\-PersistedCollection:[\\w\\-\\.\\:\\%]+:[0-9]*$", + "x-osdu-relationship": [ + { + "GroupType": "work-product-component", + "EntityType": "PersistedCollection" + } + ] + } + }, + "title": "IndividualProperties" + }, + { + "type": "object", + "properties": { + "ExtensionProperties": { + "type": "object" + } + }, + "title": "ExtensionProperties" + } + ] + } + }, + "required": [ + "kind", + "acl", + "legal" + ], + "additionalProperties": false, + "x-osdu-review-status": "Accepted", + "x-osdu-virtual-properties": { + "data.VirtualProperties.DefaultLocation": { + "type": "object", + "priority": [ + { + "path": "data.SpatialArea" + }, + { + "path": "data.SpatialPoint" + } + ] + }, + "data.VirtualProperties.DefaultName": { + "type": "string", + "priority": [ + { + "path": "data.Name" + } + ] + } + }, + "x-osdu-inheriting-from-kind": [ + { + "name": "WorkProductComponent", + "kind": "osdu:wks:AbstractWPCGroupType:1.0.0" + } + ] + } +} \ No newline at end of file diff --git a/deployments/shared-schemas/osdu/work-product-component/WellLog.1.2.0.json b/deployments/shared-schemas/osdu/work-product-component/WellLog.1.2.0.json new file mode 100644 index 00000000..c2fb22d9 --- /dev/null +++ b/deployments/shared-schemas/osdu/work-product-component/WellLog.1.2.0.json @@ -0,0 +1,534 @@ +{ + "schemaInfo": { + "schemaIdentity": { + "authority": "{{schema-authority}}", + "source": "wks", + "entityType": "work-product-component--WellLog", + "schemaVersionMajor": 1, + "schemaVersionMinor": 2, + "schemaVersionPatch": 0, + "id": "{{schema-authority}}:wks:work-product-component--WellLog:1.2.0" + }, + "createdBy": "OSDU Data Definition Group", + "scope": "SHARED", + "status": "DEVELOPMENT" + }, + "schema": { + "x-osdu-license": "Copyright 2022, The Open Group \\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.", + "$id": "https://schema.osdu.opengroup.org/json/work-product-component/WellLog.1.2.0.json", + "$schema": "http://json-schema.org/draft-07/schema#", + "x-osdu-schema-source": "osdu:wks:work-product-component--WellLog:1.2.0", + "title": "WellLog", + "description": "A well log is a data type that correlates a particular measurement or multiple measurements in a wellbore against depth and/or time within that wellbore. When plotted visually, well logs are typically long line graphs (called \"curves\") but may sometimes be discrete points or intervals. This schema object is intended for digital well logs, not raster log files or raster calibration files, but may be used for the latter in the absence of a defined OSDU schema for these use cases.", + "type": "object", + "properties": { + "id": { + "description": "Previously called ResourceID or SRN which identifies this OSDU resource object without version.", + "title": "Entity ID", + "type": "string", + "pattern": "^[\\w\\-\\.]+:work-product-component\\-\\-WellLog:[\\w\\-\\.\\:\\%]+$", + "example": "namespace:work-product-component--WellLog:c2c79f1c-90ca-5c92-b8df-04dbe438f414" + }, + "kind": { + "description": "The schema identification for the OSDU resource object following the pattern {Namespace}:{Source}:{Type}:{VersionMajor}.{VersionMinor}.{VersionPatch}. The versioning scheme follows the semantic versioning, https://semver.org/.", + "title": "Entity Kind", + "type": "string", + "pattern": "^[\\w\\-\\.]+:[\\w\\-\\.]+:[\\w\\-\\.]+:[0-9]+.[0-9]+.[0-9]+$", + "example": "osdu:wks:work-product-component--WellLog:1.2.0" + }, + "version": { + "description": "The version number of this OSDU resource; set by the framework.", + "title": "Version Number", + "type": "integer", + "format": "int64", + "example": 1562066009929332 + }, + "acl": { + "description": "The access control tags associated with this entity.", + "title": "Access Control List", + "$ref": "{{schema-authority}}:wks:AbstractAccessControlList:1.0.0" + }, + "legal": { + "description": "The entity's legal tags and compliance status. The actual contents associated with the legal tags is managed by the Compliance Service.", + "title": "Legal Tags", + "$ref": "{{schema-authority}}:wks:AbstractLegalTags:1.0.0" + }, + "tags": { + "title": "Tag Dictionary", + "description": "A generic dictionary of string keys mapping to string value. Only strings are permitted as keys and values.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "example": { + "NameOfKey": "String value" + } + }, + "createTime": { + "description": "Timestamp of the time at which initial version of this OSDU resource object was created. Set by the System. The value is a combined date-time string in ISO-8601 given in UTC.", + "title": "Resource Object Creation DateTime", + "type": "string", + "format": "date-time", + "example": "2020-12-16T11:46:20.163Z" + }, + "createUser": { + "title": "Resource Object Creation User Reference", + "description": "The user reference, which created the first version of this resource object. Set by the System.", + "type": "string", + "example": "some-user@some-company-cloud.com" + }, + "modifyTime": { + "description": "Timestamp of the time at which this version of the OSDU resource object was created. Set by the System. The value is a combined date-time string in ISO-8601 given in UTC.", + "title": "Resource Object Version Creation DateTime", + "type": "string", + "format": "date-time", + "example": "2020-12-16T11:52:24.477Z" + }, + "modifyUser": { + "title": "Resource Object Version Creation User Reference", + "description": "The user reference, which created this version of this resource object. Set by the System.", + "type": "string", + "example": "some-user@some-company-cloud.com" + }, + "ancestry": { + "description": "The links to data, which constitute the inputs, from which this record instance is derived.", + "title": "Ancestry", + "$ref": "{{schema-authority}}:wks:AbstractLegalParentList:1.0.0" + }, + "meta": { + "description": "The Frame of Reference meta data section linking the named properties to self-contained definitions.", + "title": "Frame of Reference Meta Data", + "type": "array", + "items": { + "$ref": "{{schema-authority}}:wks:AbstractMetaItem:1.0.0" + } + }, + "data": { + "allOf": [ + { + "$ref": "{{schema-authority}}:wks:AbstractCommonResources:1.0.0" + }, + { + "$ref": "{{schema-authority}}:wks:AbstractWPCGroupType:1.0.0" + }, + { + "$ref": "{{schema-authority}}:wks:AbstractWorkProductComponent:1.0.0" + }, + { + "type": "object", + "properties": { + "WellboreID": { + "type": "string", + "description": "The Wellbore where the Well Log Work Product Component was recorded", + "pattern": "^[\\w\\-\\.]+:master-data\\-\\-Wellbore:[\\w\\-\\.\\:\\%]+:[0-9]*$", + "x-osdu-relationship": [ + { + "GroupType": "master-data", + "EntityType": "Wellbore" + } + ] + }, + "WellLogTypeID": { + "type": "string", + "description": "Well Log Type short Description such as Raw; Evaluated; Composite;....", + "pattern": "^[\\w\\-\\.]+:reference-data\\-\\-LogType:[\\w\\-\\.\\:\\%]+:[0-9]*$", + "x-osdu-relationship": [ + { + "GroupType": "reference-data", + "EntityType": "LogType" + } + ] + }, + "TopMeasuredDepth": { + "type": "number", + "title": "Top Measured Depth", + "description": "Informational Top Measured Depth of the Well Log. Always populate SamplingStart and SamplingStop, which represents the real sampling of the WellLog, including non-depth sampling.", + "x-osdu-frame-of-reference": "UOM:length" + }, + "BottomMeasuredDepth": { + "type": "number", + "title": "Bottom Measured Depth", + "description": "Informational Bottom Measured Depth of the Well Log. Always populate SamplingStart and SamplingStop, which represents the real sampling of the WellLog, including non-depth sampling.", + "x-osdu-frame-of-reference": "UOM:length" + }, + "ServiceCompanyID": { + "type": "string", + "description": "The relationship to a Service Company, typically the producer or logging contractor.", + "pattern": "^[\\w\\-\\.]+:master-data\\-\\-Organisation:[\\w\\-\\.\\:\\%]+:[0-9]*$", + "x-osdu-relationship": [ + { + "GroupType": "master-data", + "EntityType": "Organisation" + } + ] + }, + "LogSource": { + "type": "string", + "description": "OSDU Native Log Source - will be updated for later releases - not to be used yet" + }, + "LogActivity": { + "type": "string", + "description": "Log Activity, used to describe the type of pass such as Calibration Pass - Main Pass - Repeated Pass" + }, + "LogRun": { + "type": "string", + "description": "Log Run - describe the run of the log - can be a number, but may be also a alphanumeric description such as a version name" + }, + "LogVersion": { + "type": "string", + "description": "Log Version" + }, + "LoggingService": { + "type": "string", + "description": "Logging Service - mainly a short concatenation of the names of the tools" + }, + "LogServiceDateInterval": { + "type": "object", + "description": "An interval built from two nested values : StartDate and EndDate. It applies to the whole log services and may apply to composite logs as [start of the first run job] and [end of the last run job]Log Service Date", + "title": "LogServiceDateInterval", + "properties": { + "StartDate": { + "type": "string", + "format": "date-time" + }, + "EndDate": { + "type": "string", + "format": "date-time" + } + } + }, + "ToolStringDescription": { + "type": "string", + "description": "Tool String Description - a long concatenation of the tools used for logging services such as GammaRay+NeutronPorosity" + }, + "LoggingDirection": { + "type": "string", + "description": "Specifies whether curves were collected downward or upward" + }, + "PassNumber": { + "type": "integer", + "description": "Indicates if the Pass is the Main one (1) or a repeated one - and it's level repetition" + }, + "ActivityType": { + "type": "string", + "description": "General method or circumstance of logging - MWD, completion, ..." + }, + "DrillingFluidProperty": { + "type": "string", + "description": "Type of mud at time of logging (oil, water based,...)" + }, + "HoleTypeLogging": { + "type": "string", + "description": "Description of the hole related type of logging - POSSIBLE VALUE : OpenHole / CasedHole / CementedHole", + "pattern": "^OPENHOLE|CASEDHOLE|CEMENTEDHOLE$" + }, + "VerticalMeasurementID": { + "type": "string", + "description": "DEPRECATED: Use data.VerticalMeasurement.VerticalReferenceID instead. References an entry in the Vertical Measurement array for the Wellbore identified by WellboreID, which defines the vertical reference datum for all curve measured depths. Either VerticalMeasurementID or VerticalMeasurement are populated." + }, + "VerticalMeasurement": { + "$ref": "{{schema-authority}}:wks:AbstractFacilityVerticalMeasurement:1.0.0", + "description": "The vertical measurement reference for the log curves, which defines the vertical reference datum for the logged depths. Either VerticalMeasurement or VerticalMeasurementID are populated." + }, + "Curves": { + "type": "array", + "x-osdu-indexing": { + "type": "nested" + }, + "items": { + "type": "object", + "title": "Curves", + "properties": { + "CurveID": { + "type": "string", + "description": "The ID of the Well Log Curve" + }, + "DateStamp": { + "type": "string", + "description": "Date curve was created in the database", + "format": "date-time", + "x-osdu-frame-of-reference": "DateTime" + }, + "CurveVersion": { + "type": "string", + "description": "The Version of the Log Curve." + }, + "CurveQuality": { + "type": "string", + "description": "The Quality of the Log Curve." + }, + "InterpreterName": { + "type": "string", + "description": "The name of person who interpreted this Log Curve." + }, + "IsProcessed": { + "type": "boolean", + "description": "Indicates if the curve has been (pre)processed or if it is a raw recording" + }, + "NullValue": { + "type": "boolean", + "description": "Indicates that there is no measurement within the curve" + }, + "DepthCoding": { + "type": "string", + "description": "DEPRECATED: Replaced by boolean data.IsRegular. The Coding of the depth.", + "pattern": "^REGULAR|DISCRETE$" + }, + "Interpolate": { + "type": "boolean", + "description": "Whether curve can be interpolated or not" + }, + "TopDepth": { + "type": "number", + "description": "The curve's minimum 'depth', i.e., the reference value at which the curve has its first non-absent value. The curve may contain further absent values in between TopDepth and BaseDepth. Note that the SamplingDomainType may not be a depth as the property name indicates.", + "x-osdu-frame-of-reference": "UOM_via_property:DepthUnit" + }, + "BaseDepth": { + "type": "number", + "description": "The curve's maximum 'depth' i.e., the reference value at which the curve has its last non-absent value. The curve may contain further absent values in between TopDepth and BaseDepth. Note that the SamplingDomainType may not be a depth as the property name indicates.", + "x-osdu-frame-of-reference": "UOM_via_property:DepthUnit" + }, + "DepthUnit": { + "type": "string", + "description": "Unit of Measure for TopDepth and BaseDepth.", + "pattern": "^[\\w\\-\\.]+:reference-data\\-\\-UnitOfMeasure:[\\w\\-\\.\\:\\%]+:[0-9]*$", + "x-osdu-relationship": [ + { + "GroupType": "reference-data", + "EntityType": "UnitOfMeasure" + } + ] + }, + "CurveUnit": { + "type": "string", + "description": "Unit of Measure for the Log Curve", + "pattern": "^[\\w\\-\\.]+:reference-data\\-\\-UnitOfMeasure:[\\w\\-\\.\\:\\%]+:[0-9]*$", + "x-osdu-relationship": [ + { + "GroupType": "reference-data", + "EntityType": "UnitOfMeasure" + } + ] + }, + "Mnemonic": { + "type": "string", + "description": "The Mnemonic of the Log Curve is the value as received either from Raw Providers or from Internal Processing team", + "example": "PRES_HDRB.BAR" + }, + "LogCurveTypeID": { + "type": "string", + "description": "The related record id of the Log Curve Type - which is the standard mnemonic chosen by the company - OSDU provides an initial list", + "pattern": "^[\\w\\-\\.]+:reference-data\\-\\-LogCurveType:[\\w\\-\\.\\:\\%]+:[0-9]*$", + "x-osdu-relationship": [ + { + "GroupType": "reference-data", + "EntityType": "LogCurveType" + } + ] + }, + "LogCurveBusinessValueID": { + "type": "string", + "description": "The related record id of the Log Curve Business Value Type.", + "pattern": "^[\\w\\-\\.]+:reference-data\\-\\-LogCurveBusinessValue:[\\w\\-\\.\\:\\%]+:[0-9]*$", + "x-osdu-relationship": [ + { + "GroupType": "reference-data", + "EntityType": "LogCurveBusinessValue" + } + ] + }, + "LogCurveMainFamilyID": { + "type": "string", + "description": "The related record id of the Log Curve Main Family Type - which is the Geological Physical Quantity measured - such as porosity.", + "pattern": "^[\\w\\-\\.]+:reference-data\\-\\-LogCurveMainFamily:[\\w\\-\\.\\:\\%]+:[0-9]*$", + "x-osdu-relationship": [ + { + "GroupType": "reference-data", + "EntityType": "LogCurveMainFamily" + } + ] + }, + "LogCurveFamilyID": { + "type": "string", + "description": "The related record id of the Log Curve Family - which is the detailed Geological Physical Quantity Measured - such as neutron porosity", + "pattern": "^[\\w\\-\\.]+:reference-data\\-\\-LogCurveFamily:[\\w\\-\\.\\:\\%]+:[0-9]*$", + "x-osdu-relationship": [ + { + "GroupType": "reference-data", + "EntityType": "LogCurveFamily" + } + ] + }, + "NumberOfColumns": { + "type": "integer", + "title": "Number Of Columns", + "description": "The number of columns present in this Curve for a single reference value. For simple logs this is typically 1; for image logs this holds the number of image traces or property series. Further information about the columns can be obtained via the respective log or curve APIs of the Domain Data Management Service.", + "example": 192 + }, + "CurveSampleTypeID": { + "type": "string", + "title": "Curve Sample Type ID", + "description": "The value type to be expected as curve sample values.", + "example": "namespace:reference-data--CurveSampleType:float:", + "pattern": "^[\\w\\-\\.]+:reference-data\\-\\-CurveSampleType:[\\w\\-\\.\\:\\%]+:[0-9]*$", + "x-osdu-relationship": [ + { + "GroupType": "reference-data", + "EntityType": "CurveSampleType" + } + ] + }, + "CurveDescription": { + "type": "string", + "title": "Curve Description", + "description": "Mnemonic-level curve description is used during parsing or reading and ingesting LAS or DLIS files, to explain the type of measurement being looked at, specifically for that moment. Curve description is specific to that single (log) mnemonic and for the entire log (acquisition run) interval. In essence, curve description defines the internal factors such as what the \"curve\" or measurement ideally is representing, how is it calculated, what are the assumptions and the \"constants\".", + "example": "CBL Adjustment Factor, Resistivity Inversion Selection, Detector 1 Barite Constant" + } + } + } + }, + "FrameIdentifier": { + "type": "string", + "title": "Frame Identifier", + "description": "For multi-frame or multi-section files, this identifier defines the source frame in the file. If the identifier is an index number the index starts with zero and is converted to a string for this property.", + "example": 0 + }, + "SamplingInterval": { + "type": "number", + "title": "Sampling Interval", + "description": "For regularly sampled curves this property holds the sampling interval. For non regular sampling rate this property is not set. The IsRegular flag indicates whether SamplingInterval is required.", + "example": 0.0254, + "x-osdu-frame-of-reference": "UOM" + }, + "ReferenceCurveID": { + "type": "string", + "title": "Reference Curve ID", + "description": "The data.Curves[].CurveID, which holds the primary index (reference) values.", + "example": "MD" + }, + "SamplingStart": { + "type": "number", + "title": "Sampling Start", + "description": "The start value/first value of the ReferenceCurveID, typically the start depth of the logging.", + "example": 2500, + "x-osdu-frame-of-reference": "UOM" + }, + "SamplingStop": { + "type": "number", + "title": "Sampling Stop", + "description": "The stop value/last value of the ReferenceCurveID, typically the end depth of the logging.", + "example": 7500, + "x-osdu-frame-of-reference": "UOM" + }, + "SamplingDomainTypeID": { + "type": "string", + "title": "Sampling Domain Type ID", + "description": "The sampling domain, e.g. measured depth, true vertical, travel-time, calendar-time.", + "example": "namespace:reference-data--WellLogSamplingDomainType:Depth:", + "pattern": "^[\\w\\-\\.]+:reference-data\\-\\-WellLogSamplingDomainType:[\\w\\-\\.\\:\\%]+:[0-9]*$", + "x-osdu-relationship": [ + { + "GroupType": "reference-data", + "EntityType": "WellLogSamplingDomainType" + } + ] + }, + "CompanyID": { + "type": "string", + "title": "Company ID", + "description": "The relationship to company who engaged the service company (ServiceCompanyID) to perform the logging.", + "pattern": "^[\\w\\-\\.]+:master-data\\-\\-Organisation:[\\w\\-\\.\\:\\%]+:[0-9]*$", + "x-osdu-relationship": [ + { + "GroupType": "master-data", + "EntityType": "Organisation" + } + ] + }, + "CandidateReferenceCurveIDs": { + "type": "array", + "description": "Secondary index curves, which are alternative candidates to act as ReferenceCurveID. Generally not populated, except in the cases where multiple reference curves are present, e.g. measured depth and time.", + "items": { + "type": "string" + } + }, + "ZeroTime": { + "type": "string", + "description": "Optional time reference for (calender) time logs. The ISO date time string representing zero time. Not to be confused with seismic travel time zero. The latter is defined by SeismicReferenceDatum.", + "format": "date-time", + "x-osdu-frame-of-reference": "DateTime" + }, + "SeismicReferenceElevation": { + "$ref": "{{schema-authority}}:wks:AbstractFacilityVerticalMeasurement:1.0.0", + "description": "Populated only if the WellLog represents time-depth relationships or checkshots. It is expressed via the standard AbstractFacilityVerticalMeasurement. The following properties are expected to be present: VerticalMeasurementPathID (typically elevation), VerticalMeasurementTypeID as SeismicReferenceDatum, VerticalMeasurement holding the offset to either the VerticalCRSID or the chained VerticalReferenceID in the parent Wellbore." + }, + "IsRegular": { + "type": "boolean", + "title": "Is Regular Flag", + "description": "Boolean property indicating the sampling mode of the ReferenceCurveID. True means all reference curve values are regularly spaced (see SamplingInterval); false means irregular or discrete sample spacing." + }, + "LogRemark": { + "type": "string", + "title": "Log Remark", + "description": "Log remark provides contextual information during the actual log object acquisition. Explains how the measurement in the wellbore is taken on a point in time or depth. Additional information may be included such as bad weather, tool failure, etc. Usually a part of the log header, log remark contains info specific for an acquisition run, specific for a given logging tool (multiple measurements) and/or a specific interval. In essence, log remark represents the external factors and operational environment, directly or indirectly affecting the measurement quality/uncertainty (dynamically over time/depth) - adding both noise and bias to the measurements.", + "example": "tool failure, bad weather" + } + }, + "title": "IndividualProperties" + }, + { + "type": "object", + "properties": { + "ExtensionProperties": { + "type": "object" + } + }, + "title": "ExtensionProperties" + } + ] + } + }, + "required": [ + "kind", + "acl", + "legal" + ], + "additionalProperties": false, + "x-osdu-review-status": "Accepted", + "x-osdu-supported-file-formats": [ + "WITSML", + "DLIS", + "LIS", + "LAS2", + "LAS3", + "csv" + ], + "x-osdu-virtual-properties": { + "data.VirtualProperties.DefaultLocation": { + "type": "object", + "priority": [ + { + "path": "data.SpatialArea" + }, + { + "path": "data.SpatialPoint" + } + ] + }, + "data.VirtualProperties.DefaultName": { + "type": "string", + "priority": [ + { + "path": "data.Name" + } + ] + } + }, + "x-osdu-inheriting-from-kind": [ + { + "name": "WorkProductComponent", + "kind": "osdu:wks:AbstractWPCGroupType:1.0.0" + } + ] + } +} \ No newline at end of file diff --git a/deployments/shared-schemas/osdu/work-product-component/WellboreIntervalSet.1.0.0.json b/deployments/shared-schemas/osdu/work-product-component/WellboreIntervalSet.1.0.0.json new file mode 100644 index 00000000..40d79762 --- /dev/null +++ b/deployments/shared-schemas/osdu/work-product-component/WellboreIntervalSet.1.0.0.json @@ -0,0 +1,385 @@ +{ + "schemaInfo": { + "schemaIdentity": { + "authority": "{{schema-authority}}", + "source": "wks", + "entityType": "work-product-component--WellboreIntervalSet", + "schemaVersionMajor": 1, + "schemaVersionMinor": 0, + "schemaVersionPatch": 0, + "id": "{{schema-authority}}:wks:work-product-component--WellboreIntervalSet:1.0.0" + }, + "createdBy": "OSDU Data Definition Group", + "scope": "SHARED", + "status": "DEVELOPMENT" + }, + "schema": { + "x-osdu-license": "Copyright 2022, The Open Group \\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.", + "$id": "https://schema.osdu.opengroup.org/json/work-product-component/WellboreIntervalSet.1.0.0.json", + "$schema": "http://json-schema.org/draft-07/schema#", + "x-osdu-schema-source": "osdu:wks:work-product-component--WellboreIntervalSet:1.0.0", + "title": "WellboreIntervalSet", + "description": "Define the geologic unit (including stratigraphic units) or fluid intervals along the wellbore, independent or based on markers (defined in one or several WellboreMarkerSets).", + "type": "object", + "properties": { + "id": { + "description": "Previously called ResourceID or SRN which identifies this OSDU resource object without version.", + "title": "Entity ID", + "type": "string", + "pattern": "^[\\w\\-\\.]+:work-product-component\\-\\-WellboreIntervalSet:[\\w\\-\\.\\:\\%]+$", + "example": "namespace:work-product-component--WellboreIntervalSet:2828e1de-4bdd-5bfa-a4d0-c7727cd1b587" + }, + "kind": { + "description": "The schema identification for the OSDU resource object following the pattern {Namespace}:{Source}:{Type}:{VersionMajor}.{VersionMinor}.{VersionPatch}. The versioning scheme follows the semantic versioning, https://semver.org/.", + "title": "Entity Kind", + "type": "string", + "pattern": "^[\\w\\-\\.]+:[\\w\\-\\.]+:[\\w\\-\\.]+:[0-9]+.[0-9]+.[0-9]+$", + "example": "osdu:wks:work-product-component--WellboreIntervalSet:1.0.0" + }, + "version": { + "description": "The version number of this OSDU resource; set by the framework.", + "title": "Version Number", + "type": "integer", + "format": "int64", + "example": 1562066009929332 + }, + "acl": { + "description": "The access control tags associated with this entity.", + "title": "Access Control List", + "$ref": "{{schema-authority}}:wks:AbstractAccessControlList:1.0.0" + }, + "legal": { + "description": "The entity's legal tags and compliance status. The actual contents associated with the legal tags is managed by the Compliance Service.", + "title": "Legal Tags", + "$ref": "{{schema-authority}}:wks:AbstractLegalTags:1.0.0" + }, + "tags": { + "title": "Tag Dictionary", + "description": "A generic dictionary of string keys mapping to string value. Only strings are permitted as keys and values.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "example": { + "NameOfKey": "String value" + } + }, + "createTime": { + "description": "Timestamp of the time at which initial version of this OSDU resource object was created. Set by the System. The value is a combined date-time string in ISO-8601 given in UTC.", + "title": "Resource Object Creation DateTime", + "type": "string", + "format": "date-time", + "example": "2020-12-16T11:46:20.163Z" + }, + "createUser": { + "title": "Resource Object Creation User Reference", + "description": "The user reference, which created the first version of this resource object. Set by the System.", + "type": "string", + "example": "some-user@some-company-cloud.com" + }, + "modifyTime": { + "description": "Timestamp of the time at which this version of the OSDU resource object was created. Set by the System. The value is a combined date-time string in ISO-8601 given in UTC.", + "title": "Resource Object Version Creation DateTime", + "type": "string", + "format": "date-time", + "example": "2020-12-16T11:52:24.477Z" + }, + "modifyUser": { + "title": "Resource Object Version Creation User Reference", + "description": "The user reference, which created this version of this resource object. Set by the System.", + "type": "string", + "example": "some-user@some-company-cloud.com" + }, + "ancestry": { + "description": "The links to data, which constitute the inputs, from which this record instance is derived.", + "title": "Ancestry", + "$ref": "{{schema-authority}}:wks:AbstractLegalParentList:1.0.0" + }, + "meta": { + "description": "The Frame of Reference meta data section linking the named properties to self-contained definitions.", + "title": "Frame of Reference Meta Data", + "type": "array", + "items": { + "$ref": "{{schema-authority}}:wks:AbstractMetaItem:1.0.0" + } + }, + "data": { + "allOf": [ + { + "$ref": "{{schema-authority}}:wks:AbstractCommonResources:1.0.0" + }, + { + "$ref": "{{schema-authority}}:wks:AbstractWPCGroupType:1.0.0" + }, + { + "$ref": "{{schema-authority}}:wks:AbstractWorkProductComponent:1.0.0" + }, + { + "type": "object", + "properties": { + "WellboreID": { + "type": "string", + "title": "Wellbore ID", + "description": "The relationship to a Wellbore, to which this WellboreIntervalSet is associated with.", + "example": "namespace:master-data--Wellbore:NPD-4055:", + "pattern": "^[\\w\\-\\.]+:master-data\\-\\-Wellbore:[\\w\\-\\.\\:\\%]+:[0-9]*$", + "x-osdu-relationship": [ + { + "GroupType": "master-data", + "EntityType": "Wellbore" + } + ] + }, + "VerticalMeasurement": { + "$ref": "{{schema-authority}}:wks:AbstractFacilityVerticalMeasurement:1.0.0", + "title": "Vertical Measurement", + "description": "References an entry in the Vertical Measurement array for the Wellbore identified by WellboreID, which defines the vertical reference datum for all marker measured depths of the WellboreIntervalSet Intervals array. It is strongly recommended specifying the VerticalMeasurement.WellboreTVDTrajectoryID when SubSeaVerticalDepth are populated for the intervals." + }, + "StratigraphicColumnID": { + "type": "string", + "title": "Stratigraphic Column ID", + "description": "The optional reference to a stratigraphic column (referring to multiple StratigraphicColumnRankInterpretation) providing the stratigraphic framework for the WellboreIntervalSet. It demonstrates the intent to describe complex, potentially overlapping stratigraphic intervals. Only one of the properties StratigraphicColumnID or StratigraphicColumnRankInterpretationID should be populated.", + "pattern": "^[\\w\\-\\.]+:work-product-component\\-\\-StratigraphicColumn:[\\w\\-\\.\\:\\%]+:[0-9]*$", + "x-osdu-relationship": [ + { + "GroupType": "work-product-component", + "EntityType": "StratigraphicColumn" + } + ] + }, + "StratigraphicColumnRankInterpretationID": { + "type": "string", + "title": "Stratigraphic Column Rank Interpretation ID", + "description": "The optional reference to a StratigraphicColumnRankInterpretation. It expresses the intent of a stratigraphic framework with non-overlapping intervals. Only one of the properties StratigraphicColumnID or StratigraphicColumnRankInterpretationID should be populated.", + "example": "namespace:work-product-component--StratigraphicColumnRankInterpretation:Gudrun-Rank2-:", + "pattern": "^[\\w\\-\\.]+:work-product-component\\-\\-StratigraphicColumnRankInterpretation:[\\w\\-\\.\\:\\%]+:[0-9]*$", + "x-osdu-relationship": [ + { + "GroupType": "work-product-component", + "EntityType": "StratigraphicColumnRankInterpretation" + } + ] + }, + "Intervals": { + "type": "array", + "title": "Intervals", + "description": "Array of Intervals, index-aligned with IntervalProperties.", + "x-osdu-indexing": { + "type": "nested" + }, + "items": { + "type": "object", + "title": "Interval", + "description": "An interval given either by relationships to top/base markers or standalone top/base depths. To avoid confusion about entry and exit depths the naming convention uses Start as the entry point of the well path into the geologic unit and Stop as the exit point. For unfolded geologic units and vertical wellbores Start is Top and Stop is Base.", + "properties": { + "IntervalID": { + "type": "string", + "title": "Interval ID", + "description": "The unique identifier of the interval array member in the data.Intervals[] array. Ideally a UUID.", + "example": "ba829e6d-30e0-4375-906c-4e7c62c9f7ec" + }, + "GeologicUnitInterpretationIDs": { + "type": "array", + "title": "Interpretation Ids", + "description": "An array of StratigraphicUnitInterpretation, GeobodyInterpretation or RockFluidUnitInterpretation record Ids associated to this interval.", + "example": [ + "partition-id:work-product-component--StratigraphicUnitInterpretation:Draupne-:" + ], + "items": { + "type": "string", + "pattern": "^[\\w\\-\\.]+:(work-product-component\\-\\-StratigraphicUnitInterpretation|work-product-component\\-\\-GeobodyInterpretation|work-product-component\\-\\-RockFluidUnitInterpretation):[\\w\\-\\.\\:\\%]+:[0-9]*$", + "x-osdu-relationship": [ + { + "GroupType": "work-product-component", + "EntityType": "StratigraphicUnitInterpretation" + }, + { + "GroupType": "work-product-component", + "EntityType": "GeobodyInterpretation" + }, + { + "GroupType": "work-product-component", + "EntityType": "RockFluidUnitInterpretation" + } + ] + } + }, + "StartMeasuredDepth": { + "type": "number", + "title": "Start Interval Measured Depth", + "description": "The minimal MeasuredDepth of the interval. In the most common case this is the top. If this value is associated with a marker then this value is a denormalization of data.Markers[].MarkerMeasuredDepth where the data.Markers[].MarkerID equals to StartMarkerID.", + "example": 4049, + "x-osdu-frame-of-reference": "UOM:length" + }, + "StartSubSeaVerticalDepth": { + "type": "number", + "title": "Start Sub-Sea Vertical Depth", + "description": "True vertical depth sub-sea of the start of the interval. This is the same as true vertical depth referenced to the vertical CRS \"MSL depth\". If the start of the interval is associated with a marker then this value is a denormalization of data.Markers[].MarkerSubSeaVerticalDepth where the data.Markers[].MarkerID equals to StartMarkerID.", + "example": 4030.9, + "x-osdu-frame-of-reference": "UOM:length" + }, + "StartIntervalName": { + "type": "string", + "title": "Start Interval Marker Name", + "description": "Name of the interval start (typically the top); when associated with a marker in a WellboreMarkerSet then this name is a denormalization of data.Markers[].MarkerName where the data.Markers[].MarkerID equals to StartMarkerID.", + "example": "Top-Draupne" + }, + "StartMarkerSetID": { + "type": "string", + "title": "Start Interval WellboreMarkerSet ID", + "description": "Optional reference to the WellboreMarkerSet containing the interval start (typically the top), with MarkerID equals StartMarkerID.", + "example": "namespace:work-product-component--WellboreMarkerSet:15-3-7-SingleRank-:", + "pattern": "^[\\w\\-\\.]+:work-product-component\\-\\-WellboreMarkerSet:[\\w\\-\\.\\:\\%]+:[0-9]*$", + "x-osdu-relationship": [ + { + "GroupType": "work-product-component", + "EntityType": "WellboreMarkerSet" + } + ] + }, + "StartMarkerID": { + "type": "string", + "title": "Start Interval Marker ID", + "description": "Individual markers are not globally identifiable. TopMarkerID is the unique id (MarkerID) of the top interval marker (typically the interval base) in the data.Markers[] array where the data.Markers[].MarkerID equals to StartMarkerID.", + "example": "a580a3bb-c2db-4845-bbc1-050b417307c0" + }, + "StartBoundaryInterpretationID": { + "type": "string", + "title": "Start Interval Boundary Interpretation ID", + "description": "The optional relationship to a HorizonInterpretation, GeobodyBoundaryInterpretation or FaultInterpretation. If the interval start (typically the top) is associated with a marker, this is considered a denormalization of the data.Markers[].InterpretationID for the data.Markers[].MarkerID equals to StartMarkerID.", + "example": "namespace:work-product-component--HorizonInterpretation:Top-Draupne-:", + "pattern": "^[\\w\\-\\.]+:(work-product-component\\-\\-HorizonInterpretation|work-product-component\\-\\-GeobodyBoundaryInterpretation|work-product-component\\-\\-FaultInterpretation):[\\w\\-\\.\\:\\%]+:[0-9]*$", + "x-osdu-relationship": [ + { + "GroupType": "work-product-component", + "EntityType": "HorizonInterpretation" + }, + { + "GroupType": "work-product-component", + "EntityType": "GeobodyBoundaryInterpretation" + }, + { + "GroupType": "work-product-component", + "EntityType": "FaultInterpretation" + } + ] + }, + "StopMeasuredDepth": { + "type": "number", + "title": "Stop Interval Measured Depth", + "description": "The maximum MeasuredDepth of the interval (typically the base). If the interval stop is associated with a marker then this value is a denormalization of data.Markers[].MarkerMeasuredDepth where the data.Markers[].MarkerID equals to StopMarkerID.", + "example": 4502, + "x-osdu-frame-of-reference": "UOM:length" + }, + "StopSubSeaVerticalDepth": { + "type": "number", + "title": "Stop Sub-Sea Vertical Depth", + "description": "True vertical depth sub-sea of the interval stop (typically the base). This is the same as true vertical depth referenced to the vertical CRS \"MSL depth\". If the interval stop is associated with a marker then this value is a denormalization of data.Markers[].MarkerSubSeaVerticalDepth where the data.Markers[].MarkerID equals to StopMarkerID.", + "example": 4483.8, + "x-osdu-frame-of-reference": "UOM:length" + }, + "StopIntervalName": { + "type": "string", + "title": "Stop Interval Marker Name", + "description": "Name of the interval stop (typically the base); when associated with a marker in a WellboreMarkerSet then this name is a denormalization of data.Markers[].MarkerName where the data.Markers[].MarkerID equals to StopMarkerID.", + "example": "Top-Heather" + }, + "StopMarkerSetID": { + "type": "string", + "title": "Stop Interval WellboreMarkerSet ID", + "description": "Optional reference to the WellboreMarkerSet containing the top with MarkerID equals StopMarkerID.", + "example": "namespace:work-product-component--WellboreMarkerSet:15-3-7-SingleRank-:", + "pattern": "^[\\w\\-\\.]+:work-product-component\\-\\-WellboreMarkerSet:[\\w\\-\\.\\:\\%]+:[0-9]*$", + "x-osdu-relationship": [ + { + "GroupType": "work-product-component", + "EntityType": "WellboreMarkerSet" + } + ] + }, + "StopMarkerID": { + "type": "string", + "title": "Stop Interval Marker ID", + "description": "Individual markers are not globally identifiable. StopMarkerID is the unique id (MarkerID) of the interval stop (typically the interval base) in the data.Markers[] array where the data.Markers[].MarkerID equals to StopMarkerID.", + "example": "7699229b-36e8-4aed-884f-a1e844e5b9d7" + }, + "StopBoundaryInterpretationID": { + "type": "string", + "title": "Stop Interval Boundary Interpretation ID", + "description": "The optional relationship to a HorizonInterpretation, GeobodyBoundaryInterpretation or FaultInterpretation. If the interval stop (typically the base) is associated with a marker, this is considered a denormalization of the data.Markers[].InterpretationID where the data.Markers[].MarkerID equals to StopMarkerID.", + "example": "namespace:work-product-component--HorizonInterpretation:Top-Heather-:", + "pattern": "^[\\w\\-\\.]+:(work-product-component\\-\\-HorizonInterpretation|work-product-component\\-\\-GeobodyBoundaryInterpretation|work-product-component\\-\\-FaultInterpretation):[\\w\\-\\.\\:\\%]+:[0-9]*$", + "x-osdu-relationship": [ + { + "GroupType": "work-product-component", + "EntityType": "HorizonInterpretation" + }, + { + "GroupType": "work-product-component", + "EntityType": "GeobodyBoundaryInterpretation" + }, + { + "GroupType": "work-product-component", + "EntityType": "FaultInterpretation" + } + ] + } + } + } + }, + "IntervalProperties": { + "$ref": "{{schema-authority}}:wks:AbstractColumnBasedTable:1.0.0", + "title": "Interval Property Values", + "description": "An embedded ColumnBasedTable with the properties including their values associated to the intervals in data.Intervals[]. The association is done by array index." + } + }, + "title": "IndividualProperties" + }, + { + "type": "object", + "properties": { + "ExtensionProperties": { + "type": "object" + } + }, + "title": "ExtensionProperties" + } + ] + } + }, + "required": [ + "kind", + "acl", + "legal" + ], + "additionalProperties": false, + "x-osdu-review-status": "Accepted", + "x-osdu-virtual-properties": { + "data.VirtualProperties.DefaultName": { + "type": "string", + "priority": [ + { + "path": "data.Name" + } + ] + }, + "data.VirtualProperties.DefaultLocation": { + "type": "object", + "priority": [ + { + "path": "data.SpatialArea" + }, + { + "path": "data.SpatialPoint" + } + ] + } + }, + "x-osdu-inheriting-from-kind": [ + { + "name": "WorkProductComponent", + "kind": "osdu:wks:AbstractWPCGroupType:1.0.0" + } + ] + } +} \ No newline at end of file diff --git a/deployments/shared-schemas/osdu/work-product-component/WellboreMarkerSet.1.2.0.json b/deployments/shared-schemas/osdu/work-product-component/WellboreMarkerSet.1.2.0.json new file mode 100644 index 00000000..3ac98235 --- /dev/null +++ b/deployments/shared-schemas/osdu/work-product-component/WellboreMarkerSet.1.2.0.json @@ -0,0 +1,385 @@ +{ + "schemaInfo": { + "schemaIdentity": { + "authority": "{{schema-authority}}", + "source": "wks", + "entityType": "work-product-component--WellboreMarkerSet", + "schemaVersionMajor": 1, + "schemaVersionMinor": 2, + "schemaVersionPatch": 0, + "id": "{{schema-authority}}:wks:work-product-component--WellboreMarkerSet:1.2.0" + }, + "createdBy": "OSDU Data Definition Group", + "scope": "SHARED", + "status": "DEVELOPMENT" + }, + "schema": { + "x-osdu-license": "Copyright 2022, The Open Group \\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.", + "$id": "https://schema.osdu.opengroup.org/json/work-product-component/WellboreMarkerSet.1.2.0.json", + "$schema": "http://json-schema.org/draft-07/schema#", + "x-osdu-schema-source": "osdu:wks:work-product-component--WellboreMarkerSet:1.2.0", + "title": "WellboreMarkerSet", + "description": "Wellbore Markers identify the depth in a wellbore, measured below a reference elevation, at which a person or an automated process identifies a noteworthy observation, which is usually a change in the rock that intersects that wellbore. Formation Marker data includes attributes/properties that put these depths in context. Formation Markers are sometimes known as picks or formation tops.", + "type": "object", + "properties": { + "id": { + "description": "Previously called ResourceID or SRN which identifies this OSDU resource object without version.", + "title": "Entity ID", + "type": "string", + "pattern": "^[\\w\\-\\.]+:work-product-component\\-\\-WellboreMarkerSet:[\\w\\-\\.\\:\\%]+$", + "example": "namespace:work-product-component--WellboreMarkerSet:d5303b79-7904-5bfe-9c44-9a3ff41b6d6c" + }, + "kind": { + "description": "The schema identification for the OSDU resource object following the pattern {Namespace}:{Source}:{Type}:{VersionMajor}.{VersionMinor}.{VersionPatch}. The versioning scheme follows the semantic versioning, https://semver.org/.", + "title": "Entity Kind", + "type": "string", + "pattern": "^[\\w\\-\\.]+:[\\w\\-\\.]+:[\\w\\-\\.]+:[0-9]+.[0-9]+.[0-9]+$", + "example": "osdu:wks:work-product-component--WellboreMarkerSet:1.2.0" + }, + "version": { + "description": "The version number of this OSDU resource; set by the framework.", + "title": "Version Number", + "type": "integer", + "format": "int64", + "example": 1562066009929332 + }, + "acl": { + "description": "The access control tags associated with this entity.", + "title": "Access Control List", + "$ref": "{{schema-authority}}:wks:AbstractAccessControlList:1.0.0" + }, + "legal": { + "description": "The entity's legal tags and compliance status. The actual contents associated with the legal tags is managed by the Compliance Service.", + "title": "Legal Tags", + "$ref": "{{schema-authority}}:wks:AbstractLegalTags:1.0.0" + }, + "tags": { + "title": "Tag Dictionary", + "description": "A generic dictionary of string keys mapping to string value. Only strings are permitted as keys and values.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "example": { + "NameOfKey": "String value" + } + }, + "createTime": { + "description": "Timestamp of the time at which initial version of this OSDU resource object was created. Set by the System. The value is a combined date-time string in ISO-8601 given in UTC.", + "title": "Resource Object Creation DateTime", + "type": "string", + "format": "date-time", + "example": "2020-12-16T11:46:20.163Z" + }, + "createUser": { + "title": "Resource Object Creation User Reference", + "description": "The user reference, which created the first version of this resource object. Set by the System.", + "type": "string", + "example": "some-user@some-company-cloud.com" + }, + "modifyTime": { + "description": "Timestamp of the time at which this version of the OSDU resource object was created. Set by the System. The value is a combined date-time string in ISO-8601 given in UTC.", + "title": "Resource Object Version Creation DateTime", + "type": "string", + "format": "date-time", + "example": "2020-12-16T11:52:24.477Z" + }, + "modifyUser": { + "title": "Resource Object Version Creation User Reference", + "description": "The user reference, which created this version of this resource object. Set by the System.", + "type": "string", + "example": "some-user@some-company-cloud.com" + }, + "ancestry": { + "description": "The links to data, which constitute the inputs, from which this record instance is derived.", + "title": "Ancestry", + "$ref": "{{schema-authority}}:wks:AbstractLegalParentList:1.0.0" + }, + "meta": { + "description": "The Frame of Reference meta data section linking the named properties to self-contained definitions.", + "title": "Frame of Reference Meta Data", + "type": "array", + "items": { + "$ref": "{{schema-authority}}:wks:AbstractMetaItem:1.0.0" + } + }, + "data": { + "allOf": [ + { + "$ref": "{{schema-authority}}:wks:AbstractCommonResources:1.0.0" + }, + { + "$ref": "{{schema-authority}}:wks:AbstractWPCGroupType:1.0.0" + }, + { + "$ref": "{{schema-authority}}:wks:AbstractWorkProductComponent:1.0.0" + }, + { + "type": "object", + "properties": { + "WellboreID": { + "type": "string", + "title": "Wellbore ID", + "description": "The Wellbore ID, to which the markers in this set belong.", + "pattern": "^[\\w\\-\\.]+:master-data\\-\\-Wellbore:[\\w\\-\\.\\:\\%]+:[0-9]*$", + "x-osdu-relationship": [ + { + "GroupType": "master-data", + "EntityType": "Wellbore" + } + ] + }, + "VerticalMeasurement": { + "$ref": "{{schema-authority}}:wks:AbstractFacilityVerticalMeasurement:1.0.0", + "title": "Vertical Measurement", + "description": "References an entry in the Vertical Measurement array for the Wellbore identified by WellboreID, which defines the vertical reference datum for all marker measured depths of the Wellbore Marker Set Markers array." + }, + "AvailableMarkerProperties": { + "type": "array", + "title": "Available Marker Properties", + "description": "The array of MarkerProperty definitions describing the available properties for this instance of WellboreMarkerSet.", + "x-osdu-indexing": { + "type": "flattened" + }, + "items": { + "type": "object", + "title": "MarkerProperty", + "description": "A set of properties describing a marker property which is available for this instance of a WellboreMarkerSet.", + "properties": { + "MarkerPropertyTypeID": { + "type": "string", + "title": "Marker Property Type ID", + "description": "The reference to a marker property type - or if interpreted as CSV columns, the 'well-known column type. It is a relationship to a reference-data--MarkerPropertyType record id.", + "example": "partition-id:reference-data--MarkerPropertyType:MissingThickness:", + "pattern": "^[\\w\\-\\.]+:reference-data\\-\\-MarkerPropertyType:[\\w\\-\\.\\:\\%]+:[0-9]*$", + "x-osdu-relationship": [ + { + "GroupType": "reference-data", + "EntityType": "MarkerPropertyType" + } + ] + }, + "MarkerPropertyUnitID": { + "type": "string", + "title": "Marker Property Unit ID", + "description": "Unit of Measure for the marker properties of type MarkerPropertyType.", + "example": "partition-id:reference-data--UnitOfMeasure:ft:", + "pattern": "^[\\w\\-\\.]+:reference-data\\-\\-UnitOfMeasure:[\\w\\-\\.\\:\\%]+:[0-9]*$", + "x-osdu-relationship": [ + { + "GroupType": "reference-data", + "EntityType": "UnitOfMeasure" + } + ] + }, + "Name": { + "type": "string", + "title": "Name", + "description": "The name of the marker property (e.g. column in a CSV document) as originally found. If absent The name of the MarkerPropertyType is intended to be used.", + "example": "MissingThickness" + } + } + } + }, + "Markers": { + "type": "array", + "title": "Markers", + "description": "The array of marker meta data in this set. Markers are externally identified by data.Markers[].MarkerID, ideally a UUID. Older versions of the WellboreMarkerSet schema do not have this identifier. In this case, the string-converted array index is used as MarkerID. The the first index is \"0\".", + "x-osdu-indexing": { + "type": "nested" + }, + "items": { + "type": "object", + "title": "Markers", + "description": "The array of marker meta data in this set.", + "properties": { + "MarkerName": { + "type": "string", + "description": "Name of the Marker" + }, + "MarkerID": { + "type": "string", + "title": "Marker ID", + "description": "A unique identifier of the marker in the list of data.Markers[], ideally a UUID. If unpopulated, the string-converted element index number is used. The first index is \"0\"." + }, + "InterpretationID": { + "type": "string", + "title": "Interpretation ID", + "description": "The optional relationship to a HorizonInterpretation, GeobodyBoundaryInterpretation or FaultInterpretation.", + "pattern": "^[\\w\\-\\.]+:(work-product-component\\-\\-HorizonInterpretation|work-product-component\\-\\-FaultInterpretation|work-product-component\\-\\-GeobodyBoundaryInterpretation):[\\w\\-\\.\\:\\%]+:[0-9]*$", + "x-osdu-relationship": [ + { + "GroupType": "work-product-component", + "EntityType": "HorizonInterpretation" + }, + { + "GroupType": "work-product-component", + "EntityType": "FaultInterpretation" + }, + { + "GroupType": "work-product-component", + "EntityType": "GeobodyBoundaryInterpretation" + } + ] + }, + "MarkerMeasuredDepth": { + "type": "number", + "description": "The depth at which the Marker was noted.", + "x-osdu-frame-of-reference": "UOM:length" + }, + "MarkerSubSeaVerticalDepth": { + "type": "number", + "description": "The Marker's TVD converted to a Sub-Sea Vertical depth, i.e., below Mean Sea Level. Note that TVD values above MSL are negative. This is the same as true vertical depth referenced to the vertical CRS \u201cMSL depth\u201d.", + "x-osdu-frame-of-reference": "UOM:length" + }, + "MarkerDate": { + "type": "string", + "description": "Timestamp of the date and time when the when the Marker was interpreted.", + "format": "date-time", + "x-osdu-frame-of-reference": "DateTime" + }, + "MarkerObservationNumber": { + "type": "number", + "description": "Any observation number that distinguishes a Marker observation from others with same Marker name, date." + }, + "MarkerInterpreter": { + "type": "string", + "description": "The name of the Marker interpreter (could be a person or vendor)." + }, + "MarkerTypeID": { + "type": "string", + "description": "Marker Type Reference Type. Possible values - Biostratigraphy, Lithostratigraphy, seismic, depth of well, sequence, flow unit", + "pattern": "^[\\w\\-\\.]+:reference-data\\-\\-MarkerType:[\\w\\-\\.\\:\\%]+:[0-9]*$", + "x-osdu-relationship": [ + { + "GroupType": "reference-data", + "EntityType": "MarkerType" + } + ] + }, + "FeatureTypeID": { + "type": "string", + "description": "Feature Type Reference Type. Possible values - Base, top, fault, salt, reef, sea floor", + "pattern": "^[\\w\\-\\.]+:reference-data\\-\\-FeatureType:[\\w\\-\\.\\:\\%]+:[0-9]*$", + "x-osdu-relationship": [ + { + "GroupType": "reference-data", + "EntityType": "FeatureType" + } + ] + }, + "FeatureName": { + "type": "string", + "description": "Name of the feature the marker is characterizing" + }, + "PositiveVerticalDelta": { + "type": "number", + "description": "The distance vertically above the Marker position that marks the limit of the high confidence range for the Marker pick.", + "x-osdu-frame-of-reference": "UOM:length" + }, + "NegativeVerticalDelta": { + "type": "number", + "description": "The distance vertically below the Marker position that marks the limit of the high confidence range for the Marker pick.", + "x-osdu-frame-of-reference": "UOM:length" + }, + "SurfaceDipAngle": { + "type": "number", + "description": "Dip angle for the Wellbore Marker.", + "x-osdu-frame-of-reference": "UOM:plane angle" + }, + "SurfaceDipAzimuth": { + "type": "number", + "description": "Dip azimuth for the Wellbore Marker.", + "x-osdu-frame-of-reference": "UOM:plane angle" + }, + "Missing": { + "type": "string" + }, + "GeologicalAge": { + "type": "string", + "description": "Associated geological age", + "x-osdu-frame-of-reference": "UOM:geologic time" + } + } + } + }, + "StratigraphicColumnID": { + "type": "string", + "title": "Stratigraphic Column ID", + "description": "The optional reference to a stratigraphic column (referring to multiple StratigraphicColumnRankInterpretation) providing the stratigraphic framework for the WellboreMarkerSet. It demonstrates the intent to describe complex, potentially overlapping stratigraphic intervals. Only one of the properties StratigraphicColumnID or StratigraphicColumnRankInterpretationID should be populated.", + "pattern": "^[\\w\\-\\.]+:work-product-component\\-\\-StratigraphicColumn:[\\w\\-\\.\\:\\%]+:[0-9]*$", + "x-osdu-relationship": [ + { + "GroupType": "work-product-component", + "EntityType": "StratigraphicColumn" + } + ] + }, + "StratigraphicColumnRankInterpretationID": { + "type": "string", + "title": "Stratigraphic Column Rank ID", + "description": "The optional reference to a StratigraphicColumnRankInterpretation. It expresses the intent of a stratigraphic framework with non-overlapping intervals. Only one of the properties StratigraphicColumnID or StratigraphicColumnRankInterpretationID should be populated.", + "pattern": "^[\\w\\-\\.]+:work-product-component\\-\\-StratigraphicColumnRankInterpretation:[\\w\\-\\.\\:\\%]+:[0-9]*$", + "x-osdu-relationship": [ + { + "GroupType": "work-product-component", + "EntityType": "StratigraphicColumnRankInterpretation" + } + ] + } + }, + "title": "IndividualProperties" + }, + { + "type": "object", + "properties": { + "ExtensionProperties": { + "type": "object" + } + }, + "title": "ExtensionProperties" + } + ] + } + }, + "required": [ + "kind", + "acl", + "legal" + ], + "additionalProperties": false, + "x-osdu-review-status": "Accepted", + "x-osdu-supported-file-formats": [ + "WITSML", + "RESQML", + "csv" + ], + "x-osdu-virtual-properties": { + "data.VirtualProperties.DefaultLocation": { + "type": "object", + "priority": [ + { + "path": "data.SpatialArea" + }, + { + "path": "data.SpatialPoint" + } + ] + }, + "data.VirtualProperties.DefaultName": { + "type": "string", + "priority": [ + { + "path": "data.Name" + } + ] + } + }, + "x-osdu-inheriting-from-kind": [ + { + "name": "WorkProductComponent", + "kind": "osdu:wks:AbstractWPCGroupType:1.0.0" + } + ] + } +} \ No newline at end of file diff --git a/deployments/shared-schemas/osdu/work-product-component/WellboreTrajectory.1.0.0.json b/deployments/shared-schemas/osdu/work-product-component/WellboreTrajectory.1.0.0.json index 471734c3..a1b44176 100644 --- a/deployments/shared-schemas/osdu/work-product-component/WellboreTrajectory.1.0.0.json +++ b/deployments/shared-schemas/osdu/work-product-component/WellboreTrajectory.1.0.0.json @@ -176,7 +176,7 @@ "title": "Projected Coordinate Reference System ID", "description": "Coordinate Reference System defining the Projection of the station EASTING and NORTHING values. If type is \"Grid North\" and EASTING and NORTHING attributes are stored, clearly identifying their projection is required.", "pattern": "^[\\w\\-\\.]+:reference-data\\-\\-CoordinateReferenceSystem:[\\w\\-\\.\\:\\%]+:[0-9]*$", - "example": "namespace:reference-data--CoordinateReferenceSystem:ProjectedCRS.EPSG.32615:", + "example": "namespace:reference-data--CoordinateReferenceSystem:Projected:EPSG::32615:", "x-osdu-relationship": [ { "GroupType": "reference-data", @@ -205,7 +205,7 @@ "title": "Geographic Coordinate Reference System", "description": "Coordinate Reference System defining the Geodetic Datum of the station LATITUDE and LONGITUDE values. If LATITUDE and LONGITUDE attributes are stored, clearly identifying their Datum is required.", "pattern": "^[\\w\\-\\.]+:reference-data\\-\\-CoordinateReferenceSystem:[\\w\\-\\.\\:\\%]+:[0-9]*$", - "example": "namespace:reference-data--CoordinateReferenceSystem:GeodeticCRS.EPSG.4326:", + "example": "namespace:reference-data--CoordinateReferenceSystem:Geographic2D:EPSG::4326:", "x-osdu-relationship": [ { "GroupType": "reference-data", diff --git a/deployments/shared-schemas/osdu/work-product-component/WellboreTrajectory.1.1.0.json b/deployments/shared-schemas/osdu/work-product-component/WellboreTrajectory.1.1.0.json index a86bb8aa..665c41ff 100644 --- a/deployments/shared-schemas/osdu/work-product-component/WellboreTrajectory.1.1.0.json +++ b/deployments/shared-schemas/osdu/work-product-component/WellboreTrajectory.1.1.0.json @@ -175,7 +175,7 @@ "type": "string", "title": "Projected Coordinate Reference System ID", "description": "Coordinate Reference System defining the Projection of the station EASTING and NORTHING values. If type is \"Grid North\" and EASTING and NORTHING attributes are stored, clearly identifying their projection is required.", - "example": "namespace:reference-data--CoordinateReferenceSystem:ProjectedCRS.EPSG.32615:", + "example": "namespace:reference-data--CoordinateReferenceSystem:Projected:EPSG::32615:", "pattern": "^[\\w\\-\\.]+:reference-data\\-\\-CoordinateReferenceSystem:[\\w\\-\\.\\:\\%]+:[0-9]*$", "x-osdu-relationship": [ { @@ -204,7 +204,7 @@ "type": "string", "title": "Geographic Coordinate Reference System", "description": "Coordinate Reference System defining the Geodetic Datum of the station LATITUDE and LONGITUDE values. If LATITUDE and LONGITUDE attributes are stored, clearly identifying their Datum is required.", - "example": "namespace:reference-data--CoordinateReferenceSystem:GeodeticCRS.EPSG.4326:", + "example": "namespace:reference-data--CoordinateReferenceSystem:Geographic2D:EPSG::4326:", "pattern": "^[\\w\\-\\.]+:reference-data\\-\\-CoordinateReferenceSystem:[\\w\\-\\.\\:\\%]+:[0-9]*$", "x-osdu-relationship": [ { -- GitLab From de5e1da31263b23bd71518a67d4f8f85f588b22c Mon Sep 17 00:00:00 2001 From: David Diederich Date: Tue, 29 Mar 2022 12:04:06 -1000 Subject: [PATCH 09/15] Update version of default branch to 0.15.0-SNAPSHOT --- pom.xml | 2 +- provider/schema-aws/pom.xml | 4 ++-- provider/schema-azure/pom.xml | 6 +++--- provider/schema-gcp/pom.xml | 4 ++-- provider/schema-ibm/pom.xml | 4 ++-- provider/schema-reference/pom.xml | 4 ++-- schema-core/pom.xml | 2 +- testing/pom.xml | 2 +- testing/schema-test-azure/pom.xml | 4 ++-- testing/schema-test-core/pom.xml | 2 +- testing/schema-test-gcp/pom.xml | 4 ++-- 11 files changed, 19 insertions(+), 19 deletions(-) diff --git a/pom.xml b/pom.xml index 3b16ac3a..a4768858 100644 --- a/pom.xml +++ b/pom.xml @@ -49,7 +49,7 @@ org.opengroup.osdu os-schema - 0.14.0-SNAPSHOT + 0.15.0-SNAPSHOT pom os-schema os schema service diff --git a/provider/schema-aws/pom.xml b/provider/schema-aws/pom.xml index 2086b6e2..5630cf0a 100644 --- a/provider/schema-aws/pom.xml +++ b/provider/schema-aws/pom.xml @@ -18,7 +18,7 @@ os-schema org.opengroup.osdu - 0.14.0-SNAPSHOT + 0.15.0-SNAPSHOT ../../pom.xml @@ -46,7 +46,7 @@ org.opengroup.osdu os-schema-core - 0.14.0-SNAPSHOT + 0.15.0-SNAPSHOT diff --git a/provider/schema-azure/pom.xml b/provider/schema-azure/pom.xml index c7f33fbf..ea38bcc1 100644 --- a/provider/schema-azure/pom.xml +++ b/provider/schema-azure/pom.xml @@ -18,13 +18,13 @@ os-schema org.opengroup.osdu - 0.14.0-SNAPSHOT + 0.15.0-SNAPSHOT ../../pom.xml 4.0.0 os-schema-azure - 0.14.0-SNAPSHOT + 0.15.0-SNAPSHOT Azure related implementation staff. jar @@ -32,7 +32,7 @@ 2.1.7 0.14.0-rc2 0.13.0 - 0.14.0-SNAPSHOT + 0.15.0-SNAPSHOT 1.10.19 5.4.0 8.20.2 diff --git a/provider/schema-gcp/pom.xml b/provider/schema-gcp/pom.xml index b96bbbcb..78441a57 100644 --- a/provider/schema-gcp/pom.xml +++ b/provider/schema-gcp/pom.xml @@ -3,7 +3,7 @@ org.opengroup.osdu os-schema - 0.14.0-SNAPSHOT + 0.15.0-SNAPSHOT ../../pom.xml @@ -46,7 +46,7 @@ org.opengroup.osdu os-schema-core - 0.14.0-SNAPSHOT + 0.15.0-SNAPSHOT diff --git a/provider/schema-ibm/pom.xml b/provider/schema-ibm/pom.xml index 6ff6b629..55f9b986 100644 --- a/provider/schema-ibm/pom.xml +++ b/provider/schema-ibm/pom.xml @@ -3,7 +3,7 @@ org.opengroup.osdu os-schema - 0.14.0-SNAPSHOT + 0.15.0-SNAPSHOT ../../pom.xml os-schema-ibm @@ -33,7 +33,7 @@ org.opengroup.osdu os-schema-core - 0.14.0-SNAPSHOT + 0.15.0-SNAPSHOT io.netty diff --git a/provider/schema-reference/pom.xml b/provider/schema-reference/pom.xml index ee9a3fef..94e64a1b 100644 --- a/provider/schema-reference/pom.xml +++ b/provider/schema-reference/pom.xml @@ -22,7 +22,7 @@ os-schema org.opengroup.osdu - 0.14.0-SNAPSHOT + 0.15.0-SNAPSHOT ../../pom.xml @@ -46,7 +46,7 @@ org.opengroup.osdu os-schema-core - 0.14.0-SNAPSHOT + 0.15.0-SNAPSHOT org.mongodb diff --git a/schema-core/pom.xml b/schema-core/pom.xml index 414d5461..68e730b5 100644 --- a/schema-core/pom.xml +++ b/schema-core/pom.xml @@ -3,7 +3,7 @@ org.opengroup.osdu os-schema - 0.14.0-SNAPSHOT + 0.15.0-SNAPSHOT ../pom.xml diff --git a/testing/pom.xml b/testing/pom.xml index 9a60bd2c..340eb7a1 100644 --- a/testing/pom.xml +++ b/testing/pom.xml @@ -3,7 +3,7 @@ org.opengroup.osdu os-schema-test - 0.14.0-SNAPSHOT + 0.15.0-SNAPSHOT Schema Service Integration Test Root Project pom diff --git a/testing/schema-test-azure/pom.xml b/testing/schema-test-azure/pom.xml index 8bc32ef7..f8f8ddcc 100644 --- a/testing/schema-test-azure/pom.xml +++ b/testing/schema-test-azure/pom.xml @@ -4,12 +4,12 @@ org.opengroup.osdu os-schema-test - 0.14.0-SNAPSHOT + 0.15.0-SNAPSHOT ../pom.xml schema-test-azure - 0.14.0-SNAPSHOT + 0.15.0-SNAPSHOT 0.7.0 0.6.1 diff --git a/testing/schema-test-core/pom.xml b/testing/schema-test-core/pom.xml index bfddc3cd..a06d46f8 100644 --- a/testing/schema-test-core/pom.xml +++ b/testing/schema-test-core/pom.xml @@ -4,7 +4,7 @@ org.opengroup.osdu os-schema-test - 0.14.0-SNAPSHOT + 0.15.0-SNAPSHOT ../pom.xml diff --git a/testing/schema-test-gcp/pom.xml b/testing/schema-test-gcp/pom.xml index ff54bfc5..8fca54b0 100644 --- a/testing/schema-test-gcp/pom.xml +++ b/testing/schema-test-gcp/pom.xml @@ -4,13 +4,13 @@ org.opengroup.osdu os-schema-test - 0.14.0-SNAPSHOT + 0.15.0-SNAPSHOT ../pom.xml org.opengroup.osdu os-schema-test-gcp - 0.14.0-SNAPSHOT + 0.15.0-SNAPSHOT jar -- GitLab From d04a7660aba62e80329915660d959f6e7ef341c1 Mon Sep 17 00:00:00 2001 From: David Diederich Date: Wed, 30 Mar 2022 02:19:54 -1000 Subject: [PATCH 10/15] Adding a few missed upgrades to 0.15.0-SNAPSHOT, which should have been in the previous commit --- testing/schema-test-azure/pom.xml | 2 +- testing/schema-test-core/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/testing/schema-test-azure/pom.xml b/testing/schema-test-azure/pom.xml index f8f8ddcc..8441d614 100644 --- a/testing/schema-test-azure/pom.xml +++ b/testing/schema-test-azure/pom.xml @@ -33,7 +33,7 @@ log4j-to-slf4j - 0.14.0-SNAPSHOT + 0.15.0-SNAPSHOT diff --git a/testing/schema-test-core/pom.xml b/testing/schema-test-core/pom.xml index a06d46f8..cee07293 100644 --- a/testing/schema-test-core/pom.xml +++ b/testing/schema-test-core/pom.xml @@ -32,7 +32,7 @@ log4j-to-slf4j - 0.14.0-SNAPSHOT + 0.15.0-SNAPSHOT -- GitLab From 569af8580c69e6c2e1b131638f421287acfc6f16 Mon Sep 17 00:00:00 2001 From: "Maksimelyan Tamashevich (EPAM)" Date: Wed, 30 Mar 2022 16:43:37 +0000 Subject: [PATCH 11/15] Gonrg 4423 modify helm/bootstrap for schema service --- .gitlab-ci.yml | 27 +++++++++++ devops/gcp/bootstrap-osdu-module/Dockerfile | 7 +-- .../bootstrap-osdu-module/bootstrap_schema.sh | 45 ++++++++++++++++--- .../gcp/bootstrap-osdu-module/validate-env.sh | 9 ++++ devops/gcp/bootstrap/Chart.yaml | 20 +++++++++ devops/gcp/bootstrap/templates/configmap.yaml | 15 +++++++ devops/gcp/bootstrap/templates/job.yaml | 30 +++++++++++++ devops/gcp/bootstrap/templates/secret.yaml | 12 +++++ devops/gcp/bootstrap/values.yaml | 9 ++++ .../{configmap.yml => configmap.yaml} | 9 ++-- devops/gcp/configmap/values.yaml | 9 ++-- devops/gcp/deploy/templates/deployment.yaml | 8 ++++ .../gcp/deploy/templates/service-account.yaml | 7 +++ devops/gcp/deploy/templates/service.yaml | 2 + ...rtual-service.yml => virtual-service.yaml} | 0 devops/gcp/deploy/values.yaml | 6 ++- 16 files changed, 199 insertions(+), 16 deletions(-) mode change 100644 => 100755 devops/gcp/bootstrap-osdu-module/bootstrap_schema.sh create mode 100755 devops/gcp/bootstrap-osdu-module/validate-env.sh create mode 100644 devops/gcp/bootstrap/Chart.yaml create mode 100644 devops/gcp/bootstrap/templates/configmap.yaml create mode 100644 devops/gcp/bootstrap/templates/job.yaml create mode 100644 devops/gcp/bootstrap/templates/secret.yaml create mode 100644 devops/gcp/bootstrap/values.yaml rename devops/gcp/configmap/templates/{configmap.yml => configmap.yaml} (67%) create mode 100644 devops/gcp/deploy/templates/service-account.yaml rename devops/gcp/deploy/templates/{virtual-service.yml => virtual-service.yaml} (100%) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 56d32c6c..8665b94e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -93,3 +93,30 @@ osdu-gcp-test: reports: junit: - $OSDU_GCP_TESTS_SUBDIR/target/*/TEST-*.xml + +osdu-gcp-helm-charts-master: + variables: + OSDU_GCP_HELM_BOOTSTRAP_DIR: "devops/gcp/bootstrap" + script: + - helm cm-push $OSDU_GCP_HELM_CONFIG_DIR ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/helm/stable --username gitlab-ci-token --password $CI_JOB_TOKEN + - helm cm-push $OSDU_GCP_HELM_DEPLOYMENT_DIR ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/helm/stable --username gitlab-ci-token --password $CI_JOB_TOKEN + - helm cm-push $OSDU_GCP_HELM_BOOTSTRAP_DIR ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/helm/stable --username gitlab-ci-token --password $CI_JOB_TOKEN + +osdu-gcp-helm-charts-release: + variables: + OSDU_GCP_HELM_BOOTSTRAP_DIR: "devops/gcp/bootstrap" + script: + - > + if [[ -z $CI_COMMIT_TAG ]] && [[ $CI_COMMIT_BRANCH =~ ^release\/[0-9]{1,2}.[0-9]{1,2}$ ]]; + then + RELEASE_VER=$(echo $CI_COMMIT_BRANCH | sed "s?^release/??"); + VER="$RELEASE_VER.0-release" + elif [[ $CI_COMMIT_TAG =~ ^v[0-9]{1,2}\.[0-9]{1,2}\.[0-9]{1,2}$ ]]; + then + VER=$(echo $CI_COMMIT_TAG | sed "s/^v//"); + else + VER="0.0.0-invalid"; + fi; + - helm cm-push $OSDU_GCP_HELM_CONFIG_DIR ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/helm/stable --version $VER --username gitlab-ci-token --password $CI_JOB_TOKEN + - helm cm-push $OSDU_GCP_HELM_DEPLOYMENT_DIR ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/helm/stable --version $VER --username gitlab-ci-token --password $CI_JOB_TOKEN + - helm cm-push $OSDU_GCP_HELM_BOOTSTRAP_DIR ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/helm/stable --version $VER --username gitlab-ci-token --password $CI_JOB_TOKEN diff --git a/devops/gcp/bootstrap-osdu-module/Dockerfile b/devops/gcp/bootstrap-osdu-module/Dockerfile index 988a80d2..667421bd 100644 --- a/devops/gcp/bootstrap-osdu-module/Dockerfile +++ b/devops/gcp/bootstrap-osdu-module/Dockerfile @@ -1,10 +1,11 @@ FROM google/cloud-sdk:slim -COPY ./devops/gcp/bootstrap-osdu-module/bootstrap_schema.sh /opt -COPY ./deployments /opt/ +WORKDIR /opt -RUN chmod 775 /opt/bootstrap_schema.sh +COPY ./devops/gcp/bootstrap-osdu-module/*.sh /opt/ +COPY ./deployments /opt/ +RUN apt upgrade && apt install jq -y RUN pip3 install --upgrade pip && pip3 install -r /opt/scripts/requirements.txt && pip3 install -r /opt/scripts/gcp-deployment-requirements.txt CMD ["/bin/bash", "-c", "source /opt/bootstrap_schema.sh"] diff --git a/devops/gcp/bootstrap-osdu-module/bootstrap_schema.sh b/devops/gcp/bootstrap-osdu-module/bootstrap_schema.sh old mode 100644 new mode 100755 index d668219d..fb30b6fd --- a/devops/gcp/bootstrap-osdu-module/bootstrap_schema.sh +++ b/devops/gcp/bootstrap-osdu-module/bootstrap_schema.sh @@ -2,12 +2,45 @@ set -ex -export BEARER_TOKEN=`gcloud auth print-identity-token --audiences=${AUDIENCES}` +source ./validate-env.sh "DATA_PARTITION" +source ./validate-env.sh "SCHEMA_URL" -echo "Clean-up for Datastore schemas" -python3 /opt/scripts/GcpDatastoreCleanUp.py +sleep 10 -sleep 5 +bootstrap_schema_onprem() { -echo "Bootstrap Schema Service" -python3 /opt/scripts/DeploySharedSchemas.py -u ${SCHEMA_URL}/api/schema-service/v1/schema + export BEARER_TOKEN="$(curl --location --request POST "${OPENID_PROVIDER_URL}/protocol/openid-connect/token" \ + --header "Content-Type: application/x-www-form-urlencoded" \ + --data-urlencode "grant_type=client_credentials" \ + --data-urlencode "scope=openid" \ + --data-urlencode "client_id=${OPENID_PROVIDER_CLIENT_ID}" \ + --data-urlencode "client_secret=${OPENID_PROVIDER_CLIENT_SECRET}" | jq -r ".id_token")" + + echo "Bootstrap Schema Service" + python3 ./scripts/DeploySharedSchemas.py -u ${SCHEMA_URL}/api/schema-service/v1/schema + +} + +bootstrap_schema_gcp() { + export BEARER_TOKEN=`gcloud auth print-identity-token --audiences=${AUDIENCES}` + + echo "Clean-up for Datastore schemas" + python3 ./scripts/GcpDatastoreCleanUp.py + + sleep 5 + + echo "Bootstrap Schema Service" + python3 ./scripts/DeploySharedSchemas.py -u ${SCHEMA_URL}/api/schema-service/v1/schema + +} + +if [ "${ONPREM_ENABLED}" == "true" ] +then + source ./validate-env.sh "OPENID_PROVIDER_URL" + source ./validate-env.sh "OPENID_PROVIDER_CLIENT_ID" + source ./validate-env.sh "OPENID_PROVIDER_CLIENT_SECRET" + bootstrap_schema_onprem +else + source ./validate-env.sh "AUDIENCES" + bootstrap_schema_gcp +fi diff --git a/devops/gcp/bootstrap-osdu-module/validate-env.sh b/devops/gcp/bootstrap-osdu-module/validate-env.sh new file mode 100755 index 00000000..63be07df --- /dev/null +++ b/devops/gcp/bootstrap-osdu-module/validate-env.sh @@ -0,0 +1,9 @@ +set -e + +ENV_VAR_NAME=$1 + +if [ "${!ENV_VAR_NAME}" = "" ] +then + echo "Missing environment variable '$ENV_VAR_NAME'. Please provide all variables and try again" + exit 1 +fi diff --git a/devops/gcp/bootstrap/Chart.yaml b/devops/gcp/bootstrap/Chart.yaml new file mode 100644 index 00000000..b0cbde6f --- /dev/null +++ b/devops/gcp/bootstrap/Chart.yaml @@ -0,0 +1,20 @@ +apiVersion: v2 +name: osdu-schema-bootstrap +description: A Helm chart for Kubernetes +# A chart can be either an 'application' or a 'library' chart. +# +# Application charts are a collection of templates that can be packaged into versioned archives +# to be deployed. +# +# Library charts provide useful utilities or functions for the chart developer. They're included as +# a dependency of application charts to inject those utilities and functions into the rendering +# pipeline. Library charts do not define any templates and therefore cannot be deployed. +type: application +# This is the chart version. This version number should be incremented each time you make changes +# to the chart and its templates, including the app version. +# Versions are expected to follow Semantic Versioning (https://semver.org/) +version: 0.1.0 +# This is the version number of the application being deployed. This version number should be +# incremented each time you make changes to the application. Versions are not expected to +# follow Semantic Versioning. They should reflect the version the application is using. +appVersion: 1.16.0 diff --git a/devops/gcp/bootstrap/templates/configmap.yaml b/devops/gcp/bootstrap/templates/configmap.yaml new file mode 100644 index 00000000..d0967a51 --- /dev/null +++ b/devops/gcp/bootstrap/templates/configmap.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + labels: + app: "{{ .Values.conf.app_name }}-bootstrap" + annotations: + rollme: {{ randAlphaNum 5 | quote }} + name: "{{ .Values.conf.app_name }}-bootstrap-job-configmap" + namespace: "{{ .Release.Namespace }}" +data: + DATA_PARTITION: "{{ .Values.data.data_partition_id }}" + OPENID_PROVIDER_CLIENT_ID: "{{ .Values.data.openid_provider_client_id }}" + OPENID_PROVIDER_URL: "{{ .Values.data.openid_provider_url }}" + ONPREM_ENABLED: "{{ .Values.data.onprem_enabled }}" + SCHEMA_URL: "{{ .Values.data.shema_host }}" diff --git a/devops/gcp/bootstrap/templates/job.yaml b/devops/gcp/bootstrap/templates/job.yaml new file mode 100644 index 00000000..042cf427 --- /dev/null +++ b/devops/gcp/bootstrap/templates/job.yaml @@ -0,0 +1,30 @@ +apiVersion: batch/v1 +kind: Job +metadata: + labels: + app: "{{ .Values.conf.app_name }}-bootstrap" + name: "{{ .Values.conf.app_name }}-bootstrap-job" + namespace: "{{ .Release.Namespace }}" + annotations: + "helm.sh/hook": post-install,post-upgrade + "helm.sh/hook-weight": "100" +spec: + template: + metadata: + annotations: + sidecar.istio.io/inject: "false" + spec: + {{- with .Values.conf.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} + {{- end }} + containers: + - name: "{{ .Values.conf.app_name }}-bootstrap-job" + image: "{{ .Values.conf.image }}" + envFrom: + - configMapRef: + name: "{{ .Values.conf.app_name }}-bootstrap-job-configmap" + - secretRef: + name: "{{ .Values.conf.app_name }}-bootstrap-job-secret" + restartPolicy: Never + backoffLimit: 3 diff --git a/devops/gcp/bootstrap/templates/secret.yaml b/devops/gcp/bootstrap/templates/secret.yaml new file mode 100644 index 00000000..e336caee --- /dev/null +++ b/devops/gcp/bootstrap/templates/secret.yaml @@ -0,0 +1,12 @@ +apiVersion: v1 +kind: Secret +metadata: + labels: + app: "{{ .Values.conf.app_name }}-bootstrap" + annotations: + rollme: {{ randAlphaNum 5 | quote }} + name: "{{ .Values.conf.app_name }}-bootstrap-job-secret" + namespace: "{{ .Release.Namespace }}" +type: Opaque +data: + OPENID_PROVIDER_CLIENT_SECRET: "{{ .Values.secret.openid_provider_client_secret | b64enc }}" diff --git a/devops/gcp/bootstrap/values.yaml b/devops/gcp/bootstrap/values.yaml new file mode 100644 index 00000000..9a500bc5 --- /dev/null +++ b/devops/gcp/bootstrap/values.yaml @@ -0,0 +1,9 @@ +data: + data_partition_id: "" + onprem_enabled: "true" + shema_host: "http://schema" + keycloak_secret_name: "" +conf: + app_name: "schema" + image: "" + imagePullSecrets: [] diff --git a/devops/gcp/configmap/templates/configmap.yml b/devops/gcp/configmap/templates/configmap.yaml similarity index 67% rename from devops/gcp/configmap/templates/configmap.yml rename to devops/gcp/configmap/templates/configmap.yaml index 950e9743..d26233d3 100644 --- a/devops/gcp/configmap/templates/configmap.yml +++ b/devops/gcp/configmap/templates/configmap.yaml @@ -3,12 +3,15 @@ kind: ConfigMap metadata: labels: app: "{{ .Values.conf.app_name }}" + annotations: + rollme: {{ randAlphaNum 5 | quote }} name: "{{ .Values.conf.configmap }}" namespace: "{{ .Release.Namespace }}" data: LOG_LEVEL: "{{ .Values.data.log_level }}" - PARTITION_API: "{{ .Values.data.partition_api }}" + SPRING_PROFILES_ACTIVE: "{{ .Values.data.spring_profiles_active }}" + GCP_SCHEMA_CHANGED_TOPIC_NAME: "{{ .Values.data.gcp_schema_changed_topic_name }}" + {{- if not .Values.conf.on_prem_enabled }} GOOGLE_AUDIENCES: "{{ .Values.data.google_audiences }}" - AUTHORIZE_API: "{{ .Values.data.authorize_api }}" SHARED_TENANT_NAME: "{{ .Values.data.shared_tenant_name }}" - SPRING_PROFILES_ACTIVE: "{{ .Values.data.spring_profiles_active }}" + {{- end }} diff --git a/devops/gcp/configmap/values.yaml b/devops/gcp/configmap/values.yaml index a671eabc..33d6fbe2 100644 --- a/devops/gcp/configmap/values.yaml +++ b/devops/gcp/configmap/values.yaml @@ -3,13 +3,16 @@ # Declare variables to be passed into your templates. data: + # common log_level: "" - authorize_api: "" - partition_api: "" + spring_profiles_active: "gcp" + gcp_schema_changed_topic_name: "schema_changed" + # gcp google_audiences: "" shared_tenant_name: "" - spring_profiles_active: "gcp" conf: configmap: "schema-config" app_name: "schema" + secret_name: "schema-secret" + on_prem_enabled: false diff --git a/devops/gcp/deploy/templates/deployment.yaml b/devops/gcp/deploy/templates/deployment.yaml index 7fec0eb2..0f4b50bc 100644 --- a/devops/gcp/deploy/templates/deployment.yaml +++ b/devops/gcp/deploy/templates/deployment.yaml @@ -24,6 +24,14 @@ spec: envFrom: - configMapRef: name: "{{ .Values.conf.configmap }}" + {{- if .Values.conf.on_prem_enabled }} + - secretRef: + name: "{{ .Values.conf.minio_secret_name }}" + - secretRef: + name: "{{ .Values.conf.postgres_secret_name }}" + - secretRef: + name: "{{ .Values.conf.rabbitmq_secret_name }}" + {{- end }} securityContext: allowPrivilegeEscalation: false runAsUser: 0 diff --git a/devops/gcp/deploy/templates/service-account.yaml b/devops/gcp/deploy/templates/service-account.yaml new file mode 100644 index 00000000..3fede170 --- /dev/null +++ b/devops/gcp/deploy/templates/service-account.yaml @@ -0,0 +1,7 @@ +{{- if .Values.conf.on_prem_enabled }} +apiVersion: v1 +kind: ServiceAccount +metadata: + name: "{{ .Values.data.serviceAccountName }}" + namespace: "{{ .Release.Namespace }}" +{{- end }} diff --git a/devops/gcp/deploy/templates/service.yaml b/devops/gcp/deploy/templates/service.yaml index d92e1b6f..2a1c49cd 100644 --- a/devops/gcp/deploy/templates/service.yaml +++ b/devops/gcp/deploy/templates/service.yaml @@ -3,7 +3,9 @@ kind: Service metadata: name: "{{ .Values.conf.app_name }}" annotations: + {{- if not .Values.conf.on_prem_enabled }} cloud.google.com/neg: '{"ingress": true}' + {{- end }} namespace: "{{ .Release.Namespace }}" labels: app: "{{ .Values.conf.app_name }}" diff --git a/devops/gcp/deploy/templates/virtual-service.yml b/devops/gcp/deploy/templates/virtual-service.yaml similarity index 100% rename from devops/gcp/deploy/templates/virtual-service.yml rename to devops/gcp/deploy/templates/virtual-service.yaml diff --git a/devops/gcp/deploy/values.yaml b/devops/gcp/deploy/values.yaml index 92a7d348..63fdedf8 100644 --- a/devops/gcp/deploy/values.yaml +++ b/devops/gcp/deploy/values.yaml @@ -7,10 +7,14 @@ data: requests_memory: "384M" limits_cpu: "1" limits_memory: "1G" - serviceAccountName: "" + serviceAccountName: "schema-k8s" imagePullPolicy: "IfNotPresent" image: "" conf: configmap: "schema-config" app_name: "schema" + minio_secret_name: "minio-secret" + postgres_secret_name: "" + rabbitmq_secret_name: "" + on_prem_enabled: false -- GitLab From 1818c9058a9ab699a2c60a20c3c005c1da1109dc Mon Sep 17 00:00:00 2001 From: Shiv Singh Date: Thu, 31 Mar 2022 11:29:48 +0000 Subject: [PATCH 12/15] Adding exit code for schema container --- deployments/scripts/azure/bootstrap.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/deployments/scripts/azure/bootstrap.sh b/deployments/scripts/azure/bootstrap.sh index f7f2012a..dd02326c 100644 --- a/deployments/scripts/azure/bootstrap.sh +++ b/deployments/scripts/azure/bootstrap.sh @@ -38,4 +38,10 @@ if [ ! -z "$CONFIG_MAP_NAME" -a "$CONFIG_MAP_NAME" != " " ]; then --from-literal=status="$currentStatus" \ --from-literal=message="$Message" \ -o yaml --dry-run=client | kubectl replace -f - -fi \ No newline at end of file +fi + +if [[ ${currentStatus} == "success" ]]; then + exit 0 +else + exit 1 +fi -- GitLab From 08cfbcb8940fc02db01deddb549ed5e79a288b73 Mon Sep 17 00:00:00 2001 From: AArora3 Date: Wed, 30 Mar 2022 13:06:35 +0530 Subject: [PATCH 13/15] fixed empty authority,source,entityType validation --- .../schema/constants/SchemaConstants.java | 1 + .../osdu/schema/model/SchemaIdentity.java | 5 + .../osdu/schema/api/SchemaControllerTest.java | 57 ++ ...hemaService_POST_SchemaValidations.feature | 12 + .../inputPayloadWithEmptyAuthority.json | 544 ++++++++++++++++++ .../inputPayloadWithEmptyEntity.json | 544 ++++++++++++++++++ .../inputPayloadWithEmptySource.json | 544 ++++++++++++++++++ .../EmptyAuthorityPayload.json | 13 + .../output_payloads/EmptyEntityPayload.json | 13 + .../output_payloads/EmptySourcePayload.json | 13 + 10 files changed, 1746 insertions(+) create mode 100644 testing/schema-test-core/src/test/resources/input_payloads/inputPayloadWithEmptyAuthority.json create mode 100644 testing/schema-test-core/src/test/resources/input_payloads/inputPayloadWithEmptyEntity.json create mode 100644 testing/schema-test-core/src/test/resources/input_payloads/inputPayloadWithEmptySource.json create mode 100644 testing/schema-test-core/src/test/resources/output_payloads/EmptyAuthorityPayload.json create mode 100644 testing/schema-test-core/src/test/resources/output_payloads/EmptyEntityPayload.json create mode 100644 testing/schema-test-core/src/test/resources/output_payloads/EmptySourcePayload.json diff --git a/schema-core/src/main/java/org/opengroup/osdu/schema/constants/SchemaConstants.java b/schema-core/src/main/java/org/opengroup/osdu/schema/constants/SchemaConstants.java index eaaac410..38af6fb5 100644 --- a/schema-core/src/main/java/org/opengroup/osdu/schema/constants/SchemaConstants.java +++ b/schema-core/src/main/java/org/opengroup/osdu/schema/constants/SchemaConstants.java @@ -21,6 +21,7 @@ public class SchemaConstants { public static final String SCHEMA_KIND_DELIMITER = ":"; public static final String SCHEMA_Version_DELIMITER = "."; public static final String SCHEMA_KIND_REGEX="^([^.:\\r\\n\\s]+):([^.:\\r\\n\\s]+):([^.:\\r\\n\\s]+):(([\\d]+)[.]([\\d]+)[.]([\\d]+))$"; + public static final String SCHEMA_EMPTY_REGEX = "^(?!\\s*$).+"; // schema public static final String SCHEMA_KIND = "schema"; diff --git a/schema-core/src/main/java/org/opengroup/osdu/schema/model/SchemaIdentity.java b/schema-core/src/main/java/org/opengroup/osdu/schema/model/SchemaIdentity.java index ada15fa5..b2b2424d 100644 --- a/schema-core/src/main/java/org/opengroup/osdu/schema/model/SchemaIdentity.java +++ b/schema-core/src/main/java/org/opengroup/osdu/schema/model/SchemaIdentity.java @@ -1,11 +1,13 @@ package org.opengroup.osdu.schema.model; import javax.validation.constraints.NotNull; +import javax.validation.constraints.Pattern; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; +import org.opengroup.osdu.schema.constants.SchemaConstants; @Data @Builder @@ -14,12 +16,15 @@ import lombok.NoArgsConstructor; public class SchemaIdentity { @NotNull(message = "authority must not be null") + @Pattern(regexp = SchemaConstants.SCHEMA_EMPTY_REGEX, message = "authority must not be empty") private String authority; @NotNull(message = "source must not be null") + @Pattern(regexp = SchemaConstants.SCHEMA_EMPTY_REGEX, message = "source must not be empty") private String source; @NotNull(message = "entityType must not be null") + @Pattern(regexp = SchemaConstants.SCHEMA_EMPTY_REGEX, message = "entityType must not be empty") private String entityType; @NotNull(message = "schemaVersionMajor must not be null") diff --git a/schema-core/src/test/java/org/opengroup/osdu/schema/api/SchemaControllerTest.java b/schema-core/src/test/java/org/opengroup/osdu/schema/api/SchemaControllerTest.java index f294e84b..75b6e4c8 100644 --- a/schema-core/src/test/java/org/opengroup/osdu/schema/api/SchemaControllerTest.java +++ b/schema-core/src/test/java/org/opengroup/osdu/schema/api/SchemaControllerTest.java @@ -79,6 +79,30 @@ public class SchemaControllerTest { schemaController.upsertSchema(schemaRequest); } + @Test(expected = BadRequestException.class) + public void testCreateEmptyAuthoritySchema_Failed() throws ApplicationException, BadRequestException { + schemaRequest = getSchemaRequestEmptyAuthority(); + + when(schemaService.createSchema(schemaRequest)).thenThrow(BadRequestException.class); + assertNotNull(schemaController.createSchema(schemaRequest)); + } + + @Test(expected = BadRequestException.class) + public void testCreateEmptyEntitySchema_Failed() throws ApplicationException, BadRequestException { + schemaRequest = getSchemaRequestEmptySource(); + + when(schemaService.createSchema(schemaRequest)).thenThrow(BadRequestException.class); + assertNotNull(schemaController.createSchema(schemaRequest)); + } + + @Test(expected = BadRequestException.class) + public void testCreateEmptySourceSchema_Failed() throws ApplicationException, BadRequestException { + schemaRequest = getSchemaRequestEmptyEntity(); + + when(schemaService.createSchema(schemaRequest)).thenThrow(BadRequestException.class); + assertNotNull(schemaController.createSchema(schemaRequest)); + } + @Test public void testGetSchemaInfoList() throws ApplicationException, NotFoundException, BadRequestException { schemaRequest = getSchemaRequestObject(); @@ -121,4 +145,37 @@ public class SchemaControllerTest { .schemaVersionMajor(1L).schemaVersionMinor(1L).source("wks").build()) .build(); } + + private SchemaRequest getSchemaRequestEmptyAuthority() { + return SchemaRequest.builder().schema(null).schemaInfo(SchemaInfo.builder().createdBy("creator") + .dateCreated(new Date(System.currentTimeMillis())) + .schemaIdentity(SchemaIdentity.builder().authority("").entityType("well").id("..wks.well.1.1") + .schemaVersionMajor(1L).schemaVersionMinor(1L).source("wks").build()) + .scope(SchemaScope.INTERNAL).status(SchemaStatus.DEVELOPMENT) + .supersededBy(SchemaIdentity.builder().authority("").entityType("well").id("..wks.well.1.4") + .schemaVersionMajor(1L).schemaVersionMinor(1L).source("wks").build()) + .build()).build(); + } + + private SchemaRequest getSchemaRequestEmptyEntity() { + return SchemaRequest.builder().schema(null).schemaInfo(SchemaInfo.builder().createdBy("creator") + .dateCreated(new Date(System.currentTimeMillis())) + .schemaIdentity(SchemaIdentity.builder().authority("os").entityType("").id("os..well.1.1") + .schemaVersionMajor(1L).schemaVersionMinor(1L).source("well").build()) + .scope(SchemaScope.INTERNAL).status(SchemaStatus.DEVELOPMENT) + .supersededBy(SchemaIdentity.builder().authority("os").entityType("").id("os..well.1.4") + .schemaVersionMajor(1L).schemaVersionMinor(1L).source("well").build()) + .build()).build(); + } + + private SchemaRequest getSchemaRequestEmptySource() { + return SchemaRequest.builder().schema(null).schemaInfo(SchemaInfo.builder().createdBy("creator") + .dateCreated(new Date(System.currentTimeMillis())) + .schemaIdentity(SchemaIdentity.builder().authority("os").entityType("well").id("os.well.1.1") + .schemaVersionMajor(1L).schemaVersionMinor(1L).source("").build()) + .scope(SchemaScope.INTERNAL).status(SchemaStatus.DEVELOPMENT) + .supersededBy(SchemaIdentity.builder().authority("os").entityType("well").id("os.well.1.4") + .schemaVersionMajor(1L).schemaVersionMinor(1L).source("").build()) + .build()).build(); + } } \ No newline at end of file diff --git a/testing/schema-test-core/src/test/resources/features/IntegrationTest_SchemaService_POST_SchemaValidations.feature b/testing/schema-test-core/src/test/resources/features/IntegrationTest_SchemaService_POST_SchemaValidations.feature index 38a79554..4b2c074a 100644 --- a/testing/schema-test-core/src/test/resources/features/IntegrationTest_SchemaService_POST_SchemaValidations.feature +++ b/testing/schema-test-core/src/test/resources/features/IntegrationTest_SchemaService_POST_SchemaValidations.feature @@ -562,3 +562,15 @@ Feature: To verify schema validation functionality of POST schema Service Examples: | RefBaseInputPayload | InputPayloadWithChanges | tenant | ReponseStatusCode | ResponseMessage1 | ReponseStatusCode1 | ResponseMessage | | "/input_payloads/RefBaseSchema_New.json" | "/input_payloads/RefBaseSchema_EntityNameChanged_MinorVersion.json" | "TENANT1" | "400" | "/output_payloads/SchemaPost_PrivateScope_SuccessfulCreation.json" | "201" | "/output_payloads/SchemaPost_MinorBreakingChangeError.json" | + + @SchemaService + Scenario Outline: Verify that Schema Service's POST API responds as bad request for empty value of authority, source and entity + When I hit schema service POST API with and data-partition-id as + Then service should respond back with error and + + Examples: + | InputPayload | ReponseStatusCode | ResponseMessage | tenant | + | "/input_payloads/inputPayloadWithEmptyAuthority.json" | "400" | "/output_payloads/EmptyAuthorityPayload.json" | "TENANT1" | + | "/input_payloads/inputPayloadWithEmptyEntity.json" | "400" | "/output_payloads/EmptyEntityPayload.json" | "TENANT1" | + | "/input_payloads/inputPayloadWithEmptySource.json" | "400" | "/output_payloads/EmptySourcePayload.json" | "TENANT1" | + diff --git a/testing/schema-test-core/src/test/resources/input_payloads/inputPayloadWithEmptyAuthority.json b/testing/schema-test-core/src/test/resources/input_payloads/inputPayloadWithEmptyAuthority.json new file mode 100644 index 00000000..a4477210 --- /dev/null +++ b/testing/schema-test-core/src/test/resources/input_payloads/inputPayloadWithEmptyAuthority.json @@ -0,0 +1,544 @@ +{ + "schemaInfo": { + "schemaIdentity": { + "authority": "", + "source": "testSource1", + "entityType": "testEntity1", + "schemaVersionMajor": 1, + "schemaVersionMinor": 1, + "schemaVersionPatch": 0, + "id": ":testSource1:testEntity1:1.1.0" + }, + "status": "DEVELOPMENT" + }, + "schema": { + "$schema": "http://json-schema.org/draft-07/schema#", + "description": "The entity well.", + "title": "Well", + "type": "object", + "x-slb-lifecycle-state": "published", + "definitions": { + "FeatureCollection": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "GeoJSON FeatureCollection", + "type": "object", + "required": [ + "type", + "features" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "FeatureCollection" + ] + }, + "features": { + "type": "array", + "items": { + "title": "GeoJSON Feature", + "type": "object", + "required": [ + "type", + "properties", + "geometry" + ], + "properties": { + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "geometry": { + "oneOf": [ + { + "type": "null" + }, + { + "title": "GeoJSON Point", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "coordinates": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + }, + "type": { + "type": "string", + "enum": [ + "Point" + ] + } + } + }, + { + "title": "GeoJSON LineString", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "coordinates": { + "minItems": 2, + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + }, + "type": { + "type": "string", + "enum": [ + "LineString" + ] + } + } + }, + { + "title": "GeoJSON Polygon", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "coordinates": { + "type": "array", + "items": { + "minItems": 4, + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + } + }, + "type": { + "type": "string", + "enum": [ + "Polygon" + ] + } + } + }, + { + "title": "GeoJSON MultiPoint", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "coordinates": { + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + }, + "type": { + "type": "string", + "enum": [ + "MultiPoint" + ] + } + } + }, + { + "title": "GeoJSON MultiLineString", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "coordinates": { + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + } + }, + "type": { + "type": "string", + "enum": [ + "MultiLineString" + ] + } + } + }, + { + "title": "GeoJSON MultiPolygon", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "coordinates": { + "type": "array", + "items": { + "type": "array", + "items": { + "minItems": 4, + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + } + } + }, + "type": { + "type": "string", + "enum": [ + "MultiPolygon" + ] + } + } + }, + { + "title": "GeoJSON GeometryCollection", + "type": "object", + "required": [ + "type", + "geometries" + ], + "properties": { + "geometries": { + "type": "array", + "items": { + "oneOf": [ + { + "title": "GeoJSON Point", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "coordinates": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + }, + "type": { + "type": "string", + "enum": [ + "Point" + ] + } + } + }, + { + "title": "GeoJSON LineString", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "coordinates": { + "minItems": 2, + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + }, + "type": { + "type": "string", + "enum": [ + "LineString" + ] + } + } + }, + { + "title": "GeoJSON Polygon", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "coordinates": { + "type": "array", + "items": { + "minItems": 4, + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + } + }, + "type": { + "type": "string", + "enum": [ + "Polygon" + ] + } + } + }, + { + "title": "GeoJSON MultiPoint", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "coordinates": { + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + }, + "type": { + "type": "string", + "enum": [ + "MultiPoint" + ] + } + } + }, + { + "title": "GeoJSON MultiLineString", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "coordinates": { + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + } + }, + "type": { + "type": "string", + "enum": [ + "MultiLineString" + ] + } + } + }, + { + "title": "GeoJSON MultiPolygon", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "coordinates": { + "type": "array", + "items": { + "type": "array", + "items": { + "minItems": 4, + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + } + } + }, + "type": { + "type": "string", + "enum": [ + "MultiPolygon" + ] + } + } + } + ] + } + }, + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "type": { + "type": "string", + "enum": [ + "GeometryCollection" + ] + } + } + } + ] + }, + "type": { + "type": "string", + "enum": [ + "Feature" + ] + }, + "properties": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object" + } + ] + } + } + } + }, + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + } + }, + "$id": "https://geojson.org/schema/FeatureCollection.json" + } + } + } +} \ No newline at end of file diff --git a/testing/schema-test-core/src/test/resources/input_payloads/inputPayloadWithEmptyEntity.json b/testing/schema-test-core/src/test/resources/input_payloads/inputPayloadWithEmptyEntity.json new file mode 100644 index 00000000..a3e09801 --- /dev/null +++ b/testing/schema-test-core/src/test/resources/input_payloads/inputPayloadWithEmptyEntity.json @@ -0,0 +1,544 @@ +{ + "schemaInfo": { + "schemaIdentity": { + "authority": "testAuthority2", + "source": "testSource2", + "entityType": "", + "schemaVersionMajor": 1, + "schemaVersionMinor": 1, + "schemaVersionPatch": 0, + "id": "testAuthority2:testSource2::1.1.0" + }, + "status": "DEVELOPMENT" + }, + "schema": { + "$schema": "http://json-schema.org/draft-07/schema#", + "description": "The entity well.", + "title": "Well", + "type": "object", + "x-slb-lifecycle-state": "published", + "definitions": { + "FeatureCollection": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "GeoJSON FeatureCollection", + "type": "object", + "required": [ + "type", + "features" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "FeatureCollection" + ] + }, + "features": { + "type": "array", + "items": { + "title": "GeoJSON Feature", + "type": "object", + "required": [ + "type", + "properties", + "geometry" + ], + "properties": { + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "geometry": { + "oneOf": [ + { + "type": "null" + }, + { + "title": "GeoJSON Point", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "coordinates": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + }, + "type": { + "type": "string", + "enum": [ + "Point" + ] + } + } + }, + { + "title": "GeoJSON LineString", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "coordinates": { + "minItems": 2, + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + }, + "type": { + "type": "string", + "enum": [ + "LineString" + ] + } + } + }, + { + "title": "GeoJSON Polygon", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "coordinates": { + "type": "array", + "items": { + "minItems": 4, + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + } + }, + "type": { + "type": "string", + "enum": [ + "Polygon" + ] + } + } + }, + { + "title": "GeoJSON MultiPoint", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "coordinates": { + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + }, + "type": { + "type": "string", + "enum": [ + "MultiPoint" + ] + } + } + }, + { + "title": "GeoJSON MultiLineString", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "coordinates": { + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + } + }, + "type": { + "type": "string", + "enum": [ + "MultiLineString" + ] + } + } + }, + { + "title": "GeoJSON MultiPolygon", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "coordinates": { + "type": "array", + "items": { + "type": "array", + "items": { + "minItems": 4, + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + } + } + }, + "type": { + "type": "string", + "enum": [ + "MultiPolygon" + ] + } + } + }, + { + "title": "GeoJSON GeometryCollection", + "type": "object", + "required": [ + "type", + "geometries" + ], + "properties": { + "geometries": { + "type": "array", + "items": { + "oneOf": [ + { + "title": "GeoJSON Point", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "coordinates": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + }, + "type": { + "type": "string", + "enum": [ + "Point" + ] + } + } + }, + { + "title": "GeoJSON LineString", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "coordinates": { + "minItems": 2, + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + }, + "type": { + "type": "string", + "enum": [ + "LineString" + ] + } + } + }, + { + "title": "GeoJSON Polygon", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "coordinates": { + "type": "array", + "items": { + "minItems": 4, + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + } + }, + "type": { + "type": "string", + "enum": [ + "Polygon" + ] + } + } + }, + { + "title": "GeoJSON MultiPoint", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "coordinates": { + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + }, + "type": { + "type": "string", + "enum": [ + "MultiPoint" + ] + } + } + }, + { + "title": "GeoJSON MultiLineString", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "coordinates": { + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + } + }, + "type": { + "type": "string", + "enum": [ + "MultiLineString" + ] + } + } + }, + { + "title": "GeoJSON MultiPolygon", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "coordinates": { + "type": "array", + "items": { + "type": "array", + "items": { + "minItems": 4, + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + } + } + }, + "type": { + "type": "string", + "enum": [ + "MultiPolygon" + ] + } + } + } + ] + } + }, + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "type": { + "type": "string", + "enum": [ + "GeometryCollection" + ] + } + } + } + ] + }, + "type": { + "type": "string", + "enum": [ + "Feature" + ] + }, + "properties": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object" + } + ] + } + } + } + }, + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + } + }, + "$id": "https://geojson.org/schema/FeatureCollection.json" + } + } + } +} \ No newline at end of file diff --git a/testing/schema-test-core/src/test/resources/input_payloads/inputPayloadWithEmptySource.json b/testing/schema-test-core/src/test/resources/input_payloads/inputPayloadWithEmptySource.json new file mode 100644 index 00000000..efc97539 --- /dev/null +++ b/testing/schema-test-core/src/test/resources/input_payloads/inputPayloadWithEmptySource.json @@ -0,0 +1,544 @@ +{ + "schemaInfo": { + "schemaIdentity": { + "authority": "testAuthority3", + "source": "", + "entityType": "testEntity3", + "schemaVersionMajor": 1, + "schemaVersionMinor": 1, + "schemaVersionPatch": 0, + "id": "testAuthority3::testEntity3:1.1.0" + }, + "status": "DEVELOPMENT" + }, + "schema": { + "$schema": "http://json-schema.org/draft-07/schema#", + "description": "The entity well.", + "title": "Well", + "type": "object", + "x-slb-lifecycle-state": "published", + "definitions": { + "FeatureCollection": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "GeoJSON FeatureCollection", + "type": "object", + "required": [ + "type", + "features" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "FeatureCollection" + ] + }, + "features": { + "type": "array", + "items": { + "title": "GeoJSON Feature", + "type": "object", + "required": [ + "type", + "properties", + "geometry" + ], + "properties": { + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "geometry": { + "oneOf": [ + { + "type": "null" + }, + { + "title": "GeoJSON Point", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "coordinates": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + }, + "type": { + "type": "string", + "enum": [ + "Point" + ] + } + } + }, + { + "title": "GeoJSON LineString", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "coordinates": { + "minItems": 2, + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + }, + "type": { + "type": "string", + "enum": [ + "LineString" + ] + } + } + }, + { + "title": "GeoJSON Polygon", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "coordinates": { + "type": "array", + "items": { + "minItems": 4, + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + } + }, + "type": { + "type": "string", + "enum": [ + "Polygon" + ] + } + } + }, + { + "title": "GeoJSON MultiPoint", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "coordinates": { + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + }, + "type": { + "type": "string", + "enum": [ + "MultiPoint" + ] + } + } + }, + { + "title": "GeoJSON MultiLineString", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "coordinates": { + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + } + }, + "type": { + "type": "string", + "enum": [ + "MultiLineString" + ] + } + } + }, + { + "title": "GeoJSON MultiPolygon", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "coordinates": { + "type": "array", + "items": { + "type": "array", + "items": { + "minItems": 4, + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + } + } + }, + "type": { + "type": "string", + "enum": [ + "MultiPolygon" + ] + } + } + }, + { + "title": "GeoJSON GeometryCollection", + "type": "object", + "required": [ + "type", + "geometries" + ], + "properties": { + "geometries": { + "type": "array", + "items": { + "oneOf": [ + { + "title": "GeoJSON Point", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "coordinates": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + }, + "type": { + "type": "string", + "enum": [ + "Point" + ] + } + } + }, + { + "title": "GeoJSON LineString", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "coordinates": { + "minItems": 2, + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + }, + "type": { + "type": "string", + "enum": [ + "LineString" + ] + } + } + }, + { + "title": "GeoJSON Polygon", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "coordinates": { + "type": "array", + "items": { + "minItems": 4, + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + } + }, + "type": { + "type": "string", + "enum": [ + "Polygon" + ] + } + } + }, + { + "title": "GeoJSON MultiPoint", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "coordinates": { + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + }, + "type": { + "type": "string", + "enum": [ + "MultiPoint" + ] + } + } + }, + { + "title": "GeoJSON MultiLineString", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "coordinates": { + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + } + }, + "type": { + "type": "string", + "enum": [ + "MultiLineString" + ] + } + } + }, + { + "title": "GeoJSON MultiPolygon", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "coordinates": { + "type": "array", + "items": { + "type": "array", + "items": { + "minItems": 4, + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + } + } + }, + "type": { + "type": "string", + "enum": [ + "MultiPolygon" + ] + } + } + } + ] + } + }, + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "type": { + "type": "string", + "enum": [ + "GeometryCollection" + ] + } + } + } + ] + }, + "type": { + "type": "string", + "enum": [ + "Feature" + ] + }, + "properties": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object" + } + ] + } + } + } + }, + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + } + }, + "$id": "https://geojson.org/schema/FeatureCollection.json" + } + } + } +} \ No newline at end of file diff --git a/testing/schema-test-core/src/test/resources/output_payloads/EmptyAuthorityPayload.json b/testing/schema-test-core/src/test/resources/output_payloads/EmptyAuthorityPayload.json new file mode 100644 index 00000000..15bfd759 --- /dev/null +++ b/testing/schema-test-core/src/test/resources/output_payloads/EmptyAuthorityPayload.json @@ -0,0 +1,13 @@ +{ + "error": { + "code": 400, + "message": "Validation Error", + "errors": [ + { + "domain": "global", + "reason": "badRequest", + "message": "authority must not be empty" + } + ] + } +} \ No newline at end of file diff --git a/testing/schema-test-core/src/test/resources/output_payloads/EmptyEntityPayload.json b/testing/schema-test-core/src/test/resources/output_payloads/EmptyEntityPayload.json new file mode 100644 index 00000000..a41b1f3a --- /dev/null +++ b/testing/schema-test-core/src/test/resources/output_payloads/EmptyEntityPayload.json @@ -0,0 +1,13 @@ +{ + "error": { + "code": 400, + "message": "Validation Error", + "errors": [ + { + "domain": "global", + "reason": "badRequest", + "message": "entityType must not be empty" + } + ] + } +} \ No newline at end of file diff --git a/testing/schema-test-core/src/test/resources/output_payloads/EmptySourcePayload.json b/testing/schema-test-core/src/test/resources/output_payloads/EmptySourcePayload.json new file mode 100644 index 00000000..851ab58c --- /dev/null +++ b/testing/schema-test-core/src/test/resources/output_payloads/EmptySourcePayload.json @@ -0,0 +1,13 @@ +{ + "error": { + "code": 400, + "message": "Validation Error", + "errors": [ + { + "domain": "global", + "reason": "badRequest", + "message": "source must not be empty" + } + ] + } +} \ No newline at end of file -- GitLab From a8b61f449fde1605ad242aa2c8a41e30c30b9bd5 Mon Sep 17 00:00:00 2001 From: AArora3 Date: Thu, 31 Mar 2022 15:00:08 +0530 Subject: [PATCH 14/15] fixed comments --- .../schema/constants/SchemaConstants.java | 2 +- .../osdu/schema/model/SchemaIdentity.java | 6 +- .../osdu/schema/api/SchemaControllerTest.java | 76 +++ .../inputPayloadWithEmptyAuthority.json | 534 +----------------- .../inputPayloadWithEmptyEntity.json | 528 +---------------- .../inputPayloadWithEmptySource.json | 534 +----------------- .../EmptyAuthorityPayload.json | 2 +- .../output_payloads/EmptyEntityPayload.json | 2 +- .../output_payloads/EmptySourcePayload.json | 2 +- 9 files changed, 92 insertions(+), 1594 deletions(-) diff --git a/schema-core/src/main/java/org/opengroup/osdu/schema/constants/SchemaConstants.java b/schema-core/src/main/java/org/opengroup/osdu/schema/constants/SchemaConstants.java index 38af6fb5..c4622126 100644 --- a/schema-core/src/main/java/org/opengroup/osdu/schema/constants/SchemaConstants.java +++ b/schema-core/src/main/java/org/opengroup/osdu/schema/constants/SchemaConstants.java @@ -21,7 +21,7 @@ public class SchemaConstants { public static final String SCHEMA_KIND_DELIMITER = ":"; public static final String SCHEMA_Version_DELIMITER = "."; public static final String SCHEMA_KIND_REGEX="^([^.:\\r\\n\\s]+):([^.:\\r\\n\\s]+):([^.:\\r\\n\\s]+):(([\\d]+)[.]([\\d]+)[.]([\\d]+))$"; - public static final String SCHEMA_EMPTY_REGEX = "^(?!\\s*$).+"; + public static final String SCHEMA_EMPTY_REGEX = "^[\\w\\-\\.]+$"; // schema public static final String SCHEMA_KIND = "schema"; diff --git a/schema-core/src/main/java/org/opengroup/osdu/schema/model/SchemaIdentity.java b/schema-core/src/main/java/org/opengroup/osdu/schema/model/SchemaIdentity.java index b2b2424d..5809f68b 100644 --- a/schema-core/src/main/java/org/opengroup/osdu/schema/model/SchemaIdentity.java +++ b/schema-core/src/main/java/org/opengroup/osdu/schema/model/SchemaIdentity.java @@ -16,15 +16,15 @@ import org.opengroup.osdu.schema.constants.SchemaConstants; public class SchemaIdentity { @NotNull(message = "authority must not be null") - @Pattern(regexp = SchemaConstants.SCHEMA_EMPTY_REGEX, message = "authority must not be empty") + @Pattern(regexp = SchemaConstants.SCHEMA_EMPTY_REGEX, message = "authority must not contain whitespaces and special characters except - and .") private String authority; @NotNull(message = "source must not be null") - @Pattern(regexp = SchemaConstants.SCHEMA_EMPTY_REGEX, message = "source must not be empty") + @Pattern(regexp = SchemaConstants.SCHEMA_EMPTY_REGEX, message = "source must not contain whitespaces and special characters except - and .") private String source; @NotNull(message = "entityType must not be null") - @Pattern(regexp = SchemaConstants.SCHEMA_EMPTY_REGEX, message = "entityType must not be empty") + @Pattern(regexp = SchemaConstants.SCHEMA_EMPTY_REGEX, message = "entityType must not contain whitespaces and special characters except - and .") private String entityType; @NotNull(message = "schemaVersionMajor must not be null") diff --git a/schema-core/src/test/java/org/opengroup/osdu/schema/api/SchemaControllerTest.java b/schema-core/src/test/java/org/opengroup/osdu/schema/api/SchemaControllerTest.java index 75b6e4c8..8b2eff8a 100644 --- a/schema-core/src/test/java/org/opengroup/osdu/schema/api/SchemaControllerTest.java +++ b/schema-core/src/test/java/org/opengroup/osdu/schema/api/SchemaControllerTest.java @@ -103,6 +103,38 @@ public class SchemaControllerTest { assertNotNull(schemaController.createSchema(schemaRequest)); } + @Test(expected = BadRequestException.class) + public void testCreateAuthoritySchemaSpecialCharacters_Failed() throws ApplicationException, BadRequestException { + schemaRequest = getSchemaRequestSpecialCharactersAuthority(); + + when(schemaService.createSchema(schemaRequest)).thenThrow(BadRequestException.class); + assertNotNull(schemaController.createSchema(schemaRequest)); + } + + @Test(expected = BadRequestException.class) + public void testCreateSourceSchemaSpecialCharacters_Failed() throws ApplicationException, BadRequestException { + schemaRequest = getSchemaRequestSpecialCharactersSource(); + + when(schemaService.createSchema(schemaRequest)).thenThrow(BadRequestException.class); + assertNotNull(schemaController.createSchema(schemaRequest)); + } + + @Test(expected = BadRequestException.class) + public void testCreateEntitySchemaSpecialCharacters_Failed() throws ApplicationException, BadRequestException { + schemaRequest = getSchemaRequestSpecialCharactersEntity(); + + when(schemaService.createSchema(schemaRequest)).thenThrow(BadRequestException.class); + assertNotNull(schemaController.createSchema(schemaRequest)); + } + + @Test(expected = BadRequestException.class) + public void testCreateAuthorityMultipleSpaces_Failed() throws ApplicationException, BadRequestException { + schemaRequest = getSchemaRequestMultipleSpacesAuthority(); + + when(schemaService.createSchema(schemaRequest)).thenThrow(BadRequestException.class); + assertNotNull(schemaController.createSchema(schemaRequest)); + } + @Test public void testGetSchemaInfoList() throws ApplicationException, NotFoundException, BadRequestException { schemaRequest = getSchemaRequestObject(); @@ -178,4 +210,48 @@ public class SchemaControllerTest { .schemaVersionMajor(1L).schemaVersionMinor(1L).source("").build()) .build()).build(); } + + private SchemaRequest getSchemaRequestSpecialCharactersAuthority() { + return SchemaRequest.builder().schema(null).schemaInfo(SchemaInfo.builder().createdBy("creator") + .dateCreated(new Date(System.currentTimeMillis())) + .schemaIdentity(SchemaIdentity.builder().authority(" :").entityType("well").id(" :.well.1.1") + .schemaVersionMajor(1L).schemaVersionMinor(1L).source("").build()) + .scope(SchemaScope.INTERNAL).status(SchemaStatus.DEVELOPMENT) + .supersededBy(SchemaIdentity.builder().authority(" :").entityType("well").id(" :.well.1.4") + .schemaVersionMajor(1L).schemaVersionMinor(1L).source("").build()) + .build()).build(); + } + + private SchemaRequest getSchemaRequestSpecialCharactersSource() { + return SchemaRequest.builder().schema(null).schemaInfo(SchemaInfo.builder().createdBy("creator") + .dateCreated(new Date(System.currentTimeMillis())) + .schemaIdentity(SchemaIdentity.builder().authority("os").entityType("well").id("os. :.1.1") + .schemaVersionMajor(1L).schemaVersionMinor(1L).source(" :").build()) + .scope(SchemaScope.INTERNAL).status(SchemaStatus.DEVELOPMENT) + .supersededBy(SchemaIdentity.builder().authority("os").entityType("well").id("os. :.1.4") + .schemaVersionMajor(1L).schemaVersionMinor(1L).source(" :").build()) + .build()).build(); + } + + private SchemaRequest getSchemaRequestSpecialCharactersEntity() { + return SchemaRequest.builder().schema(null).schemaInfo(SchemaInfo.builder().createdBy("creator") + .dateCreated(new Date(System.currentTimeMillis())) + .schemaIdentity(SchemaIdentity.builder().authority("os").entityType(" :").id("os.source. :.1.1") + .schemaVersionMajor(1L).schemaVersionMinor(1L).source("source").build()) + .scope(SchemaScope.INTERNAL).status(SchemaStatus.DEVELOPMENT) + .supersededBy(SchemaIdentity.builder().authority("os").entityType(" :").id("os.source. :.1.4") + .schemaVersionMajor(1L).schemaVersionMinor(1L).source("source").build()) + .build()).build(); + } + + private SchemaRequest getSchemaRequestMultipleSpacesAuthority() { + return SchemaRequest.builder().schema(null).schemaInfo(SchemaInfo.builder().createdBy("creator") + .dateCreated(new Date(System.currentTimeMillis())) + .schemaIdentity(SchemaIdentity.builder().authority(" ").entityType("well").id(" .source.well.1.1") + .schemaVersionMajor(1L).schemaVersionMinor(1L).source("source").build()) + .scope(SchemaScope.INTERNAL).status(SchemaStatus.DEVELOPMENT) + .supersededBy(SchemaIdentity.builder().authority(" ").entityType("well").id(" .source.well.1.4") + .schemaVersionMajor(1L).schemaVersionMinor(1L).source("source").build()) + .build()).build(); + } } \ No newline at end of file diff --git a/testing/schema-test-core/src/test/resources/input_payloads/inputPayloadWithEmptyAuthority.json b/testing/schema-test-core/src/test/resources/input_payloads/inputPayloadWithEmptyAuthority.json index a4477210..26d86843 100644 --- a/testing/schema-test-core/src/test/resources/input_payloads/inputPayloadWithEmptyAuthority.json +++ b/testing/schema-test-core/src/test/resources/input_payloads/inputPayloadWithEmptyAuthority.json @@ -2,543 +2,17 @@ "schemaInfo": { "schemaIdentity": { "authority": "", - "source": "testSource1", - "entityType": "testEntity1", + "source": "testSource", + "entityType": "testEntity", "schemaVersionMajor": 1, "schemaVersionMinor": 1, "schemaVersionPatch": 0, - "id": ":testSource1:testEntity1:1.1.0" + "id": ":testSource:testEntity:1.1.0" }, "status": "DEVELOPMENT" }, "schema": { "$schema": "http://json-schema.org/draft-07/schema#", - "description": "The entity well.", - "title": "Well", - "type": "object", - "x-slb-lifecycle-state": "published", - "definitions": { - "FeatureCollection": { - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "GeoJSON FeatureCollection", - "type": "object", - "required": [ - "type", - "features" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "FeatureCollection" - ] - }, - "features": { - "type": "array", - "items": { - "title": "GeoJSON Feature", - "type": "object", - "required": [ - "type", - "properties", - "geometry" - ], - "properties": { - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - }, - "geometry": { - "oneOf": [ - { - "type": "null" - }, - { - "title": "GeoJSON Point", - "type": "object", - "required": [ - "type", - "coordinates" - ], - "properties": { - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - }, - "coordinates": { - "minItems": 2, - "type": "array", - "items": { - "type": "number" - } - }, - "type": { - "type": "string", - "enum": [ - "Point" - ] - } - } - }, - { - "title": "GeoJSON LineString", - "type": "object", - "required": [ - "type", - "coordinates" - ], - "properties": { - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - }, - "coordinates": { - "minItems": 2, - "type": "array", - "items": { - "minItems": 2, - "type": "array", - "items": { - "type": "number" - } - } - }, - "type": { - "type": "string", - "enum": [ - "LineString" - ] - } - } - }, - { - "title": "GeoJSON Polygon", - "type": "object", - "required": [ - "type", - "coordinates" - ], - "properties": { - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - }, - "coordinates": { - "type": "array", - "items": { - "minItems": 4, - "type": "array", - "items": { - "minItems": 2, - "type": "array", - "items": { - "type": "number" - } - } - } - }, - "type": { - "type": "string", - "enum": [ - "Polygon" - ] - } - } - }, - { - "title": "GeoJSON MultiPoint", - "type": "object", - "required": [ - "type", - "coordinates" - ], - "properties": { - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - }, - "coordinates": { - "type": "array", - "items": { - "minItems": 2, - "type": "array", - "items": { - "type": "number" - } - } - }, - "type": { - "type": "string", - "enum": [ - "MultiPoint" - ] - } - } - }, - { - "title": "GeoJSON MultiLineString", - "type": "object", - "required": [ - "type", - "coordinates" - ], - "properties": { - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - }, - "coordinates": { - "type": "array", - "items": { - "minItems": 2, - "type": "array", - "items": { - "minItems": 2, - "type": "array", - "items": { - "type": "number" - } - } - } - }, - "type": { - "type": "string", - "enum": [ - "MultiLineString" - ] - } - } - }, - { - "title": "GeoJSON MultiPolygon", - "type": "object", - "required": [ - "type", - "coordinates" - ], - "properties": { - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - }, - "coordinates": { - "type": "array", - "items": { - "type": "array", - "items": { - "minItems": 4, - "type": "array", - "items": { - "minItems": 2, - "type": "array", - "items": { - "type": "number" - } - } - } - } - }, - "type": { - "type": "string", - "enum": [ - "MultiPolygon" - ] - } - } - }, - { - "title": "GeoJSON GeometryCollection", - "type": "object", - "required": [ - "type", - "geometries" - ], - "properties": { - "geometries": { - "type": "array", - "items": { - "oneOf": [ - { - "title": "GeoJSON Point", - "type": "object", - "required": [ - "type", - "coordinates" - ], - "properties": { - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - }, - "coordinates": { - "minItems": 2, - "type": "array", - "items": { - "type": "number" - } - }, - "type": { - "type": "string", - "enum": [ - "Point" - ] - } - } - }, - { - "title": "GeoJSON LineString", - "type": "object", - "required": [ - "type", - "coordinates" - ], - "properties": { - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - }, - "coordinates": { - "minItems": 2, - "type": "array", - "items": { - "minItems": 2, - "type": "array", - "items": { - "type": "number" - } - } - }, - "type": { - "type": "string", - "enum": [ - "LineString" - ] - } - } - }, - { - "title": "GeoJSON Polygon", - "type": "object", - "required": [ - "type", - "coordinates" - ], - "properties": { - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - }, - "coordinates": { - "type": "array", - "items": { - "minItems": 4, - "type": "array", - "items": { - "minItems": 2, - "type": "array", - "items": { - "type": "number" - } - } - } - }, - "type": { - "type": "string", - "enum": [ - "Polygon" - ] - } - } - }, - { - "title": "GeoJSON MultiPoint", - "type": "object", - "required": [ - "type", - "coordinates" - ], - "properties": { - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - }, - "coordinates": { - "type": "array", - "items": { - "minItems": 2, - "type": "array", - "items": { - "type": "number" - } - } - }, - "type": { - "type": "string", - "enum": [ - "MultiPoint" - ] - } - } - }, - { - "title": "GeoJSON MultiLineString", - "type": "object", - "required": [ - "type", - "coordinates" - ], - "properties": { - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - }, - "coordinates": { - "type": "array", - "items": { - "minItems": 2, - "type": "array", - "items": { - "minItems": 2, - "type": "array", - "items": { - "type": "number" - } - } - } - }, - "type": { - "type": "string", - "enum": [ - "MultiLineString" - ] - } - } - }, - { - "title": "GeoJSON MultiPolygon", - "type": "object", - "required": [ - "type", - "coordinates" - ], - "properties": { - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - }, - "coordinates": { - "type": "array", - "items": { - "type": "array", - "items": { - "minItems": 4, - "type": "array", - "items": { - "minItems": 2, - "type": "array", - "items": { - "type": "number" - } - } - } - } - }, - "type": { - "type": "string", - "enum": [ - "MultiPolygon" - ] - } - } - } - ] - } - }, - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - }, - "type": { - "type": "string", - "enum": [ - "GeometryCollection" - ] - } - } - } - ] - }, - "type": { - "type": "string", - "enum": [ - "Feature" - ] - }, - "properties": { - "oneOf": [ - { - "type": "null" - }, - { - "type": "object" - } - ] - } - } - } - }, - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - } - }, - "$id": "https://geojson.org/schema/FeatureCollection.json" - } - } + "description": "The entity well." } } \ No newline at end of file diff --git a/testing/schema-test-core/src/test/resources/input_payloads/inputPayloadWithEmptyEntity.json b/testing/schema-test-core/src/test/resources/input_payloads/inputPayloadWithEmptyEntity.json index a3e09801..f6818a38 100644 --- a/testing/schema-test-core/src/test/resources/input_payloads/inputPayloadWithEmptyEntity.json +++ b/testing/schema-test-core/src/test/resources/input_payloads/inputPayloadWithEmptyEntity.json @@ -13,532 +13,6 @@ }, "schema": { "$schema": "http://json-schema.org/draft-07/schema#", - "description": "The entity well.", - "title": "Well", - "type": "object", - "x-slb-lifecycle-state": "published", - "definitions": { - "FeatureCollection": { - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "GeoJSON FeatureCollection", - "type": "object", - "required": [ - "type", - "features" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "FeatureCollection" - ] - }, - "features": { - "type": "array", - "items": { - "title": "GeoJSON Feature", - "type": "object", - "required": [ - "type", - "properties", - "geometry" - ], - "properties": { - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - }, - "geometry": { - "oneOf": [ - { - "type": "null" - }, - { - "title": "GeoJSON Point", - "type": "object", - "required": [ - "type", - "coordinates" - ], - "properties": { - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - }, - "coordinates": { - "minItems": 2, - "type": "array", - "items": { - "type": "number" - } - }, - "type": { - "type": "string", - "enum": [ - "Point" - ] - } - } - }, - { - "title": "GeoJSON LineString", - "type": "object", - "required": [ - "type", - "coordinates" - ], - "properties": { - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - }, - "coordinates": { - "minItems": 2, - "type": "array", - "items": { - "minItems": 2, - "type": "array", - "items": { - "type": "number" - } - } - }, - "type": { - "type": "string", - "enum": [ - "LineString" - ] - } - } - }, - { - "title": "GeoJSON Polygon", - "type": "object", - "required": [ - "type", - "coordinates" - ], - "properties": { - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - }, - "coordinates": { - "type": "array", - "items": { - "minItems": 4, - "type": "array", - "items": { - "minItems": 2, - "type": "array", - "items": { - "type": "number" - } - } - } - }, - "type": { - "type": "string", - "enum": [ - "Polygon" - ] - } - } - }, - { - "title": "GeoJSON MultiPoint", - "type": "object", - "required": [ - "type", - "coordinates" - ], - "properties": { - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - }, - "coordinates": { - "type": "array", - "items": { - "minItems": 2, - "type": "array", - "items": { - "type": "number" - } - } - }, - "type": { - "type": "string", - "enum": [ - "MultiPoint" - ] - } - } - }, - { - "title": "GeoJSON MultiLineString", - "type": "object", - "required": [ - "type", - "coordinates" - ], - "properties": { - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - }, - "coordinates": { - "type": "array", - "items": { - "minItems": 2, - "type": "array", - "items": { - "minItems": 2, - "type": "array", - "items": { - "type": "number" - } - } - } - }, - "type": { - "type": "string", - "enum": [ - "MultiLineString" - ] - } - } - }, - { - "title": "GeoJSON MultiPolygon", - "type": "object", - "required": [ - "type", - "coordinates" - ], - "properties": { - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - }, - "coordinates": { - "type": "array", - "items": { - "type": "array", - "items": { - "minItems": 4, - "type": "array", - "items": { - "minItems": 2, - "type": "array", - "items": { - "type": "number" - } - } - } - } - }, - "type": { - "type": "string", - "enum": [ - "MultiPolygon" - ] - } - } - }, - { - "title": "GeoJSON GeometryCollection", - "type": "object", - "required": [ - "type", - "geometries" - ], - "properties": { - "geometries": { - "type": "array", - "items": { - "oneOf": [ - { - "title": "GeoJSON Point", - "type": "object", - "required": [ - "type", - "coordinates" - ], - "properties": { - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - }, - "coordinates": { - "minItems": 2, - "type": "array", - "items": { - "type": "number" - } - }, - "type": { - "type": "string", - "enum": [ - "Point" - ] - } - } - }, - { - "title": "GeoJSON LineString", - "type": "object", - "required": [ - "type", - "coordinates" - ], - "properties": { - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - }, - "coordinates": { - "minItems": 2, - "type": "array", - "items": { - "minItems": 2, - "type": "array", - "items": { - "type": "number" - } - } - }, - "type": { - "type": "string", - "enum": [ - "LineString" - ] - } - } - }, - { - "title": "GeoJSON Polygon", - "type": "object", - "required": [ - "type", - "coordinates" - ], - "properties": { - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - }, - "coordinates": { - "type": "array", - "items": { - "minItems": 4, - "type": "array", - "items": { - "minItems": 2, - "type": "array", - "items": { - "type": "number" - } - } - } - }, - "type": { - "type": "string", - "enum": [ - "Polygon" - ] - } - } - }, - { - "title": "GeoJSON MultiPoint", - "type": "object", - "required": [ - "type", - "coordinates" - ], - "properties": { - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - }, - "coordinates": { - "type": "array", - "items": { - "minItems": 2, - "type": "array", - "items": { - "type": "number" - } - } - }, - "type": { - "type": "string", - "enum": [ - "MultiPoint" - ] - } - } - }, - { - "title": "GeoJSON MultiLineString", - "type": "object", - "required": [ - "type", - "coordinates" - ], - "properties": { - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - }, - "coordinates": { - "type": "array", - "items": { - "minItems": 2, - "type": "array", - "items": { - "minItems": 2, - "type": "array", - "items": { - "type": "number" - } - } - } - }, - "type": { - "type": "string", - "enum": [ - "MultiLineString" - ] - } - } - }, - { - "title": "GeoJSON MultiPolygon", - "type": "object", - "required": [ - "type", - "coordinates" - ], - "properties": { - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - }, - "coordinates": { - "type": "array", - "items": { - "type": "array", - "items": { - "minItems": 4, - "type": "array", - "items": { - "minItems": 2, - "type": "array", - "items": { - "type": "number" - } - } - } - } - }, - "type": { - "type": "string", - "enum": [ - "MultiPolygon" - ] - } - } - } - ] - } - }, - "bbox": { - "minItems": 4, - "type": "array", - "items": { - "type": "number" - } - }, - "type": { - "type": "string", - "enum": [ - "GeometryCollection" - ] - } - } - } - ] - }, - "type": { - "type": "string", - "enum": [ - "Feature" - ] - }, - "