Bug Report Checklist
Description
Bar.java looks like this with openapi-generator-cli generate -g spring -i example.yml -o output:
/**
* The maximum value
* @return foo
*/
@Size(min = 1, max = 10)
@Schema(name = "foo", description = "The maximum value", required = false)
public String getFoo() {
return foo;
}
With the schema remapped (--schema-mappings=Foo=com.example.Foo), it's missing @Size and description:
/**
* Get foo
* @return foo
*/
@Valid
@Schema(name = "foo", required = false)
public com.example.Foo getFoo() {
return foo;
}
openapi-generator version
6.0.1
OpenAPI declaration file content or url
openapi: "3.0.0"
info:
version: 1.0.0
title: Example
license:
name: MIT
paths:
/pets:
get:
summary: List all pets
operationId: listPets
tags:
- pets
responses:
'200':
description: A paged array of pets
content:
application/json:
schema:
$ref: "#/components/schemas/Bar"
components:
schemas:
Bar:
type: object
properties:
foo:
$ref: "#/components/schemas/Foo"
Foo:
type: string
description: The maximum value
minLength: 1
maxLength: 10
Related issues/PRs
#12600
Bug Report Checklist
Description
Bar.javalooks like this withopenapi-generator-cli generate -g spring -i example.yml -o output:With the schema remapped (
--schema-mappings=Foo=com.example.Foo), it's missing@Sizeanddescription:openapi-generator version
6.0.1
OpenAPI declaration file content or url
Related issues/PRs
#12600