title: Using Newtonsoft Jschema, how can I validate derived class properties based on an abstract class?
body: <p>An example would be I have an array of the abstract class <code>Production</code> which has derived classes of <code>Movie</code> and <code>Series</code>. I have an array in the schema that is a <code>Production[]</code> which can hold either a <code>Movie</code> or <code>Series</code>. I'm validating schema that is being provided to us by a third party. I am only validating, not deserializing so I am validating it with the validation stream.</p>
  
  <p>When I validate that array, it only validates against the properties within <code>Production</code>. It skips any properties that are within the derived classes. How can I get it to validate against the correct derived class properties? I have a <code>ProductionType</code> property on <code>Production</code> which is a one to one match to the derived class.</p>
  
  <p>I have tried adding the derived class schemas to the "AdditionalItems" in the <code>ProductionGenerationProvider</code> and manually validate against it in the <code>ProductionValidationProvider</code>. Did this by <code>value.Validate(matchedSchemaItem)</code>. This causes a whole new validation to be spawned off instead of validate it within the context of the current validation.</p>
  
  <p>I also tried using the <code>OneOf</code> property on the schema by passing in the references to all the derived types but it just tells me that it didn't validate against any of the items in OneOf.</p>
  
  <p>Is there a way another way to do this? I assume this is a solved issue and I just haven't come across the solution.</p>