apiaryio / fury-adapter-swagger

Swagger 2.0 parser adapter for Fury.js
MIT License
11 stars 12 forks source link

Support example references in definitions #227

Closed kylef closed 5 years ago

kylef commented 5 years ago

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.

Closes #226