-
Notifications
You must be signed in to change notification settings - Fork 6k
Closed
Milestone
Description
Description
Should the discriminator property be also a property of the child class even if it is already in the base class?
Swagger-codegen version
2.2
Swagger declaration file content or url
Command line used for generation
Objective-C and C# client generators generate the petType in the base and child class. Thus generating compilation warnings. OTOH, the Java generator does not duplicate the property.
Steps to reproduce
Simply generate C# or Objective-C client code for the YAML aforementioned
Related issues
Suggest a Fix
Child classes should not duplicate properties found in the base class. The work around is to only define the discriminator in the base class and then copy/paste the property on each child class.