Skip to content

Commit

Permalink
#537 fixed dataset search parameters documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
marcos-lg committed Dec 27, 2023
1 parent 1d35611 commit 613f27f
Showing 1 changed file with 68 additions and 45 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,7 @@
import org.gbif.api.service.registry.DatasetSearchService;
import org.gbif.api.service.registry.DatasetService;
import org.gbif.api.util.iterables.Iterables;
import org.gbif.api.vocabulary.Continent;
import org.gbif.api.vocabulary.Country;
import org.gbif.api.vocabulary.DatasetSubtype;
import org.gbif.api.vocabulary.DatasetType;
import org.gbif.api.vocabulary.IdentifierType;
import org.gbif.api.vocabulary.License;
import org.gbif.api.vocabulary.MetadataType;
import org.gbif.api.vocabulary.*;
import org.gbif.common.messaging.api.MessagePublisher;
import org.gbif.common.messaging.api.messages.Platform;
import org.gbif.common.messaging.api.messages.StartCrawlMessage;
Expand Down Expand Up @@ -237,13 +231,6 @@ public DatasetResource(
@Retention(RetentionPolicy.RUNTIME)
@Parameters(
value = {
@Parameter(
name = "country",
description =
"The 2-letter country code (as per ISO-3166-1) of the country publishing the dataset.",
schema = @Schema(implementation = Country.class),
in = ParameterIn.QUERY,
explode = Explode.FALSE),
@Parameter(
name = "type",
description = "The primary type of the dataset.",
Expand All @@ -256,24 +243,6 @@ public DatasetResource(
schema = @Schema(implementation = DatasetSubtype.class),
in = ParameterIn.QUERY,
explode = Explode.TRUE),
@Parameter(
name = "license",
description = "The dataset's licence.",
schema = @Schema(implementation = License.class),
in = ParameterIn.QUERY,
explode = Explode.TRUE),
@Parameter(
name = "identifier",
description = "An identifier such as a DOI or UUID.",
schema = @Schema(implementation = String.class),
in = ParameterIn.QUERY),
@Parameter(
name = "keyword",
description =
"Filters datasets by a case insensitive plain text keyword. The search is done on the merged "
+ "collection of tags, the dataset keywordCollections and temporalCoverages.",
schema = @Schema(implementation = String.class),
in = ParameterIn.QUERY),
@Parameter(
name = "publishingOrg",
description = "Filters datasets by their publishing organization UUID key",
Expand All @@ -285,9 +254,11 @@ public DatasetResource(
schema = @Schema(implementation = UUID.class),
in = ParameterIn.QUERY),
@Parameter(
name = "endorsingNodeKey",
description = "Node key that endorsed this dataset's publisher",
schema = @Schema(implementation = UUID.class),
name = "keyword",
description =
"Filters datasets by a case insensitive plain text keyword. The search is done on the merged "
+ "collection of tags, the dataset keywordCollections and temporalCoverages.",
schema = @Schema(implementation = String.class),
in = ParameterIn.QUERY),
@Parameter(
name = "decade",
Expand All @@ -305,17 +276,16 @@ public DatasetResource(
in = ParameterIn.QUERY,
explode = Explode.FALSE),
@Parameter(
name = "projectId",
name = "hostingCountry",
description =
"Filter or facet based on the project ID of a given dataset. A dataset can have a project id if "
+ "it is the result of a project. multiple datasets can have the same project id.",
schema = @Schema(implementation = String.class),
"Filters datasets by their hosting organization's country given as a ISO 639-1 (2 letter) country code",
schema = @Schema(implementation = Country.class),
in = ParameterIn.QUERY,
example = "AA003-AA003311F"),
explode = Explode.FALSE),
@Parameter(
name = "hostingCountry",
name = "country",
description =
"Filters datasets by their hosting organization's country given as a ISO 639-1 (2 letter) country code",
"The 2-letter country code (as per ISO-3166-1) of the country publishing the dataset.",
schema = @Schema(implementation = Country.class),
in = ParameterIn.QUERY,
explode = Explode.FALSE),
Expand All @@ -326,11 +296,64 @@ public DatasetResource(
in = ParameterIn.QUERY,
deprecated = true,
explode = Explode.FALSE),
@Parameter(
name = "license",
description = "The dataset's licence.",
schema = @Schema(implementation = License.class),
in = ParameterIn.QUERY,
explode = Explode.TRUE),
@Parameter(
name = "projectId",
description =
"Filter or facet based on the project ID of a given dataset. A dataset can have a project id if "
+ "it is the result of a project. multiple datasets can have the same project id.",
schema = @Schema(implementation = String.class),
in = ParameterIn.QUERY,
example = "AA003-AA003311F"),
@Parameter(
name = "taxonKey",
description = "A taxon key from the GBIF backbone.",
schema = @Schema(implementation = Integer.class),
in = ParameterIn.QUERY),
@Parameter(
name = "recordCount",
description =
"Number of records of the dataset. Accepts ranges and a '*' can be used as a wildcard.",
schema = @Schema(implementation = String.class),
in = ParameterIn.QUERY,
example = "100,*"),
@Parameter(
name = "modifiedDate",
description =
"Date when the dataset was modified the last time. Accepts ranges and a '*' can be used as a wildcard.",
schema = @Schema(implementation = String.class),
in = ParameterIn.QUERY,
example = "2022-05-01,*"),
@Parameter(
name = "doi",
description = "A DOI identifier.",
schema = @Schema(implementation = String.class),
in = ParameterIn.QUERY),
@Parameter(
name = "networkKey",
description = "Network associated to a dataset",
schema = @Schema(implementation = UUID.class),
in = ParameterIn.QUERY),
@Parameter(
name = "endorsingNodeKey",
description = "Node key that endorsed this dataset's publisher",
schema = @Schema(implementation = UUID.class),
in = ParameterIn.QUERY),
@Parameter(
name = "installationKey",
description = "Key of the installation that hosts the dataset.",
schema = @Schema(implementation = UUID.class),
in = ParameterIn.QUERY),
@Parameter(
name = "endpointType",
description = "Type of the endpoint of the dataset.",
schema = @Schema(implementation = EndpointType.class),
in = ParameterIn.QUERY),
@Parameter(name = "request", hidden = true),
@Parameter(name = "searchRequest", hidden = true),
@Parameter(name = "suggestRequest", hidden = true)
Expand All @@ -340,9 +363,9 @@ public DatasetResource(
@Target({ElementType.METHOD, ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
@Parameter(
name = "metadataKey",
description = "Key for the *metadata document* (not a dataset UUID).",
in = ParameterIn.PATH)
name = "metadataKey",
description = "Key for the *metadata document* (not a dataset UUID).",
in = ParameterIn.PATH)
@interface MetadataDocumentKeyParameter {}

@Operation(
Expand Down

0 comments on commit 613f27f

Please sign in to comment.