OpenAPITools / OpenAPITools/openapi-generator
[REQ] [java-undertow-server] Provide HttpHandler that checks input JSON and params
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 26.8k
- Forks
- 7.7k
- PR merge metrics
- PR metrics pending
Description
Is your feature request related to a problem? Please describe.
When writing the API spec, the schemas for the endpoints define required fields, possibly regexes for path params, input format, etc. At the moment the template forces the user to implement all of those checks on their own while referencing the spec - a tedious task that could be done "once and for all".
Describe the solution you'd like
A HttpHandler that uses the generated openapi.json to check the input and paramaters. It would hand off control to the user's handler once all checks are passed.
Describe alternatives you've considered
An abstract base class that all user handlers have to subclass in order to use the generated code.
Additional context
I am about to implement this and #4257 myself, but I was hoping to get some feedback before tackling the tasks. Maybe there's already a lib that does something similar from an openAPI spec?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the java-undertow-server template and the generated openapi.json referenced in the issue, then trace how the generated HttpHandler hands requests to user handlers. Done means the handler checks the specified input fields, path parameters, and formats before delegation, while preserving the requested user-handler flow.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, openapi
- Domain
- api, backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100