There was a series of code paths that was causing a Swagger Schema passsed to convertSubSchema to be mutated. In some circumstances the given schema was being copied due to behaviour of omit but there was certain cases where this isn't true. When omit doesn't need to remove any items it was returning the same reference.
When the conversion is taking place, example is changed to examples as per the differences between Swaggger Schema and JSON Schema. Since this was updated as a mutation to the given sub schema it was causing other schema references to break.
There was a series of code paths that was causing a Swagger Schema passsed to
convertSubSchema
to be mutated. In some circumstances the given schema was being copied due to behaviour ofomit
but there was certain cases where this isn't true. Whenomit
doesn't need to remove any items it was returning the same reference.When the conversion is taking place,
example
is changed toexamples
as per the differences between Swaggger Schema and JSON Schema. Since this was updated as a mutation to the given sub schema it was causing other schema references to break.Closes #226