Skip to content

[REQ] [java-undertow-server] Provide HttpHandler that checks input JSON and params #4259

Open
@ghost

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?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions