voxpupuli / json-schema

Ruby JSON Schema Validator
MIT License
1.54k stars 243 forks source link

Combine Merged In-Memory Schema Hash #253

Open BGarretson opened 9 years ago

BGarretson commented 9 years ago

We maintain our schema in multiple files for modularity, but we have a team that needs to consume this schema and because hosting it is not an option, we need to find a way to output the schema that is assembled/validated against in-memory by the json-schema library.

Is there a way to pull out the summary hash that represents the complete schema that is stitched together by json-schema gem in memory?

RST-J commented 9 years ago

I have prepared a feature which probably does exactly what you need. Its #222 but it is not merged yet (and there are some minor style changes I would make before merging it, but if that is what you need and have the time to try with the branch from my repositry whether it fits your needs that would be great feedback.

BGarretson commented 9 years ago

From reading the code and comments that branch appears to do exactly what I need to do. I gave some feedback about some trouble you were having with referencing a local file in a $ref statement that might be helpful. I'll try to make time to test your branch and get back to you