Bug Report Checklist
Description
In my specification I have a "oneOf" relation between two components, a interface ExINterface and a class ExObject1 implementing this interface (see specification snippet below).
When generating the code out of the specification with plugin version 7.12.0 I get the expected result:
public class ExObject1 implements ExInterface
But when generating the code with plugin version 7.13.0, the generated class does not implement the interface:
public class ExObject1
The interface class itself is not even generated.
openapi-generator version
v7.13.0
OpenAPI declaration file content or url
openapi: 3.0.3
info:
title: Example API
description: This is an example API specification serving as error reproducer
version: 1.0.0
paths:
/example:
get:
summary: Example endpoint
description: This is an example endpoint
operationId: getExample
parameters:
- name: exampleParam
in: query
required: true
description: An example query parameter
schema:
type: string
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '#/components/schemas/ExInterface'
components:
schemas:
ExInterface:
oneOf:
- $ref: '#/components/schemas/ExObject1'
ExObject1:
type: object
properties:
name:
type: string
description: The name of the object
Generation Details
Using the following code gen options:
{
"generatorName": "java",
"library": "google-api-client",
"sourceFolder": ".",
"basePackage": "sk.example.base",
"configPackage": "sk.example.config",
"modelPackage": "sk.example.model",
"apiPackage": "sk.example.client",
"disallowAdditionalPropertiesIfNotPresent": true,
"interfaceOnly": true,
"legacyDiscriminatorBehavior": false,
"openApiNullable": false,
"useBeanValidation": true,
"useEnumCaseInsensitive": true,
"useJakartaEe": true,
"useOneOfInterfaces": true,
"useOptional": false
}
Steps to reproduce
Calling "./gradlew openapiGenerate" and reviewing the generated class "ExObject1".
Related issues/PRs
Suggest a fix
Bug Report Checklist
Description
In my specification I have a "oneOf" relation between two components, a interface ExINterface and a class ExObject1 implementing this interface (see specification snippet below).
When generating the code out of the specification with plugin version 7.12.0 I get the expected result:
public class ExObject1 implements ExInterfaceBut when generating the code with plugin version 7.13.0, the generated class does not implement the interface:
public class ExObject1The interface class itself is not even generated.
openapi-generator version
v7.13.0
OpenAPI declaration file content or url
Generation Details
Using the following code gen options:
{ "generatorName": "java", "library": "google-api-client", "sourceFolder": ".", "basePackage": "sk.example.base", "configPackage": "sk.example.config", "modelPackage": "sk.example.model", "apiPackage": "sk.example.client", "disallowAdditionalPropertiesIfNotPresent": true, "interfaceOnly": true, "legacyDiscriminatorBehavior": false, "openApiNullable": false, "useBeanValidation": true, "useEnumCaseInsensitive": true, "useJakartaEe": true, "useOneOfInterfaces": true, "useOptional": false }Steps to reproduce
Calling "./gradlew openapiGenerate" and reviewing the generated class "ExObject1".
Related issues/PRs
Suggest a fix