Commit 3f3a4452 authored by Matt Wise's avatar Matt Wise
Browse files

bugfixes for StorageService GetRecords endpoint

parent 7be78485
Pipeline #24432 passed with stages
in 6 minutes and 20 seconds
......@@ -16,9 +16,12 @@ package org.opengroup.osdu.core.common.model.storage;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.Data;
@Data
@JsonIgnoreProperties(ignoreUnknown = true)
public class MultiRecordInfo {
private List<Record> records;
private List<String> invalidRecords;
......
......@@ -23,6 +23,8 @@ import javax.validation.Valid;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
......@@ -44,6 +46,7 @@ import lombok.NoArgsConstructor;
@AllArgsConstructor
@NoArgsConstructor
@ValidLegal
@JsonIgnoreProperties(ignoreUnknown = true)
public class Record {
private static final String DATALAKE_RECORD_PREFIX = "doc";
......
......@@ -22,6 +22,7 @@ import org.opengroup.osdu.core.common.http.json.HttpResponseBodyParsingException
import org.opengroup.osdu.core.common.model.http.DpsHeaders;
import org.opengroup.osdu.core.common.model.storage.*;
import java.util.ArrayList;
import java.util.Collection;
import org.opengroup.osdu.core.common.util.UrlNormalizationUtil;
......@@ -71,6 +72,7 @@ public class StorageService implements IStorageService {
@Override
public MultiRecordInfo getRecords(Collection<String> ids) throws StorageException {
MultiRecordIds input = new MultiRecordIds();
input.setRecords(new ArrayList<String>());
input.getRecords().addAll(ids);
String url = this.createUrl("/query/records");
HttpResponse result = this.httpClient.send(
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment