Fix compilation errors and fix swagger ui description formatting

This commit is contained in:
George Kalampokis 2023-10-13 09:50:22 +03:00
parent d14107062a
commit a9a3273f62
7 changed files with 153 additions and 124 deletions

View File

@ -1,7 +1,5 @@
package eu.eudat.queryable.collector; package eu.eudat.queryable.collector;
import com.google.common.collect.Lists;
import jakarta.persistence.Tuple; import jakarta.persistence.Tuple;
import java.util.*; import java.util.*;
import java.util.stream.Collectors; import java.util.stream.Collectors;
@ -68,7 +66,8 @@ public class ProjectionField {
list.add(current.parent.key); list.add(current.parent.key);
current = current.parent; current = current.parent;
} }
return String.join(".", Lists.reverse(list)); Collections.reverse(list);
return String.join(".", list);
} }
private Object createObject(List<Tuple> tuples, String field) { private Object createObject(List<Tuple> tuples, String field) {

View File

@ -119,9 +119,13 @@
<groupId>io.springfox</groupId> <groupId>io.springfox</groupId>
<artifactId>springfox-boot-starter</artifactId> <artifactId>springfox-boot-starter</artifactId>
<version>3.0.0</version> <version>3.0.0</version>
</dependency> </dependency>-->
--> <dependency>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-starter-webmvc-ui</artifactId>
<version>2.1.0</version>
</dependency>
<dependency> <dependency>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>

View File

@ -1,4 +1,4 @@
package eu.eudat.logic.proxy.config.configloaders; /*package eu.eudat.logic.proxy.config.configloaders;
import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.ObjectMapper;
import eu.eudat.logic.proxy.config.ExternalUrls; import eu.eudat.logic.proxy.config.ExternalUrls;
@ -33,7 +33,7 @@ import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.stream.Collectors; import java.util.stream.Collectors;
/*
@Service("configLoader") @Service("configLoader")
@Profile({ "production", "staging" }) @Profile({ "production", "staging" })
public class ProductionConfigLoader implements ConfigLoader { public class ProductionConfigLoader implements ConfigLoader {

View File

@ -1,15 +1,10 @@
package eu.eudat.logic.proxy.fetching; package eu.eudat.logic.proxy.fetching;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.ObjectMapper;
import com.jayway.jsonpath.Configuration;
import com.jayway.jsonpath.DocumentContext; import com.jayway.jsonpath.DocumentContext;
import com.jayway.jsonpath.JsonPath;
import com.jayway.jsonpath.spi.json.JacksonJsonProvider;
import eu.eudat.logic.proxy.config.DataUrlConfiguration; import eu.eudat.logic.proxy.config.DataUrlConfiguration;
import eu.eudat.logic.proxy.config.ExternalUrlCriteria; import eu.eudat.logic.proxy.config.ExternalUrlCriteria;
import eu.eudat.logic.proxy.fetching.entities.Results; import eu.eudat.logic.proxy.fetching.entities.Results;
import io.swagger.models.auth.In;
import net.minidev.json.JSONArray; import net.minidev.json.JSONArray;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;

View File

@ -19,6 +19,7 @@ import io.swagger.v3.oas.annotations.media.Content;
import io.swagger.v3.oas.annotations.media.ExampleObject; import io.swagger.v3.oas.annotations.media.ExampleObject;
import io.swagger.v3.oas.annotations.responses.ApiResponse; import io.swagger.v3.oas.annotations.responses.ApiResponse;
import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.validation.Valid;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -39,23 +40,27 @@ public class PublicDatasetsDescriptionDocumentation extends BaseController {
private DatasetPublicManager datasetManager; private DatasetPublicManager datasetManager;
public static final String getPagedNotes = "The json response is of type **ResponseItem<DataTableData< DatasetPublicListingModel >>** containing the following properties:\n" + public static final String getPagedNotes = "The json response is of type **ResponseItem<DataTableData< DatasetPublicListingModel >>** containing the following properties:\n" +
" 1. **message**: string, message indicating error, null if everything went well\n" + "<ol>" +
" 2. **statusCode**: integer, status code indicating if something unexpected happened, otherwise 0\n" + " <li><b>message</b>: string, message indicating error, null if everything went well</li>" +
" 3. **responseType**: integer, 0 for json, 1 for file\n" + " <li><b>statusCode</b>: integer, status code indicating if something unexpected happened, otherwise 0</li>" +
" 4. **payload**: DataTableData, containing the number of values of actual data returned and the data of type **DatasetPublicListingModel**\n" + " <li><b>responseType</b>: integer, 0 for json, 1 for file</li>" +
"4.1. id: string, id of dataset returned\n" + " <li><b>payload</b>: DataTableData, containing the number of values of actual data returned and the data of type <b>DatasetPublicListingModel</b></li>" +
"4.2. label: string, label of dataset\n" + " <ol>" +
"4.3. grant: string, grant of dataset\n" + " <li>id: string, id of dataset returned</li>" +
"4.4. dmp: string, dmp description\n" + " <li>label: string, label of dataset</li>" +
"4.5. dmpId: string, dmp's id\n" + " <li>grant: string, grant of dataset</li>" +
"4.6. profile: DatasetProfilePublicModel, dataset's profile\n" + " <li>dmp: string, dmp description</li>" +
"4.8. createdAt: date, creation date\n" + " <li>dmpId: string, dmp's id</li>" +
"4.9. modifiedAt: date, modification date\n" + " <li>profile: DatasetProfilePublicModel, dataset's profile</li>" +
"4.10. description: string, dataset's description\n" + " <li>createdAt: date, creation date</li>" +
"4.11. finalizedAt: date, finalization date\n" + " <li>modifiedAt: date, modification date</li>" +
"4.12. dmpPublishedAt: date, dmp's publication date\n" + " <li>description: string, dataset's description</li>" +
"4.13. version: integer, dataset's version\n" + " <li>finalizedAt: date, finalization date</li>" +
"4.14. users: list of UserInfoPublicModel, user who collaborated on the dataset\n"; " <li>dmpPublishedAt: date, dmp's publication date</li>" +
" <li>version: integer, dataset's version</li>" +
" <li>users: list of UserInfoPublicModel, user who collaborated on the dataset</li>" +
" </ol>" +
"</ol>";
public static final String getPagedResponseExample = "{\n" + public static final String getPagedResponseExample = "{\n" +
" \"statusCode\": 0,\n" + " \"statusCode\": 0,\n" +
" \"responseType\": 0,\n" + " \"responseType\": 0,\n" +
@ -123,44 +128,53 @@ public class PublicDatasetsDescriptionDocumentation extends BaseController {
" }\n" + " }\n" +
"}"; "}";
public static final String getPagedRequestBodyDescription = "The datasetTableRequest is a DatasetPublicTableRequest object with the following fields:\n" + public static final String getPagedRequestBodyDescription = "The datasetTableRequest is a DatasetPublicTableRequest object with the following fields:\n" +
"• **length**: how many datasets should be fetched *(required)*\n" + "• **offset**: offset of the returned datasets, first time should be 0, then offset += length\n" + "<ul>" +
"• **orderings**: array of strings specifying the order, format:= +string or -string or asc or desc. " + "<li><b>length</b>: how many datasets should be fetched <i>(required)</i></li>" +
"**+** means ascending order. **-** means descending order.\n&nbsp;&nbsp;&nbsp;&nbsp;Available strings are: 1) status, 2) label, 3) created.\n" + "<li><b>offset</b>: offset of the returned datasets, first time should be 0, then offset += length</li>" +
"&nbsp;&nbsp;&nbsp;&nbsp;**asc** equivalent to +label.\n&nbsp;&nbsp;&nbsp;&nbsp;**desc** equivalent to -label.\n" + "<li><b>orderings</b>: array of strings specifying the order, format:= +string or -string or asc or desc.</li>" +
"**criteria**: this is DatasetPublicCriteria object which applies filters for the datasets returned. More specifically:\n" + "<b>+</b> means ascending order. <b>-</b> means descending order.<br>&nbsp;&nbsp;&nbsp;&nbsp;Available strings are: 1) status, 2) label, 3) created.<br>" +
" 1. periodStart: date, datasets created date greater than periodStart\n" + "&nbsp;&nbsp;&nbsp;&nbsp;<b>asc</b> equivalent to +label.<br>&nbsp;&nbsp;&nbsp;&nbsp;<b>desc</b> equivalent to -label.<br>" +
" 2. periodEnd: date, datasets created date less than periodEnd\n" + "<li><b>criteria</b>: this is DatasetPublicCriteria object which applies filters for the datasets returned. More specifically:</li>" +
" 3. grants: list of uuids, dmps(datasets) with the corresponding grants\n" + " <ol>" +
" 4. collaborators: list of uuids, user who collaborated on the creation/modification of datasets\n" + " <li>periodStart: date, datasets created date greater than periodStart</li>" +
" 5. datasetTemplates: list of uuids, dataset templates uuids to be included\n" + " <li>periodEnd: date, datasets created date less than periodEnd</li>" +
" 6. dmpOrganisations: list of strings, datasets involved in dmps which belong to these organisations\n" + " <li>grants: list of uuids, dmps(datasets) with the corresponding grants</li>" +
" 7. tags: list of Tag objects, tags involved in datasets\n" + " <li>collaborators: list of uuids, user who collaborated on the creation/modification of datasets</li>" +
" 8. dmpIds: list of uuids, dmps with the specific ids\n" + " <li>datasetTemplates: list of uuids, dataset templates uuids to be included</li>" +
" 9. groupIds: list of uuids, in which groups the datasets are\n" + " <li>dmpOrganisations: list of strings, datasets involved in dmps which belong to these organisations</li>" +
"10. allVersions: boolean, if datasets should be fetched with all their versions\n" + " <li>tags: list of Tag objects, tags involved in datasets</li>" +
"11. like: string, datasets fetched have this string matched in their label or description\n"; " <li>dmpIds: list of uuids, dmps with the specific ids</li>" +
" <li>groupIds: list of uuids, in which groups the datasets are</li>" +
" <li>allVersions: boolean, if datasets should be fetched with all their versions</li>" +
" <li>like: string, datasets fetched have this string matched in their label or description</li>" +
" </ol>" +
"</ul>";
public static final String getOverviewSinglePublicNotes = "The json response is of type **ResponseItem< DatasetPublicModel >** containing the following properties:\n" + public static final String getOverviewSinglePublicNotes = "The json response is of type **ResponseItem< DatasetPublicModel >** containing the following properties:\n" +
" 1. **message**: string, message indicating error, null if everything went well\n" + "<ol>" +
" 2. **statusCode**: integer, status code indicating if something unexpected happened, otherwise 0\n" + " <li><b>message</b>: string, message indicating error, null if everything went well</li>" +
" 3. **responseType**: integer, 0 for json, 1 for file\n" + " <li><b>statusCode</b>: integer, status code indicating if something unexpected happened, otherwise 0</li>" +
" 4. **payload**: DatasetPublicModel, dmp returned\n" + " <li><b>responseType</b>: integer, 0 for json, 1 for file</li>" +
"4.1. id: uuid, id of dataset returned\n" + " <li><b>payload</b>: DatasetPublicModel, dmp returned</li>" +
"4.2. label: string, label of dataset\n" + " <ol>" +
"4.3. reference: string, reference of dataset\n" + " <li>id: uuid, id of dataset returned</li>" +
"4.4. uri: string, uri of dataset\n" + " <li>label: string, label of dataset</li>" +
"4.5. description: string, dataset's description\n" + " <li>reference: string, reference of dataset</li>" +
"4.6. status: string, dataset's status\n" + " <li>uri: string, uri of dataset</li>" +
"4.7. createdAt: date, creation time of dataset\n" + " <li>description: string, dataset's description</li>" +
"4.8. dmp: DataManagementPlanPublicListingModel, dmp to which dataset belongs\n" + " <li>status: string, dataset's status</li>" +
"4.9. datasetProfileDefinition: PagedDatasetProfile, dataset's paged description\n" + " <li>createdAt: date, creation time of dataset</li>" +
"4.10. registries: list of RegistryPublicModel, dataset's registries\n" + " <li>dmp: DataManagementPlanPublicListingModel, dmp to which dataset belongs</li>" +
"4.11. services: list of ServicePublicModel, dataset's services\n" + " <li>datasetProfileDefinition: PagedDatasetProfile, dataset's paged description</li>" +
"4.12. dataRepositories: list of DataRepositoryPublicModel, dataset's data repositories\n" + " <li>registries: list of RegistryPublicModel, dataset's registries</li>" +
"4.13. tags: list of Tag, dataset's tags\n" + " <li>services: list of ServicePublicModel, dataset's services</li>" +
"4.14. externalDatasets: list of ExternalDatasetPublicListingModel, dataset's external datasets\n" + " <li>dataRepositories: list of DataRepositoryPublicModel, dataset's data repositories</li>" +
"4.15. profile: DatasetProfilePublicModel, dataset's profile\n" + " <li>tags: list of Tag, dataset's tags</li>" +
"4.16. modifiedAt: date, modification time of dataset\n"; " <li>externalDatasets: list of ExternalDatasetPublicListingModel, dataset's external datasets</li>" +
" <li>profile: DatasetProfilePublicModel, dataset's profile</li>" +
" <li>modifiedAt: date, modification time of dataset</li>" +
" </ol>" +
"</ol>";
public static final String getOverviewSinglePublicResponseExample = "{\n" + public static final String getOverviewSinglePublicResponseExample = "{\n" +
" \"statusCode\": 0,\n" + " \"statusCode\": 0,\n" +
" \"responseType\": 0,\n" + " \"responseType\": 0,\n" +
@ -230,7 +244,7 @@ public class PublicDatasetsDescriptionDocumentation extends BaseController {
)}) )})
@RequestMapping(method = RequestMethod.POST, consumes = "application/json", produces = "application/json") @RequestMapping(method = RequestMethod.POST, consumes = "application/json", produces = "application/json")
public @ResponseBody public @ResponseBody
ResponseEntity<ResponseItem<DataTableData<DatasetPublicListingModel>>> getPaged(@RequestBody @Parameter(description = getPagedRequestBodyDescription) DatasetPublicTableRequest datasetTableRequest) throws Exception { ResponseEntity<ResponseItem<DataTableData<DatasetPublicListingModel>>> getPaged(@Valid @RequestBody @io.swagger.v3.oas.annotations.parameters.RequestBody(description = getPagedRequestBodyDescription) DatasetPublicTableRequest datasetTableRequest) throws Exception {
DataTableData<DatasetPublicListingModel> dataTable = this.datasetManager.getPublicPaged(datasetTableRequest); DataTableData<DatasetPublicListingModel> dataTable = this.datasetManager.getPublicPaged(datasetTableRequest);
return ResponseEntity.status(HttpStatus.OK).body(new ResponseItem<DataTableData<DatasetPublicListingModel>>().status(ApiMessageCode.NO_MESSAGE).payload(dataTable)); return ResponseEntity.status(HttpStatus.OK).body(new ResponseItem<DataTableData<DatasetPublicListingModel>>().status(ApiMessageCode.NO_MESSAGE).payload(dataTable));
} }

View File

@ -37,21 +37,25 @@ public class PublicDmpsDocumentation extends BaseController {
private DataManagementPlanPublicManager dataManagementPlanManager; private DataManagementPlanPublicManager dataManagementPlanManager;
private static final String getPagedNotes = "The json response is of type **ResponseItem<DataTableData< DataManagementPlanPublicListingModel >>** containing the following properties:\n" + private static final String getPagedNotes = "The json response is of type **ResponseItem<DataTableData< DataManagementPlanPublicListingModel >>** containing the following properties:\n" +
" 1. **message**: string, message indicating error, null if everything went well\n" + "<ol>" +
" 2. **statusCode**: integer, status code indicating if something unexpected happened, otherwise 0\n" + " <li><b>message</b>: string, message indicating error, null if everything went well</li>" +
" 3. **responseType**: integer, 0 for json, 1 for file\n" + " <li><b>statusCode</b>: integer, status code indicating if something unexpected happened, otherwise 0</li>" +
" 4. **payload**: DataTableData, containing the number of values of actual data returned and the data of type **DataManagementPlanPublicListingModel**\n" + " <li><b>responseType</b>: integer, 0 for json, 1 for file</li>" +
" 4.1. id: string, id of dmp returned\n" + " <li><b>payload</b>: DataTableData, containing the number of values of actual data returned and the data of type <b>DataManagementPlanPublicListingModel</b></li>" +
" 4.2. label: string, label of dmp\n" + " <ol>" +
" 4.3. grant: string, grant of dmp\n" + " <li>id: string, id of dmp returned</li>" +
" 4.4. createdAt: date, creation time of dmp\n" + " <li>label: string, label of dmp</li>" +
" 4.5. modifiedAt: date, modification time of dmp\n" + " <li>grant: string, grant of dmp</li>" +
" 4.6. version: integer, version of dmp\n" + " <li>createdAt: date, creation time of dmp</li>" +
" 4.7. groupId: uuid, group id in which dmp belongs\n" + " <li>modifiedAt: date, modification time of dmp</li>" +
" 4.8. users: list of UserInfoPublicModel, user who collaborated on the dmp\n" + " <li>version: integer, version of dmp</li>" +
" 4.9. researchers: list of ResearcherPublicModel, researchers involved in the dmp\n" + " <li>groupId: uuid, group id in which dmp belongs</li>" +
" 4.10. finalizedAt: date, finalization date\n" + " <li>users: list of UserInfoPublicModel, user who collaborated on the dmp</li>" +
" 4.11. publishedAt: date, publication date\n"; " <li>researchers: list of ResearcherPublicModel, researchers involved in the dmp</li>" +
" <li>finalizedAt: date, finalization date</li>" +
" <li>publishedAt: date, publication date</li>" +
" </ol>" +
"</ol>";
private static final String getPagedResponseExample = "{\n" + private static final String getPagedResponseExample = "{\n" +
" \"statusCode\": 0,\n" + " \"statusCode\": 0,\n" +
" \"responseType\": 0,\n" + " \"responseType\": 0,\n" +
@ -89,51 +93,62 @@ public class PublicDmpsDocumentation extends BaseController {
" }\n" + " }\n" +
"}"; "}";
private static final String getPagedRequestBodyDescription = "The dmpTableRequest is a DataManagementPlanPublicTableRequest object with the following fields:\n" + private static final String getPagedRequestBodyDescription = "The dmpTableRequest is a DataManagementPlanPublicTableRequest object with the following fields:\n" +
"• **length**: how many dmps should be fetched *(required)*\n" + "• **offset**: offset of the returned dmps, first time should be 0, then offset += length\n" + "<ul>" +
"• **orderings**: array of strings specifying the order, format:= +string or -string or asc or desc. " + " <li><b>length</b>: how many dmps should be fetched <i>(required)</i></li>" +
"**+** means ascending order. **-** means descending order.\n&nbsp;&nbsp;&nbsp;&nbsp;Available strings are: 1) status, 2) label, 3) publishedAt, 4) created.\n" + " <li><b>offset</b>: offset of the returned dmps, first time should be 0, then offset += length</li>" +
"&nbsp;&nbsp;&nbsp;&nbsp;**asc** equivalent to +label.\n&nbsp;&nbsp;&nbsp;&nbsp;**desc** equivalent to -label.\n" + " <li><b>orderings</b>: array of strings specifying the order, format:= +string or -string or asc or desc.</li>" +
"**criteria**: this is DataManagementPlanPublicCriteria object which applies filters for the dmp returned. More specifically:\n" + "<b>+</b> means ascending order. <b>-</b> means descending order.<br>&nbsp;&nbsp;&nbsp;&nbsp;Available strings are: 1) status, 2) label, 3) publishedAt, 4) created.<br>" +
" 1. periodStart: date, dmps created date greater than periodStart\n" + "&nbsp;&nbsp;&nbsp;&nbsp;<b>asc</b> equivalent to +label.<br>&nbsp;&nbsp;&nbsp;&nbsp;<b>desc</b> equivalent to -label.<br>" +
" 2. periodEnd: date, dmps created date less than periodEnd\n" + "<li><b>criteria</b>: this is DataManagementPlanPublicCriteria object which applies filters for the dmp returned. More specifically:</li>" +
" 3. grants: list of uuids, dmps with the corresponding grants\n" + " <ol>" +
" 4. grantsLike: list of strings, dmps fetched having their grant matching any of the strings provided\n" + " <li>periodStart: date, dmps created date greater than periodStart</li>" +
" 5. funders: list of uuids, dmps with the corresponding funders\n" + " <li>periodEnd: date, dmps created date less than periodEnd</li>" +
" 6. fundersLike: list of strings, dmps fetched having their funders matching any of the strings provided\n" + " <li>grants: list of uuids, dmps with the corresponding grants</li>" +
" 7. datasetTemplates: list of uuids, dataset templates which are described in the dmps\n" + " <li>grantsLike: list of strings, dmps fetched having their grant matching any of the strings provided</li>" +
" 8. dmpOrganisations: list of strings, dmps belonging to these organisations\n" + " <li>funders: list of uuids, dmps with the corresponding funders</li>" +
" 9. collaborators: list of uuids, user who collaborated on the creation/modification of dmps\n" + " <li>fundersLike: list of strings, dmps fetched having their funders matching any of the strings provided</li>" +
"10. collaboratorsLike: list of strings, dmps fetched having their collaborators matching any of the strings provided\n" + " <li>datasetTemplates: list of uuids, dataset templates which are described in the dmps</li>" +
"11. allVersions: boolean, if dmps should be fetched with all their versions\n" + " <li>dmpOrganisations: list of strings, dmps belonging to these organisations</li>" +
"12. groupIds: list of uuids, in which groups the dmps are\n" + " <li>collaborators: list of uuids, user who collaborated on the creation/modification of dmps</li>" +
"13. like: string, dmps fetched have this string matched in their label or description\n"; " <li>collaboratorsLike: list of strings, dmps fetched having their collaborators matching any of the strings provided</li>" +
" <li>allVersions: boolean, if dmps should be fetched with all their versions</li>" +
" <li>groupIds: list of uuids, in which groups the dmps are</li>" +
" <li>like: string, dmps fetched have this string matched in their label or description</li>" +
" </ol>" +
"<ul>";
private static final String getPagedRequestParamDescription = "The fieldsGroup is a string which indicates if the returned objects would have all their properties\n" + private static final String getPagedRequestParamDescription = "The fieldsGroup is a string which indicates if the returned objects would have all their properties\n" +
"There are two available values: 1) listing and 2) autocomplete\n" + "There are two available values: 1) listing and 2) autocomplete\n" +
"**listing**: returns objects with all their properties completed\n" + "<ul>" +
"**autocomplete**: returns objects with only id, label, groupId and creationTime assigned"; " <li><b>listing</b>: returns objects with all their properties completed</li>" +
" <li><b>autocomplete</b>: returns objects with only id, label, groupId and creationTime assigned</li>" +
"<ul>";
private static final String getOverviewSinglePublicNotes = "The json response is of type **ResponseItem< DataManagementPlanPublicModel >** containing the following properties:\n" + private static final String getOverviewSinglePublicNotes = "The json response is of type **ResponseItem< DataManagementPlanPublicModel >** containing the following properties:\n" +
" 1. **message**: string, message indicating error, null if everything went well\n" + "<ol>" +
" 2. **statusCode**: integer, status code indicating if something unexpected happened, otherwise 0\n" + " <li><b>message</b>: string, message indicating error, null if everything went well</li>" +
" 3. **responseType**: integer, 0 for json, 1 for file\n" + " <li><b>statusCode</b>: integer, status code indicating if something unexpected happened, otherwise 0</li>" +
" 4. **payload**: DataManagementPlanPublicModel, dmp returned\n" + " <li><b>responseType</b>: integer, 0 for json, 1 for file</li>" +
" 4.1. id: string, id of dmp returned\n" + " <li><b>payload</b>: DataManagementPlanPublicModel, dmp returned</li>" +
" 4.2. label: string, label of dmp\n" + " <ol>" +
" 4.3. profile: string, profile of dmp\n" + " <li>id: string, id of dmp returned</li>" +
" 4.4. grant: GrantPublicOverviewModel, grant of dmp\n" + " <li>label: string, label of dmp</li>" +
" 4.5. createdAt: date, creation time of dmp\n" + " <li>profile: string, profile of dmp</li>" +
" 4.6. modifiedAt: date, modification time of dmp\n" + " <li>grant: GrantPublicOverviewModel, grant of dmp</li>" +
" 4.7. finalizedAt: date, finalization date of dmp\n" + " <li>createdAt: date, creation time of dmp</li>" +
" 4.8. organisations: list of OrganizationPublicModel, organizations in which dmp belongs\n" + " <li>modifiedAt: date, modification time of dmp</li>" +
" 4.9. version: integer, version of dmp\n" + " <li>finalizedAt: date, finalization date of dmp</li>" +
" 4.10. groupId: uuid, group id in which dmp belongs\n" + " <li>organisations: list of OrganizationPublicModel, organizations in which dmp belongs</li>" +
" 4.11. datasets: list of DatasetPublicModel, contained datasets\n" + " <li>version: integer, version of dmp</li>" +
" 4.12. associatedProfiles: list of AssociatedProfilePublicModel, associated profiles of dmp\n" + " <li>groupId: uuid, group id in which dmp belongs</li>" +
" 4.13. researchers: list of ResearcherPublicModel, researchers involved in dmp\n" + " <li>datasets: list of DatasetPublicModel, contained datasets</li>" +
" 4.14. users: list of UserInfoPublicModel, user who collaborated on the dmp\n" + " <li>associatedProfiles: list of AssociatedProfilePublicModel, associated profiles of dmp</li>" +
" 4.15. description: string, description of dmp\n" + " <li>researchers: list of ResearcherPublicModel, researchers involved in dmp</li>" +
" 4.16. publishedAt: date, publication date\n" + " <li>users: list of UserInfoPublicModel, user who collaborated on the dmp</li>" +
" 4.17. doi: string, if dmp has been published to zenodo so it has doi\n"; " <li>description: string, description of dmp</li>" +
" <li>publishedAt: date, publication date</li>" +
" <li>doi: string, if dmp has been published to zenodo so it has doi</li>" +
" </ol>" +
"</ol>";
private static final String getOverviewSinglePublicResponseExample = "{\n" + private static final String getOverviewSinglePublicResponseExample = "{\n" +
" \"statusCode\": 0,\n" + " \"statusCode\": 0,\n" +
" \"responseType\": 0,\n" + " \"responseType\": 0,\n" +
@ -257,7 +272,7 @@ public class PublicDmpsDocumentation extends BaseController {
)}) )})
@RequestMapping(method = RequestMethod.POST, consumes = "application/json", produces = "application/json") @RequestMapping(method = RequestMethod.POST, consumes = "application/json", produces = "application/json")
public @ResponseBody public @ResponseBody
ResponseEntity<ResponseItem<DataTableData<DataManagementPlanPublicListingModel>>> getPaged(@Valid @RequestBody @Parameter(description = getPagedRequestBodyDescription) DataManagmentPlanPublicTableRequest dmpTableRequest, ResponseEntity<ResponseItem<DataTableData<DataManagementPlanPublicListingModel>>> getPaged(@Valid @RequestBody @io.swagger.v3.oas.annotations.parameters.RequestBody(description = getPagedRequestBodyDescription) DataManagmentPlanPublicTableRequest dmpTableRequest,
@RequestParam @Parameter(description = getPagedRequestParamDescription, example = "listing") String fieldsGroup) throws Exception { @RequestParam @Parameter(description = getPagedRequestParamDescription, example = "listing") String fieldsGroup) throws Exception {
DataTableData<DataManagementPlanPublicListingModel> dataTable = this.dataManagementPlanManager.getPublicPaged(dmpTableRequest, fieldsGroup); DataTableData<DataManagementPlanPublicListingModel> dataTable = this.dataManagementPlanManager.getPublicPaged(dmpTableRequest, fieldsGroup);
return ResponseEntity.status(HttpStatus.OK).body(new ResponseItem<DataTableData<DataManagementPlanPublicListingModel>>().status(ApiMessageCode.NO_MESSAGE).payload(dataTable)); return ResponseEntity.status(HttpStatus.OK).body(new ResponseItem<DataTableData<DataManagementPlanPublicListingModel>>().status(ApiMessageCode.NO_MESSAGE).payload(dataTable));

View File

@ -1,3 +1,5 @@
springdoc: springdoc:
packagesToScan: eu.eudat.publicapi.controllers packagesToScan: eu.eudat.publicapi.controllers
pathsToScan: "/api/public/(dmps|datasets)/?.*" pathsToScan: "/api/public/(dmps|datasets)/?.*"
swagger-ui:
docExpansion: none