From a9a3273f6258b70a731a696fad442fb8f8c87094 Mon Sep 17 00:00:00 2001 From: George Kalampokis Date: Fri, 13 Oct 2023 09:50:22 +0300 Subject: [PATCH] Fix compilation errors and fix swagger ui description formatting --- .../queryable/collector/ProjectionField.java | 5 +- dmp-backend/web/pom.xml | 8 +- .../configloaders/ProductionConfigLoader.java | 4 +- .../proxy/fetching/RemoteFetcherUtils.java | 5 - ...ublicDatasetsDescriptionDocumentation.java | 122 +++++++++-------- .../controllers/PublicDmpsDocumentation.java | 129 ++++++++++-------- .../web/src/main/resources/config/swagger.yml | 4 +- 7 files changed, 153 insertions(+), 124 deletions(-) diff --git a/dmp-backend/queryable/src/main/java/eu/eudat/queryable/collector/ProjectionField.java b/dmp-backend/queryable/src/main/java/eu/eudat/queryable/collector/ProjectionField.java index 96aff8a79..31e5bd1fd 100644 --- a/dmp-backend/queryable/src/main/java/eu/eudat/queryable/collector/ProjectionField.java +++ b/dmp-backend/queryable/src/main/java/eu/eudat/queryable/collector/ProjectionField.java @@ -1,7 +1,5 @@ package eu.eudat.queryable.collector; -import com.google.common.collect.Lists; - import jakarta.persistence.Tuple; import java.util.*; import java.util.stream.Collectors; @@ -68,7 +66,8 @@ public class ProjectionField { list.add(current.parent.key); current = current.parent; } - return String.join(".", Lists.reverse(list)); + Collections.reverse(list); + return String.join(".", list); } private Object createObject(List tuples, String field) { diff --git a/dmp-backend/web/pom.xml b/dmp-backend/web/pom.xml index 78409dd80..fd38b3afd 100644 --- a/dmp-backend/web/pom.xml +++ b/dmp-backend/web/pom.xml @@ -119,9 +119,13 @@ io.springfox springfox-boot-starter 3.0.0 - + --> ---> + + org.springdoc + springdoc-openapi-starter-webmvc-ui + 2.1.0 + org.springframework.boot diff --git a/dmp-backend/web/src/main/java/eu/eudat/logic/proxy/config/configloaders/ProductionConfigLoader.java b/dmp-backend/web/src/main/java/eu/eudat/logic/proxy/config/configloaders/ProductionConfigLoader.java index e5b46362b..debb81b17 100644 --- a/dmp-backend/web/src/main/java/eu/eudat/logic/proxy/config/configloaders/ProductionConfigLoader.java +++ b/dmp-backend/web/src/main/java/eu/eudat/logic/proxy/config/configloaders/ProductionConfigLoader.java @@ -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 eu.eudat.logic.proxy.config.ExternalUrls; @@ -33,7 +33,7 @@ import java.util.List; import java.util.Map; import java.util.stream.Collectors; -/* + @Service("configLoader") @Profile({ "production", "staging" }) public class ProductionConfigLoader implements ConfigLoader { diff --git a/dmp-backend/web/src/main/java/eu/eudat/logic/proxy/fetching/RemoteFetcherUtils.java b/dmp-backend/web/src/main/java/eu/eudat/logic/proxy/fetching/RemoteFetcherUtils.java index 00bcadfa1..346bf59a7 100644 --- a/dmp-backend/web/src/main/java/eu/eudat/logic/proxy/fetching/RemoteFetcherUtils.java +++ b/dmp-backend/web/src/main/java/eu/eudat/logic/proxy/fetching/RemoteFetcherUtils.java @@ -1,15 +1,10 @@ package eu.eudat.logic.proxy.fetching; -import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; -import com.jayway.jsonpath.Configuration; 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.ExternalUrlCriteria; import eu.eudat.logic.proxy.fetching.entities.Results; -import io.swagger.models.auth.In; import net.minidev.json.JSONArray; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/dmp-backend/web/src/main/java/eu/eudat/publicapi/controllers/PublicDatasetsDescriptionDocumentation.java b/dmp-backend/web/src/main/java/eu/eudat/publicapi/controllers/PublicDatasetsDescriptionDocumentation.java index 747ea7219..e4aa01a1b 100644 --- a/dmp-backend/web/src/main/java/eu/eudat/publicapi/controllers/PublicDatasetsDescriptionDocumentation.java +++ b/dmp-backend/web/src/main/java/eu/eudat/publicapi/controllers/PublicDatasetsDescriptionDocumentation.java @@ -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.responses.ApiResponse; import io.swagger.v3.oas.annotations.tags.Tag; +import jakarta.validation.Valid; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; @@ -39,23 +40,27 @@ public class PublicDatasetsDescriptionDocumentation extends BaseController { private DatasetPublicManager datasetManager; public static final String getPagedNotes = "The json response is of type **ResponseItem>** containing the following properties:\n" + - " 1. **message**: string, message indicating error, null if everything went well\n" + - " 2. **statusCode**: integer, status code indicating if something unexpected happened, otherwise 0\n" + - " 3. **responseType**: integer, 0 for json, 1 for file\n" + - " 4. **payload**: DataTableData, containing the number of values of actual data returned and the data of type **DatasetPublicListingModel**\n" + - "4.1. id: string, id of dataset returned\n" + - "4.2. label: string, label of dataset\n" + - "4.3. grant: string, grant of dataset\n" + - "4.4. dmp: string, dmp description\n" + - "4.5. dmpId: string, dmp's id\n" + - "4.6. profile: DatasetProfilePublicModel, dataset's profile\n" + - "4.8. createdAt: date, creation date\n" + - "4.9. modifiedAt: date, modification date\n" + - "4.10. description: string, dataset's description\n" + - "4.11. finalizedAt: date, finalization date\n" + - "4.12. dmpPublishedAt: date, dmp's publication date\n" + - "4.13. version: integer, dataset's version\n" + - "4.14. users: list of UserInfoPublicModel, user who collaborated on the dataset\n"; + "
    " + + "
  1. message: string, message indicating error, null if everything went well
  2. " + + "
  3. statusCode: integer, status code indicating if something unexpected happened, otherwise 0
  4. " + + "
  5. responseType: integer, 0 for json, 1 for file
  6. " + + "
  7. payload: DataTableData, containing the number of values of actual data returned and the data of type DatasetPublicListingModel
  8. " + + "
      " + + "
    1. id: string, id of dataset returned
    2. " + + "
    3. label: string, label of dataset
    4. " + + "
    5. grant: string, grant of dataset
    6. " + + "
    7. dmp: string, dmp description
    8. " + + "
    9. dmpId: string, dmp's id
    10. " + + "
    11. profile: DatasetProfilePublicModel, dataset's profile
    12. " + + "
    13. createdAt: date, creation date
    14. " + + "
    15. modifiedAt: date, modification date
    16. " + + "
    17. description: string, dataset's description
    18. " + + "
    19. finalizedAt: date, finalization date
    20. " + + "
    21. dmpPublishedAt: date, dmp's publication date
    22. " + + "
    23. version: integer, dataset's version
    24. " + + "
    25. users: list of UserInfoPublicModel, user who collaborated on the dataset
    26. " + + "
    " + + "
"; public static final String getPagedResponseExample = "{\n" + " \"statusCode\": 0,\n" + " \"responseType\": 0,\n" + @@ -123,44 +128,53 @@ public class PublicDatasetsDescriptionDocumentation extends BaseController { " }\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" + - "• **orderings**: array of strings specifying the order, format:= +string or -string or asc or desc. " + - "**+** means ascending order. **-** means descending order.\n    Available strings are: 1) status, 2) label, 3) created.\n" + - "    **asc** equivalent to +label.\n    **desc** equivalent to -label.\n" + - "**criteria**: this is DatasetPublicCriteria object which applies filters for the datasets returned. More specifically:\n" + - " 1. periodStart: date, datasets created date greater than periodStart\n" + - " 2. periodEnd: date, datasets created date less than periodEnd\n" + - " 3. grants: list of uuids, dmps(datasets) with the corresponding grants\n" + - " 4. collaborators: list of uuids, user who collaborated on the creation/modification of datasets\n" + - " 5. datasetTemplates: list of uuids, dataset templates uuids to be included\n" + - " 6. dmpOrganisations: list of strings, datasets involved in dmps which belong to these organisations\n" + - " 7. tags: list of Tag objects, tags involved in datasets\n" + - " 8. dmpIds: list of uuids, dmps with the specific ids\n" + - " 9. groupIds: list of uuids, in which groups the datasets are\n" + - "10. allVersions: boolean, if datasets should be fetched with all their versions\n" + - "11. like: string, datasets fetched have this string matched in their label or description\n"; + "
    " + + "
  • length: how many datasets should be fetched (required)
  • " + + "
  • offset: offset of the returned datasets, first time should be 0, then offset += length
  • " + + "
  • orderings: array of strings specifying the order, format:= +string or -string or asc or desc.
  • " + + "+ means ascending order. - means descending order.
        Available strings are: 1) status, 2) label, 3) created.
    " + + "    asc equivalent to +label.
        desc equivalent to -label.
    " + + "
  • criteria: this is DatasetPublicCriteria object which applies filters for the datasets returned. More specifically:
  • " + + "
      " + + "
    1. periodStart: date, datasets created date greater than periodStart
    2. " + + "
    3. periodEnd: date, datasets created date less than periodEnd
    4. " + + "
    5. grants: list of uuids, dmps(datasets) with the corresponding grants
    6. " + + "
    7. collaborators: list of uuids, user who collaborated on the creation/modification of datasets
    8. " + + "
    9. datasetTemplates: list of uuids, dataset templates uuids to be included
    10. " + + "
    11. dmpOrganisations: list of strings, datasets involved in dmps which belong to these organisations
    12. " + + "
    13. tags: list of Tag objects, tags involved in datasets
    14. " + + "
    15. dmpIds: list of uuids, dmps with the specific ids
    16. " + + "
    17. groupIds: list of uuids, in which groups the datasets are
    18. " + + "
    19. allVersions: boolean, if datasets should be fetched with all their versions
    20. " + + "
    21. like: string, datasets fetched have this string matched in their label or description
    22. " + + "
    " + + "
"; 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" + - " 2. **statusCode**: integer, status code indicating if something unexpected happened, otherwise 0\n" + - " 3. **responseType**: integer, 0 for json, 1 for file\n" + - " 4. **payload**: DatasetPublicModel, dmp returned\n" + - "4.1. id: uuid, id of dataset returned\n" + - "4.2. label: string, label of dataset\n" + - "4.3. reference: string, reference of dataset\n" + - "4.4. uri: string, uri of dataset\n" + - "4.5. description: string, dataset's description\n" + - "4.6. status: string, dataset's status\n" + - "4.7. createdAt: date, creation time of dataset\n" + - "4.8. dmp: DataManagementPlanPublicListingModel, dmp to which dataset belongs\n" + - "4.9. datasetProfileDefinition: PagedDatasetProfile, dataset's paged description\n" + - "4.10. registries: list of RegistryPublicModel, dataset's registries\n" + - "4.11. services: list of ServicePublicModel, dataset's services\n" + - "4.12. dataRepositories: list of DataRepositoryPublicModel, dataset's data repositories\n" + - "4.13. tags: list of Tag, dataset's tags\n" + - "4.14. externalDatasets: list of ExternalDatasetPublicListingModel, dataset's external datasets\n" + - "4.15. profile: DatasetProfilePublicModel, dataset's profile\n" + - "4.16. modifiedAt: date, modification time of dataset\n"; + "
    " + + "
  1. message: string, message indicating error, null if everything went well
  2. " + + "
  3. statusCode: integer, status code indicating if something unexpected happened, otherwise 0
  4. " + + "
  5. responseType: integer, 0 for json, 1 for file
  6. " + + "
  7. payload: DatasetPublicModel, dmp returned
  8. " + + "
      " + + "
    1. id: uuid, id of dataset returned
    2. " + + "
    3. label: string, label of dataset
    4. " + + "
    5. reference: string, reference of dataset
    6. " + + "
    7. uri: string, uri of dataset
    8. " + + "
    9. description: string, dataset's description
    10. " + + "
    11. status: string, dataset's status
    12. " + + "
    13. createdAt: date, creation time of dataset
    14. " + + "
    15. dmp: DataManagementPlanPublicListingModel, dmp to which dataset belongs
    16. " + + "
    17. datasetProfileDefinition: PagedDatasetProfile, dataset's paged description
    18. " + + "
    19. registries: list of RegistryPublicModel, dataset's registries
    20. " + + "
    21. services: list of ServicePublicModel, dataset's services
    22. " + + "
    23. dataRepositories: list of DataRepositoryPublicModel, dataset's data repositories
    24. " + + "
    25. tags: list of Tag, dataset's tags
    26. " + + "
    27. externalDatasets: list of ExternalDatasetPublicListingModel, dataset's external datasets
    28. " + + "
    29. profile: DatasetProfilePublicModel, dataset's profile
    30. " + + "
    31. modifiedAt: date, modification time of dataset
    32. " + + "
    " + + "
"; public static final String getOverviewSinglePublicResponseExample = "{\n" + " \"statusCode\": 0,\n" + " \"responseType\": 0,\n" + @@ -230,7 +244,7 @@ public class PublicDatasetsDescriptionDocumentation extends BaseController { )}) @RequestMapping(method = RequestMethod.POST, consumes = "application/json", produces = "application/json") public @ResponseBody - ResponseEntity>> getPaged(@RequestBody @Parameter(description = getPagedRequestBodyDescription) DatasetPublicTableRequest datasetTableRequest) throws Exception { + ResponseEntity>> getPaged(@Valid @RequestBody @io.swagger.v3.oas.annotations.parameters.RequestBody(description = getPagedRequestBodyDescription) DatasetPublicTableRequest datasetTableRequest) throws Exception { DataTableData dataTable = this.datasetManager.getPublicPaged(datasetTableRequest); return ResponseEntity.status(HttpStatus.OK).body(new ResponseItem>().status(ApiMessageCode.NO_MESSAGE).payload(dataTable)); } diff --git a/dmp-backend/web/src/main/java/eu/eudat/publicapi/controllers/PublicDmpsDocumentation.java b/dmp-backend/web/src/main/java/eu/eudat/publicapi/controllers/PublicDmpsDocumentation.java index cee43ccf8..2808eecbe 100644 --- a/dmp-backend/web/src/main/java/eu/eudat/publicapi/controllers/PublicDmpsDocumentation.java +++ b/dmp-backend/web/src/main/java/eu/eudat/publicapi/controllers/PublicDmpsDocumentation.java @@ -37,21 +37,25 @@ public class PublicDmpsDocumentation extends BaseController { private DataManagementPlanPublicManager dataManagementPlanManager; private static final String getPagedNotes = "The json response is of type **ResponseItem>** containing the following properties:\n" + - " 1. **message**: string, message indicating error, null if everything went well\n" + - " 2. **statusCode**: integer, status code indicating if something unexpected happened, otherwise 0\n" + - " 3. **responseType**: integer, 0 for json, 1 for file\n" + - " 4. **payload**: DataTableData, containing the number of values of actual data returned and the data of type **DataManagementPlanPublicListingModel**\n" + - " 4.1. id: string, id of dmp returned\n" + - " 4.2. label: string, label of dmp\n" + - " 4.3. grant: string, grant of dmp\n" + - " 4.4. createdAt: date, creation time of dmp\n" + - " 4.5. modifiedAt: date, modification time of dmp\n" + - " 4.6. version: integer, version of dmp\n" + - " 4.7. groupId: uuid, group id in which dmp belongs\n" + - " 4.8. users: list of UserInfoPublicModel, user who collaborated on the dmp\n" + - " 4.9. researchers: list of ResearcherPublicModel, researchers involved in the dmp\n" + - " 4.10. finalizedAt: date, finalization date\n" + - " 4.11. publishedAt: date, publication date\n"; + "
    " + + "
  1. message: string, message indicating error, null if everything went well
  2. " + + "
  3. statusCode: integer, status code indicating if something unexpected happened, otherwise 0
  4. " + + "
  5. responseType: integer, 0 for json, 1 for file
  6. " + + "
  7. payload: DataTableData, containing the number of values of actual data returned and the data of type DataManagementPlanPublicListingModel
  8. " + + "
      " + + "
    1. id: string, id of dmp returned
    2. " + + "
    3. label: string, label of dmp
    4. " + + "
    5. grant: string, grant of dmp
    6. " + + "
    7. createdAt: date, creation time of dmp
    8. " + + "
    9. modifiedAt: date, modification time of dmp
    10. " + + "
    11. version: integer, version of dmp
    12. " + + "
    13. groupId: uuid, group id in which dmp belongs
    14. " + + "
    15. users: list of UserInfoPublicModel, user who collaborated on the dmp
    16. " + + "
    17. researchers: list of ResearcherPublicModel, researchers involved in the dmp
    18. " + + "
    19. finalizedAt: date, finalization date
    20. " + + "
    21. publishedAt: date, publication date
    22. " + + "
    " + + "
"; private static final String getPagedResponseExample = "{\n" + " \"statusCode\": 0,\n" + " \"responseType\": 0,\n" + @@ -89,51 +93,62 @@ public class PublicDmpsDocumentation extends BaseController { " }\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" + - "• **orderings**: array of strings specifying the order, format:= +string or -string or asc or desc. " + - "**+** means ascending order. **-** means descending order.\n    Available strings are: 1) status, 2) label, 3) publishedAt, 4) created.\n" + - "    **asc** equivalent to +label.\n    **desc** equivalent to -label.\n" + - "**criteria**: this is DataManagementPlanPublicCriteria object which applies filters for the dmp returned. More specifically:\n" + - " 1. periodStart: date, dmps created date greater than periodStart\n" + - " 2. periodEnd: date, dmps created date less than periodEnd\n" + - " 3. grants: list of uuids, dmps with the corresponding grants\n" + - " 4. grantsLike: list of strings, dmps fetched having their grant matching any of the strings provided\n" + - " 5. funders: list of uuids, dmps with the corresponding funders\n" + - " 6. fundersLike: list of strings, dmps fetched having their funders matching any of the strings provided\n" + - " 7. datasetTemplates: list of uuids, dataset templates which are described in the dmps\n" + - " 8. dmpOrganisations: list of strings, dmps belonging to these organisations\n" + - " 9. collaborators: list of uuids, user who collaborated on the creation/modification of dmps\n" + - "10. collaboratorsLike: list of strings, dmps fetched having their collaborators matching any of the strings provided\n" + - "11. allVersions: boolean, if dmps should be fetched with all their versions\n" + - "12. groupIds: list of uuids, in which groups the dmps are\n" + - "13. like: string, dmps fetched have this string matched in their label or description\n"; + "
    " + + "
  • length: how many dmps should be fetched (required)
  • " + + "
  • offset: offset of the returned dmps, first time should be 0, then offset += length
  • " + + "
  • orderings: array of strings specifying the order, format:= +string or -string or asc or desc.
  • " + + "+ means ascending order. - means descending order.
        Available strings are: 1) status, 2) label, 3) publishedAt, 4) created.
    " + + "    asc equivalent to +label.
        desc equivalent to -label.
    " + + "
  • criteria: this is DataManagementPlanPublicCriteria object which applies filters for the dmp returned. More specifically:
  • " + + "
      " + + "
    1. periodStart: date, dmps created date greater than periodStart
    2. " + + "
    3. periodEnd: date, dmps created date less than periodEnd
    4. " + + "
    5. grants: list of uuids, dmps with the corresponding grants
    6. " + + "
    7. grantsLike: list of strings, dmps fetched having their grant matching any of the strings provided
    8. " + + "
    9. funders: list of uuids, dmps with the corresponding funders
    10. " + + "
    11. fundersLike: list of strings, dmps fetched having their funders matching any of the strings provided
    12. " + + "
    13. datasetTemplates: list of uuids, dataset templates which are described in the dmps
    14. " + + "
    15. dmpOrganisations: list of strings, dmps belonging to these organisations
    16. " + + "
    17. collaborators: list of uuids, user who collaborated on the creation/modification of dmps
    18. " + + "
    19. collaboratorsLike: list of strings, dmps fetched having their collaborators matching any of the strings provided
    20. " + + "
    21. allVersions: boolean, if dmps should be fetched with all their versions
    22. " + + "
    23. groupIds: list of uuids, in which groups the dmps are
    24. " + + "
    25. like: string, dmps fetched have this string matched in their label or description
    26. " + + "
    " + + "
      "; 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" + - "**listing**: returns objects with all their properties completed\n" + - "**autocomplete**: returns objects with only id, label, groupId and creationTime assigned"; + "
        " + + "
      • listing: returns objects with all their properties completed
      • " + + "
      • autocomplete: returns objects with only id, label, groupId and creationTime assigned
      • " + + "
          "; 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" + - " 2. **statusCode**: integer, status code indicating if something unexpected happened, otherwise 0\n" + - " 3. **responseType**: integer, 0 for json, 1 for file\n" + - " 4. **payload**: DataManagementPlanPublicModel, dmp returned\n" + - " 4.1. id: string, id of dmp returned\n" + - " 4.2. label: string, label of dmp\n" + - " 4.3. profile: string, profile of dmp\n" + - " 4.4. grant: GrantPublicOverviewModel, grant of dmp\n" + - " 4.5. createdAt: date, creation time of dmp\n" + - " 4.6. modifiedAt: date, modification time of dmp\n" + - " 4.7. finalizedAt: date, finalization date of dmp\n" + - " 4.8. organisations: list of OrganizationPublicModel, organizations in which dmp belongs\n" + - " 4.9. version: integer, version of dmp\n" + - " 4.10. groupId: uuid, group id in which dmp belongs\n" + - " 4.11. datasets: list of DatasetPublicModel, contained datasets\n" + - " 4.12. associatedProfiles: list of AssociatedProfilePublicModel, associated profiles of dmp\n" + - " 4.13. researchers: list of ResearcherPublicModel, researchers involved in dmp\n" + - " 4.14. users: list of UserInfoPublicModel, user who collaborated on the dmp\n" + - " 4.15. description: string, description of dmp\n" + - " 4.16. publishedAt: date, publication date\n" + - " 4.17. doi: string, if dmp has been published to zenodo so it has doi\n"; + "
            " + + "
          1. message: string, message indicating error, null if everything went well
          2. " + + "
          3. statusCode: integer, status code indicating if something unexpected happened, otherwise 0
          4. " + + "
          5. responseType: integer, 0 for json, 1 for file
          6. " + + "
          7. payload: DataManagementPlanPublicModel, dmp returned
          8. " + + "
              " + + "
            1. id: string, id of dmp returned
            2. " + + "
            3. label: string, label of dmp
            4. " + + "
            5. profile: string, profile of dmp
            6. " + + "
            7. grant: GrantPublicOverviewModel, grant of dmp
            8. " + + "
            9. createdAt: date, creation time of dmp
            10. " + + "
            11. modifiedAt: date, modification time of dmp
            12. " + + "
            13. finalizedAt: date, finalization date of dmp
            14. " + + "
            15. organisations: list of OrganizationPublicModel, organizations in which dmp belongs
            16. " + + "
            17. version: integer, version of dmp
            18. " + + "
            19. groupId: uuid, group id in which dmp belongs
            20. " + + "
            21. datasets: list of DatasetPublicModel, contained datasets
            22. " + + "
            23. associatedProfiles: list of AssociatedProfilePublicModel, associated profiles of dmp
            24. " + + "
            25. researchers: list of ResearcherPublicModel, researchers involved in dmp
            26. " + + "
            27. users: list of UserInfoPublicModel, user who collaborated on the dmp
            28. " + + "
            29. description: string, description of dmp
            30. " + + "
            31. publishedAt: date, publication date
            32. " + + "
            33. doi: string, if dmp has been published to zenodo so it has doi
            34. " + + "
            " + + "
          "; private static final String getOverviewSinglePublicResponseExample = "{\n" + " \"statusCode\": 0,\n" + " \"responseType\": 0,\n" + @@ -257,7 +272,7 @@ public class PublicDmpsDocumentation extends BaseController { )}) @RequestMapping(method = RequestMethod.POST, consumes = "application/json", produces = "application/json") public @ResponseBody - ResponseEntity>> getPaged(@Valid @RequestBody @Parameter(description = getPagedRequestBodyDescription) DataManagmentPlanPublicTableRequest dmpTableRequest, + ResponseEntity>> getPaged(@Valid @RequestBody @io.swagger.v3.oas.annotations.parameters.RequestBody(description = getPagedRequestBodyDescription) DataManagmentPlanPublicTableRequest dmpTableRequest, @RequestParam @Parameter(description = getPagedRequestParamDescription, example = "listing") String fieldsGroup) throws Exception { DataTableData dataTable = this.dataManagementPlanManager.getPublicPaged(dmpTableRequest, fieldsGroup); return ResponseEntity.status(HttpStatus.OK).body(new ResponseItem>().status(ApiMessageCode.NO_MESSAGE).payload(dataTable)); diff --git a/dmp-backend/web/src/main/resources/config/swagger.yml b/dmp-backend/web/src/main/resources/config/swagger.yml index ed221dcea..60a91ae62 100644 --- a/dmp-backend/web/src/main/resources/config/swagger.yml +++ b/dmp-backend/web/src/main/resources/config/swagger.yml @@ -1,3 +1,5 @@ springdoc: packagesToScan: eu.eudat.publicapi.controllers - pathsToScan: "/api/public/(dmps|datasets)/?.*" \ No newline at end of file + pathsToScan: "/api/public/(dmps|datasets)/?.*" + swagger-ui: + docExpansion: none \ No newline at end of file