salesking / json_schema_tools

Tools for building and handling a JSON Schema powered API's
27 stars 9 forks source link

load local refs relative to file location. #9

Closed a2800276 closed 10 years ago

a2800276 commented 10 years ago

Changes to allow $refs to be resolved relative to the location of the file containing the $ref. This involves creating an internal representation of the schema in its own class (instead of using HashWithIndifferentAccess directly). The Schema class is basically just a wrapper around the Hash that also stores the file location.

This may be dangerous if users of the library depend on the schema being a hash as not all methods are wrapped ...