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
  • #3861
Closed
Open
Issue created Sep 09, 2019 by Administrator@rootContributor5 of 5 checklist items completed5/5 checklist items

[BUG][JAVA][JAXRS] Query and path parameters are not validated

Created by: Flugtiger

Bug Report Checklist

  • Have you provided a full/minimal spec to reproduce the issue?
  • Have you validated the input using an OpenAPI validator (example)?
  • What's the version of OpenAPI Generator used?
  • Have you search for related issues/PRs?
  • What's the actual output vs expected output?
Description

The validation annotations are missing from path and query parameters. I.e. the code generated from the example below is missing the @NotNull annotation on the 'requiredParam'.

openapi-generator version

4.1.1

OpenAPI declaration file content or url
openapi: 3.0.2
info:
  title: missing validation annotations
  version: 1.0.0
paths:
  /test:
    post:
      parameters:
        - name: requiredParam
          in: query
          required: true
          schema:
            type: integer
      responses:
        202:
          description: a response
          content:
            'application/json':
              schema:
                type: object
Command line used for generation

-g jaxrs-jersey

Suggest a fix

include the beanValidation template in query and path parameter templates as well (not only in bodyParams)

Assignee
Assign to
Time tracking