Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/main/java/edu/harvard/iq/dataverse/api/Access.java
Original file line number Diff line number Diff line change
Expand Up @@ -450,6 +450,9 @@ public Response datafile(@Context ContainerRequestContext crc,
@Produces({"application/json"})
@Operation(summary = "Submit guestbook response for a data file",
description = "Records the supplied guestbook response and returns access details for a data file download.")
@APIResponse(responseCode = "200", description = "Data-file access details.",
content = @Content(mediaType = "application/json",
schema = @Schema(type = SchemaType.OBJECT)))
public Response datafileWithGuestbookResponse(@Context ContainerRequestContext crc,
@Parameter(description = "Data file id, persistent identifier, or path-style file reference.", required = true)
@PathParam("fileId") String fileId,
Expand Down Expand Up @@ -1656,7 +1659,9 @@ private String getWebappImageResource(String imageName) {
description = "Saves an auxiliary file")
@APIResponses(value = {
@APIResponse(responseCode = "200",
description = "File saved response"),
description = "File saved response",
content = @Content(mediaType = MediaType.APPLICATION_JSON,
schema = @Schema(type = SchemaType.OBJECT))),
@APIResponse(responseCode = "403",
description = "User not authorized to edit the dataset."),
@APIResponse(responseCode = "400",
Expand Down
15 changes: 15 additions & 0 deletions src/main/java/edu/harvard/iq/dataverse/api/Admin.java
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@
import jakarta.ws.rs.WebApplicationException;
import jakarta.ws.rs.core.StreamingOutput;
import org.eclipse.microprofile.openapi.annotations.Operation;
import org.eclipse.microprofile.openapi.annotations.enums.SchemaType;
import org.eclipse.microprofile.openapi.annotations.media.Content;
import org.eclipse.microprofile.openapi.annotations.media.Schema;
import org.eclipse.microprofile.openapi.annotations.parameters.Parameter;
Expand Down Expand Up @@ -504,6 +505,9 @@ public Response enableAuthenticationProvider_deprecated(@Parameter(description =
@Produces("application/json")
@Operation(summary = "Switch authentication provider enabled state",
description = "Enables or disables a registered authentication provider.")
@APIResponse(responseCode = "200", description = "Authentication provider state updated.",
content = @Content(mediaType = "application/json",
schema = @Schema(type = SchemaType.OBJECT)))
public Response enableAuthenticationProvider(@Parameter(description = "Authentication provider id.", required = true)
@PathParam("id") String id,
@RequestBody(description = "Boolean value indicating whether the provider should be enabled.")
Expand Down Expand Up @@ -730,6 +734,9 @@ public Response listAuthenticatedUsers(@Context ContainerRequestContext crc) {
@Produces({ "application/json" })
@Operation(summary = "Search authenticated users",
description = "Searches authenticated users for the dashboard user list and returns paged JSON results.")
@APIResponse(responseCode = "200", description = "Paged authenticated user results.",
content = @Content(mediaType = "application/json",
schema = @Schema(type = SchemaType.OBJECT)))
public Response filterAuthenticatedUsers(
@Context ContainerRequestContext crc,
@Parameter(description = "Search text matched against authenticated users.")
Expand Down Expand Up @@ -1327,6 +1334,10 @@ public Response setSuperuserStatus(@Parameter(description = "Authenticated user
@Produces({"application/json"})
@Operation(summary = "Validate all datasets",
description = "Streams validation results for every local dataset.")
@APIResponse(responseCode = "200", description = "Streaming dataset validation results.",
content = @Content(mediaType = "application/json",
schema = @Schema(type = SchemaType.OBJECT,
description = "Validation results grouped under a datasets array.")))
public Response validateAllDatasets(@Parameter(description = "Whether to include variable-level validation details.")
@QueryParam("variables") boolean includeVariables) {

Expand Down Expand Up @@ -1473,6 +1484,10 @@ public Response validateDataset(@Parameter(description = "Dataset id or persiste
@Produces({"application/json"})
@Operation(summary = "Validate files in one dataset",
description = "Streams checksum validation results for all data files in a dataset.")
@APIResponse(responseCode = "200", description = "Streaming data-file validation results.",
content = @Content(mediaType = "application/json",
schema = @Schema(type = SchemaType.OBJECT,
description = "Checksum validation results grouped under a dataFiles array.")))
public Response validateDatasetDatafiles(@Parameter(description = "Dataset id or persistent identifier.", required = true)
@PathParam("id") String id) {

Expand Down
7 changes: 7 additions & 0 deletions src/main/java/edu/harvard/iq/dataverse/api/DatasetFields.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@

import java.util.List;
import org.eclipse.microprofile.openapi.annotations.Operation;
import org.eclipse.microprofile.openapi.annotations.media.Content;
import org.eclipse.microprofile.openapi.annotations.media.Schema;
import org.eclipse.microprofile.openapi.annotations.enums.SchemaType;
import org.eclipse.microprofile.openapi.annotations.responses.APIResponse;
import org.eclipse.microprofile.openapi.annotations.tags.Tag;

import static edu.harvard.iq.dataverse.util.json.JsonPrinter.jsonDatasetFieldTypes;
Expand All @@ -27,6 +31,9 @@ public class DatasetFields extends AbstractApiBean {
@Path("facetables")
@Operation(summary = "Lists facetable dataset fields",
description = "Lists all facetable dataset fields defined in the installation.")
@APIResponse(responseCode = "200", description = "Facetable dataset fields.",
content = @Content(mediaType = "application/json",
schema = @Schema(type = SchemaType.OBJECT)))
public Response listAllFacetableDatasetFields() {
List<DatasetFieldType> datasetFieldTypes = datasetFieldService.findAllFacetableFieldTypes();
return ok(jsonDatasetFieldTypes(datasetFieldTypes));
Expand Down
Loading
Loading