Skip to content

CDA-118: Add input examples for Level endpoints#1815

Merged
adamkorynta merged 6 commits into
USACE:developfrom
zack-rma:bugfix/level-examples
Jul 2, 2026
Merged

CDA-118: Add input examples for Level endpoints#1815
adamkorynta merged 6 commits into
USACE:developfrom
zack-rma:bugfix/level-examples

Conversation

@zack-rma

@zack-rma zack-rma commented Jun 30, 2026

Copy link
Copy Markdown
Collaborator

Summary

Adds default JSON examples for the multiple level types to the Level POST, GET, PATCH endpoints. These examples can be overridden via controller annotations.

Related Issue

Closes #1723

Validation

Manually verified. See screenshots. Note that location names and comments have been updated since these screenshots were taken.

image image image image image

Checklist

  • AI tools used

… ApiServlet to read example files and add content to specified endpoints.
Comment thread cwms-data-api/src/main/java/cwms/cda/ApiServlet.java Outdated
@zack-rma zack-rma requested a review from adamkorynta July 1, 2026 22:41
Comment thread cwms-data-api/src/main/java/cwms/cda/openapi/ExampleUtils.java Outdated
Comment thread cwms-data-api/src/main/java/cwms/cda/openapi/ExampleUtils.java Outdated

// Enum to define example configurations by endpoint
// Add examples here for other endpoints
private enum EndpointExamples {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is certainly fine for now... but let's all agree this will grow insanely and longer term we probably want something like annotations on the DTOs that can be looked up and contain links to relevant data.

@adamkorynta adamkorynta merged commit 44e22ad into USACE:develop Jul 2, 2026
7 checks passed
@zack-rma zack-rma deleted the bugfix/level-examples branch July 2, 2026 20:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Swagger docs do not show seasonal location level POST payloads

3 participants