contexts icon indicating copy to clipboard operation
contexts copied to clipboard

Validate JSON objects against schemas hosted at a URL

Open grayside opened this issue 9 years ago • 2 comments

My application provides the schema I am using for validation. The JsonContext ultimately enforces that all schemas be a local file on disk, though otherwise file_get_contents() can retrieve the URL just fine.

What is the preferred way to pull a schema based on a URL? Is a new custom step needed?

grayside avatar Jun 21 '16 01:06 grayside

What is the preferred way to pull a schema based on a URL?

If it’s possible, modify the existing step to allow remote schema.

sanpii avatar Jun 21 '16 07:06 sanpii

I looked into doing so, but I couldn't figure out how to inject the constructor arguments into my subclass of JsonContext. Is there a recommended means to override the step?

Or are you suggesting I PR a change to the existing step, or add an additional step for the URL use case?

grayside avatar Jun 22 '16 16:06 grayside