Skip to content

Improve Dataverse REST OpenAPI source annotations#12439

Open
beepsoft wants to merge 4 commits into
IQSS:developfrom
beepsoft:openapi-improvements
Open

Improve Dataverse REST OpenAPI source annotations#12439
beepsoft wants to merge 4 commits into
IQSS:developfrom
beepsoft:openapi-improvements

Conversation

@beepsoft

@beepsoft beepsoft commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Add source-level OpenAPI annotations across Dataverse REST resources, including class tags, operation summaries/descriptions, parameter and request-body docs, API key security metadata, and response schema fixes for generated OpenAPI/MCP tooling.

What this PR does / why we need it:

Ongoing discussions in #12437.

Special notes for your reviewer:

This PR affects 580 endpoints (Java methods), which means we updated 45 Java files for this, which all need to be reviewed.

Suggestions on how to test this:

See what is returned by the /openapi or /openapi?format=json endpoint.

Does this PR introduce a user interface change? If mockups are available, please link/include them here:

No.

Add source-level OpenAPI annotations across Dataverse REST resources, including
class tags, operation summaries/descriptions, parameter and request-body docs,
API key security metadata, and response schema fixes for generated OpenAPI/MCP
tooling.

IQSS#12437 describes this effort in more details
description = "Updates or creates a draft dataset version from JSON-LD metadata.")
@SecurityRequirement(name = "DataverseApiKey")
public Response updateVersionMetadata(@Context ContainerRequestContext crc,
@RequestBody(description = "JSON-LD metadata to apply to the dataset draft.")
@AuthRequired
@Path("datasetTypes/{id}")
public Response deleteDatasetType(@Context ContainerRequestContext crc, @PathParam("id") String doomed) {
@Operation(summary = "Remove a dataset type",
@PUT
@Path("datasetTypes/{idOrName}")
public Response updateDatasetTypeLinksWithMetadataBlocks(@Context ContainerRequestContext crc, @PathParam("idOrName") String idOrName, String jsonBody) {
@Operation(summary = "Link metadata blocks to a dataset type",
@srmanda-cs

Copy link
Copy Markdown
Contributor

Please assign me as a reviewer :)

@beepsoft

beepsoft commented Jun 4, 2026

Copy link
Copy Markdown
Contributor Author

@srmanda-cs I don't think I have permissions to do it here. @pdurbin can you maybe help, please?

@pdurbin pdurbin moved this to Ready for Triage in IQSS Dataverse Project Jun 4, 2026
@pdurbin

pdurbin commented Jun 4, 2026

Copy link
Copy Markdown
Member

@srmanda-cs I just sent an invite. Please accept it at https://github.com/IQSS

Afterwards, you'll be part of https://github.com/orgs/IQSS/teams/dataverse-readonly which means I'll be able to assign issues and PRs to you (so look out! 😜 ).

@srmanda-cs

Copy link
Copy Markdown
Contributor

@srmanda-cs I just sent an invite. Please accept it at https://github.com/IQSS

Afterwards, you'll be part of https://github.com/orgs/IQSS/teams/dataverse-readonly which means I'll be able to assign issues and PRs to you (so look out! 😜 ).

Thank you so much!

@pdurbin pdurbin requested a review from srmanda-cs June 4, 2026 20:30
@pdurbin pdurbin moved this from Ready for Triage to Ready for Review ⏩ in IQSS Dataverse Project Jun 16, 2026
@pdurbin

pdurbin commented Jun 16, 2026

Copy link
Copy Markdown
Member

@beepsoft can you please:

  • resolve merge conflicts
  • upload a JSON file of output for @jp-tosca and others
  • give us a list of 5-10 endpoints that you think will be particularly useful or popular so we can look deeper at them

Thanks! And thanks for the slides and presentation today! ❤️

beepsoft added 3 commits June 17, 2026 13:41
Enable DataverseOpenApiFilter in the SmallRye OpenAPI Maven generation and add
the filter implementation to normalize generated API docs after annotation
scanning.

The filter adds the Dataverse API key security scheme, rewrites selected Access
download responses as binary wire payloads instead of internal writer helper
schemas, removes a known circular schema back-reference, and prunes component
schemas no longer reachable from public operations.
Update Dataverse REST API source annotations to make the generated OpenAPI
document more complete and better aligned with the vacuum linter ruleset.

See scripts/openapi/README.md for running vacuum.

Add missing operation summaries, parameter descriptions, request body
descriptions, security requirements, response metadata, and schema descriptions
across API resources and exposed DTO/model classes. Refine binary response
schemas and remove duplicate API key security scheme metadata.
# Conflicts:
#	src/main/java/edu/harvard/iq/dataverse/api/Access.java
#	src/main/java/edu/harvard/iq/dataverse/api/Datasets.java
#	src/main/java/edu/harvard/iq/dataverse/api/Dataverses.java
#	src/main/java/edu/harvard/iq/dataverse/api/Guestbooks.java
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Ready for Review ⏩

Development

Successfully merging this pull request may close these issues.

4 participants