schema_salad icon indicating copy to clipboard operation
schema_salad copied to clipboard

[Codegen] Remove redundancies in interfaces generated by the Java and TypeScript codegens

Open ZimmerA opened this issue 3 years ago • 1 comments

Currently, the Interfaces generated by the Java and TypeScript codegens contain redundancies in their fields caused by fields being passed down the inheritance hierarchy of the classes by the codegen.

Two possible solutions: a) Mark inherited fields with a flag like is_inherited b) Make sure that subclasses get generated after parent classes (might already be the case?). This means you can store which fields are from which class and subclasses can check if a class it is inheriting from already has the field that is currently being declared

ZimmerA avatar Dec 20 '21 18:12 ZimmerA

See https://github.com/common-workflow-language/schema_salad/issues/487#issuecomment-996607586 for a walkthrough of the problem

ZimmerA avatar Dec 20 '21 18:12 ZimmerA