[BUG][SPRING] Generates mutlible tags in Operation annotation if more then one tag is defined.
Created by: ugrave
Bug Report Checklist
-
Have you provided a full/minimal spec to reproduce the issue? -
Have you validated the input using an OpenAPI validator (example)? -
Have you tested with the latest master to confirm the issue still exists? -
Have you searched for related issues/PRs? -
What's the actual output vs expected output? -
[Optional] Sponsorship to speed up the bug fix or feature request (example)
Description
If more than one tag is given in the api, the generator generates two tag entries in the operational annotation
openapi-generator version
5.4.0
OpenAPI declaration file content or url
openapi: '3.0.3'
info:
version: 1.0.0
title: Example Api
paths:
/:
get:
operationId: example
tags:
- tag1
- tag2
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
properties:
id:
type: string
Generation Details
Using the spring generator with default annotationLibrary and documentation provider (springdoc).
The openapi declaration above creates this java file:
@Operation(
operationId = "example",
tags = { "tag1", "tag2" },
tags = { "tag1", "tag2" },
responses = {
@ApiResponse(responseCode = "200", description = "OK", content = @Content(mediaType = "application/json", schema = @Schema(implementation = InlineResponse200.class)))
}
)
@RequestMapping(
method = RequestMethod.GET,
value = "/",
produces = { "application/json" }
)
default ResponseEntity<InlineResponse200> example(
Steps to reproduce
See example project.