Open sujeet-banerjee opened 1 year ago
You can add <useOneOfInterfaces>false</useOneOfInterfaces> in <configOptions>
block, after that it will generate a class.
Facing the same issue. useOneOfInterfaces
makes no difference for me. Did you find a solution @sujeet-banerjee?
Facing the same issue.
useOneOfInterfaces
makes no difference for me. Did you find a solution @sujeet-banerjee?
Nope. For our purpose we have implemented a workaround. Alternatively, you could try to hack around the mustache templates (but I had not luck, nonetheless, I did not go ahead further that route)
Description
Summary: Using Maven plugin, the openapi generator (6.2.1) creates a BLANK interface (shown below 'VnfLcmOpOcc'), as opposed to Pojo.
FYI: The declaration/swagger defines properties for the Type "VnfLcmOpOcc" (swagger/declaration link given in the sections below).
Upon some debugging, it appears that the generator INCORRECTLY assigns
x-is-one-of-interface=true
for the property 'changedInfo':That is obviously incorrect - as there is no VendorExtension defined in the swagger/declarations
openapi-generator version
6.2.1
OpenAPI declaration file content or url
The swagger (details given below) is an OpenApi 3.0 compliant one, and is available publicly: https://forge.etsi.org/rep/nfv/SOL002-SOL003/-/blob/v4.3.1/src/SOL003/VNFLifecycleManagement/VNFLifecycleManagement.yaml which refers to: https://forge.etsi.org/rep/nfv/SOL002-SOL003/-/blob/v4.3.1/src/SOL003/VNFLifecycleManagement/definitions/SOL003VNFLifecycleManagement_def.yaml
Look for "VnfLcmOpOcc"
Command line used for generation
Used maven plugin for generation:
Steps to reproduce
Copy the swagger from ETSI forge locally, and use the Maven plugin to invoke the generator. And take a look at the generated class VnfLcmOpOcc - which is INCORRECT - a blank interface.
Related issues/PRs
Suggest a fix/enhancement
I am not sure why the generator makes VendorExtension.x-is-one-of-interface=true.