-
Notifications
You must be signed in to change notification settings - Fork 362
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Accessible schema properties #15
Comments
Hi brandur, sorry for the late reply. |
Cool! Thanks of the reply. I mostly just wanted to let you know that this might be something worthwhile to explore. Feel free to close this out if appropriate. |
+1 this would be super useful! |
I agree. I'm currently looking at: https://github.com/interagent/schematic This seems to be developed by the Heroku folks for use on the Heroku-created Hyper Schema. They've re-implemented some of this package, but because Heroku's schema is now self-referential, their own code generator seems to ... not work. I would think the design of this might go like so:
This would then let other users instantiate their own visitors. |
@xeipuuv would you be open to a pull request that moves the design in this direction? |
Yes i am open to pull requests |
Yeah, this one is our bad :/ Essentially that project was booted off, but didn't really have a story around longer term maintenance and eventually it stopped working and wasn't fixed. I'm somewhat hopeful that some of the internal reorganization that we're doing will eventually put this in a position where it has some more dedicated maintainers, but that's a few months out at minimum unfortunately. For what it's worth, I really like the proposed design above. Projects like Schematic shouldn't even think about trying to parse and interpret a JSON Schema for themselves and should instead rely on more complete and better vetted libraries like this one; having a generic visitor pattern would allow us to get there. |
Nearly all fields in gojsonschema structs are invisible outside the package. This works pretty well as long as its mainly used to call
Validate
, but it might be useful to be able to re-use gojsonschema to explore a document outside of this context. For example, if I've built a JSON Hyper Schema and would like to enumerate every link that it provides.Have you put any thought into opening up these interfaces for re-use?
The text was updated successfully, but these errors were encountered: