Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • O openapi-generator
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3,476
    • Issues 3,476
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 402
    • Merge requests 402
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • OpenAPI Tools
  • openapi-generator
  • Issues
  • #4259
Closed
Open
Issue created Oct 24, 2019 by Administrator@rootContributor

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

Created by: LoveIsGrief

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?

Assignee
Assign to
Time tracking