Skip to content

[BUG] No more inheritance for components generated by version 5.0.0 #8495

@antonio-petricca

Description

@antonio-petricca
Description

No schema inheritance.

openapi-generator version

5.0.0

OpenAPI declaration file content or url
schemas:
  UserDTO:
      type: object
      properties:
        id:
          type: string
          minLength: 1
          maxLength: 20

  QueryUserResponseDTO:
      type: object
      allOf:
        - $ref: '#/components/schemas/UserDTO'
Generation Details

The above YAML produces:

public class QueryUserResponseDTO   {
   private @Valid String id;
}

Instead as for the 4.3.1:

public class QueryUserResponseDTO extends UserDTO   {
}
Suggest a fix

Does exist a configuration parameter to enforce the DTO inheritance generation? Or it is a bug?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions