leto icon indicating copy to clipboard operation
leto copied to clipboard

Allow explicit creation of interface types from non-abstract classes

Open tigloo opened this issue 1 year ago • 0 comments

I have a schema that has the following:

  • A "Resource" is a basic interface type with properties such as "id", "text", etc.
  • Other types such as "Organization", "Patient", "Device" implement "Resource".
  • Then there are some types that contain resources, for example a "DiagnosticReport" may have a member "documents: [Resource]".

Due to this I need to expose "Resource" as an interface but also be able to deserialize it as a partial type. I would like to be able to generate a class-based schema using code generation but since Resource needs to be abstract in order to be generated as an interface, I can't deserialize it.

tigloo avatar Jan 11 '24 06:01 tigloo