add typology in api response
This commit is contained in:
parent
3f61e6fce2
commit
b748d847bb
|
@ -144,11 +144,12 @@ public class DsmCore {
|
|||
|
||||
public ApiDetailsResponse getApis(final String dsId) throws DsmException {
|
||||
try {
|
||||
final String eoscType = dsDao.getDs(dsId).getEoscDatasourceType();
|
||||
final DatasourceDbEntry ds = dsDao.getDs(dsId);
|
||||
final List<? extends ApiDbEntry> apis = dsDao.getApis(dsId);
|
||||
final List<ApiDetails> api = apis.stream()
|
||||
.map(DsmMappingUtils::asDetails)
|
||||
.map(a -> a.setEoscDatasourceType(eoscType))
|
||||
.map(a -> a.setEoscDatasourceType(ds.getEoscDatasourceType()))
|
||||
.map(a -> a.setTypology(ds.getTypology()))
|
||||
.collect(Collectors.toList());
|
||||
return ResponseUtils.apiResponse(api, api.size());
|
||||
} catch (final Throwable e) {
|
||||
|
|
|
@ -63,6 +63,9 @@ public class ApiDetails extends ApiIgnoredProperties {
|
|||
@ApiModelProperty(position = 17)
|
||||
private String metadataIdentifierPath = "";
|
||||
|
||||
@ApiModelProperty(position = 18)
|
||||
private String typology = null;
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
@ -214,4 +217,13 @@ public class ApiDetails extends ApiIgnoredProperties {
|
|||
this.eoscDatasourceType = eoscDatasourceType;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getTypology() {
|
||||
return typology;
|
||||
}
|
||||
|
||||
public ApiDetails setTypology(final String typology) {
|
||||
this.typology = typology;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue