Skip to content
Snippets Groups Projects
Commit 59b4c4e3 authored by Neelesh Thakur's avatar Neelesh Thakur
Browse files

fix path for nested attributes

parent 238d2d60
No related branches found
No related tags found
1 merge request!186fix path in schema parser for attributes marked nested by x-osdu-indexing
Pipeline #58064 failed
......@@ -253,7 +253,7 @@ public class PropertiesProcessor {
}
return storageSchemaObjectArrayEntry(
indexingType,
entry.getKey(),
pathPrefixWithDot + entry.getKey(),
propertiesStream);
} else {
return storageSchemaEntry(indexingType, pathPrefixWithDot + entry.getKey());
......
......@@ -125,6 +125,11 @@ public class SchemaToStorageFormatImplTest {
testSingleFile("/converter/tags/mixAllAnyOneOf/mix.json", KIND);
}
@Test
public void nestedIndexHints() {
testSingleFile("/converter/index-hints/nested-type-schema.json", "osdu:osdu:Wellbore:1.0.0");
}
@Test
public void folderPassed() throws URISyntaxException, IOException {
......
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "GenericDocumentArtefact",
"type": "object",
"definitions": {
"documentData": {
"description": "The domain specific data container for a document.",
"title": "Document Data",
"type": "object",
"properties": {
"Description": {
"type": "string",
"description": "Description. Summary of the work product component. Not the same as Remark which captures thoughts of creator about the wpc."
},
"keywords": {
"title": "title",
"type": "string",
"description": "Represents some user defined keywords"
},
"originalLocation": {
"title": "title",
"type": "string",
"description": "Represents location of the file in tenant cloud storage"
},
"wellboreId": {
"x-osdu-relationship": [
{
"EntityType": "wellbore",
"GroupType": "master-data"
}
],
"title": "wellboe id",
"type": "string"
},
"classification": {
"type": "object",
"title": "File Properties",
"properties": {
"summary": {
"title": "summary",
"type": "string",
"description": "Represents document summary"
},
"petro": {
"description": "Represents petro",
"title": "petro",
"type": "Object",
"properties": {
"inferred": {
"description": "Represents value of inferred",
"title": "inferred",
"type": "array",
"items": {
"type": "string"
}
},
"accepted": {
"description": "Represents value of accepted",
"title": "accepted",
"type": "array",
"items": {
"type": "string"
}
},
"geopoliticalContext": {
"description": "Represents value of geopoliticalContext",
"title": "geopoliticalContext",
"type": "array",
"x-osdu-indexing": {
"type": "nested"
},
"items": {
"type": "object",
"properties": {
"country": {
"title": "country",
"type": "string",
"description": "Represents country"
},
"taxNode": {
"title": "taxNode",
"type": "string",
"description": "Represents taxNode"
},
"country_region": {
"title": "country_region",
"type": "string",
"description": "Represents country_region"
},
"region": {
"title": "region",
"type": "string",
"description": "Represents region"
}
}
}
},
"otherTerms": {
"description": "Represents value of otherTerms",
"title": "otherTerms",
"type": "array",
"items": {
"type": "string"
}
}
}
},
"ambiguousTerms": {
"type": "object",
"properties": {}
},
"context": {
"type": "object",
"properties": {}
},
"taxNodes": {
"description": "Represents concept-tag collection",
"title": "concept-tags",
"type": "array",
"x-osdu-indexing": {
"type": "nested"
},
"items": {
"type": "object",
"properties": {
"score": {
"title": "score",
"type": "number",
"description": "Represents score"
},
"taxNode": {
"title": "taxNode",
"type": "string",
"description": "Represents taxNode"
},
"taxonomy": {
"title": "taxonomy",
"type": "string",
"description": "Represents taxonomy"
},
"explanation": {
"title": "explanation",
"type": "string",
"description": "Represents explanation"
},
"cf-score": {
"title": "cf-score",
"type": "integer",
"description": "Represents cf-score"
}
}
}
},
"concept-tags": {
"description": "Represents concept-tag collection",
"title": "concept-tags",
"type": "array",
"x-osdu-indexing": {
"type": "nested"
},
"items": {
"type": "object",
"properties": {
"score": {
"title": "score",
"type": "number",
"description": "Represents score"
},
"concept-tag": {
"title": "concept-tag",
"type": "string",
"description": "Represents concept-tag"
},
"ttype": {
"title": "tag type",
"type": "string",
"description": "Represents tag type"
}
}
}
},
"title": {
"title": "title",
"type": "string",
"description": "Represents document title"
}
}
},
"Source": {
"title": "Data Source",
"type": "string",
"description": "The entity that produced the record, or from which it is received; could be an organization, agency, system, internal team, or individual. For informational purposes only, the list of sources is not governed."
},
"Name": {
"type": "string",
"description": "Name"
},
"size": {
"title": "title",
"type": "string",
"description": "Represents size of the original file"
},
"extractedTextFilePath": {
"description": "Represents Cloud Storage path of the file containing extracted text from the document",
"title": "extractedTextFilePath",
"type": "string"
},
"thumbnailPath": {
"description": "Represents Cloud Storage path of the thumbnail size image of the document",
"title": "thumbnailPath",
"type": "string"
},
"SubTitle": {
"type": "string",
"description": "The sub-title of the document."
}
},
"$id": "definitions/documentData"
}
},
"properties": {
"ancestry": {
"description": "The links to data, which constitute the inputs.",
"title": "Ancestry",
"$ref": "#/definitions/linkList"
},
"data": {
"description": "Document data container",
"title": "Document Data",
"$ref": "#/definitions/documentData"
},
"kind": {
"default": "osdu:wks:GenericDocumentArtefact:1.0.0",
"description": "OSDU demo document kind specification",
"title": "Document Kind",
"type": "string"
},
"meta": {
"description": "The meta data section linking the 'unitKey', 'crsKey' to self-contained definitions (persistableReference)",
"title": "Frame of Reference Meta Data",
"type": "array",
"items": {
"$ref": "#/definitions/metaItem"
}
},
"legal": {
"description": "The geological interpretation's legal tags",
"title": "Legal Tags",
"$ref": "#/definitions/legal"
},
"acl": {
"description": "The access control tags associated with this entity.",
"title": "Access Control List",
"$ref": "#/definitions/tagDictionary"
},
"id": {
"description": "The unique identifier of the document",
"title": "Document ID",
"type": "string"
},
"type": {
"description": "The reference entity type as declared in common:metadata:entity:*.",
"title": "Entity Type",
"type": "string"
},
"version": {
"format": "int64",
"description": "The version number of this document; set by the framework.",
"title": "Entity Version Number",
"type": "number",
"example": "1040815391631285"
}
},
"$id": "osdu:wks:DataSet--GenericDocumentArtefact:1.0.0"
}
\ No newline at end of file
{
"kind": "osdu:osdu:Wellbore:1.0.0",
"schema": [
{
"path": "Description",
"kind": "string"
},
{
"path": "keywords",
"kind": "string"
},
{
"path": "originalLocation",
"kind": "string"
},
{
"path": "wellboreId",
"kind": "string"
},
{
"path": "classification.summary",
"kind": "string"
},
{
"path": "classification.petro.inferred",
"kind": "[]string"
},
{
"path": "classification.petro.accepted",
"kind": "[]string"
},
{
"path": "classification.petro.geopoliticalContext",
"kind": "nested",
"properties": [
{
"path": "country",
"kind": "string"
},
{
"path": "taxNode",
"kind": "string"
},
{
"path": "country_region",
"kind": "string"
},
{
"path": "region",
"kind": "string"
}
]
},
{
"path": "classification.petro.otherTerms",
"kind": "[]string"
},
{
"path": "classification.taxNodes",
"kind": "nested",
"properties": [
{
"path": "score",
"kind": "double"
},
{
"path": "taxNode",
"kind": "string"
},
{
"path": "taxonomy",
"kind": "string"
},
{
"path": "explanation",
"kind": "string"
},
{
"path": "cf-score",
"kind": "int"
}
]
},
{
"path": "classification.concept-tags",
"kind": "nested",
"properties": [
{
"path": "score",
"kind": "double"
},
{
"path": "concept-tag",
"kind": "string"
},
{
"path": "ttype",
"kind": "string"
}
]
},
{
"path": "classification.title",
"kind": "string"
},
{
"path": "Source",
"kind": "string"
},
{
"path": "Name",
"kind": "string"
},
{
"path": "size",
"kind": "string"
},
{
"path": "extractedTextFilePath",
"kind": "string"
},
{
"path": "thumbnailPath",
"kind": "string"
},
{
"path": "SubTitle",
"kind": "string"
}
]
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment