You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a Rails controller that generates various schemas.
In one such schema, I $ref another schema. The $ref url is generated using the typical Rails url helpers.
The problem arises when I try to run some tests that try to validate some data against the schemas. Since it's running in Rails TEST environment, the generated url's have 'www.example.com' as the HOST. When json-schema tries to open the $ref'ed URL, it gets a 404.
I've come up with a hack to work around this, but I think the 'right' solution would be if json-schema had a means of providing pluggable URL resolvers for this type of situation.
I'm considering submitting a patch for this, but I'd like to hear anyone's thoughts on this idea or alternative solutions.
The text was updated successfully, but these errors were encountered:
I think that's a great idea. I'd really like to take some time and clean up the external schema referencing anyway, and provide some security flags / options around it to avoid following links, etc.
Here's my situation:
I have a Rails controller that generates various schemas.
In one such schema, I $ref another schema. The $ref url is generated using the typical Rails url helpers.
The problem arises when I try to run some tests that try to validate some data against the schemas. Since it's running in Rails TEST environment, the generated url's have 'www.example.com' as the HOST. When json-schema tries to open the $ref'ed URL, it gets a 404.
I've come up with a hack to work around this, but I think the 'right' solution would be if json-schema had a means of providing pluggable URL resolvers for this type of situation.
I'm considering submitting a patch for this, but I'd like to hear anyone's thoughts on this idea or alternative solutions.
The text was updated successfully, but these errors were encountered: