2 ms·
I got you now. The data comes from an external source, and then you wanted to infer json schema from it. So I guess the json response from APIs don't have json
by Existenceblinks 4y ago
I got you now. The data comes from an external source, and then you wanted to infer json schema from it. So I guess the json response from APIs don't have json schema defined for you. But you could define schema from their api documentation, right? It doesn't matter what tool used to generate the json schema, we only care about the result that is the schema so that you can it wherever.
Trust me on JSON Schema spec, it's been in draft for a decade, to the point they stop calling it "draft" and put date on it instead. It's a frustrating specification (I read the whole thing dozen of time because I wanted it to fully compatible .. but decided to only adopt nice subset of it)
Your use case is very niche though.
- user3939382 4y ago> the json response from APIs don't have json schema defined for you. But you could define schema from their api documentation, right? Yes exactly. > it's been in draft for a decade https://json-schema.org/blog/posts/future-of-json-schema#standards-considerations https://json-schema.org/blog/posts/future-of-json-schema#sta... https://github.com/json-schema-org/community/discussions/69 https://github.com/json-schema-org/community/discussions/69 I can see they're working on this issue. Hopefully they get it resolved sooner rather than later.
- Existenceblinks 4y agoI'm bearish on the spec. I think it's practically done since draft-4 or draft-7. Almost nobody is going to use something like dynamic scope recursion, and bundle (compound document), unless libs force them to.