title: How to treat resources that extend other resources
body: <p>When I generate code from <code>StructureDefinition</code>s, it would be obvious to use the class for the resource referenced in <code>base</code> as superclass.</p>
  
  <p>A resource that is based on another resource can change the the type of a property of the <code>base</code> resource (for example from <code>String</code> to <code>List&lt;String&gt;</code> if <code>max="0"</code> is overridden by <code>max="*"</code>).</p>
  
  <p>This would break in strongly typed languages because a subclass has to conform to the interface of the super class (can only specialize but not generalize).</p>
  
  <p>What would be the correct strategy to deal with that?</p>
  
  <p>I can use <code>snapshot</code> instead of <code>differential</code> and not extend the class of the <code>base</code> resource.</p>
  
  <p>Should I still extend one of the more general super classes like <code>Element</code>, <code>BackboneElement</code>, <code>Resource</code>, <code>DomainResource</code>?</p>
  
  <p>Are there any flaws in my reasoning?</p>