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

merge from master

parents b8cb612b acc92cfb
No related branches found
No related tags found
1 merge request!124add support for feature-collection indexing
Pipeline #32511 failed
Showing
with 124 additions and 10 deletions
......@@ -32,3 +32,7 @@ analyze:
type: mvn
target: provider/indexer-ibm/pom.xml
path: .
- name: indexer-reference
type: mvn
target: provider/indexer-reference/pom.xml
path: .
This diff is collapsed.
......@@ -88,7 +88,7 @@ spec:
- name: servicebus_topic_name
value: indexing-progress
- name: entitlements_service_endpoint
value: http://entitlements-azure/entitlements/v1
value: http://entitlements/api/entitlements/v2
- name: entitlements_service_api_key
value: "OBSOLETE"
- name: schema_service_url
......
......@@ -24,7 +24,7 @@ public class SchemaConverterPropertiesConfig implements SchemaConverterConfig {
}
private Set<String> getDefaultSupportedArrayTypes() {
return new HashSet<>(Arrays.asList("boolean", "integer", "number", "string"));
return new HashSet<>(Arrays.asList("boolean", "integer", "number", "string", "object"));
}
private Map<String, String> getDefaultSpecialDefinitionsMap() {
......
......@@ -40,6 +40,10 @@
{
"kind": "string",
"path": "Checksum"
},
{
"kind": "[]object",
"path": "VectorHeaderMapping"
}
]
}
\ No newline at end of file
......@@ -32,6 +32,14 @@
{
"kind": "[]link",
"path": "Counterparties"
},
{
"kind": "[]object",
"path": "Terms"
},
{
"kind": "[]object",
"path": "RestrictedResources"
}
]
}
\ No newline at end of file
......@@ -76,6 +76,10 @@
{
"kind": "string",
"path": "VerticalMeasurementID"
},
{
"kind": "[]object",
"path": "Curves"
}
]
}
\ No newline at end of file
......@@ -44,6 +44,10 @@
{
"kind": "[]string",
"path": "Annotations"
},
{
"kind": "[]object",
"path": "LineageAssertions"
}
]
}
\ No newline at end of file
......@@ -25,7 +25,7 @@
<dependency>
<groupId>org.opengroup.osdu</groupId>
<artifactId>core-lib-gcp</artifactId>
<version>0.6.1-SNAPSHOT</version>
<version>0.7.0</version>
</dependency>
<dependency>
......
......@@ -23,12 +23,36 @@ public class AppExceptionHandler {
? e.getOriginalException().getMessage()
: e.getError().getMessage();
if (e.getError().getCode() > 499) {
Integer errorCode = e.getError().getCode();
if (errorCode > 499) {
log.error(exceptionMsg, e.getOriginalException());
} else {
log.warn(exceptionMsg, e.getOriginalException());
}
return new ResponseEntity<>(e.getError(), HttpStatus.resolve(e.getError().getCode()));
HttpStatus status = Objects.nonNull(HttpStatus.resolve(errorCode))
? HttpStatus.resolve(errorCode)
: resolveNotSupportedStatus(errorCode);
return new ResponseEntity<>(e.getError(), status);
}
//Currently not all codes provided from core can be resolved by HttpStatus
//example org.opengroup.osdu.core.common.model.http.RequestStatus have not supported by HttpStatus codes
private HttpStatus resolveNotSupportedStatus(int statusCode) {
if (statusCode > 99 && statusCode < 200) {
return HttpStatus.CONTINUE;
}
if (statusCode > 199 && statusCode < 300) {
return HttpStatus.NO_CONTENT;
}
if (statusCode > 299 && statusCode < 400) {
return HttpStatus.MULTIPLE_CHOICES;
}
if (statusCode > 399 && statusCode < 500) {
return HttpStatus.BAD_REQUEST;
}
return HttpStatus.INTERNAL_SERVER_ERROR;
}
}
......@@ -42,5 +42,3 @@ security.https.certificate.trust=false
indexer.que.service.mail=default@iam.gserviceaccount.com
SCHEMA_HOST=${HOST}/api/schema-service/v1/schema
storage-query-kinds-host=https://${STORAGE_HOSTNAME}/api/storage/v2/query/kinds
schema.converter.supported-array-types=boolean,integer,number,string,object
......@@ -31,7 +31,7 @@
<packaging>jar</packaging>
<properties>
<os-core-lib-ibm.version>0.3.8-SNAPSHOT</os-core-lib-ibm.version>
<os-core-lib-ibm.version>0.7.0</os-core-lib-ibm.version>
</properties>
<profiles>
......
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