Bug Report Checklist
Description
jaxrs-resteasy-eap generates invalid Bean Validation annotations for properties of the following type:
type: integer
format: int64
maximum: 9999999999
which are represented as Longs in generated Java code.
The generated Bean Validation annotation is @Max(9999999999) and the project doesn't compile, because 9999999999 is greater than Integer.MAX_VALUE.
The generated annotation should be @Max(9999999999L).
openapi-generator version
4.2.3, 4.3.0-SNAPSHOT
OpenAPI declaration file content or url
openapi: 3.0.0
info:
version: 1.0.0
title: OpenAPI Petstore
paths:
/pet/{petId}:
get:
operationId: getPetById
parameters:
- name: petId
in: path
required: true
schema:
type: integer
format: int64
maximum: 9999999999
responses:
200:
description: success
content:
application/json:
schema:
$ref: "#/components/schemas/Pet"
components:
schemas:
Pet:
type: object
required:
- id
- name
properties:
id:
type: integer
format: int64
name:
type: string
tag:
type: string
Command line used for generation
java -jar openapi-generator-cli.jar generate -g jaxrs-resteasy-eap -i sample.yaml -o sample
Steps to reproduce
- run command
- try to build the project with Maven
Related issues/PRs
No
Suggest a fix
Use files
- beanValidation.mustache
- beanValidationCore.mustache
- beanValidationHeaderParams.mustache
- beanValidationPathParams.mustache
- beanValidationQueryParams.mustache
from jaxrs-resteasy
I will open a PR with the suggested fix
Bug Report Checklist
Description
jaxrs-resteasy-eap generates invalid Bean Validation annotations for properties of the following type:
which are represented as
Longs in generated Java code.The generated Bean Validation annotation is
@Max(9999999999)and the project doesn't compile, because9999999999is greater thanInteger.MAX_VALUE.The generated annotation should be
@Max(9999999999L).openapi-generator version
4.2.3, 4.3.0-SNAPSHOT
OpenAPI declaration file content or url
Command line used for generation
java -jar openapi-generator-cli.jar generate -g jaxrs-resteasy-eap -i sample.yaml -o sample
Steps to reproduce
Related issues/PRs
No
Suggest a fix
Use files
from jaxrs-resteasy
I will open a PR with the suggested fix