Open mancusi opened 5 months ago
have you tried enabling the openapi normalizer rule KEEP_ONLY_FIRST_TAG_IN_OPERATION
?
(we may enable this rule by default in next release)
Ah this is actually the opposite of what I'm looking for. If I have an operation with two tags: One
and Two
I'd expect that operation to be part of both the generated OneApi
interface and TwoApi
interface.
Bug Report Checklist
Description
The useTags additionalProperty of the
jaxrs-spec
generator ignores operations with multiple tags due to code here.This means that an Api class is only generated for the first tag in the list rather than every tag.
openapi-generator version
7.5.0 -- it is not a regression.
OpenAPI declaration file content or url
Example spec here. The endpoint has two tags petV1 and petV2. I would expect PetV1Api and PetV2Api to be generated but only PetV2Api is generated due to the bug.
Generation Details
Generated with
openapi-generator generate -g jaxrs-spec -i openapi.yaml --additional-properties=useTags=true
Steps to reproduce
openapi-generator generate -g jaxrs-spec -i openapi.yaml --additional-properties=useTags=true
Suggest a fix
The issue is that additional tags are ignored due to the line here. Adding every tag on the operation would allow multiple API files to be generated.