USACE / USACE/cwms-data-api

Add Code Examples to the Swagger Pages

Open
#1,503 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Java
Stars
28
Forks
25
Avg merge
4d 22h
Merged PRs (30d)
20

Description

Is your feature request related to a problem? Please describe.

Enable code examples in the swagger UI. This would allow end users to select a preferred language and it generate a quick sample of the code. For users that may want a single endpoint or two and do not need client libraries for this.

Describe the solution you'd like
We will most likely need to update javalin (@MikeNeilson ?)
When we go through #930 we could also work on adding this

Describe alternatives you've considered
Linking to various docs for client libraries

Additional context
Requests by public / others for code samples

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Review the Swagger UI integration and the Javalin reference mentioned in the issue, then check #930 for related scope. Done means Swagger pages let users select a language and generate a code sample for an endpoint.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, openapi
Domain
api, documentation
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.