-
-
Notifications
You must be signed in to change notification settings - Fork 7.4k
Closed
Labels
Description
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: objectCommand 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)
Reactions are currently unavailable