Bug Report Checklist
Description
The x-class-extra-annotation vendor extension doesn't generate lists of annotations correctly.
openapi-generator version
7.22.0
OpenAPI declaration file content or url
openapi: 3.0.1
info:
title: x-class-extra-annotation test
version: 0.0.1
paths:
/:
get:
responses:
'200':
description: desc
content:
application/json:
schema:
$ref: '#/components/schemas/User'
components:
schemas:
User:
x-class-extra-annotation:
- '@CustomAnnotationA'
- '@CustomAnnotationB'
properties:
name:
type: string
openapi.yaml
Generation Details
openapi-generator-cli generate \
-i ./openapi.yaml \
-g java \
-o ./build/generated/openapi \
--global-property models,modelDocs=false,modelTests=false \
--additional-properties=hideGenerationTimestamp=true
Steps to reproduce
- Add the
x-class-extra-annotation field to your schema using a list of values e.g.
x-class-extra-annotation:
- '@CustomAnnotationA'
- '@CustomAnnotationB'
- Run the generator with the CLI command above
Expected output
@javax.annotation.Generated(...)
@CustomAnnotationA
@CustomAnnotationB
public class User {
// ...
}
Actual output
@javax.annotation.Generated(...)
[@CustomAnnotationA, @CustomAnnotationB]
[@CustomAnnotationA, @CustomAnnotationB]
public class User {
// ...
}
Related issues/PRs
Suggest a fix
Bug Report Checklist
Description
The
x-class-extra-annotationvendor extension doesn't generate lists of annotations correctly.openapi-generator version
7.22.0
OpenAPI declaration file content or url
openapi.yaml
Generation Details
Steps to reproduce
x-class-extra-annotationfield to your schema using a list of values e.g.Expected output
Actual output
Related issues/PRs
Suggest a fix