[BUG] No more inheritance for components generated by version 5.0.0
See original GitHub issueDescription
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?
Issue Analytics
- State:
- Created 3 years ago
- Reactions:15
- Comments:16 (6 by maintainers)
Top Results From Across the Web
Changelog - ViewComponent
A framework for building reusable, testable & encapsulated view components in Ruby on Rails.
Read more >Explanation - Rocket Software Documentation
Uniface 10: Changes in Subtype Property Inheritance ... Example: Generating object-dependent menu options ... Missing Characters in Unicode.
Read more >NEWS
R6 documentation no longer shows inherited methods if there aren't any (#1371), and only links to superclass docs if they're actually available (#1236)....
Read more >Inheritance In Components Makes Build Error In Angular
area you available in teamviewer? seems to be a strange issue · The question lacks CLI version, while it's most relevant here. ·...
Read more >Unreal Engine 5.0 Release Notes
Artists and designers are no longer tied to static scenes with precomputed lighting ... Newly created projects in Unreal Engine 5 will use...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The problem is that the base class can’t always know all the classes that will extend it. In my case, #9756 it isn’t even necessary as the base class isn’t used for Serialization/Deserialization. But I need the base class for methods that operate on the fields it provides. In my environment we have a “BasePage” object for paged requests. All the services that need paging extend that. BasePage can’t possibly know all the services that will support paging as it is in a common library that the services import. This change has made it impossible to support this.
Just to confirm. I updated from 4.3.1 -> 5.0.0 and I’m seeing the same issue (with dotnet-core generator) and AllOf inheritance. For us, this makes vers 5.0.0 unusable.
If any help, here is a git diff of 4.3.1 generated class and 5.0.0 generated class which shows the issue: